aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2016-09-16 19:50:51 +0000
committerMatthias Andree <mandree@FreeBSD.org>2016-09-16 19:50:51 +0000
commit6ddee9b011ad0722e11cdfaf2ce831a54d70f426 (patch)
treed21b8e1b8f1981d13f01a4fb526ac3cc369ceb0f
parent50dad405b7e7395c62fe08fa30f4659a2bcd36b4 (diff)
downloadports-6ddee9b011ad0722e11cdfaf2ce831a54d70f426.tar.gz
ports-6ddee9b011ad0722e11cdfaf2ce831a54d70f426.zip
MFH: r418578 r418755 r418756 r418815 r418816 r418844 r418901 r419254 r421716 r421726 r421812 r421966
Since e2fsprogs 1.42.x and in fact anything before 1.43.3_3 in terms of FreeBSD's ports head/ trunk, and its full patch-lib_ext2fs_unix__io.c in particular, is deemed unsafe and can cause data corruption on FreeBSD 11 and newer (10.3 and older are deemed safe): Update to new upstream release 1.43.3, with a few additional fixes to the bounce-buffer I/O needed on FreeBSD 11 and newer where malloc() does not normally return page-aligned memory. Make set of self-tests configurable. Add Perl and GNU dd to build dependency list when needed so tests can pass in a poudriere build. Assorted other tweaks. Upstream's change log (please read all the way to and including 1.43): http://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.43.3 While here, refresh patches, and time-limit programs in self-test suite to 60 s CPU time each, to avoid runaway processes from stalling the self-tests for too long. Ignore SIGINFO during self-tests: In the FreeBSD-specific patch, when the environment variable e2fsprogs_inhibit_SIGINFO exists (whatever its content, even if empty), do NOT install the SIGINFO handler. Leverage this when running the self-tests. This is to avoid false negatives during the self-tests due to interspersed SIGINFO output redirected from stderr to the log files. Insist (by setting BROKEN conditionally) on anything that is FreeBSD 11 or newer, or non-i386/non-amd64, that the user runs at least the small self-tests. Revise option descriptions a bit. Approved by: ports-secteam (feld)
Notes
Notes: svn path=/branches/2016Q3/; revision=422268
-rw-r--r--misc/e2fsprogs-libblkid/Makefile4
-rw-r--r--sysutils/e2fsprogs/Makefile113
-rw-r--r--sysutils/e2fsprogs/distinfo5
-rw-r--r--sysutils/e2fsprogs/files/patch-e2fsck__unix.c14
-rw-r--r--sysutils/e2fsprogs/files/patch-lib__ext2fs__ext2_fs.h11
-rw-r--r--sysutils/e2fsprogs/files/patch-lib__ext2fs__tdb.c10
-rw-r--r--sysutils/e2fsprogs/files/patch-lib__ext2fs__tst_bitops.c4
-rw-r--r--sysutils/e2fsprogs/files/patch-lib__uuid__gen_uuid.c6
-rw-r--r--sysutils/e2fsprogs/files/patch-lib_blkid_getsize.c20
-rw-r--r--sysutils/e2fsprogs/files/patch-lib_ext2fs_unix__io.c60
-rw-r--r--sysutils/e2fsprogs/files/patch-misc__Makefile.in23
-rw-r--r--sysutils/e2fsprogs/files/patch-misc__tune2fs.c20
-rw-r--r--sysutils/e2fsprogs/files/patch-zzz-f449486d38
-rw-r--r--sysutils/e2fsprogs/pkg-plist2
14 files changed, 188 insertions, 142 deletions
diff --git a/misc/e2fsprogs-libblkid/Makefile b/misc/e2fsprogs-libblkid/Makefile
index 00a7e719617b..909221de0240 100644
--- a/misc/e2fsprogs-libblkid/Makefile
+++ b/misc/e2fsprogs-libblkid/Makefile
@@ -1,7 +1,7 @@
# Created by: Matthias Andree <matthias.andree@gmx.de>
# $FreeBSD$
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= misc devel
PKGNAMESUFFIX= -libblkid
@@ -12,7 +12,7 @@ LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid
CONFIGURE_ARGS= --enable-elf-shlibs
MASTERDIR= ${.CURDIR}/../../sysutils/e2fsprogs
-MAKE_ARGS= LIB_SUBDIRS=lib/blkid
+MAKE_ARGS= LIB_SUBDIRS=lib/blkid LDFLAGS_SHLIB=-L${LOCALBASE}/lib
USE_LDCONFIG= yes
ALL_TARGET= libs
INSTALL_TARGET= install install-shlibs
diff --git a/sysutils/e2fsprogs/Makefile b/sysutils/e2fsprogs/Makefile
index b9cc93d1cf72..4ca8c5559754 100644
--- a/sysutils/e2fsprogs/Makefile
+++ b/sysutils/e2fsprogs/Makefile
@@ -2,8 +2,8 @@
# $FreeBSD$
PORTNAME= e2fsprogs
-PORTVERSION= 1.42.13
-PORTREVISION?= 0
+PORTVERSION= 1.43.3
+PORTREVISION?= 3
CATEGORIES?= sysutils
MASTER_SITES= KERNEL_ORG/linux/kernel/people/tytso/${PORTNAME}/v${PORTVERSION}
@@ -20,7 +20,6 @@ USE_CSTD= gnu99
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--disable-fsck --disable-e2initrd-helper \
- --enable-quota \
--with-root-prefix='${PREFIX}'
CPPFLAGS+= -I${WRKSRC}/lib -I${LOCALBASE}/include # -D_EXT2_USE_C_VERSIONS
MAKE_ARGS+= LDFLAGS='${LDFLAGS} -L${LOCALBASE}/lib' pkgconfigdir='${PREFIX}/libdata/pkgconfig'
@@ -30,7 +29,19 @@ MAKE_ENV+= CHECK_CMD=@true
OPTIONS_DEFINE= DOCS NLS
OPTIONS_EXCLUDE+= EXAMPLES
-PORTDOCS= COPYING RELEASE-NOTES
+BUILD_DEPENDS+= gdd:sysutils/coreutils
+
+PORTDOCS= NOTICE README RELEASE-NOTES SUBMITTING-PATCHES
+
+OPTIONS_DEFINE= PARALLELTESTS
+OPTIONS_SINGLE= SELFTEST
+OPTIONS_SINGLE_SELFTEST= NOTESTS SMALLTESTS ALLTESTS
+OPTIONS_DEFAULT= SMALLTESTS
+SELFTEST_DESC= Choose which set of self-tests to run
+NOTESTS_DESC= Do not run any self-tests (only Tier-1 & DISCOURAGED)
+SMALLTESTS_DESC=Run tests that fit into 500 MB disk space (DEFAULT)
+ALLTESTS_DESC= Run most self-tests (requires more RAM & disk space)
+PARALLELTESTS_DESC= Run self-tests in parallel (requires more disk space)
post-extract:
@${CHMOD} u+w ${WRKSRC}/po/*.po ${WRKSRC}/po/*.pot \
@@ -50,6 +61,11 @@ MAKE_ARGS+= V=1
USES+= gettext iconv:build
.endif
+.if empty(PORT_OPTIONS:MNOTESTS) && ${MASTERDIR} == ${.CURDIR}
+USES+= perl5
+USE_PERL5= build
+.endif
+
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MNLS}
@@ -65,25 +81,84 @@ PLIST_SUB= NLS="@comment "
libintl=
.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/" ${WRKSRC}/tests/[a-t]_*/script
+ -e "s/ == 0/ = 0/" -e "s/tar x$$/tar xf -/" -e "s/\<dd\>/gdd/" \
+ ${WRKSRC}/tests/[a-z]_*/script
@${REINPLACE_CMD} -e 's/<malloc\.h>/<stdlib.h>/' ${WRKSRC}/*/*.c
-# disable f_mmp_garbage, fails on FreeBSD, and the resize*big_expand tests,
-# which are too unwieldy to run automatically (need too much free space).
-# f_extent_oobounds appears to have differences in screen output, reason
-# unclear.
-.for i in f_mmp_garbage m_bigjournal r_64bit_big_expand r_bigalloc_big_expand r_ext4_big_expand f_extent_oobounds
+.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
+# m_rootdir behaves erratically on 9.x and fails randomly,
+# but may succeed when run again. Disable for now.
+.if ${OSVERSION} < 1000000
+.for i in m_rootdir
+ @${MV} ${WRKSRC}/tests/${i} ${WRKSRC}/tests/disabled_test-${i}
+.endfor
+.endif
+.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} >= 1100000 || ((${ARCH} != i386) && (${ARCH} != amd64)))
+BROKEN=e2fsprogs has not been 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}/e2fsck && ${DO_MAKE_BUILD} prof_err.h
+ cd ${WRKSRC}/lib/support && ${DO_MAKE_BUILD} prof_err.h
+
+.if ${PORT_OPTIONS:MPARALLELTESTS}
+_CHECK_JOBS=${_MAKE_JOBS}
+.else
+_CHECK_JOBS=
+.endif
+
+.if !defined(TMPDIR)
+_checkaddargs=TMPDIR=${WRKDIR}/tmp
+.endif
post-build:
# Relink e2fsck statically - We need to make sure that tools for the root file
@@ -94,16 +169,15 @@ post-build:
&& ${MAKE_CMD} e2fsck \
STATIC_LIBS="../lib/libext2fs.a ../lib/libcom_err.a \
../lib/libblkid.a ../lib/libuuid.a" \
- LIBINTL=${libintl}
+ LIBINTL=${libintl} LIBMAGIC=/usr/lib/libmagic.a\ -lz
# 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 beyond libc and libgcc: "
+ @${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/libgcc(_s)?\.so\.' \
- | ${GREP} -v '^/lib/libc\.so\.' || :)"; \
+ | ${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
@@ -120,11 +194,15 @@ post-build:
# 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 to ${MAKE_CMD} below, this might break
+# do not add -j options unconditionally to ${MAKE_CMD} below, this might break
# due to excessive disk space use.
- cd ${WRKSRC}/tests && ${MKDIR} ${WRKDIR}/tmp && ${MAKE_CMD} check TMPDIR=${WRKDIR}/tmp \
+ cd ${WRKSRC}/tests && ulimit -t 60 && ${MKDIR} ${WRKDIR}/tmp && ${SETENV} e2fsprogs_inhibit_SIGINFO=1 ${MAKE_CMD} check ${_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:
${RM} -f ${STAGEDIR}${PREFIX}/sbin/uuidd
@@ -136,6 +214,7 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
.endfor
.endif
+#
# the next line closes .if ${MASTERDIR} == ${.CURDIR}
.endif
diff --git a/sysutils/e2fsprogs/distinfo b/sysutils/e2fsprogs/distinfo
index 94f1db91384b..907fb1b1176e 100644
--- a/sysutils/e2fsprogs/distinfo
+++ b/sysutils/e2fsprogs/distinfo
@@ -1,2 +1,3 @@
-SHA256 (e2fsprogs-1.42.13.tar.xz) = e16474b5a3a30f9197160c4b91bd48d5a463583049c0fcc405b6f0f7075aa0c7
-SIZE (e2fsprogs-1.42.13.tar.xz) = 4802740
+TIMESTAMP = 1473526034
+SHA256 (e2fsprogs-1.43.3.tar.xz) = 744ca4e9a8e6c943601b2744d1ae658e5f37d35b5ea5b1dea86985320bd87f37
+SIZE (e2fsprogs-1.43.3.tar.xz) = 5220304
diff --git a/sysutils/e2fsprogs/files/patch-e2fsck__unix.c b/sysutils/e2fsprogs/files/patch-e2fsck__unix.c
index 33265fa629ba..ad2a0eb87ed8 100644
--- a/sysutils/e2fsprogs/files/patch-e2fsck__unix.c
+++ b/sysutils/e2fsprogs/files/patch-e2fsck__unix.c
@@ -1,4 +1,4 @@
---- e2fsck/unix.c.orig 2014-08-12 18:19:37 UTC
+--- e2fsck/unix.c.orig 2016-09-02 04:17:32 UTC
+++ e2fsck/unix.c
@@ -9,8 +9,6 @@
* %End-Header%
@@ -9,7 +9,7 @@
#include "config.h"
#include <stdio.h>
#ifdef HAVE_STDLIB_H
-@@ -37,7 +35,7 @@
+@@ -37,7 +35,7 @@ extern int optind;
#include <sys/ioctl.h>
#endif
#ifdef HAVE_MALLOC_H
@@ -18,7 +18,7 @@
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
-@@ -590,6 +588,24 @@
+@@ -593,6 +591,24 @@ static int e2fsck_update_progress(e2fsck
return 0;
}
@@ -43,7 +43,7 @@
#define PATH_SET "PATH=/sbin"
/*
-@@ -622,6 +638,17 @@
+@@ -625,6 +641,17 @@ static void signal_progress_on(int sig E
ctx->progress = e2fsck_update_progress;
}
@@ -61,12 +61,14 @@
static void signal_progress_off(int sig EXT2FS_ATTR((unused)))
{
e2fsck_t ctx = e2fsck_global_ctx;
-@@ -1001,6 +1028,8 @@
+@@ -1062,6 +1089,10 @@ static errcode_t PRS(int argc, char *arg
sigaction(SIGUSR1, &sa, 0);
sa.sa_handler = signal_progress_off;
sigaction(SIGUSR2, &sa, 0);
+ sa.sa_handler = signal_progress_now;
-+ sigaction(SIGINFO, &sa, 0);
++ if (!getenv("e2fsprogs_inhibit_SIGINFO")) {
++ sigaction(SIGINFO, &sa, 0);
++ }
#endif
/* Update our PATH to include /sbin if we need to run badblocks */
diff --git a/sysutils/e2fsprogs/files/patch-lib__ext2fs__ext2_fs.h b/sysutils/e2fsprogs/files/patch-lib__ext2fs__ext2_fs.h
deleted file mode 100644
index 908293feb8a5..000000000000
--- a/sysutils/e2fsprogs/files/patch-lib__ext2fs__ext2_fs.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/ext2fs/ext2_fs.h.orig 2014-08-02 20:26:22 UTC
-+++ lib/ext2fs/ext2_fs.h
-@@ -461,7 +461,7 @@
-
- #define i_dir_acl i_size_high
-
--#if defined(__KERNEL__) || defined(__linux__)
-+#if defined(__KERNEL__) || defined(__linux__) || defined(__FreeBSD__)
- #define i_reserved1 osd1.linux1.l_i_reserved1
- #define i_frag osd2.linux2.l_i_frag
- #define i_fsize osd2.linux2.l_i_fsize
diff --git a/sysutils/e2fsprogs/files/patch-lib__ext2fs__tdb.c b/sysutils/e2fsprogs/files/patch-lib__ext2fs__tdb.c
deleted file mode 100644
index d17fc690b719..000000000000
--- a/sysutils/e2fsprogs/files/patch-lib__ext2fs__tdb.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- lib/ext2fs/tdb.c.orig 2014-06-25 19:19:40 UTC
-+++ lib/ext2fs/tdb.c
-@@ -36,7 +36,6 @@
- #define HAVE_UTIME_H
- #define HAVE_UTIME
- #endif
--#define _XOPEN_SOURCE 600
-
- #include "config.h"
- #include <unistd.h>
diff --git a/sysutils/e2fsprogs/files/patch-lib__ext2fs__tst_bitops.c b/sysutils/e2fsprogs/files/patch-lib__ext2fs__tst_bitops.c
index fe0425e1f80b..d6285d651187 100644
--- a/sysutils/e2fsprogs/files/patch-lib__ext2fs__tst_bitops.c
+++ b/sysutils/e2fsprogs/files/patch-lib__ext2fs__tst_bitops.c
@@ -1,6 +1,6 @@
---- lib/ext2fs/tst_bitops.c.orig 2014-06-25 19:19:15 UTC
+--- lib/ext2fs/tst_bitops.c.orig 2014-10-16 00:29:23 UTC
+++ lib/ext2fs/tst_bitops.c
-@@ -104,7 +104,7 @@
+@@ -104,7 +104,7 @@ int main(int argc, char **argv)
bigarray = malloc(1 << 29);
if (!bigarray) {
fprintf(stderr, "Failed to allocate scratch memory!\n");
diff --git a/sysutils/e2fsprogs/files/patch-lib__uuid__gen_uuid.c b/sysutils/e2fsprogs/files/patch-lib__uuid__gen_uuid.c
index 5be17abc6eac..1d077be3b615 100644
--- a/sysutils/e2fsprogs/files/patch-lib__uuid__gen_uuid.c
+++ b/sysutils/e2fsprogs/files/patch-lib__uuid__gen_uuid.c
@@ -1,6 +1,6 @@
---- lib/uuid/gen_uuid.c.orig 2014-07-03 14:33:48 UTC
+--- lib/uuid/gen_uuid.c.orig 2016-09-02 04:17:32 UTC
+++ lib/uuid/gen_uuid.c
-@@ -91,6 +91,7 @@
+@@ -92,6 +92,7 @@
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
@@ -8,7 +8,7 @@
#include "uuidP.h"
#include "uuidd.h"
-@@ -300,6 +301,28 @@
+@@ -301,6 +302,28 @@ static int get_node_id(unsigned char *no
}
}
close(sd);
diff --git a/sysutils/e2fsprogs/files/patch-lib_blkid_getsize.c b/sysutils/e2fsprogs/files/patch-lib_blkid_getsize.c
deleted file mode 100644
index 6ccf323f4c1f..000000000000
--- a/sysutils/e2fsprogs/files/patch-lib_blkid_getsize.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- lib/blkid/getsize.c.orig 2014-08-02 20:26:22 UTC
-+++ lib/blkid/getsize.c
-@@ -127,7 +127,7 @@ blkid_loff_t blkid_get_dev_size(int fd)
- return (blkid_loff_t)this_floppy.size << 9;
- }
- #endif
--#ifdef HAVE_SYS_DISKLABEL_H
-+#if defined(HAVE_SYS_DISKLABEL_H) && defined(DIOCGDINFO)
- {
- int part = -1;
- struct disklabel lab;
-@@ -154,7 +154,7 @@ blkid_loff_t blkid_get_dev_size(int fd)
- return pp->p_size << 9;
- }
- }
--#endif /* HAVE_SYS_DISKLABEL_H */
-+#endif /* defined(HAVE_SYS_DISKLABEL_H) && defined(DIOCGDINFO) */
- {
- #if defined(HAVE_FSTAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED)
- struct stat64 st;
diff --git a/sysutils/e2fsprogs/files/patch-lib_ext2fs_unix__io.c b/sysutils/e2fsprogs/files/patch-lib_ext2fs_unix__io.c
new file mode 100644
index 000000000000..4e7ae25ab81d
--- /dev/null
+++ b/sysutils/e2fsprogs/files/patch-lib_ext2fs_unix__io.c
@@ -0,0 +1,60 @@
+--- lib/ext2fs/unix_io.c.orig 2016-09-02 04:17:32 UTC
++++ lib/ext2fs/unix_io.c
+@@ -188,16 +188,24 @@ static errcode_t raw_read_blk(io_channel
+ * The buffer or size which we're trying to read isn't aligned
+ * to the O_DIRECT rules, so we need to do this the hard way...
+ */
+- while (size > 0) {
+- actual = read(data->dev, data->bounce, channel->block_size);
+- if (actual != channel->block_size)
+- goto short_read;
+- actual = size;
+- if (size > channel->block_size)
+- actual = channel->block_size;
+- memcpy(buf, data->bounce, actual);
+- size -= actual;
+- buf += actual;
++ {
++ ssize_t really_read = 0;
++ while (size > 0) {
++ actual = read(data->dev, data->bounce, channel->block_size);
++ if (actual != channel->block_size) {
++ actual = really_read;
++ buf -= really_read;
++ size += really_read;
++ goto short_read;
++ }
++ actual = size;
++ if (size > channel->block_size)
++ actual = channel->block_size;
++ memcpy(buf, data->bounce, actual);
++ really_read += actual;
++ size -= actual;
++ buf += actual;
++ }
+ }
+ return 0;
+
+@@ -283,8 +291,12 @@ static errcode_t raw_write_blk(io_channe
+ actual = read(data->dev, data->bounce,
+ channel->block_size);
+ if (actual != channel->block_size) {
+- retval = EXT2_ET_SHORT_READ;
+- goto error_out;
++ if (actual >= 0) {
++ memset(data->bounce + actual, 0, channel->block_size - actual);
++ } else {
++ retval = EXT2_ET_SHORT_READ;
++ goto error_out;
++ }
+ }
+ }
+ actual = size;
+@@ -300,6 +312,7 @@ static errcode_t raw_write_blk(io_channe
+ goto short_write;
+ size -= actual;
+ buf += actual;
++ location += actual;
+ }
+ return 0;
+
diff --git a/sysutils/e2fsprogs/files/patch-misc__Makefile.in b/sysutils/e2fsprogs/files/patch-misc__Makefile.in
index c51c77f10825..5155ec9bf777 100644
--- a/sysutils/e2fsprogs/files/patch-misc__Makefile.in
+++ b/sysutils/e2fsprogs/files/patch-misc__Makefile.in
@@ -1,27 +1,28 @@
---- misc/Makefile.in.orig 2014-08-02 23:41:18 UTC
+--- misc/Makefile.in.orig 2016-09-02 04:52:46 UTC
+++ misc/Makefile.in
-@@ -28,15 +28,15 @@
+@@ -34,16 +34,16 @@ INSTALL = @INSTALL@
SPROGS= mke2fs badblocks tune2fs dumpe2fs $(BLKID_PROG) logsave \
$(E2IMAGE_PROG) @FSCK_PROG@ e2undo
--USPROGS= mklost+found filefrag e2freefrag $(UUIDD_PROG) $(E4DEFRAG_PROG)
-+USPROGS= mklost+found e2freefrag $(UUIDD_PROG) $(E4DEFRAG_PROG)
+-USPROGS= mklost+found filefrag e2freefrag $(UUIDD_PROG) \
++USPROGS= mklost+found e2freefrag $(UUIDD_PROG) \
+ $(E4DEFRAG_PROG) $(E4CRYPT_PROG) $(FUSE_PROG)
SMANPAGES= tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
e2label.8 $(FINDFS_MAN) $(BLKID_MAN) $(E2IMAGE_MAN) \
- logsave.8 filefrag.8 e2freefrag.8 e2undo.8 \
-- $(UUIDD_MAN) $(E4DEFRAG_MAN) @FSCK_MAN@
+- $(UUIDD_MAN) $(E4DEFRAG_MAN) $(E4CRYPT_MAN) @FSCK_MAN@
+ logsave.8 e2freefrag.8 e2undo.8 \
-+ $(E4DEFRAG_MAN) @FSCK_MAN@
++ $(E4DEFRAG_MAN) $(E4CRYPT_MAN) @FSCK_MAN@
FMANPAGES= mke2fs.conf.5 ext4.5
-UPROGS= chattr lsattr @UUID_CMT@ uuidgen
-UMANPAGES= chattr.1 lsattr.1 @UUID_CMT@ uuidgen.1
+UPROGS= chattr lsattr
+UMANPAGES= chattr.1 lsattr.1
+ UMANPAGES+= @FUSE_CMT@ fuse2fs.1
LPROGS= @E2INITRD_PROG@
-
-@@ -127,14 +127,14 @@
+@@ -144,14 +144,14 @@ profiled:
mke2fs.conf: $(srcdir)/mke2fs.conf.in
if test -f $(srcdir)/mke2fs.conf.custom.in ; then \
@@ -37,9 +38,9 @@
- $(Q) $(AWK) -f $(srcdir)/profile-to-c.awk < mke2fs.conf \
+ $(Q) $(AWK) -f $(srcdir)/profile-to-c.awk < mke2fs.conf.dist \
> default_profile.c
- profile.o:
- $(E) " CC $<"
-@@ -515,34 +515,9 @@
+ findsuper: findsuper.o
+ $(E) " LD $@"
+@@ -577,34 +577,9 @@ install: all $(SMANPAGES) $(UMANPAGES) i
(cd $(DESTDIR)$(man5dir); \
$(LN) $(LINK_INSTALL_FLAGS) ext4.5 $$i.5); \
done
diff --git a/sysutils/e2fsprogs/files/patch-misc__tune2fs.c b/sysutils/e2fsprogs/files/patch-misc__tune2fs.c
deleted file mode 100644
index ab7e91cf17d0..000000000000
--- a/sysutils/e2fsprogs/files/patch-misc__tune2fs.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- misc/tune2fs.c.orig 2014-08-02 20:26:22 UTC
-+++ misc/tune2fs.c
-@@ -25,7 +25,6 @@
- * 94/03/06 - Added the checks interval from Uwe Ohse (uwe@tirka.gun.de)
- */
-
--#define _XOPEN_SOURCE 600 /* for inclusion of strptime() */
- #include "config.h"
- #include <fcntl.h>
- #include <grp.h>
-@@ -52,6 +51,9 @@
- #include <libgen.h>
- #include <limits.h>
-
-+#include <netinet/in.h>
-+#include <strings.h>
-+
- #include "ext2fs/ext2_fs.h"
- #include "ext2fs/ext2fs.h"
- #include "et/com_err.h"
diff --git a/sysutils/e2fsprogs/files/patch-zzz-f449486d b/sysutils/e2fsprogs/files/patch-zzz-f449486d
deleted file mode 100644
index f3e49ae71d0c..000000000000
--- a/sysutils/e2fsprogs/files/patch-zzz-f449486d
+++ /dev/null
@@ -1,38 +0,0 @@
-From f449486d631987983b4275d246b7bbbb551f3235 Mon Sep 17 00:00:00 2001
-From: Andreas Dilger <adilger@dilger.ca>
-Date: Mon, 30 Nov 2015 12:09:44 -0500
-Subject: libext2fs: fix tst_badblocks buffer overrun
-
-The test2[] array is not 0-terminated and the create_test_list() for
-loop does not terminate properly at the end of this array, but
-continues until it hits the 0 at the end of test3[].
-
-Reported-by: Hanno Boeck <hanno@hboeck.de>
-Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=104311
-Signed-off-by: Andreas Dilger <adilger@dilger.ca>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
----
- lib/ext2fs/tst_badblocks.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/lib/ext2fs/tst_badblocks.c b/lib/ext2fs/tst_badblocks.c
-index 3b39ef1..c685f33 100644
---- ./lib/ext2fs/tst_badblocks.c
-+++ ./lib/ext2fs/tst_badblocks.c
-@@ -30,11 +30,11 @@
- #define DEL_BLK 0x0002
-
- blk_t test1[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0 };
--blk_t test2[] = { 11, 10, 9, 8, 7, 6, 5, 4, 3, 3, 2, 1 };
-+blk_t test2[] = { 11, 10, 9, 8, 7, 6, 5, 4, 3, 3, 2, 1, 0 };
- blk_t test3[] = { 3, 1, 4, 5, 9, 2, 7, 10, 5, 6, 10, 8, 0 };
- blk_t test4[] = { 20, 50, 12, 17, 13, 2, 66, 23, 56, 0 };
- blk_t test4a[] = {
-- 20, 1,
-+ 20, 1,
- 50, 1,
- 3, 0,
- 17, 1,
---
-cgit v0.11.2
-
diff --git a/sysutils/e2fsprogs/pkg-plist b/sysutils/e2fsprogs/pkg-plist
index 92b4416e3153..b9346c3affb7 100644
--- a/sysutils/e2fsprogs/pkg-plist
+++ b/sysutils/e2fsprogs/pkg-plist
@@ -63,10 +63,12 @@ sbin/tune2fs
%%NLS%%share/locale/eo/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/es/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/fr/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/id/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/it/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/nl/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/pl/LC_MESSAGES/e2fsprogs.mo
+%%NLS%%share/locale/sr/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/sv/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/tr/LC_MESSAGES/e2fsprogs.mo
%%NLS%%share/locale/uk/LC_MESSAGES/e2fsprogs.mo