app-arch/afio: Fix control file handling (#651294 by John R. Graham)
authorPacho Ramos <pacho@gentoo.org>
Sat, 20 Oct 2018 15:21:17 +0000 (17:21 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sat, 20 Oct 2018 16:35:34 +0000 (18:35 +0200)
Closes: https://bugs.gentoo.org/651294
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

app-arch/afio/afio-2.5.1-r2.ebuild [new file with mode: 0644]
app-arch/afio/files/afio-2.5.1-control-file-warning-fix.patch [new file with mode: 0644]

diff --git a/app-arch/afio/afio-2.5.1-r2.ebuild b/app-arch/afio/afio-2.5.1-r2.ebuild
new file mode 100644 (file)
index 0000000..fced741
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit toolchain-funcs
+
+DESCRIPTION="Afio creates cpio-format archives."
+HOMEPAGE="http://members.chello.nl/k.holtman/afio.html https://github.com/kholtman/afio"
+SRC_URI="http://members.chello.nl/k.holtman/${P}.tgz"
+
+LICENSE="Artistic LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.5.1-fix-build-system.patch
+       "${FILESDIR}"/${PN}-2.5.1-control-file-warning-fix.patch
+)
+
+src_configure() {
+       tc-export CC
+}
+
+src_install() {
+       dobin "${PN}"
+       doman "${PN}.1"
+       dodoc ANNOUNCE-* HISTORY README SCRIPTS
+
+       local i
+       for i in {1..4}; do
+               docinto "script${i}"
+               dodoc -r "script${i}"/.
+       done
+}
diff --git a/app-arch/afio/files/afio-2.5.1-control-file-warning-fix.patch b/app-arch/afio/files/afio-2.5.1-control-file-warning-fix.patch
new file mode 100644 (file)
index 0000000..f1c93c8
--- /dev/null
@@ -0,0 +1,29 @@
+Only in b: 1
+diff -ubBr a/afio.c b/afio.c
+--- a/afio.c   2018-03-23 09:16:07.230401966 -0400
++++ b/afio.c   2018-03-23 09:20:05.614421756 -0400
+@@ -3724,7 +3724,8 @@
+       
+       /* ASX check if file changed between the begining 
+          and end of the backup */
+-      if (*fsname)
++        /* if *fsname==0, it was a control file, so do not check then */
++      if (*fsname!=0)
+       {
+           struct stat st;
+           /* I must check fsname ! 
+@@ -3739,13 +3740,10 @@
+               if (st.st_mtime!=sb.sb_mtime)
+               {
+                   warn (fsname, "File was modified during its backup");
++                  if(index(ignorewarnings,(int)'d')) warnings--;
+               }
+           }
+       }
+-      else
+-      {
+-          warn (name, "ASX no fsname for this name ??");
+-        }
+       
+       if(aflag && *fsname && ((sb.sb_mode & S_IFMT)==S_IFREG))
+       {