Commit Graph

237 Commits (2df733facd99261a4c462f76f72e143e803487d0)

Author SHA1 Message Date
Theodore Ts'o d3de1a714f configure: clarify message regarding checking if we can link with -static
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-12-15 22:11:31 -05:00
Theodore Ts'o ccea20f62d Merge branch 'maint' into next
Conflicts:
	misc/tune2fs.c
2012-11-29 19:54:46 -05:00
Eric Sandeen 7b8912eaab e2fsprogs: fix configure help text for quota
It's --enable-quota, not --enable-libquota.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-11-28 22:51:19 -05:00
Theodore Ts'o 0e7e7c8ef8 Merge branch 'maint' into next
Conflicts:
	lib/ext2fs/ext2fs.h
2012-09-09 22:52:26 -04:00
Theodore Ts'o 91d11da143 configure: fix --enable-relative-symlink
The configure option --enable-relative-symlinks was incorrectly
specified in configure.in, as --enable-symlink-relative-symlinks.  Fix
the configure script so that --enable-relative-symlinks works, as well
as previous incorrect command line option.  We will keep the older,
incorrect --enable-symlink-relative-symlinks for at least two years
before removing it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-07 00:09:19 -04:00
Tony Breeds 1625bf42d6 Add support so that all bmap statistics via configure options
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-30 14:50:53 -04:00
Tony Breeds d6a4bcb517 Make Multi Mount Protection (MMP) optional at configure time.
Add --{en,dis}able-mmp options for configure, default to enabled.
Also make tools fail gracefully in the event of encoutering a filesystem
with MMP enabled when the tools were compiled with --disable-mmp

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-30 14:50:30 -04:00
Theodore Ts'o c1986ecb6f Fix blhc (Build Log Hardening Check) warnings
The Build Log Hardening Check is a debian tool which scans the output
of a package build making sure that the security hardening flags are
used when compiling and linking all of binaries in a package.

For the most part we were passing CFLAGS, CPPFLAGS, and LDFLAGS down
to the compiler and link commands, but there there were one or two
exceptions.  In addition, there where a few places in "make install"
where the V=1 option was not being honored, which triggered blhc
warnings since it couldn't analyze those commands.

The e2fsck.static was the only binary that was not getting built and
packaged with the hardening flags, but I've fixed all of the blhc
warnings so in the future it will be obvious if we regress.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-06-13 16:06:44 -04:00
Theodore Ts'o 3b802e43d9 libquota: remove quota_is_on() which was the last user of quotactl()
The quotactl() system call was being used without the use of a
function prototype.  On closer examination, it turns out the one user
of that system call was the quota_is_on() function, which is not used
by e2fsprogs at all.  Since libquota is an e2fsprogs-internal library,
and not one that we plan to export any time soon, the simplest thing
to do is to simply remove quota_is_on(), which in turn allows us to
remove all of the infrastructure around using the Linux-specific
quotactl() system call.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-05-28 10:38:06 -04:00
Theodore Ts'o 183c73b026 Teach build system to install relative symlinks if requested
Add a configure option, --enable-relative-symlinks, which will use
relative symlinks for the ELF shared library files.

Addresses-Sourceforge-Bug: #3520767

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-05-12 23:34:33 -04:00
Theodore Ts'o b24efa2187 Don't assume that the presence of mntent.h means that setmntent() exists
Change autoconf to test for setmntent() and use that to decide whether
to use getmntent() and setmntent(), since some systems don't have
setmntent() but they do have the mntent.h header file.

Also, remove the includes of mntent.h from e2fsck and mke2fs and other
places where it is not needed.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-04-05 15:31:09 -07:00
Theodore Ts'o 25ff7725cc e2fsck: add portability fallback in case getpwuid_r is not present
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-04-05 15:16:50 -07:00
Mike Frysinger 677fc9169c configure: sort the lists for AC_CHECK_FUNCS and AC_CHECK_HEADERS
By using m4_flatten, should be easier to maintain these lists.

Regen configure and config.h.in after doing this.

(Modified by tytso to use m4_flatten for the list of header files
checked by AC_CHECK_HEADERS)

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-06 20:19:02 -05:00
Andreas Dilger 0df8a27bba libquota: don't include system quota.h header
Don't use the system <sys/quota.h> header in mkquota.c, since there
is a local e2fsprogs version of quota.h that is already included and
has the desired quota constants, and avoids symbol conflicts with the
system <sys/quota.h> on other platforms (in particular OSX).

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-02-27 01:28:23 -05:00
Theodore Ts'o db40c20e3f configure: check for msync() for portability reasons
Turns out the Hurd defines MS_SYNC but doesn't define msync().  Go
figure.   So check for both.

Reported by Svante Signell.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-28 12:31:29 -05:00
Theodore Ts'o 7becb2065f Make quota support disabled by support
Quota support can be enabled using --enable-quota.  There are still
some buglets that we need to fix up before it can be considered 100%
supported, so let's disable it for the 1.42 release.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-14 10:46:30 -05:00
Theodore Ts'o edbfd75d8f libquota: clean up some gcc -Wall warnings
Remove unused variables, places where 'return' was used with no value
in a non-void function, missing function declarations, etc.  Don't
assume that all systems have quotactl(), and use <sys/quota.h> if it
exists to define the quotactl interfaces.

One of the unused variables also got rid of a non-portable use of
PATH_MAX.

Cc: Aditya Kali <adityakali@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-04 11:37:46 -04:00
Theodore Ts'o 55e00a2503 debian: add support for multiarch
Enhance the debian build rules so it will create multiarch compliant
packages on those distributions that have support for it.

Also remove e2initrd-helper from the e2fsprogs package since no one
uses it any more.

Also update the debian policy standards version to 3.9.2.

Addresses-Debian-Bug: #632169

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-18 23:53:23 -04:00
Theodore Ts'o d1154eb460 Shorten compile commands run by the build system
The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and
this was starting to cause some tools heartburn.  It also made "make
V=1" almost useless, since trying to following the individual commands
run by make was lost in the noise of all of the defines.

So fix this by putting the configure-generated defines in lib/config.h
and the directory pathnames to lib/dirpaths.h.

In addition, clean up some vestigal defines in configure.in and in the
Makefiles to further shorten the cc command lines.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-18 17:34:37 -04:00
Lukas Czerner d2bfdc7ff1 e2fsprogs: Use punch hole as "discard" on regular files
If e2fsprogs tools (mke2fs, e2fsck) is run on regular file instead of
on block device, we can use punch hole instead of regular discard
command which would not work on regular file anyway. This gives us
several advantages. First of all when e2fsck is run with '-E discard'
parameter it will punch out all ununsed space from the image, hence
trimming down the file system image. And secondly, when creating an
file system on regular file (with '-E discard' which is default), we
can use punch hole to clear the file content, hence we can skip inode
table initialization, because reads from sparse area returns zeros. This
will result in faster file system creation (without the need to specify
lazy_itable_init) and smaller images.

This commit also fixes some tests that would fail due to mke2fs showing
discard progress, hence the output would differ.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-09-15 23:49:20 -04:00
Aditya Kali f239fefc14 e2fsprogs: add quota library to e2fsprogs
This patch adds the quota library (ported form Jan Kara's quota-tools) in
e2fsprogs in order to make quotas as a first class supported feature in Ext4.
This patch also provides interface in lib/quota/mkquota.h that will be used by
mke2fs, tune2fs, e2fsck, etc. to initialize and update quota files.
This first version of the quota library does not support reading existing quota
files. This support will be added in the near future.
Thanks to Jan Kara for his work on quota-tools. Most of the files in this patch
are taken as-is from quota tools and were simply modified to work with
libext2fs in e2fsprogs.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-08-31 15:21:40 -04:00
Theodore Ts'o 9b3018a82e e2fsck: catch termination signals and print information about them
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-08-11 14:56:49 -04:00
Theodore Ts'o 8d9c50c557 configure: control whether e4defrag is built/installed via --disable-defrag
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-12-24 15:19:44 -05:00
Theodore Ts'o 30c0529d27 e4defrag: Fix the overflow in e4defrag with > 2GB files
The fallocate() interface on 32-bit machines is defined to use off_t,
not loff_t (even though the system call interface is 64-bit clean).
This causes e4defrag to fail on files greater than 2GB.  Fix this by
trying to use fallocate64(), and using the hard-coded syscall if it
does not exist.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-12-16 22:53:34 -05:00
Theodore Ts'o 9d92a201de Merge branch 'maint' into next
Conflicts:
	configure
	configure.in
	lib/ext2fs/ext2fs.h
	misc/mke2fs.c
2010-09-24 22:40:21 -04:00
Theodore Ts'o 61ef2474c2 badblocks: Deal with UTF-8 characters in progress message
Addresses-Gentoo-Bug: #309909
Addresses-Debian-Bug: #583782
Addresses-Debian-Bug: #587834

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-08-01 22:30:33 -04:00
Theodore Ts'o 97d26ce9e3 Merge branch 'maint' into next
Conflicts:
	e2fsck/journal.c
	e2fsck/pass1.c
	e2fsck/pass2.c
	misc/mke2fs.c
2010-06-07 12:42:40 -04:00
Theodore Ts'o 5aa6c3f61c Add configure options --enable-symlink-build and --enable-symlink-install
These options allow e2fsprogs to be built using symlinks instead of
hard links, and to be installed using symlinks instead of hard links,
respectively.

Addresses-Sourceforge-Bug: #1436294

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-05-17 19:21:42 -04:00
Theodore Ts'o 2d07b3ad98 Merge branch 'maint' into next
Conflicts:
	configure
	lib/ext2fs/alloc_tables.c
	misc/mke2fs.c
2010-01-31 18:49:08 -05:00
Theodore Ts'o 57aa50d4a1 configure: Work around bug in autoconf 2.64
In autoconf 2.64, if AC_CHECK_LIB is first used in a conditional that
evaluates to false, the helper function ac_fn_c_try_link gets defined
inside that conditional, and then subsequent attempts to use
ac_fn_c_try_link() will blow up.  Work around this by moving an
unconditional use of AC_CHECK_LIB to the beginning of configure.in.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-11-26 10:38:04 -05:00
Theodore Ts'o 72a729dbf9 Merge branch 'maint' into next
Conflicts:
	configure
	configure.in
2009-10-24 15:14:54 -04:00
Eric Sandeen beb736b4c4 configure.in: Fix typo: remove '2' from blkid_probe_get_topology2
I think vim <esc>wq turned into <esc>2wq or something; in any case
blkid_probe_get_topology2 is not the right thing to search for.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2009-10-21 03:43:02 -04:00
Theodore Ts'o 95bcea9fc1 Merge branch 'maint' into next
Conflicts:
	configure
	configure.in
	misc/mke2fs.c
2009-10-04 20:40:46 -04:00
Eric Sandeen 9ed8e5fec2 mke2fs: get device topology values from blkid
Handle automatic selection of stride/stripe:

mke2fs 1.41.9 (22-Aug-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=16 blocks, Stripe width=32 blocks
...

And warn on block device misalignment:

mke2fs 1.41.9 (22-Aug-2009)
/dev/sdc1 alignment is offset by 32256 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Proceed anyway? (y,n)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-10-04 15:09:18 -04:00
Theodore Ts'o 0b5b9f90ee configure.in, configure: Drop --with-cc, --with-ccopts, --with-ldopts
Remove the configure options --with-cc, --with-ccopts, --with-ldopts,
and --with-ld (which never worked), since the first three can be
replaced with CC=, CCFLAGS=, and LDFLAGS= on the configure
command-line.  The default for --with-cc caused the CC= to be
overridden even with it was specified to the configure script.

Addresses-Sourceforge-Bug: #2843248

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-09-06 21:28:47 -04:00
Theodore Ts'o dc615a21c3 Merge branch 'maint' into next 2009-09-07 17:02:35 -04:00
Eric Sandeen 4f1d0e8608 e4defrag: remove a lot of cruft
e4defrag.c had a lot of stuff copied into it from other
places, redefinitions of existing interfaces, etc.

We should be able to remove most of this, as the tool only
works on recent kernels anyway, we should just pick up
definitions from recent kernel headers whenever possible.

I've left the local definitions of fallocate, fadvise
(changed to posix_fadvise) and sync_file_range, and
wrapped them in #ifdef configure-time tests - though
really it seems like only fallocate should be necessary
by now, and perhaps the others can be dropped.

We still need some Makefile work so that it won't try to
build e4defrag if the right pieces aren't there (and
if the local definitions won't work...)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-27 10:53:46 -04:00
Matthias Andree 98a5ad6147 Fix intl/ build: add E/Q/V macros, process intl/libgnuintl.h
These were found necessary to build on FreeBSD 6.4.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-07-18 18:21:46 -04:00
Theodore Ts'o bcb915b0d0 Enhance build system so that "make V=1" works like the Linux Kernel
If gmake is available, the developer can use "make V=1" instead of
using a configure-time switch, --enable-verbose-makecmds, to see all
of the commands executed by the Makefile.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-02 18:19:10 -04:00
Theodore Ts'o c13351f6c5 Add support for configure --enable-verbose-makecmds
Some people don't want to see the concise "kernel-style" make output.
This configure option allows build engines that want to see the full
set of commands executed by the makefile to get what they want.  Most
people will find this more distracting than useful, unless they need
to debug the Makefiles.

(It is not necessary to rerun configure to enable this verbose make
output temprarily; if a developer wants to do a quick debug of a
directory's makefile, he or she can simply edit the definition of the
$(E) and $(Q) variables in the Makefile; instructions can be found in
the MCONFIG file which is included in at the beginning of every
Makefile.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-02 00:11:17 -04:00
Scott James Remnant 39fd3d4f13 configure.in: add --disable-libuuid option
Add an option to switch between the private (in-tree) libuuid and
public (in-system installed) library.  The private version is still
enabled by default.

Signed-off-by: Scott James Remnant <scott@netsplit.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-06-29 00:36:45 -04:00
Theodore Ts'o 14b596d409 configure.in: add --disable-libblkid option
Add an option to switch between the private (in-tree) libblkid and
public (in-system installed) library.  The private version is still
enabled by default.

If --disable-libblkid is specified the findfs(8) program, which is a
variant of tune2fs, is also not built or installed.

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-22 09:18:30 -04:00
Theodore Ts'o 1207e36d0a libuuid: Close all file descriptors before running uuidd
This avoids problems when the calling program has open file
descriptors (especially sockets) open.

Also fix up some warn_unused_result warnings from gcc.

Addresses-Launchpad-bug: #305057

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-15 13:12:56 -04:00
Theodore Ts'o d7f45af802 libcom_err: Use sem_post/sem_init to prevent race conditions
SuSE has been carrying a patch for a long time to prevent a largely
theoretical race condition if a multi-threaded application adds and
removes error tables in multiple threads.  Unfortunately SuSE's
approach breaks compatibility by forcing applications to link and
compile with the -pthread option; using pthread mutexes has
historically been problematic.

This commit fixes things in a more portable way by using
sem_post/sem_wait instead, which is an older interface that doesn't
require the pthreads library.  Linux happens to implement
sem_post/sem_init using futexes, and -lrt ends up pulling in
-lpthread, but the advantage of using POSIX semaphores is that
applications don't have to be built using -pthread, unlike the use of
pthread mutexes.

The add_error_table() and remove_error_table() interfaces are the
preferred interfaces and locking protection have been added to only
these interfaces.  I have not added locking protection to the
generated initialize_xxx_error_table and initialize_xxx_error_table_r
interfaces, to avoid adding symbol dependencies that would cause a
library to fail to work when linking against older com_err libraries
that do not export et_list_lock() and et_list_unlock().  Threaded
applications shouldn't be using these interfaces in any case.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-12 10:15:26 -04:00
Theodore Ts'o 55da987650 Improve ELF shared library handling
Pass in -rpath-link option to the linker so that blkid will build
correctly on systems that don't have libcom_err.so.2 installed.

Fix debugfs to only try to link with -ldl when building without shared
libraries; with ELF shared libraries, the library which requires -ldl
(libss.so) can required the library dependency itself.

Fix how we build tune2fs.static so that we use @LDFLAG_STATIC@, via
$(LDFLAGS_STATIC), instead of hard-coding the use of -static.

Addresses-Sourceforge-Bug: #2088537

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-02 23:12:38 -04:00
Theodore Ts'o af773654b2 Enable test_io debugging by default
Test I/O debugging is incredibly useful for rooting out problems, so
let's enable by default, especially now that its overhead is only
incurred when it is needed.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-01 11:36:59 -04:00
Theodore Ts'o 7515a74478 Remove use of devmapper library by the blkid library
The devmapper library is no longer needed given commit f4e89bcd.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-26 23:56:00 -04:00
Theodore Ts'o 1aaaa82901 configure.in: Respect LDFLAGS environment variable if passed into configure
If the --with-ldopts option is not passed on the command line, respect
the LDFLAGS environment variable instead of forcing LDFLAGS to be
unset.  "configure --help" documents LDFLAGS as part of the standard
configure script calling convention.

Addresses-Sourceforge-Feature-Request: #1937287

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 12:26:07 -04:00
Theodore Ts'o 6ec9ef1881 libuuid: Windows portability fixes
Make the uuid library (more) portable for Windows.

Addresses-Sourceforge-Feature-Request: #1937287

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 12:15:56 -04:00
Theodore Ts'o 02d04db494 configure.in: use AC_MSG_{RESULT,WARN,ERROR} instead of echo
This gives us standard behavior when using flags such as --quiet, and
gives us standard warning output when showing warnings and errors.

Addresses-Sourceforge-Patches: #2058794

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-22 10:52:42 -04:00
Theodore Ts'o c13ab4fa7a badblocks: If nanosleep() does not exist, try using usleep() instead
For portability on systems that don't have nanosleep().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13 16:38:56 -04:00
Theodore Ts'o 3d05802f92 blkid: Add new option -L which pretty-prints the device list
Also accessed via -o list, this new output format is much more
user-friendly and lists whether or not a particular device is mounted.

Addresses-Debian-Bug #490527

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13 16:06:47 -04:00
Theodore Ts'o eafba6c310 Don't use thread local storage if using diet libc
...because the diet libc doesn't support TLS.

Addresses-Sourceforge-Bug: #2000654

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-10 10:21:42 -04:00
Theodore Ts'o ab06396f70 debian: Create debian release tarball to obey new WIP naming convention
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-07 16:12:28 -04:00
Theodore Ts'o dc9345a0bd Merge branch 'maint'
Conflicts:

	configure
2008-06-07 10:08:48 -04:00
Theodore Ts'o 488c75a6a6 Fix ext2fs_swap{16,32,64} for external applications on big-endian machines
The public header files depend on the the autoconf defines
WORDS_BIGENDIAN and HAVE_SYS_TYPES_H, so we add them to ext2_types.h
so that external programs which try to use ext2fs_swap*() will work
correctly on big-endian systems.  Fortunately, few if any programs
need to use this libext2's byte-swap functions directly.

Addresses-Debian-Bug: #484879

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-07 08:55:21 -04:00
Theodore Ts'o c0af709e52 Merge branch 'maint'
Conflicts:

	README
	version.h
2008-05-21 16:56:42 -04:00
Maciej W. Rozycki b8251a546d Remove default sizeof sizes in configure script when cross-compiling
Since version 2.50 autoconf fully supports checking sizes of types
(with AC_CHECK_SIZEOF) when cross-compiling.  Therefore there is no
need to preset the respective cache variables anymore.  The following
patch removes the special case.  There is no need to adjust AC_PREREQ
as it's set to 2.50 already.

Tested successfully cross-building for the mips64el-linux-gnu host on
an i386-linux-gnu build system, removing the following warning
(because of a mismatch for the "long" type):

Sizeof(__U64__TYPEDEF) is 4 should be 8
Problem detected with asm_types.h

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-05-21 13:24:37 -04:00
Theodore Ts'o 4476105bf3 Merge branch 'maint'
Conflicts:

	configure
2008-04-21 21:35:44 -04:00
Manish Katiyar 7321d94eb0 Fix "make docs" rule in Makefile for doc folder.
Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-21 20:30:48 -04:00
Theodore Ts'o ae389208e9 Merge branch 'maint' into next 2008-04-06 17:10:49 -04:00
Theodore Ts'o 27f991b04e Remove bashism from configure script
Thanks to Mike Frysinger for pointing this out.

Addresses-Sourceforge-Bug: 1921969

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-01 20:32:55 -04:00
Theodore Ts'o bbf54adb03 Merge branch 'maint' into next 2008-02-17 17:36:45 -05:00
Christophe GRENIER e7cc6f7d0b Add portability checks to support DJGPP
DJGPP lacks sys/select.h and sys/un.h; add header checks to be more
portable.

Signed-off-by: Christophe Grenier <grenier@cgsecurity.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-02-17 17:33:57 -05:00
Theodore Ts'o d69e7e28ca configure.in: Don't use the dc command unless it is required
Some systems don't have the 'dc' command installed, and this causes
configure to print a warning message unnecessarily for a standard
(non-WIP and non-pre) release of e2fsprogs.

It's easy enough to avoid this problem, so let's do it.

Addresses-Sourceforge-Bug: #1893024

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-17 17:33:57 -05:00
Theodore Ts'o 428f6b32a9 Merge branch 'maint' into next
Conflicts:

	configure
	lib/ext2fs/ext2_fs.h
	misc/e2image.c
2008-01-27 20:09:05 -05:00
Theodore Ts'o 7e8fe327b5 Don't build e2fsck statically by default anymore
Also removed the --enable-dynamic-static configure option.

Unfortunately the usefulness of building e2fsck statically is gone on
all modern distributions, since everything else on the system is built
dynamically these days.  In fact on some distributions it is almost
impossible to build programs statically any more.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27 18:22:18 -05:00
Theodore Ts'o 261cd3964f Explicitly check for ftruncate64() in configure.in
Apparently Mac OS 10.5 defines fstat64(), but not ftruncate64(),
causing resize2fs to fail to build.  So check explicitly for
ftruncate64(), and fall back to ftruncate() if necessary.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-21 13:45:00 -05:00
Theodore Ts'o c4ef11c507 If --sbindir, et. al are specified to configure set $root_sbindir, et al.
If the user specifies as arguments to configure --bindir, --sbindir,
--libdir, or --sysconfdir, then set corresponding $root_FOO variable,
so that the request from the user to set a specific --sbindir is
honored.

Addresses-Sourceforge-Bug: 498381

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-04 16:55:37 -05:00
Theodore Ts'o a4ece35911 Use pkg-config to determine where to find the devmapper library
Fedora and Red Hat puts the devmapper library in different locations
compared to Debian, so we use pkg-config.  Unfortunately Debian's
devmapper.pc file is buggy (See Debian Bug #390243), so we have to
work around it.

Historically, e2fsprogs has tried not to depend on pkg-config, since
its answers are so often **wrong** (the Debian bug has been ignored
for over a year), so I'm hoping I'm not going to regret this.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-03 12:36:59 -05:00
Theodore Ts'o fef2b38d8e Merge branch 'maint' into next
Conflicts:

	configure
	debian/rules
	e2fsck/swapfs.c
	lib/ext2fs/ext2_fs.h
2008-01-01 12:41:35 -05:00
Theodore Ts'o 29dd9d1e90 Test for sys/syscall.h in configure to fix dietlibc build problem
When compiling with dietlibc, sys/syscall.h isn't supported; as of
dietlibc 0.30, it exists but it references a non-existent asm/unistd.h
header file.  So we have to test for its existence and avoid using it
in lib/uuid/gen_uuid.c if it is not supported.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:34:25 -05:00
Theodore Ts'o 5610f9924b Add --disable-uuidd configure option
Add a configure option which causes the uuidd helper daemon not to be
built or used by the uuid library.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:34:19 -05:00
Theodore Ts'o 3249394d43 Add --disable-tls configure option
Add option to forcibly disable the use of thread local storage

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-31 22:34:19 -05:00
Theodore Ts'o b689b8dd14 Merge branch 'maint' into next
Conflicts:

	lib/ext2fs/closefs.c
2007-12-17 10:28:01 -05:00
Theodore Ts'o 740837def7 Add uuidd daemon to prevent duplicate time-based UUID's
Also store the clock sequence information in a state file in
/var/lib/misc/uuid-clock so that if the time goes backwards the clock
sequence counter can get bumped.  This allows us to completely
correctly generate time-based (version 1) UUID's according to the
algorithm specified RFC 4122.

Addresses-Sourceforge-Bug: #1529672
Addresses-Red-Hat-Bugzilla: #233471

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-16 17:28:46 -05:00
Theodore Ts'o a5dda05422 Remove configure --enable-swapfs and associated support #defines
This removes the last vestiges of support for the legacy PowerPC
big-endian filesystem format.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-08-11 03:22:00 -04:00
Theodore Ts'o 29a5deed21 Improve the config/parse_types.sh helper script
Fix a potential security problem if e2fsprogs is built as root (as
Gentoo does!).  In addition fix the script and how it is called from
the configure script so that it does the right thing when
cross-compiling.

Fixes-Gentoo-bug: #146903

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-07-04 19:55:03 -04:00
Theodore Ts'o 106ad96dae Add tdb from Samba into libext2fs library.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-04 21:26:37 -04:00
Andreas Dilger 927566a3ab Fixes for building RPM's via "make rpm"
Fixed version number generation so that the same common
algorithm is used for Debian and RPM version numbering schemes.
This allows the RPM spec file to do the right thing for WIP releases.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-12 19:41:25 -05:00
Theodore Ts'o ae2868acf0 Add failsafe against duplicate UUID's generated by threaded programs
Add in randomness based on Linux's thread id (gettid) to avoid race
conditions when two threads try to generate uuid's at the same time.
This shouldn't be an issue if /dev/urandom has proper locking and is
present, so this is just a failsafe.

Addresses SourceForge Bug: #1529672

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-10-22 00:18:49 -04:00
Theodore Ts'o e10521444d Fix amd64 build due to -lpthread ordering problem
Addresses Debian Bug: #393680

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-10-21 21:46:47 -04:00
Theodore Ts'o cce2f497e0 Fix Debian FTBFS problem caused by devmapper library using pthreads
Addresses Debian bug: #388718

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-10-01 22:18:08 -04:00
Theodore Ts'o e54635de96 If diff -u is supported, use it to report test failures.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-08-06 14:33:13 -04:00
Theodore Ts'o 4ea7ea007b Fix asm_types.h type conflicts
This caused FTBFS bugs on AMD64 platforms, since it uses a different
64-bit type when compared with IA64, so we need to make our
autoconfiguration system more intelligent.

Addresses Debian Bugs: #360661, #360317

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-04-09 08:41:55 -04:00
Karel Zak 4db2f59a71 Add device-mapper support to the blkid library
On systems where is multi-path storage device is problem with duplicated
filesystems. The solution is select "the best" device. This is possible
by device-mapper library.

Short quotation from RH bugzilla:

With my patch, all dm devices remains in libblkid cache.

Only the top level dm devices are given high priority
and more appropriate node names (i.e. /dev/mapper/*) are used.

For example, if we have linear mapped dm device "ov1" over
dm device "disk1p3" which is multipath mapped to /dev/sdd3 and /dev/sdh3:
  # dmsetup.static ls --tree
  ov1 (253:5) <-- /dev/mapper/ov1 or /dev/dm-5
   `-disk1p3 (253:4) <-- /dev/mapper/disk1p3 or /dev/dm-4
      `-disk1 (253:0)
         |- (8:112) <-- /dev/sdh
         `- (8:48) <-- /dev/sdd

Original version of blkid will show:
  # ./orig/blkid -t LABEL=mpdisk1p3 -l
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"

With my patch, blkid will show:
  # ./deptree/blkid -t LABEL=mpdisk1p3 -l
  /dev/mapper/ov1: LABEL="mpdisk1p3" ... TYPE="ext3"

In blkid cache, all devices are listed:

  # ./orig/blkid -t LABEL=mpdisk1p3
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdh3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-4: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-5: LABEL="mpdisk1p3" ... TYPE="ext3"

  # ./deptree/blkid -t LABEL=mpdisk1p3
  /dev/mapper/ov1: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdh3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-4: LABEL="mpdisk1p3" ... TYPE="ext3"

For more details see discussion on:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=156324

Addresses Red Hat Bug: #156324

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-08 14:17:28 -05:00
Theodore Ts'o dd947da232 Fix cross-compilation problems when CFLAGS contain target-specific options
Use BUILD_CCFLAGS and BUILD_LDFLAGS instead of CCFLAGS and LDFLAGS in
the build system when building files in the util directory which are
needed during the build process.  This avoids potential problems when
cross-compiling some of the options are not recognized as valid by the
host compiler.  (Addresses Sourceforge Bug #1261547)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-11-09 18:37:07 -04:00
Andreas Dilger 9b7d811dda This patch adds a check to use fstat or fstat64 in getsize.c if the
target is a regular file, instead of doing binary searching.  It also
fixes a couple of cases where a file descriptor is leaked in the
ext2fs_getsize() routine on error.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
2005-07-09 22:06:59 -05:00
Theodore Ts'o 762c7c6510 Add paranoia checks into the blkid, ext2fs, and ss libraries to ignore
environment variables if the libraries are called from setuid or setguid 
programs, or if kernel believes that the process is not eligible to create
a core dump.  In addition, if the libc has __secure_getenv(), use it so that
the libc can also do any additional limitations regarding when libraries can
trust environment variables (i.e., to integrate with systems like SELinux 
and Posix capabilities).
2005-04-06 14:44:16 -04:00
Theodore Ts'o ee683a13f6 Makefile util/gen-tarball executable after creating the file. 2005-02-05 15:53:56 -05:00
Theodore Ts'o 33db8f80f2 Remove support for --enable-clear-htree; this was
only needed during the early development of the htree patch.
2005-02-05 10:28:15 -05:00
Theodore Ts'o 98919bdb2e Add support for maintainer mode, which enables the makefile rules
to rebuild the configure script from configure.in, and to reubuild the 
.gmo files in po directory.
2005-02-04 10:43:58 -05:00
Theodore Ts'o 7004b4af6e Drop the sparc assembly bitwise operations; it's less efficient
than the GCC 3.4 compile code and triggers compiler warnings on 
sparc64.  Thanks to Matthias Andree for his analysis and suggestions.
(Addresses Debian Bug #232326)

Remove support for the --enable-old-bitops configure option which 
was only for very old sparc systems.
2005-02-03 21:56:44 -05:00
Theodore Ts'o e644186542 Add pkg-config files to e2fsprogs's libraries. 2005-01-26 12:59:25 -05:00
Theodore Ts'o 6c65d251da configure.in: Clean up checks for dirent.d_reclen, ssize_t,
llseek, lseek64, sockaddr.sa_len and make the lseek checks
	immune to compiler warnings, so that they can be compiled
	with Intel C++ 8.1.

Patch from: Matthias Andree <matthias.andree@gmx.de>
2005-01-19 12:59:48 -05:00
Theodore Ts'o da76d6b726 Make configure.in script check for prerequisite headers when checking for
the presence of sys/disk.h, sys/mount.h, and net/if.h, to improve 
the configure script on Solaris and *BSD systems.
2005-01-18 23:29:01 -05:00
Theodore Ts'o 32237014a1 Various portability fixes for Solaris systems. 2005-01-17 19:13:39 -05:00
Theodore Ts'o d2ee56d86e Fix configure.in to use AC_CHECK_TYPES instead of the "broken by design"
autoconf 2.13 version of AC_CHECK_TYPE.  Otherwise, on some platforms
intptr_t might get erroneously #define'd to be long.   (Addresses 
Debian Bug #289133)
2005-01-09 00:57:45 -05:00
Theodore Ts'o b0cacab066 Update to use gettext 0.14.1 and autoconf 2.50+ 2004-11-30 19:00:19 -05:00
Theodore Ts'o 921f4ad536 Remove support for EVMS 1.x plugin library. 2004-11-19 17:25:27 -05:00