aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormandree <mandree@FreeBSD.org>2017-08-27 20:21:09 +0800
committermandree <mandree@FreeBSD.org>2017-08-27 20:21:09 +0800
commit0c6d89c9208969d56f1d92d30d2767b62459ea36 (patch)
tree19f2dd4fdef72517865f4cae3d33cc0d2d1119f7
parent7e37f4d092228ef207bbc6ec6751fcd89ba94eda (diff)
downloadfreebsd-ports-gnome-0c6d89c9208969d56f1d92d30d2767b62459ea36.tar.gz
freebsd-ports-gnome-0c6d89c9208969d56f1d92d30d2767b62459ea36.tar.zst
freebsd-ports-gnome-0c6d89c9208969d56f1d92d30d2767b62459ea36.zip
Fix "invalid argument" regression.
e2fsprogs v1.43.4 and .5 appear to attempt unaligned writes to disk devices, which causes "invalid argument" errors and failures. Patch unix_io.c to always obtain the alignment requirements on FreeBSD, so that e2fsprogs uses its own write buffers and read- modify-write cycles when writing only parts of a block. Bump PORTREVISION, as crucial executables and libs change. While here, bump self-test requirement to FreeBSD >= 12, since the maintainer has tested these on 11.0/11.1 amd64/i386. Reported by: Artyon Mirgorodsky (in private)
-rw-r--r--sysutils/e2fsprogs/Makefile4
-rw-r--r--sysutils/e2fsprogs/files/patch-lib__ext2fs__unix_io.c19
2 files changed, 21 insertions, 2 deletions
diff --git a/sysutils/e2fsprogs/Makefile b/sysutils/e2fsprogs/Makefile
index c68ce417aef9..671bea906fbf 100644
--- a/sysutils/e2fsprogs/Makefile
+++ b/sysutils/e2fsprogs/Makefile
@@ -3,7 +3,7 @@
PORTNAME= e2fsprogs
PORTVERSION= 1.43.5
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES?= sysutils
MASTER_SITES= KERNEL_ORG/linux/kernel/people/tytso/${PORTNAME}/v${PORTVERSION}
@@ -137,7 +137,7 @@ post-patch::
.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)))
+.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
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..7839d1a217cd
--- /dev/null
+++ b/sysutils/e2fsprogs/files/patch-lib__ext2fs__unix_io.c
@@ -0,0 +1,19 @@
+commit 649dbee84cf208244db7195d40e7fe57ddbea57a
+Author: Matthias Andree <matthias.andree@gmx.de>
+Date: Sun Aug 27 14:09:52 2017 +0200
+
+ Always obtain alignment on FreeBSD.
+
+diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
+index 64141954..65f237ef 100644
+--- ./lib/ext2fs/unix_io.c
++++ ./lib/ext2fs/unix_io.c
+@@ -636,7 +636,7 @@ static errcode_t unix_open_channel(const char *name, int fd,
+ #endif
+
+ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+- if (io->flags & CHANNEL_FLAGS_BLOCK_DEVICE) {
++ {
+ int dio_align = ext2fs_get_dio_alignment(fd);
+
+ if (io->align < dio_align)