Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pax patch and PKGBUILD
From eefac5786d01f1c3c4660cb218eb380eb19894a7 Mon Sep 17 00:00:00 2001
From: Noel Kuntze <noel@familie-kuntze.de>
Date: Fri, 21 Jul 2017 16:39:50 +0200
Subject: [PATCH] Fix implicit fallthrough in src/options.c
---
pax-3.4/src/options.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pax-3.4/src/options.c b/pax-3.4/src/options.c
index e30a877..18c5266 100644
--- a/pax-3.4/src/options.c
+++ b/pax-3.4/src/options.c
@@ -722,8 +722,10 @@ tar_options (int argc, char **argv)
pmtime = 0;
break;
case 'o':
- if (opt_add ("write_opt=nodir") < 0)
+ if (opt_add ("write_opt=nodir") < 0) {
tar_usage ();
+ }
+ break;
case 'O':
Oflag = 1;
break;
--
2.13.3
# Contributor: Campbell Barton <ideasman42@gmail.com>
# Maintainer: Pablo Lezaeta <prflr88@gmail.com>
pkgname=pax
pkgver=3.4
pkgrel=8
pkgdesc="The POSIX standard archive tool, supporting the two most common forms of standard Unix archive (backup) files - CPIO and TAR."
arch=("i686" "x86_64")
url="http://downloads.yoctoproject.org/mirror/sources"
license=("BSD")
depends=("glibc")
#makedepends=()
provides=("pax")
conflicts=("pax")
#replaces=()
#backup=()
#options=()
#install=
source=("http://downloads.yoctoproject.org/mirror/sources/$pkgname-$pkgver.tar.bz2"
"001-pax-3.4_fix_for_compile_with_gcc-4.6.0.patch"
"002-pax-3.4_fix_for_x32.patch"
"003-pax-3.0_unuse_warn.patch"
"004-pax-3.0_PATHMAX.patch"
"005-pax-3.4_abs100.patch"
"006-pax-3.4_rdtruncate.patch"
"007-pax-3.4_fix_for_compile_with_gcc-6.1.patch"
"008-Fix-implicit-fallthrough-in-src-options.c"
)
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -Np1 -i "${srcdir}/001-pax-3.4_fix_for_compile_with_gcc-4.6.0.patch"
patch -Np1 -i "${srcdir}/002-pax-3.4_fix_for_x32.patch"
patch -Np0 -i "${srcdir}/003-pax-3.0_unuse_warn.patch"
patch -Np1 -i "${srcdir}/004-pax-3.0_PATHMAX.patch"
patch -Np1 -i "${srcdir}/005-pax-3.4_abs100.patch"
patch -Np1 -i "${srcdir}/006-pax-3.4_rdtruncate.patch"
patch -p1 -i "${srcdir}/007-pax-3.4_fix_for_compile_with_gcc-6.1.patch"
patch -Np2 -i "${srcdir}/008-Fix-implicit-fallthrough-in-src-options.c"
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
--bindir=/usr/bin --sbindir=/usr/bin
make
}
package(){
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}/" libdir=/usr/lib libexecdir=/usr/lib \
bindir=/usr/bin sbindir=/usr/bin install
install -D -m644 "COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
sha256sums=('ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b'
'45d08ba749e473525bd4882bfdaf2f16b2ab5ef97413d678e042874e2ce4b70b'
'7b244542dcbc53f1e78ce1c57af401846ff1ec2269195f321ed2b2d9bf297f2d'
'b67343324bef2a65b1be0f7bf2167c3a8d208ac2f1bdab6349562f1d73fda3b9'
'50987ce7bef75dc670c4ba81d482bd586fc0bf0944234a5fb5e9c9451168939b'
'c515b529601aa2a431b964afe291802e55fdd426b3a6cfb87ae74fb3fb8b70f9'
'30a6c084600c47af73a988abf8d4514e1766cee36f1efedb5a76772bf3b2c793'
'82a7d29126193e902a2f0d5ba6f790502df3591fd28b09af7c49eec0295cab1e'
'c0137f7894516fc9234df4bd5ed9bd16859b50f160b696e02dd2d0c1eab58150')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment