debian/0000775000000000000000000000000012571346262007200 5ustar debian/e2fsck-static.copyright0000664000000000000000000000174311750766346013610 0ustar This is the Debian GNU/Linux prepackaged version of the static EXT2 file system consistency checker (e2fsck.static). The EXT2 utilities were written by Theodore Ts'o and Remy Card . Sources were obtained from http://sourceforge.net/projects/e2fsprogs Packaging is Copyright (c) 2003-2006 Theodore Ts'o Copyright (c) 1997-2003 Yann Dirson Copyright (c) 2001 Alcove Copyright (c) 1997 Klee Dienes Copyright (c) 1995-1996 Michael Nonweiler Upstream Author: Theodore Ts'o Copyright notice: This package, the EXT2 filesystem utilities, is protected by the GNU Public License. Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o On Debian GNU systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. debian/libcomerr2.symbols0000664000000000000000000000107611750766346012665 0ustar libcom_err.so.2 libcomerr2 #MINVER# _et_dynamic_list@Base 1.38 _et_list@Base 1.01 add_error_table@Base 1.34 add_to_error_table@Base 1.34 com_err@Base 1.01 com_err_hook@Base 1.01 com_err_va@Base 1.01 com_right@Base 1.34 com_right_r@Base 1.41.11 error_message@Base 1.01 error_table_name@Base 1.01 et_list_lock@Base 1.41.2 et_list_unlock@Base 1.41.2 free_error_table@Base 1.34 init_error_table@Base 1.01 initialize_error_table_r@Base 1.34 remove_error_table@Base 1.34 reset_com_err_hook@Base 1.01 set_com_err_gettext@Base 1.41.99 set_com_err_hook@Base 1.01 debian/libblkid1.files.in0000664000000000000000000000002512162020142012441 0ustar lib/*/libblkid*.so.* debian/comerr-dev.files0000664000000000000000000000032411750766346012275 0ustar usr/lib/*/libcom_err.a usr/lib/*/libcom_err.so usr/include/et/* usr/include/com_err.h usr/share/man/man1/compile_et* usr/share/man/man3/com_err.3* usr/bin/compile_et usr/share/et/* usr/lib/*/pkgconfig/com_err.pc debian/libuuid1.symbols0000664000000000000000000000075511750766346012346 0ustar libuuid.so.1 libuuid1 #MINVER# uuid__generate_random@Base 1.40.4 uuid__generate_time@Base 1.40.4 uuid_clear@Base 1.05 uuid_compare@Base 1.05 uuid_copy@Base 1.05 uuid_generate@Base 1.05 uuid_generate_random@Base 1.15 uuid_generate_time@Base 1.15 uuid_is_null@Base 1.05 uuid_pack@Base 1.05 uuid_parse@Base 1.05 uuid_time@Base 1.15 uuid_type@Base 1.15 uuid_unpack@Base 1.05 uuid_unparse@Base 1.05 uuid_unparse_lower@Base 1.36 uuid_unparse_upper@Base 1.36 uuid_variant@Base 1.15 debian/scripts/0000775000000000000000000000000012301111455010650 5ustar debian/scripts/test-backtrace0000775000000000000000000000127712162020142013476 0ustar #!/bin/sh # # Test to see if backtrace requires a library in /usr/lib # Returns true if the backtrace command works and requires a library in /usr/lib # This is a nasty workaround for Debian bug #708307, which is really a glibc bug # cat > /tmp/backtrace$$.c << EOF #include int main(int argc, char **argv) { void *stack_syms[32]; int frames; frames = backtrace(stack_syms, 32); backtrace_symbols_fd(stack_syms, frames, 0); } EOF if ! cc -o /tmp/backtrace$$ /tmp/backtrace$$.c; then exit 1 fi if ! ldd /tmp/backtrace$$ > /tmp/backtrace$$.ldd 2>&1 ; then exit 1 fi grep -q /usr/lib /tmp/backtrace$$.ldd ret=$? /bin/rm -f /tmp/backtrace$$* exit $ret debian/libblkid-dev.files.in0000664000000000000000000000014612162020142013140 0ustar usr/lib/*/libblkid*.so.* usr/include/blkid usr/share/man/man3/libblkid.3 usr/lib/*/pkgconfig/blkid.pc debian/uuid-runtime.files0000664000000000000000000000012711750766346012662 0ustar usr/bin/uuidgen usr/sbin/uuidd usr/share/man/man8/uuidd.* usr/share/man/man1/uuidgen.* debian/e2fsck-static.files0000664000000000000000000000006711750766346012700 0ustar /sbin/e2fsck.static /usr/share/man/man8/e2fsck.static* debian/libcomerr2.files.in0000664000000000000000000000002712162020142012646 0ustar lib/*/libcom_err*.so.* debian/control0000664000000000000000000001632712301111267010576 0ustar Source: e2fsprogs Section: admin Priority: required Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Theodore Y. Ts'o Build-Depends: gettext, texinfo, pkg-config, gcc-multilib [mips mipsel], debhelper (>= 7.0), libblkid-dev (>= 2.16), uuid-dev (>= 2.16), m4, autotools-dev Standards-Version: 3.9.5 Homepage: http://e2fsprogs.sourceforge.net Package: e2fsck-static Priority: optional Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: sash | bash-static | zsh-static | busybox-static | zsh30-static Architecture: any Description: statically-linked version of the ext2/ext3/ext4 filesystem checker This may be of some help to you if your filesystem gets corrupted enough to break the shared libraries used by the dynamically linked checker. . This binary takes much more space than its dynamic counterpart located in e2fsprogs, though. . You may want to install a statically-linked shell as well, to be able to run this program if something like your C library gets corrupted. Package: libcomerr2 Section: libs Provides: libcomerr-kth-compat Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: e2fsprogs (<< 1.34-1) Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Description: common error description library libcomerr is an attempt to present a common error-handling mechanism to manipulate the most common form of error code in a fashion that does not have the problems identified with mechanisms commonly in use. Package: comerr-dev Section: libdevel Priority: extra Depends: libc6-dev | libc-dev, libcomerr2 (= ${mainBinary}), ${misc:Depends} Suggests: doc-base Replaces: e2fslibs-dev (<< 1.33-2), libkrb5-dev (<< 1.3) Architecture: any Description: common error description library - headers and static libraries libcom_err is an attempt to present a common error-handling mechanism to manipulate the most common form of error code in a fashion that does not have the problems identified with mechanisms commonly in use. . This package contains the development environment for the com_err library. Package: libss2 Section: libs Depends: libcomerr2, ${shlibs:Depends}, ${misc:Depends} Replaces: e2fsprogs (<< 1.34-1) Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Description: command-line interface parsing library libss provides a simple command-line interface parser which will accept input from the user, parse the command into an argv argument vector, and then dispatch it to a handler function. . It was originally inspired by the Multics SubSystem library. Package: ss-dev Section: libdevel Priority: extra Depends: libc6-dev | libc-dev, libss2 (= ${mainBinary}), comerr-dev, ${misc:Depends} Architecture: any Description: command-line interface parsing library - headers and static libraries This package includes a tool that parses a command table to generate a simple command-line interface parser, the include files needed to compile and use it, and the static libs. . It was originally inspired by the Multics SubSystem library. . This package contains the development environment for the ss library. Package: e2fsprogs-udeb XC-Package-Type: udeb Section: debian-installer Priority: optional Depends: ${shlibs:Depends}, ${misc:Depends} Architecture: any Description: stripped-down versions of e2fsprogs, for debian-installer This package is an e2fsprogs package built for a reduced size, so that it can help to save space in debian-installer. . Don't attempt to install this package, it has no support for a couple of features you surely want. Anyway it should refuse to install. Package: e2fslibs Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: e2fsprogs (<< 1.34-1) Provides: libext2fs2, libe2p2 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Description: ext2/ext3/ext4 file system libraries The ext2, ext3 and ext4 file systems are successors of the original ext ("extended") file system. They are the main file system types used for hard disks on Debian and other Linux systems. . This package provides the ext2fs and e2p libraries, for userspace software that directly accesses extended file systems. Programs that use libext2fs include e2fsck, mke2fs, and tune2fs. Programs that use libe2p include dumpe2fs, chattr, and lsattr. Package: e2fslibs-dev Section: libdevel Priority: extra Depends: libc6-dev | libc-dev, comerr-dev, e2fslibs (= ${binary:Version}), ${misc:Depends} Suggests: doc-base Provides: ext2fs-dev, e2p-dev Replaces: libkrb5-dev (<< 1.3) Architecture: any Description: ext2/ext3/ext4 file system libraries - headers and static libraries The ext2, ext3 and ext4 file systems are successors of the original ext ("extended") file system. They are the main file system types used for hard disks on Debian and other Linux systems. . This package contains the development environment for the ext2fs and e2p libraries. Package: e2fsprogs Essential: yes Pre-Depends: ${shlibs:Depends}, ${misc:Depends}, util-linux (>= 2.15~rc1-1) Multi-Arch: foreign Suggests: gpart, parted, e2fsck-static Conflicts: dump (<< 0.4b4-4), quota (<< 1.55-8.1), initscripts (<< 2.85-4), sysvinit (<< 2.85-4) Replaces: hurd (<= 20040301-1), libblkid1 (<< 1.38+1.39-WIP-2005.12.10-2), libuuid1 (<< 1.38+1.39-WIP-2005.12.10-2) Architecture: any Description: ext2/ext3/ext4 file system utilities The ext2, ext3 and ext4 file systems are successors of the original ext ("extended") file system. They are the main file system types used for hard disks on Debian and other Linux systems. . This package contains programs for creating, checking, and maintaining ext2/3/4-based file systems. It also includes the "badbocks" program, which can be used to scan for bad blocks on a disk or other storage device. Package: e2fsprogs-dbg Section: debug Priority: extra Depends: e2fsprogs (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for e2fsprogs This package includes the debug information useful for debugging e2fsprogs and its libraries, contained in the e2fsprogs and e2fsck-static packages. The debug information is used for execution tracing and core dump analysis. Package: e2fslibs-dbg Section: debug Priority: extra Depends: e2fslibs (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for e2fslibs This package includes the debug information useful for debugging the ext2fs and e2p libraries, contained in the e2fslibs package. The debug information is used for execution tracing and core dump analysis. Package: libcomerr2-dbg Section: debug Priority: extra Depends: libcomerr2 (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for libcomerr2 This package includes the debug information useful for debugging the com_err library, contained in the libcomerr2 package. The debugging information is used for execution tracing and core dump analysis. Package: libss2-dbg Section: debug Priority: extra Depends: libss2 (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for libss2 This package includes the debug information useful for debugging the ss library, contained in the libss2 package. The debug information is used for execution tracing and core dump analysis. debian/uuid-runtime.shlibs.local0000664000000000000000000000004011750766346014127 0ustar libuuid 1 libuuid1 (> 1.40.3-1) debian/e2fslibs-dev.doc-base0000664000000000000000000000047112261062101013045 0ustar Document: libext2fs Title: The EXT2FS library Author: Theodore Ts'o Abstract: The EXT2FS library is designed to allow user-level programs to manipulate an ext2 filesystem. Section: Programming Format: HTML Index: /usr/share/doc/e2fslibs/html-info/libext2fs.html Files: /usr/share/doc/e2fslibs/html-info/*.html debian/e2fsprogs.preinst0000664000000000000000000000041612261062101012500 0ustar #!/bin/sh # Abort on error. set -e PKG=e2fsprogs DOCLNK=/usr/share/doc/$PKG if test "$1" = upgrade \ -a -L $DOCLNK then rm $DOCLNK fi # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/e2fsprogs.docs0000664000000000000000000000002511750766346011770 0ustar README RELEASE-NOTES debian/source/0000775000000000000000000000000012301111455010461 5ustar debian/source/format0000664000000000000000000000001411750766346011715 0ustar 3.0 (quilt) debian/libuuid1.files0000664000000000000000000000002412162020142011714 0ustar lib/*/libuuid*.so.* debian/libss2.files.in0000664000000000000000000000002212162020142011777 0ustar lib/*/libss*.so.* debian/rules0000775000000000000000000005547712301111177010264 0ustar #! /usr/bin/make -f # -*- makefile -*- # # Invoke each target with `./debian/rules '. All targets should be # invoked with the package root as the current directory. # # The `binary' target must be run as root, as it needs to install files with # specific ownerships. -include debian/rules.custom # be paranoid export LC_ALL ?= C ######## Ubuntu changes # no chance that pkg-create-dbgsym can cope with this package's manual construction of -dbg export NO_PKG_MANGLE=1 # Set SKIP_DIETLIBC to not build-depend on dietlibc-dev, which is universe. export SKIP_DIETLIBC=yes ######## # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) DEB_HOST_OS ?= $(shell dpkg-architecture -qDEB_HOST_OS) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null) # Allow distro-specific behaviour DISTRO :=$(shell sed -ne '/DISTRIB_ID/s/.*=//p' /etc/lsb-release 2>/dev/null || echo Debian) UTIL_LINUX_NG ?= yes # find the version for the main package, from changelog file MAIN_VERSION = $(shell head -n 1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g') # find versions for libraries going into their own packages, from their Makefile.in's, # and sonames for all libs COMERR_VERSION ?= $(shell grep ELF_VERSION lib/et/Makefile.in | cut '-d ' -f3) COMERR_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/et/Makefile.in | cut '-d ' -f3) SS_VERSION ?= $(shell grep ELF_VERSION lib/ss/Makefile.in | cut '-d ' -f3) SS_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/ss/Makefile.in | cut '-d ' -f3) ifneq ($(UTIL_LINUX_NG),yes) UUID_VERSION ?= $(shell grep ELF_VERSION lib/uuid/Makefile.in | cut '-d ' -f3) UUID_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/uuid/Makefile.in | cut '-d ' -f3) BLKID_VERSION ?= $(shell grep ELF_VERSION lib/blkid/Makefile.in | cut '-d ' -f3) BLKID_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/blkid/Makefile.in | cut '-d ' -f3) endif EXT2FS_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/ext2fs/Makefile.in | cut '-d ' -f3) E2P_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/e2p/Makefile.in | cut '-d ' -f3) package ?= e2fsprogs topdir ?= $(shell pwd) debdir ?= ${topdir}/debian tmpdir ?= ${debdir}/tmp udebdir ?= ${debdir}/e2fsprogs-udeb ifneq ($(UTIL_LINUX_NG),yes) blkidudebdir ?= ${debdir}/libblkid1-udeb uuidudebdir ?= ${debdir}/libuuid1-udeb endif libcomerrdir ?= ${debdir}/libcomerr${COMERR_SOVERSION} comerrdevdir ?= ${debdir}/comerr-dev libcomerrdbgdir ?= ${debdir}/libcomerr2-dbg libssdir ?= ${debdir}/libss${SS_SOVERSION} ssdevdir ?= ${debdir}/ss-dev libssdbgdir ?= ${debdir}/libss2-dbg ifneq ($(UTIL_LINUX_NG),yes) libblkiddir ?= ${debdir}/libblkid${BLKID_SOVERSION} libblkiddevdir ?= ${debdir}/libblkid-dev libblkiddbgdir ?= ${debdir}/libblkid1-dbg libuuiddir ?= ${debdir}/libuuid${UUID_SOVERSION} uuiddevdir ?= ${debdir}/uuid-dev libuuiddbgdir ?= ${debdir}/libuuid1-dbg uuidruntimedir ?= ${debdir}/uuid-runtime uuidruntimedbgdir ?= ${debdir}/uuid-runtime-dbg endif libext2dir ?= ${debdir}/e2fslibs libext2devdir ?= ${debdir}/e2fslibs-dev libext2dbgdir ?= ${debdir}/e2fslibs-dbg maindir ?= ${debdir}/e2fsprogs e2fsckstaticdir ?= ${debdir}/e2fsck-static debugdir ?= ${debdir}/e2fsprogs-dbg stdbuilddir ?= ${debdir}/BUILD-STD staticbuilddir ?= ${debdir}/BUILD-STATIC mipsbuilddir ?= ${debdir}/BUILD-MIPS mipsbuilddir64 ?= ${debdir}/BUILD-MIPS-64 # docdir ?= ${maindir}/usr/share/doc/${package} MANDIR ?= /usr/share/man mandir ?= ${tmpdir}${MANDIR} UDEB_NAME ?= $(package)-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb UDEB_PRIORITY ?= $(shell grep '^Package: e2fsprogs-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2) ifneq ($(UTIL_LINUX_NG),yes) BLKID_UDEB_NAME ?= libblkid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb BLKID_UDEB_PRIORITY ?= $(shell grep '^Package: libblkid1-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2) UUID_UDEB_NAME ?= libuuid1-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb UUID_UDEB_PRIORITY ?= $(shell grep '^Package: libuuid1-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2) endif STAMPSDIR ?= debian/stampdir AUTOTOOLSSTAMP ?= ${STAMPSDIR}/autotools-stamp CFGSTDSTAMP ?= ${STAMPSDIR}/configure-std-stamp CFGBFSTAMP ?= ${STAMPSDIR}/configure-bf-stamp CFGSTATICSTAMP ?= ${STAMPSDIR}/configure-static-stamp BUILDSTDSTAMP ?= ${STAMPSDIR}/build-std-stamp BUILDBFSTAMP ?= ${STAMPSDIR}/build-bf-stamp BUILDSTATICSTAMP ?=${STAMPSDIR}/build-static-stamp INSTALL ?= install INSTALL_PROGRAM ?= $(INSTALL) -p -o root -g root -m 0755 #ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) #INSTALL_PROGRAM += -s #endif DEFAULT_CFLAGS ?= -g -O2 DEFAULT_LDFLAGS ?= -Wl,-Bsymbolic-functions CFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \ dpkg-buildflags --get CFLAGS; else echo $(DEFAULT_CFLAGS) ; fi) LDFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \ dpkg-buildflags --get LDFLAGS; else echo $(DEFAULT_LDFLAGS) ; fi) CPPFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \ dpkg-buildflags --get CPPFLAGS; fi) ifeq (${DEB_HOST_ARCH},alpha) CFLAGS += -DHAVE_NETINET_IN_H else CFLAGS += -D__NO_STRING_INLINES endif ifneq (${DEB_HOST_ARCH_OS},linux) SKIP_STATIC = yes endif ifeq ($(SKIP_STATIC),yes) BUILD_STATIC = E2FSCK_STATIC = ${stdbuilddir}/e2fsck/e2fsck.static else BUILD_STATIC = build-static E2FSCK_STATIC = ${staticbuilddir}/e2fsck/e2fsck.static endif ifeq ($(SKIP_BF),yes) BUILD_BF = bfbuilddir ?= ${stdbuilddir} else BUILD_BF = build-bf bfbuilddir ?= ${debdir}/BUILD-BF endif BF_CFLAGS = -Os -fomit-frame-pointer ifeq ($(UTIL_LINUX_NG),yes) UTIL_CONF_FLAGS ?= --disable-fsck --disable-libblkid \ --disable-libuuid --disable-uuidd else UTIL_CONF_FLAGS ?= --enable-fsck --enable-libblkid \ --enable-libuuid --enable-uuidd endif ifneq ($(strip $(DEB_HOST_MULTIARCH)),) MULTIARCH_CONF ?= --with-multiarch=$(DEB_HOST_MULTIARCH) # This doesn't work yet because gdb and lintian don't expect and/or # don't work with /usr/lib//debug #USRLIB = /usr/lib/$(DEB_HOST_MULTIARCH) USRLIB ?= /usr/lib else USRLIB ?= /usr/lib endif BACKTRACE_CONF_FLAGS ?= $(shell if ${debdir}/scripts/test-backtrace ; then echo --disable-backtrace ; fi) COMMON_CONF_FLAGS = --disable-e2initrd-helper --enable-quota \ --infodir=/usr/share/info --enable-symlink-install \ $(MULTIARCH_CONF) $(BACKTRACE_CONF_FLAGS) $(UTIL_CONF_FLAGS) STD_CONF_FLAGS ?= --enable-elf-shlibs BF_CONF_FLAGS ?= --enable-elf-shlibs --disable-nls --disable-imager \ --disable-testio-debug --disable-uuidd --disable-tls --disable-debugfs STATIC_CONF_FLAGS ?= --disable-nls --disable-imager \ --disable-uuidd --disable-tls MIPS_NOPIC_CONF_FLAGS ?= --disable-nls --disable-imager \ --disable-uuidd --disable-tls \ --disable-resizer # --disable-debugfs # we can't use those flags at configure time MIPS_CFLAGS ?= -G 0 -fno-pic -mno-abicalls MIPS_CFLAGS_64 ?= -mabi=64 -G 0 -fno-pic -mno-abicalls ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) ifneq (,$(findstring $(DEB_BUILD_ARCH),mips mipsel)) ismips=ismips endif endif M4_ARGS= ifeq ($(UTIL_LINUX_NG),yes) M4_ARGS+=-DUTIL_LINUX_NG else M4_ARGS+=-UUTIL_LINUX_NG endif ifneq ($(strip $(DEB_HOST_MULTIARCH)),) M4_ARGS+=-DDO_MULTIARCH else M4_ARGS+=-UDO_MULTIARCH endif ifneq ($(SKIP_DIETLIBC),) M4_ARGS+=-UDIETLIBC WITH_DIET_LIBC = else M4_ARGS+=-DDIETLIBC WITH_DIET_LIBC = --with-diet-libc --enable-libuuid --enable-libblkid endif ifneq ($(BUILD_E2FSCK_STATIC),no) M4_ARGS+=-DE2FSCK_STATIC else M4_ARGS+=-UE2FSCK_STATIC endif FILES_FIXUP= libcomerr2.files comerr-dev.files libss2.files ss-dev.files \ libuuid1.files uuid-dev.files libblkid1.files libblkid-dev.files \ e2fslibs.files e2fslibs-dev.files debian-files: debian/control debian/e2fsprogs.shlibs.local ifeq ($(strip $(DEB_HOST_MULTIARCH)),) for i in $(FILES_FIXUP); do \ sed -e 's;lib/\*/;lib/;' debian/$$i.in > debian/$$i; \ done else for i in $(FILES_FIXUP); do cp debian/$$i.in debian/$$i; done endif mrproper: clean rm debian/control debian/e2fsprogs.shlibs.local debian/control: debian/control.in debian/rules m4 $(M4_ARGS) < debian/control.in | grep -v ^REMOVE_ME$$ > $@ debian/e2fsprogs.shlibs.local: debian/e2fsprogs.shlibs.local.in m4 $(M4_ARGS) < debian/e2fsprogs.shlibs.local.in > $@ ${AUTOTOOLSSTAMP}: dh_autotools-dev_updateconfig mkdir -p ${STAMPSDIR} touch ${AUTOTOOLSSTAMP} ${CFGSTDSTAMP}: ${AUTOTOOLSSTAMP} dh_testdir # Make sure we don't try to rebuild the configure scripts find . -name configure | xargs touch mkdir -p ${stdbuilddir} ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) cd ${stdbuilddir} && AWK=/usr/bin/awk \ ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \ ${EXTRA_CONF_FLAGS} CFLAGS="${CFLAGS}" CPPFLAGS="$(CPPFLAGS)" \ LDFLAGS="$(LDFLAGS)" else cd ${stdbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \ ${topdir}/configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \ ${EXTRA_CONF_FLAGS} --build=$(DEB_BUILD_GNU_TYPE) \ --host=$(DEB_HOST_GNU_TYPE) CFLAGS="${CFLAGS}" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" endif # specially-built MIPS libs ifneq ($(ismips),) mkdir -p ${mipsbuilddir} ${mipsbuilddir64} cd ${mipsbuilddir} && AWK=/usr/bin/awk \ ${topdir}/configure ${COMMON_CONF_FLAGS} \ ${MIPS_NOPIC_CONF_FLAGS} CFLAGS="${CFLAGS}" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" cd ${mipsbuilddir64} && AWK=/usr/bin/awk \ ${topdir}/configure ${COMMON_CONF_FLAGS} \ ${MIPS_NOPIC_CONF_FLAGS} CFLAGS="${CFLAGS}" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" endif mkdir -p ${STAMPSDIR} touch ${CFGSTDSTAMP} ${CFGBFSTAMP}: ${AUTOTOOLSSTAMP} dh_testdir rm -f config.cache mkdir -p ${bfbuilddir} ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) cd ${bfbuilddir} && AWK=/usr/bin/awk \ ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \ ${EXTRA_CONF_FLAGS} CFLAGS="${CFLAGS} ${BF_CFLAGS}" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" else cd ${bfbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \ ${topdir}/configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \ ${EXTRA_CONF_FLAGS} --build=$(DEB_BUILD_GNU_TYPE) \ --host=$(DEB_HOST_GNU_TYPE) CFLAGS="${CFLAGS}" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" endif mkdir -p ${STAMPSDIR} touch ${CFGBFSTAMP} ${CFGSTATICSTAMP}: ${AUTOTOOLSSTAMP} dh_testdir rm -f config.cache mkdir -p ${staticbuilddir} ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) if type diet > /dev/null 2>&1 ; then \ cd ${staticbuilddir} && AWK=/usr/bin/awk \ ${topdir}/configure ${COMMON_CONF_FLAGS} ${STATIC_CONF_FLAGS} \ ${EXTRA_CONF_FLAGS} ${WITH_DIET_LIBC} CFLAGS="${CFLAGS}" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"; \ else \ cd ${staticbuilddir} && AWK=/usr/bin/awk \ ${topdir}/configure ${COMMON_CONF_FLAGS} \ ${STATIC_CONF_FLAGS} ${EXTRA_CONF_FLAGS} \ CFLAGS="${CFLAGS}" CPPFLAGS="$(CPPFLAGS)" \ LDFLAGS="$(LDFLAGS)"; \ fi else cd ${staticbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \ ${topdir}/configure ${COMMON_CONF_FLAGS} ${STATIC_CONF_FLAGS} \ ${EXTRA_CONF_FLAGS} --build=$(DEB_BUILD_GNU_TYPE) \ --host=$(DEB_HOST_GNU_TYPE) CFLAGS="${CFLAGS}" \ CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" endif mkdir -p ${STAMPSDIR} touch ${CFGSTATICSTAMP} build-arch: build build-indep: build build: build-std $(BUILD_BF) $(BUILD_STATIC) build-std: ${BUILDSTDSTAMP} ${BUILDSTDSTAMP}: ${CFGSTDSTAMP} dh_testdir $(MAKE) -C ${stdbuilddir} V=1 all ifneq ($(BUILD_E2FSCK_STATIC),no) $(MAKE) -C ${stdbuilddir}/e2fsck V=1 e2fsck.static endif $(MAKE) -C ${stdbuilddir}/po V=1 update-gmo ( cd ${stdbuilddir}/doc && $(MAKE) V=1 libext2fs.html ) ( cd ${stdbuilddir}/lib/et && $(MAKE) V=1 com_err.info com_err.html ) # specially-built MIPS libs ifneq ($(ismips),) $(MAKE) -C ${mipsbuilddir}/util V=1 $(MAKE) -C ${mipsbuilddir} V=1 \ CFLAGS="${CFLAGS} ${MIPS_CFLAGS}" \ LIB_SUBDIRS="lib/et lib/ext2fs" libs $(MAKE) -C ${mipsbuilddir64}/util V=1 $(MAKE) -C ${mipsbuilddir64} V=1 \ CFLAGS="${CFLAGS} ${MIPS_CFLAGS_64}" \ LIB_SUBDIRS="lib/et lib/ext2fs" libs endif touch ${BUILDSTDSTAMP} build-bf: ${BUILDBFSTAMP} ${BUILDBFSTAMP}: ${CFGBFSTAMP} dh_testdir $(MAKE) -C ${bfbuilddir} V=1 libs $(MAKE) -C ${bfbuilddir}/e2fsck V=1 all $(MAKE) -C ${bfbuilddir}/misc V=1 all $(MAKE) -C ${bfbuilddir}/resize V=1 all touch ${BUILDBFSTAMP} build-static: ${BUILDSTATICSTAMP} ${BUILDSTATICSTAMP}: ${CFGSTATICSTAMP} dh_testdir $(MAKE) -C ${staticbuilddir} V=1 libs ifneq ($(BUILD_E2FSCK_STATIC),no) $(MAKE) -C ${staticbuilddir}/e2fsck V=1 all e2fsck.static endif touch ${BUILDSTATICSTAMP} clean: dh_testdir rm -rf ${STAMPSDIR} [ ! -f ${stdbuilddir}/Makefile ] || $(MAKE) -C ${stdbuilddir} V=1 distclean [ ! -f ${bfbuilddir}/Makefile ] || $(MAKE) -C ${bfbuilddir} V=1 distclean [ ! -f ${staticbuilddir}/Makefile ] || $(MAKE) -C ${staticbuilddir} V=1 distclean rm -rf ${stdbuilddir} ${bfbuilddir} ${staticbuilddir} ${mipsbuilddir} ${mipsbuilddir64} rm -f debian/*.substvars dh_autotools-dev_restoreconfig dh_clean install: cleanup install-std # This rule allows to factorize the dh_clean between the 2 install rules # This must be launched before install-* (if launching them by hand, for # exemple) or results are unpredictable cleanup: dh_testdir dh_testroot dh_prep install-std: DH_OPTIONS= install-std: build dh_testdir dh_testroot dh_installdirs mkdir -p ${tmpdir}/sbin $(MAKE) -C ${stdbuilddir} V=1 install DESTDIR=${tmpdir} \ INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true # static libs and .h files $(MAKE) -C ${stdbuilddir} V=1 install-libs DESTDIR=${tmpdir} LDCONFIG=true ifneq ($(BUILD_E2FSCK_STATIC),no) # statically-linked fsck ${INSTALL_PROGRAM} $(E2FSCK_STATIC) ${tmpdir}/sbin cp ${mandir}/man8/e2fsck.8 ${mandir}/man8/e2fsck.static.8 endif # remove static quota library for now rm ${tmpdir}/usr/include/quota/mkquota.h find ${tmpdir} -name quota.pc -o -name libquota.a | xargs rm ifeq ($(DEB_BUILD_GNU_SYSTEM), gnu) ${INSTALL} -m 0644 misc/mke2fs-hurd.conf ${tmpdir}/etc/mke2fs.conf endif dh_movefiles test -z "`find ${tmpdir} -type f`" # specially-built MIPS libs ifneq ($(ismips),) $(INSTALL) -p -m 0644 ${mipsbuilddir}/lib/libext2fs.a \ ${debdir}/e2fslibs-dev/usr/lib/libext2fs-nopic.a $(INSTALL) -p -m 0644 ${mipsbuilddir64}/lib/libext2fs.a \ ${debdir}/e2fslibs-dev/usr/lib/lib64ext2fs-nopic.a endif install-udeb: DH_OPTIONS= install-udeb: build dh_testdir dh_testroot $(MAKE) -C ${bfbuilddir} V=1 install-shlibs-libs-recursive DESTDIR=${udebdir} \ INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true $(MAKE) -C ${bfbuilddir}/e2fsck V=1 install DESTDIR=${udebdir} \ INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true $(MAKE) -C ${bfbuilddir}/misc V=1 install DESTDIR=${udebdir} \ INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true $(MAKE) -C ${bfbuilddir}/resize V=1 install DESTDIR=${udebdir} \ INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true rm -rf ${udebdir}/usr find ${udebdir}/sbin -type f -a ! -name e2fsck \ -a ! -name mke2fs -a ! -name tune2fs \ -a ! -name resize2fs -a ! -name badblocks -print | xargs rm (cd ${udebdir}/sbin; ln -sf e2fsck fsck.ext2 ; \ ln -sf e2fsck fsck.ext3 ; ln -sf e2fsck fsck.ext4 ; \ ln -sf mke2fs mkfs.ext2 ; ln -sf mke2fs mkfs.ext3 ; \ ln -sf mke2fs mkfs.ext4) ifneq ($(UTIL_LINUX_NG),yes) mkdir -p ${blkidudebdir}/lib mv ${udebdir}/lib/libblkid.* ${blkidudebdir}/lib mkdir -p ${uuidudebdir}/lib mv ${udebdir}/lib/libuuid.* ${uuidudebdir}/lib endif binary-indep: # no arch-independant debs. binary-arch: DH_OPTIONS= -a binary-arch: install install-udeb dh_testdir dh_testroot # lintian overrides for i in $$(cd debian && echo *.lintian-overrides); do \ pkg=$${i%.lintian-overrides} ;\ if test "$${pkg}" != source ; then \ $(INSTALL) -m 0644 -D -p debian/$$i ${debdir}/$${pkg}/usr/share/lintian/overrides/$${pkg} ;\ fi ;\ done # symlinks to prepare dh_installdocs run ifneq ($(UTIL_LINUX_NG),yes) mkdir -p ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION} mkdir -p ${debdir}/libblkid-dev/usr/share/doc ln -sf libblkid${BLKID_SOVERSION} ${debdir}/libblkid-dev/usr/share/doc/libblkid-dev endif mkdir -p ${debdir}/libss${SS_SOVERSION}/usr/share/doc/libss${SS_SOVERSION} mkdir -p ${debdir}/ss-dev/usr/share/doc ln -sf libss${SS_SOVERSION} ${debdir}/ss-dev/usr/share/doc/ss-dev mkdir -p ${debdir}/libcomerr${COMERR_SOVERSION}/usr/share/doc/libcomerr${COMERR_SOVERSION} mkdir -p ${debdir}/comerr-dev/usr/share/doc ln -sf libcomerr${COMERR_SOVERSION} ${debdir}/comerr-dev/usr/share/doc/comerr-dev ifneq ($(UTIL_LINUX_NG),yes) mkdir -p ${debdir}/libuuid${UUID_SOVERSION}/usr/share/doc/libuuid${UUID_SOVERSION} mkdir -p ${debdir}/uuid-dev/usr/share/doc # ln -sf libuuid${UUID_SOVERSION} ${debdir}/uuid-dev/usr/share/doc/uuid-dev endif mkdir -p ${debdir}/e2fslibs/usr/share/doc/e2fslibs mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc ln -sf e2fslibs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev ifneq ($(UTIL_LINUX_NG),yes) $(INSTALL) -p -m 0644 debian/libblkid.copyright \ ${debdir}/libblkid${BLKID_SOVERSION}/usr/share/doc/libblkid${BLKID_SOVERSION}/copyright endif dh_installdocs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb # HTML docs $(INSTALL) -d ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/ $(INSTALL) -p -m 0644 ${stdbuilddir}/doc/*.html \ ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/ $(INSTALL) -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/ $(INSTALL) -p -m 0644 ${stdbuilddir}/lib/et/*.html \ ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/ # texinfo docs mkdir -p ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION} $(INSTALL) -p -m 0644 ${topdir}/doc/libext2fs.texinfo \ ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/libext2fs.texi $(INSTALL) -p -m 0644 ${topdir}/lib/et/com_err.texinfo \ ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/com_err.texi $(INSTALL) -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples $(INSTALL) -p -m 0644 lib/ss/ss_err.et \ ${stdbuilddir}/lib/ext2fs/ext2_err.et \ ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples $(INSTALL) -d ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples $(INSTALL) -p -m 0644 debugfs/debug_cmds.ct \ ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples dh_installinfo -pcomerr-dev ${stdbuilddir}/lib/et/com_err.info dh_installinfo -pe2fslibs-dev ${stdbuilddir}/doc/libext2fs.info DH_OPTIONS= dh_installchangelogs -pe2fsprogs \ -plibcomerr${COMERR_SOVERSION} \ -plibss${SS_SOVERSION} \ -pe2fslibs \ -pe2fsprogs-dbg -pe2fslibs-dbg \ -plibcomerr2-dbg -plibss2-dbg ifneq ($(BUILD_E2FSCK_STATIC),no) DH_OPTIONS= dh_installchangelogs -pe2fsck-static endif ifneq ($(UTIL_LINUX_NG),yes) DH_OPTIONS= dh_installchangelogs -plibuuid${UUID_SOVERSION} \ -puuid-dev -puuid-runtime -puuid-runtime-dbg -plibuuid1-dbg \ -plibblkid${BLKID_SOVERSION} -plibblkid1-dbg endif dh_fixperms dh_strip -pe2fsprogs --dbg-package=e2fsprogs-dbg dh_strip -pe2fsck-static --dbg-package=e2fsprogs-dbg ifneq ($(ismips),) dh_strip -pe2fslibs --dbg-package=e2fslibs-dbg -Xlib64ext2fs-nopic.a else dh_strip -pe2fslibs --dbg-package=e2fslibs-dbg endif dh_strip -plibss${SS_SOVERSION} --dbg-package=libss${SS_SOVERSION}-dbg dh_strip -plibcomerr${COMERR_SOVERSION} \ --dbg-package=libcomerr${COMERR_SOVERSION}-dbg ifneq ($(UTIL_LINUX_NG),yes) dh_strip -plibblkid${BLKID_SOVERSION} \ --dbg-package=libblkid${BLKID_SOVERSION}-dbg dh_strip -plibuuid${UUID_SOVERSION} --dbg-package=libuuid${UUID_SOVERSION}-dbg endif dh_strip # dpkg symbol handling ifneq (,$(findstring update-symbols,$(DEB_BUILD_OPTIONS))) SYMBOL_LIBS := e2fslibs libcomerr2 libss2 ifneq ($(UTIL_LINUX_NG),yes) SYMBOL_LIBS += libblkid1 libuuid1 endif for i in $(SYMBOL_LIBS); \ do \ echo "Generating symbols for $$i..."; \ dpkg-gensymbols -p$$i -Pdebian/$$i > debian/$$i.tmp-patch; \ cat debian/$$i.tmp-patch; \ patch debian/$$i.symbols < debian/$$i.tmp-patch; \ /bin/rm debian/$$i.tmp-patch; \ done endif for i in e2fsprogs e2fsprogs-dbg e2fslibs e2fslibs-dbg; do \ $(INSTALL) -p -m 0644 debian/copyright \ ${debdir}/$$i/usr/share/doc/$$i/copyright; \ done ifneq ($(UTIL_LINUX_NG),yes) $(INSTALL) -p -m 0644 debian/uuid-runtime.copyright \ ${uuidruntimedbgdir}/usr/share/doc/uuid-runtime-dbg/copyright endif $(INSTALL) -p -m 0644 debian/libcomerr2.copyright \ ${libcomerrdbgdir}/usr/share/doc/libcomerr2-dbg/copyright $(INSTALL) -p -m 0644 debian/libss2.copyright \ ${libssdbgdir}/usr/share/doc/libss2-dbg/copyright ifneq ($(UTIL_LINUX_NG),yes) $(INSTALL) -p -m 0644 debian/libblkid.copyright \ ${libblkiddbgdir}/usr/share/doc/libblkid1-dbg/copyright $(INSTALL) -p -m 0644 debian/libuuid1.copyright \ ${libuuiddbgdir}/usr/share/doc/libuuid1-dbg/copyright endif dh_compress dh_makeshlibs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb dh_makeshlibs --add-udeb=e2fsprogs-udeb -plibcomerr${COMERR_SOVERSION} \ -V 'libcomerr2 (>= 1.33-3)' ifneq ($(UTIL_LINUX_NG),yes) dh_makeshlibs -plibblkid${BLKID_SOVERSION} -V 'libblkid1 (>= 1.39-1)' echo "udeb: libblkid 1 libblkid1-udeb" >> \ debian/libblkid1/DEBIAN/shlibs echo "udeb: libuuid 1 libuuid1-udeb" >> debian/libuuid1/DEBIAN/shlibs endif dh_installdeb dh_shlibdeps -l${stdbuilddir}/lib dh_shlibdeps -pe2fsprogs -l${stdbuilddir}/lib \ -u"-Ldebian/e2fsprogs.shlibs.local" dh_shlibdeps -pe2fsprogs-udeb -l${stdbuilddir}/lib \ -u"-Ldebian/e2fsprogs-udeb.shlibs.local" dh_gencontrol -Ncomerr-dev -Nss-dev -Nuuid-dev \ -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb DH_OPTIONS= dh_gencontrol -pcomerr-dev \ -u '-v${COMERR_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}' DH_OPTIONS= dh_gencontrol -pss-dev \ -u '-v${SS_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}' ifneq ($(UTIL_LINUX_NG),yes) DH_OPTIONS= dh_gencontrol -puuid-dev \ -u '-v${UUID_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}' endif dh_gencontrol -pe2fsprogs-udeb -- -fdebian/files~ ifneq ($(UTIL_LINUX_NG),yes) dh_gencontrol -plibblkid1-udeb -- -fdebian/files~ dh_gencontrol -plibuuid1-udeb -- -fdebian/files~ endif dpkg-distaddfile $(UDEB_NAME) debian-installer $(UDEB_PRIORITY) ifneq ($(UTIL_LINUX_NG),yes) dpkg-distaddfile $(BLKID_UDEB_NAME) debian-installer $(BLKID_UDEB_PRIORITY) dpkg-distaddfile $(UUID_UDEB_NAME) debian-installer $(UUID_UDEB_PRIORITY) endif dh_md5sums -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb dh_builddeb -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb dh_builddeb -pe2fsprogs-udeb --filename=$(UDEB_NAME) ifneq ($(UTIL_LINUX_NG),yes) dh_builddeb -plibblkid1-udeb --filename=$(BLKID_UDEB_NAME) dh_builddeb -plibuuid1-udeb --filename=$(UUID_UDEB_NAME) endif binary: binary-indep binary-arch .PHONY: binary binary-arch binary-indep clean checkroot mrproper \ debug_flags debian-files debug_flags: @echo CFLAGS is $(CFLAGS) @echo LDFLAGS is $(LDFLAGS) @echo CPPFLAGS is $(CPPFLAGS) debian/e2fsprogs.shlibs.local.in0000664000000000000000000000040211750766346014021 0ustar libcom_err 2 libcomerr2 (>= 1.42~WIP-2011-10-05-1) libss 2 libss2 (>= 1.34-1) ifdef(`UTIL_LINUX_NG',, ``libuuid 1 libuuid1 (>= 1.34-1) libblkid 1 libblkid1 (>= 1.34-1) '')dnl libext2fs 2 e2fslibs (= ${Source-Version}) libe2p 2 e2fslibs (= ${Source-Version}) debian/comerr-dev.examples0000664000000000000000000000007111750766346013010 0ustar lib/ss/ss_err.et debian/BUILD-STD/lib/ext2fs/ext2_err.et debian/attic/0000775000000000000000000000000012301111455010265 5ustar debian/attic/e2fslibsg-dev.info0000664000000000000000000000021111750766346013616 0ustar DESCR="Library of routines to manipulate an ext2 filesystem." SECTION_MATCH="Development" SECTION_NAME="Development" FILE=libext2fs.info debian/attic/e2fslibsg-dev.menu0000664000000000000000000000035711750766346013642 0ustar ?package(e2fslibsg-dev):needs="dwww" section="Apps/Programming"\ title="The ext2fs library." \ longtitle="A library to handle low-level structures in an ext2 filesystem"\ command="/usr/doc/e2fslibsg-dev/html-info/libext2fs_toc.html" debian/attic/comerrg-dev.info0000664000000000000000000000016711750766346013406 0ustar DESCR="The Common Error Description library." SECTION_MATCH="Development" SECTION_NAME="Development" FILE=com_err.info debian/attic/comerrg-dev.menu0000664000000000000000000000066611750766346013423 0ustar ?package(comerrg-dev):needs="dwww" section="Apps/Programming"\ title="The com_err library" \ longtitle="The Common Error Description library"\ description="libcomerr is an attempt to present a common error-handling mechanism to \ manipulate the most common form of error code in a fashion that does not \ have the problems identified with mechanisms commonly in use." \ command="/usr/doc/comerrg-dev/html-info/com_err_toc.html" debian/attic/libs/0000775000000000000000000000000012301111455011216 5ustar debian/attic/libs/control0000664000000000000000000001052411750766346012651 0ustar Source: e2fsprogs Section: base Priority: required Maintainer: Yann Dirson Standards-Version: 2.4.0.0 Package: e2fsprogs Essential: yes Depends: ${shlibs:Depends} Conflicts: e2fsprogsg, dump (<< 0.4b4-4), quota (<< 1.55-8.1) Architecture: any Description: The EXT2 file system utilities. EXT2 stands for "Extended Filesystem", version 2. It's the main filesystem type used for hard disks on Debian and other Linux systems. . This package contains programs for creating, checking, and maintaining EXT2 filesystems, and the generic `fsck' wrapper. . This release may break older versions of dump and quota. Package: comerr2g Depends: ${shlibs:Depends} Conflicts: e2fsprogs (<< 1.10-6), comerr2 Architecture: any Description: The Common Error Description library - shared libraries. libcomerr is an attempt to present a common error-handling mechanism to manipulate the most common form of error code in a fashion that does not have the problems identified with mechanisms commonly in use. . It is mainly used by the EXT2-filesystem tools. Package: ss2g Depends: ${shlibs:Depends} Conflicts: e2fsprogs (<< 1.10-6), ss2 Architecture: any Description: "Sub-System" library for simple command-line interface parsing - shared libs This package contains the shared libs to support command-line interface parsers generated with the ssg-dev package. . It was originally inspired by the Multics SubSystem library. Package: e2fslibsg Depends: ${shlibs:Depends} Provides: ext2fs2g, e2p2g, uuid1g Conflicts: e2fsprogs (<= 1.10-7) Architecture: any Description: The EXT2 file system shared libs. EXT2 stands for "Extended Filesystem", version 2. It's the filesystem type used for hard disks on Debian and other Linux systems. . This package contains shared libraries needed by the utility programs. Package: comerrg-dev Section: devel Priority: extra Depends: ${libcdev:Depends}, comerr2g Suggests: doc-base Conflicts: e2fsprogs (<< 1.10-6), comerr-dev Architecture: any Description: The Common Error Description library - headers and static libraries. libcomerr is an attempt to present a common error-handling mechanism to manipulate the most common form of error code in a fashion that does not have the problems identified with mechanisms commonly in use. Package: ssg-dev Section: devel Priority: extra Depends: ${libcdev:Depends}, ss2g Conflicts: e2fsprogs (<< 1.10-6), ss-dev Architecture: any Description: "Sub-System" library for simple command-line interface parsing - devel. files This package includes a tool that parses a command table to generate a simple command-line interface parser, the include files needed to compile and use it, and the static libs. . It was originally inspired by the Multics SubSystem library. Package: e2fslibsg-dev Section: devel Priority: extra Depends: ${libcdev:Depends}, e2fslibsg, comerrg-dev Suggests: doc-base Provides: ext2fsg-dev, e2pg-dev, uuidg-dev Conflicts: e2fsprogs (<< 1.10-6), e2fslibs-dev Architecture: any Description: The headers and static libraries for ext2fs-aware tools-development. EXT2FS stands for "Extended Filesystem", version 2. It's the filesystem type used for hard disks on Debian and other Linux systems. . This package contains the headers and shared libraries needed to compile ext2fs-aware programs. Only programmers that really manipulate features specific to the ext2 filesystem will need this. Most programmers will use the generic filesystem-independent interface from libc. . It also contains dev files for 2 other libs (e2p and uuid) used by the e2fsprogs, but which are not yet packaged all by themselves because they lack documentation. They may also lack some support files, by I can't really know until someone uses them... . libe2p is for user-level e2fsprogs commands. It's used by dumpe2fs, chattr, and lsattr. Functions in libe2p typically have two characteristics (a) don't require that block device containing the filesystem be opened directly (functions in libext2fs do), and (b) libe2p typically contains printf statements or parse user input, and so have more internationalization issues. . libuuid generates and parses 128-bit universally unique id's (UUID's), using a standard which is blessed by both Microsoft and DCE, and is being proposed as an internet standard. See the internet-draft: . draft-leach-uuids-guids-01.txt . for more information. debian/attic/libs/ss2g.files0000664000000000000000000000004011750766346013140 0ustar lib/libss.so.?.* lib/libss.so.? debian/attic/libs/rules0000664000000000000000000001343311750766346012325 0ustar #! /usr/bin/make -f # -*- makefile -*- # # Invoke each target with `./debian/rules '. All targets should be # invoked with the package root as the current directory. # # The `binary' target must be run as root, as it needs to install files with # specific ownerships. # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 package = e2fsprogs ARCH = $(shell dpkg --print-architecture) # find the version for the main package, from changelog file MAIN_VERSION = $(shell head -1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g') # find versions for libraries going into their own packages, from their Makefile.in's COMERR_VERSION = $(shell grep ELF_VERSION lib/et/Makefile.in | cut '-d ' -f3) COMERR_MAJOR = $(word 1,$(subst ., ,$(COMERR_VERSION))) SS_VERSION = $(shell grep ELF_VERSION lib/ss/Makefile.in | cut '-d ' -f3) SS_MAJOR = $(word 1,$(subst ., ,$(SS_VERSION))) topdir = $(shell pwd) debdir = $(topdir)/debian maindir = $(debdir)/tmp builddir = $(topdir)/builddir docdir = $(maindir)/usr/doc/$(package) SUBPACKAGES_DIRS = tmp e2fslibsg e2fslibsg-dev comerr$(COMERR_MAJOR)g comerrg-dev \ ss$(SS_MAJOR)g ssg-dev installdoc = install -m 644 installbin = install -m 755 ifeq ($(ARCH),alpha) CCOPTS = -g -O2 -fsigned-char -DHAVE_NETINET_IN_H LIBC-DEV = libc6.1-dev else CCOPTS = -g -O2 -fsigned-char LIBC-DEV = libc6-dev endif build: configured dh_testdir make -C $(builddir) make -C $(builddir)/misc findsuper cd doc && texi2html -split_chapter libext2fs.texinfo cd lib/et && texi2html -split_chapter -expandinfo com_err.texinfo touch build configured: dh_testdir mkdir -p $(builddir) cd $(builddir) && CFLAGS="$(CFLAGS)" \ ../configure --enable-elf-shlibs --enable-dynamic-e2fsck \ --with-ccopts="$(CCOPTS)" touch configured clean: dh_testdir rm -f build configured install -make -C $(builddir) -i distclean rm -rf $(builddir) rm -f doc/libext2fs_*.html lib/et/com_err_*.html dh_clean binary-indep: build # no arch-independant debs. binary-arch: build dh_testversion 0.56 # == 0.53 + fixes dh_testdir -a dh_testroot -a dh_clean -a -k dh_installdirs -a make -C $(builddir) install DESTDIR=$(maindir) install -m 755 $(builddir)/misc/findsuper $(maindir)/sbin # static libs and .h files make -C $(builddir) install-libs DESTDIR=$(maindir) install -m 644 $(builddir)/lib/ss/ss_err.h $(maindir)/usr/include/ss/ # fix and install compile_et script sed s%$(topdir)/lib/et%/usr/share/comerr% \ <$(builddir)/lib/et/compile_et \ >$(debdir)/comerrg-dev/usr/bin/compile_et chmod 755 $(debdir)/comerrg-dev/usr/bin/compile_et # add support files for compile_et install -m 644 lib/et/et_c.awk lib/et/et_h.awk \ $(debdir)/comerrg-dev/usr/share/comerr/ # fix and install mk_cmds script sed s%$(topdir)/lib/ss%/usr/share/ss% \ <$(builddir)/lib/ss/mk_cmds \ >$(debdir)/ssg-dev/usr/bin/mk_cmds chmod 755 $(debdir)/ssg-dev/usr/bin/mk_cmds # add support files for mk_cmds install -m 644 lib/ss/ct_c.awk lib/ss/ct_c.sed \ $(debdir)/ssg-dev/usr/share/ss/ # docs mkdir -p $(debdir)/e2fslibsg-dev/usr/doc/e2fslibsg ln -sf e2fslibsg $(debdir)/e2fslibsg-dev/usr/doc/e2fslibsg-dev mkdir -p $(maindir)/usr/doc/e2fslibsg ln -sf e2fslibsg $(maindir)/usr/doc/e2fsprogs mkdir -p $(debdir)/comerrg-dev/usr/doc/comerr$(COMERR_MAJOR)g ln -sf comerr$(COMERR_MAJOR)g $(debdir)/comerrg-dev/usr/doc/comerrg-dev mkdir -p $(debdir)/ssg-dev/usr/doc/ss$(SS_MAJOR)g ln -sf ss$(SS_MAJOR)g $(debdir)/ssg-dev/usr/doc/ssg-dev dh_installdocs -a # HTML docs install -d $(debdir)/e2fslibsg-dev/usr/doc/e2fslibsg-dev/html-info/ install -p $(topdir)/doc/libext2fs_*.html \ $(debdir)/e2fslibsg-dev/usr/doc/e2fslibsg-dev/html-info/ install -d $(debdir)/comerrg-dev/usr/doc/comerrg-dev/html-info/ install -p $(topdir)/lib/et/com_err_*.html \ $(debdir)/comerrg-dev/usr/doc/comerrg-dev/html-info/ # texinfo docs install -p $(topdir)/doc/libext2fs.texinfo \ $(debdir)/e2fslibsg-dev/usr/doc/e2fslibsg/libext2fs.texi install -p $(topdir)/lib/et/com_err.texinfo \ $(debdir)/comerrg-dev/usr/doc/comerr2g/com_err.texi # doc-base support install -d $(debdir)/e2fslibsg-dev/usr/share/doc-base/ install -p -m 644 $(debdir)/libext2fs.docbase \ $(debdir)/e2fslibsg-dev/usr/share/doc-base/libext2fs install -d $(debdir)/comerrg-dev/usr/share/doc-base/ install -p -m 644 $(debdir)/com_err.docbase \ $(debdir)/comerrg-dev/usr/share/doc-base/com_err # examples dh_installexamples -a # dh_installmanpages still makes a mess as of 0.54 (see below dh_movefiles) install -p $(topdir)/lib/et/compile_et.1 $(maindir)/usr/man/man1/ install -d $(maindir)/usr/man/man3/ install -p $(topdir)/lib/et/com_err.3 $(maindir)/usr/man/man3/ ln -s e2fsck.8 $(maindir)/usr/man/man8/fsck.ext2.8 ln -s mke2fs.8 $(maindir)/usr/man/man8/mkfs.ext2.8 dh_movefiles -a # cleanup empty dirs cd $(maindir) && rmdir usr/man/cat? bin lib usr/include/* usr/include \ usr/info usr/lib usr/man/man3 usr/doc/e2fslibsg # dh_installmenu -a # broken + useless in 0.52 # dh_installmanpages -a dh_undocumented -a dh_installchangelogs -pe2fslibsg -pcomerr$(COMERR_MAJOR)g -pss$(SS_MAJOR)g ChangeLog dh_strip -a dh_compress -a dh_fixperms -a echo "libcdev:Depends=$(LIBC-DEV)" > debian/comerrg-dev.substvars echo "libcdev:Depends=$(LIBC-DEV)" > debian/ssg-dev.substvars echo "libcdev:Depends=$(LIBC-DEV)" > debian/e2fslibsg-dev.substvars dh_installdeb -a LD_LIBRARY_PATH=$(builddir)/lib:/lib:/usr/lib \ dh_shlibdeps -a dh_gencontrol -u '-isp' -pe2fsprogs -pe2fslibsg -pe2fslibsg-dev dh_gencontrol -u '-isp' -pcomerr$(COMERR_MAJOR)g -pcomerrg-dev \ -u '-v$(COMERR_VERSION)-$(MAIN_VERSION)' dh_gencontrol -u '-isp' -pss$(SS_MAJOR)g -pssg-dev \ -u '-v$(SS_VERSION)-$(MAIN_VERSION)' dh_makeshlibs -a # dh_du -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch .PHONY: binary binary-arch binary-indep clean checkroot debian/attic/libs/e2fslibsg.files0000664000000000000000000000005411750766346014147 0ustar lib/*.so.?.* lib/*.so.? usr/doc/e2fslibsg/* debian/attic/libs/comerr2g.files0000664000000000000000000000005211750766346014005 0ustar lib/libcom_err.so.?.* lib/libcom_err.so.? debian/libss2.symbols0000664000000000000000000000166411750766346012026 0ustar libss.so.2 libss2 #MINVER# _ss_pager_name@Base 1.01 _ss_table@Base 1.01 et_ss_error_table@Base 1.35 initialize_ss_error_table@Base 1.01 initialize_ss_error_table_r@Base 1.34 ss_abort_subsystem@Base 1.01 ss_add_info_dir@Base 1.01 ss_add_request_table@Base 1.01 ss_create_invocation@Base 1.01 ss_delete_info_dir@Base 1.01 ss_delete_invocation@Base 1.01 ss_delete_request_table@Base 1.01 ss_error@Base 1.01 ss_execute_command@Base 1.01 ss_execute_line@Base 1.01 ss_get_prompt@Base 1.01 ss_get_readline@Base 1.34 ss_help@Base 1.01 ss_list_requests@Base 1.01 ss_listen@Base 1.01 ss_name@Base 1.01 ss_page_stdin@Base 1.01 ss_pager_create@Base 1.01 ss_parse@Base 1.01 ss_perror@Base 1.01 ss_quit@Base 1.01 ss_rl_completion@Base 1.34 ss_safe_getenv@Base 1.38 ss_self_identify@Base 1.01 ss_set_prompt@Base 1.01 ss_std_requests@Base 1.01 ss_subsystem_name@Base 1.01 ss_subsystem_version@Base 1.01 ss_unimplemented@Base 1.01 debian/uuid-runtime.lintian-overrides0000664000000000000000000000011511750766346015213 0ustar uuid-runtime: command-with-path-in-maintainer-script prerm:5 /usr/sbin/uuidd debian/uuid-runtime.postinst0000664000000000000000000000050111750766346013437 0ustar #!/bin/sh set -e if ! getent group | grep -q libuuid; then groupadd -f -K GID_MIN=1 -K GID_MAX=999 libuuid fi if ! getent passwd | grep -q libuuid; then useradd -d /var/lib/libuuid -K UID_MIN=1 -K UID_MAX=499 -g libuuid libuuid fi chown libuuid:libuuid /usr/sbin/uuidd chmod 6755 /usr/sbin/uuidd #DEBHELPER# exit 0 debian/uuid-runtime.prerm0000664000000000000000000000014511750766346012705 0ustar #! /bin/sh set -e if [ -x /usr/sbin/uuidd ] then /usr/sbin/uuidd -k || true fi #DEBHELPER# exit 0 debian/libss2.copyright0000664000000000000000000000222311750766346012336 0ustar This is the Debian GNU/Linux prepackaged version of the ss command-line interface parsing library library. It is currently distributed together with the EXT2 file system utilities, which are otherwise packaged as "e2fsprogs". This package was put together by Yann Dirson , from sources obtained from a mirror of: tsx-11.mit.edu:/pub/linux/packages/ext2fs/ From the original distribution: Copyright 1987, 1988 by the Student Information Processing Board of the Massachusetts Institute of Technology Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of M.I.T. and the M.I.T. S.I.P.B. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. and the M.I.T. S.I.P.B. make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. debian/e2fslibs-dev.files.in0000664000000000000000000000032312162020142013072 0ustar usr/lib/*/libext2fs*.so usr/lib/*/libext2fs*.a usr/lib/*/libe2p*.so usr/lib/*/libe2p*.a usr/include/ext2fs usr/include/e2p usr/share/info/libext2fs.info* usr/lib/*/pkgconfig/e2p.pc usr/lib/*/pkgconfig/ext2fs.pc debian/libcomerr2.copyright0000664000000000000000000000220211750766346013175 0ustar This is the Debian GNU/Linux prepackaged version of the Common Error Description library. It is currently distributed together with the EXT2 file system utilities, which are otherwise packaged as "e2fsprogs". This package was put together by Yann Dirson , from sources obtained from a mirror of: tsx-11.mit.edu:/pub/linux/packages/ext2fs/ From the original distribution: Copyright 1987, 1988 by the Student Information Processing Board of the Massachusetts Institute of Technology Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of M.I.T. and the M.I.T. S.I.P.B. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. and the M.I.T. S.I.P.B. make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. debian/e2fsprogs.files0000664000000000000000000000007111750766346012143 0ustar sbin usr/bin usr/sbin usr/share/man usr/share/locale etc debian/ss-dev.examples0000664000000000000000000000002611750766346012146 0ustar debugfs/debug_cmds.ct debian/libuuid1.postinst0000664000000000000000000000235711750766346012541 0ustar #!/bin/sh set -e ADDUSERCONF='/etc/adduser.conf' if test -f $ADDUSERCONF; then FIRST_SYSTEM_UID=$(sed -n "s/^[[:space:]]*FIRST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF) LAST_SYSTEM_UID=$(sed -n "s/^[[:space:]]*LAST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF) FIRST_SYSTEM_GID=$(sed -n "s/^[[:space:]]*FIRST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF) LAST_SYSTEM_GID=$(sed -n "s/^[[:space:]]*LAST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p" $ADDUSERCONF) fi if test -z "$FIRST_SYSTEM_UID"; then FIRST_SYSTEM_UID=100 fi if test -z "$LAST_SYSTEM_UID"; then LAST_SYSTEM_UID=999 fi if test -z "$FIRST_SYSTEM_GID"; then FIRST_SYSTEM_GID=100 fi if test -z "$LAST_SYSTEM_GID"; then LAST_SYSTEM_GID=999 fi if ! getent group | grep -q libuuid; then groupadd -f -K GID_MIN=$FIRST_SYSTEM_GID -K GID_MAX=$LAST_SYSTEM_GID libuuid fi if ! getent passwd | grep -q libuuid; then useradd -d /var/lib/libuuid -K UID_MIN=$FIRST_SYSTEM_UID -K UID_MAX=$LAST_SYSTEM_UID -g libuuid libuuid fi mkdir -p /var/lib/libuuid chown libuuid:libuuid /var/lib/libuuid chmod 2775 /var/lib/libuuid #DEBHELPER# exit 0 debian/uuid-dev.files.in0000664000000000000000000000016111750766346012360 0ustar usr/lib/*/libuuid.so usr/lib/*/libuuid.a usr/include/uuid/* usr/share/man/man3/uuid* usr/lib/*/pkgconfig/uuid.pc debian/libblkid1.files0000664000000000000000000000002512162020142012034 0ustar lib/*/libblkid*.so.* debian/e2fsck-static.preinst0000664000000000000000000000042212261062101013225 0ustar #!/bin/sh # Abort on error. set -e PKG=e2fsck-static DOCLNK=/usr/share/doc/$PKG if test "$1" = upgrade \ -a -L $DOCLNK then rm $DOCLNK fi # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/libblkid-dev.files0000664000000000000000000000014612162020142012533 0ustar usr/lib/*/libblkid*.so.* usr/include/blkid usr/share/man/man3/libblkid.3 usr/lib/*/pkgconfig/blkid.pc debian/comerr-dev.doc-base0000664000000000000000000000067112261062101012625 0ustar Document: comerr-manual Title: The com_err library Author: Ken Raeburn and Bill Sommerfeld Abstract: A library, and associated utilities, which allow a more uniform way for libraries to return errors to their callers, and for programs to describe errors and exceptional conditions to their users. Section: Programming Format: HTML Index: /usr/share/doc/comerr-dev/html-info/com_err.html Files: /usr/share/doc/comerr-dev/html-info/*.html debian/comerr-dev.files.in0000664000000000000000000000032411750766346012702 0ustar usr/lib/*/libcom_err.a usr/lib/*/libcom_err.so usr/include/et/* usr/include/com_err.h usr/share/man/man1/compile_et* usr/share/man/man3/com_err.3* usr/bin/compile_et usr/share/et/* usr/lib/*/pkgconfig/com_err.pc debian/libss2.files0000664000000000000000000000002212162020142011372 0ustar lib/*/libss*.so.* debian/uuid-dev.copyright0000664000000000000000000000332511750766346012666 0ustar This package was added to the e2fsprogs debian source package by Theodore Ts'o on Sat Mar 15 15:33:37 EST 2003 It is part of the main e2fsprogs distribution, which can be found at: http://sourceforge.net/projects/e2fsprogs Upstream Author: Theodore Ts'o Copyright: Copyright (C) 1999, 2000, 2003, 2004 by Theodore Ts'o Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, and the entire permission notice in its entirety, including the disclaimer of warranties. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/watch0000664000000000000000000000023311750766346010236 0ustar version=3 http://sf.net/e2fsprogs/e2fsprogs-([0-9].+)\.tar\.gz #ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/e2fsprogs-([0-9].+)\.tar\.gz debian/uuid-dev.files0000664000000000000000000000016111750766346011753 0ustar usr/lib/*/libuuid.so usr/lib/*/libuuid.a usr/include/uuid/* usr/share/man/man3/uuid* usr/lib/*/pkgconfig/uuid.pc debian/libuuid1.copyright0000664000000000000000000000332511750766346012662 0ustar This package was added to the e2fsprogs debian source package by Theodore Ts'o on Sat Mar 15 15:33:37 EST 2003 It is part of the main e2fsprogs distribution, which can be found at: http://sourceforge.net/projects/e2fsprogs Upstream Author: Theodore Ts'o Copyright: Copyright (C) 1999, 2000, 2003, 2004 by Theodore Ts'o Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, and the entire permission notice in its entirety, including the disclaimer of warranties. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/e2fslibs-dev.files0000664000000000000000000000032312162020142012465 0ustar usr/lib/*/libext2fs*.so usr/lib/*/libext2fs*.a usr/lib/*/libe2p*.so usr/lib/*/libe2p*.a usr/include/ext2fs usr/include/e2p usr/share/info/libext2fs.info* usr/lib/*/pkgconfig/e2p.pc usr/lib/*/pkgconfig/ext2fs.pc debian/uuid-runtime.postrm0000664000000000000000000000013111750766346013077 0ustar #!/bin/sh set -e if [ "$1" = purge ] then rm -rf /var/run/uuidd fi #DEBHELPER# exit 0 debian/uuid-dev.README.Debian0000664000000000000000000000164111750766346012773 0ustar In order to santize e2fsprogs to be DFSG free, the file draft-leach-uuids-guids-01.txt has been removed. It can be obtained by downloading e2fsprogs from the upstream sources. It may also be available from other sites on the network, if you do a quick web search for the string "draft-leach-uuids-guids-01". Note that debian/rules is set up to include the file on Ubuntu systems, so for people trying to build e2fsprogs on Ubuntu systems, they should start from the upstream sources, and not the Debian-expurgated sources found in the Debian repository. (n.b., for WIP releases the command "./util/gen-tarball ubuntu" will help create tar file which is appropriately named to make life easier for dpkg-buildpackage.) Since Ubuntu doesn't have the DFSG restrictions, the documentation which has been removed for Debian's DFSG license purity shouldn't be denied to Ubuntu users. Theodore Ts'o Ocotober 3, 2006 debian/libblkid1.symbols0000664000000000000000000000234111750766346012456 0ustar libblkid.so.1 libblkid1 #MINVER# blkid__scan_dir@Base 1.41.1 blkid_debug_mask@Base 1.33 blkid_dev_devname@Base 1.33 blkid_dev_has_tag@Base 1.38 blkid_dev_iterate_begin@Base 1.33 blkid_dev_iterate_end@Base 1.33 blkid_dev_next@Base 1.33 blkid_dev_set_search@Base 1.38 #MISSING: 1.41.1# blkid_devdirs@Base 1.34 blkid_devno_to_devname@Base 1.33 blkid_find_dev_with_tag@Base 1.33 blkid_find_tag_dev@Base 1.33 blkid_flush_cache@Base 1.33 blkid_free_dev@Base 1.33 blkid_free_tag@Base 1.33 blkid_gc_cache@Base 1.40 blkid_get_cache@Base 1.33 blkid_get_dev@Base 1.33 blkid_get_dev_size@Base 1.33 blkid_get_devname@Base 1.33 blkid_get_library_version@Base 1.37 blkid_get_tag_value@Base 1.33 blkid_known_fstype@Base 1.34 blkid_llseek@Base 1.33 blkid_new_dev@Base 1.33 blkid_parse_tag_string@Base 1.33 blkid_parse_version_string@Base 1.37 blkid_probe_all@Base 1.33 blkid_probe_all_new@Base 1.38 blkid_put_cache@Base 1.33 blkid_read_cache@Base 1.33 blkid_set_tag@Base 1.33 blkid_strdup@Base 1.33 blkid_strndup@Base 1.33 blkid_tag_iterate_begin@Base 1.33 blkid_tag_iterate_end@Base 1.33 blkid_tag_next@Base 1.33 blkid_verify@Base 1.37 #MISSING: 1.40.7# check_for_modules@Base 1.40.6 #MISSING: 1.40.7# fs_proc_check@Base 1.40.6 debian/source.lintian-overrides0000664000000000000000000000037711750766346014076 0ustar e2fsprogs source: weak-library-dev-dependency ss-dev on libss2 (= ${mainBinary}) e2fsprogs source: weak-library-dev-dependency comerr-dev on libcomerr2 (= ${mainBinary}) e2fsprogs source: weak-library-dev-dependency uuid-dev on libuuid1 (= ${mainBinary}) debian/patches/0000775000000000000000000000000012571312452010621 5ustar debian/patches/CVE-2015-1572.patch0000664000000000000000000000370012470435170013241 0ustar From 49d0fe2a14f2a23da2fe299643379b8c1d37df73 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 6 Feb 2015 12:46:39 -0500 Subject: libext2fs: fix potential buffer overflow in closefs() The bug fix in f66e6ce4446: "libext2fs: avoid buffer overflow if s_first_meta_bg is too big" had a typo in the fix for ext2fs_closefs(). In practice most of the security exposure was from the openfs path, since this meant if there was a carefully crafted file system, buffer overrun would be triggered when the file system was opened. However, if corrupted file system didn't trip over some corruption check, and then the file system was modified via tune2fs or debugfs, such that the superblock was marked dirty and then written out via the closefs() path, it's possible that the buffer overrun could be triggered when the file system is closed. Also clear up a signed vs unsigned warning while we're at it. Thanks to Nick Kralevich for asking me to look at compiler warning in the code in question, which led me to notice the bug in f66e6ce4446. Addresses: CVE-2015-1572 Signed-off-by: Theodore Ts'o diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c index 1f99113..ab5b2fb 100644 --- a/lib/ext2fs/closefs.c +++ b/lib/ext2fs/closefs.c @@ -287,7 +287,7 @@ errcode_t ext2fs_flush2(ext2_filsys fs, int flags) dgrp_t j; #endif char *group_ptr; - int old_desc_blocks; + blk64_t old_desc_blocks; struct ext2fs_numeric_progress_struct progress; EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); @@ -346,7 +346,7 @@ errcode_t ext2fs_flush2(ext2_filsys fs, int flags) group_ptr = (char *) group_shadow; if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) { old_desc_blocks = fs->super->s_first_meta_bg; - if (old_desc_blocks > fs->super->s_first_meta_bg) + if (old_desc_blocks > fs->desc_blocks) old_desc_blocks = fs->desc_blocks; } else old_desc_blocks = fs->desc_blocks; -- cgit v0.10.2 debian/patches/fix-spec-file-version0000664000000000000000000000102312261062101014643 0ustar Description: fix version number in e2fsprogs.spec file . Due to a screwup in building the official upsteam source tarball, the version number in the e2fsprogs.spec file wasn't bumped to 1.42.9. Subsequent source extracts will have this fixed. . Origin: other --- e2fsprogs-1.42.9.orig/e2fsprogs.spec +++ e2fsprogs-1.42.9/e2fsprogs.spec @@ -5,7 +5,7 @@ Summary: Utilities for managing ext2/ext3/ext4 filesystems Name: e2fsprogs -Version: 1.42.8 +Version: 1.42.9 Release: 0 License: GPLv2 Group: System Environment/Base debian/patches/CVE-2015-0247.patch0000664000000000000000000000403412467454410013244 0ustar From f66e6ce4446738c2c7f43d41988a3eb73347e2f5 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 9 Aug 2014 12:24:54 -0400 Subject: libext2fs: avoid buffer overflow if s_first_meta_bg is too big If s_first_meta_bg is greater than the of number block group descriptor blocks, then reading or writing the block group descriptors will end up overruning the memory buffer allocated for the descriptors. Fix this by limiting first_meta_bg to no more than fs->desc_blocks. This doesn't correct the bad s_first_meta_bg value, but it avoids causing the e2fsprogs userspace programs from potentially crashing. Signed-off-by: Theodore Ts'o diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c index 4599eef..1f99113 100644 --- a/lib/ext2fs/closefs.c +++ b/lib/ext2fs/closefs.c @@ -344,9 +344,11 @@ errcode_t ext2fs_flush2(ext2_filsys fs, int flags) * superblocks and group descriptors. */ group_ptr = (char *) group_shadow; - if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) + if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) { old_desc_blocks = fs->super->s_first_meta_bg; - else + if (old_desc_blocks > fs->super->s_first_meta_bg) + old_desc_blocks = fs->desc_blocks; + } else old_desc_blocks = fs->desc_blocks; ext2fs_numeric_progress_init(fs, &progress, NULL, diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c index a1a3517..ba501e6 100644 --- a/lib/ext2fs/openfs.c +++ b/lib/ext2fs/openfs.c @@ -378,9 +378,11 @@ errcode_t ext2fs_open2(const char *name, const char *io_options, #ifdef WORDS_BIGENDIAN groups_per_block = EXT2_DESC_PER_BLOCK(fs->super); #endif - if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) + if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) { first_meta_bg = fs->super->s_first_meta_bg; - else + if (first_meta_bg > fs->desc_blocks) + first_meta_bg = fs->desc_blocks; + } else first_meta_bg = fs->desc_blocks; if (first_meta_bg) { retval = io_channel_read_blk(fs->io, group_block + -- cgit v0.10.2 debian/patches/fix-printf-format-type-match0000664000000000000000000000131512261062101016156 0ustar Description: e2image: fix printf format type match . Signed-off-by: "Theodore Ts'o" . Author: Theodore Ts'o Origin: upstream diff --git a/misc/e2image.c b/misc/e2image.c index 0537b0d..402ea9f 100644 --- a/misc/e2image.c +++ b/misc/e2image.c @@ -707,7 +707,7 @@ more_blocks: fputc('\b', stderr); strftime(buff, 30, "%T", gmtime(&duration)); fprintf(stderr, _("\b\b\b\b\b\b\b\bCopied %llu / %llu " - "blocks (%llu%%) in %s at %.2f MB/s \n"), + "blocks (%d%%) in %s at %.2f MB/s \n"), total_written, meta_blocks_count, calc_percent(total_written, meta_blocks_count), buff, calc_rate(total_written, fs->blocksize, duration)); debian/patches/update-to-git-f3ff319f790000664000000000000000000056627712301111177014653 0ustar Description: update to e2fsprogs git commit f3ff319f79 . e2fsprogs (1.42.9-3) unstable; urgency=medium . * Add the ability for mke2fs to create hugefiles * Add support for the sparse_super2 compat feature * Mke2fs can now force all of the metadata blocks to be at the beginning of the file system * Fix loopback mount detection (Closes: #497984) * Add support to mke2fs to create a file system at an offset (Closes: #417385) * Mention badblocks in the package description (Closes: #718725) * Update/fix various man pages (Closes: #719184, #719189) * Improve e2fsck's "superblock corrupt" message (Closes: #719185) * Miscellaneous Coverity clean ups Author: Theodore Y. Ts'o Origin: upstream, Bug-Debian: http://bugs.debian.org/417385 Bug-Debian: http://bugs.debian.org/497984 Bug-Debian: http://bugs.debian.org/718725 Bug-Debian: http://bugs.debian.org/719184 Bug-Debian: http://bugs.debian.org/719185 Bug-Debian: http://bugs.debian.org/719189 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- e2fsprogs-1.42.9.orig/MCONFIG.in +++ e2fsprogs-1.42.9/MCONFIG.in @@ -110,6 +110,7 @@ LIBUUID = @LIBUUID@ @SOCKET_LIB@ LIBQUOTA = @STATIC_LIBQUOTA@ LIBBLKID = @LIBBLKID@ @PRIVATE_LIBS_CMT@ $(LIBUUID) LIBINTL = @LIBINTL@ +SYSLIBS = @LIBS@ DEPLIBSS = $(LIB)/libss@LIB_EXT@ DEPLIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ DEPLIBUUID = @DEPLIBUUID@ --- e2fsprogs-1.42.9.orig/configure +++ e2fsprogs-1.42.9/configure @@ -2753,6 +2753,21 @@ $as_echo "Release date is ${E2FSPROGS_MO +WITH_DIET_LIBC= + +# Check whether --with-diet-libc was given. +if test "${with_diet_libc+set}" = set; then : + withval=$with_diet_libc; CC="diet cc -nostdinc" +WITH_DIET_LIBC=yes +if test -z "$LIBS" +then + LIBS="-lcompat" +else + LIBS="$LIBS -lcompat" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CC=$CC" >&5 +$as_echo "CC=$CC" >&6; } +fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 @@ -3659,15 +3674,6 @@ $as_echo "#define HAVE_DLOPEN 1" >>confd fi -WITH_DIET_LIBC= - -# Check whether --with-diet-libc was given. -if test "${with_diet_libc+set}" = set; then : - withval=$with_diet_libc; CC="diet cc -nostdinc" -WITH_DIET_LIBC=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CC=$CC" >&5 -$as_echo "CC=$CC" >&6; } -fi # Check whether --with-cc was given. if test "${with_cc+set}" = set; then : @@ -5440,9 +5446,16 @@ $as_echo "Enabling e4defrag support" >&6 fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling e4defrag support by default" >&5 + if test -z "$WITH_DIET_LIBC" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling e4defrag support by default" >&5 $as_echo "Enabling e4defrag support by default" >&6; } -DEFRAG_CMT= + DEFRAG_CMT= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling e4defrag support by default" >&5 +$as_echo "Disabling e4defrag support by default" >&6; } + DEFRAG_CMT="#" +fi fi @@ -10448,6 +10461,16 @@ $as_echo "#define HAVE_RECLEN_DIRENT 1" fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_atim" "ac_cv_member_struct_stat_st_atim" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_atim" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIM 1 +_ACEOF + + +fi + ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "#include " if test "x$ac_cv_type_ssize_t" = xyes; then : @@ -11041,7 +11064,7 @@ if test "$ac_res" != no; then : fi fi -for ac_func in __secure_getenv backtrace blkid_probe_get_topology chflags fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llseek lseek64 mallinfo mbstowcs memalign mmap msync nanosleep open64 pathconf posix_fadvise posix_memalign prctl secure_getenv setmntent setresgid setresuid srandom strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc +for ac_func in __secure_getenv backtrace blkid_probe_get_topology chflags fadvise64 fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 futimes getcwd getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llseek lseek64 mallinfo mbstowcs memalign mempcpy mmap msync nanosleep open64 pathconf posix_fadvise posix_fadvise64 posix_memalign prctl secure_getenv setmntent setresgid setresuid srandom stpcpy strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -11425,9 +11448,12 @@ fi if test "$USE_INCLUDED_LIBINTL" = "yes" ; then INCLUDES=$INCLUDES' -I$(top_builddir)/intl -I$(top_srcdir)/intl' fi +if test -n "$WITH_DIET_LIBC" ; then + INCLUDES="$INCLUDES -D_REENTRANT" +fi if test $cross_compiling = no; then - BUILD_CFLAGS="$CFLAGS $CPPFLAGS" + BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H" BUILD_LDFLAGS="$LDFLAGS" else BUILD_CFLAGS= --- e2fsprogs-1.42.9.orig/configure.in +++ e2fsprogs-1.42.9/configure.in @@ -2,7 +2,7 @@ AC_INIT(version.h) AC_PREREQ(2.54) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADERS([lib/config.h]) -AH_BOTTOM([#include "dirpaths.h"]) +AH_BOTTOM([#include ]) MCONFIG=./MCONFIG AC_SUBST_FILE(MCONFIG) BINARY_TYPE=bin @@ -63,15 +63,6 @@ AC_SUBST(E2FSPROGS_MONTH) AC_SUBST(E2FSPROGS_DAY) AC_SUBST(E2FSPROGS_VERSION) AC_SUBST(E2FSPROGS_PKGVER) -AC_CANONICAL_HOST -dnl -dnl Check to see if libdl exists for the sake of dlopen -dnl -DLOPEN_LIB='' -AC_CHECK_LIB(dl, dlopen, -[DLOPEN_LIB=-ldl -AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if dlopen/libdl exists])]) -AC_SUBST(DLOPEN_LIB) dnl dnl Use diet libc dnl @@ -80,8 +71,24 @@ AC_ARG_WITH([diet-libc], [ --with-diet-libc use diet libc], CC="diet cc -nostdinc" WITH_DIET_LIBC=yes +if test -z "$LIBS" +then + LIBS="-lcompat" +else + LIBS="$LIBS -lcompat" +fi AC_MSG_RESULT(CC=$CC))dnl dnl +AC_CANONICAL_HOST +dnl +dnl Check to see if libdl exists for the sake of dlopen +dnl +DLOPEN_LIB='' +AC_CHECK_LIB(dl, dlopen, +[DLOPEN_LIB=-ldl +AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if dlopen/libdl exists])]) +AC_SUBST(DLOPEN_LIB) +dnl AC_ARG_WITH([cc], AC_HELP_STRING([--with-cc],[no longer supported, use CC= instead]), AC_MSG_ERROR([--with-cc no longer supported; use CC= instead])) @@ -687,8 +694,14 @@ else AC_MSG_RESULT([Enabling e4defrag support]) fi , -AC_MSG_RESULT([Enabling e4defrag support by default]) -DEFRAG_CMT= +if test -z "$WITH_DIET_LIBC" +then + AC_MSG_RESULT([Enabling e4defrag support by default]) + DEFRAG_CMT= +else + AC_MSG_RESULT([Disabling e4defrag support by default]) + DEFRAG_CMT="#" +fi ) AC_SUBST(DEFRAG_CMT) dnl @@ -909,6 +922,7 @@ dnl is not decleared. AC_CHECK_MEMBER(struct dirent.d_reclen,[AC_DEFINE(HAVE_RECLEN_DIRENT, 1, [Define to 1 if dirent has d_reclen])],, [#include ]) +AC_CHECK_MEMBERS([struct stat.st_atim]) dnl Check to see if ssize_t was declared AC_CHECK_TYPE(ssize_t,[AC_DEFINE(HAVE_TYPE_SSIZE_T, 1, [Define to 1 if ssize_t declared])],, @@ -1025,12 +1039,15 @@ AC_CHECK_FUNCS(m4_flatten([ backtrace blkid_probe_get_topology chflags + fadvise64 fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 + futimes + getcwd getdtablesize getmntinfo getpwuid_r @@ -1042,12 +1059,14 @@ AC_CHECK_FUNCS(m4_flatten([ mallinfo mbstowcs memalign + mempcpy mmap msync nanosleep open64 pathconf posix_fadvise + posix_fadvise64 posix_memalign prctl secure_getenv @@ -1055,6 +1074,7 @@ AC_CHECK_FUNCS(m4_flatten([ setresgid setresuid srandom + stpcpy strcasecmp strdup strnlen @@ -1275,12 +1295,15 @@ fi if test "$USE_INCLUDED_LIBINTL" = "yes" ; then INCLUDES=$INCLUDES' -I$(top_builddir)/intl -I$(top_srcdir)/intl' fi +if test -n "$WITH_DIET_LIBC" ; then + INCLUDES="$INCLUDES -D_REENTRANT" +fi AC_SUBST(INCLUDES) dnl dnl Build CFLAGS dnl if test $cross_compiling = no; then - BUILD_CFLAGS="$CFLAGS $CPPFLAGS" + BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H" BUILD_LDFLAGS="$LDFLAGS" else BUILD_CFLAGS= --- e2fsprogs-1.42.9.orig/debugfs/Makefile.in +++ e2fsprogs-1.42.9/debugfs/Makefile.in @@ -31,12 +31,12 @@ SRCS= debug_cmds.c $(srcdir)/debugfs.c $ $(srcdir)/filefrag.c $(srcdir)/extent_inode.c $(srcdir)/zap.c LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \ - $(LIBUUID) + $(LIBUUID) $(SYSLIBS) DEPLIBS= $(LIBEXT2FS) $(LIBE2P) $(DEPLIBSS) $(DEPLIBCOM_ERR) \ $(DEPLIBBLKID) $(DEPLIBUUID) STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) $(STATIC_LIBCOM_ERR) \ - $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(STATIC_LIBE2P) + $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(STATIC_LIBE2P) $(SYSLIBS) STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBSS) \ $(DEPSTATIC_LIBCOM_ERR) $(DEPSTATIC_LIBUUID) \ $(DEPSTATIC_LIBE2P) --- e2fsprogs-1.42.9.orig/debugfs/debugfs.c +++ e2fsprogs-1.42.9/debugfs/debugfs.c @@ -289,8 +289,6 @@ void do_init_filesys(int argc, char **ar if (err) return; ext2fs_blocks_count_set(¶m, blocks); - if (err) - return; retval = ext2fs_initialize(argv[1], 0, ¶m, unix_io_manager, ¤t_fs); if (retval) { --- e2fsprogs-1.42.9.orig/debugfs/logdump.c +++ e2fsprogs-1.42.9/debugfs/logdump.c @@ -273,42 +273,43 @@ print_usage: static int read_journal_block(const char *cmd, struct journal_source *source, - off_t offset, char *buf, int size, - unsigned int *got) + off_t offset, char *buf, unsigned int size) { int retval; + unsigned int got; if (source->where == JOURNAL_IS_EXTERNAL) { if (lseek(source->fd, offset, SEEK_SET) < 0) { retval = errno; - com_err(cmd, retval, "while seeking in reading journal"); - return retval; + goto seek_err; } retval = read(source->fd, buf, size); - if (retval >= 0) { - *got = retval; - retval = 0; - } else + if (retval < 0) { retval = errno; + goto read_err; + } + got = retval; + retval = 0; } else { retval = ext2fs_file_lseek(source->file, offset, EXT2_SEEK_SET, NULL); if (retval) { + seek_err: com_err(cmd, retval, "while seeking in reading journal"); return retval; } - - retval = ext2fs_file_read(source->file, buf, size, got); + retval = ext2fs_file_read(source->file, buf, size, &got); + if (retval) { + read_err: + com_err(cmd, retval, "while reading journal"); + return retval; + } } - - if (retval) - com_err(cmd, retval, "while reading journal"); - else if (*got != (unsigned int) size) { - com_err(cmd, 0, "short read (read %d, expected %d) " - "while reading journal", *got, size); + if (got != size) { + com_err(cmd, 0, "short read (read %u, expected %u) " + "while reading journal", got, size); retval = -1; } - return retval; } @@ -338,7 +339,6 @@ static void dump_journal(char *cmdname, char buf[8192]; journal_superblock_t *jsb; unsigned int blocksize = 1024; - unsigned int got; int retval; __u32 magic, sequence, blocktype; journal_header_t *header; @@ -347,8 +347,7 @@ static void dump_journal(char *cmdname, unsigned int blocknr = 0; /* First, check to see if there's an ext2 superblock header */ - retval = read_journal_block(cmdname, source, 0, - buf, 2048, &got); + retval = read_journal_block(cmdname, source, 0, buf, 2048); if (retval) return; @@ -377,7 +376,7 @@ static void dump_journal(char *cmdname, /* Next, read the journal superblock */ retval = read_journal_block(cmdname, source, blocknr*blocksize, - jsb_buffer, 1024, &got); + jsb_buffer, 1024); if (retval) return; @@ -401,8 +400,8 @@ static void dump_journal(char *cmdname, while (1) { retval = read_journal_block(cmdname, source, blocknr*blocksize, buf, - blocksize, &got); - if (retval || got != blocksize) + blocksize); + if (retval) return; header = (journal_header_t *) buf; @@ -576,7 +575,6 @@ static void dump_metadata_block(FILE *ou int blocksize, tid_t transaction) { - unsigned int got; int retval; char buf[8192]; @@ -612,7 +610,7 @@ static void dump_metadata_block(FILE *ou retval = read_journal_block("logdump", source, blocksize * log_blocknr, - buf, blocksize, &got); + buf, blocksize); if (retval) return; --- e2fsprogs-1.42.9.orig/debugfs/set_fields.c +++ e2fsprogs-1.42.9/debugfs/set_fields.c @@ -150,6 +150,8 @@ static struct field_set_info super_field { "usr_quota_inum", &set_sb.s_usr_quota_inum, NULL, 4, parse_uint }, { "grp_quota_inum", &set_sb.s_grp_quota_inum, NULL, 4, parse_uint }, { "overhead_blocks", &set_sb.s_overhead_blocks, NULL, 4, parse_uint }, + { "backup_bgs", &set_sb.s_backup_bgs[0], NULL, 4, parse_uint, + FLAG_ARRAY, 2 }, { "checksum", &set_sb.s_checksum, NULL, 4, parse_uint }, { 0, 0, 0, 0 } }; --- e2fsprogs-1.42.9.orig/debugfs/util.c +++ e2fsprogs-1.42.9/debugfs/util.c @@ -201,7 +201,7 @@ char *time_to_string(__u32 cl) tz = ss_safe_getenv("TZ"); if (!tz) tz = ""; - do_gmt = !strcmp(tz, "GMT"); + do_gmt = !strcmp(tz, "GMT") | !strcmp(tz, "GMT0"); } return asctime((do_gmt) ? gmtime(&t) : localtime(&t)); @@ -222,14 +222,18 @@ time_t string_to_time(const char *arg) } if (arg[0] == '@') { /* interpret it as an integer */ - ret = strtoul(arg+1, &tmp, 0); + arg++; + fallback: + ret = strtoul(arg, &tmp, 0); if (*tmp) return ((time_t) -1); return ret; } memset(&ts, 0, sizeof(ts)); #ifdef HAVE_STRPTIME - strptime(arg, "%Y%m%d%H%M%S", &ts); + tmp = strptime(arg, "%Y%m%d%H%M%S", &ts); + if (tmp == NULL) + goto fallback; #else sscanf(arg, "%4d%2d%2d%2d%2d%2d", &ts.tm_year, &ts.tm_mon, &ts.tm_mday, &ts.tm_hour, &ts.tm_min, &ts.tm_sec); @@ -241,13 +245,9 @@ time_t string_to_time(const char *arg) ts.tm_mday = 0; #endif ts.tm_isdst = -1; - ret = mktime(&ts); - if (ts.tm_mday == 0 || ret == ((time_t) -1)) { - /* Try it as an integer... */ - ret = strtoul(arg, &tmp, 0); - if (*tmp) - return ((time_t) -1); - } + ret = ts.tm_sec + ts.tm_min*60 + ts.tm_hour*3600 + ts.tm_yday*86400 + + (ts.tm_year-70)*31536000 + ((ts.tm_year-69)/4)*86400 - + ((ts.tm_year-1)/100)*86400 + ((ts.tm_year+299)/400)*86400; return ret; } --- e2fsprogs-1.42.9.orig/e2fsck/Makefile.in +++ e2fsprogs-1.42.9/e2fsck/Makefile.in @@ -16,19 +16,20 @@ MANPAGES= e2fsck.8 FMANPAGES= e2fsck.conf.5 LIBS= $(LIBQUOTA) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBBLKID) $(LIBUUID) \ - $(LIBINTL) $(LIBE2P) + $(LIBINTL) $(LIBE2P) $(SYSLIBS) DEPLIBS= $(DEPLIBQUOTA) $(LIBEXT2FS) $(DEPLIBCOM_ERR) $(DEPLIBBLKID) \ $(DEPLIBUUID) $(DEPLIBE2P) STATIC_LIBS= $(STATIC_LIBQUOTA) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \ - $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL) $(STATIC_LIBE2P) + $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL) $(STATIC_LIBE2P) \ + $(SYSLIBS) STATIC_DEPLIBS= $(DEPSTATIC_LIBQUOTA) $(STATIC_LIBEXT2FS) \ $(DEPSTATIC_LIBCOM_ERR) $(DEPSTATIC_LIBBLKID) \ $(DEPSTATIC_LIBUUID) $(DEPSTATIC_LIBE2P) PROFILED_LIBS= $(PROFILED_LIBQUOTA) $(PROFILED_LIBEXT2FS) \ $(PROFILED_LIBCOM_ERR) $(PROFILED_LIBBLKID) $(PROFILED_LIBUUID) \ - $(PROFILED_LIBE2P) $(LIBINTL) + $(PROFILED_LIBE2P) $(LIBINTL) $(SYSLIBS) PROFILED_DEPLIBS= $(DEPPROFILED_LIBQUOTA) $(PROFILED_LIBEXT2FS) \ $(DEPPROFILED_LIBCOM_ERR) $(DEPPROFILED_LIBBLKID) \ $(DEPPROFILED_LIBUUID) $(DEPPROFILED_LIBE2P) @@ -153,26 +154,27 @@ tst_problem: $(srcdir)/problem.c $(srcdi $(DEPLIBCOM_ERR) $(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_problem \ $(srcdir)/problem.c -DUNITTEST $(LIBEXT2FS) $(LIBCOM_ERR) \ - $(LIBINTL) + $(LIBINTL) $(SYSLIBS) tst_crc32: $(srcdir)/crc32.c $(LIBEXT2FS) $(DEPLIBCOM_ERR) $(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_crc32 $(srcdir)/crc32.c \ - -DUNITTEST $(LIBEXT2FS) $(LIBCOM_ERR) + -DUNITTEST $(LIBEXT2FS) $(LIBCOM_ERR) $(SYSLIBS) tst_refcount: ea_refcount.c $(DEPLIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_refcount $(srcdir)/ea_refcount.c \ - $(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR) $(LIBEXT2FS) + $(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR) $(LIBEXT2FS) \ + $(SYSLIBS) tst_logfile: $(srcdir)/logfile.c $(E) " LD $@" $(Q) $(CC) -o tst_logfile $(srcdir)/logfile.c $(ALL_CFLAGS) \ - -DTEST_PROGRAM + -DTEST_PROGRAM $(SYSLIBS) tst_region: region.c $(DEPLIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_region $(srcdir)/region.c \ - $(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR) + $(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR) $(SYSLIBS) check:: tst_refcount tst_region tst_crc32 tst_problem LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_refcount --- e2fsprogs-1.42.9.orig/e2fsck/badblocks.c +++ e2fsprogs-1.42.9/e2fsck/badblocks.c @@ -111,6 +111,8 @@ void read_bad_blocks_file(e2fsck_t ctx, fatal: ctx->flags |= E2F_FLAG_ABORT; + if (bb_list) + ext2fs_badblocks_list_free(bb_list); return; } --- e2fsprogs-1.42.9.orig/e2fsck/dirinfo.c +++ e2fsprogs-1.42.9/e2fsck/dirinfo.c @@ -42,6 +42,7 @@ static void setup_tdb(e2fsck_t ctx, ext2 struct dir_info_db *db = ctx->dir_info; unsigned int threshold; errcode_t retval; + mode_t save_umask; char *tdb_dir, uuid[40]; int fd, enable; @@ -62,7 +63,9 @@ static void setup_tdb(e2fsck_t ctx, ext2 uuid_unparse(ctx->fs->super->s_uuid, uuid); sprintf(db->tdb_fn, "%s/%s-dirinfo-XXXXXX", tdb_dir, uuid); + save_umask = umask(077); fd = mkstemp(db->tdb_fn); + umask(save_umask); if (fd < 0) { db->tdb = NULL; return; --- e2fsprogs-1.42.9.orig/e2fsck/e2fsck.conf.5.in +++ e2fsprogs-1.42.9/e2fsck/e2fsck.conf.5.in @@ -97,9 +97,8 @@ incorrectly set at the time when e2fsck Historically this was usually due to some distributions having buggy init scripts and/or installers that didn't correctly detect this case and take appropriate -countermeasures. However, it's still possible, despite the -best efforts of init script and installer authors to not be -able to detect this misconfiguration, usually due to a +countermeasures. Unfortunately, this is occasionally +true even today, usually due to a buggy or misconfigured virtualization manager or the installer not having access to a network time server during the installation process. So by default, we allow --- e2fsprogs-1.42.9.orig/e2fsck/message.c +++ e2fsprogs-1.42.9/e2fsck/message.c @@ -226,7 +226,8 @@ static void print_time(FILE *f, time_t t time_str = getenv("TZ"); if (!time_str) time_str = ""; - do_gmt = !strcmp(time_str, "GMT0"); + do_gmt = !strcmp(time_str, "GMT") || + !strcmp(time_str, "GMT0"); } #endif time_str = asctime((do_gmt > 0) ? gmtime(&t) : localtime(&t)); --- e2fsprogs-1.42.9.orig/e2fsck/pass1.c +++ e2fsprogs-1.42.9/e2fsck/pass1.c @@ -546,9 +546,9 @@ void e2fsck_pass1(e2fsck_t ctx) __u64 max_sizes; ext2_filsys fs = ctx->fs; ext2_ino_t ino = 0; - struct ext2_inode *inode; - ext2_inode_scan scan; - char *block_buf; + struct ext2_inode *inode = NULL; + ext2_inode_scan scan = NULL; + char *block_buf = NULL; #ifdef RESOURCE_TRACK struct resource_track rtrack; #endif @@ -662,8 +662,7 @@ void e2fsck_pass1(e2fsck_t ctx) if (pctx.errcode) { fix_problem(ctx, PR_1_ALLOCATE_DBCOUNT, &pctx); ctx->flags |= E2F_FLAG_ABORT; - ext2fs_free_mem(&inode); - return; + goto endit; } /* @@ -686,8 +685,7 @@ void e2fsck_pass1(e2fsck_t ctx) if (pctx.errcode) { fix_problem(ctx, PR_1_CONVERT_SUBCLUSTER, &pctx); ctx->flags |= E2F_FLAG_ABORT; - ext2fs_free_mem(&inode); - return; + goto endit; } block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 3, "block interate buffer"); @@ -699,18 +697,16 @@ void e2fsck_pass1(e2fsck_t ctx) if (pctx.errcode) { fix_problem(ctx, PR_1_ISCAN_ERROR, &pctx); ctx->flags |= E2F_FLAG_ABORT; - ext2fs_free_mem(&block_buf); - ext2fs_free_mem(&inode); - return; + goto endit; } ext2fs_inode_scan_flags(scan, EXT2_SF_SKIP_MISSING_ITABLE, 0); ctx->stashed_inode = inode; scan_struct.ctx = ctx; scan_struct.block_buf = block_buf; ext2fs_set_inode_callback(scan, scan_callback, &scan_struct); - if (ctx->progress) - if ((ctx->progress)(ctx, 1, 0, ctx->fs->group_desc_count)) - return; + if (ctx->progress && ((ctx->progress)(ctx, 1, 0, + ctx->fs->group_desc_count))) + goto endit; if ((fs->super->s_wtime < fs->super->s_inodes_count) || (fs->super->s_mtime < fs->super->s_inodes_count)) busted_fs_time = 1; @@ -742,7 +738,7 @@ void e2fsck_pass1(e2fsck_t ctx) if (pctx.errcode) { fix_problem(ctx, PR_1_ISCAN_ERROR, &pctx); ctx->flags |= E2F_FLAG_ABORT; - return; + goto endit; } if (!ino) break; @@ -756,7 +752,7 @@ void e2fsck_pass1(e2fsck_t ctx) pctx.num = inode->i_links_count; fix_problem(ctx, PR_1_ICOUNT_STORE, &pctx); ctx->flags |= E2F_FLAG_ABORT; - return; + goto endit; } } @@ -846,7 +842,7 @@ void e2fsck_pass1(e2fsck_t ctx) pctx.num = 4; fix_problem(ctx, PR_1_ALLOCATE_BBITMAP_ERROR, &pctx); ctx->flags |= E2F_FLAG_ABORT; - return; + goto endit; } pb.ino = EXT2_BAD_INO; pb.num_blocks = pb.last_block = 0; @@ -863,12 +859,12 @@ void e2fsck_pass1(e2fsck_t ctx) if (pctx.errcode) { fix_problem(ctx, PR_1_BLOCK_ITERATE, &pctx); ctx->flags |= E2F_FLAG_ABORT; - return; + goto endit; } if (pb.bbcheck) if (!fix_problem(ctx, PR_1_BBINODE_BAD_METABLOCK_PROMPT, &pctx)) { ctx->flags |= E2F_FLAG_ABORT; - return; + goto endit; } ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino); clear_problem_context(&pctx); @@ -1146,17 +1142,18 @@ void e2fsck_pass1(e2fsck_t ctx) check_blocks(ctx, &pctx, block_buf); if (ctx->flags & E2F_FLAG_SIGNAL_MASK) - return; + goto endit; if (process_inode_count >= ctx->process_inode_size) { process_inodes(ctx, block_buf); if (ctx->flags & E2F_FLAG_SIGNAL_MASK) - return; + goto endit; } } process_inodes(ctx, block_buf); ext2fs_close_inode_scan(scan); + scan = NULL; /* * If any extended attribute blocks' reference counts need to @@ -1195,7 +1192,7 @@ void e2fsck_pass1(e2fsck_t ctx) if (!fix_problem(ctx, PR_1_RESIZE_INODE_CREATE, &pctx)) { ctx->flags |= E2F_FLAG_ABORT; - return; + goto endit; } pctx.errcode = 0; } @@ -1233,10 +1230,15 @@ void e2fsck_pass1(e2fsck_t ctx) endit: e2fsck_use_inode_shortcuts(ctx, 0); - ext2fs_free_mem(&block_buf); - ext2fs_free_mem(&inode); + if (scan) + ext2fs_close_inode_scan(scan); + if (block_buf) + ext2fs_free_mem(&block_buf); + if (inode) + ext2fs_free_mem(&inode); - print_resource_track(ctx, _("Pass 1"), &rtrack, ctx->fs->io); + if ((ctx->flags & E2F_FLAG_SIGNAL_MASK) == 0) + print_resource_track(ctx, _("Pass 1"), &rtrack, ctx->fs->io); } /* --- e2fsprogs-1.42.9.orig/e2fsck/pass5.c +++ e2fsprogs-1.42.9/e2fsck/pass5.c @@ -207,7 +207,6 @@ static void check_block_bitmaps(e2fsck_t int fixit, had_problem; errcode_t retval; int csum_flag; - int skip_group = 0; int old_desc_blocks = 0; int count = 0; int cmp_block = 0; @@ -260,9 +259,6 @@ redo_counts: had_problem = 0; save_problem = 0; pctx.blk = pctx.blk2 = NO_BLK; - if (csum_flag && - (ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT))) - skip_group++; for (i = B2C(fs->super->s_first_data_block); i < ext2fs_blocks_count(fs->super); i += EXT2FS_CLUSTER_RATIO(fs)) { @@ -293,15 +289,11 @@ redo_counts: actual_buf); if (retval) goto no_optimize; - if (ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT)) - memset(bitmap_buf, 0, nbytes); - else { - retval = ext2fs_get_block_bitmap_range2(fs->block_map, - B2C(i), fs->super->s_clusters_per_group, - bitmap_buf); - if (retval) - goto no_optimize; - } + retval = ext2fs_get_block_bitmap_range2(fs->block_map, + B2C(i), fs->super->s_clusters_per_group, + bitmap_buf); + if (retval) + goto no_optimize; if (memcmp(actual_buf, bitmap_buf, nbytes) != 0) goto no_optimize; n = ext2fs_bitcount(actual_buf, nbytes); @@ -311,73 +303,7 @@ redo_counts: goto next_group; no_optimize: - if (skip_group) { - if (first_block_in_bg) { - super_blk = 0; - old_desc_blk = 0; - new_desc_blk = 0; - ext2fs_super_and_bgd_loc2(fs, group, &super_blk, - &old_desc_blk, &new_desc_blk, 0); - - if (fs->super->s_feature_incompat & - EXT2_FEATURE_INCOMPAT_META_BG) - old_desc_blocks = - fs->super->s_first_meta_bg; - else - old_desc_blocks = fs->desc_blocks + - fs->super->s_reserved_gdt_blocks; - - count = 0; - cmp_block = fs->super->s_clusters_per_group; - if (group == (int)fs->group_desc_count - 1) - cmp_block = EXT2FS_NUM_B2C(fs, - ext2fs_group_blocks_count(fs, group)); - } - - bitmap = 0; - if (EQ_CLSTR(i, super_blk) || - (old_desc_blk && old_desc_blocks && - GE_CLSTR(i, old_desc_blk) && - LE_CLSTR(i, old_desc_blk + old_desc_blocks-1)) || - (new_desc_blk && EQ_CLSTR(i, new_desc_blk)) || - EQ_CLSTR(i, ext2fs_block_bitmap_loc(fs, group)) || - EQ_CLSTR(i, ext2fs_inode_bitmap_loc(fs, group)) || - (GE_CLSTR(i, ext2fs_inode_table_loc(fs, group)) && - LE_CLSTR(i, (ext2fs_inode_table_loc(fs, group) + - fs->inode_blocks_per_group - 1)))) { - bitmap = 1; - actual = (actual != 0); - count++; - cmp_block--; - } else if ((EXT2FS_B2C(fs, i) - count - - EXT2FS_B2C(fs, fs->super->s_first_data_block)) % - fs->super->s_clusters_per_group == 0) { - /* - * When the compare data blocks in block bitmap - * are 0, count the free block, - * skip the current block group. - */ - if (ext2fs_test_block_bitmap_range2( - ctx->block_found_map, - EXT2FS_B2C(fs, i), - cmp_block)) { - /* - * -1 means to skip the current block - * group. - */ - blocks = fs->super->s_clusters_per_group - 1; - group_free = cmp_block; - free_blocks += cmp_block; - /* - * The current block group's last block - * is set to i. - */ - i += EXT2FS_C2B(fs, cmp_block - 1); - bitmap = 1; - goto do_counts; - } - } - } else if (redo_flag) + if (redo_flag) bitmap = actual; else bitmap = ext2fs_fast_test_block_bitmap2(fs->block_map, i); @@ -396,14 +322,15 @@ redo_counts: */ problem = PR_5_BLOCK_USED; - if (skip_group) { + if (ext2fs_bg_flags_test(fs, group, + EXT2_BG_BLOCK_UNINIT)) { struct problem_context pctx2; pctx2.blk = i; pctx2.group = group; - if (fix_problem(ctx, PR_5_BLOCK_UNINIT,&pctx2)){ - ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT); - skip_group = 0; - } + if (fix_problem(ctx, PR_5_BLOCK_UNINIT, + &pctx2)) + ext2fs_bg_flags_clear(fs, group, + EXT2_BG_BLOCK_UNINIT); } } if (pctx.blk == NO_BLK) { @@ -457,16 +384,10 @@ redo_counts: group ++; blocks = 0; group_free = 0; - skip_group = 0; if (ctx->progress) if ((ctx->progress)(ctx, 5, group, fs->group_desc_count*2)) goto errout; - if (csum_flag && - (i != ext2fs_blocks_count(fs->super)-1) && - ext2fs_bg_flags_test(fs, group, - EXT2_BG_BLOCK_UNINIT)) - skip_group++; } } if (pctx.blk != NO_BLK) --- e2fsprogs-1.42.9.orig/e2fsck/problem.c +++ e2fsprogs-1.42.9/e2fsck/problem.c @@ -119,11 +119,13 @@ static struct e2fsck_problem problem_tab /* Superblock corrupt */ { PR_0_SB_CORRUPT, - N_("\nThe @S could not be read or does not describe a correct ext2\n" - "@f. If the @v is valid and it really contains an ext2\n" + N_("\nThe @S could not be read or does not describe a valid ext2/ext3/ext4\n" + "@f. If the @v is valid and it really contains an ext2/ext3/ext4\n" "@f (and not swap or ufs or something else), then the @S\n" "is corrupt, and you might try running e2fsck with an alternate @S:\n" - " e2fsck -b %S <@v>\n\n"), + " e2fsck -b 8193 <@v>\n" + " or\n" + " e2fsck -b 32768 <@v>\n\n"), PROMPT_NONE, PR_FATAL }, /* Filesystem size is wrong */ --- e2fsprogs-1.42.9.orig/e2fsck/profile.c +++ e2fsprogs-1.42.9/e2fsck/profile.c @@ -320,6 +320,7 @@ profile_init(const char **files, profile for (fs = files; !PROFILE_LAST_FILESPEC(*fs); fs++) { if (array) free_list(array); + array = NULL; retval = get_dirlist(*fs, &array); if (retval == 0) { if (!array) @@ -1544,7 +1545,7 @@ profile_get_integer(profile_t profile, c /* Empty string is no good. */ return PROF_BAD_INTEGER; errno = 0; - ret_long = strtol (value, &end_value, 10); + ret_long = strtol(value, &end_value, 0); /* Overflow or underflow. */ if ((ret_long == LONG_MIN || ret_long == LONG_MAX) && errno != 0) @@ -1586,7 +1587,7 @@ profile_get_uint(profile_t profile, cons /* Empty string is no good. */ return PROF_BAD_INTEGER; errno = 0; - ret_long = strtoul (value, &end_value, 10); + ret_long = strtoul(value, &end_value, 0); /* Overflow or underflow. */ if ((ret_long == ULONG_MAX) && errno != 0) --- e2fsprogs-1.42.9.orig/e2fsck/quota.c +++ e2fsprogs-1.42.9/e2fsck/quota.c @@ -22,14 +22,18 @@ static void move_quota_inode(ext2_filsys ext2_ino_t to_ino, int qtype) { struct ext2_inode inode; + errcode_t retval; char qf_name[QUOTA_NAME_LEN]; /* We need the inode bitmap to be loaded */ if (ext2fs_read_bitmaps(fs)) return; - if (ext2fs_read_inode(fs, from_ino, &inode)) + retval = ext2fs_read_inode(fs, from_ino, &inode); + if (retval) { + com_err("ext2fs_read_inode", retval, _("in move_quota_inode")); return; + } inode.i_links_count = 1; inode.i_mode = LINUX_S_IFREG | 0600; @@ -38,7 +42,13 @@ static void move_quota_inode(ext2_filsys EXT3_FEATURE_INCOMPAT_EXTENTS) inode.i_flags |= EXT4_EXTENTS_FL; - ext2fs_write_new_inode(fs, to_ino, &inode); + retval = ext2fs_write_new_inode(fs, to_ino, &inode); + if (retval) { + com_err("ext2fs_write_new_inode", retval, + _("in move_quota_inode")); + return; + } + /* unlink the old inode */ quota_get_qf_name(qtype, QFMT_VFS_V1, qf_name); ext2fs_unlink(fs, EXT2_ROOT_INO, qf_name, from_ino, 0); --- e2fsprogs-1.42.9.orig/intl/Makefile.in +++ e2fsprogs-1.42.9/intl/Makefile.in @@ -59,6 +59,20 @@ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS @ifNotGNUmake@ E = @E@ @ifNotGNUmake@ Q = @Q@ +@ifGNUmake@ CHECK=sparse +@ifGNUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null +@ifGNUmake@ ifeq ("$(C)", "2") +@ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__ +@ifGNUmake@ else +@ifGNUmake@ ifeq ("$(C)", "1") +@ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) +@ifGNUmake@ else +@ifGNUmake@ CHECK_CMD=@true +@ifGNUmake@ endif +@ifGNUmake@ endif + +@ifNotGNUmake@ CHECK_CMD=@true + l = @INTL_LIBTOOL_SUFFIX_PREFIX@ AR = ar --- e2fsprogs-1.42.9.orig/lib/blkid/cache.c +++ e2fsprogs-1.42.9/lib/blkid/cache.c @@ -167,8 +167,6 @@ void blkid_gc_cache(blkid_cache cache) list_for_each_safe(p, pnext, &cache->bic_devs) { blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs); - if (!p) - break; if (stat(dev->bid_name, &st) < 0) { DBG(DEBUG_CACHE, printf("freeing %s\n", dev->bid_name)); --- e2fsprogs-1.42.9.orig/lib/blkid/devname.c +++ e2fsprogs-1.42.9/lib/blkid/devname.c @@ -91,8 +91,6 @@ blkid_dev blkid_get_dev(blkid_cache cach */ list_for_each_safe(p, pnext, &cache->bic_devs) { blkid_dev dev2; - if (!p) - break; dev2 = list_entry(p, struct blkid_struct_dev, bid_devs); if (dev2->bid_flags & BLKID_BID_FL_VERIFIED) continue; --- e2fsprogs-1.42.9.orig/lib/blkid/probe.c +++ e2fsprogs-1.42.9/lib/blkid/probe.c @@ -243,7 +243,7 @@ static int check_for_modules(const char return (0); } -static int linux_version_code() +static int linux_version_code(void) { #ifdef __linux__ struct utsname ut; @@ -586,7 +586,7 @@ static int probe_fat(struct blkid_probe int count; next_sect_off = (next - 2) * vs->vs_cluster_size; - next_off = (start_data_sect + next_sect_off) * + next_off = (__u64) (start_data_sect + next_sect_off) * sector_size; dir = (struct vfat_dir_entry *) @@ -601,7 +601,9 @@ static int probe_fat(struct blkid_probe break; /* get FAT entry */ - fat_entry_off = (reserved * sector_size) + + fat_entry_off = + ((unsigned int) reserved * + (unsigned int) sector_size) + (next * sizeof(__u32)); buf = get_buffer(probe, fat_entry_off, buf_size); if (buf == NULL) @@ -1003,7 +1005,8 @@ static int probe_udf(struct blkid_probe (block sizes larger than 2K will be null padded) */ for (bs = 1; bs < 16; bs++) { isosb = (struct iso_volume_descriptor *) - get_buffer(probe, bs*2048+32768, sizeof(isosb)); + get_buffer(probe, (blkid_loff_t) bs*2048+32768, + sizeof(*isosb)); if (!isosb) return 1; if (isosb->vd_id[0]) @@ -1015,7 +1018,7 @@ static int probe_udf(struct blkid_probe if (j > 1) { isosb = (struct iso_volume_descriptor *) get_buffer(probe, j*bs*2048+32768, - sizeof(isosb)); + sizeof(*isosb)); if (!isosb) return 1; } @@ -1223,7 +1226,7 @@ static int probe_hfsplus(struct blkid_pr off = (alloc_first_block * 512) + (embed_first_block * alloc_block_size); buf = get_buffer(probe, off + (id->bim_kboff * 1024), - sizeof(sbd)); + sizeof(*sbd)); if (!buf) return 1; @@ -1247,7 +1250,7 @@ static int probe_hfsplus(struct blkid_pr memcpy(extents, hfsplus->cat_file.extents, sizeof(extents)); cat_block = blkid_be32(extents[0].start_block); - buf = get_buffer(probe, off + (cat_block * blocksize), 0x2000); + buf = get_buffer(probe, off + ((__u64) cat_block * blocksize), 0x2000); if (!buf) return 0; @@ -1278,7 +1281,7 @@ static int probe_hfsplus(struct blkid_pr if (ext == HFSPLUS_EXTENT_COUNT) return 0; - leaf_off = (ext_block_start + leaf_block) * blocksize; + leaf_off = (__u64) (ext_block_start + leaf_block) * blocksize; buf = get_buffer(probe, off + leaf_off, leaf_node_size); if (!buf) @@ -1360,7 +1363,7 @@ static int probe_lvm2(struct blkid_probe return 1; } - for (i=0, b=1, p=uuid, q= (char *) label->pv_uuid; i <= 32; + for (i=0, b=1, p=uuid, q= (char *) label->pv_uuid; i < LVM2_ID_LEN; i++, b <<= 1) { if (b & 0x4444440) *p++ = '-'; @@ -1580,7 +1583,7 @@ try_again: continue; idx = id->bim_kboff + (id->bim_sboff >> 10); - buf = get_buffer(&probe, idx << 10, 1024); + buf = get_buffer(&probe, (__u64) idx << 10, 1024); if (!buf) continue; --- e2fsprogs-1.42.9.orig/lib/blkid/save.c +++ e2fsprogs-1.42.9/lib/blkid/save.c @@ -94,8 +94,10 @@ int blkid_flush_cache(blkid_cache cache) if (ret == 0 && S_ISREG(st.st_mode)) { tmp = malloc(strlen(filename) + 8); if (tmp) { + mode_t save_umask = umask(022); sprintf(tmp, "%s-XXXXXX", filename); fd = mkstemp(tmp); + umask(save_umask); if (fd >= 0) { file = fdopen(fd, "w"); opened = tmp; @@ -134,7 +136,7 @@ int blkid_flush_cache(blkid_cache cache) fclose(file); if (opened != filename) { if (ret < 0) { - unlink(opened); + (void) unlink(opened); DBG(DEBUG_SAVE, printf("unlinked temp cache %s\n", opened)); } else { @@ -147,7 +149,8 @@ int blkid_flush_cache(blkid_cache cache) link(filename, backup); free(backup); } - rename(opened, filename); + if (rename(opened, filename) < 0) + (void) unlink(opened); DBG(DEBUG_SAVE, printf("moved temp cache %s\n", opened)); } --- e2fsprogs-1.42.9.orig/lib/config.h.in +++ e2fsprogs-1.42.9/lib/config.h.in @@ -103,6 +103,9 @@ /* Define to 1 if Ext2 ioctls present */ #undef HAVE_EXT2_IOCTLS +/* Define to 1 if you have the `fadvise64' function. */ +#undef HAVE_FADVISE64 + /* Define to 1 if you have the `fallocate' function. */ #undef HAVE_FALLOCATE @@ -121,6 +124,9 @@ /* Define to 1 if you have the `ftruncate64' function. */ #undef HAVE_FTRUNCATE64 +/* Define to 1 if you have the `futimes' function. */ +#undef HAVE_FUTIMES + /* Define to 1 if you have the `fwprintf' function. */ #undef HAVE_FWPRINTF @@ -197,6 +203,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_FD_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_LOOP_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_MAJOR_H @@ -281,6 +290,9 @@ /* Define to 1 if you have the `posix_fadvise' function. */ #undef HAVE_POSIX_FADVISE +/* Define to 1 if you have the `posix_fadvise64' function. */ +#undef HAVE_POSIX_FADVISE64 + /* Define to 1 if you have the `posix_memalign' function. */ #undef HAVE_POSIX_MEMALIGN @@ -381,6 +393,9 @@ /* Define to 1 if you have the `strtoull' function. */ #undef HAVE_STRTOULL +/* Define to 1 if `st_atim' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIM + /* Define to 1 if you have the `sync_file_range' function. */ #undef HAVE_SYNC_FILE_RANGE @@ -620,4 +635,4 @@ don't define. */ #undef uintmax_t -#include "dirpaths.h" +#include --- e2fsprogs-1.42.9.orig/lib/e2p/feature.c +++ e2fsprogs-1.42.9/lib/e2p/feature.c @@ -43,6 +43,8 @@ static struct feature feature_list[] = { "lazy_bg" }, { E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_EXCLUDE_BITMAP, "snapshot_bitmap" }, + { E2P_FEATURE_COMPAT, EXT4_FEATURE_COMPAT_SPARSE_SUPER2, + "sparse_super2" }, { E2P_FEATURE_RO_INCOMPAT, EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER, "sparse_super" }, --- e2fsprogs-1.42.9.orig/lib/e2p/ls.c +++ e2fsprogs-1.42.9/lib/e2p/ls.c @@ -368,6 +368,14 @@ void list_super2(struct ext2_super_block fprintf(f, "type %u\n", sb->s_jnl_backup_type); } } + if (sb->s_backup_bgs[0] || sb->s_backup_bgs[1]) { + fprintf(f, "Backup block groups: "); + if (sb->s_backup_bgs[0]) + fprintf(f, "%u ", sb->s_backup_bgs[0]); + if (sb->s_backup_bgs[1]) + fprintf(f, "%u ", sb->s_backup_bgs[1]); + fputc('\n', f); + } if (sb->s_snapshot_inum) { fprintf(f, "Snapshot inode: %u\n", sb->s_snapshot_inum); --- e2fsprogs-1.42.9.orig/lib/ext2fs/Makefile.in +++ e2fsprogs-1.42.9/lib/ext2fs/Makefile.in @@ -225,72 +225,72 @@ ext2fs.pc: $(srcdir)/ext2fs.pc.in $(top_ tst_badblocks: tst_badblocks.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_badblocks tst_badblocks.o $(STATIC_LIBEXT2FS) \ - $(STATIC_LIBCOM_ERR) + $(STATIC_LIBCOM_ERR) $(SYSLIBS) tst_icount: $(srcdir)/icount.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_icount $(srcdir)/icount.c -DDEBUG $(ALL_CFLAGS) \ - $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) + $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS) tst_iscan: tst_iscan.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_iscan tst_iscan.o $(STATIC_LIBEXT2FS) \ - $(STATIC_LIBCOM_ERR) + $(STATIC_LIBCOM_ERR) $(SYSLIBS) tst_getsize: tst_getsize.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_getsize tst_getsize.o $(STATIC_LIBEXT2FS) \ - $(STATIC_LIBCOM_ERR) + $(STATIC_LIBCOM_ERR) $(SYSLIBS) tst_ismounted: $(srcdir)/ismounted.c $(STATIC_LIBEXT2FS) \ $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_ismounted $(srcdir)/ismounted.c \ $(STATIC_LIBEXT2FS) -DDEBUG $(ALL_CFLAGS) \ - $(STATIC_LIBCOM_ERR) + $(STATIC_LIBCOM_ERR) $(SYSLIBS) tst_byteswap: tst_byteswap.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_byteswap tst_byteswap.o $(STATIC_LIBEXT2FS) \ - $(STATIC_LIBCOM_ERR) + $(STATIC_LIBCOM_ERR) $(SYSLIBS) tst_bitops: tst_bitops.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_bitops tst_bitops.o $(ALL_CFLAGS) \ - $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) + $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS) tst_getsectsize: tst_getsectsize.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_sectgetsize tst_getsectsize.o \ - $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) + $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS) tst_types.o: $(srcdir)/tst_types.c ext2_types.h tst_types: tst_types.o ext2_types.h $(E) " LD $@" - $(Q) $(CC) -o tst_types tst_types.o + $(Q) $(CC) -o tst_types tst_types.o $(SYSLIBS) tst_super_size.o: $(srcdir)/tst_super_size.c $(srcdir)/ext2_fs.h tst_super_size: tst_super_size.o $(E) " LD $@" - $(Q) $(CC) -o tst_super_size tst_super_size.o + $(Q) $(CC) -o tst_super_size tst_super_size.o $(SYSLIBS) tst_fs_struct.o: $(srcdir)/tst_fs_struct.c $(srcdir)/ext2fs.h tst_fs_struct: tst_fs_struct.o $(E) " LD $@" - $(Q) $(CC) -o tst_fs_struct tst_fs_struct.o + $(Q) $(CC) -o tst_fs_struct tst_fs_struct.o $(SYSLIBS) tst_inode_size.o: $(srcdir)/tst_inode_size.c $(srcdir)/ext2_fs.h tst_inode_size: tst_inode_size.o $(E) " LD $@" - $(Q) $(CC) -o tst_inode_size tst_inode_size.o + $(Q) $(CC) -o tst_inode_size tst_inode_size.o $(SYSLIBS) ext2_tdbtool: tdbtool.o $(E) " LD $@" - $(Q) $(CC) -o ext2_tdbtool tdbtool.o tdb.o + $(Q) $(CC) -o ext2_tdbtool tdbtool.o tdb.o $(SYSLIBS) extent_dbg.c: $(srcdir)/extent_dbg.ct $(E) " MK_CMDS $<" @@ -372,11 +372,13 @@ tst_bitmaps_cmd.c: tst_bitmaps_cmd.ct $(E) " MK_CMDS $@" $(Q) DIR=$(srcdir) $(MK_CMDS) $(srcdir)/tst_bitmaps_cmd.ct -tst_bitmaps: tst_bitmaps.o tst_bitmaps_cmd.o $(STATIC_LIBEXT2FS) \ - $(DEPSTATIC_LIBSS) $(DEPSTATIC_LIBCOM_ERR) +tst_bitmaps: tst_bitmaps.o tst_bitmaps_cmd.o $(srcdir)/blkmap64_rb.c \ + $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBSS) $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" - $(Q) $(CC) -o $@ tst_bitmaps.o tst_bitmaps_cmd.o $(ALL_CFLAGS) \ - $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) $(STATIC_LIBCOM_ERR) + $(Q) $(CC) -o $@ tst_bitmaps.o tst_bitmaps_cmd.o \ + -DDEBUG_RB $(srcdir)/blkmap64_rb.c $(ALL_CFLAGS) \ + $(STATIC_LIBEXT2FS) $(STATIC_LIBSS) $(STATIC_LIBCOM_ERR) \ + $(SYSLIBS) tst_extents: $(srcdir)/extent.c $(DEBUG_OBJS) $(DEPSTATIC_LIBSS) \ $(STATIC_LIBE2P) $(DEPLIBUUID) $(DEPLIBBLKID) $(DEPSTATIC_LIBCOM_ERR) @@ -384,27 +386,29 @@ tst_extents: $(srcdir)/extent.c $(DEBUG_ $(Q) $(CC) -o tst_extents $(srcdir)/extent.c \ $(ALL_CFLAGS) -DDEBUG $(DEBUG_OBJS) $(STATIC_LIBSS) \ $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(LIBBLKID) $(LIBUUID) \ - $(STATIC_LIBCOM_ERR) -I $(top_srcdir)/debugfs + $(STATIC_LIBCOM_ERR) $(SYSLIBS) -I $(top_srcdir)/debugfs tst_inline: $(srcdir)/inline.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o tst_inline $(srcdir)/inline.c $(ALL_CFLAGS) -DDEBUG \ - $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) + $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS) tst_csum: csum.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(STATIC_LIBE2P) \ $(top_srcdir)/lib/e2p/e2p.h $(E) " LD $@" $(Q) $(CC) -o tst_csum $(srcdir)/csum.c -DDEBUG \ $(ALL_CFLAGS) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \ - $(STATIC_LIBE2P) + $(STATIC_LIBE2P) $(SYSLIBS) tst_crc32c: $(srcdir)/crc32c.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(Q) $(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_crc32c $(srcdir)/crc32c.c \ - -DUNITTEST $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) + -DUNITTEST $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \ + $(SYSLIBS) mkjournal: mkjournal.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR) $(E) " LD $@" - $(Q) $(CC) -o mkjournal $(srcdir)/mkjournal.c -DDEBUG $(STATIC_LIBEXT2FS) $(LIBCOM_ERR) $(ALL_CFLAGS) + $(Q) $(CC) -o mkjournal $(srcdir)/mkjournal.c -DDEBUG \ + $(STATIC_LIBEXT2FS) $(LIBCOM_ERR) $(ALL_CFLAGS) $(SYSLIBS) check:: tst_bitops tst_badblocks tst_iscan tst_types tst_icount \ tst_super_size tst_types tst_inode_size tst_csum tst_crc32c tst_bitmaps \ @@ -573,10 +577,11 @@ block.o: $(srcdir)/block.c $(top_builddi $(srcdir)/ext2_ext_attr.h $(srcdir)/bitops.h bmap.o: $(srcdir)/bmap.c $(top_builddir)/lib/config.h \ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \ - $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \ - $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \ - $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ - $(srcdir)/ext2_ext_attr.h $(srcdir)/bitops.h + $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fsP.h \ + $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \ + $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \ + $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \ + $(srcdir)/bitops.h check_desc.o: $(srcdir)/check_desc.c $(top_builddir)/lib/config.h \ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \ @@ -671,7 +676,7 @@ fileio.o: $(srcdir)/fileio.c $(top_build $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \ $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \ $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ - $(srcdir)/ext2_ext_attr.h $(srcdir)/bitops.h + $(srcdir)/ext2_ext_attr.h $(srcdir)/bitops.h $(srcdir)/ext2fsP.h finddev.o: $(srcdir)/finddev.c $(top_builddir)/lib/config.h \ $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \ $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \ --- e2fsprogs-1.42.9.orig/lib/ext2fs/alloc.c +++ e2fsprogs-1.42.9/lib/ext2fs/alloc.c @@ -27,48 +27,17 @@ #include "ext2fs.h" /* - * Check for uninit block bitmaps and deal with them appropriately + * Clear the uninit block bitmap flag if necessary */ -static void check_block_uninit(ext2_filsys fs, ext2fs_block_bitmap map, - dgrp_t group) +static void clear_block_uninit(ext2_filsys fs, dgrp_t group) { - blk_t i; - blk64_t blk, super_blk, old_desc_blk, new_desc_blk; - int old_desc_blocks; - if (!(EXT2_HAS_RO_COMPAT_FEATURE(fs->super, EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) || !(ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT))) return; - blk = ext2fs_group_first_block2(fs, group); - - ext2fs_super_and_bgd_loc2(fs, group, &super_blk, - &old_desc_blk, &new_desc_blk, 0); + /* uninit block bitmaps are now initialized in read_bitmaps() */ - if (fs->super->s_feature_incompat & - EXT2_FEATURE_INCOMPAT_META_BG) - old_desc_blocks = fs->super->s_first_meta_bg; - else - old_desc_blocks = fs->desc_blocks + fs->super->s_reserved_gdt_blocks; - - for (i=0; i < fs->super->s_blocks_per_group; i++, blk++) - ext2fs_fast_unmark_block_bitmap2(map, blk); - - blk = ext2fs_group_first_block2(fs, group); - for (i=0; i < fs->super->s_blocks_per_group; i++, blk++) { - if ((blk == super_blk) || - (old_desc_blk && old_desc_blocks && - (blk >= old_desc_blk) && - (blk < old_desc_blk + old_desc_blocks)) || - (new_desc_blk && (blk == new_desc_blk)) || - (blk == ext2fs_block_bitmap_loc(fs, group)) || - (blk == ext2fs_inode_bitmap_loc(fs, group)) || - (blk >= ext2fs_inode_table_loc(fs, group) && - (blk < ext2fs_inode_table_loc(fs, group) - + fs->inode_blocks_per_group))) - ext2fs_fast_mark_block_bitmap2(map, blk); - } ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT); ext2fs_group_desc_csum_set(fs, group); ext2fs_mark_super_dirty(fs); @@ -93,10 +62,11 @@ static void check_inode_uninit(ext2_fils ext2fs_fast_unmark_inode_bitmap2(map, ino); ext2fs_bg_flags_clear(fs, group, EXT2_BG_INODE_UNINIT); + /* Mimics what the kernel does */ + ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT); ext2fs_group_desc_csum_set(fs, group); ext2fs_mark_ib_dirty(fs); ext2fs_mark_super_dirty(fs); - check_block_uninit(fs, fs->block_map, group); } /* @@ -167,8 +137,8 @@ errcode_t ext2fs_new_inode(ext2_filsys f errcode_t ext2fs_new_block2(ext2_filsys fs, blk64_t goal, ext2fs_block_bitmap map, blk64_t *ret) { - blk64_t i; - int c_ratio; + errcode_t retval; + blk64_t b; EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); @@ -178,29 +148,21 @@ errcode_t ext2fs_new_block2(ext2_filsys return EXT2_ET_NO_BLOCK_BITMAP; if (!goal || (goal >= ext2fs_blocks_count(fs->super))) goal = fs->super->s_first_data_block; - i = goal; - c_ratio = 1 << ext2fs_get_bitmap_granularity(map); - if (c_ratio > 1) - goal &= ~EXT2FS_CLUSTER_MASK(fs); - check_block_uninit(fs, map, - (i - fs->super->s_first_data_block) / - EXT2_BLOCKS_PER_GROUP(fs->super)); - do { - if (((i - fs->super->s_first_data_block) % - EXT2_BLOCKS_PER_GROUP(fs->super)) == 0) - check_block_uninit(fs, map, - (i - fs->super->s_first_data_block) / - EXT2_BLOCKS_PER_GROUP(fs->super)); - - if (!ext2fs_fast_test_block_bitmap2(map, i)) { - *ret = i; - return 0; - } - i = (i + c_ratio) & ~(c_ratio - 1); - if (i >= ext2fs_blocks_count(fs->super)) - i = fs->super->s_first_data_block; - } while (i != goal); - return EXT2_ET_BLOCK_ALLOC_FAIL; + goal &= ~EXT2FS_CLUSTER_MASK(fs); + + retval = ext2fs_find_first_zero_block_bitmap2(map, + goal, ext2fs_blocks_count(fs->super) - 1, &b); + if ((retval == ENOENT) && (goal != fs->super->s_first_data_block)) + retval = ext2fs_find_first_zero_block_bitmap2(map, + fs->super->s_first_data_block, goal - 1, &b); + if (retval == ENOENT) + return EXT2_ET_BLOCK_ALLOC_FAIL; + if (retval) + return retval; + + clear_block_uninit(fs, ext2fs_group_of_blk2(fs, b)); + *ret = b; + return 0; } errcode_t ext2fs_new_block(ext2_filsys fs, blk_t goal, --- e2fsprogs-1.42.9.orig/lib/ext2fs/alloc_sb.c +++ e2fsprogs-1.42.9/lib/ext2fs/alloc_sb.c @@ -65,8 +65,6 @@ int ext2fs_reserve_super_and_bgd(ext2_fi ext2fs_mark_block_bitmap2(bmap, 0); if (old_desc_blk) { - if (fs->super->s_reserved_gdt_blocks && fs->block_map == bmap) - ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT); num_blocks = old_desc_blocks; if (old_desc_blk + num_blocks >= ext2fs_blocks_count(fs->super)) num_blocks = ext2fs_blocks_count(fs->super) - --- e2fsprogs-1.42.9.orig/lib/ext2fs/alloc_stats.c +++ e2fsprogs-1.42.9/lib/ext2fs/alloc_stats.c @@ -106,3 +106,44 @@ void ext2fs_set_block_alloc_stats_callba fs->block_alloc_stats = func; } + +void ext2fs_block_alloc_stats_range(ext2_filsys fs, blk64_t blk, + blk_t num, int inuse) +{ +#ifndef OMIT_COM_ERR + if (blk + num > ext2fs_blocks_count(fs->super)) { + com_err("ext2fs_block_alloc_stats_range", 0, + "Illegal block range: %llu (%u) ", + (unsigned long long) blk, num); + return; + } +#endif + if (inuse == 0) + return; + if (inuse > 0) { + ext2fs_mark_block_bitmap_range2(fs->block_map, blk, num); + inuse = 1; + } else { + ext2fs_unmark_block_bitmap_range2(fs->block_map, blk, num); + inuse = -1; + } + while (num) { + int group = ext2fs_group_of_blk2(fs, blk); + blk64_t last_blk = ext2fs_group_last_block2(fs, group); + blk_t n = num; + + if (blk + num > last_blk) + n = last_blk - blk + 1; + + ext2fs_bg_free_blocks_count_set(fs, group, + ext2fs_bg_free_blocks_count(fs, group) - + inuse*n/EXT2FS_CLUSTER_RATIO(fs)); + ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT); + ext2fs_group_desc_csum_set(fs, group); + ext2fs_free_blocks_count_add(fs->super, -inuse * n); + blk += n; + num -= n; + } + ext2fs_mark_super_dirty(fs); + ext2fs_mark_bb_dirty(fs); +} --- e2fsprogs-1.42.9.orig/lib/ext2fs/alloc_tables.c +++ e2fsprogs-1.42.9/lib/ext2fs/alloc_tables.c @@ -83,9 +83,8 @@ static blk64_t flexbg_offset(ext2_filsys errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group, ext2fs_block_bitmap bmap) { - unsigned int j; errcode_t retval; - blk64_t group_blk, start_blk, last_blk, new_blk, blk; + blk64_t group_blk, start_blk, last_blk, new_blk; dgrp_t last_grp = 0; int rem_grps = 0, flexbg_size = 0; @@ -205,19 +204,12 @@ errcode_t ext2fs_allocate_group_table(ex bmap, &new_blk); if (retval) return retval; - for (j=0, blk = new_blk; - j < fs->inode_blocks_per_group; - j++, blk++) { - ext2fs_mark_block_bitmap2(bmap, blk); - if (flexbg_size) { - dgrp_t gr = ext2fs_group_of_blk2(fs, blk); - ext2fs_bg_free_blocks_count_set(fs, gr, ext2fs_bg_free_blocks_count(fs, gr) - 1); - ext2fs_free_blocks_count_add(fs->super, -1); - ext2fs_bg_flags_clear(fs, gr, - EXT2_BG_BLOCK_UNINIT); - ext2fs_group_desc_csum_set(fs, gr); - } - } + if (flexbg_size) + ext2fs_block_alloc_stats_range(fs, new_blk, + fs->inode_blocks_per_group, +1); + else + ext2fs_mark_block_bitmap_range2(fs->block_map, + new_blk, fs->inode_blocks_per_group); ext2fs_inode_table_loc_set(fs, group, new_blk); } ext2fs_group_desc_csum_set(fs, group); --- e2fsprogs-1.42.9.orig/lib/ext2fs/bitops.h +++ e2fsprogs-1.42.9/lib/ext2fs/bitops.h @@ -157,6 +157,14 @@ extern errcode_t ext2fs_find_first_zero_ ext2_ino_t start, ext2_ino_t end, ext2_ino_t *out); +extern errcode_t ext2fs_find_first_set_block_bitmap2(ext2fs_block_bitmap bitmap, + blk64_t start, + blk64_t end, + blk64_t *out); +extern errcode_t ext2fs_find_first_set_inode_bitmap2(ext2fs_inode_bitmap bitmap, + ext2_ino_t start, + ext2_ino_t end, + ext2_ino_t *out); extern blk64_t ext2fs_get_block_bitmap_start2(ext2fs_block_bitmap bitmap); extern ext2_ino_t ext2fs_get_inode_bitmap_start2(ext2fs_inode_bitmap bitmap); extern blk64_t ext2fs_get_block_bitmap_end2(ext2fs_block_bitmap bitmap); @@ -198,6 +206,9 @@ extern void ext2fs_unmark_block_bitmap_r extern errcode_t ext2fs_find_first_zero_generic_bmap(ext2fs_generic_bitmap bitmap, __u64 start, __u64 end, __u64 *out); +extern errcode_t ext2fs_find_first_set_generic_bmap(ext2fs_generic_bitmap bitmap, + __u64 start, __u64 end, + __u64 *out); /* * The inline routines themselves... @@ -602,6 +613,36 @@ _INLINE_ errcode_t ext2fs_find_first_zer if (!rv) *out = (ext2_ino_t) o; return rv; +} + +_INLINE_ errcode_t ext2fs_find_first_set_block_bitmap2(ext2fs_block_bitmap bitmap, + blk64_t start, + blk64_t end, + blk64_t *out) +{ + __u64 o; + errcode_t rv; + + rv = ext2fs_find_first_set_generic_bmap((ext2fs_generic_bitmap) bitmap, + start, end, &o); + if (!rv) + *out = o; + return rv; +} + +_INLINE_ errcode_t ext2fs_find_first_set_inode_bitmap2(ext2fs_inode_bitmap bitmap, + ext2_ino_t start, + ext2_ino_t end, + ext2_ino_t *out) +{ + __u64 o; + errcode_t rv; + + rv = ext2fs_find_first_set_generic_bmap((ext2fs_generic_bitmap) bitmap, + start, end, &o); + if (!rv) + *out = (ext2_ino_t) o; + return rv; } _INLINE_ blk64_t ext2fs_get_block_bitmap_start2(ext2fs_block_bitmap bitmap) --- e2fsprogs-1.42.9.orig/lib/ext2fs/blkmap64_ba.c +++ e2fsprogs-1.42.9/lib/ext2fs/blkmap64_ba.c @@ -328,12 +328,6 @@ static errcode_t ba_find_first_zero(ext2 const unsigned char *pos; unsigned long max_loop_count, i; - if (start < bitmap->start || end > bitmap->end || start > end) - return EINVAL; - - if (bitmap->cluster_bits) - return EINVAL; - /* scan bits until we hit a byte boundary */ while ((bitpos & 0x7) != 0 && count > 0) { if (!ext2fs_test_bit64(bitpos, bp->bitarray)) { @@ -397,6 +391,80 @@ static errcode_t ba_find_first_zero(ext2 return ENOENT; } +/* Find the first one bit between start and end, inclusive. */ +static errcode_t ba_find_first_set(ext2fs_generic_bitmap bitmap, + __u64 start, __u64 end, __u64 *out) +{ + ext2fs_ba_private bp = (ext2fs_ba_private)bitmap->private; + unsigned long bitpos = start - bitmap->start; + unsigned long count = end - start + 1; + int byte_found = 0; /* whether a != 0xff byte has been found */ + const unsigned char *pos; + unsigned long max_loop_count, i; + + /* scan bits until we hit a byte boundary */ + while ((bitpos & 0x7) != 0 && count > 0) { + if (ext2fs_test_bit64(bitpos, bp->bitarray)) { + *out = bitpos + bitmap->start; + return 0; + } + bitpos++; + count--; + } + + if (!count) + return ENOENT; + + pos = ((unsigned char *)bp->bitarray) + (bitpos >> 3); + /* scan bytes until 8-byte (64-bit) aligned */ + while (count >= 8 && (((unsigned long)pos) & 0x07)) { + if (*pos != 0) { + byte_found = 1; + break; + } + pos++; + count -= 8; + bitpos += 8; + } + + if (!byte_found) { + max_loop_count = count >> 6; /* 8-byte blocks */ + i = max_loop_count; + while (i) { + if (*((const __u64 *)pos) != 0) + break; + pos += 8; + i--; + } + count -= 64 * (max_loop_count - i); + bitpos += 64 * (max_loop_count - i); + + max_loop_count = count >> 3; + i = max_loop_count; + while (i) { + if (*pos != 0) { + byte_found = 1; + break; + } + pos++; + i--; + } + count -= 8 * (max_loop_count - i); + bitpos += 8 * (max_loop_count - i); + } + + /* Here either count < 8 or byte_found == 1. */ + while (count-- > 0) { + if (ext2fs_test_bit64(bitpos, bp->bitarray)) { + *out = bitpos + bitmap->start; + return 0; + } + bitpos++; + } + + return ENOENT; +} + struct ext2_bitmap_ops ext2fs_blkmap64_bitarray = { .type = EXT2FS_BMAP64_BITARRAY, .new_bmap = ba_new_bmap, @@ -413,5 +481,6 @@ struct ext2_bitmap_ops ext2fs_blkmap64_b .get_bmap_range = ba_get_bmap_range, .clear_bmap = ba_clear_bmap, .print_stats = ba_print_stats, - .find_first_zero = ba_find_first_zero + .find_first_zero = ba_find_first_zero, + .find_first_set = ba_find_first_set }; --- e2fsprogs-1.42.9.orig/lib/ext2fs/blkmap64_rb.c +++ e2fsprogs-1.42.9/lib/ext2fs/blkmap64_rb.c @@ -135,7 +135,7 @@ err_out: } #else #define check_tree(root, msg) do {} while (0) -#define print_tree(root, msg) do {} while (0) +#define print_tree(root) do {} while (0) #endif static void rb_get_new_extent(struct bmap_rb_extent **ext, __u64 start, @@ -569,11 +569,14 @@ static int rb_remove_extent(__u64 start, static int rb_mark_bmap(ext2fs_generic_bitmap bitmap, __u64 arg) { struct ext2fs_rb_private *bp; + int retval; bp = (struct ext2fs_rb_private *) bitmap->private; arg -= bitmap->start; - return rb_insert_extent(arg, 1, bp); + retval = rb_insert_extent(arg, 1, bp); + check_tree(&bp->root, __func__); + return retval; } static int rb_unmark_bmap(ext2fs_generic_bitmap bitmap, __u64 arg) @@ -610,6 +613,7 @@ static void rb_mark_bmap_extent(ext2fs_g arg -= bitmap->start; rb_insert_extent(arg, num, bp); + check_tree(&bp->root, __func__); } static void rb_unmark_bmap_extent(ext2fs_generic_bitmap bitmap, __u64 arg, @@ -714,11 +718,14 @@ static errcode_t rb_set_bmap_range(ext2f rb_insert_extent(start + first_set - bitmap->start, i - first_set, bp); + check_tree(&bp->root, __func__); first_set = -1; } - if (first_set != -1) + if (first_set != -1) { rb_insert_extent(start + first_set - bitmap->start, num - first_set, bp); + check_tree(&bp->root, __func__); + } return 0; } @@ -799,6 +806,94 @@ static void rb_clear_bmap(ext2fs_generic bp->rcursor = NULL; bp->rcursor_next = NULL; bp->wcursor = NULL; + check_tree(&bp->root, __func__); +} + +static errcode_t rb_find_first_zero(ext2fs_generic_bitmap bitmap, + __u64 start, __u64 end, __u64 *out) +{ + struct rb_node *parent = NULL, **n; + struct rb_node *node, *next; + struct ext2fs_rb_private *bp; + struct bmap_rb_extent *ext; + int retval = 1; + + bp = (struct ext2fs_rb_private *) bitmap->private; + n = &bp->root.rb_node; + start -= bitmap->start; + end -= bitmap->start; + + if (start > end) + return EINVAL; + + if (EXT2FS_RB_EMPTY_ROOT(&bp->root)) + return ENOENT; + + while (*n) { + parent = *n; + ext = node_to_extent(parent); + if (start < ext->start) { + n = &(*n)->rb_left; + } else if (start >= (ext->start + ext->count)) { + n = &(*n)->rb_right; + } else if (ext->start + ext->count <= end) { + *out = ext->start + ext->count + bitmap->start; + return 0; + } else + return ENOENT; + } + + *out = start + bitmap->start; + return 0; +} + +static errcode_t rb_find_first_set(ext2fs_generic_bitmap bitmap, + __u64 start, __u64 end, __u64 *out) +{ + struct rb_node *parent = NULL, **n; + struct rb_node *node, *next; + struct ext2fs_rb_private *bp; + struct bmap_rb_extent *ext; + int retval = 1; + + bp = (struct ext2fs_rb_private *) bitmap->private; + n = &bp->root.rb_node; + start -= bitmap->start; + end -= bitmap->start; + + if (start > end) + return EINVAL; + + if (EXT2FS_RB_EMPTY_ROOT(&bp->root)) + return ENOENT; + + while (*n) { + parent = *n; + ext = node_to_extent(parent); + if (start < ext->start) { + n = &(*n)->rb_left; + } else if (start >= (ext->start + ext->count)) { + n = &(*n)->rb_right; + } else { + /* The start bit is set */ + *out = start + bitmap->start; + return 0; + } + } + + node = parent; + ext = node_to_extent(node); + if (ext->start < start) { + node = ext2fs_rb_next(node); + if (node == NULL) + return ENOENT; + ext = node_to_extent(node); + } + if (ext->start <= end) { + *out = ext->start + bitmap->start; + return 0; + } + return ENOENT; } #ifdef BMAP_STATS @@ -819,7 +914,6 @@ static void rb_print_stats(ext2fs_generi bp = (struct ext2fs_rb_private *) bitmap->private; - node = ext2fs_rb_first(&bp->root); for (node = ext2fs_rb_first(&bp->root); node != NULL; node = ext2fs_rb_next(node)) { ext = node_to_extent(node); @@ -883,4 +977,6 @@ struct ext2_bitmap_ops ext2fs_blkmap64_r .get_bmap_range = rb_get_bmap_range, .clear_bmap = rb_clear_bmap, .print_stats = rb_print_stats, + .find_first_zero = rb_find_first_zero, + .find_first_set = rb_find_first_set, }; --- e2fsprogs-1.42.9.orig/lib/ext2fs/bmap64.h +++ e2fsprogs-1.42.9/lib/ext2fs/bmap64.h @@ -94,6 +94,10 @@ struct ext2_bitmap_ops { * May be NULL, in which case a generic function is used. */ errcode_t (*find_first_zero)(ext2fs_generic_bitmap bitmap, __u64 start, __u64 end, __u64 *out); + /* Find the first set bit between start and end, inclusive. + * May be NULL, in which case a generic function is used. */ + errcode_t (*find_first_set)(ext2fs_generic_bitmap bitmap, + __u64 start, __u64 end, __u64 *out); }; extern struct ext2_bitmap_ops ext2fs_blkmap64_bitarray; --- e2fsprogs-1.42.9.orig/lib/ext2fs/closefs.c +++ e2fsprogs-1.42.9/lib/ext2fs/closefs.c @@ -35,8 +35,16 @@ static int test_root(unsigned int a, uns int ext2fs_bg_has_super(ext2_filsys fs, dgrp_t group) { - if (!(fs->super->s_feature_ro_compat & - EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) || group <= 1) + if (group == 0) + return 1; + if (fs->super->s_feature_compat & EXT4_FEATURE_COMPAT_SPARSE_SUPER2) { + if (group == fs->super->s_backup_bgs[0] || + group == fs->super->s_backup_bgs[1]) + return 1; + return 0; + } + if ((group <= 1) || !(fs->super->s_feature_ro_compat & + EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) return 1; if (!(group & 1)) return 0; --- e2fsprogs-1.42.9.orig/lib/ext2fs/csum.c +++ e2fsprogs-1.42.9/lib/ext2fs/csum.c @@ -36,7 +36,7 @@ __u16 ext2fs_group_desc_csum(ext2_filsys group); size_t size = EXT2_DESC_SIZE(fs->super); size_t offset; - __u16 crc; + __u16 crc = 0; if (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) { size_t offset = offsetof(struct ext2_group_desc, bg_checksum); --- e2fsprogs-1.42.9.orig/lib/ext2fs/ext2_fs.h +++ e2fsprogs-1.42.9/lib/ext2fs/ext2_fs.h @@ -645,7 +645,8 @@ struct ext2_super_block { __u32 s_usr_quota_inum; /* inode number of user quota file */ __u32 s_grp_quota_inum; /* inode number of group quota file */ __u32 s_overhead_blocks; /* overhead blocks/clusters in fs */ - __u32 s_reserved[108]; /* Padding to the end of the block */ + __u32 s_backup_bgs[2]; /* If sparse_super2 enabled */ + __u32 s_reserved[106]; /* Padding to the end of the block */ __u32 s_checksum; /* crc32c(superblock) */ }; @@ -696,6 +697,7 @@ struct ext2_super_block { #define EXT2_FEATURE_COMPAT_LAZY_BG 0x0040 /* #define EXT2_FEATURE_COMPAT_EXCLUDE_INODE 0x0080 not used, legacy */ #define EXT2_FEATURE_COMPAT_EXCLUDE_BITMAP 0x0100 +#define EXT4_FEATURE_COMPAT_SPARSE_SUPER2 0x0200 #define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 --- e2fsprogs-1.42.9.orig/lib/ext2fs/ext2fs.h +++ e2fsprogs-1.42.9/lib/ext2fs/ext2fs.h @@ -550,7 +550,8 @@ typedef struct ext2_icount *ext2_icount_ EXT3_FEATURE_COMPAT_HAS_JOURNAL|\ EXT2_FEATURE_COMPAT_RESIZE_INODE|\ EXT2_FEATURE_COMPAT_DIR_INDEX|\ - EXT2_FEATURE_COMPAT_EXT_ATTR) + EXT2_FEATURE_COMPAT_EXT_ATTR|\ + EXT4_FEATURE_COMPAT_SPARSE_SUPER2) /* This #ifdef is temporary until compression is fully supported */ #ifdef ENABLE_COMPRESSION @@ -683,6 +684,8 @@ void ext2fs_inode_alloc_stats2(ext2_fils int inuse, int isdir); void ext2fs_block_alloc_stats(ext2_filsys fs, blk_t blk, int inuse); void ext2fs_block_alloc_stats2(ext2_filsys fs, blk64_t blk, int inuse); +void ext2fs_block_alloc_stats_range(ext2_filsys fs, blk64_t blk, + blk_t num, int inuse); /* alloc_tables.c */ extern errcode_t ext2fs_allocate_tables(ext2_filsys fs); @@ -1177,6 +1180,9 @@ extern errcode_t ext2fs_set_generic_bitm extern errcode_t ext2fs_find_first_zero_generic_bitmap(ext2fs_generic_bitmap bitmap, __u32 start, __u32 end, __u32 *out); +extern errcode_t ext2fs_find_first_set_generic_bitmap(ext2fs_generic_bitmap bitmap, + __u32 start, __u32 end, + __u32 *out); /* gen_bitmap64.c */ @@ -1365,6 +1371,8 @@ extern errcode_t ext2fs_add_journal_devi ext2_filsys journal_dev); extern errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t num_blocks, int flags); +extern errcode_t ext2fs_add_journal_inode2(ext2_filsys fs, blk_t num_blocks, + blk64_t goal, int flags); extern int ext2fs_default_journal_size(__u64 num_blocks); /* openfs.c */ @@ -1375,6 +1383,11 @@ extern errcode_t ext2fs_open2(const char int flags, int superblock, unsigned int block_size, io_manager manager, ext2_filsys *ret_fs); +/* + * The dgrp_t argument to these two functions is not actually a group number + * but a block number offset within a group table! Convert with the formula + * (group_number / groups_per_block). + */ extern blk64_t ext2fs_descriptor_block_loc2(ext2_filsys fs, blk64_t group_block, dgrp_t i); extern blk_t ext2fs_descriptor_block_loc(ext2_filsys fs, blk_t group_block, --- e2fsprogs-1.42.9.orig/lib/ext2fs/extent.c +++ e2fsprogs-1.42.9/lib/ext2fs/extent.c @@ -1092,8 +1092,10 @@ errcode_t ext2fs_extent_insert(ext2_exte ix++; path->left--; } - } else + } else { ix = EXT_FIRST_INDEX(eh); + path->left = -1; + } path->curr = ix; --- e2fsprogs-1.42.9.orig/lib/ext2fs/gen_bitmap.c +++ e2fsprogs-1.42.9/lib/ext2fs/gen_bitmap.c @@ -527,6 +527,28 @@ errcode_t ext2fs_find_first_zero_generic return ENOENT; } +errcode_t ext2fs_find_first_set_generic_bitmap(ext2fs_generic_bitmap bitmap, + __u32 start, __u32 end, + __u32 *out) +{ + blk_t b; + + if (start < bitmap->start || end > bitmap->end || start > end) { + ext2fs_warn_bitmap2(bitmap, EXT2FS_TEST_ERROR, start); + return EINVAL; + } + + while (start <= end) { + b = ext2fs_test_bit(start - bitmap->start, bitmap->bitmap); + if (b) { + *out = start; + return 0; + } + start++; + } + + return ENOENT; +} int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num) --- e2fsprogs-1.42.9.orig/lib/ext2fs/gen_bitmap64.c +++ e2fsprogs-1.42.9/lib/ext2fs/gen_bitmap64.c @@ -801,17 +801,14 @@ errcode_t ext2fs_find_first_zero_generic __u64 start, __u64 end, __u64 *out) { int b; + __u64 cstart, cend, cout; + errcode_t retval; if (!bitmap) return EINVAL; - if (EXT2FS_IS_64_BITMAP(bitmap) && bitmap->bitmap_ops->find_first_zero) - return bitmap->bitmap_ops->find_first_zero(bitmap, start, - end, out); - if (EXT2FS_IS_32_BITMAP(bitmap)) { blk_t blk = 0; - errcode_t retval; if (((start) & ~0xffffffffULL) || ((end) & ~0xffffffffULL)) { @@ -829,22 +826,83 @@ errcode_t ext2fs_find_first_zero_generic if (!EXT2FS_IS_64_BITMAP(bitmap)) return EINVAL; - start >>= bitmap->cluster_bits; - end >>= bitmap->cluster_bits; + cstart = start >> bitmap->cluster_bits; + cend = end >> bitmap->cluster_bits; - if (start < bitmap->start || end > bitmap->end || start > end) { + if (cstart < bitmap->start || cend > bitmap->end || start > end) { warn_bitmap(bitmap, EXT2FS_TEST_ERROR, start); return EINVAL; } - while (start <= end) { - b = bitmap->bitmap_ops->test_bmap(bitmap, start); - if (!b) { - *out = start << bitmap->cluster_bits; - return 0; + if (bitmap->bitmap_ops->find_first_zero) { + retval = bitmap->bitmap_ops->find_first_zero(bitmap, cstart, + cend, &cout); + if (retval) + return retval; + found: + cout <<= bitmap->cluster_bits; + *out = (cout >= start) ? cout : start; + return 0; + } + + for (cout = cstart; cout <= cend; cout++) + if (!bitmap->bitmap_ops->test_bmap(bitmap, cout)) + goto found; + + return ENOENT; +} + +errcode_t ext2fs_find_first_set_generic_bmap(ext2fs_generic_bitmap bitmap, + __u64 start, __u64 end, __u64 *out) +{ + int b; + __u64 cstart, cend, cout; + errcode_t retval; + + if (!bitmap) + return EINVAL; + + if (EXT2FS_IS_32_BITMAP(bitmap)) { + blk_t blk = 0; + + if (((start) & ~0xffffffffULL) || + ((end) & ~0xffffffffULL)) { + ext2fs_warn_bitmap2(bitmap, EXT2FS_TEST_ERROR, start); + return EINVAL; } - start++; + + retval = ext2fs_find_first_set_generic_bitmap(bitmap, start, + end, &blk); + if (retval == 0) + *out = blk; + return retval; } + if (!EXT2FS_IS_64_BITMAP(bitmap)) + return EINVAL; + + cstart = start >> bitmap->cluster_bits; + cend = end >> bitmap->cluster_bits; + + if (cstart < bitmap->start || cend > bitmap->end || start > end) { + warn_bitmap(bitmap, EXT2FS_TEST_ERROR, start); + return EINVAL; + } + + if (bitmap->bitmap_ops->find_first_set) { + retval = bitmap->bitmap_ops->find_first_set(bitmap, cstart, + cend, &cout); + if (retval) + return retval; + found: + cout <<= bitmap->cluster_bits; + *out = (cout >= start) ? cout : start; + return 0; + } + + for (cout = cstart; cout <= cend; cout++) + if (bitmap->bitmap_ops->test_bmap(bitmap, cout)) + goto found; + return ENOENT; } --- e2fsprogs-1.42.9.orig/lib/ext2fs/icount.c +++ e2fsprogs-1.42.9/lib/ext2fs/icount.c @@ -181,6 +181,7 @@ errcode_t ext2fs_create_icount_tdb(ext2_ errcode_t retval; char *fn, uuid[40]; ext2_ino_t num_inodes; + mode_t save_umask; int fd; retval = alloc_icount(fs, flags, &icount); @@ -192,10 +193,14 @@ errcode_t ext2fs_create_icount_tdb(ext2_ goto errout; uuid_unparse(fs->super->s_uuid, uuid); sprintf(fn, "%s/%s-icount-XXXXXX", tdb_dir, uuid); + icount->tdb_fn = fn; + save_umask = umask(077); fd = mkstemp(fn); - if (fd < 0) - return fd; - + if (fd < 0) { + retval = errno; + goto errout; + } + umask(save_umask); /* * This is an overestimate of the size that we will need; the * ideal value is the number of used inodes with a count @@ -206,18 +211,15 @@ errcode_t ext2fs_create_icount_tdb(ext2_ */ num_inodes = fs->super->s_inodes_count - fs->super->s_free_inodes_count; - icount->tdb_fn = fn; icount->tdb = tdb_open(fn, num_inodes, TDB_NOLOCK | TDB_NOSYNC, O_RDWR | O_CREAT | O_TRUNC, 0600); - if (icount->tdb) { - close(fd); - *ret = icount; - return 0; - } - - retval = errno; close(fd); - + if (icount->tdb == NULL) { + retval = errno; + goto errout; + } + *ret = icount; + return 0; errout: ext2fs_free_icount(icount); return(retval); --- e2fsprogs-1.42.9.orig/lib/ext2fs/initialize.c +++ e2fsprogs-1.42.9/lib/ext2fs/initialize.c @@ -173,6 +173,8 @@ errcode_t ext2fs_initialize(const char * set_field(s_raid_stripe_width, 0); /* default stripe width: 0 */ set_field(s_log_groups_per_flex, 0); set_field(s_flags, 0); + assign_field(s_backup_bgs[0]); + assign_field(s_backup_bgs[1]); if (super->s_feature_incompat & ~EXT2_LIB_FEATURE_INCOMPAT_SUPP) { retval = EXT2_ET_UNSUPP_FEATURE; goto cleanup; @@ -422,6 +424,21 @@ ipg_retry: * count. */ + /* Set up the locations of the backup superblocks */ + if (super->s_feature_compat & EXT4_FEATURE_COMPAT_SPARSE_SUPER2) { + if (super->s_backup_bgs[0] >= fs->group_desc_count) + super->s_backup_bgs[0] = fs->group_desc_count - 1; + if (super->s_backup_bgs[1] >= fs->group_desc_count) + super->s_backup_bgs[1] = fs->group_desc_count - 1; + if (super->s_backup_bgs[0] == super->s_backup_bgs[1]) + super->s_backup_bgs[1] = 0; + if (super->s_backup_bgs[0] > super->s_backup_bgs[1]) { + __u32 t = super->s_backup_bgs[0]; + super->s_backup_bgs[0] = super->s_backup_bgs[1]; + super->s_backup_bgs[1] = t; + } + } + retval = ext2fs_get_mem(strlen(fs->device_name) + 80, &buf); if (retval) goto cleanup; --- e2fsprogs-1.42.9.orig/lib/ext2fs/mkjournal.c +++ e2fsprogs-1.42.9/lib/ext2fs/mkjournal.c @@ -295,13 +295,43 @@ static int mkjournal_proc(ext2_filsys fs } /* + * Calculate the initial goal block to be roughly at the middle of the + * filesystem. Pick a group that has the largest number of free + * blocks. + */ +static blk64_t get_midpoint_journal_block(ext2_filsys fs) +{ + dgrp_t group, start, end, i, log_flex; + + group = ext2fs_group_of_blk2(fs, (ext2fs_blocks_count(fs->super) - + fs->super->s_first_data_block) / 2); + log_flex = 1 << fs->super->s_log_groups_per_flex; + if (fs->super->s_log_groups_per_flex && (group > log_flex)) { + group = group & ~(log_flex - 1); + while ((group < fs->group_desc_count) && + ext2fs_bg_free_blocks_count(fs, group) == 0) + group++; + if (group == fs->group_desc_count) + group = 0; + start = group; + } else + start = (group > 0) ? group-1 : group; + end = ((group+1) < fs->group_desc_count) ? group+1 : group; + group = start; + for (i = start + 1; i <= end; i++) + if (ext2fs_bg_free_blocks_count(fs, i) > + ext2fs_bg_free_blocks_count(fs, group)) + group = i; + return ext2fs_group_first_block2(fs, group); +} + +/* * This function creates a journal using direct I/O routines. */ static errcode_t write_journal_inode(ext2_filsys fs, ext2_ino_t journal_ino, - blk_t num_blocks, int flags) + blk_t num_blocks, blk64_t goal, int flags) { char *buf; - dgrp_t group, start, end, i, log_flex; errcode_t retval; struct ext2_inode inode; unsigned long long inode_size; @@ -328,6 +358,7 @@ static errcode_t write_journal_inode(ext es.err = 0; es.flags = flags; es.zero_count = 0; + es.goal = (goal != ~0ULL) ? goal : get_midpoint_journal_block(fs); if (fs->super->s_feature_incompat & EXT3_FEATURE_INCOMPAT_EXTENTS) { inode.i_flags |= EXT4_EXTENTS_FL; @@ -335,32 +366,6 @@ static errcode_t write_journal_inode(ext goto out2; } - /* - * Set the initial goal block to be roughly at the middle of - * the filesystem. Pick a group that has the largest number - * of free blocks. - */ - group = ext2fs_group_of_blk2(fs, (ext2fs_blocks_count(fs->super) - - fs->super->s_first_data_block) / 2); - log_flex = 1 << fs->super->s_log_groups_per_flex; - if (fs->super->s_log_groups_per_flex && (group > log_flex)) { - group = group & ~(log_flex - 1); - while ((group < fs->group_desc_count) && - ext2fs_bg_free_blocks_count(fs, group) == 0) - group++; - if (group == fs->group_desc_count) - group = 0; - start = group; - } else - start = (group > 0) ? group-1 : group; - end = ((group+1) < fs->group_desc_count) ? group+1 : group; - group = start; - for (i=start+1; i <= end; i++) - if (ext2fs_bg_free_blocks_count(fs, i) > - ext2fs_bg_free_blocks_count(fs, group)) - group = i; - - es.goal = ext2fs_group_first_block2(fs, group); retval = ext2fs_block_iterate3(fs, journal_ino, BLOCK_FLAG_APPEND, 0, mkjournal_proc, &es); if (es.err) { @@ -491,7 +496,8 @@ errcode_t ext2fs_add_journal_device(ext2 * POSIX routines if the filesystem is mounted, or using direct I/O * functions if it is not. */ -errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t num_blocks, int flags) +errcode_t ext2fs_add_journal_inode2(ext2_filsys fs, blk_t num_blocks, + blk64_t goal, int flags) { errcode_t retval; ext2_ino_t journal_ino; @@ -582,7 +588,7 @@ errcode_t ext2fs_add_journal_inode(ext2_ } journal_ino = EXT2_JOURNAL_INO; if ((retval = write_journal_inode(fs, journal_ino, - num_blocks, flags))) + num_blocks, goal, flags))) return retval; } @@ -600,6 +606,12 @@ errout: return retval; } +errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t num_blocks, int flags) +{ + return ext2fs_add_journal_inode2(fs, num_blocks, ~0ULL, flags); +} + + #ifdef DEBUG main(int argc, char **argv) { --- e2fsprogs-1.42.9.orig/lib/ext2fs/openfs.c +++ e2fsprogs-1.42.9/lib/ext2fs/openfs.c @@ -37,17 +37,24 @@ blk64_t ext2fs_descriptor_block_loc2(ext dgrp_t i) { int bg; - int has_super = 0; + int has_super = 0, group_zero_adjust = 0; blk64_t ret_blk; + /* + * On a bigalloc FS with 1K blocks, block 0 is reserved for non-ext4 + * stuff, so adjust for that if we're being asked for group 0. + */ + if (i == 0 && fs->blocksize == 1024 && EXT2FS_CLUSTER_RATIO(fs) > 1) + group_zero_adjust = 1; + if (!(fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) || (i < fs->super->s_first_meta_bg)) - return (group_block + i + 1); + return group_block + i + 1 + group_zero_adjust; bg = EXT2_DESC_PER_BLOCK(fs->super) * i; if (ext2fs_bg_has_super(fs, bg)) has_super = 1; - ret_blk = ext2fs_group_first_block2(fs, bg) + has_super; + ret_blk = ext2fs_group_first_block2(fs, bg); /* * If group_block is not the normal value, we're trying to use * the backup group descriptors and superblock --- so use the @@ -57,10 +64,21 @@ blk64_t ext2fs_descriptor_block_loc2(ext * have the infrastructure in place to do that. */ if (group_block != fs->super->s_first_data_block && - ((ret_blk + fs->super->s_blocks_per_group) < - ext2fs_blocks_count(fs->super))) + ((ret_blk + has_super + fs->super->s_blocks_per_group) < + ext2fs_blocks_count(fs->super))) { ret_blk += fs->super->s_blocks_per_group; - return ret_blk; + + /* + * If we're going to jump forward a block group, make sure + * that we adjust has_super to account for the next group's + * backup superblock (or lack thereof). + */ + if (ext2fs_bg_has_super(fs, bg + 1)) + has_super = 1; + else + has_super = 0; + } + return ret_blk + has_super + group_zero_adjust; } blk_t ext2fs_descriptor_block_loc(ext2_filsys fs, blk_t group_block, dgrp_t i) @@ -102,6 +120,7 @@ errcode_t ext2fs_open2(const char *name, unsigned int blocks_per_group, io_flags; blk64_t group_block, blk; char *dest, *cp; + int group_zero_adjust = 0; #ifdef WORDS_BIGENDIAN unsigned int groups_per_block; struct ext2_group_desc *gdp; @@ -342,8 +361,19 @@ errcode_t ext2fs_open2(const char *name, goto cleanup; if (!group_block) group_block = fs->super->s_first_data_block; + /* + * On a FS with a 1K blocksize, block 0 is reserved for bootloaders + * so we must increment block numbers to any group 0 items. + * + * However, we cannot touch group_block directly because in the meta_bg + * case, the ext2fs_descriptor_block_loc2() function will interpret + * group_block != s_first_data_block to mean that we want to access the + * backup group descriptors. This is not what we want if the caller + * set superblock == 0 (i.e. auto-detect the superblock), which is + * what's going on here. + */ if (group_block == 0 && fs->blocksize == 1024) - group_block = 1; /* Deal with 1024 blocksize && bigalloc */ + group_zero_adjust = 1; dest = (char *) fs->group_desc; #ifdef WORDS_BIGENDIAN groups_per_block = EXT2_DESC_PER_BLOCK(fs->super); @@ -353,7 +383,8 @@ errcode_t ext2fs_open2(const char *name, else first_meta_bg = fs->desc_blocks; if (first_meta_bg) { - retval = io_channel_read_blk(fs->io, group_block+1, + retval = io_channel_read_blk(fs->io, group_block + + group_zero_adjust + 1, first_meta_bg, dest); if (retval) goto cleanup; --- e2fsprogs-1.42.9.orig/lib/ext2fs/qcow2.c +++ e2fsprogs-1.42.9/lib/ext2fs/qcow2.c @@ -235,8 +235,10 @@ int qcow2_write_raw_image(int qcow2_fd, } /* Resize the output image to the filesystem size */ - if (ext2fs_llseek(raw_fd, img.image_size - 1, SEEK_SET) < 0) - return errno; + if (ext2fs_llseek(raw_fd, img.image_size - 1, SEEK_SET) < 0) { + ret = errno; + goto out; + } ((char *)copy_buf)[0] = 0; size = write(raw_fd, copy_buf, 1); --- e2fsprogs-1.42.9.orig/lib/ext2fs/res_gdt.c +++ e2fsprogs-1.42.9/lib/ext2fs/res_gdt.c @@ -31,6 +31,19 @@ static unsigned int list_backups(ext2_fi int mult = 3; unsigned int ret; + if (fs->super->s_feature_compat & EXT4_FEATURE_COMPAT_SPARSE_SUPER2) { + if (*min == 1) { + *min += 1; + if (fs->super->s_backup_bgs[0]) + return fs->super->s_backup_bgs[0]; + } + if (*min == 2) { + *min += 1; + if (fs->super->s_backup_bgs[1]) + return fs->super->s_backup_bgs[1]; + } + return fs->group_desc_count; + } if (!(fs->super->s_feature_ro_compat & EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) { ret = *min; --- e2fsprogs-1.42.9.orig/lib/ext2fs/rw_bitmaps.c +++ e2fsprogs-1.42.9/lib/ext2fs/rw_bitmaps.c @@ -145,6 +145,43 @@ errout: return retval; } +static errcode_t mark_uninit_bg_group_blocks(ext2_filsys fs) +{ + dgrp_t i; + blk64_t blk; + ext2fs_block_bitmap bmap = fs->block_map; + + for (i = 0; i < fs->group_desc_count; i++) { + if (!ext2fs_bg_flags_test(fs, i, EXT2_BG_BLOCK_UNINIT)) + continue; + + ext2fs_reserve_super_and_bgd(fs, i, bmap); + + /* + * Mark the blocks used for the inode table + */ + blk = ext2fs_inode_table_loc(fs, i); + if (blk) + ext2fs_mark_block_bitmap_range2(bmap, blk, + fs->inode_blocks_per_group); + + /* + * Mark block used for the block bitmap + */ + blk = ext2fs_block_bitmap_loc(fs, i); + if (blk) + ext2fs_mark_block_bitmap2(bmap, blk); + + /* + * Mark block used for the inode bitmap + */ + blk = ext2fs_inode_bitmap_loc(fs, i); + if (blk) + ext2fs_mark_block_bitmap2(bmap, blk); + } + return 0; +} + static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block) { dgrp_t i; @@ -292,6 +329,14 @@ static errcode_t read_bitmaps(ext2_filsy ino_itr += inode_nbytes << 3; } } + + /* Mark group blocks for any BLOCK_UNINIT groups */ + if (do_block) { + retval = mark_uninit_bg_group_blocks(fs); + if (retval) + goto cleanup; + } + success_cleanup: if (inode_bitmap) ext2fs_free_mem(&inode_bitmap); --- e2fsprogs-1.42.9.orig/lib/ext2fs/swapfs.c +++ e2fsprogs-1.42.9/lib/ext2fs/swapfs.c @@ -99,6 +99,8 @@ void ext2fs_swap_super(struct ext2_super } for (; i < 17; i++) sb->s_jnl_blocks[i] = ext2fs_swab32(sb->s_jnl_blocks[i]); + sb->s_backup_bgs[0] = ext2fs_swab32(sb->s_backup_bgs[0]); + sb->s_backup_bgs[1] = ext2fs_swab32(sb->s_backup_bgs[1]); } void ext2fs_swap_group_desc2(ext2_filsys fs, struct ext2_group_desc *gdp) --- e2fsprogs-1.42.9.orig/lib/ext2fs/tst_bitmaps.c +++ e2fsprogs-1.42.9/lib/ext2fs/tst_bitmaps.c @@ -436,6 +436,39 @@ void do_ffzb(int argc, char *argv[]) printf("First unmarked block is %llu\n", out); } +void do_ffsb(int argc, char *argv[]) +{ + unsigned int start, end; + int err; + errcode_t retval; + blk64_t out; + + if (check_fs_open(argv[0])) + return; + + if (argc != 3 && argc != 3) { + com_err(argv[0], 0, "Usage: ffsb "); + return; + } + + start = parse_ulong(argv[1], argv[0], "start", &err); + if (err) + return; + + end = parse_ulong(argv[2], argv[0], "end", &err); + if (err) + return; + + retval = ext2fs_find_first_set_block_bitmap2(test_fs->block_map, + start, end, &out); + if (retval) { + printf("ext2fs_find_first_set_block_bitmap2() returned %s\n", + error_message(retval)); + return; + } + printf("First marked block is %llu\n", out); +} + void do_zerob(int argc, char *argv[]) { @@ -559,6 +592,38 @@ void do_ffzi(int argc, char *argv[]) printf("First unmarked inode is %u\n", out); } +void do_ffsi(int argc, char *argv[]) +{ + unsigned int start, end; + int err; + errcode_t retval; + ext2_ino_t out; + + if (check_fs_open(argv[0])) + return; + + if (argc != 3 && argc != 3) { + com_err(argv[0], 0, "Usage: ffsi "); + return; + } + + start = parse_ulong(argv[1], argv[0], "start", &err); + if (err) + return; + + end = parse_ulong(argv[2], argv[0], "end", &err); + if (err) + return; + + retval = ext2fs_find_first_set_inode_bitmap2(test_fs->inode_map, + start, end, &out); + if (retval) { + printf("ext2fs_find_first_set_inode_bitmap2() returned %s\n", + error_message(retval)); + return; + } + printf("First marked inode is %u\n", out); +} void do_zeroi(int argc, char *argv[]) { --- e2fsprogs-1.42.9.orig/lib/ext2fs/tst_bitmaps_cmd.ct +++ e2fsprogs-1.42.9/lib/ext2fs/tst_bitmaps_cmd.ct @@ -24,6 +24,9 @@ request do_testb, "Test block", request do_ffzb, "Find first zero block", find_first_zero_block, ffzb; +request do_ffsb, "Find first set block", + find_first_set_block, ffsb; + request do_zerob, "Clear block bitmap", clear_block_bitmap, zerob; @@ -39,6 +42,9 @@ request do_testi, "Test inode", request do_ffzi, "Find first zero inode", find_first_zero_inode, ffzi; +request do_ffsi, "Find first set inode", + find_first_set_inode, ffsi; + request do_zeroi, "Clear inode bitmap", clear_inode_bitmap, zeroi; --- e2fsprogs-1.42.9.orig/lib/ext2fs/tst_bitmaps_cmds +++ e2fsprogs-1.42.9/lib/ext2fs/tst_bitmaps_cmds @@ -19,8 +19,17 @@ dump_bb ffzb 11 16 ffzb 12 16 ffzb 12 20 +ffsb 0 127 +ffsb 1 128 +ffsb 1 127 +ffsb 1 10 +ffsb 1 11 +ffsb 12 12 +ffsb 13 12 +ffsb 12 15 clearb 13 ffzb 12 20 +ffsb 13 18 setb 13 clearb 12 7 testb 12 7 @@ -42,8 +51,15 @@ dump_ib ffzi 1 6 ffzi 2 5 ffzi 2 6 +ffsi 0 31 +ffsi 1 33 +ffsi 1 32 +ffsi 2 32 +ffsi 6 32 cleari 4 ffzi 2 6 +ffsi 4 32 +ffsi 5 32 zeroi testi 5 seti 5 @@ -95,5 +111,38 @@ clearb 2 clearb 3 clearb 7 dump_bb +ffsb 14 127 +ffsb 15 127 +ffsb 36 127 +ffsb 32 127 +ffsb 52 127 +ffsb 53 127 +ffsb 46 127 +ffsb 45 127 +ffsb 41 127 +ffsb 20 127 +ffsb 1 127 +ffsb 2 127 +ffsb 3 127 +ffsb 4 127 +ffsb 5 127 +ffsb 6 127 +ffsb 7 127 +ffsb 8 127 +ffzb 1 127 +ffzb 2 127 +ffzb 3 127 +ffzb 4 127 +ffzb 5 127 +ffzb 6 127 +ffzb 7 127 +ffzb 8 127 +ffzb 45 127 +ffzb 46 127 +ffzb 47 127 +ffzb 48 127 +ffzb 49 127 +ffzb 50 127 +ffzb 51 127 quit --- e2fsprogs-1.42.9.orig/lib/ext2fs/tst_bitmaps_exp +++ e2fsprogs-1.42.9/lib/ext2fs/tst_bitmaps_exp @@ -43,10 +43,28 @@ tst_bitmaps: ffzb 12 16 ext2fs_find_first_zero_block_bitmap2() returned No such file or directory tst_bitmaps: ffzb 12 20 First unmarked block is 17 +tst_bitmaps: ffsb 0 127 +ext2fs_find_first_set_block_bitmap2() returned Invalid argument +tst_bitmaps: ffsb 1 128 +ext2fs_find_first_set_block_bitmap2() returned Invalid argument +tst_bitmaps: ffsb 1 127 +First marked block is 12 +tst_bitmaps: ffsb 1 10 +ext2fs_find_first_set_block_bitmap2() returned No such file or directory +tst_bitmaps: ffsb 1 11 +ext2fs_find_first_set_block_bitmap2() returned No such file or directory +tst_bitmaps: ffsb 12 12 +First marked block is 12 +tst_bitmaps: ffsb 13 12 +ext2fs_find_first_set_block_bitmap2() returned Invalid argument +tst_bitmaps: ffsb 12 15 +First marked block is 12 tst_bitmaps: clearb 13 Clearing block 13, was set before tst_bitmaps: ffzb 12 20 First unmarked block is 13 +tst_bitmaps: ffsb 13 18 +First marked block is 14 tst_bitmaps: setb 13 Setting block 13, was clear before tst_bitmaps: clearb 12 7 @@ -91,10 +109,24 @@ tst_bitmaps: ffzi 2 5 ext2fs_find_first_zero_inode_bitmap2() returned No such file or directory tst_bitmaps: ffzi 2 6 First unmarked inode is 6 +tst_bitmaps: ffsi 0 31 +ext2fs_find_first_set_inode_bitmap2() returned Invalid argument +tst_bitmaps: ffsi 1 33 +ext2fs_find_first_set_inode_bitmap2() returned Invalid argument +tst_bitmaps: ffsi 1 32 +First marked inode is 2 +tst_bitmaps: ffsi 2 32 +First marked inode is 2 +tst_bitmaps: ffsi 6 32 +ext2fs_find_first_set_inode_bitmap2() returned No such file or directory tst_bitmaps: cleari 4 Clearing inode 4, was set before tst_bitmaps: ffzi 2 6 First unmarked inode is 4 +tst_bitmaps: ffsi 4 32 +First marked inode is 5 +tst_bitmaps: ffsi 5 32 +First marked inode is 5 tst_bitmaps: zeroi Clearing inode bitmap. tst_bitmaps: testi 5 @@ -207,5 +239,71 @@ Clearing block 7, was set before tst_bitmaps: dump_bb block bitmap: b92a85e6c4680d000000000000000000 bits set: 25 +tst_bitmaps: ffsb 14 127 +First marked block is 14 +tst_bitmaps: ffsb 15 127 +First marked block is 17 +tst_bitmaps: ffsb 36 127 +First marked block is 39 +tst_bitmaps: ffsb 32 127 +First marked block is 32 +tst_bitmaps: ffsb 52 127 +First marked block is 52 +tst_bitmaps: ffsb 53 127 +ext2fs_find_first_set_block_bitmap2() returned No such file or directory +tst_bitmaps: ffsb 46 127 +First marked block is 46 +tst_bitmaps: ffsb 45 127 +First marked block is 46 +tst_bitmaps: ffsb 41 127 +First marked block is 44 +tst_bitmaps: ffsb 20 127 +First marked block is 24 +tst_bitmaps: ffsb 1 127 +First marked block is 1 +tst_bitmaps: ffsb 2 127 +First marked block is 4 +tst_bitmaps: ffsb 3 127 +First marked block is 4 +tst_bitmaps: ffsb 4 127 +First marked block is 4 +tst_bitmaps: ffsb 5 127 +First marked block is 5 +tst_bitmaps: ffsb 6 127 +First marked block is 6 +tst_bitmaps: ffsb 7 127 +First marked block is 8 +tst_bitmaps: ffsb 8 127 +First marked block is 8 +tst_bitmaps: ffzb 1 127 +First unmarked block is 2 +tst_bitmaps: ffzb 2 127 +First unmarked block is 2 +tst_bitmaps: ffzb 3 127 +First unmarked block is 3 +tst_bitmaps: ffzb 4 127 +First unmarked block is 7 +tst_bitmaps: ffzb 5 127 +First unmarked block is 7 +tst_bitmaps: ffzb 6 127 +First unmarked block is 7 +tst_bitmaps: ffzb 7 127 +First unmarked block is 7 +tst_bitmaps: ffzb 8 127 +First unmarked block is 9 +tst_bitmaps: ffzb 45 127 +First unmarked block is 45 +tst_bitmaps: ffzb 46 127 +First unmarked block is 48 +tst_bitmaps: ffzb 47 127 +First unmarked block is 48 +tst_bitmaps: ffzb 48 127 +First unmarked block is 48 +tst_bitmaps: ffzb 49 127 +First unmarked block is 50 +tst_bitmaps: ffzb 50 127 +First unmarked block is 50 +tst_bitmaps: ffzb 51 127 +First unmarked block is 53 tst_bitmaps: quit tst_bitmaps: --- e2fsprogs-1.42.9.orig/lib/ext2fs/tst_super_size.c +++ e2fsprogs-1.42.9/lib/ext2fs/tst_super_size.c @@ -135,7 +135,8 @@ int main(int argc, char **argv) check_field(s_usr_quota_inum, 4); check_field(s_grp_quota_inum, 4); check_field(s_overhead_blocks, 4); - check_field(s_reserved, 108 * 4); + check_field(s_backup_bgs, 8); + check_field(s_reserved, 106 * 4); check_field(s_checksum, 4); do_field("Superblock end", 0, 0, cur_offset, 1024); #endif --- e2fsprogs-1.42.9.orig/lib/ext2fs/unix_io.c +++ e2fsprogs-1.42.9/lib/ext2fs/unix_io.c @@ -931,10 +931,10 @@ static errcode_t unix_discard(io_channel if (channel->flags & CHANNEL_FLAGS_BLOCK_DEVICE) { #ifdef BLKDISCARD - __uint64_t range[2]; + __u64 range[2]; - range[0] = (__uint64_t)(block) * channel->block_size; - range[1] = (__uint64_t)(count) * channel->block_size; + range[0] = (__u64)(block) * channel->block_size; + range[1] = (__u64)(count) * channel->block_size; ret = ioctl(data->dev, BLKDISCARD, &range); #else --- e2fsprogs-1.42.9.orig/lib/quota/Makefile.in +++ e2fsprogs-1.42.9/lib/quota/Makefile.in @@ -135,27 +135,29 @@ mkquota.o: $(srcdir)/mkquota.c $(top_bui $(srcdir)/quotaio_tree.h $(srcdir)/quotaio_v2.h $(srcdir)/mkquota.h \ $(top_srcdir)/lib/../e2fsck/dict.h $(srcdir)/common.h quotaio.o: $(srcdir)/quotaio.c $(top_builddir)/lib/config.h \ - $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h $(srcdir)/quotaio.h \ - $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ - $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ - $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ - $(top_builddir)/lib/ext2fs/ext2_err.h \ + $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h \ + $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/quotaio.h \ + $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ + $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \ + $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ $(srcdir)/dqblk_v2.h $(srcdir)/quotaio_tree.h quotaio_tree.o: $(srcdir)/quotaio_tree.c $(top_builddir)/lib/config.h \ - $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h $(srcdir)/quotaio_tree.h \ + $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h \ + $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/quotaio_tree.h \ $(srcdir)/quotaio.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ - $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ - $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \ - $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ + $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ + $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ + $(top_builddir)/lib/ext2fs/ext2_err.h \ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ $(srcdir)/dqblk_v2.h quotaio_v2.o: $(srcdir)/quotaio_v2.c $(top_builddir)/lib/config.h \ - $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h $(srcdir)/quotaio_v2.h \ + $(top_builddir)/lib/dirpaths.h $(srcdir)/common.h \ + $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/quotaio_v2.h \ $(srcdir)/quotaio.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ - $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ - $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \ - $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ + $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ + $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ + $(top_builddir)/lib/ext2fs/ext2_err.h \ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ $(srcdir)/dqblk_v2.h $(srcdir)/quotaio_tree.h dict.o: $(srcdir)/../../e2fsck/dict.c $(top_builddir)/lib/config.h \ --- e2fsprogs-1.42.9.orig/lib/quota/common.h +++ e2fsprogs-1.42.9/lib/quota/common.h @@ -7,6 +7,13 @@ #ifndef __QUOTA_COMMON_H__ #define __QUOTA_COMMON_H__ +#if EXT2_FLAT_INCLUDES +#include "e2_types.h" +#else +#include +#endif /* EXT2_FLAT_INCLUDES */ + + #ifndef __attribute__ # if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ # define __attribute__(x) --- e2fsprogs-1.42.9.orig/lib/quota/mkquota.c +++ e2fsprogs-1.42.9/lib/quota/mkquota.c @@ -89,8 +89,13 @@ void quota_set_sb_inum(ext2_filsys fs, e errcode_t quota_remove_inode(ext2_filsys fs, int qtype) { ext2_ino_t qf_ino; + errcode_t retval; - ext2fs_read_bitmaps(fs); + retval = ext2fs_read_bitmaps(fs); + if (retval) { + log_err("Couldn't read bitmaps: %s", error_message(retval)); + return retval; + } qf_ino = (qtype == USRQUOTA) ? fs->super->s_usr_quota_inum : fs->super->s_grp_quota_inum; quota_set_sb_inum(fs, 0, qtype); @@ -100,7 +105,11 @@ errcode_t quota_remove_inode(ext2_filsys ext2fs_mark_super_dirty(fs); fs->flags &= ~EXT2_FLAG_SUPER_ONLY; - ext2fs_write_bitmaps(fs); + retval = ext2fs_write_bitmaps(fs); + if (retval) { + log_err("Couldn't write bitmaps: %s", error_message(retval)); + return retval; + } return 0; } @@ -133,11 +142,16 @@ errcode_t quota_write_inode(quota_ctx_t fs = qctx->fs; retval = ext2fs_get_mem(sizeof(struct quota_handle), &h); if (retval) { - log_err("Unable to allocate quota handle"); + log_err("Unable to allocate quota handle: %s", + error_message(retval)); goto out; } - ext2fs_read_bitmaps(fs); + retval = ext2fs_read_bitmaps(fs); + if (retval) { + log_err("Couldn't read bitmaps: %s", error_message(retval)); + goto out; + } for (i = 0; i < MAXQUOTAS; i++) { if ((qtype != -1) && (i != qtype)) @@ -171,7 +185,11 @@ errcode_t quota_write_inode(quota_ctx_t fs->flags &= ~EXT2_FLAG_SUPER_ONLY; } - ext2fs_write_bitmaps(fs); + retval = ext2fs_write_bitmaps(fs); + if (retval) { + log_err("Couldn't write bitmaps: %s", error_message(retval)); + goto out; + } out: if (h) ext2fs_free_mem(&h); --- e2fsprogs-1.42.9.orig/lib/quota/quotaio.c +++ e2fsprogs-1.42.9/lib/quota/quotaio.c @@ -30,8 +30,8 @@ static const char * const basenames[] = /* Header in all newer quotafiles */ struct disk_dqheader { - u_int32_t dqh_magic; - u_int32_t dqh_version; + __u32 dqh_magic; + __u32 dqh_version; } __attribute__ ((packed)); /** --- e2fsprogs-1.42.9.orig/lib/quota/quotaio_tree.c +++ e2fsprogs-1.42.9/lib/quota/quotaio_tree.c @@ -59,7 +59,7 @@ static inline void mark_quotafile_info_d } /* Read given block */ -static void read_blk(struct quota_handle *h, uint blk, dqbuf_t buf) +static void read_blk(struct quota_handle *h, unsigned int blk, dqbuf_t buf) { int err; @@ -72,7 +72,7 @@ static void read_blk(struct quota_handle } /* Write block */ -static int write_blk(struct quota_handle *h, uint blk, dqbuf_t buf) +static int write_blk(struct quota_handle *h, unsigned int blk, dqbuf_t buf) { int err; @@ -117,7 +117,8 @@ static int get_free_dqblk(struct quota_h } /* Put given block to free list */ -static void put_free_dqblk(struct quota_handle *h, dqbuf_t buf, uint blk) +static void put_free_dqblk(struct quota_handle *h, dqbuf_t buf, + unsigned int blk) { struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree; @@ -131,11 +132,12 @@ static void put_free_dqblk(struct quota_ } /* Remove given block from the list of blocks with free entries */ -static void remove_free_dqentry(struct quota_handle *h, dqbuf_t buf, uint blk) +static void remove_free_dqentry(struct quota_handle *h, dqbuf_t buf, + unsigned int blk) { dqbuf_t tmpbuf = getdqbuf(); struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; - uint nextblk = ext2fs_le32_to_cpu(dh->dqdh_next_free), prevblk = + unsigned int nextblk = ext2fs_le32_to_cpu(dh->dqdh_next_free), prevblk = ext2fs_le32_to_cpu(dh->dqdh_prev_free); @@ -164,7 +166,8 @@ static void remove_free_dqentry(struct q } /* Insert given block to the beginning of list with free entries */ -static void insert_free_dqentry(struct quota_handle *h, dqbuf_t buf, uint blk) +static void insert_free_dqentry(struct quota_handle *h, dqbuf_t buf, + unsigned int blk) { dqbuf_t tmpbuf = getdqbuf(); struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; @@ -188,8 +191,8 @@ static void insert_free_dqentry(struct q } /* Find space for dquot */ -static uint find_free_dqentry(struct quota_handle *h, struct dquot *dquot, - int *err) +static unsigned int find_free_dqentry(struct quota_handle *h, + struct dquot *dquot, int *err) { int blk, i; struct qt_disk_dqdbheader *dh; @@ -247,12 +250,12 @@ static uint find_free_dqentry(struct quo /* Insert reference to structure into the trie */ static int do_insert_tree(struct quota_handle *h, struct dquot *dquot, - uint * treeblk, int depth) + unsigned int * treeblk, int depth) { dqbuf_t buf; int newson = 0, newact = 0; - u_int32_t *ref; - uint newblk; + __u32 *ref; + unsigned int newblk; int ret = 0; log_debug("inserting in tree: treeblk=%u, depth=%d", *treeblk, depth); @@ -271,7 +274,7 @@ static int do_insert_tree(struct quota_h read_blk(h, *treeblk, buf); } - ref = (u_int32_t *) buf; + ref = (__u32 *) buf; newblk = ext2fs_le32_to_cpu(ref[get_index(dquot->dq_id, depth)]); if (!newblk) newson = 1; @@ -301,11 +304,11 @@ out_buf: /* Wrapper for inserting quota structure into tree */ static void dq_insert_tree(struct quota_handle *h, struct dquot *dquot) { - uint tmp = QT_TREEOFF; + unsigned int tmp = QT_TREEOFF; if (do_insert_tree(h, dquot, &tmp, 0) < 0) log_err("Cannot write quota (id %u): %s", - (uint) dquot->dq_id, strerror(errno)); + (unsigned int) dquot->dq_id, strerror(errno)); } /* Write dquot to file */ @@ -323,9 +326,10 @@ void qtree_write_dquot(struct dquot *dqu if (ret) { errno = ENOMEM; log_err("Quota write failed (id %u): %s", - (uint)dquot->dq_id, strerror(errno)); + (unsigned int)dquot->dq_id, strerror(errno)); return; } + memset(ddquot, 0, info->dqi_entry_size); if (!dquot->dq_dqb.u.v2_mdqb.dqb_off) dq_insert_tree(dquot->dq_h, dquot); @@ -340,13 +344,14 @@ void qtree_write_dquot(struct dquot *dqu if (ret > 0) errno = ENOSPC; log_err("Quota write failed (id %u): %s", - (uint)dquot->dq_id, strerror(errno)); + (unsigned int)dquot->dq_id, strerror(errno)); } ext2fs_free_mem(&ddquot); } /* Free dquot entry in data block */ -static void free_dqentry(struct quota_handle *h, struct dquot *dquot, uint blk) +static void free_dqentry(struct quota_handle *h, struct dquot *dquot, + unsigned int blk) { struct qt_disk_dqdbheader *dh; struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree; @@ -358,7 +363,7 @@ static void free_dqentry(struct quota_ha if (dquot->dq_dqb.u.v2_mdqb.dqb_off >> QT_BLKSIZE_BITS != blk) log_err("Quota structure has offset to other block (%u) " "than it should (%u).", blk, - (uint) (dquot->dq_dqb.u.v2_mdqb.dqb_off >> + (unsigned int) (dquot->dq_dqb.u.v2_mdqb.dqb_off >> QT_BLKSIZE_BITS)); read_blk(h, blk, buf); @@ -388,11 +393,11 @@ static void free_dqentry(struct quota_ha /* Remove reference to dquot from tree */ static void remove_tree(struct quota_handle *h, struct dquot *dquot, - uint * blk, int depth) + unsigned int * blk, int depth) { dqbuf_t buf = getdqbuf(); - uint newblk; - u_int32_t *ref = (u_int32_t *) buf; + unsigned int newblk; + __u32 *ref = (__u32 *) buf; if (!buf) return; @@ -428,7 +433,7 @@ static void remove_tree(struct quota_han /* Delete dquot from tree */ void qtree_delete_dquot(struct dquot *dquot) { - uint tmp = QT_TREEOFF; + unsigned int tmp = QT_TREEOFF; if (!dquot->dq_dqb.u.v2_mdqb.dqb_off) /* Even not allocated? */ return; @@ -437,7 +442,7 @@ void qtree_delete_dquot(struct dquot *dq /* Find entry in block */ static ext2_loff_t find_block_dqentry(struct quota_handle *h, - struct dquot *dquot, uint blk) + struct dquot *dquot, unsigned int blk) { struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree; dqbuf_t buf = getdqbuf(); @@ -464,11 +469,11 @@ static ext2_loff_t find_block_dqentry(st /* Find entry for given id in the tree */ static ext2_loff_t find_tree_dqentry(struct quota_handle *h, struct dquot *dquot, - uint blk, int depth) + unsigned int blk, int depth) { dqbuf_t buf = getdqbuf(); ext2_loff_t ret = 0; - u_int32_t *ref = (u_int32_t *) buf; + __u32 *ref = (__u32 *) buf; if (!buf) return -ENOMEM; @@ -540,7 +545,7 @@ struct dquot *qtree_read_dquot(struct qu #define set_bit(bmp, ind) ((bmp)[(ind) >> 3] |= (1 << ((ind) & 7))) #define get_bit(bmp, ind) ((bmp)[(ind) >> 3] & (1 << ((ind) & 7))) -static int report_block(struct dquot *dquot, uint blk, char *bitmap, +static int report_block(struct dquot *dquot, unsigned int blk, char *bitmap, int (*process_dquot) (struct dquot *, void *), void *data) { @@ -574,7 +579,7 @@ static int report_block(struct dquot *dq return entries; } -static void check_reference(struct quota_handle *h, uint blk) +static void check_reference(struct quota_handle *h, unsigned int blk) { if (blk >= h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks) log_err("Illegal reference (%u >= %u) in %s quota file. " @@ -585,13 +590,14 @@ static void check_reference(struct quota type2name(h->qh_type)); } -static int report_tree(struct dquot *dquot, uint blk, int depth, char *bitmap, +static int report_tree(struct dquot *dquot, unsigned int blk, int depth, + char *bitmap, int (*process_dquot) (struct dquot *, void *), void *data) { int entries = 0, i; dqbuf_t buf = getdqbuf(); - u_int32_t *ref = (u_int32_t *) buf; + __u32 *ref = (__u32 *) buf; if (!buf) return 0; @@ -620,9 +626,9 @@ static int report_tree(struct dquot *dqu return entries; } -static uint find_set_bits(char *bmp, int blocks) +static unsigned int find_set_bits(char *bmp, int blocks) { - uint i, used = 0; + unsigned int i, used = 0; for (i = 0; i < blocks; i++) if (get_bit(bmp, i)) --- e2fsprogs-1.42.9.orig/lib/quota/quotaio_tree.h +++ e2fsprogs-1.42.9/lib/quota/quotaio_tree.h @@ -7,7 +7,7 @@ #include -typedef u_int32_t qid_t; /* Type in which we store ids in memory */ +typedef __u32 qid_t; /* Type in which we store ids in memory */ #define QT_TREEOFF 1 /* Offset of tree in file in blocks */ #define QT_TREEDEPTH 4 /* Depth of quota tree */ @@ -20,13 +20,13 @@ typedef u_int32_t qid_t; /* Type * so there will be space for exactly 21 quota-entries in a block */ struct qt_disk_dqdbheader { - u_int32_t dqdh_next_free; /* Number of next block with free + __u32 dqdh_next_free; /* Number of next block with free * entry */ - u_int32_t dqdh_prev_free; /* Number of previous block with free + __u32 dqdh_prev_free; /* Number of previous block with free * entry */ - u_int16_t dqdh_entries; /* Number of valid entries in block */ - u_int16_t dqdh_pad1; - u_int32_t dqdh_pad2; + __u16 dqdh_entries; /* Number of valid entries in block */ + __u16 dqdh_pad1; + __u32 dqdh_pad2; } __attribute__ ((packed)); struct dquot; --- e2fsprogs-1.42.9.orig/lib/quota/quotaio_v2.h +++ e2fsprogs-1.42.9/lib/quota/quotaio_v2.h @@ -16,8 +16,8 @@ #define V2_VERSION 1 struct v2_disk_dqheader { - u_int32_t dqh_magic; /* Magic number identifying file */ - u_int32_t dqh_version; /* File version */ + __u32 dqh_magic; /* Magic number identifying file */ + __u32 dqh_version; /* File version */ } __attribute__ ((packed)); /* Flags for version specific files */ @@ -25,30 +25,30 @@ struct v2_disk_dqheader { /* Header with type and version specific information */ struct v2_disk_dqinfo { - u_int32_t dqi_bgrace; /* Time before block soft limit becomes + __u32 dqi_bgrace; /* Time before block soft limit becomes * hard limit */ - u_int32_t dqi_igrace; /* Time before inode soft limit becomes + __u32 dqi_igrace; /* Time before inode soft limit becomes * hard limit */ - u_int32_t dqi_flags; /* Flags for quotafile (DQF_*) */ - u_int32_t dqi_blocks; /* Number of blocks in file */ - u_int32_t dqi_free_blk; /* Number of first free block in the list */ - u_int32_t dqi_free_entry; /* Number of block with at least one + __u32 dqi_flags; /* Flags for quotafile (DQF_*) */ + __u32 dqi_blocks; /* Number of blocks in file */ + __u32 dqi_free_blk; /* Number of first free block in the list */ + __u32 dqi_free_entry; /* Number of block with at least one * free entry */ } __attribute__ ((packed)); struct v2r1_disk_dqblk { - u_int32_t dqb_id; /* id this quota applies to */ - u_int32_t dqb_pad; - u_int64_t dqb_ihardlimit; /* absolute limit on allocated inodes */ - u_int64_t dqb_isoftlimit; /* preferred inode limit */ - u_int64_t dqb_curinodes; /* current # allocated inodes */ - u_int64_t dqb_bhardlimit; /* absolute limit on disk space + __u32 dqb_id; /* id this quota applies to */ + __u32 dqb_pad; + __u64 dqb_ihardlimit; /* absolute limit on allocated inodes */ + __u64 dqb_isoftlimit; /* preferred inode limit */ + __u64 dqb_curinodes; /* current # allocated inodes */ + __u64 dqb_bhardlimit; /* absolute limit on disk space * (in QUOTABLOCK_SIZE) */ - u_int64_t dqb_bsoftlimit; /* preferred limit on disk space + __u64 dqb_bsoftlimit; /* preferred limit on disk space * (in QUOTABLOCK_SIZE) */ - u_int64_t dqb_curspace; /* current space occupied (in bytes) */ - u_int64_t dqb_btime; /* time limit for excessive disk use */ - u_int64_t dqb_itime; /* time limit for excessive inode use */ + __u64 dqb_curspace; /* current space occupied (in bytes) */ + __u64 dqb_btime; /* time limit for excessive disk use */ + __u64 dqb_itime; /* time limit for excessive inode use */ } __attribute__ ((packed)); #endif --- e2fsprogs-1.42.9.orig/lib/ss/Makefile.in +++ e2fsprogs-1.42.9/lib/ss/Makefile.in @@ -162,7 +162,7 @@ uninstall:: test_ss: test_ss.o test_cmd.o $(DEPLIBSS) $(DEPLIBCOM_ERR) $(E) " LD $@" $(Q) $(CC) -o $@ test_ss.o test_cmd.o $(ALL_CFLAGS) \ - $(LIBSS) $(LIBCOM_ERR) + $(LIBSS) $(LIBCOM_ERR) $(SYSLIBS) check:: all test_ss $(E) " RUN TEST test_ss" --- e2fsprogs-1.42.9.orig/lib/ss/invocation.c +++ e2fsprogs-1.42.9/lib/ss/invocation.c @@ -45,7 +45,8 @@ int ss_create_invocation(const char *sub table = (ss_data **) realloc((char *)table, ((unsigned)sci_idx+2)*size); if (table == NULL) { - *code_ptr = errno; + *code_ptr = ENOMEM; + free(new_table); return 0; } table[sci_idx+1] = (ss_data *) NULL; --- e2fsprogs-1.42.9.orig/lib/ss/list_rqs.c +++ e2fsprogs-1.42.9/lib/ss/list_rqs.c @@ -18,20 +18,15 @@ typedef void sigret_t; -static char const twentyfive_spaces[26] = - " "; -static char const NL[2] = "\n"; - void ss_list_requests(int argc __SS_ATTR((unused)), const char * const *argv __SS_ATTR((unused)), int sci_idx, void *infop __SS_ATTR((unused))) { ss_request_entry *entry; char const * const *name; - int spacing; + int i, spacing; ss_request_table **table; - char buffer[BUFSIZ]; FILE *output; int fd; sigset_t omask, igmask; @@ -60,27 +55,24 @@ void ss_list_requests(int argc __SS_ATTR entry = (*table)->requests; for (; entry->command_names; entry++) { spacing = -2; - buffer[0] = '\0'; if (entry->flags & SS_OPT_DONT_LIST) continue; for (name = entry->command_names; *name; name++) { int len = strlen(*name); - strncat(buffer, *name, len); + fputs(*name, output); spacing += len + 2; if (name[1]) { - strcat(buffer, ", "); + fputs(", ", output); } } if (spacing > 23) { - strcat(buffer, NL); - fputs(buffer, output); + fputc('\n', output); spacing = 0; - buffer[0] = '\0'; } - strncat(buffer, twentyfive_spaces, 25-spacing); - strcat(buffer, entry->info_string); - strcat(buffer, NL); - fputs(buffer, output); + for (i = 0; i < 25 - spacing; i++) + fputc(' ', output); + fputs(entry->info_string, output); + fputc('\n', output); } } fclose(output); --- e2fsprogs-1.42.9.orig/lib/ss/parse.c +++ e2fsprogs-1.42.9/lib/ss/parse.c @@ -45,7 +45,7 @@ enum parse_mode { WHITESPACE, TOKEN, QUO char **ss_parse(int sci_idx, register char *line_ptr, int *argc_ptr) { - register char **argv, *cp; + register char **argv, **new_argv, *cp; register int argc; register enum parse_mode parse_mode; @@ -78,7 +78,13 @@ char **ss_parse(int sci_idx, register ch /* go to quoted-string mode */ parse_mode = QUOTED_STRING; cp = line_ptr++; - argv = NEW_ARGV (argv, argc); + new_argv = NEW_ARGV (argv, argc); + if (new_argv == NULL) { + free(argv); + *argc_ptr = 0; + return NULL; + } + argv = new_argv; argv[argc++] = cp; argv[argc] = NULL; } @@ -86,11 +92,13 @@ char **ss_parse(int sci_idx, register ch /* random-token mode */ parse_mode = TOKEN; cp = line_ptr; - argv = NEW_ARGV (argv, argc); - if (argv == NULL) { - *argc_ptr = errno; - return argv; + new_argv = NEW_ARGV (argv, argc); + if (new_argv == NULL) { + free(argv); + *argc_ptr = 0; + return NULL; } + argv = new_argv; argv[argc++] = line_ptr; argv[argc] = NULL; } --- e2fsprogs-1.42.9.orig/lib/uuid/gen_uuid.c +++ e2fsprogs-1.42.9/lib/uuid/gen_uuid.c @@ -326,10 +326,12 @@ static int get_clock(uint32_t *clock_hig state_fd = open("/var/lib/libuuid/clock.txt", O_RDWR|O_CREAT, 0660); (void) umask(save_umask); - state_f = fdopen(state_fd, "r+"); - if (!state_f) { - close(state_fd); - state_fd = -1; + if (state_fd >= 0) { + state_f = fdopen(state_fd, "r+"); + if (!state_f) { + close(state_fd); + state_fd = -1; + } } } fl.l_type = F_WRLCK; @@ -343,7 +345,6 @@ static int get_clock(uint32_t *clock_hig if ((errno == EAGAIN) || (errno == EINTR)) continue; fclose(state_f); - close(state_fd); state_fd = -1; break; } @@ -412,7 +413,10 @@ try_again: } rewind(state_f); fl.l_type = F_UNLCK; - fcntl(state_fd, F_SETLK, &fl); + if (fcntl(state_fd, F_SETLK, &fl) < 0) { + fclose(state_f); + state_fd = -1; + } } *clock_high = clock_reg >> 32; --- e2fsprogs-1.42.9.orig/lib/uuid/tst_uuid.c +++ e2fsprogs-1.42.9/lib/uuid/tst_uuid.c @@ -154,7 +154,10 @@ main(int argc ATTR((unused)) , char **ar printf("UUID time comparison succeeded.\n"); } - uuid_parse(str, tst); + if (uuid_parse(str, tst) < 0) { + printf("UUID parse failed\n"); + failed++; + } if (!uuid_compare(buf, tst)) { printf("UUID parse and compare succeeded.\n"); } else { --- e2fsprogs-1.42.9.orig/misc/Makefile.in +++ e2fsprogs-1.42.9/misc/Makefile.in @@ -42,7 +42,8 @@ LPROGS= @E2INITRD_PROG@ TUNE2FS_OBJS= tune2fs.o util.o MKLPF_OBJS= mklost+found.o -MKE2FS_OBJS= mke2fs.o util.o profile.o prof_err.o default_profile.o +MKE2FS_OBJS= mke2fs.o util.o profile.o prof_err.o default_profile.o \ + mk_hugefiles.o CHATTR_OBJS= chattr.o LSATTR_OBJS= lsattr.o UUIDGEN_OBJS= uuidgen.o @@ -76,7 +77,7 @@ PROFILED_E2FREEFRAG_OBJS= profiled/e2fre PROFILED_E2UNDO_OBJS= profiled/e2undo.o PROFILED_E4DEFRAG_OBJS= profiled/e4defrag.o -SRCS= $(srcdir)/tune2fs.c $(srcdir)/mklost+found.c $(srcdir)/mke2fs.c \ +SRCS= $(srcdir)/tune2fs.c $(srcdir)/mklost+found.c $(srcdir)/mke2fs.c $(srcdir)/mk_hugefiles.c \ $(srcdir)/chattr.c $(srcdir)/lsattr.c $(srcdir)/dumpe2fs.c \ $(srcdir)/badblocks.c $(srcdir)/fsck.c $(srcdir)/util.c \ $(srcdir)/uuidgen.c $(srcdir)/blkid.c $(srcdir)/logsave.c \ @@ -84,12 +85,12 @@ SRCS= $(srcdir)/tune2fs.c $(srcdir)/mklo $(srcdir)/ismounted.c $(srcdir)/../e2fsck/profile.c \ $(srcdir)/e2undo.c $(srcdir)/e2freefrag.c -LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) +LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) DEPLIBS= $(LIBEXT2FS) $(DEPLIBCOM_ERR) PROFILED_LIBS= $(PROFILED_LIBEXT2FS) $(PROFILED_LIBCOM_ERR) PROFILED_DEPLIBS= $(PROFILED_LIBEXT2FS) $(DEPPROFILED_LIBCOM_ERR) -STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) +STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) LIBS_E2P= $(LIBE2P) $(LIBCOM_ERR) @@ -142,7 +143,7 @@ profile.o: findsuper: findsuper.o $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o $(LIBS) + $(Q) $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o $(LIBS) $(SYSLIBS) partinfo: partinfo.o $(E) " LD $@" @@ -151,20 +152,20 @@ partinfo: partinfo.o e2initrd_helper: e2initrd_helper.o $(DEPLIBS) $(DEPLIBBLKID) $(LIBEXT2FS) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -o e2initrd_helper e2initrd_helper.o $(LIBS) \ - $(LIBBLKID) $(LIBEXT2FS) $(LIBINTL) + $(LIBBLKID) $(LIBEXT2FS) $(LIBINTL) $(SYSLIBS) tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBBLKID) \ $(DEPLIBUUID) $(DEPLIBQUOTA) $(LIBEXT2FS) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -o tune2fs $(TUNE2FS_OBJS) $(LIBS) \ $(LIBBLKID) $(LIBUUID) $(LIBQUOTA) $(LIBEXT2FS) $(LIBS_E2P) \ - $(LIBINTL) + $(LIBINTL) $(SYSLIBS) tune2fs.static: $(TUNE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBBLKID) $(E) " LD $@" $(Q) $(CC) $(LDFLAGS_STATIC) -o tune2fs.static $(TUNE2FS_OBJS) \ $(STATIC_LIBS) $(STATIC_LIBBLKID) $(STATIC_LIBUUID) \ - $(STATIC_LIBQUOTA) $(STATIC_LIBE2P) $(LIBINTL) + $(STATIC_LIBQUOTA) $(STATIC_LIBE2P) $(LIBINTL) $(SYSLIBS) tune2fs.profiled: $(TUNE2FS_OBJS) $(PROFILED_DEPLIBS) \ $(PROFILED_E2P) $(DEPPROFILED_LIBBLKID) $(DEPPROFILED_LIBUUID) \ @@ -173,55 +174,58 @@ tune2fs.profiled: $(TUNE2FS_OBJS) $(PROF $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o tune2fs.profiled \ $(PROFILED_TUNE2FS_OBJS) $(PROFILED_LIBBLKID) \ $(PROFILED_LIBUUID) $(PROFILED_LIBQUOTA) $(PROFILED_LIBE2P) \ - $(LIBINTL) $(PROFILED_LIBS) + $(LIBINTL) $(PROFILED_LIBS) $(SYSLIBS) blkid: $(BLKID_OBJS) $(DEPLIBBLKID) $(LIBEXT2FS) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -o blkid $(BLKID_OBJS) $(LIBBLKID) $(LIBINTL) \ - $(LIBEXT2FS) + $(LIBEXT2FS) $(SYSLIBS) blkid.static: $(BLKID_OBJS) $(STATIC_DEPLIBS) $(DEPSTATIC_LIBBLKID) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -o blkid.static $(BLKID_OBJS) $(STATIC_LIBS) \ - $(STATIC_LIBBLKID) $(LIBINTL) + $(STATIC_LIBBLKID) $(LIBINTL) $(SYSLIBS) blkid.profiled: $(BLKID_OBJS) $(DEPPROFILED_LIBBLKID) \ $(PROFILED_LIBEXT2FS) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o blkid.profiled $(PROFILED_BLKID_OBJS) \ - $(PROFILED_LIBBLKID) $(LIBINTL) $(PROFILED_LIBEXT2FS) + $(PROFILED_LIBBLKID) $(LIBINTL) $(PROFILED_LIBEXT2FS) $(SYSLIBS) e2image: $(E2IMAGE_OBJS) $(DEPLIBS) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o e2image $(E2IMAGE_OBJS) $(LIBS) $(LIBINTL) + $(Q) $(CC) $(ALL_LDFLAGS) -o e2image $(E2IMAGE_OBJS) $(LIBS) \ + $(LIBINTL) $(SYSLIBS) e2image.profiled: $(E2IMAGE_OBJS) $(PROFILED_DEPLIBS) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2image.profiled \ - $(PROFILED_E2IMAGE_OBJS) $(PROFILED_LIBS) $(LIBINTL) + $(PROFILED_E2IMAGE_OBJS) $(PROFILED_LIBS) $(LIBINTL) $(SYSLIBS) e2undo: $(E2UNDO_OBJS) $(DEPLIBS) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o e2undo $(E2UNDO_OBJS) $(LIBS) $(LIBINTL) + $(Q) $(CC) $(ALL_LDFLAGS) -o e2undo $(E2UNDO_OBJS) $(LIBS) \ + $(LIBINTL) $(SYSLIBS) e2undo.profiled: $(E2UNDO_OBJS) $(PROFILED_DEPLIBS) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2undo.profiled \ - $(PROFILED_E2UNDO_OBJS) $(PROFILED_LIBS) $(LIBINTL) + $(PROFILED_E2UNDO_OBJS) $(PROFILED_LIBS) $(LIBINTL) $(SYSLIBS) e4defrag: $(E4DEFRAG_OBJS) $(DEPLIBS) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o e4defrag $(E4DEFRAG_OBJS) $(LIBS) + $(Q) $(CC) $(ALL_LDFLAGS) -o e4defrag $(E4DEFRAG_OBJS) $(LIBS) \ + $(SYSLIBS) e4defrag.profiled: $(E4DEFRAG_OBJS) $(PROFILED_DEPLIBS) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e4defrag.profiled \ - $(PROFILED_E4DEFRAG_OBJS) $(PROFILED_LIBS) + $(PROFILED_E4DEFRAG_OBJS) $(PROFILED_LIBS) $(SYSLIBS) base_device: base_device.c $(E) " LD $@" $(Q) $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(srcdir)/base_device.c \ - -DDEBUG -o base_device + -DDEBUG -o base_device $(SYSLIBS) check:: base_device ./base_device < $(srcdir)/base_device.tst > base_device.out @@ -229,20 +233,22 @@ check:: base_device mklost+found: $(MKLPF_OBJS) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS) $(LIBINTL) + $(Q) $(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS) \ + $(LIBINTL) $(SYSLIBS) mke2fs: $(MKE2FS_OBJS) $(DEPLIBS) $(LIBE2P) $(DEPLIBBLKID) $(DEPLIBUUID) \ $(DEPLIBQUOTA) $(LIBEXT2FS) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -o mke2fs $(MKE2FS_OBJS) $(LIBS) $(LIBBLKID) \ - $(LIBUUID) $(LIBQUOTA) $(LIBEXT2FS) $(LIBE2P) $(LIBINTL) + $(LIBUUID) $(LIBQUOTA) $(LIBEXT2FS) $(LIBE2P) $(LIBINTL) \ + $(SYSLIBS) mke2fs.static: $(MKE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBUUID) \ $(DEPSTATIC_LIBQUOTA) $(DEPSTATIC_LIBBLKID) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -static -o mke2fs.static $(MKE2FS_OBJS) \ $(STATIC_LIBQUOTA) $(STATIC_LIBS) $(STATIC_LIBE2P) \ - $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL) + $(STATIC_LIBBLKID) $(STATIC_LIBUUID) $(LIBINTL) $(SYSLIBS) mke2fs.profiled: $(MKE2FS_OBJS) $(PROFILED_DEPLIBS) \ $(PROFILED_LIBE2P) $(PROFILED_DEPLIBBLKID) $(PROFILED_DEPLIBUUID) \ @@ -250,85 +256,95 @@ mke2fs.profiled: $(MKE2FS_OBJS) $(PROFIL $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o mke2fs.profiled \ $(PROFILED_MKE2FS_OBJS) $(PROFILED_LIBBLKID) \ - $(PROFILED_LIBUUID) $(PROFILED_LIBQUOTA) $(PROFILED_LIBE2P) $(LIBINTL) \ - $(PROFILED_LIBS) + $(PROFILED_LIBUUID) $(PROFILED_LIBQUOTA) $(PROFILED_LIBE2P) \ + $(LIBINTL) $(PROFILED_LIBS) $(SYSLIBS) chattr: $(CHATTR_OBJS) $(DEPLIBS_E2P) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P) $(LIBINTL) + $(Q) $(CC) $(ALL_LDFLAGS) -o chattr $(CHATTR_OBJS) $(LIBS_E2P) \ + $(LIBINTL) $(SYSLIBS) lsattr: $(LSATTR_OBJS) $(DEPLIBS_E2P) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P) $(LIBINTL) + $(Q) $(CC) $(ALL_LDFLAGS) -o lsattr $(LSATTR_OBJS) $(LIBS_E2P) \ + $(LIBINTL) $(SYSLIBS) uuidgen: $(UUIDGEN_OBJS) $(DEPLIBUUID) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o uuidgen $(UUIDGEN_OBJS) $(LIBUUID) $(LIBINTL) + $(Q) $(CC) $(ALL_LDFLAGS) -o uuidgen $(UUIDGEN_OBJS) $(LIBUUID) \ + $(LIBINTL) $(SYSLIBS) uuidgen.profiled: $(UUIDGEN_OBJS) $(PROFILED_DEPLIBUUID) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o uuidgen.profiled \ - $(PROFILED_UUIDGEN_OBJS) $(PROFILED_LIBUUID) $(LIBINTL) + $(PROFILED_UUIDGEN_OBJS) $(PROFILED_LIBUUID) $(LIBINTL) \ + $(SYSLIBS) uuidd: $(UUIDD_OBJS) $(DEPLIBUUID) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o uuidd $(UUIDD_OBJS) $(LIBUUID) $(LIBINTL) + $(Q) $(CC) $(ALL_LDFLAGS) -o uuidd $(UUIDD_OBJS) $(LIBUUID) \ + $(LIBINTL) $(SYSLIBS) uuidd.profiled: $(UUIDD_OBJS) $(PROFILED_DEPLIBUUID) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o uuidd.profiled $(PROFILED_UUIDD_OBJS) \ - $(PROFILED_LIBUUID) $(LIBINTL) + $(PROFILED_LIBUUID) $(LIBINTL) $(SYSLIBS) dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBUUID) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS) \ - $(LIBS_E2P) $(LIBUUID) $(LIBINTL) + $(LIBS_E2P) $(LIBUUID) $(LIBINTL) $(SYSLIBS) dumpe2fs.profiled: $(DUMPE2FS_OBJS) $(PROFILED_DEPLIBS) \ $(PROFILED_LIBE2P) $(PROFILED_DEPLIBUUID) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o dumpe2fs.profiled \ $(PROFILED_DUMPE2FS_OBJS) $(PROFILED_LIBS) \ - $(PROFILED_LIBE2P) $(PROFILED_LIBUUID) $(LIBINTL) + $(PROFILED_LIBE2P) $(PROFILED_LIBUUID) $(LIBINTL) $(SYSLIBS) fsck: $(FSCK_OBJS) $(DEPLIBBLKID) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBBLKID) $(LIBINTL) + $(Q) $(CC) $(ALL_LDFLAGS) -o fsck $(FSCK_OBJS) $(LIBBLKID) \ + $(LIBINTL) $(SYSLIBS) fsck.profiled: $(FSCK_OBJS) $(PROFILED_DEPLIBBLKID) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o fsck.profiled $(PROFILED_FSCK_OBJS) \ - $(PROFILED_LIBBLKID) $(LIBINTL) + $(PROFILED_LIBBLKID) $(LIBINTL) $(SYSLIBS) badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS) $(LIBINTL) + $(Q) $(CC) $(ALL_LDFLAGS) -o badblocks $(BADBLOCKS_OBJS) $(LIBS) \ + $(LIBINTL) $(SYSLIBS) badblocks.profiled: $(BADBLOCKS_OBJS) $(PROFILED_DEPLIBS) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o badblocks.profiled \ - $(PROFILED_BADBLOCKS_OBJS) $(PROFILED_LIBS) $(LIBINTL) + $(PROFILED_BADBLOCKS_OBJS) $(PROFILED_LIBS) $(LIBINTL) \ + $(SYSLIBS) logsave: logsave.o $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o logsave logsave.o + $(Q) $(CC) $(ALL_LDFLAGS) -o logsave logsave.o $(SYSLIBS) logsave.profiled: logsave.o $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o logsave.profiled profiled/logsave.o + $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o logsave.profiled \ + profiled/logsave.o $(SYSLIBS) e2freefrag: $(E2FREEFRAG_OBJS) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o e2freefrag $(E2FREEFRAG_OBJS) $(LIBS) + $(Q) $(CC) $(ALL_LDFLAGS) -o e2freefrag $(E2FREEFRAG_OBJS) \ + $(LIBS) $(SYSLIBS) e2freefrag.profiled: $(E2FREEFRAG_OBJS) $(PROFILED_DEPLIBS) $(E) " LD $@" $(Q) $(CC) $(ALL_LDFLAGS) -g -pg -o e2freefrag.profiled \ - $(PROFILED_E2FREEFRAG_OBJS) $(PROFILED_LIBS) + $(PROFILED_E2FREEFRAG_OBJS) $(PROFILED_LIBS) $(SYSLIBS) filefrag: $(FILEFRAG_OBJS) $(E) " LD $@" - $(Q) $(CC) $(ALL_LDFLAGS) -o filefrag $(FILEFRAG_OBJS) + $(Q) $(CC) $(ALL_LDFLAGS) -o filefrag $(FILEFRAG_OBJS) $(SYSLIBS) filefrag.profiled: $(FILEFRAG_OBJS) $(E) " LD $@" @@ -338,7 +354,7 @@ filefrag.profiled: $(FILEFRAG_OBJS) tst_ismounted: $(srcdir)/ismounted.c $(STATIC_LIBEXT2FS) $(DEPLIBCOM_ERR) $(E) " LD $@" $(CC) -o tst_ismounted $(srcdir)/ismounted.c -DDEBUG $(ALL_CFLAGS) \ - $(LIBCOM_ERR) + $(LIBCOM_ERR) $(SYSLIBS) tune2fs.8: $(DEP_SUBSTITUTE) $(srcdir)/tune2fs.8.in $(E) " SUBST $@" @@ -632,7 +648,18 @@ mke2fs.o: $(srcdir)/mke2fs.c $(top_build $(srcdir)/util.h profile.h prof_err.h $(top_srcdir)/version.h \ $(srcdir)/nls-enable.h $(top_srcdir)/lib/quota/mkquota.h \ $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \ - $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h + $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h \ + $(srcdir)/mke2fs.h +mk_hugefiles.o: $(srcdir)/mk_hugefiles.c $(top_builddir)/lib/config.h \ + $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ + $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fsP.h \ + $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ + $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \ + $(top_builddir)/lib/ext2fs/ext2_err.h \ + $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \ + $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2fs.h \ + $(srcdir)/util.h profile.h prof_err.h $(srcdir)/nls-enable.h \ + $(srcdir)/mke2fs.h chattr.o: $(srcdir)/chattr.c $(top_builddir)/lib/config.h \ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \ --- e2fsprogs-1.42.9.orig/misc/badblocks.c +++ e2fsprogs-1.42.9/misc/badblocks.c @@ -300,7 +300,8 @@ static void set_o_direct(int dev, unsign flag = fcntl(dev, F_GETFL); if (flag > 0) { flag = (flag & ~O_DIRECT) | new_flag; - fcntl(dev, F_SETFL, flag); + if (fcntl(dev, F_SETFL, flag) < 0) + perror("set_o_direct"); } current_O_DIRECT = new_flag; } --- e2fsprogs-1.42.9.orig/misc/blkid.c +++ e2fsprogs-1.42.9/misc/blkid.c @@ -38,7 +38,7 @@ extern int optind; #include "ext2fs/ext2fs.h" #include "blkid/blkid.h" -const char *progname = "blkid"; +static const char *progname = "blkid"; static void print_version(FILE *out) { @@ -100,19 +100,27 @@ static int get_terminal_width(void) struct winsize w_win; #endif const char *cp; + int width = 80; #ifdef TIOCGSIZE - if (ioctl (0, TIOCGSIZE, &t_win) == 0) - return (t_win.ts_cols); + if (ioctl (0, TIOCGSIZE, &t_win) == 0) { + width = t_win.ts_cols; + goto got_it; + } #endif #ifdef TIOCGWINSZ - if (ioctl (0, TIOCGWINSZ, &w_win) == 0) - return (w_win.ws_col); + if (ioctl (0, TIOCGWINSZ, &w_win) == 0) { + width = w_win.ws_col; + goto got_it; + } #endif cp = getenv("COLUMNS"); if (cp) - return strtol(cp, NULL, 10); - return 80; + width = atoi(cp); +got_it: + if (width > 4096) + return 4096; /* sanity check */ + return width; } static int pretty_print_word(const char *str, int max_len, @@ -127,9 +135,9 @@ static int pretty_print_word(const char len = 0; } else if (len > max_len) ret = len - max_len; - do + do { fputc(' ', stdout); - while (len++ < max_len); + } while (len++ < max_len); return ret; } @@ -142,20 +150,21 @@ static void pretty_print_line(const char static int term_width = -1; int len, w; - if (term_width < 0) + if (term_width < 0) { term_width = get_terminal_width(); - if (term_width > 80) { - term_width -= 80; - w = term_width / 10; - if (w > 8) - w = 8; - term_width -= 2*w; - label_len += w; - fs_type_len += w; - w = term_width/2; - device_len += w; - mtpt_len +=w; + if (term_width > 80) { + term_width -= 80; + w = term_width / 10; + if (w > 8) + w = 8; + term_width -= 2*w; + label_len += w; + fs_type_len += w; + w = term_width/2; + device_len += w; + mtpt_len +=w; + } } len = pretty_print_word(device, device_len, 0, 1); @@ -284,10 +293,7 @@ int main(int argc, char **argv) while ((c = getopt (argc, argv, "c:f:ghlLo:s:t:w:v")) != EOF) switch (c) { case 'c': - if (optarg && !*optarg) - read = NULL; - else - read = optarg; + read = optarg; if (!write) write = read; break; @@ -340,13 +346,11 @@ int main(int argc, char **argv) version = 1; break; case 'w': - if (optarg && !*optarg) - write = NULL; - else - write = optarg; + write = optarg; break; case 'h': err = 0; + /* fallthrough */ default: usage(err); } --- e2fsprogs-1.42.9.orig/misc/e2image.c +++ e2fsprogs-1.42.9/misc/e2image.c @@ -174,7 +174,7 @@ static void generic_write(int fd, void * printf(_("Writing block %llu\n"), (unsigned long long) block); if (fd != 1) seek_relative(fd, blocksize); - return; + goto free_and_return; } count = write(fd, buf, blocksize); if (count != blocksize) { @@ -191,6 +191,7 @@ static void generic_write(int fd, void * exit(1); } +free_and_return: if (free_buf) ext2fs_free_mem(&buf); } @@ -633,7 +634,7 @@ more_blocks: bscount = print_progress(total_written, meta_blocks_count); duration = time(NULL) - start_time; - if (duration > 5) { + if (duration > 5 && total_written) { time_t est = (duration * meta_blocks_count / total_written) - duration; char buff[30]; @@ -703,14 +704,15 @@ more_blocks: if (show_progress) { time_t duration = time(NULL) - start_time; char buff[30]; - while (bscount--) - fputc('\b', stderr); + fputc('\r', stderr); strftime(buff, 30, "%T", gmtime(&duration)); - fprintf(stderr, _("\b\b\b\b\b\b\b\bCopied %llu / %llu " - "blocks (%d%%) in %s at %.2f MB/s \n"), - total_written, meta_blocks_count, - calc_percent(total_written, meta_blocks_count), buff, - calc_rate(total_written, fs->blocksize, duration)); + fprintf(stderr, _("Copied %llu / %llu blocks (%d%%) in %s "), + total_written, meta_blocks_count, + calc_percent(total_written, meta_blocks_count), buff); + if (duration) + fprintf(stderr, _("at %.2f MB/s"), + calc_rate(total_written, fs->blocksize, duration)); + fputs(" \n", stderr); } #ifdef HAVE_FTRUNCATE64 if (sparse) { @@ -1410,7 +1412,7 @@ static void install_image(char *device, retval = ext2fs_image_inode_read(fs, fd, 0); if (retval) { - com_err(image_fn, 0, "while restoring the image table"); + com_err(image_fn, 0, _("while restoring the image table")); exit(1); } @@ -1597,7 +1599,7 @@ skip_device: } if (fd != 1) { if (fstat(fd, &st)) { - com_err(program_name, 0, "Can not stat output\n"); + com_err(program_name, 0, _("Can not stat output\n")); exit(1); } if (S_ISBLK(st.st_mode)) --- e2fsprogs-1.42.9.orig/misc/e4defrag.c +++ e2fsprogs-1.42.9/misc/e4defrag.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -183,29 +182,21 @@ static ext4_fsblk_t files_block_count; static struct frag_statistic_ino frag_rank[SHOW_FRAG_FILES]; -/* Local definitions of some syscalls glibc may not yet have */ - -#ifndef HAVE_POSIX_FADVISE -#warning Using locally defined posix_fadvise interface. - -#ifndef __NR_fadvise64_64 -#error Your kernel headers dont define __NR_fadvise64_64 +/* + * We prefer posix_fadvise64 when available, as it allows 64bit offset on + * 32bit systems + */ +#if defined(HAVE_POSIX_FADVISE64) +#define posix_fadvise posix_fadvise64 +#elif defined(HAVE_FADVISE64) +#define posix_fadvise fadvise64 +#elif !defined(HAVE_POSIX_FADVISE) +#error posix_fadvise not available! #endif /* - * fadvise() - Give advice about file access. - * - * @fd: defrag target file's descriptor. - * @offset: file offset. - * @len: area length. - * @advise: process flag. + * Local definitions of some syscalls glibc may not yet have */ -static int posix_fadvise(int fd, loff_t offset, size_t len, int advise) -{ - return syscall(__NR_fadvise64_64, fd, offset, len, advise); -} -#endif /* ! HAVE_FADVISE64_64 */ - #ifndef HAVE_SYNC_FILE_RANGE #warning Using locally defined sync_file_range interface. --- e2fsprogs-1.42.9.orig/misc/ext4.5.in +++ e2fsprogs-1.42.9/misc/ext4.5.in @@ -109,7 +109,6 @@ supported by ext2, ext3, and ext4. This feature enables the storage file type information in directory entries. This feature is supported by ext2, ext3, and ext4. .TP -.TP .B flex_bg .br This ext4 feature allows the per-block group metadata (allocation @@ -172,6 +171,17 @@ kernels from mounting file systems that .\" .br .\" .B Future feature, available in e2fsprogs 1.43-WIP .TP +.B sparse_super2 +.br +This feature indicates that there will only at most two backup +superblock and block group descriptors. The block groups used to store +the backup superblock and blockgroup descriptors are stored in the +superblock, but typically, one will be located at the beginning of block +group #1, and one in the last block group in the file system. This is +feature is essentially a more extreme version of sparse_super and is +designed to allow the a much larger percentage of the disk to have +contiguous blocks available for data files. +.TP .B meta_bg .br This ext4 feature allows file systems to be resized on-line without explicitly --- /dev/null +++ e2fsprogs-1.42.9/misc/mk_hugefiles.c @@ -0,0 +1,429 @@ +/* + * mk_hugefiles.c -- create huge files + */ + +#define _XOPEN_SOURCE 600 /* for inclusion of PATH_MAX in Solaris */ + +#include "config.h" +#include +#include +#include +#include +#include +#include +#ifdef __linux__ +#include +#endif +#ifdef HAVE_GETOPT_H +#include +#else +extern char *optarg; +extern int optind; +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_ERRNO_H +#include +#endif +#include +#include +#include +#include +#include +#include + +#include "ext2fs/ext2_fs.h" +#include "ext2fs/ext2fsP.h" +#include "et/com_err.h" +#include "uuid/uuid.h" +#include "e2p/e2p.h" +#include "ext2fs/ext2fs.h" +#include "util.h" +#include "profile.h" +#include "prof_err.h" +#include "nls-enable.h" +#include "mke2fs.h" + +static int uid; +static int gid; +static blk64_t num_blocks; +static blk64_t num_slack; +static unsigned long num_files; +static blk64_t goal; +static char *fn_prefix; +static int idx_digits; +static char *fn_buf; +static char *fn_numbuf; +int zero_hugefile = 1; + +static errcode_t create_directory(ext2_filsys fs, char *dir, + ext2_ino_t *ret_ino) + +{ + struct ext2_inode inode; + ext2_ino_t ino = EXT2_ROOT_INO; + ext2_ino_t newdir; + errcode_t retval = 0; + char *fn, *cp, *next; + + fn = malloc(strlen(dir) + 1); + if (fn == NULL) + return ENOMEM; + + strcpy(fn, dir); + cp = fn; + while(1) { + next = strchr(cp, '/'); + if (next) + *next++ = 0; + if (*cp) { + retval = ext2fs_new_inode(fs, ino, LINUX_S_IFDIR, + NULL, &newdir); + if (retval) + goto errout; + + retval = ext2fs_mkdir(fs, ino, newdir, cp); + if (retval) + goto errout; + + ino = newdir; + retval = ext2fs_read_inode(fs, ino, &inode); + if (retval) + goto errout; + + inode.i_uid = uid & 0xFFFF; + ext2fs_set_i_uid_high(inode, (uid >> 16) & 0xffff); + inode.i_gid = gid & 0xFFFF; + ext2fs_set_i_gid_high(inode, (gid >> 16) & 0xffff); + retval = ext2fs_write_inode(fs, ino, &inode); + if (retval) + goto errout; + } + if (next == NULL || *next == '\0') + break; + cp = next; + } +errout: + free(fn); + if (retval == 0) + *ret_ino = ino; + return retval; +} + +static errcode_t mk_hugefile(ext2_filsys fs, blk64_t num, + ext2_ino_t dir, unsigned long idx, ext2_ino_t *ino) + +{ + errcode_t retval; + blk64_t lblk, bend; + __u64 size; + blk64_t left; + blk64_t count = 0; + struct ext2_inode inode; + ext2_extent_handle_t handle; + + retval = ext2fs_new_inode(fs, 0, LINUX_S_IFREG, NULL, ino); + if (retval) + return retval; + + memset(&inode, 0, sizeof(struct ext2_inode)); + inode.i_mode = LINUX_S_IFREG | (0666 & ~fs->umask); + inode.i_links_count = 1; + inode.i_uid = uid & 0xFFFF; + ext2fs_set_i_uid_high(inode, (uid >> 16) & 0xffff); + inode.i_gid = gid & 0xFFFF; + ext2fs_set_i_gid_high(inode, (gid >> 16) & 0xffff); + + retval = ext2fs_write_new_inode(fs, *ino, &inode); + if (retval) + return retval; + + ext2fs_inode_alloc_stats2(fs, *ino, +1, 0); + + retval = ext2fs_extent_open2(fs, *ino, &inode, &handle); + if (retval) + return retval; + + lblk = 0; + left = num ? num : 1; + while (left) { + blk64_t pblk, end; + blk64_t n = left; + + retval = ext2fs_find_first_zero_block_bitmap2(fs->block_map, + goal, ext2fs_blocks_count(fs->super) - 1, &end); + if (retval) + goto errout; + goal = end; + + retval = ext2fs_find_first_set_block_bitmap2(fs->block_map, goal, + ext2fs_blocks_count(fs->super) - 1, &bend); + if (retval == ENOENT) { + bend = ext2fs_blocks_count(fs->super); + if (num == 0) + left = 0; + } + if (!num || bend - goal < left) + n = bend - goal; + pblk = goal; + if (num) + left -= n; + goal += n; + count += n; + ext2fs_block_alloc_stats_range(fs, pblk, n, +1); + + if (zero_hugefile) { + blk64_t ret_blk; + retval = ext2fs_zero_blocks2(fs, pblk, n, + &ret_blk, NULL); + + if (retval) + com_err(program_name, retval, + _("while zeroing block %llu " + "for hugefile"), ret_blk); + } + + while (n) { + blk64_t l = n; + struct ext2fs_extent newextent; + + if (l > EXT_INIT_MAX_LEN) + l = EXT_INIT_MAX_LEN; + + newextent.e_len = l; + newextent.e_pblk = pblk; + newextent.e_lblk = lblk; + newextent.e_flags = 0; + + retval = ext2fs_extent_insert(handle, + EXT2_EXTENT_INSERT_AFTER, &newextent); + if (retval) + return retval; + pblk += l; + lblk += l; + n -= l; + } + } + + retval = ext2fs_read_inode(fs, *ino, &inode); + if (retval) + goto errout; + + retval = ext2fs_iblk_add_blocks(fs, &inode, + count / EXT2FS_CLUSTER_RATIO(fs)); + if (retval) + goto errout; + size = (__u64) count * fs->blocksize; + inode.i_size = size & 0xffffffff; + inode.i_size_high = (size >> 32); + + retval = ext2fs_write_new_inode(fs, *ino, &inode); + if (retval) + goto errout; + + if (idx_digits) + sprintf(fn_numbuf, "%0*lu", idx_digits, idx); + else if (num_files > 1) + sprintf(fn_numbuf, "%lu", idx); + +retry: + retval = ext2fs_link(fs, dir, fn_buf, *ino, EXT2_FT_REG_FILE); + if (retval == EXT2_ET_DIR_NO_SPACE) { + retval = ext2fs_expand_dir(fs, dir); + if (retval) + goto errout; + goto retry; + } + + if (retval) + goto errout; + +errout: + if (handle) + ext2fs_extent_free(handle); + + return retval; +} + +static blk64_t calc_overhead(ext2_filsys fs, blk64_t num) +{ + blk64_t e_blocks, e_blocks2, e_blocks3, e_blocks4; + int extents_per_block; + int extents = (num + EXT_INIT_MAX_LEN - 1) / EXT_INIT_MAX_LEN; + + if (extents <= 4) + return 0; + + /* + * This calculation is due to the fact that we are inefficient + * in how handle extent splits when appending to the end of + * the extent tree. Sigh. We should fix this so that we can + * actually store 340 extents per 4k block, instead of only 170. + */ + extents_per_block = ((fs->blocksize - + sizeof(struct ext3_extent_header)) / + sizeof(struct ext3_extent)); + extents_per_block = (extents_per_block/ 2) - 1; + + e_blocks = (extents + extents_per_block - 1) / extents_per_block; + e_blocks2 = (e_blocks + extents_per_block - 1) / extents_per_block; + e_blocks3 = (e_blocks2 + extents_per_block - 1) / extents_per_block; + e_blocks4 = (e_blocks3 + extents_per_block - 1) / extents_per_block; + return e_blocks + e_blocks2 + e_blocks3 + e_blocks4; +} + +/* + * Find the place where we should start allocating blocks for the huge + * files. Leave free blocks at the beginning of the file + * system for things like metadata blocks. + */ +static blk64_t get_start_block(ext2_filsys fs, blk64_t slack) +{ + errcode_t retval; + blk64_t blk = fs->super->s_first_data_block, next; + blk64_t last_blk = ext2fs_blocks_count(fs->super) - 1; + + while (slack) { + retval = ext2fs_find_first_zero_block_bitmap2(fs->block_map, + blk, last_blk, &blk); + if (retval) + break; + + retval = ext2fs_find_first_set_block_bitmap2(fs->block_map, + blk, last_blk, &next); + if (retval) + next = last_blk; + next--; + + if (next - blk > slack) { + blk += slack; + break; + } + + slack -= (next - blk); + blk = next; + } + return blk; +} + +static blk64_t round_up_align(blk64_t b, unsigned long align) +{ + unsigned long m; + + if (align == 0) + return b; + m = b % align; + if (m) + b += align - m; + return b; +} + +errcode_t mk_hugefiles(ext2_filsys fs) +{ + unsigned long i; + ext2_ino_t dir; + errcode_t retval; + blk64_t fs_blocks; + unsigned long align; + int d, dsize; + char *t; + + if (!get_bool_from_profile(fs_types, "make_hugefiles", 0)) + return 0; + + uid = get_int_from_profile(fs_types, "hugefiles_uid", 0); + gid = get_int_from_profile(fs_types, "hugefiles_gid", 0); + fs->umask = get_int_from_profile(fs_types, "hugefiles_umask", 077); + num_files = get_int_from_profile(fs_types, "num_hugefiles", 0); + t = get_string_from_profile(fs_types, "hugefiles_slack", "1M"); + num_slack = parse_num_blocks2(t, fs->super->s_log_block_size); + free(t); + t = get_string_from_profile(fs_types, "hugefiles_size", "0"); + num_blocks = parse_num_blocks2(t, fs->super->s_log_block_size); + free(t); + t = get_string_from_profile(fs_types, "hugefiles_align", "0"); + align = parse_num_blocks2(t, fs->super->s_log_block_size); + free(t); + num_blocks = round_up_align(num_blocks, align); + zero_hugefile = get_int_from_profile(fs_types, "zero_hugefiles", + zero_hugefile); + + t = get_string_from_profile(fs_types, "hugefiles_dir", "/"); + retval = create_directory(fs, t, &dir); + free(t); + if (retval) + return retval; + + fn_prefix = get_string_from_profile(fs_types, "hugefiles_name", + "hugefile"); + idx_digits = get_int_from_profile(fs_types, "hugefiles_digits", 5); + d = int_log10(num_files) + 1; + if (idx_digits > d) + d = idx_digits; + dsize = strlen(fn_prefix) + d + 16; + fn_buf = malloc(dsize); + if (!fn_buf) { + free(fn_prefix); + return ENOMEM; + } + strcpy(fn_buf, fn_prefix); + fn_numbuf = fn_buf + strlen(fn_prefix); + free(fn_prefix); + + fs_blocks = ext2fs_free_blocks_count(fs->super); + if (fs_blocks < num_slack + align) + return ENOMEM; + fs_blocks -= num_slack + align; + if (num_blocks && num_blocks > fs_blocks) + return ENOMEM; + if (num_blocks == 0 && num_files == 0) + num_files = 1; + + if (num_files == 0 && num_blocks) { + num_files = fs_blocks / num_blocks; + fs_blocks -= (num_files / 16) + 1; + fs_blocks -= calc_overhead(fs, num_blocks) * num_files; + num_files = fs_blocks / num_blocks; + } + + if (num_blocks == 0 && num_files > 1) { + num_blocks = fs_blocks / num_files; + fs_blocks -= (num_files / 16) + 1; + fs_blocks -= calc_overhead(fs, num_blocks) * num_files; + num_blocks = fs_blocks / num_files; + } + + num_slack += calc_overhead(fs, num_blocks) * num_files; + num_slack += (num_files / 16) + 1; /* space for dir entries */ + goal = get_start_block(fs, num_slack); + goal = round_up_align(goal, align); + + if (!quiet) { + if (zero_hugefile && verbose) + printf(_("Huge files will be zero'ed\n")); + printf(_("Creating %lu huge file(s) "), num_files); + if (num_blocks) + printf(_("with %llu blocks each"), num_blocks); + fputs(": ", stdout); + } + for (i=0; i < num_files; i++) { + ext2_ino_t ino; + + retval = mk_hugefile(fs, num_blocks, dir, i, &ino); + if (retval) { + com_err(program_name, retval, + _("while creating huge file %lu"), i); + goto errout; + } + } + if (!quiet) + fputs(_("done\n"), stdout); + +errout: + free(fn_buf); + return retval; +} --- e2fsprogs-1.42.9.orig/misc/mke2fs.8.in +++ e2fsprogs-1.42.9/misc/mke2fs.8.in @@ -64,7 +64,7 @@ mke2fs \- create an ext2/ext3/ext4 files ] [ .B \-O -.IR feature [,...] +[^]\fIfeature\fR[,...] ] [ .B \-q @@ -246,6 +246,10 @@ parity disk, so N will be the number of This allows the block allocator to prevent read-modify-write of the parity in a RAID stripe if possible when the data is written. .TP +.BI offset= offset +Create the filesystem at an offset from the beginning of the device or +file. This can be useful when creating disk images for virtual machines. +.TP .BI resize= max-online-resize Reserve enough space so that the block group descriptor table can grow to support a filesystem that has @@ -270,6 +274,22 @@ small risk if the system crashes before entirely one time. If the option value is omitted, it defaults to 1 to enable lazy journal inode zeroing. .TP +.BI num_backup_sb= <0|1|2> +If the +.B sparse_super2 +file system feature is enabled this option controls whether there will +be 0, 1, or 2 backup superblocks created in the file system. +.TP +.B packed_meta_blocks\fR[\fB= \fI<0 to disable, 1 to enable>\fR] +Place the allocation bitmaps and the inode table at the beginning of the +disk. This option requires that the flex_bg file system feature to be +enabled in order for it to have effect, and will also create the journal +at the beginning of the file system. This option is useful for flash +devices that use SLC flash at the beginning of the disk. +It also maximizes the range of contiguous data blocks, which +can be useful for certain specialized use cases, such as supported +Shingled Drives. +.TP .BI root_owner [=uid:gid] Specify the numeric user and group ID of the root directory. If no UID:GID is specified, use the user and group ID of the user running \fBmke2fs\fR. @@ -405,6 +425,13 @@ The size of the journal must be at least (i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.) and may be no more than 10,240,000 filesystem blocks or half the total file system size (whichever is smaller) +.TP +.BI location =journal-location +Specify the location of the journal. The argument +.I journal-location +can either be specified as a block number, or if the number has a units +suffix (e.g., 'M', 'G', etc.) interpret it as the offset from the +beginning of the file system. @JDEV@.TP @JDEV@.BI device= external-journal @JDEV@Attach the filesystem to the journal block device located on @@ -508,7 +535,7 @@ filesystem. The creator field is set by .B mke2fs executable was compiled for. .TP -.B "\-O \fIfeature\fR[,...]" +.B "\-O \fR[^]\fIfeature\fR[,...]" Create a filesystem with the given features (filesystem options), overriding the default filesystem options. The features that are enabled by default are specified by the @@ -544,7 +571,7 @@ section of the configuration file. .sp The filesystem feature set is comprised of a list of features, separated by commas, that are to be enabled. To disable a feature, simply -prefix the feature name with a caret ('^') or a minus ('-') character. +prefix the feature name with a caret ('^') character. Features with dependencies will not be removed successfully. The pseudo-filesystem feature "none" will clear all filesystem features. .TP --- e2fsprogs-1.42.9.orig/misc/mke2fs.c +++ e2fsprogs-1.42.9/misc/mke2fs.c @@ -62,6 +62,7 @@ extern int optind; #include "../version.h" #include "nls-enable.h" #include "quota/mkquota.h" +#include "mke2fs.h" #define STRIDE_LENGTH 8 @@ -76,26 +77,30 @@ extern int optind; extern int isatty(int); extern FILE *fpopen(const char *cmd, const char *mode); -static const char * program_name = "mke2fs"; +const char * program_name = "mke2fs"; static const char * device_name /* = NULL */; /* Command line options */ static int cflag; -static int verbose; -static int quiet; +int verbose; +int quiet; static int super_only; static int discard = 1; /* attempt to discard device before fs creation */ static int direct_io; static int force; static int noaction; +static int num_backups = 2; /* number of backup bg's for sparse_super2 */ static uid_t root_uid; static gid_t root_gid; int journal_size; int journal_flags; static int lazy_itable_init; +static int packed_meta_blocks; static char *bad_blocks_filename = NULL; static __u32 fs_stride; static int quotatype = -1; /* Initialize both user and group quotas by default */ +static __u64 offset; +static blk64_t journal_location = ~0LL; static struct ext2_super_block fs_param; static char *fs_uuid = NULL; @@ -104,7 +109,7 @@ static char *volume_label; static char *mount_dir; char *journal_device; static int sync_kludge; /* Set using the MKE2FS_SYNC env. option */ -static char **fs_types; +char **fs_types; static profile_t profile; @@ -139,7 +144,7 @@ static int int_log2(unsigned long long a return l; } -static int int_log10(unsigned long long arg) +int int_log10(unsigned long long arg) { int l; @@ -308,6 +313,40 @@ _("Warning: the backup superblock/group ext2fs_badblocks_list_iterate_end(bb_iter); } +static errcode_t packed_allocate_tables(ext2_filsys fs) +{ + errcode_t retval; + dgrp_t i; + blk64_t goal = 0; + + for (i = 0; i < fs->group_desc_count; i++) { + retval = ext2fs_new_block2(fs, goal, NULL, &goal); + if (retval) + return retval; + ext2fs_block_alloc_stats2(fs, goal, +1); + ext2fs_block_bitmap_loc_set(fs, i, goal); + } + for (i = 0; i < fs->group_desc_count; i++) { + retval = ext2fs_new_block2(fs, goal, NULL, &goal); + if (retval) + return retval; + ext2fs_block_alloc_stats2(fs, goal, +1); + ext2fs_inode_bitmap_loc_set(fs, i, goal); + } + for (i = 0; i < fs->group_desc_count; i++) { + blk64_t end = ext2fs_blocks_count(fs->super) - 1; + retval = ext2fs_get_free_blocks2(fs, goal, end, + fs->inode_blocks_per_group, + fs->block_map, &goal); + if (retval) + return retval; + ext2fs_block_alloc_stats_range(fs, goal, + fs->inode_blocks_per_group, +1); + ext2fs_inode_table_loc_set(fs, i, goal); + } + return 0; +} + static void write_inode_tables(ext2_filsys fs, int lazy_flag, int itable_zeroed) { errcode_t retval; @@ -710,6 +749,19 @@ static void parse_extended_opts(struct e continue; } param->s_desc_size = desc_size; + } else if (strcmp(token, "offset") == 0) { + if (!arg) { + r_usage++; + badopt = token; + continue; + } + offset = strtoull(arg, &p, 0); + if (*p) { + fprintf(stderr, _("Invalid offset: %s\n"), + arg); + r_usage++; + continue; + } } else if (strcmp(token, "mmp_update_interval") == 0) { if (!arg) { r_usage++; @@ -724,6 +776,28 @@ static void parse_extended_opts(struct e r_usage++; continue; } + } else if (strcmp(token, "num_backup_sb") == 0) { + if (!arg) { + r_usage++; + badopt = token; + continue; + } + num_backups = strtoul(arg, &p, 0); + if (*p || num_backups > 2) { + fprintf(stderr, + _("Invalid # of backup " + "superbocks: %s\n"), + arg); + r_usage++; + continue; + } + } else if (strcmp(token, "packed_meta_blocks") == 0) { + if (arg) + packed_meta_blocks = strtoul(arg, &p, 0); + else + packed_meta_blocks = 1; + if (packed_meta_blocks) + journal_location = 0; } else if (strcmp(token, "stride") == 0) { if (!arg) { r_usage++; @@ -879,9 +953,13 @@ static void parse_extended_opts(struct e "and may take an argument which\n" "\tis set off by an equals ('=') sign.\n\n" "Valid extended options are:\n" + "\tmmp_update_interval=\n" + "\tnum_backup_sb=<0|1|2>\n" "\tstride=\n" "\tstripe-width=\n" + "\toffset=\n" "\tresize=\n" + "\tpacked_meta_blocks=<0 to disable, 1 to enable>\n" "\tlazy_itable_init=<0 to disable, 1 to enable>\n" "\tlazy_journal_init=<0 to disable, 1 to enable>\n" "\troot_uid=\n" @@ -908,7 +986,8 @@ static __u32 ok_features[3] = { EXT3_FEATURE_COMPAT_HAS_JOURNAL | EXT2_FEATURE_COMPAT_RESIZE_INODE | EXT2_FEATURE_COMPAT_DIR_INDEX | - EXT2_FEATURE_COMPAT_EXT_ATTR, + EXT2_FEATURE_COMPAT_EXT_ATTR | + EXT4_FEATURE_COMPAT_SPARSE_SUPER2, /* Incompat */ EXT2_FEATURE_INCOMPAT_FILETYPE| EXT3_FEATURE_INCOMPAT_EXTENTS| @@ -1165,7 +1244,7 @@ static char **parse_fs_type(const char * return (list.list); } -static char *get_string_from_profile(char **types, const char *opt, +char *get_string_from_profile(char **types, const char *opt, const char *def_val) { char *ret = 0; @@ -1182,7 +1261,7 @@ static char *get_string_from_profile(cha return (ret); } -static int get_int_from_profile(char **types, const char *opt, int def_val) +int get_int_from_profile(char **types, const char *opt, int def_val) { int ret; char **cpp; @@ -1205,7 +1284,7 @@ static double get_double_from_profile(ch return ret; } -static int get_bool_from_profile(char **types, const char *opt, int def_val) +int get_bool_from_profile(char **types, const char *opt, int def_val) { int ret; char **cpp; @@ -1958,6 +2037,8 @@ profile_error: } #endif + num_backups = get_int_from_profile(fs_types, "num_backup_sb", 2); + blocksize = EXT2_BLOCK_SIZE(&fs_param); /* @@ -1994,6 +2075,20 @@ profile_error: EXT2_MKJOURNAL_LAZYINIT : 0; journal_flags |= EXT2_MKJOURNAL_NO_MNT_CHECK; + if (!journal_location_string) + journal_location_string = get_string_from_profile(fs_types, + "journal_location", ""); + if ((journal_location == ~0ULL) && journal_location_string && + *journal_location_string) + journal_location = parse_num_blocks2(journal_location_string, + fs_param.s_log_block_size); + free(journal_location_string); + + packed_meta_blocks = get_bool_from_profile(fs_types, + "packed_meta_blocks", 0); + if (packed_meta_blocks) + journal_location = 0; + /* Get options from profile */ for (cpp = fs_types; *cpp; cpp++) { tmp = NULL; @@ -2145,6 +2240,13 @@ profile_error: ext2fs_r_blocks_count_set(&fs_param, reserved_ratio * ext2fs_blocks_count(&fs_param) / 100.0); + if (fs_param.s_feature_compat & EXT4_FEATURE_COMPAT_SPARSE_SUPER2) { + if (num_backups >= 1) + fs_param.s_backup_bgs[0] = 1; + if (num_backups >= 2) + fs_param.s_backup_bgs[1] = ~0; + } + free(fs_type); free(usage_types); } @@ -2238,11 +2340,9 @@ static int mke2fs_setup_tdb(const char * sprintf(tdb_file, "%s/mke2fs-%s.e2undo", tdb_dir, dev_name); free(tmp_name); - if (!access(tdb_file, F_OK)) { - if (unlink(tdb_file) < 0) { - retval = errno; - goto errout; - } + if ((unlink(tdb_file) < 0) && (errno != ENOENT)) { + retval = errno; + goto errout; } set_undo_io_backing_manager(*io_ptr); @@ -2318,30 +2418,43 @@ static int mke2fs_discard_device(ext2_fi static void fix_cluster_bg_counts(ext2_filsys fs) { - blk64_t cluster, num_clusters, tot_free; - unsigned num = 0; - int grp_free, num_free, group; - - num_clusters = EXT2FS_B2C(fs, ext2fs_blocks_count(fs->super)); - tot_free = num_free = group = grp_free = 0; - for (cluster = EXT2FS_B2C(fs, fs->super->s_first_data_block); - cluster < num_clusters; cluster++) { - if (!ext2fs_test_block_bitmap2(fs->block_map, - EXT2FS_C2B(fs, cluster))) { - grp_free++; - tot_free++; - } - num++; - if ((num == fs->super->s_clusters_per_group) || - (cluster == num_clusters-1)) { + blk64_t block, num_blocks, last_block, next; + blk64_t tot_free = 0; + errcode_t retval; + dgrp_t group = 0; + int grp_free = 0; + + num_blocks = ext2fs_blocks_count(fs->super); + last_block = ext2fs_group_last_block2(fs, group); + block = fs->super->s_first_data_block; + while (block < num_blocks) { + retval = ext2fs_find_first_zero_block_bitmap2(fs->block_map, + block, last_block, &next); + if (retval == 0) + block = next; + else { + block = last_block + 1; + goto next_bg; + } + + retval = ext2fs_find_first_set_block_bitmap2(fs->block_map, + block, last_block, &next); + if (retval) + next = last_block + 1; + grp_free += EXT2FS_NUM_B2C(fs, next - block); + tot_free += next - block; + block = next; + + if (block > last_block) { + next_bg: ext2fs_bg_free_blocks_count_set(fs, group, grp_free); ext2fs_group_desc_csum_set(fs, group); - num = 0; grp_free = 0; group++; + last_block = ext2fs_group_last_block2(fs, group); } } - ext2fs_free_blocks_count_set(fs->super, EXT2FS_C2B(fs, tot_free)); + ext2fs_free_blocks_count_set(fs->super, tot_free); } static int create_quota_inodes(ext2_filsys fs) @@ -2368,7 +2481,7 @@ int main (int argc, char *argv[]) int flags; int old_bitmaps; io_manager io_ptr; - char tdb_string[40]; + char opt_string[40]; char *hash_alg_str; int itable_zeroed = 0; @@ -2435,12 +2548,17 @@ int main (int argc, char *argv[]) "0s - skipping inode table wipe\n")); lazy_itable_init = 1; itable_zeroed = 1; + zero_hugefile = 0; } } - sprintf(tdb_string, "tdb_data_size=%d", fs->blocksize <= 4096 ? + sprintf(opt_string, "tdb_data_size=%d", fs->blocksize <= 4096 ? 32768 : fs->blocksize * 8); - io_channel_set_options(fs->io, tdb_string); + io_channel_set_options(fs->io, opt_string); + if (offset) { + sprintf(opt_string, "offset=%llu", offset); + io_channel_set_options(fs->io, opt_string); + } if (fs_param.s_flags & EXT2_FLAGS_TEST_FILESYS) fs->super->s_flags |= EXT2_FLAGS_TEST_FILESYS; @@ -2562,12 +2680,16 @@ int main (int argc, char *argv[]) read_bb_file(fs, &bb_list, bad_blocks_filename); if (cflag) test_disk(fs, &bb_list); - handle_bad_blocks(fs, bb_list); + fs->stride = fs_stride = fs->super->s_raid_stride; if (!quiet) printf("%s", _("Allocating group tables: ")); - retval = ext2fs_allocate_tables(fs); + if ((fs->super->s_feature_incompat & EXT4_FEATURE_INCOMPAT_FLEX_BG) && + packed_meta_blocks) + retval = packed_allocate_tables(fs); + else + retval = ext2fs_allocate_tables(fs); if (retval) { com_err(program_name, retval, "%s", _("while trying to allocate filesystem tables")); @@ -2693,8 +2815,9 @@ int main (int argc, char *argv[]) journal_blocks); fflush(stdout); } - retval = ext2fs_add_journal_inode(fs, journal_blocks, - journal_flags); + retval = ext2fs_add_journal_inode2(fs, journal_blocks, + journal_location, + journal_flags); if (retval) { com_err(program_name, retval, "%s", _("\n\twhile trying to create journal")); @@ -2726,6 +2849,10 @@ no_journal: EXT4_FEATURE_RO_COMPAT_QUOTA)) create_quota_inodes(fs); + retval = mk_hugefiles(fs); + if (retval) + com_err(program_name, retval, "while creating huge files"); + if (!quiet) printf("%s", _("Writing superblocks and " "filesystem accounting information: ")); --- e2fsprogs-1.42.9.orig/misc/mke2fs.conf.5.in +++ e2fsprogs-1.42.9/misc/mke2fs.conf.5.in @@ -357,6 +357,18 @@ initialization noticeably, but it requir initializing the filesystem in the background when the filesystem is first mounted. .TP +.I journal_location +This relation specifies the location of the journal. +.TP +.I num_backup_sb +This relation indicates whether file systems with the +.B sparse_super2 +feature enabled should be created with 0, 1, or 2 backup superblocks. +.TP +.I packed_meta_blocks +This boolean relation specifes whether the allocation bitmaps, inode +table, and journal should be located at the beginning of the file system. +.TP .I inode_ratio This relation specifies the default inode ratio if the user does not specify one on the command line. @@ -408,6 +420,71 @@ system feature is enabled. It can be ov .B \-C command line option to .BR mke2fs (8) +.TP +.I make_hugefiles +This boolean relation enables the creation of pre-allocated files as +part of formatting the file system. +.TP +.I hugefiles_uid +This relation controls the user ownership for all of the files and +directories created by the +.I make_hugefiles +feature. +.TP +.I hugefiles_gid +This relation controls the group ownership for all of the files and +directories created by the +.I make_hugefiles +feature. +.TP +.I hugefiles_umask +This relation specifies the umask used when creating the files and +directories by the +.I make_hugefiles +feature. +.TP +.I num_hugefiles +This relation specifies the number of huge files to be created. If this +relation is not specified, or is set to zero, and the +.I hugefiles_size +relation is non-zero, then +.I make_hugefiles +will create as many huge files as can fit to fill the entire file system. +.TP +.I hugefiles_slack +This relation specifies how much space should be reserved for other +files. +.TP +.I hugefiles_size +This relation specifies the size of the huge files. If this relation is +not specified, the default is to fill the entire file system. +.TP +.I hugefiles_align +This relation specifies the alignment for the start block of the huge +files. It also forces the size of huge files to be a multiple of the +requested alignment. If this relation is not specified, no alignment +requirement will be imposed on the huge files. +.TP +.I hugefiles_name +This relation specifies the base file name for the huge files. +.TP +.I hugefiles_digits +This relation specifies the (zero-padded) width of the field for the +huge file number. +.TP +.I zero_hugefiles +This boolean relation specifies whether or not zero blocks will be +written to the hugefiles while +.BR mke2fs(8) +is creating them. By default, zero blocks will be written to the huge +files to avoid stale data from being made available to potentially +untrusted user programs, unless the device supports a discard/trim +operation which will take care of zeroing the device blocks. By +.I zero_hugefiles +to false, this step will always be skipped, which can be useful if it is +known that the disk has been previously erased, or if the user programs +that will have access to the huge files are trusted to not reveal stale +data. .SH THE [devices] STANZA Each tag in the .I [devices] --- /dev/null +++ e2fsprogs-1.42.9/misc/mke2fs.h @@ -0,0 +1,30 @@ +/* + * mke2fs.h + * + * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, + * 2003, 2004, 2005 by Theodore Ts'o. + * + * %Begin-Header% + * This file may be redistributed under the terms of the GNU Public + * License. + * %End-Header% + */ + +/* mke2fs.c */ +extern const char * program_name; +extern int quiet; +extern int verbose; +extern int zero_hugefile; +extern char **fs_types; + +extern char *get_string_from_profile(char **types, const char *opt, + const char *def_val); +extern int get_int_from_profile(char **types, const char *opt, int def_val); +extern int get_bool_from_profile(char **types, const char *opt, int def_val); +extern int int_log10(unsigned long long arg); + +/* mk_hugefiles.c */ +extern errcode_t mk_hugefiles(ext2_filsys fs); + + + --- e2fsprogs-1.42.9.orig/misc/tune2fs.8.in +++ e2fsprogs-1.42.9/misc/tune2fs.8.in @@ -333,6 +333,13 @@ megabytes. The size of the journal mus and may be no more than 102,400 filesystem blocks. There must be enough free space in the filesystem to create a journal of that size. +.TP +.BI location =journal-location +Specify the location of the journal. The argument +.I journal-location +can either be specified as a block number, or if the number has a units +suffix (e.g., 'M', 'G', etc.) interpret it as the offset from the +beginning of the file system. @JDEV@.TP @JDEV@.BI device= external-journal @JDEV@Attach the filesystem to the journal block device located on --- e2fsprogs-1.42.9.orig/misc/tune2fs.c +++ e2fsprogs-1.42.9/misc/tune2fs.c @@ -98,6 +98,7 @@ static int usrquota, grpquota; int journal_size, journal_flags; char *journal_device; +static blk64_t journal_location = ~0LL; static struct list_head blk_move_list; @@ -694,8 +695,13 @@ static int add_journal(ext2_filsys fs) fflush(stdout); journal_blocks = figure_journal_size(journal_size, fs); - retval = ext2fs_add_journal_inode(fs, journal_blocks, - journal_flags); + if (journal_location_string) + journal_location = + parse_num_blocks2(journal_location_string, + fs->super->s_log_block_size); + retval = ext2fs_add_journal_inode2(fs, journal_blocks, + journal_location, + journal_flags); if (retval) { fprintf(stderr, "\n"); com_err(program_name, retval, "%s", @@ -1856,15 +1862,12 @@ static int tune2fs_setup_tdb(const char goto alloc_fn_fail; sprintf(tdb_file, "%s/tune2fs-%s.e2undo", tdb_dir, dev_name); - if (!access(tdb_file, F_OK)) { - if (unlink(tdb_file) < 0) { - retval = errno; - com_err(program_name, retval, - _("while trying to delete %s"), - tdb_file); - free(tdb_file); - return retval; - } + if ((unlink(tdb_file) < 0) && (errno != ENOENT)) { + retval = errno; + com_err(program_name, retval, + _("while trying to delete %s"), tdb_file); + free(tdb_file); + return retval; } set_undo_io_backing_manager(*io_ptr); --- e2fsprogs-1.42.9.orig/misc/util.c +++ e2fsprogs-1.42.9/misc/util.c @@ -34,6 +34,8 @@ #include "blkid/blkid.h" #include "util.h" +char *journal_location_string = NULL; + #ifndef HAVE_STRCASECMP int strcasecmp (char *s1, char *s2) { @@ -218,6 +220,12 @@ void parse_journal_opts(const char *opts journal_size = strtoul(arg, &p, 0); if (*p) journal_usage++; + } else if (!strcmp(token, "location")) { + if (!arg) { + journal_usage++; + continue; + } + journal_location_string = strdup(arg); } else if (strcmp(token, "v1_superblock") == 0) { journal_flags |= EXT2_MKJOURNAL_V1_SUPER; continue; @@ -231,7 +239,8 @@ void parse_journal_opts(const char *opts "\tis set off by an equals ('=') sign.\n\n" "Valid journal options are:\n" "\tsize=\n" - "\tdevice=\n\n" + "\tdevice=\n" + "\tlocation=\n\n" "The journal size must be between " "1024 and 10240000 filesystem blocks.\n\n"), stderr); free(buf); --- e2fsprogs-1.42.9.orig/misc/util.h +++ e2fsprogs-1.42.9/misc/util.h @@ -13,6 +13,7 @@ extern int journal_size; extern int journal_flags; extern char *journal_device; +extern char *journal_location_string; #ifndef HAVE_STRCASECMP extern int strcasecmp (char *s1, char *s2); --- e2fsprogs-1.42.9.orig/resize/Makefile.in +++ e2fsprogs-1.42.9/resize/Makefile.in @@ -28,11 +28,11 @@ SRCS= $(srcdir)/extent.c \ $(srcdir)/resource_track.c \ $(srcdir)/sim_progress.c -LIBS= $(LIBE2P) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBINTL) +LIBS= $(LIBE2P) $(LIBEXT2FS) $(LIBCOM_ERR) $(LIBINTL) $(SYSLIBS) DEPLIBS= $(LIBE2P) $(LIBEXT2FS) $(DEPLIBCOM_ERR) STATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \ - $(LIBINTL) + $(LIBINTL) $(SYSLIBS) DEPSTATIC_LIBS= $(STATIC_LIBE2P) $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) .c.o: --- e2fsprogs-1.42.9.orig/resize/online.c +++ e2fsprogs-1.42.9/resize/online.c @@ -76,6 +76,14 @@ errcode_t online_resize_fs(ext2_filsys f no_resize_ioctl = 1; } + if (EXT2_HAS_COMPAT_FEATURE(fs->super, + EXT4_FEATURE_COMPAT_SPARSE_SUPER2) && + (access("/sys/fs/ext4/features/sparse_super2", R_OK) != 0)) { + com_err(program_name, 0, _("kernel does not support online " + "resize with sparse_super2")); + exit(1); + } + printf(_("Filesystem at %s is mounted on %s; " "on-line resizing required\n"), fs->device_name, mtpt); --- e2fsprogs-1.42.9.orig/resize/resize2fs.c +++ e2fsprogs-1.42.9/resize/resize2fs.c @@ -53,6 +53,9 @@ static errcode_t ext2fs_calculate_summar static errcode_t fix_sb_journal_backup(ext2_filsys fs); static errcode_t mark_table_blocks(ext2_filsys fs, ext2fs_block_bitmap bmap); +static errcode_t clear_sparse_super2_last_group(ext2_resize_t rfs); +static errcode_t reserve_sparse_super2_last_group(ext2_resize_t rfs, + ext2fs_block_bitmap meta_bmap); /* * Some helper CPP macros @@ -191,6 +194,10 @@ errcode_t resize_fs(ext2_filsys fs, blk6 goto errout; print_resource_track(rfs, &rtrack, fs->io); + retval = clear_sparse_super2_last_group(rfs); + if (retval) + goto errout; + rfs->new_fs->super->s_state &= ~EXT2_ERROR_FS; rfs->new_fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY; @@ -460,6 +467,33 @@ retry: } /* + * Update the location of the backup superblocks if the + * sparse_super2 feature is enabled. + */ + if (fs->super->s_feature_compat & EXT4_FEATURE_COMPAT_SPARSE_SUPER2) { + dgrp_t last_bg = fs->group_desc_count - 1; + dgrp_t old_last_bg = old_fs->group_desc_count - 1; + + if (last_bg > old_last_bg) { + if (old_fs->group_desc_count == 1) + fs->super->s_backup_bgs[0] = 1; + if (old_fs->group_desc_count == 1 && + fs->super->s_backup_bgs[0]) + fs->super->s_backup_bgs[0] = last_bg; + else if (fs->super->s_backup_bgs[1]) + fs->super->s_backup_bgs[1] = last_bg; + } else if (last_bg < old_last_bg) { + if (fs->super->s_backup_bgs[0] > last_bg) + fs->super->s_backup_bgs[0] = 0; + if (fs->super->s_backup_bgs[1] > last_bg) + fs->super->s_backup_bgs[1] = 0; + if (last_bg > 1 && + old_fs->super->s_backup_bgs[1] == old_last_bg) + fs->super->s_backup_bgs[1] = last_bg; + } + } + + /* * If we are shrinking the number of block groups, we're done * and can exit now. */ @@ -615,14 +649,13 @@ errout: */ static errcode_t adjust_superblock(ext2_resize_t rfs, blk64_t new_size) { - ext2_filsys fs; + ext2_filsys fs = rfs->new_fs; int adj = 0; errcode_t retval; blk64_t group_block; unsigned long i; unsigned long max_group; - fs = rfs->new_fs; ext2fs_mark_super_dirty(fs); ext2fs_mark_bb_dirty(fs); ext2fs_mark_ib_dirty(fs); @@ -952,6 +985,10 @@ static errcode_t blocks_to_move(ext2_res new_blocks = fs->desc_blocks + fs->super->s_reserved_gdt_blocks; } + retval = reserve_sparse_super2_last_group(rfs, meta_bmap); + if (retval) + goto errout; + if (old_blocks == new_blocks) { retval = 0; goto errout; @@ -1840,6 +1877,147 @@ errout: } /* + * This function is used when expanding a file system. It frees the + * superblock and block group descriptor blocks from the block group + * which is no longer the last block group. + */ +static errcode_t clear_sparse_super2_last_group(ext2_resize_t rfs) +{ + ext2_filsys fs = rfs->new_fs; + ext2_filsys old_fs = rfs->old_fs; + errcode_t retval; + dgrp_t old_last_bg = rfs->old_fs->group_desc_count - 1; + dgrp_t last_bg = fs->group_desc_count - 1; + blk64_t sb, old_desc; + blk_t num; + + if (!(fs->super->s_feature_compat & EXT4_FEATURE_COMPAT_SPARSE_SUPER2)) + return 0; + + if (last_bg <= old_last_bg) + return 0; + + if (fs->super->s_backup_bgs[0] == old_fs->super->s_backup_bgs[0] && + fs->super->s_backup_bgs[1] == old_fs->super->s_backup_bgs[1]) + return 0; + + if (old_fs->super->s_backup_bgs[0] != old_last_bg && + old_fs->super->s_backup_bgs[1] != old_last_bg) + return 0; + + if (fs->super->s_backup_bgs[0] == old_last_bg || + fs->super->s_backup_bgs[1] == old_last_bg) + return 0; + + retval = ext2fs_super_and_bgd_loc2(rfs->old_fs, old_last_bg, + &sb, &old_desc, NULL, &num); + if (retval) + return retval; + + if (sb) + ext2fs_unmark_block_bitmap2(fs->block_map, sb); + if (old_desc) + ext2fs_unmark_block_bitmap_range2(fs->block_map, old_desc, num); + return 0; +} + +/* + * This function is used when shrinking a file system. We need to + * utilize blocks from what will be the new last block group for the + * backup superblock and block group descriptor blocks. + * Unfortunately, those blocks may be used by other files or fs + * metadata blocks. We need to mark them as being in use. + */ +static errcode_t reserve_sparse_super2_last_group(ext2_resize_t rfs, + ext2fs_block_bitmap meta_bmap) +{ + ext2_filsys fs = rfs->new_fs; + ext2_filsys old_fs = rfs->old_fs; + errcode_t retval; + dgrp_t old_last_bg = rfs->old_fs->group_desc_count - 1; + dgrp_t last_bg = fs->group_desc_count - 1; + dgrp_t g; + blk64_t blk, sb, old_desc; + blk_t i, num; + int realloc = 0; + + if (!(fs->super->s_feature_compat & EXT4_FEATURE_COMPAT_SPARSE_SUPER2)) + return 0; + + if (last_bg >= old_last_bg) + return 0; + + if (fs->super->s_backup_bgs[0] == old_fs->super->s_backup_bgs[0] && + fs->super->s_backup_bgs[1] == old_fs->super->s_backup_bgs[1]) + return 0; + + if (fs->super->s_backup_bgs[0] != last_bg && + fs->super->s_backup_bgs[1] != last_bg) + return 0; + + if (old_fs->super->s_backup_bgs[0] == last_bg || + old_fs->super->s_backup_bgs[1] == last_bg) + return 0; + + retval = ext2fs_super_and_bgd_loc2(rfs->new_fs, last_bg, + &sb, &old_desc, NULL, &num); + if (retval) + return retval; + + if (!sb) { + fputs(_("Should never happen! No sb in last super_sparse bg?\n"), + stderr); + exit(1); + } + if (old_desc != sb+1) { + fputs(_("Should never happen! Unexpected old_desc in " + "super_sparse bg?\n"), + stderr); + exit(1); + } + num = (old_desc) ? num : 1; + + /* Reserve the backup blocks */ + ext2fs_mark_block_bitmap_range2(fs->block_map, sb, num); + + for (g = 0; g < fs->group_desc_count; g++) { + blk64_t mb; + + mb = ext2fs_block_bitmap_loc(fs, g); + if ((mb >= sb) && (mb < sb + num)) { + ext2fs_block_bitmap_loc_set(fs, g, 0); + realloc = 1; + } + mb = ext2fs_inode_bitmap_loc(fs, g); + if ((mb >= sb) && (mb < sb + num)) { + ext2fs_inode_bitmap_loc_set(fs, g, 0); + realloc = 1; + } + mb = ext2fs_inode_table_loc(fs, g); + if ((mb < sb + num) && + (sb < mb + fs->inode_blocks_per_group)) { + ext2fs_inode_table_loc_set(fs, g, 0); + realloc = 1; + } + if (realloc) { + retval = ext2fs_allocate_group_table(fs, g, 0); + if (retval) + return retval; + } + } + + for (blk = sb, i = 0; i < num; blk++, i++) { + if (ext2fs_test_block_bitmap2(old_fs->block_map, blk) && + !ext2fs_test_block_bitmap2(meta_bmap, blk)) { + ext2fs_mark_block_bitmap2(rfs->move_blocks, blk); + rfs->needed_blocks++; + } + ext2fs_mark_block_bitmap2(rfs->reserve_blocks, blk); + } + return 0; +} + +/* * Fix the resize inode */ static errcode_t fix_resize_inode(ext2_filsys fs) --- e2fsprogs-1.42.9.orig/resize/test_extent.c +++ e2fsprogs-1.42.9/resize/test_extent.c @@ -109,6 +109,8 @@ void do_test(FILE *in, FILE *out) } else fputs("# Syntax error\n", out); } + if (extent) + ext2fs_free_extent_table(extent); } #ifdef __GNUC__ --- e2fsprogs-1.42.9.orig/tests/d_special_files/script +++ e2fsprogs-1.42.9/tests/d_special_files/script @@ -18,7 +18,7 @@ status=$? echo Exit status is $status >> $OUT $DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1 -set_current_time 201301151400 +set_current_time 20130115140000 set_super_value lastcheck 0 set_super_value hash_seed null set_super_value mkfs_time 0 --- e2fsprogs-1.42.9.orig/tests/f_crashdisk/expect.1 +++ e2fsprogs-1.42.9/tests/f_crashdisk/expect.1 @@ -2,10 +2,12 @@ ext2fs_open2: The ext2 superblock is cor ../e2fsck/e2fsck: Superblock invalid, trying backup blocks... ../e2fsck/e2fsck: The ext2 superblock is corrupt while trying to open test.img -The superblock could not be read or does not describe a correct ext2 -filesystem. If the device is valid and it really contains an ext2 +The superblock could not be read or does not describe a valid ext2/ext3/ext4 +filesystem. If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 + or + e2fsck -b 32768 Exit status is 8 --- e2fsprogs-1.42.9.orig/tests/f_dup4/script +++ e2fsprogs-1.42.9/tests/f_dup4/script @@ -8,7 +8,7 @@ echo "/ Murphy Magic. The SeCrEt of the touch $TMPFILE $MKE2FS -N 32 -F -o Linux -b 1024 $TMPFILE 100 > /dev/null 2>&1 $DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1 -set_current_time 200704102100 +set_current_time 20070410210000 set_super_value lastcheck 0 set_super_value hash_seed null set_super_value mkfs_time 0 --- e2fsprogs-1.42.9.orig/tests/f_dup_resize/script +++ e2fsprogs-1.42.9/tests/f_dup_resize/script @@ -11,8 +11,8 @@ $DEBUGFS -w $TMPFILE << EOF > /dev/null freeb 4 4 freeb 8195 4 write $TEST_DATA debugfs -set_current_time 200504110000 -set_inode_field debugfs mtime 200504110000 +set_current_time 20050411000000 +set_inode_field debugfs mtime 2005041100000000 q EOF --- e2fsprogs-1.42.9.orig/tests/m_bigjournal/expect.1 +++ e2fsprogs-1.42.9/tests/m_bigjournal/expect.1 @@ -55,7 +55,7 @@ Group 0: (Blocks 0-32767) 31836 free blocks, 5 free inodes, 2 directories, 5 unused inodes Free blocks: 764-1184, 1269-1696, 1781-32767 Free inodes: 12-16 -Group 1: (Blocks 32768-65535) [INODE_UNINIT] +Group 1: (Blocks 32768-65535) [INODE_UNINIT, BLOCK_UNINIT] Backup superblock at 32768, Group descriptors at 32769-32769 Reserved GDT blocks at 32770-33440 Block bitmap at 674 (bg #0 + 674), Inode bitmap at 1186 (bg #0 + 1186) @@ -69,7 +69,7 @@ Group 2: (Blocks 65536-98303) [INODE_UNI 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 65536-98303 Free inodes: 33-48 -Group 3: (Blocks 98304-131071) [INODE_UNINIT] +Group 3: (Blocks 98304-131071) [INODE_UNINIT, BLOCK_UNINIT] Backup superblock at 98304, Group descriptors at 98305-98305 Reserved GDT blocks at 98306-98976 Block bitmap at 676 (bg #0 + 676), Inode bitmap at 1188 (bg #0 + 1188) @@ -83,7 +83,7 @@ Group 4: (Blocks 131072-163839) [INODE_U 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 131072-163839 Free inodes: 65-80 -Group 5: (Blocks 163840-196607) [INODE_UNINIT] +Group 5: (Blocks 163840-196607) [INODE_UNINIT, BLOCK_UNINIT] Backup superblock at 163840, Group descriptors at 163841-163841 Reserved GDT blocks at 163842-164512 Block bitmap at 678 (bg #0 + 678), Inode bitmap at 1190 (bg #0 + 1190) @@ -97,7 +97,7 @@ Group 6: (Blocks 196608-229375) [INODE_U 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 196608-229375 Free inodes: 97-112 -Group 7: (Blocks 229376-262143) [INODE_UNINIT] +Group 7: (Blocks 229376-262143) [INODE_UNINIT, BLOCK_UNINIT] Backup superblock at 229376, Group descriptors at 229377-229377 Reserved GDT blocks at 229378-230048 Block bitmap at 680 (bg #0 + 680), Inode bitmap at 1192 (bg #0 + 1192) @@ -111,7 +111,7 @@ Group 8: (Blocks 262144-294911) [INODE_U 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 262144-294911 Free inodes: 129-144 -Group 9: (Blocks 294912-327679) [INODE_UNINIT] +Group 9: (Blocks 294912-327679) [INODE_UNINIT, BLOCK_UNINIT] Backup superblock at 294912, Group descriptors at 294913-294913 Reserved GDT blocks at 294914-295584 Block bitmap at 682 (bg #0 + 682), Inode bitmap at 1194 (bg #0 + 1194) @@ -209,7 +209,7 @@ Group 24: (Blocks 786432-819199) [INODE_ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 786432-819199 Free inodes: 385-400 -Group 25: (Blocks 819200-851967) [INODE_UNINIT] +Group 25: (Blocks 819200-851967) [INODE_UNINIT, BLOCK_UNINIT] Backup superblock at 819200, Group descriptors at 819201-819201 Reserved GDT blocks at 819202-819872 Block bitmap at 698 (bg #0 + 698), Inode bitmap at 1210 (bg #0 + 1210) @@ -223,7 +223,7 @@ Group 26: (Blocks 851968-884735) [INODE_ 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 851968-884735 Free inodes: 417-432 -Group 27: (Blocks 884736-917503) [INODE_UNINIT] +Group 27: (Blocks 884736-917503) [INODE_UNINIT, BLOCK_UNINIT] Backup superblock at 884736, Group descriptors at 884737-884737 Reserved GDT blocks at 884738-885408 Block bitmap at 700 (bg #0 + 700), Inode bitmap at 1212 (bg #0 + 1212) @@ -551,7 +551,7 @@ Group 80: (Blocks 2621440-2654207) [INOD 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 2621440-2654207 Free inodes: 1281-1296 -Group 81: (Blocks 2654208-2686975) [INODE_UNINIT] +Group 81: (Blocks 2654208-2686975) [INODE_UNINIT, BLOCK_UNINIT] Backup superblock at 2654208, Group descriptors at 2654209-2654209 Reserved GDT blocks at 2654210-2654880 Block bitmap at 754 (bg #0 + 754), Inode bitmap at 1266 (bg #0 + 1266) --- e2fsprogs-1.42.9.orig/tests/m_uninit/expect.1 +++ e2fsprogs-1.42.9/tests/m_uninit/expect.1 @@ -64,7 +64,7 @@ Group 0: (Blocks 1-8192) [ITABLE_ZEROED] 7662 free blocks, 2037 free inodes, 2 directories, 2037 unused inodes Free blocks: 531-8192 Free inodes: 12-2048 -Group 1: (Blocks 8193-16384) [INODE_UNINIT, ITABLE_ZEROED] +Group 1: (Blocks 8193-16384) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Backup superblock at 8193, Group descriptors at 8194-8194 Reserved GDT blocks at 8195-8450 Block bitmap at 8451 (+258), Inode bitmap at 8452 (+259) @@ -76,9 +76,9 @@ Group 2: (Blocks 16385-24576) [INODE_UNI Block bitmap at 16385 (+0), Inode bitmap at 16386 (+1) Inode table at 16387-16642 (+2) 7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes - Free blocks: 16385-24576 + Free blocks: 16643-24576 Free inodes: 4097-6144 -Group 3: (Blocks 24577-32768) [INODE_UNINIT, ITABLE_ZEROED] +Group 3: (Blocks 24577-32768) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Backup superblock at 24577, Group descriptors at 24578-24578 Reserved GDT blocks at 24579-24834 Block bitmap at 24835 (+258), Inode bitmap at 24836 (+259) @@ -90,9 +90,9 @@ Group 4: (Blocks 32769-40960) [INODE_UNI Block bitmap at 32769 (+0), Inode bitmap at 32770 (+1) Inode table at 32771-33026 (+2) 7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes - Free blocks: 32769-40960 + Free blocks: 33027-40960 Free inodes: 8193-10240 -Group 5: (Blocks 40961-49152) [INODE_UNINIT, ITABLE_ZEROED] +Group 5: (Blocks 40961-49152) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Backup superblock at 40961, Group descriptors at 40962-40962 Reserved GDT blocks at 40963-41218 Block bitmap at 41219 (+258), Inode bitmap at 41220 (+259) @@ -104,9 +104,9 @@ Group 6: (Blocks 49153-57344) [INODE_UNI Block bitmap at 49153 (+0), Inode bitmap at 49154 (+1) Inode table at 49155-49410 (+2) 7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes - Free blocks: 49153-57344 + Free blocks: 49411-57344 Free inodes: 12289-14336 -Group 7: (Blocks 57345-65536) [INODE_UNINIT, ITABLE_ZEROED] +Group 7: (Blocks 57345-65536) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Backup superblock at 57345, Group descriptors at 57346-57346 Reserved GDT blocks at 57347-57602 Block bitmap at 57603 (+258), Inode bitmap at 57604 (+259) @@ -118,9 +118,9 @@ Group 8: (Blocks 65537-73728) [INODE_UNI Block bitmap at 65537 (+0), Inode bitmap at 65538 (+1) Inode table at 65539-65794 (+2) 7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes - Free blocks: 65537-73728 + Free blocks: 65795-73728 Free inodes: 16385-18432 -Group 9: (Blocks 73729-81920) [INODE_UNINIT, ITABLE_ZEROED] +Group 9: (Blocks 73729-81920) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Backup superblock at 73729, Group descriptors at 73730-73730 Reserved GDT blocks at 73731-73986 Block bitmap at 73987 (+258), Inode bitmap at 73988 (+259) @@ -132,31 +132,31 @@ Group 10: (Blocks 81921-90112) [INODE_UN Block bitmap at 81921 (+0), Inode bitmap at 81922 (+1) Inode table at 81923-82178 (+2) 7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes - Free blocks: 81921-90112 + Free blocks: 82179-90112 Free inodes: 20481-22528 Group 11: (Blocks 90113-98304) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Block bitmap at 90113 (+0), Inode bitmap at 90114 (+1) Inode table at 90115-90370 (+2) 7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes - Free blocks: 90113-98304 + Free blocks: 90371-98304 Free inodes: 22529-24576 Group 12: (Blocks 98305-106496) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Block bitmap at 98305 (+0), Inode bitmap at 98306 (+1) Inode table at 98307-98562 (+2) 7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes - Free blocks: 98305-106496 + Free blocks: 98563-106496 Free inodes: 24577-26624 Group 13: (Blocks 106497-114688) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Block bitmap at 106497 (+0), Inode bitmap at 106498 (+1) Inode table at 106499-106754 (+2) 7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes - Free blocks: 106497-114688 + Free blocks: 106755-114688 Free inodes: 26625-28672 Group 14: (Blocks 114689-122880) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Block bitmap at 114689 (+0), Inode bitmap at 114690 (+1) Inode table at 114691-114946 (+2) 7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes - Free blocks: 114689-122880 + Free blocks: 114947-122880 Free inodes: 28673-30720 Group 15: (Blocks 122881-131071) [INODE_UNINIT, ITABLE_ZEROED] Block bitmap at 122881 (+0), Inode bitmap at 122882 (+1) --- e2fsprogs-1.42.9.orig/tests/progs/Makefile.in +++ e2fsprogs-1.42.9/tests/progs/Makefile.in @@ -21,7 +21,7 @@ TEST_ICOUNT_OBJS= test_icount.o test_ico SRCS= $(srcdir)/test_rel.c -LIBS= $(LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR) +LIBS= $(LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR) $(SYSLIBS) DEPLIBS= $(LIBEXT2FS) $(DEPLIBSS) $(DEPLIBCOM_ERR) .c.o: --- e2fsprogs-1.42.9.orig/util/Makefile.in +++ e2fsprogs-1.42.9/util/Makefile.in @@ -22,6 +22,12 @@ PROGS= subst symlinks all:: $(PROGS) gen-tarball +dirpaths.h: + $(E) " CREATE dirpaths.h" + $(Q) echo "/* fake dirpaths.h for config.h */" > dirpaths.h + +subst.o: dirpaths.h + subst: subst.o $(E) " LD $@" $(Q) $(BUILD_CC) $(BUILD_LDFLAGS) -o subst subst.o @@ -46,7 +52,7 @@ tarballs: gen-tarball clean: $(RM) -f $(PROGS) \#* *.s *.o *.a *~ core *.tar.gz gen-tarball \ - copy-sparse + copy-sparse dirpaths.h mostlyclean: clean @@ -58,4 +64,4 @@ distclean: clean # Makefile dependencies follow. This must be the last section in # the Makefile.in file # -subst.o: $(srcdir)/subst.c +subst.o: $(srcdir)/subst.c $(top_builddir)/lib/config.h dirpaths.h --- e2fsprogs-1.42.9.orig/util/subst.c +++ e2fsprogs-1.42.9/util/subst.c @@ -5,6 +5,7 @@ * */ +#include "config.h" #include #include #include @@ -13,6 +14,7 @@ #include #include #include +#include #include #include @@ -264,21 +266,11 @@ static void parse_config_file(FILE *f) /* * Return 0 if the files are different, 1 if the files are the same. */ -static int compare_file(const char *outfn, const char *newfn) +static int compare_file(FILE *old_f, FILE *new_f) { - FILE *old_f, *new_f; char oldbuf[2048], newbuf[2048], *oldcp, *newcp; int retval; - old_f = fopen(outfn, "r"); - if (!old_f) - return 0; - new_f = fopen(newfn, "r"); - if (!new_f) { - fclose(old_f); - return 0; - } - while (1) { oldcp = fgets(oldbuf, sizeof(oldbuf), old_f); newcp = fgets(newbuf, sizeof(newbuf), new_f); @@ -291,8 +283,6 @@ static int compare_file(const char *outf break; } } - fclose(old_f); - fclose(new_f); return retval; } @@ -302,12 +292,14 @@ int main(int argc, char **argv) { char line[2048]; int c; - FILE *in, *out; + int fd; + FILE *in, *out, *old = NULL; char *outfn = NULL, *newfn = NULL; int verbose = 0; int adjust_timestamp = 0; + int got_atime = 0; struct stat stbuf; - struct utimbuf ut; + struct timeval tv[2]; while ((c = getopt (argc, argv, "f:tv")) != EOF) { switch (c) { @@ -351,11 +343,34 @@ int main(int argc, char **argv) } strcpy(newfn, outfn); strcat(newfn, ".new"); - out = fopen(newfn, "w"); - if (!out) { + fd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0444); + if (fd < 0) { perror(newfn); exit(1); } + out = fdopen(fd, "w+"); + if (!out) { + perror("fdopen"); + exit(1); + } + + fd = open(outfn, O_RDONLY); + if (fd > 0) { + /* save the original atime, if possible */ + if (fstat(fd, &stbuf) == 0) { +#if HAVE_STRUCT_STAT_ST_ATIM + tv[0].tv_sec = stbuf.st_atim.tv_sec; + tv[0].tv_usec = stbuf.st_atim.tv_nsec / 1000; +#else + tv[0].tv_sec = stbuf.st_atime; + tv[0].tv_usec = 0; +#endif + got_atime = 1; + } + old = fdopen(fd, "r"); + if (!old) + close(fd); + } } else { out = stdout; outfn = 0; @@ -368,32 +383,49 @@ int main(int argc, char **argv) fputs(line, out); } fclose(in); - fclose(out); if (outfn) { - struct stat st; - if (compare_file(outfn, newfn)) { + fflush(out); + rewind(out); + if (old && compare_file(old, out)) { if (verbose) printf("No change, keeping %s.\n", outfn); if (adjust_timestamp) { - if (stat(outfn, &stbuf) == 0) { - if (verbose) - printf("Updating modtime for %s\n", outfn); - ut.actime = stbuf.st_atime; - ut.modtime = time(0); - if (utime(outfn, &ut) < 0) - perror("utime"); + if (verbose) + printf("Updating modtime for %s\n", outfn); + if (gettimeofday(&tv[1], NULL) < 0) { + perror("gettimeofday"); + exit(1); } + if (got_atime == 0) + tv[0] = tv[1]; + else if (verbose) + printf("Using original atime\n"); +#ifdef HAVE_FUTIMES + if (futimes(fileno(old), tv) < 0) + perror("futimes"); +#else + if (utimes(outfn, tv) < 0) + perror("utimes"); +#endif } - unlink(newfn); + fclose(out); + if (unlink(newfn) < 0) + perror("unlink"); } else { if (verbose) printf("Creating or replacing %s.\n", outfn); - rename(newfn, outfn); + fclose(out); + if (old) + fclose(old); + old = NULL; + if (rename(newfn, outfn) < 0) { + perror("rename"); + exit(1); + } } - /* set read-only to alert user it is a generated file */ - if (stat(outfn, &st) == 0) - chmod(outfn, st.st_mode & ~0222); } + if (old) + fclose(old); return (0); } --- e2fsprogs-1.42.9.orig/version.h +++ e2fsprogs-1.42.9/version.h @@ -8,4 +8,4 @@ */ #define E2FSPROGS_VERSION "1.42.9" -#define E2FSPROGS_DATE "28-Dec-2013" +#define E2FSPROGS_DATE "4-Feb-2014" debian/patches/fix-multiply-claimed.patch0000664000000000000000000001701012571312452015700 0ustar Description: fix rule-violating lblk->pblk mappings on bigalloc filesystems As far as I can tell, logical block mappings on a bigalloc filesystem are supposed to follow a few constraints: * The logical cluster offset must match the physical cluster offset. * A logical cluster may not map to multiple physical clusters. Since the multiply-claimed block recovery code can be used to fix these problems, teach e2fsck to find these transgressions and fix them. Author: Darrick J. Wong Origin: , https://kernel.googlesource.com/pub/scm/fs/ext2/e2fsprogs/+/9a1d614df217c02ea6b2cb0072fccfe706aea111 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1321418 Last-Update: Fri Jul 25 17:34:04 2014 -0700 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ Index: e2fsprogs-1.42.9/e2fsck/pass1.c =================================================================== --- e2fsprogs-1.42.9.orig/e2fsck/pass1.c 2015-08-28 05:53:32.000000000 +0000 +++ e2fsprogs-1.42.9/e2fsck/pass1.c 2015-08-28 06:18:19.810921999 +0000 @@ -1760,6 +1760,40 @@ e2fsck_write_inode(ctx, ino, inode, source); } +/* + * Use the multiple-blocks reclamation code to fix alignment problems in + * a bigalloc filesystem. We want a logical cluster to map to *only* one + * physical cluster, and we want the block offsets within that cluster to + * line up. + */ +static int has_unaligned_cluster_map(e2fsck_t ctx, + blk64_t last_pblk, e2_blkcnt_t last_lblk, + blk64_t pblk, blk64_t lblk) +{ + blk64_t cluster_mask; + + if (!ctx->fs->cluster_ratio_bits) + return 0; + cluster_mask = EXT2FS_CLUSTER_MASK(ctx->fs); + + /* + * If the block in the logical cluster doesn't align with the block in + * the physical cluster... + */ + if ((lblk & cluster_mask) != (pblk & cluster_mask)) + return 1; + + /* + * If we cross a physical cluster boundary within a logical cluster... + */ + if (last_pblk && (lblk & cluster_mask) != 0 && + EXT2FS_B2C(ctx->fs, lblk) == EXT2FS_B2C(ctx->fs, last_lblk) && + EXT2FS_B2C(ctx->fs, pblk) != EXT2FS_B2C(ctx->fs, last_pblk)) + return 1; + + return 0; +} + static void scan_extent_node(e2fsck_t ctx, struct problem_context *pctx, struct process_block_struct *pb, blk64_t start_block, blk64_t end_block, @@ -1923,6 +1957,16 @@ pb->num_blocks++; } + if (has_unaligned_cluster_map(ctx, pb->previous_block, + pb->last_block, blk, + blockcnt)) { + pctx->blk = blockcnt; + pctx->blk2 = blk; + fix_problem(ctx, PR_1_MISALIGNED_CLUSTER, pctx); + mark_block_used(ctx, blk); + mark_block_used(ctx, blk); + } + pb->last_block = blockcnt; pb->previous_block = blk; if (is_dir) { @@ -2374,6 +2418,13 @@ ((unsigned) blockcnt & EXT2FS_CLUSTER_MASK(ctx->fs)))) { mark_block_used(ctx, blk); p->num_blocks++; + } else if (has_unaligned_cluster_map(ctx, p->previous_block, + p->last_block, blk, blockcnt)) { + pctx->blk = blockcnt; + pctx->blk2 = blk; + fix_problem(ctx, PR_1_MISALIGNED_CLUSTER, pctx); + mark_block_used(ctx, blk); + mark_block_used(ctx, blk); } if (blockcnt >= 0) p->last_block = blockcnt; Index: e2fsprogs-1.42.9/e2fsck/pass1b.c =================================================================== --- e2fsprogs-1.42.9.orig/e2fsck/pass1b.c 2013-12-29 04:18:02.000000000 +0000 +++ e2fsprogs-1.42.9/e2fsck/pass1b.c 2015-08-28 06:24:24.526921999 +0000 @@ -261,7 +261,7 @@ e2fsck_t ctx; ext2_ino_t ino; int dup_blocks; - blk64_t cur_cluster; + blk64_t cur_cluster, phys_cluster; struct ext2_inode *inode; struct problem_context *pctx; }; @@ -314,6 +314,7 @@ pb.dup_blocks = 0; pb.inode = &inode; pb.cur_cluster = ~0; + pb.phys_cluster = ~0; if (ext2fs_inode_has_valid_blocks2(fs, &inode) || (ino == EXT2_BAD_INO)) @@ -350,13 +351,14 @@ { struct process_block_struct *p; e2fsck_t ctx; - blk64_t lc; + blk64_t lc, pc; if (HOLE_BLKADDR(*block_nr)) return 0; p = (struct process_block_struct *) priv_data; ctx = p->ctx; lc = EXT2FS_B2C(fs, blockcnt); + pc = EXT2FS_B2C(fs, *block_nr); if (!ext2fs_test_block_bitmap2(ctx->block_dup_map, *block_nr)) goto finish; @@ -369,11 +371,19 @@ p->dup_blocks++; ext2fs_mark_inode_bitmap2(inode_dup_map, p->ino); - if (lc != p->cur_cluster) + /* + * Qualifications for submitting a block for duplicate processing: + * It's an extent/indirect block (and has a negative logical offset); + * we've crossed a logical cluster boundary; or the physical cluster + * suddenly changed, which indicates that blocks in a logical cluster + * are mapped to multiple physical clusters. + */ + if (blockcnt < 0 || lc != p->cur_cluster || pc != p->phys_cluster) add_dupe(ctx, p->ino, EXT2FS_B2C(fs, *block_nr), p->inode); finish: p->cur_cluster = lc; + p->phys_cluster = pc; return 0; } @@ -543,7 +553,11 @@ pctx.dir = t->dir; fix_problem(ctx, PR_1D_DUP_FILE_LIST, &pctx); } - if (file_ok) { + /* + * Even if the file shares blocks with itself, we still need to + * clone the blocks. + */ + if (file_ok && (meta_data ? shared_len+1 : shared_len) != 0) { fix_problem(ctx, PR_1D_DUP_BLOCKS_DEALT, &pctx); continue; } @@ -687,9 +701,10 @@ errcode_t errcode; blk64_t dup_cluster; blk64_t alloc_block; - ext2_ino_t dir; + ext2_ino_t dir, ino; char *buf; e2fsck_t ctx; + struct ext2_inode *inode; }; static int clone_file_block(ext2_filsys fs, @@ -737,13 +752,26 @@ decrement_badcount(ctx, *block_nr, p); cs->dup_cluster = c; - + /* + * Let's try an implied cluster allocation. If we get the same + * cluster back, then we need to find a new block; otherwise, + * we're merely fixing the problem of one logical cluster being + * mapped to multiple physical clusters. + */ + new_block = 0; + retval = ext2fs_map_cluster_block(fs, cs->ino, cs->inode, + blockcnt, &new_block); + if (retval == 0 && new_block != 0 && + EXT2FS_B2C(ctx->fs, new_block) != + EXT2FS_B2C(ctx->fs, *block_nr)) + goto cluster_alloc_ok; retval = ext2fs_new_block2(fs, 0, ctx->block_found_map, &new_block); if (retval) { cs->errcode = retval; return BLOCK_ABORT; } +cluster_alloc_ok: cs->alloc_block = new_block; got_block: @@ -798,6 +826,8 @@ cs.dup_cluster = ~0; cs.alloc_block = 0; cs.ctx = ctx; + cs.ino = ino; + cs.inode = &dp->inode; retval = ext2fs_get_mem(fs->blocksize, &cs.buf); if (retval) return retval; Index: e2fsprogs-1.42.9/e2fsck/problem.c =================================================================== --- e2fsprogs-1.42.9.orig/e2fsck/problem.c 2015-08-28 05:53:32.000000000 +0000 +++ e2fsprogs-1.42.9/e2fsck/problem.c 2015-08-28 06:26:29.050921999 +0000 @@ -966,6 +966,10 @@ N_("@i %i, end of extent exceeds allowed value\n\t(logical @b %c, physical @b %b, len %N)\n"), PROMPT_CLEAR, 0 }, + /* Inode logical block (physical block ) is misaligned. */ + { PR_1_MISALIGNED_CLUSTER, + N_("@i %i logical @b %b (physical @b %c) violates cluster allocation rules.\nWill fix in pass 1B.\n"), + PROMPT_NONE, 0 }, /* Pass 1b errors */ Index: e2fsprogs-1.42.9/e2fsck/problem.h =================================================================== --- e2fsprogs-1.42.9.orig/e2fsck/problem.h 2013-12-29 04:18:02.000000000 +0000 +++ e2fsprogs-1.42.9/e2fsck/problem.h 2015-08-28 06:26:58.334921999 +0000 @@ -565,6 +565,10 @@ #define PR_1_EXTENT_INDEX_START_INVALID 0x01006D #define PR_1_EXTENT_END_OUT_OF_BOUNDS 0x01006E + +/* Inode logical block is misaligned */ +#define PR_1_MISALIGNED_CLUSTER 0x010074 + /* * Pass 1b errors */ debian/patches/fix-debugfs-block-parse-error-reporting0000664000000000000000000001514412261062101020277 0ustar Description: debugfs: restore and tweak original error messaging . In response to reviewer comments, commit fe56188b07 included changes that modified some of the code used to output error messages when checking user-supplied block numbers. These changes converted calls to parse_ulonglong() to calls to strtoblk(). Because strtoblk() calls parse_ulonglong(), and both output error messages, two redundant and relatively generic messages were output on each error. . Fix this by removing the error message output from strtoblk(), and extending it to accept an optional error message argument that it supplies in lieu of a default to parse_ulonglong(). Also, revert to the more descriptive original error messages with mods per reviewer comments, and fix an error message in do_replace_node(). . Author: Eric Whitney Origin: upstream diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index cf7670b..998af33 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -181,7 +181,8 @@ void do_open_filesys(int argc, char **argv) return; break; case 's': - err = strtoblk(argv[0], optarg, &superblock); + err = strtoblk(argv[0], optarg, + "superblock block number", &superblock); if (err) return; break; @@ -284,7 +285,7 @@ void do_init_filesys(int argc, char **argv) return; memset(¶m, 0, sizeof(struct ext2_super_block)); - err = strtoblk(argv[0], argv[2], &blocks); + err = strtoblk(argv[0], argv[2], "blocks count", &blocks); if (err) return; ext2fs_blocks_count_set(¶m, blocks); @@ -2100,7 +2101,7 @@ void do_bmap(int argc, char *argv[]) ino = string_to_inode(argv[1]); if (!ino) return; - err = strtoblk(argv[0], argv[2], &blk); + err = strtoblk(argv[0], argv[2], "logical block", &blk); if (err) return; @@ -2247,11 +2248,11 @@ void do_punch(int argc, char *argv[]) ino = string_to_inode(argv[1]); if (!ino) return; - err = strtoblk(argv[0], argv[2], &start); + err = strtoblk(argv[0], argv[2], "logical block", &start); if (err) return; if (argc == 4) { - err = strtoblk(argv[0], argv[3], &end); + err = strtoblk(argv[0], argv[3], "logical block", &end); if (err) return; } else @@ -2457,7 +2458,9 @@ int main(int argc, char **argv) "block size", 0); break; case 's': - retval = strtoblk(argv[0], optarg, &superblock); + retval = strtoblk(argv[0], optarg, + "superblock block number", + &superblock); if (retval) return 1; break; diff --git a/debugfs/debugfs.h b/debugfs/debugfs.h index 6b4f6ef..33389fa 100644 --- a/debugfs/debugfs.h +++ b/debugfs/debugfs.h @@ -39,7 +39,8 @@ extern unsigned long parse_ulong(const char *str, const char *cmd, const char *descr, int *err); extern unsigned long long parse_ulonglong(const char *str, const char *cmd, const char *descr, int *err); -extern int strtoblk(const char *cmd, const char *str, blk64_t *ret); +extern int strtoblk(const char *cmd, const char *str, const char *errmsg, + blk64_t *ret); extern int common_args_process(int argc, char *argv[], int min_argc, int max_argc, const char *cmd, const char *usage, int flags); diff --git a/debugfs/extent_inode.c b/debugfs/extent_inode.c index b3c55f9..8b22f5e 100644 --- a/debugfs/extent_inode.c +++ b/debugfs/extent_inode.c @@ -264,15 +264,15 @@ void do_replace_node(int argc, char *argv[]) return; } - err = strtoblk(argv[0], argv[1], &extent.e_lblk); + err = strtoblk(argv[0], argv[1], "logical block", &extent.e_lblk); if (err) return; - extent.e_len = parse_ulong(argv[2], argv[0], "logical block", &err); + extent.e_len = parse_ulong(argv[2], argv[0], "length", &err); if (err) return; - err = strtoblk(argv[0], argv[3], &extent.e_pblk); + err = strtoblk(argv[0], argv[3], "physical block", &extent.e_pblk); if (err) return; @@ -338,16 +338,15 @@ void do_insert_node(int argc, char *argv[]) return; } - err = strtoblk(cmd, argv[1], &extent.e_lblk); + err = strtoblk(cmd, argv[1], "logical block", &extent.e_lblk); if (err) return; - extent.e_len = parse_ulong(argv[2], cmd, - "length", &err); + extent.e_len = parse_ulong(argv[2], cmd, "length", &err); if (err) return; - err = strtoblk(cmd, argv[3], &extent.e_pblk); + err = strtoblk(cmd, argv[3], "physical block", &extent.e_pblk); if (err) return; @@ -385,11 +384,11 @@ void do_set_bmap(int argc, char **argv) return; } - err = strtoblk(cmd, argv[1], &logical); + err = strtoblk(cmd, argv[1], "logical block", &logical); if (err) return; - err = strtoblk(cmd, argv[2], &physical); + err = strtoblk(cmd, argv[2], "physical block", &physical); if (err) return; @@ -516,7 +515,7 @@ void do_goto_block(int argc, char **argv) "block [level]", 0)) return; - if (strtoblk(argv[0], argv[1], &blk)) + if (strtoblk(argv[0], argv[1], NULL, &blk)) return; if (argc == 3) { diff --git a/debugfs/icheck.c b/debugfs/icheck.c index 48f432a..3b9bd14 100644 --- a/debugfs/icheck.c +++ b/debugfs/icheck.c @@ -86,7 +86,7 @@ void do_icheck(int argc, char **argv) } for (i=1; i < argc; i++) { - if (strtoblk(argv[0], argv[i], &bw.barray[i-1].blk)) + if (strtoblk(argv[0], argv[i], NULL, &bw.barray[i-1].blk)) goto error_out; } diff --git a/debugfs/util.c b/debugfs/util.c index aafbc56..21991cf 100644 --- a/debugfs/util.c +++ b/debugfs/util.c @@ -301,17 +301,20 @@ unsigned long long parse_ulonglong(const char *str, const char *cmd, /* * This function will convert a string to a block number. It returns - * 0 on success, 1 on failure. + * 0 on success, 1 on failure. On failure, it outputs either an optionally + * specified error message or a default. */ -int strtoblk(const char *cmd, const char *str, blk64_t *ret) +int strtoblk(const char *cmd, const char *str, const char *errmsg, + blk64_t *ret) { blk64_t blk; int err; - blk = parse_ulonglong(str, cmd, "block number", &err); + if (errmsg == NULL) + blk = parse_ulonglong(str, cmd, "block number", &err); + else + blk = parse_ulonglong(str, cmd, errmsg, &err); *ret = blk; - if (err) - com_err(cmd, 0, "Invalid block number: %s", str); return err; } @@ -369,7 +372,7 @@ int common_block_args_process(int argc, char *argv[], " [count]", CHECK_FS_BITMAPS)) return 1; - if (strtoblk(argv[0], argv[1], block)) + if (strtoblk(argv[0], argv[1], NULL, block)) return 1; if (*block == 0) { com_err(argv[0], 0, "Invalid block number 0"); @@ -377,7 +380,7 @@ int common_block_args_process(int argc, char *argv[], } if (argc > 2) { - err = strtoblk(argv[0], argv[2], count); + err = strtoblk(argv[0], argv[2], "count", count); if (err) return 1; } debian/patches/series0000664000000000000000000000026712571312452012043 0ustar fix-spec-file-version fix-printf-format-type-match fix-debugfs-block-parse-error-reporting update-to-git-f3ff319f79 CVE-2015-0247.patch CVE-2015-1572.patch fix-multiply-claimed.patch debian/libuuid1.postrm0000664000000000000000000000013311750766346012170 0ustar #!/bin/sh set -e if [ "$1" = purge ] then rm -rf /var/lib/libuuid fi #DEBHELPER# exit 0 debian/ss-dev.files0000664000000000000000000000021311750766346011430 0ustar usr/lib/*/libss.so usr/lib/*/libss.a usr/include/ss/* usr/bin/mk_cmds usr/share/ss/* usr/share/man/man1/mk_cmds* usr/lib/*/pkgconfig/ss.pc debian/control.in0000664000000000000000000003131612301111177011176 0ustar define(MULTIARCH_HEADERS,ifdef(`DO_MULTIARCH', Multi-Arch: same Pre-Depends: ${misc:Pre-Depends},REMOVE_ME))dnl define(UTIL_LINUX_NG_DEFINES, ifdef(`UTIL_LINUX_NG', ``libblkid-dev (>= 2.16), uuid-dev (>= 2.16),''))dnl define(DIETLIBC_DEFINES, ifdef(`DIETLIBC', ``dietlibc-dev (>> 0.30) [alpha amd64 arm hppa i386 ia64 powerpc ppc64 s390 sparc],''))dnl Source: e2fsprogs Section: admin Priority: required Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Theodore Y. Ts'o Build-Depends: gettext, texinfo, pkg-config, DIETLIBC_DEFINES gcc-multilib [mips mipsel], debhelper (>= 7.0), UTIL_LINUX_NG_DEFINES m4, autotools-dev Standards-Version: 3.9.5 Homepage: http://e2fsprogs.sourceforge.net ifdef(`E2FSCK_STATIC',`` Package: e2fsck-static Priority: optional Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: sash | bash-static | zsh-static | busybox-static | zsh30-static Architecture: any Description: statically-linked version of the ext2/ext3/ext4 filesystem checker This may be of some help to you if your filesystem gets corrupted enough to break the shared libraries used by the dynamically linked checker. . This binary takes much more space than its dynamic counterpart located in e2fsprogs, though. . You may want to install a statically-linked shell as well, to be able to run this program if something like your C library gets corrupted. '')dnl Package: libcomerr2 Section: libs Provides: libcomerr-kth-compat Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: e2fsprogs (<< 1.34-1) Architecture: any MULTIARCH_HEADERS Description: common error description library libcomerr is an attempt to present a common error-handling mechanism to manipulate the most common form of error code in a fashion that does not have the problems identified with mechanisms commonly in use. Package: comerr-dev Section: libdevel Priority: extra Depends: libc6-dev | libc-dev, libcomerr2 (= ${mainBinary}), ${misc:Depends} Suggests: doc-base Replaces: e2fslibs-dev (<< 1.33-2), libkrb5-dev (<< 1.3) Architecture: any Description: common error description library - headers and static libraries libcom_err is an attempt to present a common error-handling mechanism to manipulate the most common form of error code in a fashion that does not have the problems identified with mechanisms commonly in use. . This package contains the development environment for the com_err library. Package: libss2 Section: libs Depends: libcomerr2, ${shlibs:Depends}, ${misc:Depends} Replaces: e2fsprogs (<< 1.34-1) Architecture: any MULTIARCH_HEADERS Description: command-line interface parsing library libss provides a simple command-line interface parser which will accept input from the user, parse the command into an argv argument vector, and then dispatch it to a handler function. . It was originally inspired by the Multics SubSystem library. Package: ss-dev Section: libdevel Priority: extra Depends: libc6-dev | libc-dev, libss2 (= ${mainBinary}), comerr-dev, ${misc:Depends} Architecture: any Description: command-line interface parsing library - headers and static libraries This package includes a tool that parses a command table to generate a simple command-line interface parser, the include files needed to compile and use it, and the static libs. . It was originally inspired by the Multics SubSystem library. . This package contains the development environment for the ss library. ifdef(`UTIL_LINUX_NG',,`` Package: libuuid1 Section: libs Depends: passwd, ${shlibs:Depends}, ${misc:Depends} Recommends: uuid-runtime Replaces: e2fsprogs (<< 1.34-1) Architecture: any MULTIARCH_HEADERS Description: Universally Unique ID library The libuuid library generates and parses 128-bit universally unique ids (UUIDs). A UUID is an identifier that is unique across both space and time, with respect to the space of all UUIDs. A UUID can be used for multiple purposes, from tagging objects with an extremely short lifetime, to reliably identifying very persistent objects across a network. . See RFC 4122 for more information. Package: uuid-runtime Section: libs Priority: optional Depends: passwd, libuuid1 (>> 1.40.3-1), ${shlibs:Depends}, ${misc:Depends} Replaces: e2fsprogs (<= 1.40.3-1ubuntu1) Architecture: any Description: runtime components for the Universally Unique ID library The libuuid library generates and parses 128-bit universally unique ids (UUIDs). A UUID is an identifier that is unique across both space and time, with respect to the space of all UUIDs. A UUID can be used for multiple purposes, from tagging objects with an extremely short lifetime, to reliably identifying very persistent objects across a network. . See RFC 4122 for more information. . This package contains the uuidgen program and the uuidd daemon. . The uuidd daemon is used to generate UUIDs, especially time-based UUID’s, in a secure and guaranteed-unique fashion, even in the face of large numbers of threads trying to grab UUID’s running on different CPU’s. It is used by libuuid as well as the uuidgen program. Package: libuuid1-udeb XC-Package-Type: udeb Section: debian-installer Priority: optional Depends: ${shlibs:Depends} Architecture: any Description: stripped down universally unique id library, for debian-installer libuuid generates and parses 128-bit universally unique ids (UUIDs). See RFC 4122 for more information. . This is a minimal package for debian-installer. Package: uuid-dev Section: libdevel Priority: extra Depends: libc6-dev | libc-dev, libuuid1 (= ${mainBinary}), ${misc:Depends} Replaces: e2fslibs-dev (<< 1.15) Architecture: any Description: universally unique id library - headers and static libraries libuuid generates and parses 128-bit universally unique ids (UUIDs). See RFC 4122 for more information. . This package contains the development environment for the uuid library. Package: libblkid1 Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Architecture: any Description: block device id library The blkid library which allows system programs like fsck and mount to quickly and easily find block devices by filesystem UUID and LABEL. This allows system administrators to avoid specifying filesystems by hard-coded device names, but via a logical naming system instead. Package: libblkid1-udeb XC-Package-Type: udeb Section: debian-installer Priority: optional Depends: ${shlibs:Depends}, ${misc:Depends} Architecture: any Description: stripped down block device id library, for debian-installer The blkid library which allows system programs like fsck and mount to quickly and easily find block devices by filesystem UUID and LABEL. This allows system administrators to avoid specifiying filesystems by hard-coded device names, but via a logical naming system instead. . This is a minimal package for debian-installer. Package: libblkid-dev Section: libdevel Priority: extra Depends: libc6-dev | libc-dev, libblkid1 (= ${binary:Version}), ${misc:Depends} Architecture: any Description: block device id library - headers and static libraries The blkid library which allows system programs like fsck and mount to quickly and easily find block devices by filesystem UUID and LABEL. This allows system administrators to avoid specifiying filesystems by hard-coded device names, but via a logical naming system instead. . This package contains the development environment for the blkid library. '')dnl Package: e2fsprogs-udeb XC-Package-Type: udeb Section: debian-installer Priority: optional Depends: ${shlibs:Depends}, ${misc:Depends} Architecture: any Description: stripped-down versions of e2fsprogs, for debian-installer This package is an e2fsprogs package built for a reduced size, so that it can help to save space in debian-installer. . Don't attempt to install this package, it has no support for a couple of features you surely want. Anyway it should refuse to install. Package: e2fslibs Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: e2fsprogs (<< 1.34-1) Provides: libext2fs2, libe2p2 Architecture: any MULTIARCH_HEADERS Description: ext2/ext3/ext4 file system libraries The ext2, ext3 and ext4 file systems are successors of the original ext ("extended") file system. They are the main file system types used for hard disks on Debian and other Linux systems. . This package provides the ext2fs and e2p libraries, for userspace software that directly accesses extended file systems. Programs that use libext2fs include e2fsck, mke2fs, and tune2fs. Programs that use libe2p include dumpe2fs, chattr, and lsattr. Package: e2fslibs-dev Section: libdevel Priority: extra Depends: libc6-dev | libc-dev, comerr-dev, e2fslibs (= ${binary:Version}), ${misc:Depends} Suggests: doc-base Provides: ext2fs-dev, e2p-dev Replaces: libkrb5-dev (<< 1.3) Architecture: any Description: ext2/ext3/ext4 file system libraries - headers and static libraries The ext2, ext3 and ext4 file systems are successors of the original ext ("extended") file system. They are the main file system types used for hard disks on Debian and other Linux systems. . This package contains the development environment for the ext2fs and e2p libraries. Package: e2fsprogs Essential: yes ifdef(`UTIL_LINUX_NG', ``Pre-Depends: ${shlibs:Depends}, ${misc:Depends}, util-linux (>= 2.15~rc1-1) '', ``Pre-Depends: ${shlibs:Depends}, ${misc:Depends} '')dnl Multi-Arch: foreign Suggests: gpart, parted, e2fsck-static Conflicts: dump (<< 0.4b4-4), quota (<< 1.55-8.1), initscripts (<< 2.85-4), sysvinit (<< 2.85-4) Replaces: hurd (<= 20040301-1), libblkid1 (<< 1.38+1.39-WIP-2005.12.10-2), libuuid1 (<< 1.38+1.39-WIP-2005.12.10-2) Architecture: any Description: ext2/ext3/ext4 file system utilities The ext2, ext3 and ext4 file systems are successors of the original ext ("extended") file system. They are the main file system types used for hard disks on Debian and other Linux systems. . This package contains programs for creating, checking, and maintaining ext2/3/4-based file systems. It also includes the "badbocks" program, which can be used to scan for bad blocks on a disk or other storage device. Package: e2fsprogs-dbg Section: debug Priority: extra Depends: e2fsprogs (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for e2fsprogs This package includes the debug information useful for debugging e2fsprogs and its libraries, contained in the e2fsprogs and e2fsck-static packages. The debug information is used for execution tracing and core dump analysis. ifdef(`UTIL_LINUX_NG',,`` Package: uuid-runtime-dbg Section: debug Priority: extra Depends: uuid-runtime (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for uuid-runtime This package includes the debug information useful for debugging the uuid runtime programs, contained in the uuid-runtime package. The debugging information is used for execution tracing and core dump analysis. '')dnl Package: e2fslibs-dbg Section: debug Priority: extra Depends: e2fslibs (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for e2fslibs This package includes the debug information useful for debugging the ext2fs and e2p libraries, contained in the e2fslibs package. The debug information is used for execution tracing and core dump analysis. Package: libcomerr2-dbg Section: debug Priority: extra Depends: libcomerr2 (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for libcomerr2 This package includes the debug information useful for debugging the com_err library, contained in the libcomerr2 package. The debugging information is used for execution tracing and core dump analysis. Package: libss2-dbg Section: debug Priority: extra Depends: libss2 (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for libss2 This package includes the debug information useful for debugging the ss library, contained in the libss2 package. The debug information is used for execution tracing and core dump analysis. ifdef(`UTIL_LINUX_NG',,`` Package: libblkid1-dbg Section: debug Priority: extra Depends: libblkid1 (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for libblkid1 This package includes the debug information useful for debugging the blkid library, contained in the libblkid1 package. The debug information is used for execution tracing and core dump analysis. Package: libuuid1-dbg Section: debug Priority: extra Depends: libuuid1 (= ${binary:Version}), ${misc:Depends} Architecture: any Description: debugging information for libuuid1 This package includes the debug information useful for debugging the UUID library, contained in the libuuid1 package. The debug information is used for execution tracing and core dump analysis. '')dnl debian/libblkid.copyright0000664000000000000000000000120511750766346012713 0ustar This package was added to the e2fsprogs debian source package by Theodore Ts'o on Sat Mar 15 15:33:37 EST 2003 It is part of the main e2fsprogs distribution, which can be found at: http://sourceforge.net/projects/e2fsprogs Upstream Author: Theodore Ts'o Copyright: Copyright (C) 1999, 2001 by Andries Brouwer Copyright (C) 1999, 2000, 2003 by Theodore Ts'o You are free to distribute this software under the terms of the GNU Lesser (Library) General Public License. On Debian systems, the complete text of the GNU Lesser (Library) General Public License can be found in /usr/share/common-licenses/LGPL-2. debian/libcomerr2.files0000664000000000000000000000002712162020142012241 0ustar lib/*/libcom_err*.so.* debian/e2fsprogs.shlibs.local0000664000000000000000000000024111750766346013415 0ustar libcom_err 2 libcomerr2 (>= 1.42~WIP-2011-10-05-1) libss 2 libss2 (>= 1.34-1) libext2fs 2 e2fslibs (= ${Source-Version}) libe2p 2 e2fslibs (= ${Source-Version}) debian/uuid-runtime.copyright0000664000000000000000000000336311750766346013575 0ustar This package was added to the e2fsprogs debian source package by Theodore Ts'o on Fri Dec 14 22:24:35 EST 2007 It is part of the main e2fsprogs distribution, which can be found at: http://sourceforge.net/projects/e2fsprogs Upstream Author: Theodore Ts'o Copyright: Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by Theodore Ts'o Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, and the entire permission notice in its entirety, including the disclaimer of warranties. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/e2fslibs.files.in0000664000000000000000000000005112162020142012314 0ustar lib/*/libext2fs*.so.* lib/*/libe2p*.so.* debian/shlibs.local0000664000000000000000000000010211750766346011500 0ustar libext2fs 2 libe2p 2 libuuid 1 libcom_err 2 libss 2 libblkid 1 debian/copyright0000664000000000000000000000700211750766346011141 0ustar This is the Debian GNU/Linux prepackaged version of the EXT2 file system utilities (e2fsck, mke2fs, etc.). The EXT2 utilities were written by Theodore Ts'o and Remy Card . Sources were obtained from http://sourceforge.net/projects/e2fsprogs Packaging is Copyright (c) 2003-2007 Theodore Ts'o Copyright (c) 1997-2003 Yann Dirson Copyright (c) 2001 Alcove Copyright (c) 1997 Klee Dienes Copyright (c) 1995-1996 Michael Nonweiler Upstream Author: Theodore Ts'o Copyright notice: This package, the EXT2 filesystem utilities, are made available under the GNU Public License version 2, with the exception of the lib/ext2fs and lib/e2p libraries, which are made available under the GNU Library General Public License Version 2, the lib/uuid library which is made available under a BSD-style license and the lib/et and lib/ss libraries which are made available under an MIT-style license. Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o On Debian GNU systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. The complete text of the GNU Library General Public License can be found in '/usr/share/common-licenses/LGPL-2'. The license used for lib/et and lib/ss libraries is: Copyright 1987 by the Student Information Processing Board of the Massachusetts Institute of Technology Permission to use, copy, modify, and distribute this software and its documentation for any purpose is hereby granted, provided that the names of M.I.T. and the M.I.T. S.I.P.B. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. and the M.I.T. S.I.P.B. make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. The license used for lib/uuid is: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, and the entire permission notice in its entirety, including the disclaimer of warranties. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/ss-dev.files.in0000664000000000000000000000021311750766346012035 0ustar usr/lib/*/libss.so usr/lib/*/libss.a usr/include/ss/* usr/bin/mk_cmds usr/share/ss/* usr/share/man/man1/mk_cmds* usr/lib/*/pkgconfig/ss.pc debian/changelog0000664000000000000000000055207712571312454011066 0ustar e2fsprogs (1.42.9-3ubuntu1.3) trusty; urgency=medium * fix rule-violating lblk->pblk mappings on bigalloc filesystems (LP: #1321418) -- Seyeong Kim Tue, 01 Sep 2015 07:08:12 -0500 e2fsprogs (1.42.9-3ubuntu1.2) trusty-security; urgency=medium * SECURITY UPDATE: heap overflow via block group descriptor information - debian/patches/CVE-2015-0247.patch: limit first_meta_bg in lib/ext2fs/closefs.c, lib/ext2fs/openfs.c. - CVE-2015-0247 * SECURITY UPDATE: buffer overflow in closefs() - debian/patches/CVE-2015-1572.patch: properly check against fs->desc_blocks in lib/ext2fs/closefs.c. - CVE-2015-1572 -- Marc Deslauriers Mon, 16 Feb 2015 13:44:13 -0500 e2fsprogs (1.42.9-3ubuntu1) trusty; urgency=medium * Merge from Debian unstable, remainging changes: - debian/rules: Block pkg-create-dbgsym from operating on this package. Build without dietlibc-dev, which is in universe Use the autotools-dev dh addon to update config.guess/config.sub for new ports. - debian/control: Regenerate with ./debian/rules debian/control -- Dimitri John Ledkov Wed, 19 Feb 2014 11:19:03 +0000 e2fsprogs (1.42.9-3) unstable; urgency=medium * Add the ability for mke2fs to create hugefiles * Add support for the sparse_super2 compat feature * Mke2fs can now force all of the metadata blocks to be at the beginning of the file system * Fix loopback mount detection (Closes: #497984) * Add support to mke2fs to create a file system at an offset (Closes: #417385) * Mention badblocks in the package description (Closes: #718725) * Update/fix various man pages (Closes: #719184, #719189) * Improve e2fsck's "superblock corrupt" message (Closes: #719185) * Miscellaneous Coverity clean ups -- Theodore Y. Ts'o Tue, 04 Feb 2014 22:17:22 -0500 e2fsprogs (1.42.9-2ubuntu1) trusty; urgency=medium * Merge from Debian unstable, remainging changes: - debian/rules: Block pkg-create-dbgsym from operating on this package. Build without dietlibc-dev, which is in universe Use the autotools-dev dh addon to update config.guess/config.sub for new ports. - debian/control: Regenerate with ./debian/rules debian/control * Dropped changes, already in upstream/debian: Apply multiarch fixes to the blkid version check. Fixes cross-FTBFS. -- Dimitri John Ledkov Wed, 01 Jan 2014 18:56:08 +0000 e2fsprogs (1.42.9-2) unstable; urgency=low * Fix lintian warning: debian-changelog-has-wrong-weekday * Fix lintian warning: non-standard-dir-perm by using dh_strip's --dbg-package option instead of manually managing the debug files * Fix printf type format mismatch in e2image * Improved debugfs's error reporting when parsing block numbers * Use consistent configure options across the multiple e2fsprogs builds; this means that e2fsck.static will now use the blkid library shipped with util-linux, instead of the internal one shipped with the e2fsprogs sources. -- Theodore Y. Ts'o Mon, 30 Dec 2013 16:56:50 -0500 e2fsprogs (1.42.9-1) unstable; urgency=low * New upstream version * NMU ack (Closes: #698879) * Fix cross-build support (Closes: #721365) * mke2fs will detect an attempt to create a file system on a loop-mounted image file * Fixed a large number of bugs in resize2fs, e2fsck, debugfs, to handle bigalloc and 64-bit file systems. * Tune2fs will no longer allow changing the uuid on a mounted file system with the uninit_bg feature enabled. * E2fsck will properly allocate a new extent tree block in the rare case where one is needed when rehashing an extent-mapped directory. * Mke2fs wil now properly set the LARGE_FILE feature when creating a journal > 2GB. * Debugfs will now correctly handle free a range of inodes using the freei command. * E2fsck will no longer complain if an external journal was exactly 2**32 blocks. * E2fsck will not longer try to add a missing lost+found directory when run in read-only mode. * Fixed some buffer overrun bugs when creating standard e2image files * Mke2fs will not try to set both the meta_bg and resize_inode feature when the extended option "-E resize=NNN" is specified by the user. * Dumpe2fs will no longer abort when trying to print the journal information from an e2image-created image file. * Debugfs's "write" command can now create a sparse files * Debugfs can now support a command line which is up to 8k long * E2image will refuse to create a raw or qcomw image using a mounted file system unless the -f option is given. * E2image has been made more useful for efficiently copying file systems using the -ra options. New options to help with this use case that were added: -o, -O, -p, and -c. * Fixed a regression introduced in 1.42.8 which would cause e2fsck to erroneously report uninitialized extents past i_size to be invalid. * Fixed cases where resize2fs could corrupt a file system, especially when shrinking a file system. (Closes: #660793) * Fixed resize2fs and e2fsck to not crash when operating on a file system with the MMP feature enabled. * Fixed debugfs's write command to properly create a zero-length file (instead of creating an invalid inode). * Fixed e2fsck to not crash when trying to delete an invalid extent-mapped symlink. * Improved debugfs's help texts * Fixed a potential integer overflow problem in e2freefrag (Closes: #718205) * The config.guess and config.sub files have been updated to the latest to help with the ppcle port. (Closes: #732076) * Updated/fixed various man pages. (Closes: #586218, #669730, #698076, #731329) -- Theodore Y. Ts'o Sat, 28 Dec 2013 23:18:36 -0500 e2fsprogs (1.42.8-1ubuntu3) trusty; urgency=low * Fix stamp file handling so that the last change takes effect. -- Colin Watson Fri, 13 Dec 2013 18:16:10 +0000 e2fsprogs (1.42.8-1ubuntu2) trusty; urgency=low * Use the autotools-dev dh addon to update config.guess/config.sub for new ports. -- Colin Watson Fri, 13 Dec 2013 16:03:40 +0000 e2fsprogs (1.42.8-1ubuntu1) saucy; urgency=low * Merge from Debian unstable, remainging changes (LP: #1193216) : Update maintainer field. - debian/rules: Block pkg-create-dbgsym from operating on this package. Build without dietlibc-dev, which is in universe Apply multiarch fixes to the blkid version check. Fixes cross-FTBFS. - debian/control: Regenerate with ./debian/rules debian/control * Dropped changes, already in upstream/debian: - debian/control.in: Drop build dependency on dc, which hasn't been needed for some time. - debian/patches/fix-ftbfs-undefined-symbols.patch: Add a patch from Sourceforge Issue 3554345, to fix linking order. - debian/patches/sp_filesystme.patch: Spelling fix 'filesystme' for debugfs help. -- Dmitrijs Ledkovs Mon, 24 Jun 2013 11:33:44 +0100 e2fsprogs (1.42.8-1) unstable; urgency=low * New upstream version * Work around Debian Bug #712530 (Closes: #708307) * Fix e2fsck so it can check a read-only root file system with an external journal. (Closes: #707030) * Fix off-line resizing of file systems with flex_bg && !resize_inode (Closes: #696746) * Change mke2fs so that it does not set the root directory to the real uid/gid of the mke2fs process. Add the extended option root_owner to override this behavior. * If an invalid journal size is given to mke2fs, it will now complain and exit sooner. * Fix resize2fs when shrinking file systems to make sure that bitmap blocks aren't left outside the bounds of the shrunken file system. This could happen with flex_bg file systems that were grown using the old online resizing algorithm. * E2fsck will now detect and repair corrupted extent trees which contain invalid extents at the end of the extent tree leaf block. * E2fsck will now longer complain about zero length extended attribute values. * Fix a regression introduced in e2fsprogs v1.42 which caused e2image -s to crash. * Add safety check so tune2fs will not attempt to set the inode size to be larger than the block size. * Enhance chattr to allow clearing the extent flag if the kernel allows it * Fix e2image with large (> 32-bit) file systems (Closes: #703067) * Mke2fs will not give warnings about the bigalloc and quota options in quiet mode. * Debugfs was erroneously giving spurious error messages for certain extent_inode subcommands which take arguments (split_node, replace_node, and insert_node). This has been fixed. * Fix the parsing of the 's' (sectors) in parse_num_blocks2, which among other programs is used by mke2fs. * Fix texinfo incompatibilities (Closes: #712365) * Updated/fixed various man pages (Closes: #712429, #712430, #707609) * Update German translation -- Theodore Y. Ts'o Thu, 20 Jun 2013 23:09:25 -0500 e2fsprogs (1.42.7-1) unstable; urgency=low * New upstream version * Add warning indicating that the quota and bigalloc features are still under development. * Added new options to filefrag to be consistent with the version from Lustre * Optimized e2fsck's CPU utilization * Fixed e2fsck so it detects and fixes inconsistencies in the interior nodes of an inode's extent tree * Fixed a potential memory corruption failure in e2fsck's error path if the call to ext2fs_open2() fails. * Fixed e2fsck if its logging function is enabled in e2fsck.conf, and the resulting file name for the log file is longer than 100 bytes, that it properly handles this situation instead of crashing. * E2fsck will now report the amount of memory that it attempted to allocate when a memory allocation request fails, to make it easier to track down the problem. * Fixed a bug in resize2fs which could cause severe file system corruption when growing an ext4 file system which was formatted with fewer-than-normal reserved gdt blocks * Fixed resize2fs to be able to handle off-line resizes of file systems with the flex_bg feature and without any reserved gdt blocks or if the file system did not have the resize_inode feature * Further optimize resize2fs so it doesn't use quite as much CPU when resizing very large file systems. * Fixed 32-bit overflow bugs which could cause resize2fs to fail and possibly corrupt the file system while resizing 64-bit file systems. * Fixed a big which could cause resize2fs to corrupt bigalloc file systems. * Fix a crash while mke2fs is parsing "-E resize=NNN" with the 64bit file system feature enabled * Added better error checking to mke2fs to check for invalid parameters when creating bigalloc file system. * When creating bigalloc filesystems, the -g option to mke2fs will now specify the number of clusters per block group. * Added the "symlink", "zap_block", "block_dump", and "extent_open" commands to debugfs * Fixed debugfs's htree command so that all its messages are sent through the pager. * Fixed debugfs's dump_file and cat functions so they work correctly on file systems with a block size greater than 8k. * Fixed mke2fs's handling of the mmp_update_interval option * Fixed e2freefrag so it works on 64-bit file systems, and so it uses much less memory. * E2image can now include all data blocks in the e2image output file when the user specifies the -a option. * Fixed debugfs's mknod command so that it updates the block group statistics * Document the bigalloc feature in the mke2fs man page. (Closes: #669730) * Update Czech, Dutch, French, German, Polish, Sweedish, and Vietnamese translations -- Theodore Y. Ts'o Tue, 21 Jan 2013 21:52:58 -0500 e2fsprogs (1.42.6-1) unstable; urgency=low * New upstream version * Fix build dependencies to avoid requiring dc, and to allow cross-building to work (Closes: #677497) * Updated/fixed various man pages * Mke2fs will now update its progress indicators at most once a second to avoid overwhelming serial consoles. * Resize2fs will support lazy_itable_init, speeding up off-line growth of uninit_bg file systems. * Resize2fs now supports on-line resizing 64-bit file systems beyond 16TB. A number of bugs in resize2fs which prevented this have been fixed. * Resize2fs now correctly handles resizing 32-bit file systems to 16TB. * Fixed a potential segfault in e2fsck when there is an I/O error while reading the superblock. -- Theodore Y. Ts'o Fri, 21 Sep 2012 12:14:41 -0400 e2fsprogs (1.42.5-1.1ubuntu1) saucy; urgency=low * Merge from Debian unstable, remainging changes: - debian/control.in: Drop build dependency on dc, which hasn't been needed for some time. Update maintainer field. - debian/rules: Block pkg-create-dbgsym from operating on this package. Build without dietlibc-dev, which is in universe Apply multiarch fixes to the blkid version check. Fixes cross-FTBFS. - debian/control: Regenerate with ./debian/rules debian/control - debian/patches/fix-ftbfs-undefined-symbols.patch: Add a patch from Sourceforge Issue 3554345, to fix linking order. - debian/patches/sp_filesystme.patch: Spelling fix 'filesystme' for debugfs help. -- Dmitrijs Ledkovs Thu, 23 May 2013 14:08:40 +0100 e2fsprogs (1.42.5-1.1) unstable; urgency=low * Non-maintainer upload. * e2fsck-static, e2fsprogs: let preinst remove a symbolic link in /usr/share/doc, that should have been replaced with a directory since 1.39+1.40-WIP-2006.10.02+dfsg-1. (Closes: #698879). -- Nicolas Boulenguez Fri, 22 Feb 2013 23:14:59 +0100 e2fsprogs (1.42.5-1ubuntu4) raring; urgency=low * Apply multiarch fixes to the blkid version check. Fixes cross-FTBFS. -- Dmitrijs Ledkovs Wed, 02 Jan 2013 11:13:49 +0000 e2fsprogs (1.42.5-1ubuntu3) raring; urgency=low * Revert build-dependency from gettext:any to gettext, now that gettext is Multi-Arch: foreign. -- Colin Watson Thu, 29 Nov 2012 15:13:20 +0000 e2fsprogs (1.42.5-1ubuntu2) quantal; urgency=low * Spelling fix 'filesystme' for debugfs help -- Bryce Harrington Fri, 17 Aug 2012 16:55:30 -0700 e2fsprogs (1.42.5-1ubuntu1) quantal; urgency=low * Merge from Debian unstable, remainging changes: - debian/control.in: Build-depend on gettext:any instead of on gettext for (cross-building) Drop build dependency on dc, which hasn't been needed for some time. Update maintainer field. - debian/rules: Block pkg-create-dbgsym from operating on this package. Build without dietlibc-dev, which is in universe - debian/control: Regenerate with ./debian/rules debian/control - debian/patches/fix-ftbfs-undefined-symbols.patch: Add a patch from Sourceforge Issue 3554345, to fix linking order. -- Dmitrijs Ledkovs Tue, 14 Aug 2012 11:43:29 +0100 e2fsprogs (1.42.5-1) unstable; urgency=low * New upstream version * Mark the e2fsprogs package as Multi-Arch: foreign, so if a package foo:i386 depends on e2fsprogs and is installed on an amd64 system, the native e2fsprogs will satisfy the dependency. (Closes: #678395) * Fix a fd leak which could cause logsave (and hence a boot-time rc init script) to hang (Closes: #682592) * Fix a problem if e2fsck where if the root file system is mounted read-only, e2fsck would not clear an error indication in the journal superblock. Combined with a kernel bug, this would cause the e2fsck to check the file system after every single boot * Fixed filefrag so it would not seg fault on virtual filesystems such as /proc: e.g., "filefrag /proc/partitions" * Fix filefrag so that it correctly reports the number of extents * Fixed a bug which caused "mke2fs -N 256 -t ext4 /tmp/foo.img 256m" to write blocks out until /tmp filled * Fixed a bug in how e2fsck would uniquify directory entry names * Change e2fsck so it will allow file systems mounted read-only to be checked with the -f option. * Fix e2fsck so that the file system is marked as containing an error if the user chooses not to fix the quota usage information. * Fix tune2fs so that it correctly removes the quota feature when the last quota inode is removed. * Fix tune2fs so that after removing a quota inode, the block bitmap is updated; otherwise, e2fsck would complain after running 'tune2fs -O ^quota '. * Fix tune2fs so that when converting a file system from using legacy quota files to the new quota file system feature with hidden quota files, the accounting for these files is handled correctly so that e2fsck doesn't complain. * The e4defrag program now allows device symlinks, such as /dev/mapper/testvg-testlv, instead of insisting on less human-friendly names such as /dev/dm-2 * Updated/fixed various man pages (Closes: #680114) -- Theodore Y. Ts'o Sun, 29 Jul 2012 19:59:56 -0400 e2fsprogs (1.42.4-3ubuntu1) quantal; urgency=low * Merge from Debian unstable (LP: #978012), remainging changes: - debian/control.in: Build-depend on gettext:any instead of on gettext for (cross-building) Drop build dependency on dc, which hasn't been needed for some time. Update maintainer field. - debian/rules: Block pkg-create-dbgsym from operating on this package. Build without dietlibc-dev, which is in universe - debian/control: Regenerate with ./debian/rules debian/control -- Dmitrijs Ledkovs Thu, 14 Jun 2012 13:01:21 +0100 e2fsprogs (1.42.4-3) unstable; urgency=medium * Add the -C option to chattr's usage message * Fix e2fsprogs so it is blhc (build log hardening check) clean. This fixed e2fsck.static which previously was not getting built with the security hardening flags. -- Theodore Y. Ts'o Wed, 13 Jun 2012 16:03:24 -0400 e2fsprogs (1.42.4-2) unstable; urgency=medium * Fix FTBFS problem on the hurd and freebsd platforms -- Theodore Y. Ts'o Tue, 12 Jun 2012 18:26:40 -0400 e2fsprogs (1.42.4-1) unstable; urgency=medium * New upstream version * Fix 64-bit block number bugs in e2fsck, dumpe2fs, and debugfs which could corrupt file systems * Fixed e2fsck's handling of how errors propagate from the journal to the file system superblock * Fixed a false positive complaint from e2fsck if all of the extents in the last extent block are uninitialized and located after the end of the file. * dumpe2fs will display the journal's error indicator in the superblock if it is set * Fixed a bug which caused e2fsck to incorrectly use O_EXCLUSIVE in some corner cases. * Fix truncation of extent-mapped inodes in e2fsck and libext2fs * Fixed i_blocks accounting in bigalloc file systems. * Add support for btrfs's No_COW flag to lsattr and chattr * Debugfs interprets the date strings of the form "@ddd" as ddd seconds after the epoch * Updated/fixed various man pages (Closes: #674453, #674694) -- Theodore Y. Ts'o Tue, 12 Jun 2012 18:20:55 -0400 e2fsprogs (1.42.3-1) unstable; urgency=low * New upstream version * Fix bugs on 32-bit systems which could corrupt > 16TB file systems * Quiet complaints in e2fsck when the total free blocks or inodes are incorrect in the superblock after an system crash, since we don't update nor depend on the superblock summaries at each commit boundary * Fixed support for (hidden) quota files built into ext4; in particular, don't rewrite the quota inode unless the quotas are inconsistent * Optimized reading and writing bitmaps if direct I/O was enabled * Update Czech, Dutch, French, German, Polish, Sweedish, and Vietnamese translations * Fixed incorrect indentation in tune2fs man page * Update debian policy compliance to 3.9.3 -- Theodore Y. Ts'o Mon, 14 May 2012 14:43:09 -0400 e2fsprogs (1.42.2-2ubuntu1) quantal; urgency=low * Merge from Debian unstable (LP: #978012), remainging changes: - debian/control.in: Build-depend on gettext:any instead of on gettext for (cross-building) Drop build dependency on dc, which hasn't been needed for some time. Update maintainer field. - debian/rules: Block pkg-create-dbgsym from operating on this package. Build without dietlibc-dev, which is in universe - debian/control: Regenerate with ./debian/rules debian/control -- Dmitrijs Ledkovs Tue, 22 May 2012 15:00:58 +0100 e2fsprogs (1.42.2-2) unstable; urgency=low * Fixed e2fsck.conf's man page (Closes: #646963) * Fixed 32-bit binary compatibility problem for the libext2fs shared library introduced in 1.42.2 * mke2fs will no longer fail if the /etc/mtab file is not present -- Theodore Y. Ts'o Mon, 09 Apr 2012 14:54:33 -0400 e2fsprogs (1.42.2-1) unstable; urgency=low * New upstream version * Fixed various man pages (Closes: #665427) * Speed up resize2fs for large file systems (Closes: #663237) * Be less strict about the EXT4_EOFBLOCKS_FL flag (which will eventually be going away in the ext4 file system format) * Teach mke2fs to use direct I/O if the -D option is given * Print errors returned by ext2fs_open2() and ext2fs_check_desc() so we can more easily diagnose memory allocation failures caused by insufficient memory and abort on memory allocation failures * E2fsck can now write log files containing the details of the problems that were found and fixed directly. * E2fsck can now limit the number of messages issued and printed on the console * The dumpe2fs, debugfs, and tune2fs now use rbtree bitmaps, which cause them to use much less memory for large file systems. * E2fsck will now check for zero-length extents, since older kernels will OOPS if they comes across one * Fix e2fsck's discard behaviour so it does not discard too many blocks, and it will not use discard if the device advertises that discard does not persistently zero data. Also, if e2fsck is run in read-only mode, do not try to discard data. * Fix mke2fs -S so it does not corrupt the first block group's information. * Add pointer for e2fsprogs-udeb to libcomerr2.shlibs (Closes: #665885) -- Theodore Y. Ts'o Tue, 27 Mar 2012 15:55:57 -0700 e2fsprogs (1.42.1-2) unstable; urgency=low * Fix the fact that dpkg-buildflags was being ignored due to a bash'ism in debian/rules. * Check the new /sys/class/power_supply/AC/online since /proc/acpi/ac_adapter/... is deprecated and may not be present on newer kernels. -- Theodore Y. Ts'o Mon, 20 Feb 2012 19:12:20 -0500 e2fsprogs (1.42.1-1) unstable; urgency=low * New upstream release * dpkg-buildflags is now used if it is present. This allows Debian Wheezy to build with security hardened build flags. (Closes: #654457) * mke2fs and e2fsck now use much less memory for large file systems * Fixed mke2fs -S so it can be usefully used as a last ditch recovery command when for ext4 filesystems that have the uninit_bg feature enabled. * The mke4fs argv[0] is now recognized by mke2fs. * Fixed usage and help messages for mke2fs. * Eliminated spurious bad block group checksum warnings when e2fsck falls back to using the backup group descriptors. * Debugfs's ncheck command is now much more useful when used to diagnose badly corrupted file system. Added a new -c option. * Fixed bug in e2image which could cause it to fail to set i_size correctly if the last hole in the file is an exact multiple of a megabyte. * Fixed a bug with resize2fs where for 1k and 2k file systems, the minimum file size used for resize2fs -M could be a block too small. * Fixed the badblocks program to honor the -s flag when in read-only -t mode. (Closes: #646629) * Update Czech, Dutch, French, Polish, and Swedish translations -- Theodore Y. Ts'o Fri, 17 Feb 2012 15:07:13 -0500 e2fsprogs (1.42-1ubuntu2) precise; urgency=low * Build-depend on gettext:any instead of on gettext, so that apt-get can properly resolve build-dependencies on the tool when cross-building. * Drop build dependency on dc, which hasn't been needed for some time. -- Steve Langasek Fri, 30 Mar 2012 12:59:46 -0700 e2fsprogs (1.42-1ubuntu1) precise; urgency=low * Merge from Debian unstable, remaining changes: - debian/control: Do not build-depend on dietlibc-dev, which is universe. - debian/rules: Block pkg-create-dbgsym from operating on this package. -- Kees Cook Wed, 15 Feb 2012 13:48:05 -0800 e2fsprogs (1.42-1) unstable; urgency=low * New upstream release * Fixed hurd FTBFS (Closes: #649689) * Optimized e2fsck speed on large file systems when using [scratch_files] * Fixed e2fsck handling of blocks claimed by multiple inodes in bigalloc file systems * Fixed e2fsck's calculation of max file size for non-extent based files when huge_file is enabled * Update Czech and Swedish translations -- Theodore Y. Ts'o Tue, 29 Nov 2011 15:50:07 -0500 e2fsprogs (1.42~WIP-2011-11-20-1) unstable; urgency=low * New upstream release * Fix error checking so resize2fs works when using a 32-bit userspace and a 64-bit kernel (Closes: #644989) * e2fsck now returns additional status bits in its exit code if it aborts early in the e2fsck run * Fix potential stack overflow in debugfs * Avoid an infinite loop in ext2fs_find_block_device() if there are symlink loops in /dev caused by a buggy udev * Fix test failures on big-endian systems * Fix gcc -Wall complaints * Add freefrag and e2freefrag commands to debugfs * Add a read-only, metadata-only debugfs command called rdebugfs * Improve first-class quota support * Fix bigalloc support in e2freefrag * Clean up mmp handling * Fix a regression which caused mke2fs to not work correctly on files > 2GB. (Closes: #647245) * Fix a namespace leak in libext2fs (tdb_null) -- Theodore Y. Ts'o Sun, 20 Nov 2011 21:32:49 -0500 e2fsprogs (1.42~WIP-2011-10-16-1ubuntu1) precise; urgency=low * Merge from Debian unstable, remaining changes: - debian/control: Do not build-depend on dietlibc-dev, which is universe. - debian/rules: + Do now allow pkg-create-dbgsym to operate on this package. * fix online resizing bug (LP: #880984) -- Scott Moser Mon, 24 Oct 2011 17:00:17 -0400 e2fsprogs (1.42~WIP-2011-10-16-1) unstable; urgency=low * New upstream release * Fix online resizing with resize2fs (Closes: #644989) * Fix bug which caused shrinking an empty file system file system to its minimal size to sometimes fail. * Don't look at the high 16 bits of i_file_acl if the 64-bit feature is not enabled; this fixes a Hurd compatibility field since this is used for the high 16 bits of i_mode on Hurd. * Update Sweedish, Polish, French, German, and Czech translations -- Theodore Y. Ts'o Sun, 16 Oct 2011 22:07:03 -0400 e2fsprogs (1.42~WIP-2011-10-09-1ubuntu1) precise; urgency=low * Merge from Debian unstable, remaining changes: - debian/control: Do not build-depend on dietlibc-dev, which is universe. - debian/rules: + Do now allow pkg-create-dbgsym to operate on this package. * Dropped changes, included upstream: - Build for multiarch. * Droped obsolete changes: - debian/e2fsprogs.preinst: only needed for pre-lucid upgrades; drop. - Build with -O2 on powerpc: no reference to the toolchain bug was ever provided, and this hasn't been a problem in Debian, so it's probably long since fixed. Drop. -- Steve Langasek Mon, 17 Oct 2011 21:39:23 +0000 e2fsprogs (1.42~WIP-2011-10-09-1) unstable; urgency=low * New upstream release * Fixed infinite loop in filefrag (Closes: #644792) * Fixed various spelling and translation problems * Fixed various man pages * Fixed 64-bit block numbers in e2fsck's journal replay * Fixed mipsel FTBFS that was fixed for mips * Update Sweedish, French, and Czech translations * Convert to debian source 3.0 (quilt) format -- Theodore Y. Ts'o Sun, 09 Oct 2011 22:24:31 -0400 e2fsprogs (1.42~WIP-2011-10-05-2) unstable; urgency=low * Fix portability issues with non-Linux platforms and for the mips platform, which does some really strange things vis-a-vis 32/64-bit support without actually having a 64-bit version of the architecture (Closes: #644502) * Fix dependency problem which causes the newer version of libcom_err2 to get pulled in when upgrading to e2fsprogs, which needs the new interface exported by libcom_err2. (Closes: #644425, #644584) -- Theodore Y. Ts'o Fri, 07 Oct 2011 18:27:06 -0400 e2fsprogs (1.42~WIP-2011-10-05-1) unstable; urgency=low * Update translations: German (Closes: #520985) * Fixed usage and error text for mke2fs -C option * Updated e2fsprogs.pot file for translators * Added support for internationalized error strings for libcom_err * Fixed various portability nits that were causing FTBFS problems on Hurd and FreeBSD * Added "big" and "huge" types to mke2fs.conf, since they are needed for very large file systems * Fixed on-line resizing which had been broken in the 1.42 series (Closes: #451388) -- Theodore Y. Ts'o Wed, 05 Oct 2011 02:10:53 -0400 e2fsprogs (1.42~WIP-2011-10-01-2) unstable; urgency=low * Update translations: French, German (Closes: #620659) * Fix compilation problems in hermetic environments * Fix on-line resizing in resize2fs (Closes: #451388) * Add definitions for "big" and "huge" filesystems to /etc/mke2fs.conf * Fix mke2fs when there are more than 2**32 block groups -- Theodore Y. Ts'o Tue, 04 Oct 2011 00:04:25 -0400 e2fsprogs (1.42~WIP-2011-10-01-1) unstable; urgency=low * New upstream release * Avoid unnecessary reboots when checking the root fs in some special cases * Fix an off-by-one error in filefrag -v's output * Make filefrag display the number of contiguous (not physical) extents (Closes: #631498) * Clarify the mke2fs.conf.5 man page (Closes: #634883) * Add a hurd-specific mke2fs.conf file (Closes: #629355) * mke2fs will set s_max_mnt_count to -1 instead of 0 by default to work around a bug in pre-3.0 kernels which caused a spurious message to be printed when the file system was mounted (Closes: #632637) * Fixed portability problems which was causing build failures on non-Linux/non-x86 systems. * Verify that the bad block inode looks sane before trusting it, to avoid it causing more harm than good. * Fixed the debian/rules file so that it build successfully if DEB_BUILD_OPTIONS contains "nostrip" (Closes: #627535) * Fixed some big-endian bugs in the MMP code -- Theodore Y. Ts'o Fri, 30 Sep 2011 22:33:41 -0400 e2fsprogs (1.42~WIP-2011-09-25-1) unstable; urgency=low * New upstream release * Fix FTBFS on big-endian architectures (Closes: #641838) * Add support for multiarch (Closes: #632169) * Clarify and update debian/copyright file (Closes: #614662) * Add support for Multi-Mount Protection (MMP) * Allow tune2fs to remove the external journal if the device is not found * Updated/clarified man pages (Closes: #642193) * Fix a potential FTBFS caused by overly long compile lines (Closes: #629883) -- Theodore Y. Ts'o Sun, 25 Sep 2011 01:28:34 -0400 e2fsprogs (1.42~WIP-2011-09-16-1) unstable; urgency=low * New upstream release * Added support for the integrated quota feature * Improved 64-bit and bigalloc support * Mke2fs and tune2fs now allows setting the stride and stripe width to zero * Fixed tune2fs's mount options parsing (Closes: #641667) * Fixed an ABI compatibility problem which broke the dump program (Closes: #636418) * Resize2fs has forward compatibility for a new on-line resize ioctl for > 16TB file systems. * Fixed a (very hard to hit) bug that could cause e2fsck to crash in pass 1 or pass 2 * Debugfs has a new 'blocks' command * Mke2fs now gives a warning if the auto-detected block size exceeds the page size * Mke2fs and e2fsck now tries to use the punch hole command as a "discard" when operating on normal files * Mke2fs will not try to do any discard operations if -n is specified on the command line * Updated/clarified man pages (Closes: #639411) * Fixed parsing of MNTOPT_ options for tune2fs and debugfs (Closes: #641667) -- Theodore Y. Ts'o Fri, 16 Sep 2011 10:33:59 -0400 e2fsprogs (1.42~WIP-2011-07-02-1) unstable; urgency=low * New upstream release * Add support for 64-bit file systems * Add support for bigalloc file systems * Fixed an e2fsck bug which caused "*** FILE SYSTEM WAS MODIFIED ***" without an explanation of what was fixed. * E2fsck will no longer attempt to clone an extended attribute block in pass1b handling if the file system does not support extended attributes. * E2fsck will be more careful accidentally asking the user to continue if the file system is mounted, so that an escape sequence won't cause a false positive. (Closes: #619859) * E2fsck now uses less cpu time in pass 5 * E2fsck will no longer segault when a corrupted file system has a bad extent, and removing it leads to a block needing to be deallocated. * E2fsck now supports an extended "discard" option which will cause e2fsck to attempt discard all unused blocks after a full check * The e2image program now supports the qcow2 format, a more efficient way of capturing file system metadata snapshots. * Mke2fs now supports the [devices] stanza in mke2fs.conf. * Mke2fs now supports the reserved_ratio relation in mke2fs.conf. * Mke2fs now creates extent-mapped directories for the root and lost+found directories. * Mke2fs will skip zero'ing the journal if the extended option "lazy_journal_init" is specified. * Mke2fs will now create file systems that enable user namespace extended attributes and with time- and mount count-based file system checks disabled. * Mke2fs will not set a stride or strip size of one block based on block bevice attributes obtained from sysfs. * Mke2fs now displays a progress report during the discard process. * Mke2fs now handles extreme file system parameters correctly which previously caused the inodes per group to drop below 8, leading to a segfault. * Debugfs's icheck will now correctly find inodes which use the searched-for block as an extended attribute block. * Debugfs now has a new "punch" command which remove blocks from the middle of an inode. * The badblocks program now correctly recovers from I/O errors when direct I/O is being used. The badblocks command now also supports a -B option which forces the use of buffered I/O, and the -v option will provide a more detailed breakdown of read, write, and failed comparison errors. * Added e4defrag tool which uses the EXT4_IOC_MOVE_EXT ioctl. * Added support for journals larger than 2GB. * Support using both hard links and symlinks when installing e2fsprogs. * Add overflow checking to tune2fs -i's fsck interval, which must fit in a 32-bit field. * Filefrag will report 0 extents correctly in verbose mode. * Logsave's usage message has been fixed. (Closes: #619788) * Update translations: French, Chinese, Germany, Indonesian, Swedish, Vietnamese, Polish, Dutch, Czech. * Updated/clarified man pages. -- Theodore Y. Ts'o Sat, 02 Jul 2011 22:38:57 -0400 e2fsprogs (1.41.14-1ubuntu3) natty; urgency=low * Don't install to multiarch paths for the udeb build, just use the traditional lib paths so we find our libraries more readily. LP: #736908. -- Steve Langasek Thu, 17 Mar 2011 10:46:45 -0700 e2fsprogs (1.41.14-1ubuntu2) natty; urgency=low * Build for multiarch, setting Pre-Depends: multiarch-support in our shared lib package. -- Steve Langasek Wed, 16 Mar 2011 08:44:43 -0700 e2fsprogs (1.41.14-1ubuntu1) natty; urgency=low * Merge from debian experimental (LP: #681418), remaining changes: - debian/control: Do not build-depend on dietlibc-dev, which is universe. - debian/rules: + Do now allow pkg-create-dbgsym to operate on this package. + Build with -O2 on powerpc to avoid a suspected toolchain bug. - debian/e2fsprogs.preinst: Do not include /etc/e2fsck.conf and remove on upgrade. -- Lorenzo De Liso Mon, 03 Jan 2011 15:03:19 +0100 e2fsprogs (1.41.14-1) experimental; urgency=low * New upstream release * Fixed a FTBFS on big-endian architectures * Fixed spurious warning in mke2fs * resize2fs now works correctly on devices exactly 16TB * resize2fs will no longer clear the resize_inode feature when the number of reserved GDT blocks reaches 0. This allows a file system with the flex_bg feature to be subsequently shrunk. * e2fsck will no longer use the extended rec_len encoding for file systems whose blocksize is less than 64k, to catch fs inconsistencies which the kernel will complain about. -- Theodore Y. Ts'o Wed, 22 Dec 2010 18:39:19 -0500 e2fsprogs (1.41.13-1) unstable; urgency=low * New upstream release * E2fsck can now do journal-only replays via "e2fsck -E journal_only" * E2fsck now understands UUID= and LABEL= specifiers for the -j option (Closes: #559315) * E2fsck.conf now supports a new config option, which forces the problem not to be fixed: problems/ Mon, 22 Nov 2010 16:00:50 -0400 e2fsprogs (1.41.12-2) unstable; urgency=high * Allow tune2fs to set uninit_bg without requiring an fsck * Fix test in e2fsck to correctly check for EOFBLOCKS files * Fix dependencies for libuuid and libblkid (Closes: #583551) -- Theodore Y. Ts'o Thu, 03 Jun 2010 09:30:36 -0400 e2fsprogs (1.41.12-1ubuntu3) natty; urgency=low * No-change upload to reduce changelogs. -- Martin Pitt Mon, 13 Dec 2010 12:57:53 +0100 e2fsprogs (1.41.12-1ubuntu2) maverick; urgency=low * The -p switch for resize2fs is meant for an offline resize operation which is done completely at the userspace. Changed the documentation to suggest an "offline" operation. (LP: #505719) -- Surbhi Palande Wed, 18 Aug 2010 15:48:21 +0100 e2fsprogs (1.41.12-1ubuntu1) maverick; urgency=low * Merge from Debian unstable, remaining changes: - Do not build-depend on dietlibc-dev, which is universe. - Do now allow pkg-create-dbgsym to operate on this package. - Always use external libblkid and libuuid from util-linux, rather than building our own. - Includes debian/control in the source package to force the above. - Build with -O2 on powerpc to avoid a suspected toolchain bug (LP: #450214). - Do not include /etc/e2fsck.conf and remove on upgrade. (Fixes LP: #521648, #537483, #530071) -- Scott James Remnant Mon, 07 Jun 2010 15:49:29 +0100 e2fsprogs (1.41.12-1) unstable; urgency=low * New upstream release * mke2fs now gives the correct error message if the external journal is device is not found * The resize2fs program will refuse to print the minimum size needed for a file system if it is not clean. * E2fsck now tests for extents that begin at physical block 0 and rejects them as invalid. * Fixed a bug in e2fsck which could cause it to crash when trying to remove an invalid extent and the block bitmaps hadn't yet been loaded. * E2fsck will now completely skip time-based checks if the system clock looks insane or if the broken_system_clock option is set in /etc/e2fsck.conf. (Closes: #549861, #540152) * Fixed a bug in e2fsck which caused e2fsck to complain about i_blocks with a 4T file created using posix_fallocate() * E2fsck will now correctly mark a sparse journal as invalid and will delete and recreate the journal to address the problem. * Fixed e2fsck not to ask permission from the user to abort if it's going to abort regardless of what the user is going to say... * E2fsck can now continue even if it fails to recreate the resize inode * E2fsck will now avoid removing directory entries for inods found in the unused region of the inode table until after it restarts the fs check to avoid removing valid data. * E2fsck will now longer try to set the block group checksums if it is interrupted. * Mke2fs will check both the physical and logical blocksizes of a device to better support 4k sector drives. * Mke2fs will accept the valid (but rarely useful) flex_bg size of 1 * E2fsck will check for cases where the EOFBLOCKS_FL is set whe nit is not needed, and offer to clear it. * The com_err library will now only output a CR character if the stderr is connected to a tty in raw mode. * Update Czech, Chinese, Dutch, French, Germany, Indonesian, Polish, and Vietnamese translations (from the Translation Project) * Add an fsck.ext4 symlink in the e2fsprogs-udeb package (Closes: #571247) * Fix makefile dependency so dpkg-buildpackage -j2 works (Closes: #563487) -- Theodore Y. Ts'o Mon, 17 May 2010 19:43:52 -0400 e2fsprogs (1.41.11-1ubuntu1) lucid; urgency=low * Merge from Debian unstable, remaining changes: - Do not build-depend on dietlibc-dev, which is universe. - Do now allow pkg-create-dbgsym to operate on this package. - Always use external libblkid and libuuid from util-linux, rather than building our own. - Includes debian/control in the source package to force the above. - Build with -O2 on powerpc to avoid a suspected toolchain bug (LP: #450214). - Do not include /etc/e2fsck.conf and remove on upgrade. (Fixes LP: #521648, #537483, #530071) -- Scott James Remnant Mon, 22 Mar 2010 17:48:20 +0000 e2fsprogs (1.41.11-1) unstable; urgency=medium * New upstream release * Add Heimdal function com_right_r() to libcom_err (Closes: #558910) * Allow e2fsck to run even if the physical device has more than 2**32 blocks * Debugfs's "logdump -b " now properly shows the allocation status of the block . (Closes: #564084) * Make e2fsck's "the filesystem is mounted" message is now more scary to hopefully dissuade users from thinking, "surely that message doesn't apply to *me*" :-( * e2fsck -n will now always open the file system read-only. We now disallow certain combination of options which previously were manual exceptions; this is bad because it causes users to think they are smarter than they really are. So "-n -c", "-n -l", "-n -L", and "-n -D" are no longer supported. * If the partition is badly aligned, have mke2fs just print a warning message and continue. Previously mke2fs would ask to confirm, and this broke distro installation scripts. * Fix a bug in libext2fs caused the creation of very large journals for ext4 to be _very_ slow. * E2fsck now understands the EOFBLOCKS_FL flag which will be used in 2.6.34 kernels to make e2fsck not complain about blocks deliberately fallocated() beyond an inode's i_size. * Fix a bug in e2fsck which could cause e2fsck -D to corrupt non-indexed directories. (Closes: #572453) * debian/rules: can be compiled statically with stack protector now. (Closes: #573923) * Update debian policy compliance to 3.8.4 -- Theodore Y. Ts'o Mon, 15 Mar 2010 00:16:35 -0400 e2fsprogs (1.41.10-1ubuntu2) lucid; urgency=low * Add fsck.ext4 symlink to e2fsprogs-udeb. -- Colin Watson Fri, 26 Feb 2010 18:03:35 +0000 e2fsprogs (1.41.10-1ubuntu1) lucid; urgency=low * Merge from Debian unstable, remaining changes: - Do not build-depend on dietlibc-dev, which is universe. - Do now allow pkg-create-dbgsym to operate on this package. - Always use external libblkid and libuuid from util-linux, rather than building our own. - Includes debian/control in the source package to force the above. - Build with -O2 on powerpc to avoid a suspected toolchain bug (LP: #450214). - Do not include /etc/e2fsck.conf and remove on upgrade. -- Scott James Remnant Wed, 17 Feb 2010 10:53:45 +0000 e2fsprogs (1.41.10-1) unstable; urgency=low * New upstream release * Fix resize2fs bug which causes it to access invalid memory * Add libss support for libreadline.so.6 * Fix e2fsck's check for extent-mapped directory with an incorrect file type * Add new e2fsck.conf configuration option: default/broken_system_clock for system with broken CMOS hardware clocks. (Closes: #559776) * Fix flex_bg inode table placement algorithm used by mke2fs for certain specific file system sizes * Add source lintian overrids for weak-library-dev-dependency * Fix FTBFS problem caused by texi2html changing (again) its output location. (Closes: #552934) * Make e2fsck to avoid rehashing directories which can fit in a single directory block. * Fix how e2fsck fixes sparse directories which are extent-mapped. * Fix some big-endian bugs in e2fsck and libext2fs * Teach e2fsck to detect and fix sparse extent-mapped directories * Fix filefrag from core dumping on file systems with 8k block sizes * E2fsck was depending on i_size to be correct to detect and fix certain directory problems before actually fixing the directory's i_size. This caused certain rare corruptions to require two runs of e2fsck to address. * Update Czech, Indonesian, Polish and Vietnamese translations (from the Translation Project) * Fix e2fsck to find and correct duplicate directory entries in non-indexed directories. * Add support for calling BLKDISCARD to mke2fs. * Enhance libext2fs so it works around bug in Linux version 2.6.19 and earlier where the /proc/swaps file was missing the header on the first line. * Fix resize2fs so it works correctly on file systems with external journals * Fix libss so that it does not seg fault when using a readline library which does not supply a readline_shutdown() function. * Add a pre-depends for util-linux-ng (Closes: #551795) * Update and clarify various man pages. * Corrected dumpe2fs's usage message * Teach libext2fs to ignore the high 32 bits of the i_blocks field when huge_file file system feature is set, but the inode does not have the HUGE_FILE_FL flag set. * Change e2fsck to accept superblock times to be fudged by up to 24 hours by default. Most distributions have fixed their init scripts, but apparently now they have buggy virtualization scripts. :-( I give up, too many buggy user space set ups out there. (Closes: #557636) * Fix e2fsck to correctly print > 32-bit i_blocks numbers in problem reports * Improve e2fsck so it prints "Illegal indirect block" instead of "Illegal block #-1" * Teach mke2fs to get device topology information from blkid and use it to populate the superblock stride and stripe sizes and warn if the block device is misaligned * Fix a file descriptor leak in debugfs when sourcing a command file * Fix a file descriptor leak in fsck * Round up the bitmap size to prevent spurious segmentation faults on BSD platforms. * Fix resize2fs to correctly calculate the minimum size needed, when flex_bg is enabled, to prevent resize2fs -M from failing. * Dumpe2fs now displays more information about the contents of the journal * Make sure the libblkid1 and libblkid1-dbg packags have changelogs * On low memory systems, e2fsck can print some very scary looking error messages. Clean up them up to avoid user panic. (Closes: #509529) * Enhance blkid to support .ko.gz files in the modules.dep parser * Fix tune2fs -j for mounted exted-enabled file systems * Use the feature name "extent" instead of "extents" in mke2fs.conf. Both work, but the latter is what is documented in the man page. (Closes: #540111) -- Theodore Y. Ts'o Sun, 07 Feb 2010 20:56:47 -0500 e2fsprogs (1.41.9-1ubuntu4) lucid; urgency=low * Update from GIT maint branch: [Michael Roth] * Update .gitignore [Cristian Rodríguez] * fix fd leak that causes fsck to fail with "too many open files" [Eric Sandeen] * mke2fs: get device topology values from blkid * configure.in: Fix typo: remove '2' from blkid_probe_get_topology2 * resize2fs: exit fix_sb_journal_backup early for external journal * libext2fs: don't swap extent-based journal backup * mke2fs support for BLKDISCARD * mke2fs: open device writable for trim/discard [Peng Tao] * resize2fs: calculate minimal fs size only once * resize2fs: fix minimum resize size calculation with flex_bg. redhat: #519131 * debugfs: add matching fclose. novell: #524526 [Theodore Ts'o] * tune2fs: Fix "tune2fs -j " for extent-enabled filesystems. launchpad: #416648 * e2fsck: Avoid scary failure messages on low-memory systems. Closes: #509529 * debian: Make sure libblkid1 and libblkid1-dbg have changelogs * dumpe2fs: Print more information about the inline journal * configure.in, configure: Drop --with-cc, --with-ccopts, --with-ldopts. sourceforge: #2843248 * tune2fs.8: Document the flex_bg file system option in the man page. sourceforge: #2822186 * mke2fs.8.in: Clarify flex_bg feature description * libext2fs: Round up the bitmap size when allocating a new bitmap. sourceforge: #2328708 * e2undo: Initialize com_err error tables for the ext2fs library * libext2fs: Add error table initialization to test programs * blkid: Avoid a potentially error message when running "make clean" * e2fsck: Use the correct problem code in the case of LAST_WRITE_FUDGED * Don't use in-tree header files if using system uuid or blkid libraries * tests: Account for new mke2fs topology information * libext2fs: Always build file_io.c * e2fsck: Interpret negative blkcount in file system problem reports. sourceforge: #2871782 * e2fsck: Fix handling of non-zero i_blocks_high field * e2fsck: Accept superblock times to be fudged by up to 24 hours by default * libext2fs: Fix FEATURE_RO_COMPAT_HUGE_FILE && !HUGE_FILE_FL * dumpe2fs: Fix usage message for -o superblock= and -o blocksize=. launchpad: #448099 * tune2fs.8: Clarify tune2fs's -i option * debian: Add pre-depends for util-linux for util-linux-ng builds. Closes: #551795 * debian: Fix pre-depends relation for util-linux-ng * libss: initialize function pointer for readline_shutdown() * e2fsck: Fix duplicate directory entries for non-indexed directories. sourceforge: #2862551 * configure: Work around bug in autoconf 2.64 * e2fsck: Fix directory with holes even when i_size is wrong * e2fsck: Move check to add an index to a directory after fixing i_size * filefrag: Fix a core dump on sparc32 platforms with 8k file systems * e2fsck: detect holes in extent-mapped directories * libext2fs: Fix SET_BMAP bugs in ext2fs_bmap() and ext2fs_bmap2() * e2fsck: Fix block allocation for holes in extent-mapped directories * e2fsck: Don't rehash directories which can fit in a single directory block * e2fsck: Try to update on-disk bitmap in e2fsck_get_alloc_block() callback * tests: Add new test f_holedir2 * debian: Fix FTBFS problem caused by texi2html changing its output location. Closes: #552934 * debian: Add source lintian overrides [Karel Zak] * blkid: support .ko.gz in modules.dep parser * libext2fs: handle <=linux-2.6.19 bug in /proc/swaps [localization folks] * po: update vi.po (from translationproject.org) (Clytie Siddall) * po: update pl.po (from translationproject.org) (Jakub Bogusz) * po: update cs.po (from translationproject.org) (Petr Pisar) * po: update id.po (from translationproject.org) (Arif E. Nugroho) remaining changes: - Do not build-depend on dietlibc-dev, which is universe. - Do now allow pkg-create-dbgsym to operate on this package. - Do not include /etc/e2fsck.conf and remove on upgrade. - Always regenerate debian/control -- Scott James Remnant Sat, 06 Feb 2010 00:30:22 -0800 e2fsprogs (1.41.9-1ubuntu3) karmic; urgency=low * Build e2fsprogs-udeb with -O2 on powerpc to avoid a suspected toolchain bug (LP: #450214). -- Luke Yelavich Sat, 24 Oct 2009 17:03:42 +1100 e2fsprogs (1.41.9-1ubuntu2) karmic; urgency=low * Applied patch (sent upstream) to ignore a future last mount, write or check time by up to 24 hrs when fsck called with -p ("preen", ie. fix minor problems without human intervention). LP: #268808. -- Scott James Remnant Mon, 12 Oct 2009 16:35:14 +0100 e2fsprogs (1.41.9-1ubuntu1) karmic; urgency=low * Merge from Debian, remaining changes: - Do not build-depend on dietlibc-dev, which is universe. - Do now allow pkg-create-dbgsym to operate on this package. - Use external libblkid and libuuid from util-linux, rather than building our own. - Do not include /etc/e2fsck.conf and remove on upgrade. * Included a couple of extra revisions from GIT maint: - (ffd8078) e2freefrag: Update manpage to include e2fsprogs version and release date - (31b5a2b) mke2fs.conf: Use the feature name "extent" instead of "extents" - (8bafedb) tune2fs: Fix "tune2fs -j " for extent-enabled filesystems. LP: #416648. -- Scott James Remnant Tue, 25 Aug 2009 18:34:46 +0100 e2fsprogs (1.41.9-1) unstable; urgency=low * New upstream release * Fix tune2fs -I to work correctly in the face of bad blocks and filesystems formatted for RAID arrays, and ENOSPC errors * Require the user to only answer one question instead of multiple ones for multiple bad block group checksums, or when an inode table needs to be moved. * Fix e2fsck to handle moving inode tables in FLEX_BG filesystems more gracefully by looking in the entire flex_bg for space, instead of just in the block group; if that doesn't work, try looking for space in the entire filesystem. * Fix the filefrag code to avoid printing the extent header if it needs to fallback to using the FIBMAP ioctl. * Fix filefrag to print the correct number of extents for zero-length files when using FIBMAP. (Closes: #540376) * Add a filefrag -B option to make it easier to debug the FIBMAP support. * Allow e2fsprogs programs to allocate from uninitalized block groups. * Add a new program, e2freefrag, which displays information about the free space fragmentation in an ext2/3/4 filesystem. * E2fsck will now print much fuller information when the last mount time or last written time is in the future, since most people can't seem to believe their distribution has buggy init scripts, or they have a failed CMOS/RTS clock battery. * Update French, Polish, Czech, and Sweedish translation from the Translation Project. * Enhance debugfs's 'stat' command to print basic extent information for extent-mapped inodes, and add a new command, 'dump_extents' which prints detailed information about an inode's extent tree. -- Theodore Y. Ts'o Sun, 23 Aug 2009 10:08:52 -0400 e2fsprogs (1.41.8-2) unstable; urgency=low * Fix regression in ext2fs_extent_set_bmap() which caused e2fsck -fD to fail on ext4 filesystems if the directory needs to shrink by more than a block (Closes: #537510) * Fixed filefrag for non-extent based files * Fix use of apostrohe's in package descriptions * Don't use dietlibc when building for mips and mipsel architectures -- Theodore Y. Ts'o Mon, 20 Jul 2009 09:38:21 -0400 e2fsprogs (1.41.8-1ubuntu2) karmic; urgency=low * Remove /etc/e2fsck.conf on upgrade. -- Scott James Remnant Fri, 17 Jul 2009 10:31:13 +0100 e2fsprogs (1.41.8-1ubuntu1) karmic; urgency=low * Merge from Debian, remaining changes: - Do not build-depend on dietlibc-dev, which is universe. - Do now allow pkg-create-dbgsym to operate on this package. - Use external libblkid from util-linux, rather than building our own (conditional on lsb_release, debian/control mangling via m4) * Use external libuuid from util-linux, rather than building our own. * Cherry pick 9d4bade from GIT maint: - filefrag: Restore "perfect" number of extents calculation for ext2/ext3 -- Scott James Remnant Wed, 15 Jul 2009 15:58:37 +0100 e2fsprogs (1.41.8-1) unstable; urgency=low * New upstream release * Fix resize2fs bugs when shrinking ext4 filesystems * Update debian policy compliance to 3.8.2 * Update package descriptions to mention ext3 and ext4 filesytems (Closes: #535530) * Update French, Polish, Czech, Indonesian, and Sweedish translation from the Translation Project. * If the resize2fs operation fails, the user will be told to fix up the filesystem using e2fsck -fy. -- Theodore Y. Ts'o Sat, 11 Jul 2009 17:26:16 -0400 e2fsprogs (1.41.7-2) unstable; urgency=low * Fix online resizing using resize2fs (Closes: #535452) * Fix the filefrag program for files with more than 144 extents * Update and clarify various man pages. * Fix potential filesystem corruptions caused by using resize2fs to shrink filesystems with extents enabled. -- Theodore Y. Ts'o Tue, 07 Jul 2009 23:21:46 -0400 e2fsprogs (1.41.7-1) unstable; urgency=low * New upstream release * Fix memory leaks in e2fsprogs, including a very large memory leak which can cause e2fsck to run out of memory when checking very large filesystems using extents. * Fix a bug in libext2fs which can cause e2fsck and resize2fs to write uninitalized data into the portion of the inode beyond the first 128 bytes when operating on extents; potentially corrupting filesystems. * The logsave program will now filter out the ^A and ^B characters when writing to the console. * Update/clarify man pages (Closes: #531385, #523063) * Fix filefrag progam so it correctly checks for errors from the fiemap ioctl. * Change badblocks to allow block sizes larger than 4k. * Fix libext2fs to properly initialize i_extra_size when creating the journal and resize inodes. * Resize2fs will now update the journal backup fileds in the superblock if the journal is moved; this avoids an unnecessary full fsck after resizing the filesystem. * Use the same encoding as the kernel for rec_len == 64k in 64k block filesystems. * Fix lsattr to exit with a non-zero status when it encounters errors. * Enhance badblocks to print the currently tested block number when interrupted with ^C. * Fix debugfs from core dumping if the logdump command fails to open the output file. * Harden ext2fs_validate_entry() so that lsdel will not read beyond the end of the block even if the directory block is corrupted. * Update Chinese and Czech translation from the Translation Project. -- Theodore Y. Ts'o Mon, 29 Jun 2009 15:12:14 -0400 e2fsprogs (1.41.6-1) unstable; urgency=low * New upstream release * Update and clarify man pages * Fix a number of Lintian warnings, including to updating to debian policy 3.8.1 * Update config.guess and config.sub to the latest (2009-04-17) version so that e2fsprogs will build on the avr32 platform (Closes: #528330) * Add an explicit error message if the /etc/mtab file is missing when running e2fsck or resize2fs (Closes: #527859) * Enhance e2fsck to handle the case where the primary block group descriptors need fixing, and the backup superblock is corrupt. (Closes: #516820) * Add an "-a" option to debugfs's close_filesys command * e2fsck will no longer abort a preen operation if an inode's i_file_acl_hi field is non-zero. (Closes: #526524) * The chattr program can now migrate inodes from using direct/indirect blocks to extent trees. * Speed up e2fsck if there are multiple block groups with inodes in use in the unused portion of the block group's inode table. * Update Chinese translation from the translation project * Fix resize2fs so it won't corrupt ext4 filesystem when asked to shrink a filesystem smaller than the minimum suggested size. * Fix e2fsck regression which can corrupt ext4 filesystems when replaying the journal. * Add support to e2fsck for handling I/O errors while replaying the journal * Fix a bug in e2fsck which could cause it to crash if an inode has a corrupt extent header, and the user declines to clear the inode. * Fix blkid to prefer the /dev/mapper/ device names over the private /dev/dm-N device names. * Add support for the FIEMAP ioctl to the filefrag program * Further speed up e2fsck by skipping journal checks if the filesystem is mounted read-only and is marked as not needing journal replay. * Add a build depends in the control file indicating that dietlibc must be newer than version 0.30 (Closes: #506064) -- Theodore Y. Ts'o Fri, 30 May 2009 13:26:23 -0400 e2fsprogs (1.41.5-1ubuntu3) karmic; urgency=low * debian/control.in: Add build-dependency on lsb-release. -- Scott James Remnant Wed, 06 May 2009 17:00:56 +0100 e2fsprogs (1.41.5-1ubuntu2) karmic; urgency=low * Use external libblkid from util-linux, rather than building our own. -- Scott James Remnant Wed, 29 Apr 2009 18:19:46 +0100 e2fsprogs (1.41.5-1ubuntu1) karmic; urgency=low * Merge with Debian unstable, remaining changes: - Do not build-depend on dietlibc-dev, which is in universe. - Do not allow pkg-create-dbgsym to operate on this package. -- Scott James Remnant Wed, 29 Apr 2009 12:11:35 +0100 e2fsprogs (1.41.5-1) unstable; urgency=low * New upstream release * E2fsck will now detect and fix inodes that have a non-zero i_file_acl_high field on 32-bit filesystems. * Update build-depends to indicate that dietlibc 0.30 doesn't work. (Closes: #506064) -- Theodore Y. Ts'o Fri, 24 Apr 2009 08:52:47 -0400 e2fsprogs (1.41.4-3) unstable; urgency=low * Update/clarify man pages (Closes: #365619) * Fix a problem where the 'device names' for pseudo-filesystems in /proc/mounts could confuse the e2fsprogs into thinking that a filesystem image stored in a regular file was mounted when it was not * Remove whole-disk entries from the blkid cache when partitions are found * Reduce the number of disk reads needed when the filesystem is clean * Add Chinese (simplified) translation from the Translation Project -- Theodore Y. Ts'o Thu, 23 Apr 2009 01:35:22 -0400 e2fsprogs (1.41.4-2) unstable; urgency=low * Update the debian copyright files to point at the version-specific GPL and LGPL files. * Update the debhelper compat level to 7 * Fix a number of filesystem corruption bugs in resize2fs when growing or shrinking ext4 filesystems off-line (i.e., when the ext4 filesystem is not mounted). * Clarify tune2fs man page (Closes: #515693) * Add homepage field to the debian control file (Closes: #506279) * Fix Hurd compilation problem (Closes: #521602) * Debugfs can now set i_file_acl_high via the set_inodes_field command * Debugfs will now display a 64-bit file acl block * Fix various gcc compilation warnings and other programming cleanups * Make sure libuuid closes all file descriptors before starting the uuidd daemon. * Avoid running e2fsck unnecessarily after doing an online resize * Mke2fs -S will now avoid trying to create the journal * Update the Czech translation from the translation project. * Fix support for external journals (which was broken in e2fsprogs 1.41.4) * Fix a compatibility issue with libext2fs info page and makeinfo 4.12 * Fix a segfault in debugfs when running stat without an open filesystem * Teach the blkid library that starting in 2.6.29, ext4 can support filesystems without journals. * Add error check preventing the reserved_ratio argument to mke2fs and tune2fs from being negative. (Closes: #517015) * Add support for tracking the number kilobytes written to the filesystem via the superblock field s_kbytes_written -- Theodore Y. Ts'o Sun, 19 Apr 2009 23:05:53 -0400 e2fsprogs (1.41.4-1ubuntu1) jaunty; urgency=low * Update to new upstream release, LP: #327206. Remaining changes: - Do not build-depend on dietlibc-dev, which is in universe. - Do not allow pkg-create-dbgsym to operate on this package. -- Scott James Remnant Thu, 12 Feb 2009 15:26:29 +0000 e2fsprogs (1.41.4-1) unstable; urgency=low * New upstream release * Fix bug which could sometimes cause blkid to return an exit value of zero for a non-existent device (Closes: #502541) * Fix spelling mistake in Debian changelog (Closes: #502323) * Fix blkid to deal with an ext3 filesystem with the test_fs flag * Fix debugfs's ncheck output to suppress extra characters at the end of the file name * Tune2fs now updates the block group checksums after changing the filesystem's UUID * Speed up tune2fs's inode resizing code so it is no longer vastly inefficient for moderate to large filesystems * Fix dumpe2fs so it doesn't attempt to print the inline journal information on filesystems with an external journal * Update the Catalan translation * Filter out linux-vdso.so lines when determining the library dependencies while building the initial ramdisk (Closes: #503057) * Fix e2fsck so an errant INODE_UNINIT flag set in a block group doesn't cause e2fsck to abort. * E2fsck now distinguishes between fragmented directories and fragmented files in verbose mode statistics and in the fragcheck report. * Avoid double-counting non-contiguous extent-based inodes in the verbose mode statistics. * E2fsck now leaves slack space when repacking directories so that a few new directory entries won't cause leaf nodes to become split right away. * E2fsck was previously not handling the case of a corrupted interior node in the extent tree, and would crash in that case. It now will handle this and related failures robustly. * E2fsck problem descriptions involving the journal are no longer referred to as "ext3" problems, since ext4 filesystems also have journals. * Fix a long-standing bug in e2fsck which would cause it to crash when replying journals for filesystems with block sizes greater than 8k. * Fix a regression in debugfs's logdump command so it works for filesystems with 32-bit block numbers. This was accidentally broken when the header files were changed to support the 64-bit block numbers. * Fix resize2fs for ext4 filesystems. Some blocks that that need moving when shrinking filesystems with uninit_bg feature would not be moved. In addition, blocks and inode table blocks were not being correctly freed when shrinking filesystems with the flex_bg feable, which caused resize2fs -M to fail. Finally, when blocks are moved, make sure the uninitialized flag in extents is preserved. * Add mkfs.ext4 symlink to the e2fsprogs-udeb package (Closes: #511207) * Resize2fs now reserves some extra block when calculating the minimum size to shrink the filesystem in case some extent allocation trees * Add a "set -e" to uuid-runtime's prerm script to make Lintian happy * The blkid library will now recognize btrfs filesystems and swap devices currently used by user-level software suspend. * tune2fs will not allow changing the inode size for filesystems that have the flex_bg feature enabled, since the code currently assumes the each block group's portion inode table is located in its own block group. * Fix tune2fs -I so it won't corrupt ext3/ext4 filesystem configured for RAID storage devices. * Mke2fs now understands a -U option which allows the UUID to be specified for the new filesystem. * Mke2fs will now treat devices with exactly 16TB as if they have 16TB minus one block, since many users expect ext4 to support 16TB devices, and the true maximum size is 16TB-1. * E2fsck will now flag filesystems that have an insane s_first_ino field in their superblock. -- Theodore Y. Ts'o Tue, 27 Jan 2009 11:50:49 -0500 e2fsprogs (1.41.3-1ubuntu2) jaunty; urgency=low * Install mkfs.ext4 symlink in e2fsprogs-udeb. -- Colin Watson Thu, 08 Jan 2009 14:16:28 +0000 e2fsprogs (1.41.3-1ubuntu1) intrepid; urgency=low * Update at upstream author's suggestion, remaining changes: - Do not build-depend on dietlibc-dev, which is in universe. - Do not allow pkg-create-dbgsym to operate on this package. -- Scott James Remnant Mon, 13 Oct 2008 13:58:42 +0100 e2fsprogs (1.41.3-1) unstable; urgency=low * New upstream release * Fix e2fsck so it prints the correct inode number for uinit_bg related problems. * E2fsck will offer to clear the test_fs flag if the ext4 filesystem is available. * Fix a file descriptor leak in libblkid * Avoid a potential infinite loop in e2fsck when there are disk I/O errors while trying to close a filesystem. * Fix a potential infinite loop in resize2fs when a bogus new size of 0 blocks is specified on the command line. * Add an early check to see if a device is read-only to avoid lots of confusing error messages. * Fix debugfs's ncheck command so it prints all of the names of hardlinks in the same directories. * Fix a bug in libblkid so it correctly detects whether the ext4 and ext4dev filesystems are available, so that the ext4dev->ext4 fallback code works correctly. -- Theodore Y. Ts'o Sun, 12 Oct 2008 22:45:34 -0400 e2fsprogs (1.41.2-1ubuntu2) intrepid; urgency=low * Do not allow pkg-create-dbgsym to operate on this package; missing from previous changelog entry thus missed out. Oops. -- Scott James Remnant Mon, 06 Oct 2008 12:41:23 +0100 e2fsprogs (1.41.2-1ubuntu1) intrepid; urgency=low * Update at upstream author's suggestion, remaining change: - Do not build-depend on dietlibc-dev, which is in universe. -- Scott James Remnant Mon, 06 Oct 2008 10:52:59 +0100 e2fsprogs (1.41.2-1) unstable; urgency=low * New upstream release * Fix e2fsck's automatic blocksize detection. This fixes a regression added in e2fsprogs 1.40.7 where e2fsck's -b option would not work if a blocksize wasn't also specified via the -B option. * Fix a potential file descriptor leak in libcom_err if the application exec's another program. * Fixed badblocks output for "badblocks -sw" * debugfs: Fix ncheck to print all pathnames for all of the specified inodes * Use dietlibc when possible for building e2fsck.static, to reduce the size of the static binary. * debugfs: Add the ability to specify the hash seed and to specify the hash algorithm by name to the "hash" command. * Add documentation for the file I/O functions to libext2fs.texinfo. (Closes: #484877) * Fix a bug in e2fsck where if a translation file is being used and e2fsck needs to print problem report with a custom question (such as "Run journal anyway?"), the PO file's header would get spewed onto the terminal. * Update Swedish, Vietnamese, Dutch, Indonesian, German, Czech translations * Fixed spelling mistakes in man pages (Closes: #498100, #498101, #498102, #498103) -- Theodore Y. Ts'o Thu, 02 Oct 2008 08:54:16 -0400 e2fsprogs (1.41.1-3) unstable; urgency=low * badblocks -v will now display the time and percentage complete (Closes: #429739) * Reordered debian/rules when building udebs to avoid a Lintian warning * Fixed dependencies fields in the udeb packages (Closes: #497619) * Avoid linking various programs with unneeded libraries * Fixed a typo'ed bold font specifier in mke2fs's man page * Fixed the pkg-config files so the include directory needed by the various libraries is included, and to use Requires.private to avoid unnecessary linking of dynamic libraries. * Add more historical information to the debian/*.symbol files -- Theodore Y. Ts'o Fri, 05 Sep 2008 11:11:03 -0400 e2fsprogs (1.41.1-2) unstable; urgency=low * Make sure ext4_swab64() is defined on all platforms (Closes: #497515) * Badlocks: Use O_LARGEFILE so it will run on files greater than 2GB -- Theodore Y. Ts'o Tue, 02 Sep 2008 09:53:46 -0400 e2fsprogs (1.41.1-1) unstable; urgency=low * New upstream release * mke2fs and tune2fs now use half-md4 as the default hash algorithm In addition the default hash algorithm can be via mke2fs.conf for mke2fs, and via a command-line option for tune2fs. * Add support for on-line resizing of ext4 filesystems with the flex_bg filesystem feature. * e2fsck now creates the journal in the middle of the filesystem, which can speed up fsync-heavy workloads. * Make the blkid library more efficient for devicemapper devices, mostly by no longer using the libdevmapper library. * Fix various namespace leakages by the libblkid, libe2p and libext2fs libraries. * Fix support for empty directories in 64k blocksize filesystems. * Add supported_features command to debugfs * Improve libblkid detection of JFS and HPFS filesystems * The test I/O manager is now compiled in by default, but to avoid its overhead, it is only enabled when the TEST_IO_FLAGS or TEST_IO_BLOCK environment variables are set. * Fix filefrag's ideal extent calculation (Closes: #458306) * Fix postinstall scripts when the user/group is in LDAP (Closes: #497010) * Add Indonesian and update French, Polish, Dutch, German, Sweedish, Czech, and Vietnamese Translations. (Closes: #313697, #401092) * Update/clarified man pages * Add dpkg-gensymbols support to track ABI changes to the libraries * Add lintian overrides for uuid-runtime and libuuid1 * Remove (no longer needed) lintian overrides for e2fsck-static * Add debian/watch file -- Theodore Y. Ts'o Mon, 01 Sep 2008 11:30:21 -0400 e2fsprogs (1.41.0-4) unstable; urgency=low * mke2fs will issue a warning if mke2fs.conf hasn't been updated and the user tries to create an ext3, ext4, or ext4dev filesystem, since it depends on the mke2fs.conf file in order to create the filesystem properly with the appropriate features. * Fix the maximum journal size message in mke2fs and tune2fs to be consistent/correct. (Closes: #491620) * Add detection for hfsx filesystem and add label and uuid detection for hfs, hfsplus, and hfsx filesystems in libblkid. * Fix cosmetic issue in resize2fs when a progress bar doesn't finish with a newline for pass 4 (when the inode references are updated). * Teach resize2fs to move blocks when extents are present (when shrinking a filesystem and/or if resize_inode is not present). * Teach resize2fs to work correctly with the uninit_bg when blocks need to be moved or allocated. * Fix and optimize extent manipulation in libext2fs for resize2fs. * Fix "dumpe2fs -i" and "debugfs -i". (Closes: #495830) * Fix resize2fs incorrectly managing directory in-use counts when shrinking filesystems and directory inodes need to be moved. * Fix spurious e2fsck complaints with i_size with extents and large files and preallocated blocks. * Make sure the creation timestamp is set by mke2fs and by new inodes created by the libext2fs in general. * Fix ind/dind/tind statistics when extents are present, and add extent tree depth statistics. * Add a fragmentation report extended option to e2fsck. * Fix blkid cache validation and some possible blkid crashes (Closes: #493216) * Teach debugfs's htree command to work with extent-based directories. * Improve the error message for "tune2fs -I". * Fix miscellaneous strings and usage messages pointed out by the translators. (Thanks, translators!) * Enforce that mke2fs won't allow features for revision 0 filesystems. * Optimize inode table allocation in mke2fs for flex_bg filesystems. * Update/clarified man pages * Fix minor typo in uuid-runtime's debian package description * Wrap debian/copyright files to avoid "line too long" lintian warnings -- Theodore Y. Ts'o Sat, 23 Aug 2008 08:56:47 -0400 e2fsprogs (1.41.0-3ubuntu3) intrepid; urgency=low * Revert previous attempt to fix FTBFS, it didn't work. Disable pkg-create-dbgsym altogether. There is no way that poor pkg-create-dbgsym could cope with this packages' very "custom" way of producing *-dbg. -- Martin Pitt Mon, 11 Aug 2008 16:31:31 +0200 e2fsprogs (1.41.0-3ubuntu2) intrepid; urgency=low * debian/rules: don't build a -dbg package for e2fsck-static, as this appears to confuse the dbgsym handler on the Ubuntu buildds. -- Steve Langasek Fri, 08 Aug 2008 23:15:10 +0000 e2fsprogs (1.41.0-3ubuntu1) intrepid; urgency=low * Merge from Debian unstable (LP: #254152, #246461), remaining changes: - Do not build-depend on dietlibc-dev, which is in universe. -- Steve Langasek Fri, 08 Aug 2008 20:32:11 +0000 e2fsprogs (1.41.0-3) unstable; urgency=medium * Fix mips-specific FTBFS problem in debian/rules file * Synchronize section and priority levels in control file with the FTP masters' override file. -- Theodore Y. Ts'o Tue, 15 Jul 2008 11:38:59 -0400 e2fsprogs (1.41.0-2) unstable; urgency=medium * Don't try to check the group descriptor checksum if the GDT_CSUM feature is not present. (Closes: #490637) * Add a new blkid -L option which pretty-prints the currently available block devices. (Closes: #490527) -- Theodore Y. Ts'o Sun, 13 Jul 2008 19:18:08 -0400 e2fsprogs (1.41.0-1) unstable; urgency=medium * New upstream version * Make e2fsck detect corrupted block group descriptors that would cause it to relocate inode tables, causing more damage to the filesystem, and make it try the backup superblock/block group descriptors first. * Fix resize2fs to clean up the resize_inode if all of the reserved gdt blocks are consumed during an off-line resize. * Enable huge_file, dir_nlink, extra_isize feautres for mke2fs and tune2fs. * Enable huge_file, dir_nlink, extra_isize, and uninit_bg by default in mke2fs.conf. * Fix badblocks terminology in man page and program output. (Closes: #440983, #440981) * Clarify stripe-width and stride-size in mke2fs man page. (Closes: #487849) * mke2fs: Dumb down filesystems for GNU Hurd (Closes: #471977) * Add bash-static to the list of shells recommended for e2fsck-static (Closes: #490003) * mke2fs: Fix flex_bg metadata default layout to avoid a hole between the bitmaps and inode tables. -- Theodore Y. Ts'o Thu, 10 Jul 2008 17:25:32 -0400 e2fsprogs (1.41~WIP-2008-07-07-1) experimental; urgency=low * New upstream version (pre-release for e2sprogs 1.41) * Update to indicate compliance with debian policy version 3.8.0.0. * Fix e2fsck to not truncate valid extent files that are larger than what is supported by indirect files. * Add -dbg packages which contain the debugging information. * mke2fs: Print a better error message when a device is too big. (Closes: #488663) * Create external journal devices with a default blocksize of 4k * Fix bug in badblocks which caused crash when lots of -t patterns are given. (Closes: #487298) * Fix blkid handling of stale entries. (Closes: #487758, #487783) * Update Vietnamese, Polish, French, Spanish, German, Catalan, Dutch, Czech translations from the translation project. * Fix FTBFS problem on MIPS (Closes: #487675) * Fix bug in libuuid1.postinst which would cause it to blow up if there were spaces around the equals sign in /etc/adduser.conf. (Closes: #487443) * Update/clarified man pages. (Closes: #393313) -- Theodore Y. Ts'o Mon, 07 Jul 2008 16:30:43 -0400 e2fsprogs (1.41~WIP-2008-06-17-1) experimental; urgency=low * New upstream version (pre-release for e2fsprogs 1.41) * New options to badblocks allow it to limit how quickly it reads from disk (for background scrubbing) and abort after a finding giving a number of errors. * Add support for ext4 filesystem features. (Closes: #388452, #425477) * Tune2fs can migrate a filesystem from using 128 byte inodes to larger inode sizes so the user can take full advantage of ext4) * E2fsck and mke2fs can optionally record an undo log which can be replayed by the e2undo program. * E2fsck will display a less cryptic message when the last check field in the superblock is in the future. (Closes: #446005) * Improve blkid probes for LVM volumes and swap partitions * Mke2fs has a much more sophisticated system for controlling the parameters of newly created filesystems. The -t option now is used to specify the filesystem type. See the mke2fs and mke2fs.conf man pages for more details. * Resize2fs will now print the minimum needed filesystem size if given the -P option, and will resize the filesystem to the smallest possible size if given the -M option. * E2fsck now performs more extensive and careful checks of extended attributes stored in the inode. * Mke2fs will always make sure that lost+found always has at least 2 blocks, even for filesystems with very large blocksizes (i.e., 64kb). * The debugfs "ls" command now supports the -p option, which causes filenames to be printed surrounded by double quotes. * Fix a potential off-by-one buffer overflow in e2image * The chattr program will now return a non-zero exit code in case of failures. * This version of e2fsprogs removes support for legacy big-endian filesystems and for MASIX filesystems. * Add I/O statistics reporting to e2fsck. -- Theodore Y. Ts'o Tue, 17 Jun 2008 23:57:08 -0400 e2fsprogs (1.40.11-1ubuntu1) intrepid; urgency=low * Do not build-depend on dietlibc-dev, it's in Universe (LP: #251746). -- Luca Falavigna Fri, 25 Jul 2008 11:23:54 +0200 e2fsprogs (1.40.11-1) unstable; urgency=low * Change mke2fs, tune2fs and resize2fs to use floating point precision when calculating the number of reserved blocks. (Closes: #452639) * Update Spanish and Catalan translations. * Fix ext2fs_swap{16,32,64} for external applications. (Closes: #484879) * Improve uuid-runtime package description. (Closes: #483962) * Improve e2fsprogs package description. (Closes: #483023) * Add support for detecting ZFS volumes to libblkid. * Clarify debugfs man page. (Closes: #486463) -- Theodore Y. Ts'o Tue, 17 Jun 2008 21:59:21 -0400 e2fsprogs (1.40.10-1) unstable; urgency=low * Fix a very rare potential data corruption bug in e2fsck's journal replay. * Updated German, Dutch, Sweedish, and Vietnamese translations. * Force blkid to revalidate a device if its mtime is newer than the last validation time in the cache. -- Theodore Y. Ts'o Wed, 21 May 2008 13:35:12 -0400 e2fsprogs (1.40.9-1) unstable; urgency=low * Fix fsck so that if multiple filesystems are being checked in parallel, the progress bar for subsequent filesystems will be correctly displayed. (Closes: #432865) * Fix fsck -Cn for n!=0 for better Ubuntu boot-time support * debugfs: Don't bother using a pager of stdout is not a tty * Fix tune2fs and debugfs to correctly parse time strings during daylight savings time. (Closes: #471882) * Teach fsck to treat ext4 and ext4 filesystems as ext* filesystems * Logsave will now propagate SIGINT and SIGTERM signals to its child process. * Mke2fs will not allow the illogical combination of the resize_inode and meta_bg filesystem features. * Use UID/GID ranges from adduser.conf if present, even though we don't use adduser to add users/groups. (Closes: #473179) * Updated German, Czech, Dutch, French, Polish, Sweedish, and Vietnamese translations. * Update/clarified the mke2fs man page -- Theodore Y. Ts'o Sun, 27 Apr 2008 00:35:20 -0400 e2fsprogs (1.40.8-2) unstable; urgency=low * One more big-endian swap fix needed for resize2fs to work correctly with in-inode extended attributes. * Fix minor security issues identified in uuidd. * Remove e2fsprogs preinstall script which contained stuff not needed in well over two stable releases. -- Theodore Y. Ts'o Fri, 14 Mar 2008 14:25:54 -0400 e2fsprogs (1.40.8-1) unstable; urgency=low * Fix e2image -I so it works on image files which are larger than 2GB. * Fix e2fsck's handling of directory inodes with a corrupt size field. * Fully fix a resize2fs bug where extended attributes in large inodes could get dropped on big-endian systems. * Update Czech, Dutch, Polish, Sweedish, and Vietnamese translations. * Significantly updated German translation! Thanks to Philipp Thomas from Novell for stepping up to be our new German translation maintainer! (Closes: #302512, #370247, #401092, #412882) * Fixed mke2fs man page to document new default inode size. -- Theodore Y. Ts'o Thu, 13 Mar 2008 20:00:09 -0400 e2fsprogs (1.40.7-1) unstable; urgency=low * New upstream release * tune2fs no longer will remove the sparse_super feature, as it is dangerous * Update/clarified various man pages * Fix bug where large nodes were not getting fully copied when shrinking a fileystem using resize2fs. * Allow mke2fs and tune2fs to manipulate the large_file feature flag * Suppress fsck's warning message about an old-style fstab if the fstab file is empty. (Closes: #468176) * E2fsck will no longer clear the large_files feature flag automatically when there are no more large files in the system. * Fix blkid code to avoid segfaulting when a device mapper volume disappears out from under it. * Enhance e2fsck's reporting of unsupported filesystem features * Fix dumpe2fs command syntax for explicit superblock/blocksize parameters * Teach tune2fs to clear the resize_inode feature flag * Fix libuuid1 postinstall script to explicitly pass 100 to UID_MIN and GID_MIN, to make it clear we are not trying to allocate an uid/gid in the globally reserved range. (Closes: #466929) * Fix memory leak in ext2fs_alloc_block() * Teach blkid to recognize LVM2 physical volumes * Add support to dumpe2fs, mke2fs, and tune2fs for specifying and printing the RAID stride and stripe width. * Add support for new superblock fields to debugfs's set_super_value command * Teach debugfs to print "mostly-printable" xattr strings, such as is used by SELinux. * Add support in fsck to ignore mounted filesystems when given the -M option * Fix uuidd so it creates the pid file with the correct pid number * Update Czech, Dutch, Polish, Sweedish, and Vietnamese translations from the Translation Project. -- Theodore Y. Ts'o Thu, 28 Feb 2008 22:27:39 -0500 e2fsprogs (1.40.6-1) unstable; urgency=low * New upstream release * Add support for returning labels for UDF filesystems in the blkid library. * Fix bug in the blkid library where cached filesystems was not being flushed when opening USB devices returned the error ENOMEDIUM. (Closes: #463787) * Add logic to the blkid library to automatically choose whether a filesystem should be mounted as ext4 or ext4dev, as appropriate. * Allow tune2fs to set and clear the test_fs flag on ext4 filesystems. * Document the BLKID_FILE environment variable in the libblkid man page * Update Vietnamese and Czech translations from the translation project * Fix dependency problem caused by dpkg 1.14.16 (Closes: #436058) * Use thread local storage to fix a theoretical race condition if two threads try to format an unknown error code at the same time in the com_err library. -- Theodore Y. Ts'o Sun, 10 Feb 2008 00:06:02 -0500 e2fsprogs (1.40.5-2) unstable; urgency=low * Fix debian/control and debian/rules so that they work correctly after a change in dpkg-gencontrol's behavior after version 1.14.16 of dpkg. This fixes bad version dependencies for comerr-dev, uuid-dev and ss-dev. Thanks to Don Armstrong for the explanation and Margarity Manterola for a proposed patch. (Closes: #463058) -- Theodore Y. Ts'o Wed, 30 Jan 2008 07:17:27 -0500 e2fsprogs (1.40.5-1) unstable; urgency=low * New upstream release. * Mke2fs will now create new filesystems with 256 byte inodes and the ext_attr feature flag by default. This allows for much better future compatibity with ext4 and speeds up extended attributes even on ext3 filesystems. * Teach mke2fs and tune2fs to set a "test_fs" flag, which indicates that it is ok to use the filesystem on in-development kernel code (i.e., ext4dev) * E2fsck now optimizes non-htree directories by sorting them by inode number. * Add support for detecting HFS+ and ext4/ext4dev filesystems in blkid * Fix blkid's ntfs UUID handling so it is compatible with vol_id * Avoid a floating point exception when blkid tries to probe a corrpt reiserfs filesystem. * Fix potential overflow problem in e2image if the device name is too long. * Cause e2image to exit immediately with an error message on a disk full situation. * Fix a minor typos in the resize2fs and uuidd manpages. * E2fsck will no longer backup superblocks when the kernel makes certain "safe" feature set changes behind the user's back. * Fix debugfs's lsdel command so it works on large files * Allow a user to undelete an inode with linking to a destination directory. * Update Swedish translation file from the Translation Project * The libuuid1 and uuid-runtime packages requires passwd package, so declare it as a dependency. (Closes: #459403) * Fix a FTBFS problem on x86_64 caused by the fact that dietlibc doesn't provide llseek on the x86_64. (Closes: #459614) * Don't use dietlibc on platforms that don't support it (Closes: #459475) -- Theodore Y. Ts'o Sun, 27 Jan 2008 16:57:34 -0500 e2fsprogs (1.40.4-1) unstable; urgency=low * Make sure that programs like tune2fs, when modifying a mounted filesystem do not write the backup superblocks with the NEEDS_RECOVERY flag, to avoid e2fsck from needlessly forcing a full fsck because it thinks the feature flags need to be backed up from the master to the backup superblocks. (Closes: #454926) * Improve time-based UUID generation to guarantee uniqueness even when UUID's are being generated at very high rates on SMP systems. To do this we use an optional setuid helper daemon (uuidd) which is started by libuuid when it is needed. The uuidd daemon is packaged in the (new) uuid-runtime package, which now also includes the uuidgen program (which had been previously been included as part of the e2fsprogs package). * Fix fsck to only treat '#' characters at the beginning of /etc/fstab lines as starting a comment. This avoids spurious warnings printed for filesystems such as fuse that often use '#' as part of the filesystem specifier (i.e., wdfs#https://dav.hoster.com/foo). * Enhance the blkid program to pretty-print control and meta characters to avoid garbage filesystem labels from screwing up the user's terminal * Fix potential integer overflows passed to malloc() in resize2fs * Update Dutch, Polish, and Vietnamese translations from the Translation Project. Remove the Rwandan translation upon advice of the Translation Project. * Fix cross-compilation support for non-Linux architectures (Closes: #451172, #437720) * Clarified and improved man pages (Closes: #444883, #441872) * Fix potential divide by zero error when libblkid tried probing an invalid FAT filesystem. * Make error_message() in libcom_err DTRT when when a 64-bit sign-extended error code is passed to it. * Build the e2fsck-static package so that e2fsck.static will not use TLS and hence will run correctly on back-level Debian systems using a 2.4 Linux kernel. (Closes: #458017) -- Theodore Y. Ts'o Mon, 31 Dec 2007 22:40:42 -0500 e2fsprogs (1.40.3-1) unstable; urgency=medium * New upstream release * libext2fs: Add checks to prevent integer overflows passed to malloc(). Fixes security issue related to Xen's pygrub: CVE-2007-5497 * libss: Fix parallel build failure * e2fsprogs: fix blkid whole-disk scanning heuristics * libext2fs: Fix a corner case bug in ext2fs_unlink * fix check_mntent_file() to pass mode for open(O_CREAT) * Fix errors in test_ss.c so it can be an example application and test case * e2image in raw-mode appends an extra byte to image-file * Fix typo in the summary section of the blkid man page * mke2fs: Change usage message to use -E instead -R, which is deprecated * libblkid: recognize squashfs filesystems on BE systems. * libblkid: detect squashfs * e2fsck: backup superblocks if key constants have changed * e2fsck: update the backup superblocks if the feature bitmasks are changed * ext2fs_dblist_dir_iterate: Fix ABORT propagation logic * libblkid: Add more magic numbers that might mean there is a FAT filesystem * e2fsck: Don't mark the filesystem invalid because of time errors * Work around lame Ubuntu init scripts / installer bugs * fsck: Ignore /etc/fstab entries for bind mounts * e2fsck: If the superblock is corrupt, automatically retry with the backup sb * Don't crash if s_inode_size is zero * Use sscanf instead of atoi when parsing e2fsck options * Add Catalan translation and update Spanish, French, and Dutch translations from the Translation Project. (Closes: #411562) * Fix typo and clarify the uuidgen man page * Make sure $prefix/etc is created before installing mke2fs.conf * e2fsck: Allow i_size to be rounded up to the size of a VM page * Fix a bug in ext2fs_initialize() which causes mke2fs to fail while allocating inode tables for some relatively rare odd disk sizes. * Fix big-endian byte-swapping bug in ext2fs_swap_inode_full() -- Theodore Y. Ts'o Wed, 05 Dec 2007 20:04:28 -0500 e2fsprogs (1.40.2-1) unstable; urgency=low * New upstream release * e2fsck: Fix salvage_directory when the last entry's rec_len is too big * Update Turkish, Polish, Dutch, and Vietnamese PO files from the Translation Project * Fix a bug which would cause e2fsck segfault on very badly damaged filesystems * Update tune2fs man page to include more discussion of reserved blocks (Addresses Ubuntu Launchpad bug #47817) -- Theodore Y. Ts'o Thu, 12 Jul 2007 22:18:51 -0400 e2fsprogs (1.40.1-1) unstable; urgency=low * New upstream release * Clarify mk_cmds' error reporting * e2fsck: Detect recursive loops in @-expansions * Compile the default mke2fs.conf into mke2fs program * Fix bogus strip permission errors when building under Debian * Update Vietnamese, French, and Dutch PO files from the Translation Project * Fix bug which could cause libblkid to loop forever (Closes: #432052) -- Theodore Y. Ts'o Sun, 8 Jul 2007 20:25:08 -0400 e2fsprogs (1.40-1) unstable; urgency=low * New upstream release * Remove RFC-4122 logic from Debian build rules (Closes: #407107) * Fix com_err.texinfo so that the install-info command will remove the com_err info file from the /usr/share/info/dir file when the comerr-dev package is removed and purged (Closes: #401711) * Fix divide-by-zero error in blkid's NTFS proving logic * Add new blkid -g option which causes the blkid cache to be garbage collected * libblkid: Fix bug which could cuase bid_type to be corrupted * mke2fs: Add santy check to make sure inode_size * num_inodes isn't too big * Fix additional Coverity bugs in mke2fs and e2fsck * Improve sanity check in e2fsck's algorithm for finding a backup superblock * Fix e2fsck get_size logic so that it will work with the Linux floppy driver (Closes: #410569) * Fix error checking of badblock's last-block and start-block arguments (Closes: #416477) * e2fsck: avoid writing overwriting the backup superblocks until the master superblock is confirmed to be sane * Make the blkid library more paranoid about concluding a partition contains a NTFS filesystem. (Addresses Launchpad Bug: #110138) * Enhance e2fsck so it will recreate the ext3 journal if the original journal inode was cleared to due being corrupt * Fix e2fsck so that if the backup journal information is used, that this is written out to the journal inode * Make e2fsck check all of the blocks in the journal inode for validity * blkid: Add support for detecting LUKS encrypted partitions * e2fsck: added sanity check for xattr validation * Fix byte-swapping bug for filesystems with large inodes * Clarify the copyright licenses used by the various libraries in COPYING * Remove RFC-4122 from upstream (Closes: #407107) * Fix info-dir line which prevented install-info from removing com_err entry from from /usr/share/info/dir when the comerr-dev package is purged (Closes: #401711) -- Theodore Y. Ts'o Sun, 29 Jun 2007 22:40:27 -0400 e2fsprogs (1.39+1.40-WIP-2007.04.07+dfsg-2) unstable; urgency=low * Allow the journal to up to 10,240,000 blocks * Fix blkid library to recognize MD 0.90 superblock on little endian systems * Fix blkid library to report the correct UUID from MD superblocks * Fix signed vs. unsigned problem in debugfs' setb/testb/freeb commands * Enhance debugfs's date parser so it acccepts integer values * Fix e2fsck's pass1c accounting so it doesn't terminate too early if a file with multiply claimed blocks is hard linked. or not at all if the root directory contains shared blocks * Enhance debugfs so it can modify the block group descriptors using the command set_block_group_descriptor * Improve e2fsck's reporting of I/O errors so it's clearer what it was trying to do when an error happens * Fix a bug in how e2fsprogs byte swaps inodes containing fast symlinks that have extended attributes. * Fix potential file descriptor leak in ext2fs_get_device_size() * Fix minor typo in e2fsck.conf.5 man page * Cleanup udeb dependency (Closes: #419605) * Rebuilding with libdevmapper 1.02.1 (Closes: #421022 and #421668) * Add dependency on comerr-dev to ss-dev (Closes: #408352) * Make mke2fs use sane defaults when /etc/mke2fs.conf doesn't exist * Fix mke2fs and debugfs to support large (> 16 bit) uid's and gid's * Fix spelling typo in debian package description for libblkid1 (Closes: #399155) * Remove -WIP language from the debian copyright file. (Closes: #415560) * Remove check in e2fsck which required EA's in inodes to be sorted (We should get this back-ported to the stable branch since filesystems with large inodes will have EA's erroneously removed, which will for example toast an SELinux system.) -- Theodore Y. Ts'o Sun, 6 May 2007 19:44:35 -0400 e2fsprogs (1.39+1.40-WIP-2007.04.07+dfsg-1) unstable; urgency=low * Add libreadline.so.5 support to libss. * Impove badblocks -n/-w exclusive usage message. * Add debugging code (via the COMERR_DEBUG env. variable) to the com_err library * Fix dump_unused segfault in debugfs when a filesystem is not open * Add versioned dependency in Debian's shlibs for libblkid. (Closes: #413208) * Fix memory leak in blkid library. (Closes: #413661) * Let the debugfs lcd command work even if a filesystem is not open * Fix large number of miscellaneous Coveriy bugs. (None were security-security). * Fix e2fsck to clear i_size for special devices with a bogus i_blocks field on the first pass. * Fix e2fsck to set the file type of the '..' entry when connecting a directory to lost+found. * Enhance e2fsck to recover directories whose modes field were corrupted to look like special files. * Allow debugfs to dump > 2GB files. (Closes: #412614) * Misc. man page cleanups. (Closes: #379695) * Fix resize2fs parsing of size parameter (Closes: #408298) * Fix infinite loop in e2fsck on really big filesystems (Closes: #411838) * Fix memory leak in ext2fs_write_new_inode() * Add support for using a scratch files directory to reduce e2fsck's memory utilization on really big filesystems. -- Theodore Y. Ts'o Sat, 7 Apr 2007 10:38:40 -0400 e2fsprogs (1.39+1.40-WIP-2006.11.14+dfsg-1) unstable; urgency=low * Fix spurious error from e2fsck -c and mke2fs -c caused by the fix to #386475. * Add dirhash signed/unsigned hint to superblock. (Closes: #389772) * Allow unix_io offsets greater than 2 gigabytes * Make sure mk_cmds and compile_et work even in strange locales * Fix type-punning bug which caused dumpe2fs to crash on the Arm platform (Closes: #397044) * Add explanatory message to badblocks that -n and -w are mutually exclusive. (Closes: #371869) * New +dfsg source tarball that has useful documentation REALLY removed to satisfy the DFSG License Nazi's. (Closes: #390664) -- Theodore Y. Ts'o Tue, 14 Nov 2006 23:45:34 -0500 e2fsprogs (1.39+1.40-WIP-2006.10.02+dfsg-2) unstable; urgency=low * Add failsafes against duplicate UUID generation caused by threads * Fix potential e2fsck -n crash caused by corrupt htrees * Reorder the library line for static linking, to fix undefined references to pthreads on amd64. (Closes: #393680) * Fix mke2fs's error checking when creating revision 0 filesystems. (Closes: #392107) -- Theodore Y. Ts'o Sun, 22 Oct 2006 00:19:44 -0400 e2fsprogs (1.39+1.40-WIP-2006.10.02+dfsg-1) unstable; urgency=low * New +dfsg source tarball that has useful documentation removed to satisfy the DFSG License Nazi's. (Closes: #390664) * Remove dependency on e2fsprogs from the e2fsck-static package (Closes: #383521) * Fix badblocks interpretation of its first optional argument (last-block) (Closes: #386475) -- Theodore Y. Ts'o Tue, 3 Oct 2006 23:36:05 -0400 e2fsprogs (1.39+1.40-WIP-2006.10.02-2) unstable; urgency=low * Build using the sid version of libc, not experimental! -- Theodore Y. Ts'o Mon, 2 Oct 2006 21:43:44 -0400 e2fsprogs (1.39+1.40-WIP-2006.10.02-1) unstable; urgency=low * Previous NMU acknowledged (Closes: #388718) * Fix debugfs to print unsigned values for EA's * Minor man page fixes (Closes: #373004, #369761) * Allow the default inode size to be specified in mke2fs.conf * Require mke2fs -F -F for really dangerous operations * Add Vietnamese translation * Update French and Dutch translations * Fix debugfs coredump when lsdel is run without an open filesystem (Closes: #378335) * Fix spelling error in e2fsck output * Fix overflow problems when the number of inodes and blocks is close to 2**32-1 * Add GFS/GFS2 support to the blkid library. * Fix blkid support of empty FAT filesystem labels * Avoid recursing forever due to symlinks in /dev by the blkid library * Fix bogus error messages from resize2fs caused by the filesystem not containing a resize inode. (Closes: #380548) * Fixed device-mapper probing (it was failing due to an extra '/dev' being added to the device pathname) * Make sure the default minimum size journal is big enough to support on-line resizing. * Add a versioned build-dep on texi2html (Closes: #389554) * Remove useful UUID specification thanks to License Nazi's (Closes: #390664) -- Theodore Y. Ts'o Mon, 2 Oct 2006 13:04:27 -0400 e2fsprogs (1.39-1.1) unstable; urgency=low * Non-maintainer upload * Added -pthreads to devmapper libraries (Closes: #388718) -- Ben Hutchings Sat, 30 Sep 2006 12:49:47 +0100 e2fsprogs (1.39-1) unstable; urgency=low * New upstream version * Fix debugfs's dump_unused command so it will not core dump on filesystems with a 64k blocksize * Clarified and improved man pages, including spelling errors (Closes: #368392, #368393, #368394, #368179) * New filesystems are now created with directory indexing and on-line resizing enabled by default * Fix previously mangled wording in an older Debian changelog entry * Fix doc-base pointer to the top-level html file (Closes: #362544, #362970) -- Theodore Y. Ts'o Mon, 29 May 2006 11:07:53 -0400 e2fsprogs (1.38+1.39-WIP-2006.04.09-2) unstable; urgency=low * Resize2fs automatically detects the previously used RAID stride parameter so that resized filesystems can be more optimally laid out for RAID filesystems. * Fix mke2fs -cc and e2fsck -cc (Closes: #366017) * Fix initrd script to fix failure with 2.4 kernels (Closes: #364516) * Mke2fs now uses an improved layout for RAID filesystems when the stride parameter is specified. * Fix the debugfs commands htree_dump, dx_hash, and list_dir so they print a usage message when an illegal option character is given. * Speed up mke2fs and e2fsck by writing inode and block bitmaps in one pass * Fix filefrag to be 32-bit clean by using unsigned long instead of a signed integer for block numbers. * Fix a bug in the e2p library which could cause dumpe2fs to (rarely) fail to print out the journal or hash seed UUID. * Fix memory leak in e2fsck's error paths. * Fix comerr-dev's doc-base pointer to the top-level html file -- Theodore Y. Ts'o Sun, 14 May 2006 18:09:20 -0400 e2fsprogs (1.38+1.39-WIP-2006.04.09-1) unstable; urgency=low * Update config.guess and config.sub to latest version (2006-02-23) from FSF * Update French, Dutch, Polish, Swedish, and Turkish translations * Fix asm/types.h type conflicts on AMD64 to fix FTBFS problems. (Closes: #360661, #360317) * Fix bug which caused mke2fs -j to fail with an EBUSY error. (Closes #360652) -- Theodore Y. Ts'o Sun, 9 Apr 2006 23:04:15 -0400 e2fsprogs (1.38+1.39-WIP-2006.03.29-2) unstable; urgency=low * Added missing build dependency on libdevmapper-dev. (Closes: #360046) -- Theodore Y. Ts'o Thu, 30 Mar 2006 12:33:30 -0500 e2fsprogs (1.38+1.39-WIP-2006.03.29-1) unstable; urgency=low * Add udeb: lines to the Debian's shlibs files (Closes: #356293) * Enhance dumpe2fs to print the size of the journal * Fix e2sprogs so that it is 32-bit clean on x86 platorms. * Fix mklost+ound so that it creates a full-sized directory on 4k and larger block sizes. * Add mke2fs.conf coniguration file to conigure mke2fs's defaults * Add devmapper support to the blkid library. * E2fsck, resize2fs and mke2fs will now open the filesystem device in exclusive mode * Fix documentation and man pages. (Closes: #351268, #357951, #347295, #316040) * Cix "mke2fs -O resize_inode" for very large filesystems (Closes: #346580) * Add on-line resizing support into resize2fs * Fix blkid's handling of verification timeouts when the system clock is insane * Fix library Makefiles so they work with GNU make 3.81 as well as GNU make 3.80. * Enhance the blkid library to display the uuid of external journals for ext3 filesystems * Enhance e2fsck so it will fix the external journal hint in the superblock if it is out of date. * Fix debugfs's icheck to correctly report the owner of an EA block * Update Sweedish translation * Add a configuration parameter to e2fsck.conf to control whether or not filesystem checks are done when the system is running on battery power. * Print an explanation when skipping a check due being on battery (Closes: #350306) * Update French translation (Closes: #341911, #300871, #316604, #316782, #330789) -- Theodore Y. Ts'o Wed, 29 Mar 2006 20:37:27 -0500 e2fsprogs (1.38+1.39-WIP-2005.12.31-1) unstable; urgency=medium * New upstream version * Update profile library code base - Allow tag and section names to have quoted strings - Make the profile library support reading files in a conf.d directory - Slightly change the parser to support comments at the end of all lines - Add syntax error reporting - Simplify profile code - Add E2FSCK_CONFIG environment variable which overrides where to find /etc/e2fsck.conf - Make e2fsck's filesystem problem handing configurable - Fix FTBFS bug if comerr-dev is not installed. (Closes: #345519) * Update Dutch, Polish, and Swedish translations. (Closes: #343149) * Fix a fd leak across an exec in libuuid. (Closes: #345832) * Address override file disparities * Make urgency be medium to accelerate a workaround to Debian's buggy initscripts (See Debian bugs: #343662, #343645) -- Theodore Y. Ts'o Fri, 6 Jan 2006 21:41:06 -0500 e2fsprogs (1.38+1.39-WIP-2005.12.10-2) unstable; urgency=low * Make resize2fs expand or truncate a file containing a filesystem. (Closes: #271607) * Add support for lib64ext2fs-nopic.a for the mips architecture (Closes: #329074) * Deal with the fact that Debian's boot sequence bogusly doesn't set the time correctly until very late in the boot process; so if the superblock's last mount or write time is in the future, don't treat this as a fatal error. (Closes: #343662, #343645) * Move the blkid and uuidgen binaries out of libblkid1 and libuuid1 and into the e2fsprogs package to support soname transitions and simulaneous installs of multiarch flavors to coexist. (It's not worth creating two whole new packages for two separate binaries, so we just fold them into e2fsprogs.) (Closes: #330737, #330736) * Optionally allow the user to interrupt e2fsck "safely" during a boot sequence without causing the boot scripts to abort. (Closes: #150295) * Update and clarify man pages (Closes: #312515) -- Theodore Y. Ts'o Sat, 31 Dec 2005 01:05:35 -0500 e2fsprogs (1.38+1.39-WIP-2005.12.10-1) unstable; urgency=low * Update and clarify man pages (Closes: #329859, #322188, #316811) * Fix bug creating external journals on big-endian machines. * Detect if the superblock's last mount time or last write time is in the future, and offer to fix it if this is the case (Closes: #327580) * Add new debugfs command, set_current_time which sets the time used to update the filesystems's time fields. * Fix display bug in badblocks -sw when printing the "done" message. (Closes: #322231) * Improve blkid's FAT/VFAT filesystem detection code so that it can find labels stored the root directory and to be more correct/paranoid. * Add support to extract iso9660 label information to the blkid library. * Add support to detect the reiser4 filesystem to the blkid library. * Add support for detecting software suspend partitions to the blkid library. * Fix the blkid library to notice when an ext2 filesystem is upgraded to ext3. * Fix debugfs's set_inode_field so that successfully sets the i_size field * Updated Dutch translation * E2fsck will stop and print a warning if the user tries running a read/write badblocks test on a read-only mounted root filesystem. * Add resize2fs and badblocks to the e2fsprogs udeb (Closes: #290429, #310950) * Avoid trying to mount the root device if it is an NFS device. (Closes: #310428) -- Theodore Y. Ts'o Sat, 10 Dec 2005 22:49:47 -0500 e2fsprogs (1.38-2) unstable; urgency=low * Previous NMU acknowledged (Closes: #317862, #320389) * Fix debugfs's set_inode_fields command so it doesn't silently fail when setting certain inode fields. * Fix e2fsck from segfaulting on disconnected inodes that contain one or more extended attributes. (Closes: #316736, #318463) * Allow mke2fs and tune2fs to take fractional percentages to the -m option in mke2fs and tune2fs. (Closes: #80205) * Fix a compile_et bug which miscount the number of error messages if continuations are used in the .et file, and fix compatibility problems with MIT Kerberos 1.4 * Add extra sanity checks to protect users from unusual cirucmstances where /etc/mtab may not be sane, by checking to see if the device is reported busy (works on Linux 2.6) kernels. (Closes: #319002) * Fix use-after-free bug in e2fsck when finishing up the use of the e2fsck context structure. -- Theodore Y. Ts'o Sun, 21 Aug 2005 23:35:29 -0400 e2fsprogs (1.38-1.1) unstable; urgency=low * NMU for RC bug durring bug squishing party * Fix for changes to texi2html, patch by Matt Kraai (Closes: #317862, #320389) * version build-depend on texi2html, won't work with older one anymore -- Blars Blarson Fri, 5 Aug 2005 04:46:54 +0000 e2fsprogs (1.38-1) unstable; urgency=low * New upstream version * Fix ia64 core dump bug caused by e2fsprogs running afoul of C99 strict type aliasing rules on newer gcc compilers. (Addresses Red Hat Bugzilla ##161183.) * Fix minor typo's in tune2fs man page. * Mke2fs will refuse to create filesystems greater than 2**31-1 blocks, unless forced, to avoid kernel bugs that still need to be fixed as of this release. * Update French, Dutch, Polish, Swedish, and Turkish translations. -- Theodore Y. Ts'o Wed, 30 Jun 2005 20:02:42 -0400 e2fsprogs (1.37+1.38-WIP-0620-1) unstable; urgency=low * Update and clarify man pages. * Clarify and clean up e2fsck's problem descriptions * Add Dutch translation, and update French, Polish, Swedish, and Turkish translation. * mke2fs and badblocks will check to see if the device appears to be busy and abort if so; this feature only works on Linux 2.6 systems. (Closes: #308594) * Fix filefrag so that it works on 64-bit platforms where the size of an integer != the size of a long. (Closes: #309655) * Change the default journal size to be bigger for larger filesystems, given modern memory sizes. * Fix com_err library so it is compatible with MIT krb5 1.4. -- Theodore Y. Ts'o Mon, 20 Jun 2005 17:11:29 -0400 e2fsprogs (1.37+1.38-WIP-0509-1) unstable; urgency=low * Make the blkid library much more efficient when a new device is added on systems with a huge number of disks. * Fix handling of the PAGER and SS_READLINE_PATH environment variables in the ss library, and the TEST_IO_* environemnt vaiables for the test_io io_manager, which was accidentally broken in 1.37-1. * Fix libblkid's recognition of cramfs filesystems, and add support for cramfs labels. * Fix filefrag to give correct results when the first block found is an indirect block. (Closes: #307607) * Fix debugfs seg fault when the stat command is given and a filesystem is not open. * Improve environment variable paranoia checks. * Fix e2fsck's handling of multiply claimed blocks involving the resize inode. * When determining the libraries needed for the initrd, unset LD_PRELOAD and LD_LIBRARY_PATH and filter out libraries found in /etc/ld.so.preload. (Closes: #304003) * Update Swedish translation, and added translation for Rwanda. * Minor man page spelling/typo fixes. (Closes: #304591, #304592, #304594, #304597, #304593) -- Theodore Y. Ts'o Mon, 9 May 2005 09:10:20 -0400 e2fsprogs (1.37-2) unstable; urgency=low * Fix filefrag so that it works non ext2/3 filesystems again. (Closes: #303509) * Make sure we include stdlib.h to fix a core dump bug in mke2fs on the IA64 architecture (or other platforms where sizeof(ptr) > sizeof(int)) (Closes: #302200) * Add missing return values so that we don't return garbage in certain error cases in ext2fs_write_new_inode() and ext2fs_read_int_block(). * Fix minor spelling typo in the mke2fs man page * Avoid doing the LOW_DTIME checks if the superblock last mount time indicates that the system clock may not be set correctly. * Add further paranoia checks to the blkid, ext2fs, and ss libraries to make them safe to call from setuid or setgid applications. -- Theodore Y. Ts'o Sat, 9 Apr 2005 11:08:04 -0400 e2fsprogs (1.37-1) unstable; urgency=low * New upstream release. * Fixed a bug in e2fsck so it would notice if a file with an extended attribute block was exactly 2**32 blocks, such that i_blocks wrapped to zero. * Fixed a bug in filefrag which caused it to falsely report a discontinuity when there are one or more unallocated blocks at the beginning of a file. * Fix the missing translations (caused by a bug in the gen-tarball script). (Closes: #296769) * Add support in e2fsck and debugfs for extended attributes in inodes. * Fix the missing translations (caused by a bug in the gen-tarball script). (Closes: #296769) * Force compile_et and mk_cmds to use /usr/bin/awk so that we will work on any Debian system regardless of which version of awk is installed. (Closes: #299341) -- Theodore Y. Ts'o Thu, 21 Mar 2005 22:31:08 -0500 e2fsprogs (1.36release-1) unstable; urgency=low * New upstream release. * Make filefrag print the first and last blocks when in verbose mode. * Drop sparc assembly bitops; it's less efficient than gcc 3.4's generated code, and it triggers compiler warnings on sparc 64. (Closes: #232326) -- Theodore Y. Ts'o Fri, 4 Feb 2005 20:58:35 -0500 e2fsprogs (1.36rc5-1) unstable; urgency=low * Make blkid -t work more consistently even when the cache file is not available or set to /dev/null. (Closes: #292425) * Don't ever use a blocksize greater than 4k, since not all 2.6 kernels will support this. * Fix bug where mke2fs would not correctly create filesystems greater than 4TB. * Fix e2fsck so it won't delete symlinks that contain an extended attribute after the ext_attr feature flag has been cleared. * Fix e2fsck's resize inode handling in some additional corner cases. -- Theodore Y. Ts'o Thu, 27 Jan 2005 22:44:31 -0500 e2fsprogs (1.36rc4-1) unstable; urgency=low * Fix a bug in resize2fs where we don't release the blocks belonging to the old inode table blocks when we move the inode table. (Closes: #290894) * Make sure that we don't write garbage when writing a large inode. * Check NTFS ahead of other filesystems since Windows doesn't always clearing enough of the partition to avoid false positives with older filesystems. (Closes: #291990) * E2fsck now checks the summary filesystem accounting information, and if any of the information is obviously wrong, it will force a full filesystem check. (Closes: #291571) * Clarified and updated tune2fs and blkid man pages * Fix e2fsck to not complain when the resize_inode feature is enabled, s_reserved_gdt_blocks is zero, and there is no DIND block allocated in the resize inode. * Fix blkid -t to display all devices that match the specified criteria, not just the first one. (Closes: #290530) * Add support for the blkid library to recognize Oracle ASM volumes. * Add set_super_value jnl_blocks[] in debugfs. * Fix the filefrag program so that it works correctly with sparse files. * Fix portability problems with FreeBSD, Solaris, and Intel C++ 8.1. * Add support for FreeBSD and Lites as OS Creator values. -- Theodore Y. Ts'o Wed, 26 Jan 2005 10:22:02 -0500 e2fsprogs (1.36rc3-2) unstable; urgency=low * Remove debugging printf's from e2image's -s code. -- Theodore Y. Ts'o Wed, 19 Jan 2005 02:25:53 -0500 e2fsprogs (1.36rc3-1) unstable; urgency=low * New upstream release * Update Italian, French, and Turkish translations * Fixed file descriptor leak in the filefrag program * Add -s option to e2image which scrambles directory entries when making raw image files * Make sure e2fsck doesn't crash if /proc/acpi/ac_adapter does not exist * Added Solaris, FreeBSD portability fixes -- Theodore Y. Ts'o Wed, 19 Jan 2005 00:33:31 -0500 e2fsprogs (1.36rc2-1) unstable; urgency=low * New upstream release * Update Italian translation * Add support for swap partition labels and uuid's -- Theodore Y. Ts'o Tue, 11 Jan 2005 14:12:17 -0500 e2fsprogs (1.36rc1-1) unstable; urgency=low * Fix a FTBFS bug for amd64/gcc-3.0 (Closes: #289133) * Minor man page clarifications. (Closes: #273679) * Add support for online resizing via the resize inode. * Badblocks will now correctly display block numbers greater than 999,999,999 in its progress display. * tune2fs will not allow the user from setting a ridiculous number of reserved blocks which would cause e2fsck to assume the superblock was corrupt. E2fsck's standards for what is a ridiculous number of reserved blocks has also been relaxed to 50% of the blocks in the filesystem. * The blkid library will return vfat in preference to msdos, and ext3 in preference to ext2 (if the journalling flag is set) so that mount will do the right thing. (Closes: #287455) * The fsck program will now accept an optional filedescriptor argument to the -C option. * Mke2fs will now use the -E option for extended options; the old -R (raid options) option is still accepted for backwards compatibility. * Fix a double-free problem in resize2fs. (Red Hat Bugzilla #132707) * Mke2fs will now accept a size in megabytes or gigabytes (via "32m" or "4g" on the command line) if the user finds this more convenient than specifying a block count. * Fix an obscure, hard-to find bug in "e2fsck -S" caused by an inode cache conherency problem. * Debugfs now supports a new command, set_inode_field, which allows a user to manually set a specific inode field more conveniently, as well as set entries in the indirect block map. * Debugfs's set_super_value command has been enhanced so that the user can set most superblock fields, including the date/time fields and some of the more newsly added superblock fields. * E2fsprogs programs now accept an offset to be passed to the file specifiers, via the syntax: "/tmp/test.img?offset=1024" * E2fsprogs will now accept blocksizes up to 65536; kernel support on the x86 doesn't exist, but it is useful on other architectures. * Fix bug in debugfs where kill_file would lead to errors when deleting devices and symlinks. (Sourceforge Bugs #954741 and #957244) * Fix bug in the blkid library when detecting the ocfs1 filesystem * Updated Italian translation file * E2fsck will now recover from a journal containing illegal blocks. -- Theodore Y. Ts'o Fri, 7 Jan 2005 20:22:36 -0500 e2fsprogs (1.35-9) unstable; urgency=low * Minor man page clarifications. (Closes: #273679) -- Theodore Y. Ts'o Tue, 28 Sep 2004 10:29:29 -0400 e2fsprogs (1.35-8) unstable; urgency=low * Remove double "//" when listing attributes in the root directory or when there is a trailing '/' in the directory name. (Closes: #272943) * Make sure the configure files are newer than configure.in the debian/rules file so that a dpkg-source created patch won't trigger an attempt rebuild of the configure script. (Closes: #272558, #273242) * Make sure /usr/lib/e2initrd_helper is in the e2fsprogs package. (Closes: #272698, #272728, #273161, #273163) * Only use blocksizes > 4k on Linux 2.6 and newer systems. (Closes: #271064) -- Theodore Y. Ts'o Sat, 25 Sep 2004 07:37:52 -0400 e2fsprogs (1.35-7) unstable; urgency=low * Make sure "done" gets correctly translated in badblocks(8), and update French translation (Closes: #252836) * Always build the fsck wrapper on Debian systems (Closes: #248050) * Filter out linux-gate.so, which is a pseudo entry for the 32->64bit translation for amd64 systems, in the initrd creation script. (Closes: #253595) * Change the initrd scripts to be use a helper program which avoids needing to mount the root filesystem and use awk to query the /etc/fstab file. (Closes: #247775) * Add support for the ocfs2 filesystem to the blkid library. * Various portability fixes for Hurd and FreeBsd, as well as removing XSI:isms. (Closes: #256669, #264630, #269044, #255589) * Update config.guess and config.sub from the FSF. * Minor manual page clarifications (Closes: #268148) * Fix write ordering problems to make e2fsck more robust in the face of system crashes while replaying the journal, etc. * Fix debugging printf in resize2fs. (Closes: #271605) * Add debugfs -d option to use a separate source of data blocks when reading from an e2image file. * Add e2image -I option which allows the e2image metadata to be installed into a filesystem. * Change e2fsck to accept directories greater than 32MB. * Add test_io mechanisms to abort after reading or writing to a particular block. * Fix blkid file descriptor and memory leak. -- Theodore Y. Ts'o Sat, 18 Sep 2004 09:58:46 -0400 e2fsprogs (1.35-6) unstable; urgency=low * In the mkinitrd script, make sure the directories exist before trying to copy in the needed shared libraries. (Closes: #244058, #246480) * In the mkinitrd script, use LD_ASSUME_KERNEL=2.4 if necessary. (Closes: #245931) * In the mkinitrd script copy in /usr/bin/awk instead of /usr/bin/mawk. (Closes: #245670) * In the initrd script, fail quietly if /mnt/etc/fstab does not exist. (Closes: #246917) * Minor updates to German translation (Closes: #244105) * Since woody's sysvinit package is before the initscripts were broken out we need an explict Conflict: sysvinit (<< 2.85-4) header. (Closes: #243829) * Update the UUID library man pages * Fix a Y8.8888K potential problem with the uuid library * Minor updates to the german translation * Clarified/corrected the copyright statements of the UUID and blkid libraries in the Debian copyright files. * Added sanity check to the blkid library so that if current time is less than last time a device is verified, force a reverification since it means the system time is not trustworthy. -- Theodore Y. Ts'o Tue, 4 May 2004 16:23:06 -0400 e2fsprogs (1.35-5) unstable; urgency=low * Add uuid_unparse_upper() and uuid_unparse_lower() functions to the uuid library. * Address GNU/KFreeBSD portability issues (Closes: #239934) * Use unsigned for 1 bit wide bitfields in header files to avoid Intel C++ compiler warnings. * Use C99 stdint.h types in the uuid library * Fix up and cleanup uuid man pages * Change the licensing of the uuid man pages to be 3-clause BSD. * Fix the initrd scripts so that the automatic ext3 journal conversion actually works correctly; also allow conversion of the root filesystem from ext3 back to ext2 (Closes: #241183) * Minor man page fixes (Closes: #241940, 242995) * Use the DEBUGFS_PAGER environment variable in preference to PAGER (Closes: #239547) * Added French translation * Be flexible about the name of the ACPI device that cooresponds to the AC adapter (Closes: #242136) -- Theodore Y. Ts'o Mon, 12 Apr 2004 12:38:34 -0400 e2fsprogs (1.35-4) unstable; urgency=low * Fix bug in the blkid library (introduced in 1.35-3) which caused the probe function to completely malfunction. (Closes: #239191) * Make the debugfs command's link command set the filetype information correctly. * Update the Polish, Swedish, and Turkish translations * Add an -o option to the blkid program which allows the user to control the output format of blkid. * Fixed and cleaned up the tune2fs and blkid man pages (Closes: #238741) * Improve UUID generation algorithm (use all 14 bits in the clock sequence) * Change the license on the UUID library to be 3-clause BSD. * Remove the only-partially-implemented -p option to blkid. -- Theodore Y. Ts'o Sun, 21 Mar 2004 20:17:03 -0500 e2fsprogs (1.35-3) unstable; urgency=low * Mention e2image's limitation in writing a normal image file to stdout (Closes: #236383) * Only use BLKGETSIZE64 on Linux 2.6 since it is unreliable on Linux 2.4. (Closes: #236528) -- Theodore Y. Ts'o Mon, 8 Mar 2004 14:19:15 -0500 e2fsprogs (1.35-2) unstable; urgency=low * Use 64-bit ioctl's if present to determine the 64-bit size of a device * Add tune2fs to the e2fsprogs udeb package (Closes: #235639) -- Theodore Y. Ts'o Tue, 2 Mar 2004 10:13:39 -0500 e2fsprogs (1.35-1) unstable; urgency=low * New upstream version. * Fix "badblocks -t random". (Closes: #234828) * Fix "e2fsck -k". (Closes: #234993) * Change badblock's default number of blocks tested at once from 16 to 64. (Closes: #232240) * ss-dev and comerr-dev now use a versioned dependency for libss2 and libcomerr2, respectively. (Closes: #235280) -- Theodore Y. Ts'o Sat, 28 Feb 2004 10:14:19 -0500 e2fsprogs (1.34+1.35-WIP-2004.01.31-2) unstable; urgency=low * Add a new -k option to e2fsck which keeps the existing badblocks list when using the -c option. (Closes: #229103) * Update debugfs to support new large major/minor device numbers supported by Linux 2.6. (Closes: #865289) * Fix makefiles so that it will build correctly with --enable-profile. * Add -mieee when compiling with GCC on an Alpha. * Fix e2fsck preen mode messages using pass 1B/C/D. * Fix the debugfs man page. (Closes: #232406) * Fix the ext2fs.h header file to work correctly with C++. * e2fsck and debugfs now correctly deals with symlinks that have extended attribute information, such as those created by SE Linux. (Closes: #232328) * Make sure filefrag actually gets compiled under Linux (Closes: #230992) -- Theodore Y. Ts'o Tue, 24 Feb 2004 00:16:43 -0500 e2fsprogs (1.34+1.35-WIP-2004.01.31-1) unstable; urgency=medium * Fix byte swap bugs in e2fsck that caused the journal backup location in the superblock and symlinks created by SE Linux to be cleared by e2fsck on big-endian machines. (Closes: #228723) * Chattr now stops processing options when it sees '--'. (Closes: #225188) * Add FreeBSD port fixups * Use the DEBUGFS_PAGER environment variable in preference to PAGER. Document that less is a really, really, really bad pager to use for debugfs (unfortunately, Debian policy says we must use /usr/bin/pager even if it results in very annoying behaviour for the user since 'less' is used in preference to 'more' unless it is globally overriden via update-alternatives(8). Oh, well. Debian users are encouraged to set DEBUGFS_PAGER to be "more" in their dot files to avoid this brain damage). * Fix libuuid1-udeb so that it provides libuuid1. (Closes: #229633) * Fix bug in uuid library when there is no network card and the library is generating a time-based uuid. The random MAC address was not correctly generated to be a multicast address. * Install the filefrag program. * Don't try to compile filefrag on non-Linux platforms. (Closes: #226456) * Minor manual page clarifications (Closes: #222606, #214920) -- Theodore Y. Ts'o Sat, 31 Jan 2004 20:57:35 -0500 e2fsprogs (1.34+1.35-WIP-2003.12.07-2) unstable; urgency=low * Fix test for /etc/mkinitrd/scripts/e2fsprogs to make sure it gets removed. (Closes: #213275) * Debugfs now searches for the appropriate pager to use, beginning with /usr/bin/pager, and then falling back to 'less' and 'more'. (Closes: #221977) * Fixed mangled encoding in Czech locale file. (Closes: #214633) * Fix bug where using debugfs to copy a file from /dev/null caused in correct mode bits. (Closes: #217456) * Fixed a bug where e2fsck would bomb out if a journal needed to be replayed when using an alternate superblock. * Minor manual page fixups/cleanups. * Debugfs's mkdir command will automatically expand the directory if necessary. (Closes: #217892) * Fix a bug in e2fsck which caused it to incorrectly fix a filesystem when reconnecting a directory requires creating a lost+found directory. (Closes: #219640) * Add Spanish translation. -- Theodore Y. Ts'o Wed, 24 Dec 2003 14:24:14 -0500 e2fsprogs (1.34+1.35-WIP-2003.12.07-1) unstable; urgency=medium * Added regression tests for mke2fs and dumpe2fs. * Support 2.6 kernel header files. (Closes: #221778) * Fix bug which could a core dump if a non-existent LABEL or UUID specifier is passed to e2fsck or tune2fs. * Fix handling of corrupted indirect blocks in the bad block inode. * If the number of mounts until the next forced filesystem check is less than 6, mention this to the user. (Closes: #157194) * E2fsck will try to avoid doing a forced filesystem chcek if a system is running on batteries according to APM or ACPI. (Closes: #205177) * Fix problems in the German translation. (Closes: #2000086) * Updated Swedish translation and added Polish translation. * Fix signed vs unsigned bug which could cause the com_right function to seg fault. (Closes: #213450) * Add libuuid1-udeb (Closes: #221777) -- Theodore Y. Ts'o Sat, 22 Nov 2003 11:51:13 -0500 e2fsprogs (1.34+1.35-WIP-2003.08.21-3) unstable; urgency=low * Adjust the man page descriptions so that "apropos ext2" or "apropos ext3" will find all of the e2fsprogs man pages. (Closes: #206845) * Protect against a potential core dump in e2fsck when printing a message about a backup superblock. * Fix a bug in mke2fs which caused -T largefile or -T largefile4 to core dump due to a division by zero error. (Closes: #207082) * Force e2fsprogs to use the matched version of e2fslibs. (Closes: #208103) -- Theodore Y. Ts'o Sun, 31 Aug 2003 21:49:52 -0400 e2fsprogs (1.34+1.35-WIP-2003.08.21-2) unstable; urgency=low * When moving the journal or backing up the journal inode information, make sure e2fsck updates all the superblocks, and not just the master superblock. * Change the priority of libblkid1-udeb to be required instead of standard, to match the override file. -- Theodore Y. Ts'o Thu, 21 Aug 2003 08:50:34 -0400 e2fsprogs (1.34+1.35-WIP-2003.08.21-1) unstable; urgency=low * Fix compile_et to output the correct prototype for initialize_xxx_err_table_r() in the header file. (Closes: #204332) * E2fsck will avoid printing ^A and ^B characters bracketing the progress bar when stdout is a tty device. (Closes: #204137) * Add support for storing the journal inode location in the superblock so that e2fsck can recover from a corrupted inode table after a power failure. * Move the initrd script from /etc/mkinitrd/scripts to /usr/share/initrd-tools/scripts so that mkinitrd will not remove the file when it is uninstalled. (Closes: #204019) * Remove unneeded files in debian directory: blkid-dev.substvars and e2fsprogs-bf.lintian-overrides. (Closes: #203914) * Support "noopt" in DEB_BUILD_OPTIONS instead of "debug". (Closes: #203914) -- Theodore Y. Ts'o Thu, 21 Aug 2003 01:47:58 -0400 e2fsprogs (1.34+1.35-WIP-2003.08.01-1) unstable; urgency=low * Fix O_DIRECT test to prevent badblocks from screwing up after finding a bad block. (Closes: #203713) * Add Heimdal compile_et extensions from Philipp Thomas (pthomas@suse.de) * Fix potential pointer aliasing bugs caused by type-punning and gcc 3.x -- Theodore Y. Ts'o Fri, 1 Aug 2003 13:44:58 -0400 e2fsprogs (1.34-2) unstable; urgency=low * Fix erroneous reference to /usr/share/doc/e2fsprogs/html-info in /usr/share/doc-base/libext2fs (Closes: #203157) * Explicitly specify the version of libblkid1 needed in e2fsprogs.shlibs.local in order to avoid picking up the wrong depedency. (Closes: #203157) * Changed priority of libblkid1-udeb to be standard, not required. -- Theodore Y. Ts'o Wed, 30 Jul 2003 19:47:32 -0400 e2fsprogs (1.34-1.1) unstable; urgency=low * Non-maintainer upload. * don't call ldconfig in udebs. * fix dependencies of e2fsprogs-udeb. -- Bastian Blank Tue, 29 Jul 2003 12:11:54 +0200 e2fsprogs (1.34-1) unstable; urgency=low * New upstream version. * Fixed bug in fsck which caused it to waste CPU by spinning while waiting for a child fsck process under some circumstances. * Fixed bug in blkid library which would cause it to spin forever if /proc is not mounted and /etc/blkid.tab is not present. * Improved the blkid library's UDF's probing functions. * Fixed the blkid library so it will remove delete the LABEL attribute from its cache when a filesystem that previously had a label no longer has one. * Added Swedish translation. * Remove debugging printf in badblocks program (Closes: #201499) * Split shared libraries out of the e2fsprogs package into separate packages: libss2, libcomerr2, libuuid1, and e2fslibs. (Closes: #201155, #201164) * Warn the user when creating a filesystem with a journal and a blocksize greater than 4096, since some kernels don't support ext3 with large block sizes. (Closes: #193773) -- Theodore Y. Ts'o Sat, 26 Jul 2003 01:01:55 -0400 e2fsprogs (1.33+1.34-WIP-2003.05.21-2) unstable; urgency=low * Set up FreeBSD configuration defaults (Closes: #195274) * Clarify resize2fs man page (Closes: #195616) * Fix resize2fs to deal with filesystem with bad blocks * Fix spelling error in e2fsck * Add workaround for intl library on Darwin * Fix gcc -Wall nitpicks * Round down the default size of the filesystem for mke2fs and resize2fs to be a multiple of the pagesize to work around a potential Linux kernel bug * Fix bug in mke2fs where it could die with a floating exception if the device does not support the BLKSSZGET ioctl (Closes: #196734) * Add conflicts against older versions of sysvinit that don't correctly handle an exit code that has the bit #2 set. (Closes: #183675) * Badblocks will attempt to use O_DIRECT if it is safe to do so. (Closes: #198006) * Use symbolic links for fsck.ext{2,3} and mkfs.ext{2,3} in the udeb package since busybox tar can't deal with hard links. (Closes: #196508) -- Theodore Y. Ts'o Sat, 12 Jul 2003 03:16:08 -0400 e2fsprogs (1.33+1.34-WIP-2003.05.21-1) unstable; urgency=low * Fix problems with compiling e2fsprogs with NLS support on woody (Closes: #193372) * Remove the extraneous de-utf.po file. * Add get-text to build-depends. * Use ngettext (abbreviated with P_()) to simplify the statistics reporting. * Fix badblocks to be able to support arbitrary 4 byte test patterns. * Fix bug which caused us to accidentally include the EVMS plugin in the e2fsprogs package (which doesn't work, but causes confusing messages to show up when the evms client is started). * If the hardware sector size of a device is larger than the default blocksize, use the hardware sector size as the blocksize when creating a filesystem, to solve problems with s/390 DASD's. * Add a shared library dependency to libuuid to libblkid (Closes: #194094) * Add initial implementation of a dump_unused command (Closes: #79164) -- Theodore Y. Ts'o Sun, 18 May 2003 01:24:16 -0400 e2fsprogs (1.33-5) unstable; urgency=low * Clarify blocksize units when displaying messages in resize2fs, and support using suffixes (sectors, kilobytes, megabites, gigabytes) to the size parameter to indicate units. (Closes: #189814) * Fix debugfs core-dumping problem caused by getopt. (Works around: #192834) * Add package dependency to shlibs for comerr to indicate support for kth compatibility. (Closes: #193096) -- Theodore Y. Ts'o Tue, 13 May 2003 23:45:08 -0400 e2fsprogs (1.33-4) unstable; urgency=low * Add replaces field to comerr-dev to resolve a file conflict with /usr/include/com_err.h and the libkrb5-dev package. (Closes: #192277) * Add -t option to badblocks to control the test pattern used. * Remove e2fsprogs-bf package, as it is obsolete. (Closes: #183453) * Remove NLS support from e2fsprogs-udeb. Save 5.5k on the boot floppies / install media. -- Theodore Y. Ts'o Thu, 8 May 2003 10:25:05 -0400 e2fsprogs (1.33-3) unstable; urgency=low * Add full Heimdall/Kerberos4-kth compatibility to com_err routines. * Declare comerr-dev as replacing << e2fslibs-dev 1.33-2, to avoid errors when upgrading to the new versions of comerr-dev and e2fslibs-dev -- Theodore Y. Ts'o Tue, 6 May 2003 00:29:47 -0400 e2fsprogs (1.33-2) unstable; urgency=low * Fix up NLS support - Fix message abbreviations support (i.e., @g --> group) - Update to gettext 0.11.5 - Add Czech translation - Install message catalogs - Other miscellaneous NLS bug fixes * Add new debugfs command, imap, which prints the location of a specified inode in the inode table. * Put /usr/include/com_err.h in comerr-dev instead of e2fslibs-dev. (Closes: #191899) * Add support for OV-style continuations in compile_et. (Closes: #191900) -- Theodore Y. Ts'o Mon, 5 May 2003 18:13:12 -0400 e2fsprogs (1.33-1) unstable; urgency=low * New upstream version (Closes: #189687) -- Theodore Y. Ts'o Mon, 21 Apr 2003 13:49:52 -0400 e2fsprogs (1.32+1.33-WIP-2003.04.14-1) unstable; urgency=low * New upstream version - Add new utility program, logsave, to capture the output of fsck during the boot sequence * Add support for the -a and -s options to logsave. * Change e2fsck to bracket its progress bar output with ctrl-A and ctrl-B characters, so that logsave -s can omit writing the progress bar output to the log file. * Avoid printing the version banner for mke2fs if the -q option is specified. (Closes: #172716) -- Theodore Y. Ts'o Wed, 16 Apr 2003 15:27:20 -0400 e2fsprogs (1.32+1.33-WIP-2003.03.30-3) unstable; urgency=low * Provide /usr/include/com_err.h, which was previously provided by the libkrb5-dev package * Change the sectoin of com_err-dev, ss-dev, uuid-dev, libblkid-dev, e2fslibs-dev to libdevel * Add libblkid1-udeb package for the Debian Installer. * Use the SS_READLINE_PATH environment variable to control the search for a suitable readine library. * Fix bug in mke2fs, which was was incorrectly checking the argument to the -g option if the default block size is used. (Closes: #188319) * Update man pages. (Closes: #188318) * Mke2fs can be given a minimum block size by passing in a negative number to the -b option. * Update to standards 3.5.9 -- Theodore Y. Ts'o Sat, 12 Apr 2003 02:52:17 -0400 e2fsprogs (1.32+1.33-WIP-2003.03.30-2) unstable; urgency=low * Fix XFS superblock definition. Add support to extract UUID and labels for JFS and ROMFS. * Make the random number generator more paranoid about potentially buggy /dev/random devices. * The badblocks program now flushes its output as it discovers bad blocks. * Imported bug fixes to EVMS driver from the EVMS 2.0 tree. Fixed a few potential hangs, and eliminated a file descriptor leak. * E2fsck now updates the global free block and inode counters from the block group specific counters quietly. This is needed for an experimental kernel patch which improves SMP scalability by not locking the entire filesystem during block or inode allocation; if the filesystem is not unmoutned cleanly, the global counts may not be accurate. * Fix a bug in fsck which can cause it to hang trying to access the floppy disk if there the floppy drive has filesystem type of 'auto'. (Closes: #187812) -- Theodore Y. Ts'o Sun, 6 Apr 2003 23:13:50 -0400 e2fsprogs (1.32+1.33-WIP-2003.03.30-1) unstable; urgency=low * Change compile_et to generate header files that use instead of , so the current version of the header file is used. Remove legacy K&R, varargs, and pre-POSIX signal support. * Fix (one more time!) Apple Darwin port in blkid/getsize.c -- Theodore Y. Ts'o Sun, 30 Mar 2003 23:34:55 -0500 e2fsprogs (1.32+1.33-WIP-2003.03.25-1) unstable; urgency=low * New maintainer * New upstream release (Closes: #176814, #174766, #166048, #179671, #173612, #175233, #175113, #170497, #185945) -- Theodore Y. Ts'o Sun, 16 Mar 2003 18:05:08 -0500 e2fsprogs (1.32-2) unstable; urgency=high * Applied upstream patch to fix htree problems, and to deactivate it by default in mke2fs (Closes: #181615, #179043) * Be sure removal of libe2fsim doesn't fail, as it's not built on hurd (Closes: #164117). -- Yann Dirson Fri, 21 Feb 2003 00:21:44 +0100 e2fsprogs (1.32-1) unstable; urgency=low * New upstream release (Closes: #167108). -- Yann Dirson Tue, 19 Nov 2002 00:18:09 +0100 e2fsprogs (1.29+1.30-WIP-0930-2) unstable; urgency=low * Made mkinitrd script to skip commented-out lines (Closes: #163251). -- Yann Dirson Tue, 15 Oct 2002 00:16:08 +0200 e2fsprogs (1.29+1.30-WIP-0930-1) unstable; urgency=low * New upstream prerelease. * Replaced in mkinitrd script "tune2fs -j" with "tune2fs -O has_journal", as suggested by Theodore Ts'o (Closes: #162949). * Remove --disable-debugfs from mips-nopic flags (Closes: #162674). -- Yann Dirson Thu, 3 Oct 2002 00:05:36 +0200 e2fsprogs (1.29-1) unstable; urgency=low * New upstream release (Closes: #159423). * Fixed typo in chattr manpage (Philipp Matthias Hahn, Closes: #162297). * Generate udeb package for debian-installer (Martin Sjoegren, Closes: #162212). * Fixed installation of mkinitrd script (don't use dh_install). Remove it from the wrong location where it was, in preinst. Hopefully noone noticed. * Also have old scripts/e2fsprogs.mkinitrd removed. * Bumped Standards-Version to 3.5.6, no change. 3.5.7 will need a bit of work but not tonight. -- Yann Dirson Thu, 26 Sep 2002 01:46:25 +0200 e2fsprogs (1.28-5) unstable; urgency=low * The "this time it will work ! (famous last words)" release. * Now that it builds, ensure the dir in which we install this damn mips non-pic lib exists. -- Yann Dirson Tue, 17 Sep 2002 00:04:49 +0200 e2fsprogs (1.28-4) unstable; urgency=low * Moved setting of CFLAGS to the correct place when building the special mips non-pic lib (Closes: #159757 again). -- Yann Dirson Sun, 15 Sep 2002 21:19:19 +0200 e2fsprogs (1.28-3) unstable; urgency=low * Don't use special cflags at configure time when building the special mips non-pic lib, in yet another attempt to fix my adaptation of the patch from the mips team. Also added --disable-nls which was present in the original patch. * Remove debian/BUILD-MIPS on clean. * Install mkinitrd script as scripts/e2fsprogs, not as scripts/e2fsprogs.mkinitrd. -- Yann Dirson Mon, 9 Sep 2002 23:01:31 +0200 e2fsprogs (1.28-2) unstable; urgency=low * Fixed my adapation of the mips non-pic build (Closes: #159757). -- Yann Dirson Fri, 6 Sep 2002 00:03:45 +0200 e2fsprogs (1.28-1) unstable; urgency=low * New upstream release. -- Yann Dirson Mon, 2 Sep 2002 23:34:55 +0200 e2fsprogs (1.27+1.28-WIP-0817-1) unstable; urgency=low * New upstream pre-release. Closes: #138003, #144621, #145044, #151990, #152029, #152891, #155007, #131350, #147256, #153102. * New binary: findfs. * Added execute permissions to the mkinitrd script (thanks lintian). * Don't ship FSIM for EVMS for now. -- Yann Dirson Sun, 25 Aug 2002 19:32:12 +0200 e2fsprogs (1.27+1.28-WIP-0626-2) experimental; urgency=low * Remove bogus shlibs deps on "e2fsprogs (>= )" -- Theodore Y. Ts'o Sat, 17 Aug 2002 17:59:17 -0400 e2fsprogs (1.27+1.28-WIP-0626-1) experimental; urgency=low * New upstream pre-release: ** Supports v2 ACL format (Closes: #138160). * Removed explicit --mandir flag, as it now uses FHS man location by default. * Added mkinitrd script, "upstream-contributed" ;) by Ted Ts'o (Closes: #148064). * Build a no-pic version of libext2fs.a on mips and mipsel, patch by Florian Lohoff, adapted for style consistency (Closes: #145432). * Removed presumably-useless and presumably-broken CFLAGS propagation. If someone misses that, I'll add ${CFLAGS} to --ccopts. * Switched to debhelper v4. * Added ${misc:Depends} to all packages' Depends field. * Fixed typos in fsck.8, added an example for clarity (Closes: #145044). * Fixed typo in chattr manpage (Closes: #141938). * Fixed typo in tune2fs manpage (Closes: #148514). -- Yann Dirson Tue, 23 Jul 2002 00:12:33 +0200 e2fsprogs (1.27-2) unstable; urgency=medium * Urgency medium since this fixes a RC bug. * Generate the shlibs file instead of just copying it in place, and make it produce deps on "e2fsprogs (>= )" as well, to cope with new functions introduced in the libs (Closes: #139274). * Added a note on this in README.Debian. -- Yann Dirson Thu, 21 Mar 2002 23:58:48 +0100 e2fsprogs (1.27-1) unstable; urgency=low * New upstream release (Closes: #136737). * No more use for dh_link'ing *.ext[23], it's now done by upstream Makefiles. * Only include (new) inode_io.o from libext2fs when fileio.o is, or the BF build fails because of this additional (unused) member (upstream hint). -- Yann Dirson Mon, 11 Mar 2002 00:17:32 +0100 e2fsprogs (1.26-3) unstable; urgency=low * Simple rebuild after fixing the settings of my computer's clock, so that katie accepts to install the package. -- Yann Dirson Sat, 23 Feb 2002 14:53:15 +0100 e2fsprogs (1.26-2) unstable; urgency=low * Applied upstream patch dealing with the rlimit filesize variation among archs and kernel versions (Closes: #133909). * Create fsck.ext3.8 symlink (Closes: #121526). -- Yann Dirson Sat, 23 Feb 2002 06:44:02 +0100 e2fsprogs (1.26-1) unstable; urgency=low * This uploads fixes 10 bugs, including data-corruption problems, and adds much to the ease of maintainance and problem tracking. Good choice for woody. * New upstream release (Closes: #106622, #116975, #118443, #119624, #120171, #120077, #129828, #132764). ** Fixes for data-corruption bugs not reported to the BTS: e2fsck trashed external journals needing to be replayed, e2fsck now hides visible journal files (data corruption problems when not excluded from a backup and then restored) (Closes: #132654). ** Other noticable bugs fixed include: e2fsck null pointer dereferencing, fsck did not finds LVM volumes by UUID or by label, largefile support (ie. dealing with filesystems inside 2GB+ files) was broken in several programs. * Switch to debhelper v3 to get ldconfig automatically handled (lintian reported that it was broken). Now call dh_makeshlibs, but still override its generated shlibs file with ours, to get compiled packages depend of the correct virtual packages, which include full sonames. * Removed call do dh_installman (Closes: #115526). * Cleaned up maintainer scripts with dead code - most things are now more properly handled by debhelper. Removed an "exit 0" lurking in preinst - can't find a reason for it in the changelog, it was probably here for ages. * Remove obsolete maint-scripts in binary-arch, as they are provided by upstream. * Also remove upstream-shipped config.cache before configuring. That shouldn't impact us, but well, that makes lintian happy :) -- Yann Dirson Fri, 8 Feb 2002 06:12:35 +0100 e2fsprogs (1.25-1) unstable; urgency=high * New upstream bugfix release (Closes: #112414), targeted to woody. * com_err.info provided again now that it was fixed upstream. * Added metainfo to com_err.texinfo so that it gets indexed correctly (thanks lintian). Moved @setfilename and @settitle to the top so that things get output as expected. * Added lintian overrides for -bf and -static packages. * Put all stamp files in debian/stampdir. -- Yann Dirson Sat, 22 Sep 2001 16:22:47 +0200 e2fsprogs (1.24a-1) unstable; urgency=high * New upstream release (Closes: #109577). ** The only new code in there is in codepaths that are only visited when previously unsupported features are used, so they add virtually no risk. Support for raw image files will be of great help to debug users' problems. Urgency set to "high" to make sure this version gets released with woody. ** Fsck prints a warning message if now valid filesystems are passed to it. (Closes: #107458). ** Fsck -A will not try to interpret device names for filesystems which have a pass number is 0. (Closes: #106696). ** If -O none is passed to mke2fs, it will now not set the sparse_super feature (Closes: #108165). ** Tune2fs has been fixed to make sure that only error messages go to stderr, and normal message go to stdout (Closes: #108555). ** Minor man pages updates (Closes: #30833, #108174). ** Doc fixes (Closes: #110621). -- Yann Dirson Tue, 4 Sep 2001 23:44:56 +0200 e2fsprogs (1.22-2) unstable; urgency=medium * This is only a trivial patch to stop some user confusion, and would be great to have in woody, hence the urgency. * Applied upstream patch to e2fsck to warn user when some errors were not corrected due to user answering "no" (Closes: #104502). -- Yann Dirson Sat, 28 Jul 2001 23:01:49 +0200 e2fsprogs (1.22-1) unstable; urgency=low * Final 1.22 release: ** Fixes build problems on big-endian (Closes: #101686, #101798). -- Yann Dirson Sat, 23 Jun 2001 14:03:17 +0200 e2fsprogs (1.21+1.22-WIP-0620-1) unstable; urgency=low * New upstream pre-release, critical for big-endian platforms (Closes: #101752). * Re-applied hurd fix again. * Build e2fsprogs-bf with -Os to gain more space. -- Yann Dirson Fri, 22 Jun 2001 00:18:40 +0200 e2fsprogs (1.21-1) unstable; urgency=low * Final 1.21 release. * Re-applied hurd fix that did not came quickly enough to make it in 1.21. * Fixed name of copyright file in e2fsprogs-bf. -- Yann Dirson Wed, 20 Jun 2001 22:32:08 +0200 e2fsprogs (1.20+1.21-WIP-0614-2) unstable; urgency=low * Don't build PIC libs, build a reduced version of the libs instead, in package e2fsprogs-bf. Made this new package conflict with e2fsprogs. * Compilation fix for the Hurd (Closes: #101361). -- Yann Dirson Tue, 19 Jun 2001 23:33:25 +0200 e2fsprogs (1.20+1.21-WIP-0614-1) unstable; urgency=low * New upstream pre-release (Closes: #100559, #100304). * Fixed lib/ext2fs/Makefile.in for installation of new generated .h file. -- Yann Dirson Thu, 14 Jun 2001 16:14:11 +0200 e2fsprogs (1.20+1.21-WIP-0608-1) unstable; urgency=low * New upstream pre-release (critical ext3 bugfix mostly). * Correctly use dh_installinfo. * Adjusted various things accordingly. -- Yann Dirson Sat, 9 Jun 2001 00:25:51 +0200 e2fsprogs (1.20-4) unstable; urgency=low * Cleanup generated substvars files now that debhelper uses other names (may cause problems on other archs). Build-dep on debhelper 3.0.30 or newer to be sure it won't cause broken uploads. Allows to get rid of hairy dep, but cannot build straightforwardly on potato any more... -- Yann Dirson Wed, 6 Jun 2001 02:33:32 +0200 e2fsprogs (1.20-3) unstable; urgency=low * Create all symlinks to uuid-generate.3 (Closes: #99573). * Somewhat modernized debian/rules (debhelper v2, etc.). * Fixed libss2 copyright file. * Fixed e2fslibs-pic short description. -- Yann Dirson Wed, 6 Jun 2001 01:19:19 +0200 e2fsprogs (1.20-2) unstable; urgency=low * Added support for building pic libs to Makefile.elf-lib. * New package e2fslibs-pic for boot-floppies team (Closes: #99285). * Use -N on dh_gencontrol instead of lots of -p. -- Yann Dirson Thu, 31 May 2001 23:59:51 +0200 e2fsprogs (1.20-1) unstable; urgency=low * Final 1.20 release. * Added new zsh-static to the list of possible static shells recommended by e2fsck-static. -- Yann Dirson Mon, 28 May 2001 21:39:06 +0200 e2fsprogs (1.19+1.20-WIP-0520-1) unstable; urgency=low * New upstream pre-release snapshot: ** Extended "fsck -t" syntax (Closes: #89483). ** Fix handling of devices for which fsck can't determine a physical spindal, causing lockup when checking LVM volumes (Closes: #98103). ** Fixed typo in e2fsck-static description - thanks Ted :). * Fixed small compilation bug in fsck.c -- Yann Dirson Mon, 21 May 2001 20:47:10 +0200 e2fsprogs (1.19+1.20-WIP-0514-2) unstable; urgency=low * Tighten dependency on debhelper. -- Yann Dirson Tue, 15 May 2001 21:38:47 +0200 e2fsprogs (1.19+1.20-WIP-0514-1) unstable; urgency=low * New upstream pre-release snapshot: ** new program: e2image. ** e2fsck validates file descriptor specified in -C (Closes: #55220) ** Fix multiple progress bar fsck bug (Closes: #65267) ** Add devfs support to fsck (Closes: #94159) ** Fix debugfs dump cmd looping on disk errors (Closes: #79163) ** Miscellaneous manual page clarifications (Closes: #63442, #67446, #87216) ** Compilation fixes for Hurd (Closes: #52045). ** New config.{guess,sub} for parisc support (Closes: #94690). ** Improved ext3 support ** tune2fs can now safely modify mounted filesystems * Added missing @dircategory entry to libext2fs.info (lintian) * Moved debugfs back from /usr/sbin/ to /sbin/ (Closes: #97035). * Moved e2label back to /sbin/ as well, as it is now a hard link to tune2fs. * New binary package with statically linked e2fsck, recommending a statically linked shell (Closes: #62611). * All deps against e2fsprogs itself now versionned (lintian). * Updated copyright file (upstream location, packaging copyright notice for previous maintainers and for Alcove). * Remove call to dh_testversion, use versionned build-dep instead (lintian). * Support for DEB_BUILD_OPTIONS debug/nostrip for policy 3.2 compliance. * Use dh_shlibdeps -l instead of setting LD_LIBRARY_PATH explicitely - necessary for new versions of fakeroot, and requires debhelper 3.0.23 for a fix. Well finally 3.0.23 is buggy, leave this for later. * Avoid to call ldconfig at "make install" time, too costly. * Get rid in control files of references to never-released standalone lib files (split attempted in 1997/98). * Bumped Standards-Version to 3.5.4. -- Yann Dirson Tue, 15 May 2001 14:28:39 +0200 e2fsprogs (1.19-4) unstable; urgency=medium * Added texinfo to build-deps (Closes: #87685). -- Yann Dirson Tue, 3 Apr 2001 09:03:13 +0200 e2fsprogs (1.19-3) unstable; urgency=low * Drop findsuper binary, and suggest gpart (Closes: #74034). * Drop flushb and extend at upstream request (Closes: #39506). * Applied upstream fix for chattr on large files (Closes: #72690). * Applied clarification patch to tune2fs.8 (Closes: #67446). * Applied typo patch to compile_et.1 (Closes: #63786). * Include in e2fsck/journal.c (Closes: #71775). * Suggest parted. -- Yann Dirson Mon, 4 Dec 2000 22:08:06 +0100 e2fsprogs (1.19-2) unstable; urgency=low * Clarified libuuid copyright to LGPL-2, excluding LGPL-2.1. * Added build-dependency on debhelper (Closes: #67532). * Don't paralelize fsck runs on same drive for hd[efgh] (Closes: #59103). * Upload pristine source, -1 was erroneously uploaded as a debian-specific package. -- Yann Dirson Thu, 3 Aug 2000 00:30:49 +0200 e2fsprogs (1.19-1) unstable; urgency=low * New upstream release: ** new program: resize2fs. ** ext3 support. ** NLS support (non-default, activated). ** Compression support (non-default, activated). ** Progress bar nice to serial console (Closes: #66079) ** Ensure filetype feature is turned off for Hurd filesystems (Closes: #61863) * Updated main copyright file for a number of things. * Fixed NLS support for flushb and extend. * Started to add build-depends. * Include new e2p header. -- Yann Dirson Wed, 19 Jul 2000 01:55:27 +0200 e2fsprogs (1.18-3) frozen unstable; urgency=medium * Fix Y2K display-only bug in debugfs - "ls -l" displayed raw tm_year, causing 2000 to be displayed as "100" (Closes: #57135). Potato should be y2k-clean. * Remove empty dirs /usr/share/et/ and /usr/share/ss/ from package e2fsprogs (Closes: #52900). -- Yann Dirson Mon, 21 Feb 2000 23:06:47 +0100 e2fsprogs (1.18-2) unstable; urgency=low * Test for "__sparc__" instead of "sparc" as a cpp macro in mke2fs.c (tests in other places are correct) (Closes: #50012). -- Yann Dirson Fri, 12 Nov 1999 21:40:27 +0100 e2fsprogs (1.18-1) unstable; urgency=low * New upstream (bugfix) release. -- Yann Dirson Fri, 12 Nov 1999 17:27:20 +0100 e2fsprogs (1.17-2) unstable; urgency=low * Applied upstream patch to fix segfault (Closes: #49535). -- Yann Dirson Tue, 9 Nov 1999 22:14:53 +0100 e2fsprogs (1.17-1) unstable; urgency=low * New upstream (bugfix) release. -- Yann Dirson Wed, 27 Oct 1999 23:46:39 +0200 e2fsprogs (1.16-2) unstable; urgency=low * Fixed build of a link list in fsck.c (Closes: #48312). -- Yann Dirson Tue, 26 Oct 1999 01:17:36 +0200 e2fsprogs (1.16-1) unstable; urgency=low * New upstream release. * Re-applied Hurd patches that did not seem to have been received upstream. -- Yann Dirson Sun, 24 Oct 1999 16:11:59 +0200 e2fsprogs (1.15-3) unstable; urgency=low * Fixed minor typo for the Hurd. * Fixed various Hurd defines to __GNU__ (Closes: #44407). * Switched doc/ and info/ to FHS. * Cleaned up debian/rules to use new debhelper features. * Bounced Standards-Version to 3.0.1. * Do not install buggy com_err.info, shipped as HTML. * Removed partinfo from the package, following the wish of upstream author, because of duplicate functionality with "fdisk -l" (Closes: #42139). -- Yann Dirson Mon, 20 Sep 1999 23:04:06 +0200 e2fsprogs (1.15-2) unstable; urgency=medium * Changed build directory do debian/BUILD/ - related cleanups in debian/rules. * Fixed partinfo.c to have it compiled, and fixed display of partition device in error messages. * Added /usr/sbin/partinfo to the package (Closes: #42139). * Added note about uuidgen(1) in README.Debian. * Documented in manpage that default mke2fs behaviour is now -r1 -s1 (Closes: #44478). * Documented in mke2fs.8 that -r1 forces -s1, thus ignoring -s0. * Added warning message when -s0 is ignored because of -r1. * Documented -n option of mke2fs. * Fixed display buglet causing trailing commas in list of superblock backups when sparse flag is on and last group has no superblock backup. * Closes: #42434, #43134. -- Yann Dirson Wed, 8 Sep 1999 00:46:38 +0200 e2fsprogs (1.15-1) unstable; urgency=low * New upstream release (Closes: Bug#41763). * All changes to upstream files in 1.14-3 were integrated upstream. * Separated libuuid-dev from e2fslibs-dev because it now has manpages. * Fixed debian/rules for POSIX "rmdir -p" * Corrected the location of the GPL in copyright file. * Moved the manpages to /usr/share/. * Bumped Standards-Version to 3.0.0. -- Yann Dirson Fri, 23 Jul 1999 01:37:51 +0200 e2fsprogs (1.14-3) unstable; urgency=low * Fail with error message when /dev/null cannot be opened (Fixes: Bug#35595). * Fixed typo in e2fsck/unix.c (Fixes: Bug#36960). * Added "emeregency help" options summary to e2fsck (Fixes: Bug#11372). * Prepared debian/rules for usr/share/man/. -- Yann Dirson Tue, 1 Jun 1999 23:37:12 +0200 e2fsprogs (1.14-2) unstable; urgency=low * Fixed fsck(1) not to coredump when it does not find its argument in /etc/fstab (Fixes: Bug#33533, Bug#34320, part of Bug#34131). * Fixed spelling of upstream author's name. * Cleaned debian/*.files up. * Undid the changes. * Changed "rmdir -p" invocations in debian/rules into "-rmdir -p" to turn around changed behaviour in fileutils_4.0. -- Yann Dirson Fri, 12 Mar 1999 23:50:47 +0100 e2fsprogs (1.14-1) unstable; urgency=low * New upstream release (Fixes: Bug#33113). * All patches we used for 1.12 are obsoleted by 1.14. * Still have to install com_err.info from debian/rules though. * Incorporated patches from Gordon Matzigkeit for hurd cross-compilation: * - configure.in: Change cross-compile default for sizeof (long long) to 8, so that __s64 and __u64 get defined in ext2fs.h. (BUILD_CC): Discover a native compiler if we are cross-compling (used for util/subst). - Include linux/types.h instead of asm/types.h, so that non-Linux platforms use the stubbed version provided with this package. - misc/Makefile.in (findsuper): Add a rule so that findsuper gets built with the right compiler flags. - etc. -- Yann Dirson Wed, 10 Feb 1999 23:23:03 +0100 e2fsprogs (1.12-4) frozen unstable; urgency=low * Ship flushb(8) and extend(8) were missing in all 1.12 packages (Fixes: Bug#28771). * Add extend.8 link to undocumented.7. * Replaced my (ad-hoc) fix for Bug#25684 with (really better) one from upstream. -- Yann Dirson Mon, 2 Nov 1998 20:53:28 +0100 e2fsprogs (1.12-3) frozen unstable; urgency=low * Fixed to use angle brackets instead of double quotes when including files from /usr/include/. * Made e2fslibs-dev depend on comerr-dev (Fixes: Bug#26282, Bug#27497). * Fixed mke2fs' display with inode numbers > 9999 (Fixes: Bug#25684). * Use -D__NO_STRING_INLINES on powerpc to allow building the boot blocks in QUIK, the powermac boot loader - reported by Matt McLean. * Removed unsupported info and texi entries from docbase files. -- Yann Dirson Mon, 19 Oct 1998 23:32:41 +0200 e2fsprogs (1.12-2.1) unstable; urgency=low * Non-maintainer upload config.guess and config.sub files modified, to recognize a Arm architecture. -- Turbo Fredriksson Thu, 13 Aug 1998 19:15:56 -0400 e2fsprogs (1.12-2) unstable; urgency=low * Really install e2label.8 manpage. * Removed path from ldconfig invocation, obeying packaging manual. * Improved the subst.c patch (thanks to Peter Moulder). -- Yann Dirson Thu, 14 Jul 1998 14:10:06 +0200 e2fsprogs (1.12-1) unstable; urgency=low * New upstream release - at last out of alpha status ! * Removed some obsolete files from debian/attic. * Patched util/subst.c to expand env variables, and MCONFIG.in to have ${prefix} exported to the `subst' process, so that we get correct paths in mk_cmds and compile_et. Forwarded upstream. * Debian-specific /usr/share/comerr/ renamed to /usr/share/et/, now installed upstream. * Removed -isp from dh_gencontrol invocation - now the default. * Passed lintian 0.5.0. -- Yann Dirson Fri, 10 Jul 1998 22:49:18 +0200 e2fsprogs (1.10-17) frozen unstable; urgency=low * Commented out obsolete code in fsck.c that assumed fstab entries declared `noauto' should not be checked - successfully forwarded upstream (Fixes: Bug#17244). -- Yann Dirson Fri, 15 May 1998 01:14:54 +0200 e2fsprogs (1.10-16) frozen unstable; urgency=low * Changed to in lib/uuid/uuidP.h to allow compilation with glibc 2.0.7pre1 (Fixes: Bug#22039). * Use "build-stamp" as a stamp file instead of "build". * Restored "Provides: e2fslibsg" in order to allow upgrade from unstable hamm. Documented in README.Debian so that it does not get removed again (Fixes: Bug#22019). -- Yann Dirson Mon, 4 May 1998 21:11:38 +0200 e2fsprogs (1.10-15) frozen unstable; urgency=low * Added call to ldconfig in e2fsprogs.postinst. * Fixes checks for install-docs in postinst/prerm (Fixes: Bug#20303, Bug#20304, Bug#20590). * Removed e2fslibsg from what e2fsprogs provides (was just forgotten). * Passed lintian 0.4.2. -- Yann Dirson Sun, 26 Apr 1998 22:27:11 +0200 e2fsprogs (1.10-14) frozen unstable; urgency=low * Fixed checks for install-docs to use -x. * Applied patch for sparc from Juan to fsck.c to compile with glibc 2.1 (Fixes: Bug#20841). -- Yann Dirson Tue, 14 Apr 1998 17:12:19 +0200 e2fsprogs (1.10-13) frozen unstable; urgency=low * test for /usr/sbin/install-docs before trying to run it in postinst and prerm (Fixes: Bug#19461, Bug#19469, Bug#19949, Bug#20006). * comerrg-dev now suggests doc-base. * moved binary packages ss2g, comerr2g and e2fslibsg back into binary package e2fsprogs. * use new virtual packages libcomerr2, libss2, libext2fs2, libe2p2, libuuid1 in shlibs and dependencies. * Changed e2fsprogs dependency on libs to a Pre-Depends (Fixes: Bug#18221). * Not conflicting with old ss2g and comerr2g - these will have to be removed by hand. * Turned around dpkg's bug #17624 in e2fsprogs.preinst. * Updated README.Debian to explain the new package architecture. * Passed lintian 0.3.4. -- Yann Dirson Fri, 20 Mar 1998 13:03:11 +0100 e2fsprogs (1.10-12) unstable; urgency=low * Corrected doc menu entries to point to the real documents' places. * Fixed mk_cmds to really find its support scripts (Fixes: Bug#18779). * Made mk_cmds and compile_et use "sh -e". * Have missing file /usr/include/ss/ss_err.h installed (Fixes: Bug#18778). * Corrected typo in Description (Fixes: Bug#18890). * Fixed descriptions for ss* packages, thanks to Greg Stark (Fixes: Bug#18373, Bug#18447). * Added description of e2p and uuid libs in e2fslibsg-dev description. * Included texinfo sources. * Added doc-base support - suppressed direct menu/dwww support. * Complies with standards version 2.4.0.0. * Passed lintian 0.3.0: * removed .du control file. * updated FSF address. * fixed in *.files nasty ldconfig-symlink-before-shlib-in-deb's. * turned relative links from /usr/lib into /lib into absolute ones. -- Yann Dirson Sun, 8 Mar 1998 19:42:58 +0100 e2fsprogs (1.10-11) unstable; urgency=low * Switched to debhelper (Fixes:Bug#16307). * Updated standards to 2.3.0.1 * Changed maintainer's mail address. * Added conflicts with old versions of dump and quota. * Added html-converted texi docs for libs, with menu(dwww) support. * Added findsuper.8 link to undocumented. * Changed version number of lib packages to reflect the lib versions. * Moved libss into its own packages; added mk_cmds script and support files for libss development (Fixes:Bug#17233). * Added README.Debian file documenting all those dependency stuff. * Included example error tables from libext2fs and libss in comerr-dev. * Included example command tables from debugfs in ss-dev. * Added section/priority files in packages (-isp). * Changed names/relations for doc dirs to comply with policy. * Removed call to ldconfig from e2fsprogs.postinst. -- Yann Dirson Thu, 29 Jan 1998 18:10:03 +0100 e2fsprogs (1.10-10) unstable; urgency=low * Added patch from Michael Alan Dorman for compilation on alpha-Linux (Closes:Bug#15596). * Added '-fsigned-char' to COPTS to allow compilation on ppc-Linux (Closes:Bug#15976). * Suppressed Essential flag on libs, as well as useless Replaces (Closes: Bug#16480). * Suppressed reference to obsolete package `e2fsprogsg' in control info, but Conflicts for security (Closes:Bug#16791). -- Yann Dirson Wed, 7 Jan 1998 22:35:08 +0100 e2fsprogs (1.10-9) unstable; urgency=low * Fixed comerr2g.shlibs to reflect package-name change. * Fixed problem with ss include files being removed from /usr on make install (indeed fixed in 1.10-8). * Added changelog file to comerr2g package (indeed fixed in 1.10-8). * Corrected link from flushb.8 to undocumented (Closes:Bug#15335,Bug#15660,Bug#15675). * Added /sbin/findsuper (Closes:Bug#15224). * Fixed /usr/bin/compile_et script (Closes:Bug#15487). * Included awk scripts in /usr/share/comerr, for use by compile_et. * Changed back the name from "e2fsprogsg" to "e2fsprogs" to get better dependencies. * Strip libraries (Closes:Bug#15667). -- Yann Dirson Tue, 9 Dec 1997 22:52:42 +0100 e2fsprogs (1.10-8) unstable; urgency=low * Added latest patch from Ted for autodetection of llseek() proto. * Switched to libc6, without libc5 compatibility (yet ?). * Turned Pre-Depends into Depends to allow installation. Dirty though. But what were Pre-Depends for anyway ? -- Yann Dirson Sun, 23 Nov 1997 23:03:02 +0100 e2fsprogs (1.10-7) unstable; urgency=HIGH * Turned "#if (__GLIBC__ == 2)" into "#if 1" to turn around missing llseek() prototype in libc_5.4.33-5 as well as libc6. -- Yann Dirson Tue, 21 Oct 1997 12:53:27 +0200 e2fsprogs (1.10-6) unstable; urgency=low * Official libc6 patches from Ted. * Converted to debstd - let it do the stripping stuff. * Separated libcomerr into a standalone lib - includes full doc and tools. * Separated development files into e2fslibs-dev, which Provides the 4 other -dev packages. * Now Provides the 4 other lib packages, to make it possible not to depend upon e2fsprogs itself. These libs WILL be taken out of "progs" in the next release. -- Yann Dirson Wed, 24 Sep 1997 10:46:00 +0200 e2fsprogs (1.10-5.1) experimental; urgency=low * Applied patch from Ted for libc6 compatibility, for test purpose. -- Yann Dirson Thu, 11 Sep 1997 09:09:42 +0200 e2fsprogs (1.10-5) unstable; urgency=medium * Switched back to libc5 because of possible bug in libc6-2.0.4-provided llseek() causing problem with partitions > 2Gb. * Switched back to libc-provided llseek(). -- Yann Dirson Tue, 5 Aug 1997 16:54:40 +0200 e2fsprogs (1.10-4.1) unstable; urgency=low * Make use of shipped llseek instead of glibc's which seems buggy [unreleased - could not compile due to possible gcc bug]. * Corrected compiler-options handling in debian/rules (use CCOPTS instead of CFLAGS which is messed with in configure.in). -- Yann Dirson Mon, 28 Jul 1997 19:47:02 +0200 e2fsprogs (1.10-4) unstable; urgency=low * Switched to libc6. * Added calls to update-info in postins/prerm. * Misc changes to debian/rules; some cleanup in Makefiles. -- Yann Dirson Thu, 10 Jul 1997 19:42:54 +0200 e2fsprogs (1.10-3) stable unstable; urgency=low * New maintainer (closed many obsolete bug-reports). * updated "copyright" to show new location on tsx-11. * started debian/rules cleanup, towards new policy conformance. * Added flushb.8 link to undocumented.7 (bug #8644). * Added {fsck,mkfs}.ext2.8 links to existing manpages (bugs #5598, #6286). -- Yann Dirson Wed, 25 Jun 1997 14:59:58 +0200 e2fsprogs (1.10-2) frozen unstable; urgency=low * Add 'ldconfig' to postinst (should fix #9020). * Define HAVE_NETINET_IN_H on alpha/glibc. -- Klee Dienes Tue, 29 Apr 1997 17:24:12 -0400 e2fsprogs (1.10-1) frozen unstable; urgency=medium * Upstream bug-fix release. -- Klee Dienes Thu, 24 Apr 1997 14:54:12 -0400 e2fsprogs (1.09-1) frozen; urgency=medium * Upstream bug-fix release. -- Klee Dienes Thu, 24 Apr 1997 14:54:12 -0400 e2fsprogs (1.06-4) unstable; urgency=low * Added empty entries to shlibs.local, to neatly solve the pre-depends problem, as suggested by Ian Jackson. -- Michael Nonweiler Wed, 13 Nov 1996 08:13:28 +0000 e2fsprogs (1.06-3) unstable; urgency=low * Hard coded Pre-Depends line, as a temporary fix for the pre-depends contains e2fsprogs problem. -- Michael Nonweiler Sat, 9 Nov 1996 12:57:44 +0000 e2fsprogs (1.06-2) unstable; urgency=low * New packaging format * Fixes packaging bugs - Files in /lib are now stripped of all unneeded symbols (Bug#5121) Calls to ldconfig in maintainer scripts have been removed (Bug#4247) -- Michael Nonweiler Tue, 5 Nov 1996 21:14:54 +0000 e2fsprogs (1.01-1) unstable; urgency=low * upgraded to latest upstream version, to 1.06 from 1.05 * upgraded to latest upstream version, to 1.05 from 1.04 * gzip manpages * minor changes to debian.rules -- Michael Meskes Fri, 18 Oct 1996 00:00:00 +0000 e2fsprogs (1.04-1) unstable; urgency=low * upgraded to latest upstream version, to 1.04 from 1.02 * another tidy-up of debian.rules * section and priority added to debian.control, since this is an essential base package. -- Michael Nonweiler Sun, 23 Jun 1996 00:00:00 +0000 e2fsprogs (1.02-1) unstable; urgency=low * upgraded to latest upstream version, to 1.02 from 1.01 * copied "configure" usr_prefix change (see below), into configure.in * updated debian.control file, added Pre-Depends field created preinst script to check dpkg --assert-predepends tidyed and fixed debian.rules * set e2fsck to link shared, as suggested by Bruce Perens in Bug#2332 * corrected problem in e2fsck error message, Bug#2534 * added Architecture field * very minor correction to expected output of a build time test -- Michael Nonweiler Tue, 5 Mar 1996 00:00:00 +0000 e2fsprogs (1.01-1) unstable; urgency=low * removed debugging symbols from libs and enabled more optimization as suggested by Rolf Rossius * also removed the /var/catman pages * changed to elf compilation -- Andrew D. Fernandes Mon, 20 Nov 1995 00:00:00 +0000 e2fsprogs (0.5b-2) unstable; urgency=low * Upgraded to latest version, to 1.01 from 0.5b. * changed the installation groups from bin to root in MCONFIG.in * changed configure to set usr_prefix="\${prefix}/usr" * moved the cat pages to /var/catman in MCONFIG.in -- Andrew D. Fernandes Sat, 7 Oct 1995 00:00:00 +0000 e2fsprogs (0.5b-1) unstable; urgency=low * Made "fsck -t " work correctly. Formerly the -t argument was overriden by the filesystem type listed for the device in /etc/fstab. * added Debian GNU/Linux package maintenance system files -- Bruce Perens Thu, 3 Aug 1995 00:00:00 +0000 debian/libuuid1.files.in0000664000000000000000000000002412162020142012321 0ustar lib/*/libuuid*.so.* debian/e2fslibs.symbols0000664000000000000000000004562412301111177012320 0ustar libe2p.so.2 e2fslibs #MINVER# e2p_edit_feature2@Base 1.40.7 e2p_edit_feature@Base 1.37 e2p_edit_mntopts@Base 1.37 e2p_feature2string@Base 1.37 e2p_hash2string@Base 1.37 e2p_is_null_uuid@Base 1.37 e2p_jrnl_feature2string@Base 1.41.1 e2p_jrnl_string2feature@Base 1.41.1 e2p_mntopt2string@Base 1.37 e2p_os2string@Base 1.37 e2p_percent@Base 1.40 e2p_string2feature@Base 1.37 e2p_string2hash@Base 1.37 e2p_string2mntopt@Base 1.37 e2p_string2os@Base 1.37 e2p_uuid2str@Base 1.37 e2p_uuid_to_str@Base 1.37 fgetflags@Base 1.37 fgetversion@Base 1.37 fsetflags@Base 1.37 fsetversion@Base 1.37 getflags@Base 1.37 getversion@Base 1.37 iterate_on_dir@Base 1.37 list_super2@Base 1.37 list_super@Base 1.37 parse_num_blocks2@Base 1.42 parse_num_blocks@Base 1.37 print_flags@Base 1.37 print_fs_errors@Base 1.37 print_fs_state@Base 1.37 setflags@Base 1.37 setversion@Base 1.37 libext2fs.so.2 e2fslibs #MINVER# badblocks_list_add@Base 1.37 badblocks_list_create@Base 1.37 badblocks_list_free@Base 1.37 badblocks_list_iterate@Base 1.37 badblocks_list_iterate_begin@Base 1.37 badblocks_list_iterate_end@Base 1.37 badblocks_list_test@Base 1.37 et_ext2_error_table@Base 1.37 ext2fs_add_dir_block2@Base 1.42 ext2fs_add_dir_block@Base 1.37 ext2fs_add_journal_device@Base 1.37 ext2fs_add_journal_inode2@Base 1.42.9-3~ ext2fs_add_journal_inode@Base 1.37 ext2fs_adjust_ea_refcount2@Base 1.42 ext2fs_adjust_ea_refcount@Base 1.37 ext2fs_alloc_block2@Base 1.42 ext2fs_alloc_block@Base 1.37 ext2fs_alloc_generic_bmap@Base 1.42 ext2fs_allocate_block_bitmap@Base 1.37 ext2fs_allocate_generic_bitmap@Base 1.37 ext2fs_allocate_group_table@Base 1.37 ext2fs_allocate_inode_bitmap@Base 1.37 ext2fs_allocate_subcluster_bitmap@Base 1.42 ext2fs_allocate_tables@Base 1.37 ext2fs_badblocks_copy@Base 1.37 ext2fs_badblocks_equal@Base 1.37 ext2fs_badblocks_list_add@Base 1.37 ext2fs_badblocks_list_create@Base 1.37 ext2fs_badblocks_list_del@Base 1.37 ext2fs_badblocks_list_free@Base 1.37 ext2fs_badblocks_list_iterate@Base 1.37 ext2fs_badblocks_list_iterate_begin@Base 1.37 ext2fs_badblocks_list_iterate_end@Base 1.37 ext2fs_badblocks_list_test@Base 1.37 ext2fs_bg_checksum@Base 1.42 ext2fs_bg_checksum_set@Base 1.42 ext2fs_bg_flags@Base 1.42 ext2fs_bg_flags_clear@Base 1.42 ext2fs_bg_flags_set@Base 1.42 ext2fs_bg_flags_test@Base 1.42 ext2fs_bg_flags_zap@Base 1.42 ext2fs_bg_free_blocks_count@Base 1.42 ext2fs_bg_free_blocks_count_set@Base 1.42 ext2fs_bg_free_inodes_count@Base 1.42 ext2fs_bg_free_inodes_count_set@Base 1.42 ext2fs_bg_has_super@Base 1.37 ext2fs_bg_itable_unused@Base 1.42 ext2fs_bg_itable_unused_set@Base 1.42 ext2fs_bg_used_dirs_count@Base 1.42 ext2fs_bg_used_dirs_count_set@Base 1.42 ext2fs_bitcount@Base 1.42.7 ext2fs_blkmap64_bitarray@Base 1.42 ext2fs_blkmap64_rbtree@Base 1.42.1 ext2fs_block_alloc_stats2@Base 1.42 ext2fs_block_alloc_stats@Base 1.37 ext2fs_block_alloc_stats_range@Base 1.42.9-3~ ext2fs_block_bitmap_loc@Base 1.42 ext2fs_block_bitmap_loc_set@Base 1.42 ext2fs_block_iterate2@Base 1.37 ext2fs_block_iterate3@Base 1.42 ext2fs_block_iterate@Base 1.37 ext2fs_blocks_count@Base 1.42 ext2fs_blocks_count_add@Base 1.42 ext2fs_blocks_count_set@Base 1.42 ext2fs_bmap2@Base 1.41.0 ext2fs_bmap@Base 1.37 ext2fs_check_desc@Base 1.37 ext2fs_check_directory@Base 1.37 ext2fs_check_if_mounted@Base 1.37 ext2fs_check_mount_point@Base 1.37 ext2fs_clear_bit64@Base 1.42 ext2fs_clear_bit@Base 1.37 ext2fs_clear_block_bitmap@Base 1.37 ext2fs_clear_generic_bitmap@Base 1.41.0 ext2fs_clear_generic_bmap@Base 1.42 ext2fs_clear_inode_bitmap@Base 1.37 ext2fs_close2@Base 1.42 ext2fs_close@Base 1.37 ext2fs_close_inode_scan@Base 1.37 ext2fs_compare_block_bitmap@Base 1.37 ext2fs_compare_generic_bitmap@Base 1.41.0 ext2fs_compare_generic_bmap@Base 1.42 ext2fs_compare_inode_bitmap@Base 1.37 ext2fs_convert_subcluster_bitmap@Base 1.42 ext2fs_copy_bitmap@Base 1.37 ext2fs_copy_dblist@Base 1.37 ext2fs_copy_generic_bitmap@Base 1.41.0 ext2fs_copy_generic_bmap@Base 1.42 ext2fs_crc16@Base 1.41.1 ext2fs_crc32c_be@Base 1.42 ext2fs_crc32c_le@Base 1.42 ext2fs_create_icount2@Base 1.37 ext2fs_create_icount@Base 1.37 ext2fs_create_icount_tdb@Base 1.40 ext2fs_create_journal_superblock@Base 1.37 ext2fs_create_resize_inode@Base 1.37 ext2fs_dblist_count2@Base 1.42 ext2fs_dblist_count@Base 1.37 ext2fs_dblist_dir_iterate@Base 1.37 ext2fs_dblist_drop_last@Base 1.40.8 ext2fs_dblist_get_last2@Base 1.42 ext2fs_dblist_get_last@Base 1.40.8 ext2fs_dblist_iterate2@Base 1.42 ext2fs_dblist_iterate@Base 1.37 ext2fs_dblist_sort2@Base 1.42 ext2fs_dblist_sort@Base 1.37 ext2fs_default_journal_size@Base 1.40 ext2fs_descriptor_block_loc2@Base 1.42 ext2fs_descriptor_block_loc@Base 1.37 ext2fs_dir_iterate2@Base 1.37 ext2fs_dir_iterate@Base 1.37 ext2fs_dirhash@Base 1.37 ext2fs_div64_ceil@Base 1.42 ext2fs_div_ceil@Base 1.40 ext2fs_dup_handle@Base 1.37 ext2fs_expand_dir@Base 1.37 ext2fs_ext_attr_hash_entry@Base 1.41.0 ext2fs_extent_delete@Base 1.41.0 ext2fs_extent_fix_parents@Base 1.42.7 ext2fs_extent_free@Base 1.41.0 ext2fs_extent_get@Base 1.41.0 ext2fs_extent_get_info@Base 1.41.0 ext2fs_extent_goto2@Base 1.42.7 ext2fs_extent_goto@Base 1.41.0 ext2fs_extent_header_verify@Base 1.41.0 ext2fs_extent_insert@Base 1.41.0 ext2fs_extent_node_split@Base 1.42.7 ext2fs_extent_open2@Base 1.41.6 ext2fs_extent_open@Base 1.41.0 ext2fs_extent_replace@Base 1.41.0 ext2fs_extent_set_bmap@Base 1.41.0 ext2fs_fast_clear_bit64@Base 1.42 ext2fs_fast_clear_bit@Base 1.39 ext2fs_fast_mark_block_bitmap2@Base 1.42 ext2fs_fast_mark_block_bitmap@Base 1.37 ext2fs_fast_mark_block_bitmap_range2@Base 1.42 ext2fs_fast_mark_block_bitmap_range@Base 1.37 ext2fs_fast_mark_inode_bitmap2@Base 1.42 ext2fs_fast_mark_inode_bitmap@Base 1.37 ext2fs_fast_set_bit64@Base 1.42 ext2fs_fast_set_bit@Base 1.39 ext2fs_fast_test_block_bitmap2@Base 1.42 ext2fs_fast_test_block_bitmap@Base 1.37 ext2fs_fast_test_block_bitmap_range2@Base 1.42 ext2fs_fast_test_block_bitmap_range@Base 1.37 ext2fs_fast_test_inode_bitmap2@Base 1.42 ext2fs_fast_test_inode_bitmap@Base 1.37 ext2fs_fast_unmark_block_bitmap2@Base 1.42 ext2fs_fast_unmark_block_bitmap@Base 1.37 ext2fs_fast_unmark_block_bitmap_range2@Base 1.42 ext2fs_fast_unmark_block_bitmap_range@Base 1.37 ext2fs_fast_unmark_inode_bitmap2@Base 1.42 ext2fs_fast_unmark_inode_bitmap@Base 1.37 ext2fs_file_acl_block@Base 1.42 ext2fs_file_acl_block_set@Base 1.42 ext2fs_file_block_offset_too_big@Base 1.42.9 ext2fs_file_close@Base 1.37 ext2fs_file_flush@Base 1.37 ext2fs_file_get_fs@Base 1.37 ext2fs_file_get_inode@Base 1.42 ext2fs_file_get_inode_num@Base 1.42.1 ext2fs_file_get_lsize@Base 1.37 ext2fs_file_get_size@Base 1.37 ext2fs_file_llseek@Base 1.37 ext2fs_file_lseek@Base 1.37 ext2fs_file_open2@Base 1.37 ext2fs_file_open@Base 1.37 ext2fs_file_read@Base 1.37 ext2fs_file_set_size2@Base 1.42 ext2fs_file_set_size@Base 1.37 ext2fs_file_write@Base 1.37 ext2fs_find_block_device@Base 1.37 ext2fs_find_first_set_block_bitmap2@Base 1.42.9-3~ ext2fs_find_first_set_generic_bitmap@Base 1.42.9-3~ ext2fs_find_first_set_generic_bmap@Base 1.42.9-3~ ext2fs_find_first_set_inode_bitmap2@Base 1.42.9-3~ ext2fs_find_first_zero_block_bitmap2@Base 1.42.2 ext2fs_find_first_zero_generic_bitmap@Base 1.42.3 ext2fs_find_first_zero_generic_bmap@Base 1.42.2 ext2fs_find_first_zero_inode_bitmap2@Base 1.42.2 ext2fs_flush2@Base 1.42 ext2fs_flush@Base 1.37 ext2fs_flush_icache@Base 1.37 ext2fs_follow_link@Base 1.37 ext2fs_free@Base 1.37 ext2fs_free_block_bitmap@Base 1.37 ext2fs_free_blocks_count@Base 1.42 ext2fs_free_blocks_count_add@Base 1.42 ext2fs_free_blocks_count_set@Base 1.42 ext2fs_free_dblist@Base 1.37 ext2fs_free_generic_bitmap@Base 1.37 ext2fs_free_generic_bmap@Base 1.42 ext2fs_free_icount@Base 1.37 ext2fs_free_inode_bitmap@Base 1.37 ext2fs_free_mem@Base 1.37 ext2fs_fstat@Base 1.42 ext2fs_fudge_block_bitmap_end2@Base 1.42 ext2fs_fudge_block_bitmap_end@Base 1.37 ext2fs_fudge_generic_bitmap_end@Base 1.41.0 ext2fs_fudge_generic_bmap_end@Base 1.42 ext2fs_fudge_inode_bitmap_end@Base 1.37 ext2fs_get_array@Base 1.40.3 ext2fs_get_arrayzero@Base 1.42 ext2fs_get_bitmap_granularity@Base 1.42 ext2fs_get_block_bitmap_end2@Base 1.42 ext2fs_get_block_bitmap_end@Base 1.37 ext2fs_get_block_bitmap_range2@Base 1.42 ext2fs_get_block_bitmap_range@Base 1.41.0 ext2fs_get_block_bitmap_start2@Base 1.42 ext2fs_get_block_bitmap_start@Base 1.37 ext2fs_get_blocks@Base 1.37 ext2fs_get_data_io@Base 1.37 ext2fs_get_device_phys_sectsize@Base 1.41.12 ext2fs_get_device_sectsize@Base 1.37 ext2fs_get_device_size2@Base 1.41.4 ext2fs_get_device_size@Base 1.37 ext2fs_get_dio_alignment@Base 1.42.3 ext2fs_get_free_blocks2@Base 1.42 ext2fs_get_free_blocks@Base 1.37 ext2fs_get_generic_bitmap_end@Base 1.41.0 ext2fs_get_generic_bitmap_range@Base 1.41.0 ext2fs_get_generic_bitmap_start@Base 1.41.0 ext2fs_get_generic_bmap_end@Base 1.42 ext2fs_get_generic_bmap_range@Base 1.42 ext2fs_get_generic_bmap_start@Base 1.42 ext2fs_get_icount_size@Base 1.37 ext2fs_get_inode_bitmap_end2@Base 1.42 ext2fs_get_inode_bitmap_end@Base 1.37 ext2fs_get_inode_bitmap_range2@Base 1.42 ext2fs_get_inode_bitmap_range@Base 1.41.0 ext2fs_get_inode_bitmap_start2@Base 1.42 ext2fs_get_inode_bitmap_start@Base 1.37 ext2fs_get_library_version@Base 1.37 ext2fs_get_mem@Base 1.37 ext2fs_get_memalign@Base 1.41.13 ext2fs_get_memzero@Base 1.42 ext2fs_get_next_inode@Base 1.37 ext2fs_get_next_inode_full@Base 1.37 ext2fs_get_num_dirs@Base 1.37 ext2fs_get_pathname@Base 1.37 ext2fs_get_rec_len@Base 1.41.7 ext2fs_group_blocks_count@Base 1.42 ext2fs_group_desc@Base 1.42 ext2fs_group_desc_csum@Base 1.42.2 ext2fs_group_desc_csum_set@Base 1.41.0 ext2fs_group_desc_csum_verify@Base 1.41.0 ext2fs_group_first_block2@Base 1.42 ext2fs_group_first_block@Base 1.40 ext2fs_group_last_block2@Base 1.42 ext2fs_group_last_block@Base 1.40 ext2fs_group_of_blk2@Base 1.42 ext2fs_group_of_blk@Base 1.37 ext2fs_group_of_ino@Base 1.37 ext2fs_iblk_add_blocks@Base 1.41.0 ext2fs_iblk_set@Base 1.41.0 ext2fs_iblk_sub_blocks@Base 1.41.0 ext2fs_icount_decrement@Base 1.37 ext2fs_icount_fetch@Base 1.37 ext2fs_icount_increment@Base 1.37 ext2fs_icount_store@Base 1.37 ext2fs_icount_validate@Base 1.37 ext2fs_image_bitmap_read@Base 1.37 ext2fs_image_bitmap_write@Base 1.37 ext2fs_image_inode_read@Base 1.37 ext2fs_image_inode_write@Base 1.37 ext2fs_image_super_read@Base 1.37 ext2fs_image_super_write@Base 1.37 ext2fs_init_dblist@Base 1.37 ext2fs_initialize@Base 1.37 ext2fs_inode_alloc_stats2@Base 1.37 ext2fs_inode_alloc_stats@Base 1.37 ext2fs_inode_bitmap_loc@Base 1.42 ext2fs_inode_bitmap_loc_set@Base 1.42 ext2fs_inode_data_blocks2@Base 1.42 ext2fs_inode_data_blocks@Base 1.37 ext2fs_inode_has_valid_blocks2@Base 1.42 ext2fs_inode_has_valid_blocks@Base 1.37 ext2fs_inode_i_blocks@Base 1.42 ext2fs_inode_io_intern2@Base 1.37 ext2fs_inode_io_intern@Base 1.37 ext2fs_inode_scan_flags@Base 1.37 ext2fs_inode_scan_goto_blockgroup@Base 1.37 ext2fs_inode_table_loc@Base 1.42 ext2fs_inode_table_loc_set@Base 1.42 ext2fs_link@Base 1.37 ext2fs_llseek@Base 1.37 ext2fs_lookup@Base 1.37 ext2fs_make_generic_bitmap@Base 1.41.0 ext2fs_map_cluster_block@Base 1.42.9 ext2fs_mark_bb_dirty@Base 1.37 ext2fs_mark_block_bitmap2@Base 1.42 ext2fs_mark_block_bitmap@Base 1.37 ext2fs_mark_block_bitmap_range2@Base 1.42 ext2fs_mark_block_bitmap_range@Base 1.37 ext2fs_mark_changed@Base 1.37 ext2fs_mark_generic_bitmap@Base 1.37 ext2fs_mark_generic_bmap@Base 1.42 ext2fs_mark_ib_dirty@Base 1.37 ext2fs_mark_inode_bitmap2@Base 1.42 ext2fs_mark_inode_bitmap@Base 1.37 ext2fs_mark_super_dirty@Base 1.37 ext2fs_mark_valid@Base 1.37 ext2fs_mem_is_zero@Base 1.42 ext2fs_mkdir@Base 1.37 ext2fs_mmp_clear@Base 1.42 ext2fs_mmp_init@Base 1.42 ext2fs_mmp_new_seq@Base 1.42 ext2fs_mmp_read@Base 1.42 ext2fs_mmp_start@Base 1.42 ext2fs_mmp_stop@Base 1.42 ext2fs_mmp_update@Base 1.42 ext2fs_mmp_write@Base 1.42 ext2fs_namei@Base 1.37 ext2fs_namei_follow@Base 1.37 ext2fs_native_flag@Base 1.37 ext2fs_new_block2@Base 1.42 ext2fs_new_block@Base 1.37 ext2fs_new_dir_block@Base 1.37 ext2fs_new_inode@Base 1.37 ext2fs_numeric_progress_close@Base 1.42 ext2fs_numeric_progress_init@Base 1.42 ext2fs_numeric_progress_update@Base 1.42 ext2fs_open2@Base 1.37 ext2fs_open@Base 1.37 ext2fs_open_file@Base 1.42 ext2fs_open_inode_scan@Base 1.37 ext2fs_parse_version_string@Base 1.37 ext2fs_process_dir_block@Base 1.37 ext2fs_punch@Base 1.42 ext2fs_r_blocks_count@Base 1.42 ext2fs_r_blocks_count_add@Base 1.42 ext2fs_r_blocks_count_set@Base 1.42 ext2fs_rb_augment_erase_begin@Base 1.42.1 ext2fs_rb_augment_erase_end@Base 1.42.1 ext2fs_rb_augment_insert@Base 1.42.1 ext2fs_rb_erase@Base 1.42.1 ext2fs_rb_first@Base 1.42.1 ext2fs_rb_insert_color@Base 1.42.1 ext2fs_rb_last@Base 1.42.1 ext2fs_rb_next@Base 1.42.1 ext2fs_rb_prev@Base 1.42.1 ext2fs_rb_replace_node@Base 1.42.1 ext2fs_read_bb_FILE2@Base 1.37 ext2fs_read_bb_FILE@Base 1.37 ext2fs_read_bb_inode@Base 1.37 ext2fs_read_bitmaps@Base 1.37 ext2fs_read_block_bitmap@Base 1.37 ext2fs_read_dir_block2@Base 1.37 ext2fs_read_dir_block3@Base 1.42 ext2fs_read_dir_block@Base 1.37 ext2fs_read_ext_attr2@Base 1.42 ext2fs_read_ext_attr@Base 1.37 ext2fs_read_ind_block@Base 1.37 ext2fs_read_inode@Base 1.37 ext2fs_read_inode_bitmap@Base 1.37 ext2fs_read_inode_full@Base 1.37 ext2fs_reserve_super_and_bgd@Base 1.37 ext2fs_resize_block_bitmap2@Base 1.42 ext2fs_resize_block_bitmap@Base 1.37 ext2fs_resize_generic_bitmap@Base 1.37 ext2fs_resize_generic_bmap@Base 1.42 ext2fs_resize_inode_bitmap2@Base 1.42 ext2fs_resize_inode_bitmap@Base 1.37 ext2fs_resize_mem@Base 1.37 ext2fs_rewrite_to_io@Base 1.37 ext2fs_set_alloc_block_callback@Base 1.41.0 ext2fs_set_bit64@Base 1.42 ext2fs_set_bit@Base 1.37 ext2fs_set_bitmap_padding@Base 1.37 ext2fs_set_block_alloc_stats_callback@Base 1.41.0 ext2fs_set_block_bitmap_range2@Base 1.42 ext2fs_set_block_bitmap_range@Base 1.41.0 ext2fs_set_data_io@Base 1.37 ext2fs_set_dir_block2@Base 1.42 ext2fs_set_dir_block@Base 1.37 ext2fs_set_gdt_csum@Base 1.41.0 ext2fs_set_generic_bitmap_padding@Base 1.41.0 ext2fs_set_generic_bitmap_range@Base 1.41.0 ext2fs_set_generic_bmap_padding@Base 1.42 ext2fs_set_generic_bmap_range@Base 1.42 ext2fs_set_inode_bitmap_range2@Base 1.42 ext2fs_set_inode_bitmap_range@Base 1.41.0 ext2fs_set_inode_callback@Base 1.37 ext2fs_set_rec_len@Base 1.41.7 ext2fs_stat@Base 1.42 ext2fs_super_and_bgd_loc2@Base 1.42 ext2fs_super_and_bgd_loc@Base 1.37 ext2fs_swab16@Base 1.37 ext2fs_swab32@Base 1.37 ext2fs_swab64@Base 1.40 ext2fs_symlink@Base 1.42.7 ext2fs_sync_device@Base 1.37 ext2fs_tdb_append@Base 1.40 ext2fs_tdb_chainlock@Base 1.40 ext2fs_tdb_chainlock_mark@Base 1.40.7 ext2fs_tdb_chainlock_nonblock@Base 1.40.7 ext2fs_tdb_chainlock_read@Base 1.40 ext2fs_tdb_chainlock_unmark@Base 1.40.7 ext2fs_tdb_chainunlock@Base 1.40 ext2fs_tdb_chainunlock_read@Base 1.40 ext2fs_tdb_close@Base 1.40 ext2fs_tdb_delete@Base 1.40 ext2fs_tdb_dump_all@Base 1.40 ext2fs_tdb_enable_seqnum@Base 1.40.7 ext2fs_tdb_error@Base 1.40 ext2fs_tdb_errorstr@Base 1.40 ext2fs_tdb_exists@Base 1.40 ext2fs_tdb_fd@Base 1.40 ext2fs_tdb_fetch@Base 1.40 ext2fs_tdb_firstkey@Base 1.40 ext2fs_tdb_get_flags@Base 1.40 ext2fs_tdb_get_logging_private@Base 1.40 ext2fs_tdb_get_seqnum@Base 1.40 ext2fs_tdb_hash_size@Base 1.40 ext2fs_tdb_increment_seqnum_nonblock@Base 1.40.7 ext2fs_tdb_lock_nonblock@Base 1.40.7 ext2fs_tdb_lockall@Base 1.40 ext2fs_tdb_lockall_mark@Base 1.40.7 ext2fs_tdb_lockall_nonblock@Base 1.40.7 ext2fs_tdb_lockall_read@Base 1.40 ext2fs_tdb_lockall_read_nonblock@Base 1.40.7 ext2fs_tdb_lockall_unmark@Base 1.40.7 ext2fs_tdb_log_fn@Base 1.40 ext2fs_tdb_map_size@Base 1.40 ext2fs_tdb_name@Base 1.40 ext2fs_tdb_nextkey@Base 1.40 ext2fs_tdb_open@Base 1.40 ext2fs_tdb_open_ex@Base 1.40 ext2fs_tdb_parse_record@Base 1.40 ext2fs_tdb_printfreelist@Base 1.40 ext2fs_tdb_reopen@Base 1.40 ext2fs_tdb_reopen_all@Base 1.40 ext2fs_tdb_set_logging_function@Base 1.40 ext2fs_tdb_set_max_dead@Base 1.40 ext2fs_tdb_store@Base 1.40 ext2fs_tdb_transaction_cancel@Base 1.40 ext2fs_tdb_transaction_commit@Base 1.40 ext2fs_tdb_transaction_recover@Base 1.40 ext2fs_tdb_transaction_start@Base 1.40 ext2fs_tdb_traverse@Base 1.40 ext2fs_tdb_traverse_read@Base 1.40 ext2fs_tdb_unlockall@Base 1.40 ext2fs_tdb_unlockall_read@Base 1.40 ext2fs_tdb_validate_freelist@Base 1.40 ext2fs_test_bb_dirty@Base 1.37 ext2fs_test_bit64@Base 1.42 ext2fs_test_bit@Base 1.37 ext2fs_test_block_bitmap2@Base 1.42 ext2fs_test_block_bitmap@Base 1.37 ext2fs_test_block_bitmap_range2@Base 1.42 ext2fs_test_block_bitmap_range@Base 1.37 ext2fs_test_changed@Base 1.37 ext2fs_test_generic_bitmap@Base 1.37 ext2fs_test_generic_bmap@Base 1.42 ext2fs_test_ib_dirty@Base 1.37 ext2fs_test_inode_bitmap2@Base 1.42 ext2fs_test_inode_bitmap@Base 1.37 ext2fs_test_inode_bitmap_range@Base 1.41.8 ext2fs_test_valid@Base 1.37 ext2fs_u32_copy@Base 1.37 ext2fs_u32_list_add@Base 1.37 ext2fs_u32_list_count@Base 1.37 ext2fs_u32_list_create@Base 1.37 ext2fs_u32_list_del@Base 1.37 ext2fs_u32_list_equal@Base 1.37 ext2fs_u32_list_find@Base 1.37 ext2fs_u32_list_free@Base 1.37 ext2fs_u32_list_iterate@Base 1.37 ext2fs_u32_list_iterate_begin@Base 1.37 ext2fs_u32_list_iterate_end@Base 1.37 ext2fs_u32_list_test@Base 1.37 ext2fs_unlink@Base 1.37 ext2fs_unmark_block_bitmap2@Base 1.42 ext2fs_unmark_block_bitmap@Base 1.37 ext2fs_unmark_block_bitmap_range2@Base 1.42 ext2fs_unmark_block_bitmap_range@Base 1.37 ext2fs_unmark_generic_bitmap@Base 1.37 ext2fs_unmark_generic_bmap@Base 1.42 ext2fs_unmark_inode_bitmap2@Base 1.42 ext2fs_unmark_inode_bitmap@Base 1.37 ext2fs_unmark_valid@Base 1.37 ext2fs_update_bb_inode@Base 1.37 ext2fs_update_dynamic_rev@Base 1.37 ext2fs_warn_bitmap2@Base 1.37 ext2fs_warn_bitmap32@Base 1.42 ext2fs_warn_bitmap@Base 1.37 ext2fs_write_bb_FILE@Base 1.37 ext2fs_write_bitmaps@Base 1.37 ext2fs_write_block_bitmap@Base 1.37 ext2fs_write_dir_block2@Base 1.37 ext2fs_write_dir_block3@Base 1.42 ext2fs_write_dir_block@Base 1.37 ext2fs_write_ext_attr2@Base 1.42 ext2fs_write_ext_attr@Base 1.37 ext2fs_write_ind_block@Base 1.37 ext2fs_write_inode@Base 1.37 ext2fs_write_inode_bitmap@Base 1.37 ext2fs_write_inode_full@Base 1.37 ext2fs_write_new_inode@Base 1.37 ext2fs_zero_blocks2@Base 1.42 ext2fs_zero_blocks@Base 1.41.0 initialize_ext2_error_table@Base 1.37 initialize_ext2_error_table_r@Base 1.37 inode_io_manager@Base 1.37 io_channel_alloc_buf@Base 1.42.3 io_channel_discard@Base 1.42 io_channel_read_blk64@Base 1.41.1 io_channel_set_options@Base 1.37 io_channel_write_blk64@Base 1.41.1 io_channel_write_byte@Base 1.37 qcow2_read_header@Base 1.42 qcow2_write_raw_image@Base 1.42 set_undo_io_backing_manager@Base 1.41.0 set_undo_io_backup_file@Base 1.41.0 test_io_backing_manager@Base 1.37 test_io_cb_read_blk64@Base 1.41.0 test_io_cb_read_blk@Base 1.37 test_io_cb_set_blksize@Base 1.37 test_io_cb_write_blk64@Base 1.41.0 test_io_cb_write_blk@Base 1.37 test_io_cb_write_byte@Base 1.37 test_io_manager@Base 1.37 undo_io_manager@Base 1.41.0 unix_io_manager@Base 1.37 debian/e2fslibs.files0000664000000000000000000000005112162020142011707 0ustar lib/*/libext2fs*.so.* lib/*/libe2p*.so.* debian/compat0000664000000000000000000000000211750766346010405 0ustar 7 debian/e2fsprogs-udeb.shlibs.local0000664000000000000000000000031411750766346014333 0ustar libblkid 1 libblkid1-udeb # force the dependency to libblkid1-udeb, even if it don't include the lib libcom_err 2 libblkid1-udeb libuuid 1 libuuid1-udeb libext2fs 2 libblkid1-udeb libe2p 2 libblkid1-udeb