Commit Graph

250 Commits (master)

Author SHA1 Message Date
Theodore Ts'o e703ba4b42 Fix reversed FORCE_NATIVE_MAKE test in acinclude.m4
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-11 23:12:07 -04:00
Theodore Ts'o f3bc1561c8 Fix FreeBSD pmake support
Fix a typo in the @ifNotGNUmake@ case of MCONFIG.in.

Also allow the FORCE_NATIVE_MAKE to force the use of the non-GNU make
optimized Makefile.  The resulting makefile will work with GNU Make
4.2.1, although "make V=1" won't be honored.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-04 00:16:35 -04:00
Theodore Ts'o a2143b5160 Fix build reproducibility for mk_cmds and compile_et
The mk_cmds and compile_et scripts include the build directory, which
breaks the build reproducibility goal of Debian.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-09-01 22:25:22 -04:00
Theodore Ts'o c94da0475a Update configure script to reflect changes from commit 62bc243f1b
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-06-21 23:16:39 -04:00
Theodore Ts'o 32179ce25b configure: fix detection of dlopen() for BSD systems
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-06-07 01:01:37 -04:00
Theodore Ts'o 749f07121d Add configure --disable-tdb which disables e2fsck's scratch_files feature
The scratch_files feature is not really needed except on 32-bit
platforms, since tdb's performance is pretty awful given how we are
using it.  Maybe SQLite would be faster, but for 64-bit platforms,
enabling swap works fairly well, especially using the rbtree for the
bitmap abstraction.

We leave tdb for Android since it's unlikely that someone will be
trying to connect petabyte+ sized file systems to a mobile handset.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-29 21:52:52 -04:00
Theodore Ts'o 2dd680f3b9 tests: fix f_pre_1970_date_encoding on systems with a 32-bit time_t
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-29 01:07:40 -04:00
Theodore Ts'o fd1677e801 Add --enable-hardening which builds e2fsprogs with security hardening
Enable the following security features: stack protection, fortify,
read-only relocation tables, immediate dynamic symbol binding, and
text segment ASLR by enabling position independent executable
(PIE).

Special handling is provided for shared library and statically linked
executables.  For all the gory details please see:

   https://lists.debian.org/debian-devel/2016/05/msg00302.html

Distributions who want to do their own special thing can set CFLAGS,
CFLAGS_SHLIB, CLFAGS_STLIB, LDFLAGS, LDFLAGS_SHLIB and LDFLAGS_STATIC
as appropriate.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-22 01:58:09 -04:00
Theodore Ts'o 2ab53829a2 configure.ac: fix up Debian naming scheme for its orig.tar.gz file
We are using a new convention for the 1.43-WIP releases which should
be less confusion by replacing the hyphens by periods (e.g.,
1.43~WIP.2016.03.06 instead of 1.43~WIP-2016-03-06).  This avoids
confusion regarding the debian release number (which uses the last
hyphen in the version string to separate the upstream version from the
release number).

Also fix a typo in the version number used in the debian changelog and
e2fslibs.symbols file.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-15 01:24:44 -04:00
Theodore Ts'o f34af41b72 rename libquota.a to libsupport.a
We will be using libsupport.a for e2fsprogs's internal support
functions.  It will contain the quota support functions, but we will
also be moving code such as profile.c and plausible.c to libsupport.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-07-12 16:09:22 -04:00
Theodore Ts'o 9e8fcd6e01 configure: remove support to disable quota support
For the 1.43 release, quota support will be the default.  It's much
simpler if we don't try to make quota support optional.  This was done
originally because the quota feature wasn't fully tested.  It is now,
so we can remove this as an option.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-07-03 22:02:30 -04:00
Theodore Ts'o 149640fabc configure: remove support to disable htree support
The presence of --disable-htree is very much a legacy thing.  Remove
it since supporting the lack of htree support is pretty silly.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-07-03 16:29:35 -04:00
Theodore Ts'o 44dfb37829 configure: only include libuuid and libblkid in AC_OUTPUT if needed
If we are not buildinig the uuid or blkid library, we shouldn't create
the Makefile and other files generated by configure / config.status.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-07-01 19:42:05 -04:00
Theodore Ts'o f5dffb8132 configure: use system libraries for blkid and uuid if present
The configure script will now determine if the blkid and uuid
libraries are present (requires that pkg-config and their .pc files
are available).

In addition, enable quota support by default.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-20 14:20:14 -04:00
Theodore Ts'o 74f2c4aa18 fix diet libc build breaks for e4crypt and fallocate
Diet libc doesn't support syscall correctly, but it does have
add_key() and keyctl() in libc (although glibc does not).  So change
e4crypt to use add_key() and keyctl() directly if they are available.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-19 19:28:25 -04:00
Darrick J. Wong 81cbf1ef4f misc: add fuse2fs, a FUSE server for e2fsprogs
This is the initial implementation of a FUSE server based on
e2fsprogs.  The point of this program is to enable ext4 to run on any
OS that FUSE supports (and doesn't already have a native driver), such
as MacOS X, BSDs, and Windows.  The code requires FUSE API v28, which
is available in Linux fuse and osxfuse releases that are available as
of August 2013.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-10 20:07:48 -04:00
Darrick J. Wong 79614b2709 libext2fs/e2fsck: provide routines to read-ahead metadata
This patch adds to e2fsck the ability to pre-fetch metadata into the
page cache in the hopes of speeding up fsck runs.  There are two new
functions -- the first allows a caller to readahead a list of blocks,
and the second is a helper function that uses that first mechanism to
load group data (bitmaps, inode tables).

These new e2fsck routines require the addition of a dblist API to
allow us to iterate a subset of a dblist.  This will enable
incremental directory block readahead in e2fsck pass 2.

There's also a function to estimate the readahead given a FS.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-04-21 10:40:15 -04:00
Theodore Ts'o 4a05268cf8 Remove compression support
The compression patches were an out-of-kernel patch set that was (a)
only available for ext2, (b) something that was never could be
stablized due to file system corruption, and (c) the most recent
patches were for 3.1, last updated in 2011.

The history of the compression patches has been a bit checkered.
There is a long history here at http://e2compr.sourceforge.net which
lists the perspective of the people working on it from the e2compr
side.

From the ext2/3/4 mainline developers' perspective, initial
compression support was added to e2fsprogs in 2000 (in the Linux 2.2
era), but due to stability concerns the kernel patches were never
merged into the mainline kernel.  While there were some sporadic
efforts to try to get the ext2 compression patches working in the 2.4
and 2.6 era, by that time mainline work had moved on to ext4, and the
e2compr approach could only work with 32-bit block numbers and
indirect mapped files.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-04-12 08:42:40 -04:00
Theodore Ts'o 8b779489ea Merge branch 'maint' into next
Conflicts:
	configure
2014-11-04 11:20:09 -05:00
Theodore Ts'o 441eb337a8 util: allow subst to build on systems that do not have utimes()
Make subst more portable so it can deal with such oler systems that do
not have utimes().  Note that it is important that subst build
correctly without an autoconf-generated config.h (since that is what
happens on a cross-compile), as well as using whatever features are
available as determined by autoconf when doing a native build.  We
currently assume the presence of utime(), but not utimes() or
futimes().

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-10-19 22:13:09 -04:00
Theodore Ts'o d2e3c0dc60 misc: if dlopen() is available, use it to load the libmagic library
This prevents the libmagic library from being a hard dependency; if
it's not there, we can simply do without it.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Darrick J. Wong <darrick.wong@oracle.com>
2014-09-21 01:25:58 -04:00
Darrick J. Wong b291c11f08 misc: use libmagic when libblkid can't identify something
If we're using check_plausibility() to try to identify something that
obviously isn't an ext* filesystem and libblkid doesn't know what it
is, try libmagic instead.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-09-20 23:42:19 -04:00
Theodore Ts'o a133c81d06 Merge branch 'maint' into next 2014-09-19 00:28:46 -04:00
Theodore Ts'o e3d10158e6 configure: disable uuidd by default if libuuid is disabled
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-09-19 00:26:26 -04:00
Theodore Ts'o 1bbea9c909 Merge branch 'maint' into next 2014-09-18 21:28:59 -04:00
Theodore Ts'o 5afdf37b56 fix build with configure --disable-uuid --disable-blkid --enable-profile
We need to make sure PROFILED_LIBUUID and PROFILED_LIBBLKID are
defined when we are using the system uuid and blkid libraries.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-09-18 21:11:33 -04:00
Michael Forney 1419b5ae0b Don't clear BUILD_CFLAGS and BUILD_LDFLAGS when cross-compiling
Signed-off-by: Michael Forney <forney@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-09-16 12:26:49 -04:00
Theodore Ts'o 489ff4a2c7 Merge branch 'maint' into next
Conflicts:
	configure
2014-08-08 17:02:34 -04:00
Theodore Ts'o f00948ad1d libext2fs: have UNIX IO manager use pread64/pwrite64
Commit baa3544609 ("libext2fs: have UNIX IO manager use
pread/pwrite) causes a breakage on 32-bit systems where off_t is
32-bits for file systems larger than 4GB.  Fix this by using
pread64/pwrite64 if possible, and if pread64/pwrite64 is not present,
using pread/pwrite only if the size of off_t is at least as big as
ext2_loff_t.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-08-08 16:42:05 -04:00
Theodore Ts'o 14207cf60e Merge branch 'maint' into next
Conflicts:
	configure
	misc/Makefile.in
2014-08-02 22:05:03 -04:00
Darrick J. Wong baa3544609 libext2fs: have UNIX IO manager use pread/pwrite
If pread/pwrite are present, have the UNIX IO manager use them for
aligned IOs (instead of the current seek -> read/write), thereby
saving us a (minor) amount of system call overhead.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-08-02 19:18:03 -04:00
Ross Burton c84da2eed0 misc: copy extended attributes in populate_fs
When creating a file system using a source directory, also copy any extended
attributes that have been set.

[ Add configure tests for Linux-specific xattr syscalls and add fallback
  when compiling on non-Linux systems. --tytso ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-07-27 21:19:24 -04:00
Theodore Ts'o f10554e1c2 Merge remote-tracking branch 'origin/maint' into next
Conflicts:
	RELEASE-NOTES
	debian/changelog
	version.h
2014-07-10 01:07:39 -04:00
Theodore Ts'o 5b5bd2c251 Fix up configure so it finds mkinstalldirs
As an object lesson in why autoreconf is fundamentally unsafe, the
newer version of nls.m4 no longer handles @MKINSTALLDIRS@.  So add
this back, since our Makefiles depend on it.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-07-10 00:20:49 -04:00
Theodore Ts'o c42de75b2f mke2fs: add support to align hugefiles relative to beginning of the disk
Add the mke2fs.conf configuration option which causes the hugefiles to
be aligned to the beginning of the disk.  This is important if the the
reason for aligning the hugefiles is to support hard-drive specific
features such as Shingled Magnetic Recording (SMR).

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-07-09 10:42:13 -04:00
Theodore Ts'o 7f7d1cb462 Merge branch 'maint' into next
Conflicts:
	debugfs/set_fields.c
	tests/f_mmp/script
	tests/f_mmp_garbage/script
	tests/m_mmp/script
	tests/t_mmp_1on/script
	tests/t_mmp_2off/script
2014-07-06 00:09:27 -04:00
Theodore Ts'o 2d7583bd42 configure.in: fix external libblkid test for static link
External libblkid needs -luuid when linking statically.

Also fix up the bogus other-lib parameter in the libuuid test;
$LIBUUID is the null string, so it doesn't do anything other than
obfuscate the use of AC_CHECK_LIB.

Reported-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-07-05 00:30:35 -04:00
Andreas Dilger 51050544b5 blkid: remove unnecessary header and comment
The LIST_HEAD macro is not directly used in getsize.c, so
<sys/queue.h> is not needed at all, and could cause confusion at
some later point if the Linux-style list macros are ever used.

Build was verified on MacOS which defined HAVE_SYS_DISK_H true.
I manually inspected the sources for recent *BSD headers to check
if this was needed there or not.  MacOS and FreeBSD <sys/disk.h>
do not use lists at all.  NetBSD and OpenBSD <sys/disk.h> and all
of the <sys/mount.h> headers include <sys/queue.h> internally.

I used http://fxr.watson.org/fxr/source/sys/mount.h?v={OSTYPE}
as a reference, checking both old and new *BSD versions.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-07-04 23:59:45 -04:00
Eric Sandeen 2f8d025196 e2fsprogs: remove checker infrastructure
Per http://www.gnu.org/software/checker/ the gcc "-checker" option
is long deprecated.  Nuke it from e2fsprogs.

Most people would never hit this, but people who love to turn knobs,
such as the reporter of kernel.org bz#74171, might run into it and be
sad.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-07-04 23:59:30 -04:00
Theodore Ts'o 9361395106 aclocal.m4: update to newer versions of autoconf macros
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-07-04 23:49:23 -04:00
Theodore Ts'o c9bc7484cc Merge branch 'maint' into next
Conflicts:
	e2fsck/pass1.c
2014-05-11 18:30:11 -04:00
Chen Qi 91f04685bf Fix cross compilation problem in parse-types.sh
The checking of types in parse-types.sh doesn't make much sense in a
cross-compilation environment, because the generated binary is
executed on build machine.

So even if asm_types.h has got correct statements for types, it's
possible that the generated binary will report an error, because these
types are for the target machine.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-05-07 10:51:50 -04:00
Theodore Ts'o 2de2628b2d mke2fs: check for a partition table and warn if present
This supercedes the "whole disk" check, since it does a better job and
there are times when it is quite legitimate to want to use the whole
disk.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-05-07 10:51:50 -04:00
Theodore Ts'o 3ba59bf649 Merge branch 'maint' into next 2014-02-23 23:07:38 -05:00
Theodore Ts'o fedfb27fe5 Add coverage testing using gcov
To check the coverage of e2fsprogs's regression test, do the
following:

	configure --enable-gcov
	make -j8 ; make -j8 check ; make coverage.txt

The coverage information will be the coverage.txt and *.gcov files in
the build directories.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-02-23 00:17:09 -05:00
Theodore Ts'o d5fc19fc96 Merge branch 'maint' into next 2014-02-06 15:39:28 -05:00
Theodore Ts'o d7fa4103f5 configure: support biarch builds with --multiarch=lib64
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-02-05 15:45:36 -05:00
Theodore Ts'o d2dce124dd Merge branch 'maint' into next
Conflicts:
	debian/changelog
	e2fsck/Makefile.in
2014-01-06 06:58:58 -05:00
Theodore Ts'o 6c59a665da configure: fix --with-diet-libc
Newer versions of autoconf pull in AC_PROG_GCC as part of
AC_CANONICAL_HOST.  So we need check for WITH_DIET_LIBC earlier in
configure.in.

Also, e2fsprogs now needs functions which are found in diet libc's
compat library.  So add support for autoconf's LIBS function, and
automatically set libs to include -lcompat.

Finally, disable compiling e4defrag by deault if --with-diet-libc is
specified because the program has too many glibc dependencies.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-01-05 22:58:16 -05:00
Baruch Siach 9a39389185 e4defrag: choose the best available posix_fadvise variant
Use posix_fadvise64() when available.  This allows 64bit offsets on
32bit systems.

[ Modified by tytso to try to use fadvise64() as well, and to remove
  the attempt to call the syscall directly, since because and
  complexities caused by required dummy arguments on some
  architectures, it's not worth the hair.  ]

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-01-05 22:55:10 -05:00