svn commit: r448819 - in head/sysutils/e2fsprogs: . files

Matthias Andree mandree at FreeBSD.org
Sun Aug 27 12:21:10 UTC 2017


Author: mandree
Date: Sun Aug 27 12:21:09 2017
New Revision: 448819
URL: https://svnweb.freebsd.org/changeset/ports/448819

Log:
  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)

Added:
  head/sysutils/e2fsprogs/files/patch-lib__ext2fs__unix_io.c   (contents, props changed)
Modified:
  head/sysutils/e2fsprogs/Makefile

Modified: head/sysutils/e2fsprogs/Makefile
==============================================================================
--- head/sysutils/e2fsprogs/Makefile	Sun Aug 27 11:34:55 2017	(r448818)
+++ head/sysutils/e2fsprogs/Makefile	Sun Aug 27 12:21:09 2017	(r448819)
@@ -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
 

Added: head/sysutils/e2fsprogs/files/patch-lib__ext2fs__unix_io.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/e2fsprogs/files/patch-lib__ext2fs__unix_io.c	Sun Aug 27 12:21:09 2017	(r448819)
@@ -0,0 +1,19 @@
+commit 649dbee84cf208244db7195d40e7fe57ddbea57a
+Author: Matthias Andree <matthias.andree at 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)


More information about the svn-ports-all mailing list