aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-02-22 09:05:26 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-02-22 09:05:26 +0000
commit8f3f057030b45d4334f6609ab9b8081c7fbcc622 (patch)
tree0d940d3ef4ae064d2cc5e4a59abab984906d0351 /main/abuild
parent1f5347b54d798340c91ffff6ee963af665ff3564 (diff)
downloadaports-8f3f057030b45d4334f6609ab9b8081c7fbcc622.tar.bz2
aports-8f3f057030b45d4334f6609ab9b8081c7fbcc622.tar.xz
main/abuild: hotfix for buildrepo
Diffstat (limited to 'main/abuild')
-rw-r--r--main/abuild/0001-buildrepo-parse-APKBUILDs-in-subshell.patch66
-rw-r--r--main/abuild/APKBUILD12
2 files changed, 74 insertions, 4 deletions
diff --git a/main/abuild/0001-buildrepo-parse-APKBUILDs-in-subshell.patch b/main/abuild/0001-buildrepo-parse-APKBUILDs-in-subshell.patch
new file mode 100644
index 0000000000..67c79ddf5d
--- /dev/null
+++ b/main/abuild/0001-buildrepo-parse-APKBUILDs-in-subshell.patch
@@ -0,0 +1,66 @@
+From d0e15dd5b60e76e30f42f0f9061fcce9f5a6d5a3 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 22 Feb 2013 09:03:13 +0000
+Subject: [PATCH] buildrepo: parse APKBUILDs in subshell
+
+so we dont leak functions like 'build' and other variables.
+---
+ buildrepo.in | 22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/buildrepo.in b/buildrepo.in
+index f1a5749..23cc61e 100755
+--- a/buildrepo.in
++++ b/buildrepo.in
+@@ -46,9 +46,9 @@ all_exist() {
+ done
+ return 0
+ }
+-
+-build() {
+- local repo="$1" i needbuild
++
++list_needbuild() {
++ local repo="$1" i=
+
+ cd "$aportsdir/$repo" || return 0
+
+@@ -78,14 +78,20 @@ build() {
+
+ # try link or copy the files if they are in the ports dir
+ if all_exist $pkgs; then
+- echo ">>> Copying " $pkgs
++ echo ">>> Copying " $pkgs >&2
+ cp -p -l $pkgs "$repodir/$repo/$CARCH"/ 2>/dev/null \
+ || cp -p $pkgs "$repodir/$repo/$CARCH"/ \
+- || needbuild="$needbuild $i"
++ || echo "$i"
+ else
+- needbuild="$needbuild $i"
++ echo "$i"
+ fi
+ done
++}
++
++do_build() {
++ local repo="$1" i=
++ cd "$aportsdir/$repo" || return 0
++ local needbuild="$(list_needbuild $repo)"
+
+ # build the postponed packages if any
+ if [ -n "$needbuild" ]; then
+@@ -146,9 +152,9 @@ shift $(($OPTIND - 1))
+
+ while [ $# -gt 0 ]; do
+ if [ -n "$logprefix" ]; then
+- build $1 >$logprefix.$1.log 2>&1 || exit 1
++ do_build $1 >$logprefix.$1.log 2>&1 || exit 1
+ else
+- build $1 || exit 1
++ do_build $1 || exit 1
+ fi
+ deprepo="$deprepo $1"
+ shift
+--
+1.8.1.3
+
diff --git a/main/abuild/APKBUILD b/main/abuild/APKBUILD
index b286349364..d4819ba527 100644
--- a/main/abuild/APKBUILD
+++ b/main/abuild/APKBUILD
@@ -3,7 +3,7 @@ pkgdesc="Script to build Alpine Packages"
pkgname=abuild
pkgver=2.14.1
_ver=${pkgver%_git*}
-pkgrel=0
+pkgrel=1
url=http://git.alpinelinux.org/cgit/abuild/
depends="fakeroot file sudo pax-utils openssl apk-tools>=2.0.7-r1
abuildhelper curl libc-utils"
@@ -14,6 +14,7 @@ pkggroups="abuild"
arch="all"
license=GPL-2
source="http://git.alpinelinux.org/cgit/abuild/snapshot/abuild-$_ver.tar.bz2
+ 0001-buildrepo-parse-APKBUILDs-in-subshell.patch
"
_builddir="$srcdir/$pkgname-$_ver"
@@ -51,6 +52,9 @@ cpan() {
mv "$pkgdir"/usr/bin/apkbuild-cpan "$subpkgdir"/usr/bin/
}
-md5sums="ec7c8e453d4331ac20c164c263234f02 abuild-2.14.1.tar.bz2"
-sha256sums="e9ee3df70118f4f5eb6aca00570c8fb8fb5cf79ed08eb653929116384af77c35 abuild-2.14.1.tar.bz2"
-sha512sums="3eb14b4d4a104c459a7689d862e9efc29b0a5585101af25604248ad6453c7538c56bfe59f4250e3c56357db37dbf7c04115338c55a4ac0231bb3a61545a83cdf abuild-2.14.1.tar.bz2"
+md5sums="ec7c8e453d4331ac20c164c263234f02 abuild-2.14.1.tar.bz2
+d44821805530e9e57a4e27f8fe7f2970 0001-buildrepo-parse-APKBUILDs-in-subshell.patch"
+sha256sums="e9ee3df70118f4f5eb6aca00570c8fb8fb5cf79ed08eb653929116384af77c35 abuild-2.14.1.tar.bz2
+d30ff115fe3595c1dbc8efaeb13233527148ac72c966521f04b9c166a5cceee3 0001-buildrepo-parse-APKBUILDs-in-subshell.patch"
+sha512sums="3eb14b4d4a104c459a7689d862e9efc29b0a5585101af25604248ad6453c7538c56bfe59f4250e3c56357db37dbf7c04115338c55a4ac0231bb3a61545a83cdf abuild-2.14.1.tar.bz2
+775f1ae3128b4083b33c162e572ce2ef438385f5a40145e719331feb60e10e6ad4d0d2c9a9c7f639a7bd53bb01d93b6e23de030b2a22916f275fcaa1fd34e043 0001-buildrepo-parse-APKBUILDs-in-subshell.patch"