Index: head/sysutils/e2fsprogs/Makefile =================================================================== --- head/sysutils/e2fsprogs/Makefile (revision 528963) +++ head/sysutils/e2fsprogs/Makefile (revision 528964) @@ -1,319 +1,319 @@ # Created by: Maxim Sobolev # $FreeBSD$ PORTNAME= e2fsprogs -PORTVERSION= 1.45.5 -PORTREVISION?= 4 +PORTVERSION= 1.45.6 +PORTREVISION?= 0 CATEGORIES?= sysutils MASTER_SITES= KERNEL_ORG/linux/kernel/people/tytso/${PORTNAME}/v${PORTVERSION} MAINTAINER?= mandree@FreeBSD.org COMMENT?= Utilities & library to manipulate ext2/3/4 filesystems LICENSE?= GPLv2+ .if !defined(_no_license_file) LICENSE_FILE?= ${WRKSRC}/NOTICE .endif LICENSE_DISTFILES_GPLv2+ = ${DISTNAME}${EXTRACT_SUFX} USES= cpe gmake makeinfo pkgconfig tar:xz CPE_VENDOR= e2fsprogs_project USE_CSTD= gnu99 # this seems a bit redundant to the --rpath below, but # the latter should be more robust in case someone needs # to deal with the file systems from a system not yet fully booted. .if !defined(PKGNAMESUFFIX) USE_LDCONFIG= ${PREFIX}/lib/e2fsprogs .endif GNU_CONFIGURE= yes # while we use the system blkid, we need to --enable-libblkid # so that the tools get built: CONFIGURE_ARGS?=--disable-fsck \ --disable-e2initrd-helper \ --disable-libuuid \ --disable-uuidd \ --enable-libblkid \ --enable-elf-shlibs \ --libdir='${PREFIX}/lib/e2fsprogs/' \ --includedir='${PREFIX}/include/e2fsprogs/' \ --with-root-prefix='${PREFIX}' \ --without-included-gettext \ LDFLAGS='${LDFLAGS} -L${LOCALBASE}/lib -Wl,--rpath -Wl,${LOCALBASE}/lib/e2fsprogs' CONFIGURE_ENV?= LIBS='-Wl,--as-needed ${LIBS} -lexecinfo -lelf' CPPFLAGS+= -I${WRKSRC}/lib -I${LOCALBASE}/include # -D_EXT2_USE_C_VERSIONS MAKE_ARGS+= pkgconfigdir='${PREFIX}/libdata/pkgconfig' MAKE_ENV+= CHECK_CMD=@true PORTSCOUT= ignore # cannot handle the version in the directory .if !defined(MASTERDIR) INSTALL_TARGET= install install-libs OPTIONS_DEFINE= DOCS NLS FUSEFS PARALLELTESTS SLOWTESTS BASHTESTS LIBUNWIND OPTIONS_EXCLUDE+= EXAMPLES OPTIONS_SUB= yes OPTIONS_SINGLE= SELFTEST OPTIONS_SINGLE_SELFTEST= NOTESTS SMALLTESTS ALLTESTS OPTIONS_DEFAULT= SMALLTESTS FUSEFS_DESC= Build user-land ext2/3/4 FUSE module (slow!) SELFTEST_DESC= Choose which set of self-tests to run NOTESTS_DESC= Do not run any self-tests (Tier-1, DISCOURAGED) SMALLTESTS_DESC=Run tests that need <500 MB disk space (DEFAULT) ALLTESTS_DESC= Run most self-tests (needs more RAM/disk space) PARALLELTESTS_DESC= Parallelize self-tests (needs more disk space) SLOWTESTS_DESC= Enable slow tests that are skipped by default BASHTESTS_DESC= Enable tests that require the GNU bash shell LIBUNWIND_DESC= Backtrace with libunwind (do set WITH_DEBUG_PORTS+=${PKGORIGIN}!) FUSEFS_CONFIGURE_ENABLE= fuse2fs BUILD_DEPENDS+= gdd:sysutils/coreutils BASHTESTS_BUILD_DEPENDS= ${BASH_CMD}:shells/bash BASH_CMD= ${LOCALBASE}/bin/bash LIB_DEPENDS+= libblkid.so:misc/e2fsprogs-libblkid LIB_DEPENDS+= libss.so:devel/e2fsprogs-libss LIB_DEPENDS+= libuuid.so:misc/e2fsprogs-libuuid LIBUNWIND_LIB_DEPENDS= libunwind.so:devel/libunwind LIBUNWIND_LIBS+= -L${LOCALBASE}/lib -lunwind LIBUNWIND_LDFLAGS+= -rdynamic LIBUNWIND_EXTRA_PATCHES=${FILESDIR}/extrapatch-e2fsck_sigcatcher.c PORTDOCS= NOTICE README RELEASE-NOTES SUBMITTING-PATCHES .endif # even under DEVELOPER, no REINPLACE_CMD warnings desired # it simply makes no sense to warn about dozens of files # for systematic edits that run over files that don't need the edits. # a "warn if nothing was edited by one command" would be acceptable, # but until we have that in the framework, just # avoid Tools/scripts/sed_checked altogether: REINPLACE_CMD= ${SED} ${REINPLACE_ARGS} PKGDEINSTALL= ${PKGINSTALL} MAKE_ARGS+= V=1 .include . if ! empty(ARCH:Mpowerpc*) # Fix powerpc64/powerpc SIGSEGV, # see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231570 (ppc64) # see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242798 (ppc32 - untested) USES+= compiler:c11 . endif .if ${PORT_OPTIONS:MFUSEFS} USES+= fuse .endif .if ${PORT_OPTIONS:MNLS} USES+= gettext iconv:build .endif .if empty(PORT_OPTIONS:MNOTESTS) && ${MASTERDIR} == ${.CURDIR} USES+= perl5 USE_PERL5= build .endif .include .if ${PORT_OPTIONS:MNLS} . if empty(ICONV_LIB) libintl= ${LOCALBASE}/lib/libintl.a . else libintl= ${LOCALBASE}/lib/libintl.a ${LOCALBASE}/lib/libiconv.a . endif .else CONFIGURE_ARGS+=--disable-nls libintl= .endif .if ${MASTERDIR} == ${.CURDIR} && ${ARCH} == "aarch64" EXTRA_PATCHES+= ${FILESDIR}/extrapatch-no-sbrk .endif # d_fallocate_blkmap appears to fail on some systems for unknown reasons. post-patch:: # don't build/install libext2fs.info @${REINPLACE_CMD} -e 's/ install-doc-libs$$//' ${WRKSRC}/Makefile.in @${REINPLACE_CMD} -E -e 's/md5sum ([^ ]*)/printf "%s %s\\n" $$(md5 -q \1) \1/' \ -e "s/ == 0/ = 0/" -e "s/tar x$$/tar xf -/" -e "s/\/gdd/" \ ${WRKSRC}/tests/[a-z]_*/script @${REINPLACE_CMD} -e 's///' ${WRKSRC}/*/*.c @${REINPLACE_CMD} -E -e 's/__GNUC_PREREQ\>/__GNUC_PREREQ__/' ${WRKSRC}/*/*/*.[ch] ${WRKSRC}/*/*.c .if empty(PORT_OPTIONS:MALLTESTS) . for i in \ d_fallocate_blkmap \ f_baddir \ f_bbfile \ f_convert_bmap \ f_detect_junk \ f_inode_ea_collision \ f_lpffile \ f_no_cache_corrupt_inode \ f_opt_extent \ j_corrupt_descr_csum \ m_bigjournal \ m_hugefile_slack \ m_offset \ m_raid_opt \ r_32to64bit \ r_32to64bit_expand_full \ r_32to64bit_meta \ r_32to64bit_move_itable \ r_64to32bit \ r_64to32bit_meta \ r_expand_full \ r_min_itable \ t_change_uuid_mounted \ t_dangerous \ t_disable_changed_csum_seed_mounted \ t_disable_mcsum \ t_disable_mcsum_noinitbg \ t_disable_mcsum_yesinitbg \ t_enable_mcsum \ t_enable_mcsum_initbg \ t_iexpand_full \ t_iexpand_mcsum \ t_uninit_bg_rm \ u_dryrun \ u_mke2fs_opt_offset @${MV} ${WRKSRC}/tests/${i} ${WRKSRC}/tests/disabled_test-${i} . endfor .endif .if ${PORT_OPTIONS:MBASHTESTS} ${REINPLACE_CMD} -e 's}^SHELL *=.*}SHELL = ${_CHECK_SHELL}}' ${WRKSRC}/MCONFIG.in .else . for i in f_large_dir @${MV} ${WRKSRC}/tests/${i} ${WRKSRC}/tests/disabled_test-${i} . endfor .endif ############################################################## # Master port stuff that is not to be seen by the slave ports. ############################################################## .if ${MASTERDIR} == ${.CURDIR} # NOTE: The previous .if block goes all the way to the end of the file. .if !empty(PORT_OPTIONS:MNOTESTS) && (${OPSYS} == FreeBSD) && (${OSVERSION} >= 1200000 || ((${ARCH} != i386) && (${ARCH} != amd64))) BROKEN= it was not tested on your system by the maintainer; you must run self-tests .endif pre-build: # fix up Makefile ordering for parallel builds cd ${WRKSRC}/lib/et && ${DO_MAKE_BUILD} compile_et cd ${WRKSRC}/lib/support && ${DO_MAKE_BUILD} prof_err.h .if ${PORT_OPTIONS:MPARALLELTESTS} _CHECK_JOBS=${_MAKE_JOBS} .else _CHECK_JOBS= .endif .if ${PORT_OPTIONS:MBASHTESTS} _CHECK_SHELL=${SHELL} .else _CHECK_SHELL=${LOCALBASE}/bin/bash .endif _checkaddargs= .if !defined(TMPDIR) _checkaddargs+=TMPDIR=${WRKDIR}/tmp .endif .if ${PORT_OPTIONS:MBASHTESTS} _checkaddargs+=--eval SHELL:=${BASH_CMD} .endif .if ${PORT_OPTIONS:MSLOWTESTS} _check_target=SKIP_SLOW_TESTS= check _check_timeout=7200 .else _check_target=check _check_timeout=180 .endif .if ${PORT_OPTIONS:MLIBUNWIND} _staticlibs+=${LOCALBASE}/lib/libunwind.a /usr/lib/liblzma.a .endif post-build: # Relink e2fsck statically - We need to make sure that tools for the root file # system are statically linked against anything that is outside the root fs, # else we're in trouble if e2fsck is needed for boot: # (we don't use e2fsck.static, since we can link libc.so dynamically) # NOTE: we need to link libgcc statically, it might be under /usr/local! # => do not add a -Bdynamic - but instead list the dynamic libraries # before the -Bstatic cd ${WRKSRC}/e2fsck && ${RM} -f e2fsck \ && ${MAKE_CMD} e2fsck V=1 \ LIBS="-static-libgcc -lc -Bstatic ../lib/libsupport.a ../lib/libext2fs.a ../lib/libcom_err.a \ ${_staticlibs} /usr/lib/libexecinfo.a /usr/lib/libelf.a \ ${LOCALBASE}/lib/libblkid.a ${LOCALBASE}/lib/libuuid.a ${libintl} ../lib/libe2p.a " # Regression check: avoid a port (not upstream!) regression from 1.40.5, # check that e2fsck isn't dynalinked against anything but libc.so: @${ECHO_CMD} -n "===> checking that e2fsck depends on no shared objects outside /lib: " @a="$$(ldd ${WRKSRC}/e2fsck/e2fsck 2>/dev/null \ | ${GREP} -v 'not a dynamic executable' \ | ${GREP} '=>' \ | ${AWK} '{print $$3;}' \ | ${EGREP} -v '^/lib/lib.*\.so\.' || :)"; \ if test "x$$a" = "x" ; then echo 'PASS' ; else \ echo 'FAIL' ; echo '===> e2fsck depends on:' ; echo "$$a" ; exit 1 ; fi # Update translation binary files .if ${PORT_OPTIONS:MNLS} cd ${WRKSRC}/po && ${MAKE_CMD} update-gmo .endif # Build fsck(8) wrapper ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -s ${LIBS} \ -o ${WRKSRC}/fsck_ext2fs ${FILESDIR}/fsck_ext2fs.c # While the ${MAKE} check can take a minute on an end user's system, the # correctness of tools such as e2fsck is critical to the health of the # file systems. The upstream is not using any *BSD as his development # system, and therefore let's exercise due diligence in running the self- # test on each and every system and not just package building hosts. # There have been subtle failures induced by Linux-isms in the past. # -- Matthias Andree, package maintainer, 2007-09-18 .if empty(PORT_OPTIONS:MNOTESTS) @${ECHO_CMD} '===> Running e2fsprogs self-test suite' # do not add -j options unconditionally to ${MAKE_CMD} below, this might break # due to excessive disk space use. cd ${WRKSRC}/tests && \ ulimit -t ${_check_timeout} && \ ${MKDIR} ${WRKDIR}/tmp && \ ${SETENV} e2fsprogs_inhibit_SIGINFO=1 BLKID_FILE=${WRKDIR}/tmp/blkid.tab SHELL=${_CHECK_SHELL} \ ${MAKE_CMD} ${_check_target} ${_CHECK_JOBS} ${_checkaddargs} \ || { head -n30000 ${WRKSRC}/tests/*.failed 2>/dev/null ; exit 1 ; } .else @${ECHO_CMD} '===> SKIPPING e2fsprogs self-test suite (DISCOURAGED!)' .endif post-install: ${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_MAN} ${FILESDIR}/fsck_ext2fs.8 ${STAGEDIR}${PREFIX}/man/man8/ .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR} .endfor .endif # remove or relocate files installed by other ports already, or shadowing system files: cd ${STAGEDIR}${PREFIX} && \ ${XARGS} <${FILESDIR}/unwanted ${RM} && \ ${RMDIR} include/e2fsprogs/blkid include/e2fsprogs/ss share/ss ${MV} ${STAGEDIR}${PREFIX}/bin/compile_et ${STAGEDIR}${PREFIX}/bin/e2fsprogs-compile_et ${MV} ${STAGEDIR}${PREFIX}/man/man1/compile_et.1 ${STAGEDIR}${PREFIX}/man/man1/e2fsprogs-compile_et.1 ${MKDIR} ${STAGEDIR}${DATADIR}/et/ ${MV} ${STAGEDIR}${PREFIX}/share/et/* ${STAGEDIR}${DATADIR}/et/ ${REINPLACE_CMD} -e 's}^DIR=.*$$}DIR=${DATADIR}/et}' -i '' ${STAGEDIR}${PREFIX}/bin/e2fsprogs-compile_et ${RMDIR} ${STAGEDIR}${PREFIX}/share/et # # the next line closes .if ${MASTERDIR} == ${.CURDIR} .endif .include Index: head/sysutils/e2fsprogs/distinfo =================================================================== --- head/sysutils/e2fsprogs/distinfo (revision 528963) +++ head/sysutils/e2fsprogs/distinfo (revision 528964) @@ -1,3 +1,3 @@ -TIMESTAMP = 1578494654 -SHA256 (e2fsprogs-1.45.5.tar.xz) = f9faccc0d90f73556e797dc7cc5979b582bd50d3f8609c0f2ad48c736d44aede -SIZE (e2fsprogs-1.45.5.tar.xz) = 5569796 +TIMESTAMP = 1584954798 +SHA256 (e2fsprogs-1.45.6.tar.xz) = ffa7ae6954395abdc50d0f8605d8be84736465afc53b8938ef473fcf7ff44256 +SIZE (e2fsprogs-1.45.6.tar.xz) = 5572144 Index: head/sysutils/e2fsprogs/files/patch-tests_r__inline__xattr_script =================================================================== --- head/sysutils/e2fsprogs/files/patch-tests_r__inline__xattr_script (revision 528963) +++ head/sysutils/e2fsprogs/files/patch-tests_r__inline__xattr_script (nonexistent) @@ -1,20 +0,0 @@ ---- tests/r_inline_xattr/script.orig 2018-07-10 05:14:26 UTC -+++ tests/r_inline_xattr/script -@@ -14,7 +14,7 @@ echo "resize2fs test" > $OUT.new - - # Look at existing inline extended attribute - echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT.new --$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT.new -+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep -E "^Inode|in inode body|user.name \(" >> $OUT.new - status=$? - echo Exit status is $status >> $OUT.new - -@@ -26,7 +26,7 @@ echo Exit status is $status >> $OUT.new - - # Look at inline extended attribute in resized fs - echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT.new --$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT.new -+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep -E "^Inode|in inode body|user.name \(" >> $OUT.new - status=$? - echo Exit status is $status >> $OUT.new - Property changes on: head/sysutils/e2fsprogs/files/patch-tests_r__inline__xattr_script ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/e2fsprogs/files/patch-lib_ext2fs_swapfs.c =================================================================== --- head/sysutils/e2fsprogs/files/patch-lib_ext2fs_swapfs.c (revision 528963) +++ head/sysutils/e2fsprogs/files/patch-lib_ext2fs_swapfs.c (nonexistent) @@ -1,59 +0,0 @@ -Author: Theodore Ts'o - - libext2fs: avoid array buffer overruns caused by insane directory blocks - - Reported-by: canardo909@gmx.com - Signed-off-by: Theodore Ts'o - -Additionally line 441 was modified to "return 0" after e-mail exchange -between Canardo and Theodore. // mandree@FreeBSD.org 2020-02-17 - ---- lib/ext2fs/swapfs.c.orig 2020-01-06 23:10:17 UTC -+++ lib/ext2fs/swapfs.c -@@ -416,10 +416,11 @@ errcode_t ext2fs_dirent_swab_in2(ext2_filsys fs, char - errcode_t retval; - char *p, *end; - struct ext2_dir_entry *dirent; -- unsigned int name_len, rec_len; -+ unsigned int name_len, rec_len, left; - - p = (char *) buf; - end = (char *) buf + size; -+ left = size; - while (p < end-8) { - dirent = (struct ext2_dir_entry *) p; - dirent->inode = ext2fs_swab32(dirent->inode); -@@ -436,6 +437,9 @@ errcode_t ext2fs_dirent_swab_in2(ext2_filsys fs, char - retval = EXT2_ET_DIR_CORRUPTED; - } else if (((name_len & 0xFF) + 8) > rec_len) - retval = EXT2_ET_DIR_CORRUPTED; -+ if (rec_len > left) -+ return 0; -+ left -= rec_len; - p += rec_len; - } - -@@ -452,11 +456,12 @@ errcode_t ext2fs_dirent_swab_out2(ext2_filsys fs, char - { - errcode_t retval; - char *p, *end; -- unsigned int rec_len; -+ unsigned int rec_len, left; - struct ext2_dir_entry *dirent; - - p = buf; - end = buf + size; -+ left = size; - while (p < end) { - dirent = (struct ext2_dir_entry *) p; - retval = ext2fs_get_rec_len(fs, dirent, &rec_len); -@@ -471,6 +476,9 @@ errcode_t ext2fs_dirent_swab_out2(ext2_filsys fs, char - dirent->inode = ext2fs_swab32(dirent->inode); - dirent->rec_len = ext2fs_swab16(dirent->rec_len); - dirent->name_len = ext2fs_swab16(dirent->name_len); -+ if (rec_len > size) -+ return EXT2_ET_DIR_CORRUPTED; -+ size -= rec_len; - - if (flags & EXT2_DIRBLOCK_V2_STRUCT) - dirent->name_len = ext2fs_swab16(dirent->name_len); Property changes on: head/sysutils/e2fsprogs/files/patch-lib_ext2fs_swapfs.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/e2fsprogs/files/patch-0-tytso-1-Use-ext2_loff_t-instead-of-loff_t.patch =================================================================== --- head/sysutils/e2fsprogs/files/patch-0-tytso-1-Use-ext2_loff_t-instead-of-loff_t.patch (nonexistent) +++ head/sysutils/e2fsprogs/files/patch-0-tytso-1-Use-ext2_loff_t-instead-of-loff_t.patch (revision 528964) @@ -0,0 +1,72 @@ +The patch was provided by Ted Y. Ts'o, with the final loff_t -> +ext2_loff_t manually added by mandree@FreeBSD.org +-------------- + +From 3fab0b6872b74ae0efab1ebdc6318924fda5f3a5 Mon Sep 17 00:00:00 2001 +From: Theodore Ts'o +Date: Sun, 22 Mar 2020 23:30:14 -0400 +Subject: [PATCH 1/3] Use ext2_loff_t instead of loff_t + +The loff_t type is a glibc'ism and is not fully portable. Use +ext2_loff_t instead. + +Fixes: 382ed4a1c2b6 ("e2fsck: use proper types for variables") +Signed-off-by: Theodore Ts'o +Reported-by: Matthias Andree +--- + lib/ext2fs/imager.c | 2 +- + misc/e2fuzz.c | 9 +++++---- + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/lib/ext2fs/imager.c b/lib/ext2fs/imager.c +index b3ede9a8..1aebe625 100644 +--- ./lib/ext2fs/imager.c ++++ b/lib/ext2fs/imager.c +@@ -67,7 +67,7 @@ errcode_t ext2fs_image_inode_write(ext2_filsys fs, int fd, int flags) + blk64_t blk; + ssize_t actual; + errcode_t retval; +- loff_t r; ++ ext2_loff_t r; + + buf = malloc(fs->blocksize * BUF_BLOCKS); + if (!buf) +diff --git a/misc/e2fuzz.c b/misc/e2fuzz.c +index 7c0f776f..f22c9f32 100644 +--- ./misc/e2fuzz.c ++++ b/misc/e2fuzz.c +@@ -33,9 +33,10 @@ static unsigned long long user_corrupt_bytes = 0; + static double user_corrupt_pct = 0.0; + + #if !defined HAVE_PWRITE64 && !defined HAVE_PWRITE +-static ssize_t my_pwrite(int fd, const void *buf, size_t count, off_t offset) ++static ssize_t my_pwrite(int fd, const void *buf, size_t count, ++ ext2_loff_t offset) + { +- if (lseek(fd, offset, SEEK_SET) < 0) ++ if (ext2fs_llseek(fd, offset, SEEK_SET) < 0) + return 0; + + return write(fd, buf, count); +@@ -82,7 +83,7 @@ static int find_block_helper(ext2_filsys fs EXT2FS_ATTR((unused)), + } + + static errcode_t find_metadata_blocks(ext2_filsys fs, ext2fs_block_bitmap bmap, +- off_t *corrupt_bytes) ++ ext2_loff_t *corrupt_bytes) + { + dgrp_t i; + blk64_t b, c; +@@ -181,7 +182,7 @@ static int process_fs(const char *fsname) + int flags, fd; + ext2_filsys fs = NULL; + ext2fs_block_bitmap corrupt_map; +- loff_t hsize, count, off, offset, corrupt_bytes; ++ ext2_loff_t hsize, count, off, offset, corrupt_bytes; + unsigned char c; +- loff_t i; ++ ext2_loff_t i; + +-- +2.24.1 + Property changes on: head/sysutils/e2fsprogs/files/patch-0-tytso-1-Use-ext2_loff_t-instead-of-loff_t.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/e2fsprogs/files/patch-0-tytso-2-e2fsck-fix-various-gcc-Wall-nits.patch =================================================================== --- head/sysutils/e2fsprogs/files/patch-0-tytso-2-e2fsck-fix-various-gcc-Wall-nits.patch (nonexistent) +++ head/sysutils/e2fsprogs/files/patch-0-tytso-2-e2fsck-fix-various-gcc-Wall-nits.patch (revision 528964) @@ -0,0 +1,72 @@ +From ef858c7194ff6f3dc0de162fe7bd82a8cb5e8fba Mon Sep 17 00:00:00 2001 +From: Theodore Ts'o +Date: Sun, 22 Mar 2020 23:47:12 -0400 +Subject: [PATCH 2/3] e2fsck: fix various gcc -Wall nits + +Signed-off-by: Theodore Ts'o +--- + e2fsck/rehash.c | 4 ++-- + e2fsck/unix.c | 2 +- + e2fsck/util.c | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c +index 1616d07a..30e510a6 100644 +--- ./e2fsck/rehash.c ++++ b/e2fsck/rehash.c +@@ -109,7 +109,7 @@ static int fill_dir_block(ext2_filsys fs, + void *priv_data) + { + struct fill_dir_struct *fd = (struct fill_dir_struct *) priv_data; +- struct hash_entry *new_array, *ent; ++ struct hash_entry *ent; + struct ext2_dir_entry *dirent; + char *dir; + unsigned int offset, dir_offset, rec_len, name_len; +@@ -460,7 +460,7 @@ static errcode_t copy_dir_entries(e2fsck_t ctx, + struct hash_entry *ent; + struct ext2_dir_entry *dirent; + unsigned int rec_len, prev_rec_len, left, slack, offset; +- int i; ++ blk_t i; + ext2_dirhash_t prev_hash; + int csum_size = 0; + struct ext2_dir_entry_tail *t; +diff --git a/e2fsck/unix.c b/e2fsck/unix.c +index e71d7833..1b7ccea9 100644 +--- ./e2fsck/unix.c ++++ b/e2fsck/unix.c +@@ -1439,7 +1439,7 @@ int main (int argc, char *argv[]) + fputs("\n", + ctx->problem_logf); + fprintf(ctx->problem_logf, "\n", +- ctx->now); ++ (unsigned long) ctx->now); + fprintf(ctx->problem_logf, "brk_start < 2ULL << 30) { ++ if ((char *)sbrk(0) - (char *)track->brk_start < 2LL << 30) { + struct mallinfo malloc_info = mallinfo(); + + log_out(ctx, _("Memory used: %lluk/%lluk (%lluk/%lluk), "), +-- +2.24.1 + Property changes on: head/sysutils/e2fsprogs/files/patch-0-tytso-2-e2fsck-fix-various-gcc-Wall-nits.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/e2fsprogs/files/patch-0-tytso-3-tests-use-grep-E-for-better-portability-in-r_inline_.patch =================================================================== --- head/sysutils/e2fsprogs/files/patch-0-tytso-3-tests-use-grep-E-for-better-portability-in-r_inline_.patch (nonexistent) +++ head/sysutils/e2fsprogs/files/patch-0-tytso-3-tests-use-grep-E-for-better-portability-in-r_inline_.patch (revision 528964) @@ -0,0 +1,64 @@ +From e3b002dcc43364972275fe32438af299dd6629a0 Mon Sep 17 00:00:00 2001 +From: Theodore Ts'o +Date: Sun, 22 Mar 2020 23:56:14 -0400 +Subject: [PATCH 3/3] tests: use grep -E for better portability in + r_inline_xattr + +Since r_inline_xattr is using an extended regexp, we need grep -E on +some implementations of grep. + +Signed-off-by: Theodore Ts'o +--- + tests/r_inline_xattr/expect | 4 ++-- + tests/r_inline_xattr/script | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/r_inline_xattr/expect b/tests/r_inline_xattr/expect +index 885de59d..773db102 100644 +--- ./tests/r_inline_xattr/expect ++++ b/tests/r_inline_xattr/expect +@@ -1,5 +1,5 @@ + resize2fs test +-debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name ('' ++debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \('' + Inode: 1550 Type: regular Mode: 0644 Flags: 0x0 + user.name (11) = "propervalue" + Exit status is 0 +@@ -8,7 +8,7 @@ Resizing the filesystem on test.img to 5120 (1k) blocks. + The filesystem on test.img is now 5120 (1k) blocks long. + + Exit status is 0 +-debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name ('' ++debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \('' + Inode: 12 Type: regular Mode: 0644 Flags: 0x0 + user.name (11) = "propervalue" + Exit status is 0 +diff --git a/tests/r_inline_xattr/script b/tests/r_inline_xattr/script +index 4e7dd94c..2f754e60 100644 +--- ./tests/r_inline_xattr/script ++++ b/tests/r_inline_xattr/script +@@ -13,8 +13,8 @@ gunzip < $IMAGE > $TMPFILE + echo "resize2fs test" > $OUT.new + + # Look at existing inline extended attribute +-echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT.new +-$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT.new ++echo "debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \\(''" >> $OUT.new ++$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep -E "^Inode|in inode body|user.name \(" >> $OUT.new + status=$? + echo Exit status is $status >> $OUT.new + +@@ -25,8 +25,8 @@ status=$? + echo Exit status is $status >> $OUT.new + + # Look at inline extended attribute in resized fs +-echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT.new +-$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT.new ++echo "debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \\(''" >> $OUT.new ++$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep -E "^Inode|in inode body|user.name \(" >> $OUT.new + status=$? + echo Exit status is $status >> $OUT.new + +-- +2.24.1 + Property changes on: head/sysutils/e2fsprogs/files/patch-0-tytso-3-tests-use-grep-E-for-better-portability-in-r_inline_.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/e2fsprogs/files/patch-e2fsck__unix.c =================================================================== --- head/sysutils/e2fsprogs/files/patch-e2fsck__unix.c (revision 528963) +++ head/sysutils/e2fsprogs/files/patch-e2fsck__unix.c (revision 528964) @@ -1,74 +1,65 @@ ---- e2fsck/unix.c.orig 2019-07-15 01:03:14 UTC +--- e2fsck/unix.c.orig 2020-03-21 04:24:04 UTC +++ e2fsck/unix.c @@ -9,8 +9,6 @@ * %End-Header% */ -#define _XOPEN_SOURCE 600 /* for inclusion of sa_handler in Solaris */ - #include "config.h" #include #ifdef HAVE_STDLIB_H -@@ -37,7 +35,7 @@ extern int optind; - #include - #endif - #ifdef HAVE_MALLOC_H --#include -+#include - #endif - #ifdef HAVE_SYS_TYPES_H - #include @@ -602,6 +600,24 @@ static int e2fsck_update_progress(e2fsck_t ctx, int pa return 0; } +static int e2fsck_progress_once(e2fsck_t ctx, int pass, unsigned long cur, unsigned long max) +{ + char buf[80]; + float percent; + + if (pass == 0) + return 0; + + percent = calc_percent(&e2fsck_tbl, pass, cur, max); + e2fsck_simple_progress(ctx, ctx->device_name, + percent, 0); + + printf("\n"); + ctx->progress = 0; + return 0; +} + + #define PATH_SET "PATH=/sbin" /* @@ -635,6 +651,17 @@ static void signal_progress_on(int sig EXT2FS_ATTR((un ctx->progress = e2fsck_update_progress; } +static void signal_progress_now(int sig EXT2FS_ATTR((unused))) +{ + e2fsck_t ctx = e2fsck_global_ctx; + + if (!ctx) + return; + + ctx->progress = e2fsck_progress_once; + ctx->progress_fd = 0; +} + static void signal_progress_off(int sig EXT2FS_ATTR((unused))) { e2fsck_t ctx = e2fsck_global_ctx; @@ -1111,6 +1138,10 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t sigaction(SIGUSR1, &sa, 0); sa.sa_handler = signal_progress_off; sigaction(SIGUSR2, &sa, 0); + sa.sa_handler = signal_progress_now; + if (!getenv("e2fsprogs_inhibit_SIGINFO")) { + sigaction(SIGINFO, &sa, 0); + } #endif /* Update our PATH to include /sbin if we need to run badblocks */ Index: head/sysutils/e2fsprogs/files/patch-lib__uuid__gen_uuid.c =================================================================== --- head/sysutils/e2fsprogs/files/patch-lib__uuid__gen_uuid.c (revision 528963) +++ head/sysutils/e2fsprogs/files/patch-lib__uuid__gen_uuid.c (revision 528964) @@ -1,39 +1,57 @@ ---- lib/uuid/gen_uuid.c.orig 2018-03-25 02:42:47 UTC +--- lib/uuid/gen_uuid.c.orig 2020-03-21 04:24:04 UTC +++ lib/uuid/gen_uuid.c @@ -94,6 +94,7 @@ #ifdef HAVE_SYS_RESOURCE_H #include #endif +#include #include "uuidP.h" #include "uuidd.h" -@@ -300,6 +301,28 @@ static int get_node_id(unsigned char *no +@@ -300,6 +301,28 @@ static int get_node_id(unsigned char *node_id) } } close(sd); +#else + struct ifaddrs *ifaddrsp, *ifaddrp; + unsigned char *a; + + if (getifaddrs(&ifaddrsp) < 0) + return -1; + for (ifaddrp = ifaddrsp; ifaddrp != NULL; ifaddrp = ifaddrp->ifa_next) + { + if (ifaddrp->ifa_addr == NULL) + continue; + if (ifaddrp->ifa_addr->sa_family != AF_LINK) + continue; + a = LLADDR((struct sockaddr_dl *)ifaddrp->ifa_addr); + if (!a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5]) + continue; + if (node_id) { + memcpy(node_id, a, 6); + freeifaddrs(ifaddrsp); + return 1; + } + } + freeifaddrs(ifaddrsp); #endif return 0; } +@@ -484,7 +507,7 @@ static void close_all_fds(void) + } + #endif /* defined(USE_UUIDD) && defined(HAVE_SYS_UN_H) */ + +-#if __GNUC_PREREQ (4, 6) ++#if __GNUC_PREREQ__ (4, 6) + #pragma GCC diagnostic push + #if !defined(USE_UUIDD) || !defined(HAVE_SYS_UN_H) + #pragma GCC diagnostic ignored "-Wunused-parameter" +@@ -572,7 +595,7 @@ fail: + #endif + return -1; + } +-#if __GNUC_PREREQ (4, 6) ++#if __GNUC_PREREQ__ (4, 6) + #pragma GCC diagnostic pop + #endif + Index: head/sysutils/e2fsprogs/files/patch-misc_e2fuzz.c =================================================================== --- head/sysutils/e2fsprogs/files/patch-misc_e2fuzz.c (nonexistent) +++ head/sysutils/e2fsprogs/files/patch-misc_e2fuzz.c (revision 528964) @@ -0,0 +1,13 @@ +--- misc/e2fuzz.c.orig 2020-03-23 08:29:36 UTC ++++ misc/e2fuzz.c +@@ -278,8 +278,8 @@ static int process_fs(const char *fsname) + c |= 0x80; + if (verbose) + printf("Corrupting byte %lld in block %lld to 0x%x\n", +- off % fs->blocksize, +- off / fs->blocksize, c); ++ (long long)off % fs->blocksize, ++ (long long)off / fs->blocksize, c); + if (dryrun) + continue; + #ifdef HAVE_PWRITE64 Property changes on: head/sysutils/e2fsprogs/files/patch-misc_e2fuzz.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property