Run sparse against source files when building e2fsprogs with 'make C=1'. If
instead C=2, it configures basic ext2 types for bitwise checking with sparse,
which can help find the (many many) spots where conversion errors are
(possibly) happening.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Add a test to see if the backtrace() function requires linking in a
library in /usr/lib.
Addresses-Debian-Bug: #708307
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Also fix a bug caused by a stray continuation backslash which caused
the e2fsck/Makefile to fail when profiling is enabled.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Remove crc32_be in favor of the implementation in libext2fs.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
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>
Quite some definitions in quota library are not necessary. Remove them.
Also fold quota.h file into quotaio.h since it didn't contain that many
definitions.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Add the ability to log messages about a file system to a specified
directory, using a file name templace that can be specified in
/etc/e2fsck.conf. This allows us to suppress the output of overly
verbose e2fsck outputs while still allowing the full logging output to
go to an appropriate file.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
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>
This patch adds support for doing quota accounting during full
e2fsck scan if the 'quota' feature was set on the superblock.
If user-visible quota inodes are in use, they will be hidden
and converted to the reserved quota inodes.
Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
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>
Fixes build problem on systems where gettext() isn't in libc,
such as FreeBSD.
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit forces the use of the system-provided blkid or uuid header
files if we are using the system-provided blkid or uuid libraries.
This avoids using the in-tree header files with the system libraries.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
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>
The e2fsprogs makefiles were using the same Makefile variable
LIBCOM_ERR for the link-line arguments as well as the dependencies.
Since LIBCOM_ERR can now include non-file arguments such as
"-lpthread", we need to use a separate DEPLIBCOM_ERR variable that
only has build file dependencies.
Do the same thing for STATIC_LIBCOM_ERR and PROFILED_LIBCOM_ERR.
Addresses-Sourceforge-Patches: #2813809
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
We've hit a number of cases where the error codes in problem.h have
been assigned duplicate values compared to problems in our own e2fsck
patches, and this can lead to confusing and difficult to find bugs
in e2fsck (e.g. wrong problem messages, incorrect repair action, etc).
Attached is a test case for the problem.c file to ensure that the
problem table is sorted and does not contain any duplicate values.
Having the problem table sorted allows the correctness checking to be
very simple, and if it ever became important for performance we could
use binary searching of the problem table for the specific problem code.
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
It's been a while since I've done a build using "configure
--enable-profile", and some bitrot had set into the Makefiles...
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Some recent changes had caused diet libc support to bitrot. Fix up
missing header files and other portability fixups needed for dietlibc.
(Many of these changes also improve general portability.)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
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>
The Makefile should use BUILD_CFLAGS instead of ALL_CFLAGS since it
will be built for the host, not the target.
Addresses-Sourceforge-Bug: #2019287
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This is needed so that "make check" works in the e2fsck library even
if the shared libraries are not yet installed, and so that we run
those programs against the version of the libraries built in the build
tree.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
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>
The need for fixing byte-swapped filesystems is long-gone, and this is
getting in the way of cleaning up e2fsprogs's bitmaps code. So let's
get rid of it; modern kernels haven't been able to deal with a
byte-swapped filesystem in in about 9 years.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
The profile library was originally written by Theodore Ts'o in 1995
for use in the MIT Kerberos v5 library. It has been
modified/enhanced/bug-fixed over time by other members of the MIT
Kerberos team. This version was originally taken from the Kerberos
v5 distribution, version 1.4.2, and radically simplified for use in
e2fsprogs. (Support for locking for multi-threaded operations,
being able to modify and update the configuration file
programmatically, and Mac/Windows portability have been removed.
It has been folded into a single C source file to make it easier to
fold into an application program.)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
correctly.
Update Makefile dependencies.
Update "make depend" production so that it filters out comments
inserted by newer gcc compilers.
Remove sync from e2fsck's "make all" target.
some generated files, by having subst update the modtime on these
files even when the generated file hasn't changed. We do this with
generated files that do not have any downstream dependencies.