aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-07-04 15:07:45 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-07-04 15:07:45 +0000
commit1ab89daa7c0d4b46230a2608f04151214a266101 (patch)
treea6afe9c935b38f957d28408472d6d675d79769c4 /main
parente1799b5dc9cb04dd96aa51e1ccee832935c20ae6 (diff)
downloadaports-1ab89daa7c0d4b46230a2608f04151214a266101.tar.bz2
aports-1ab89daa7c0d4b46230a2608f04151214a266101.tar.xz
main/alpine-conf: lbu: do not use xargs
ref #1240
Diffstat (limited to 'main')
-rw-r--r--main/alpine-conf/0001-lbu-do-not-use-xargs.patch65
-rw-r--r--main/alpine-conf/APKBUILD6
2 files changed, 69 insertions, 2 deletions
diff --git a/main/alpine-conf/0001-lbu-do-not-use-xargs.patch b/main/alpine-conf/0001-lbu-do-not-use-xargs.patch
new file mode 100644
index 0000000000..42dac49861
--- /dev/null
+++ b/main/alpine-conf/0001-lbu-do-not-use-xargs.patch
@@ -0,0 +1,65 @@
+From 15245c4a0eb62b0e1bcbac5063391e0d57a53799 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 4 Jul 2012 08:09:21 +0200
+Subject: [PATCH] lbu: do not use xargs
+
+xargs will execute the command twice if the buffer becomes long enough.
+This will break tar.
+
+We also use -z instead of piping via gzip while here.
+
+ref #1240
+---
+ lbu.in | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/lbu.in b/lbu.in
+index 67ad578..3fa157e 100644
+--- a/lbu.in
++++ b/lbu.in
+@@ -281,10 +281,6 @@ _gen_filelist() {
+ apk audit --backup --quiet --recursive
+ }
+
+-_gen_filelist_0() {
+- _gen_filelist | tr '\n' '\0'
+-}
+-
+ cmd_package() {
+ local pkg="$1"
+ local rc=0
+@@ -311,7 +307,7 @@ cmd_package() {
+
+ tmppkg="$tmpdir/$(basename $pkg)"
+
+- local tar_create="tar -c --no-recursion"
++ local tar_create="tar -c --no-recursion -T -"
+
+ cd "${ROOT:-/}"
+ # remove old package.list
+@@ -325,19 +321,17 @@ cmd_package() {
+ echo "Archiving the following files:" >&2
+ # we dont want to mess the tar output with the
+ # password prompt. Lets get the tar output first.
+- _gen_filelist_0 | xargs -0 $tar_create -v > /dev/null
++ _gen_filelist | $tar_create -v > /dev/null
+ rc=$?
+ fi
+ if [ $rc -eq 0 ]; then
+ if [ -z "$ENCRYPTION" ]; then
+- _gen_filelist_0 | xargs -0 $tar_create \
+- | gzip -c >"$tmppkg"
++ _gen_filelist | $tar_create -z >"$tmppkg"
+ rc=$?
+ else
+ set -- enc "-$ENCRYPTION" -salt
+ [ -n "$PASSWORD" ] && set -- "$@" -pass pass:"$PASSWORD"
+- _gen_filelist_0 | xargs -0 $tar_create \
+- | gzip -c \
++ _gen_filelist | $tar_create -z \
+ | $OPENSSL "$@" > "$tmppkg"
+ rc=$?
+ fi
+--
+1.7.11.1
+
diff --git a/main/alpine-conf/APKBUILD b/main/alpine-conf/APKBUILD
index cbbffd128a..b2867c980b 100644
--- a/main/alpine-conf/APKBUILD
+++ b/main/alpine-conf/APKBUILD
@@ -1,11 +1,12 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-conf
pkgver=2.11.2
-pkgrel=0
+pkgrel=1
pkgdesc="Alpine configuration management scripts"
url=http://git.alpinelinux.org/cgit/$pkgname
depends="openrc"
source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
+ 0001-lbu-do-not-use-xargs.patch
"
arch="all"
@@ -36,4 +37,5 @@ package() {
ln -s lbu "$pkgdir"/sbin/lbu_$i
done
}
-md5sums="47e37f6211817acc12aa637798da0437 alpine-conf-2.11.2.tar.bz2"
+md5sums="47e37f6211817acc12aa637798da0437 alpine-conf-2.11.2.tar.bz2
+a49569f9eb9bfa630efaca4988bde07c 0001-lbu-do-not-use-xargs.patch"