From owner-svn-ports-head@freebsd.org Sun Aug 27 12:21:10 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77FF3DEF086; Sun, 27 Aug 2017 12:21:10 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 549E97066D; Sun, 27 Aug 2017 12:21:10 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7RCL91S037111; Sun, 27 Aug 2017 12:21:09 GMT (envelope-from mandree@FreeBSD.org) Received: (from mandree@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7RCL9kL037109; Sun, 27 Aug 2017 12:21:09 GMT (envelope-from mandree@FreeBSD.org) Message-Id: <201708271221.v7RCL9kL037109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mandree set sender to mandree@FreeBSD.org using -f From: Matthias Andree Date: Sun, 27 Aug 2017 12:21:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r448819 - in head/sysutils/e2fsprogs: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mandree X-SVN-Commit-Paths: in head/sysutils/e2fsprogs: . files X-SVN-Commit-Revision: 448819 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Aug 2017 12:21:10 -0000 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 +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)