aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-07-12 08:46:08 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-07-12 09:00:20 +0000
commit64a5509a0fd74c60c724cd2c93c72d4193e4c2bd (patch)
treedfd5c017e5d5cbb4d49cdcb0a8da18fad11fc1fd /main/abuild
parent497d07575e8ab0be847eb29c47e512bd47a1ccac (diff)
downloadaports-64a5509a0fd74c60c724cd2c93c72d4193e4c2bd.tar.bz2
aports-64a5509a0fd74c60c724cd2c93c72d4193e4c2bd.tar.xz
main/abuild: add patches from upstream
crosscompile fixes, fix download when checksum does not match
Diffstat (limited to 'main/abuild')
-rw-r--r--main/abuild/0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch33
-rw-r--r--main/abuild/0002-abuild-fix-cross-compilation-undeps.patch29
-rw-r--r--main/abuild/0003-abuild-perform-unzip-operations-quietly.patch27
-rw-r--r--main/abuild/0004-abuild-support-arch-all-armhf.patch36
-rw-r--r--main/abuild/0005-add-aarch64-architecture.patch24
-rw-r--r--main/abuild/0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch39
-rw-r--r--main/abuild/APKBUILD32
7 files changed, 216 insertions, 4 deletions
diff --git a/main/abuild/0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch b/main/abuild/0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch
new file mode 100644
index 0000000000..c67912d4ea
--- /dev/null
+++ b/main/abuild/0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch
@@ -0,0 +1,33 @@
+From 4bfb5c8fc102b074545d5be174213df0177d21fd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
+Date: Mon, 20 Jun 2016 11:11:12 +0200
+Subject: [PATCH 1/6] newapkbuild: redirect find(1) stderr to /dev/null
+
+If $sdir is not defined find writes an error message to stderr. For
+example when running:
+
+ newapkbuild -n foo -a foo
+
+You will see a find error message because no source url was provided.
+This commit silences any find error message. An alternative solution
+would be to not invoke find unless $sdir is set.
+---
+ newapkbuild.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/newapkbuild.in b/newapkbuild.in
+index d872bd3..54169cd 100644
+--- a/newapkbuild.in
++++ b/newapkbuild.in
+@@ -207,7 +207,7 @@ __EOF__
+
+ # Subpackage -dev is usually required only for C/C++. Since depends_dev
+ # confuses a lot people, remove it if there's no .h or .hpp file.
+- find "$sdir" -name "*.h" -o -name "*.hpp" -maxdepth 3 \
++ find "$sdir" -name "*.h" -o -name "*.hpp" -maxdepth 3 2>/dev/null \
+ | head -n 1 | grep -q ".*" \
+ || sed -i -e '/^depends_dev=.*/d' -e 's/\$depends_dev\s*//' APKBUILD
+
+--
+2.9.0
+
diff --git a/main/abuild/0002-abuild-fix-cross-compilation-undeps.patch b/main/abuild/0002-abuild-fix-cross-compilation-undeps.patch
new file mode 100644
index 0000000000..3135f618bd
--- /dev/null
+++ b/main/abuild/0002-abuild-fix-cross-compilation-undeps.patch
@@ -0,0 +1,29 @@
+From fd02387cc1c7efacd5d48d18a9d1d6b7c715c7ef Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Tue, 5 Jul 2016 17:27:31 +0300
+Subject: [PATCH 2/6] abuild: fix cross compilation undeps()
+
+"apk del" now returns error if the package name does not exist.
+Thus when cross compiling, always install the virtual
+.makedepends-$pkgname name for chroot also since undeps() will
+try to uninstall it always.
+---
+ abuild.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/abuild.in b/abuild.in
+index db82cfd..883c661 100644
+--- a/abuild.in
++++ b/abuild.in
+@@ -1812,7 +1812,7 @@ builddeps() {
+ --simulate --quiet $builddeps || return 1
+ $SUDO_APK add --repository "$abuildrepo" $apk_opt_wait \
+ --virtual .makedepends-$pkgname $builddeps || return 1
+- if [ -n "$hostdeps" ]; then
++ if cross_compiling; then
+ $SUDO_APK add --root "$CBUILDROOT" --repository "$abuildrepo" $apk_opt_wait \
+ --simulate --quiet $hostdeps || return 1
+ $SUDO_APK add --root "$CBUILDROOT" --repository "$abuildrepo" $apk_opt_wait \
+--
+2.9.0
+
diff --git a/main/abuild/0003-abuild-perform-unzip-operations-quietly.patch b/main/abuild/0003-abuild-perform-unzip-operations-quietly.patch
new file mode 100644
index 0000000000..e59026bb86
--- /dev/null
+++ b/main/abuild/0003-abuild-perform-unzip-operations-quietly.patch
@@ -0,0 +1,27 @@
+From 670fc1ae14eb4517cb971806a9608b22ef28ab39 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
+Date: Wed, 6 Jul 2016 12:23:22 +0200
+Subject: [PATCH 3/6] abuild: perform unzip operations quietly
+
+unzip(1) is verbose by default since we don't run tar(1) in verbose mode
+we should run unzip with -q for consistency.
+---
+ abuild.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/abuild.in b/abuild.in
+index 883c661..72f8978 100644
+--- a/abuild.in
++++ b/abuild.in
+@@ -410,7 +410,7 @@ default_unpack() {
+ unxz -c "$s" | tar -C "$srcdir" -x || return 1;;
+ *.zip)
+ msg "Unpacking $s..."
+- unzip "$s" -d "$srcdir" || return 1;;
++ unzip -q "$s" -d "$srcdir" || return 1;;
+ esac
+ done
+ }
+--
+2.9.0
+
diff --git a/main/abuild/0004-abuild-support-arch-all-armhf.patch b/main/abuild/0004-abuild-support-arch-all-armhf.patch
new file mode 100644
index 0000000000..76c929a0a1
--- /dev/null
+++ b/main/abuild/0004-abuild-support-arch-all-armhf.patch
@@ -0,0 +1,36 @@
+From 97d924dfed7284b103f588f009d63ec5891ba347 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Thu, 7 Jul 2016 11:39:03 +0300
+Subject: [PATCH 4/6] abuild: support arch="all !armhf"
+
+this allows blacklisting architectures instead of just
+whitelisting them. useful when more architectures comeabout.
+---
+ abuild.in | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/abuild.in b/abuild.in
+index 72f8978..49e2630 100644
+--- a/abuild.in
++++ b/abuild.in
+@@ -1607,7 +1607,16 @@ srcpkg() {
+
+ # return true if arch is supported or noarch
+ check_arch() {
+- list_has $CARCH $arch || [ "$arch" = "noarch" ] || [ "$arch" = "all" ]
++ local ret=1
++ local i
++ for i in $arch; do
++ case $i in
++ all | noarch) ret=0 ;;
++ "$CARCH") ret=0 ;;
++ "!$CARCH") return 1 ;;
++ esac
++ done
++ return $ret
+ }
+
+ # return true if libc is not masked in options
+--
+2.9.0
+
diff --git a/main/abuild/0005-add-aarch64-architecture.patch b/main/abuild/0005-add-aarch64-architecture.patch
new file mode 100644
index 0000000000..2a77ba0027
--- /dev/null
+++ b/main/abuild/0005-add-aarch64-architecture.patch
@@ -0,0 +1,24 @@
+From 580dd46c588ef71bc852d2b9a5bb4426a2c47665 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Fri, 8 Jul 2016 09:56:14 +0300
+Subject: [PATCH 5/6] add aarch64 architecture
+
+---
+ functions.sh.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/functions.sh.in b/functions.sh.in
+index c128e8d..1ba2d14 100644
+--- a/functions.sh.in
++++ b/functions.sh.in
+@@ -5,6 +5,7 @@ program=${0##*/}
+
+ hostspec_to_arch() {
+ case "$1" in
++ aarch64*-*-*-*) echo "aarch64" ;;
+ arm*-*-*-*eabi) echo "armel" ;;
+ armv6*-*-*-*eabihf) echo "armhf" ;;
+ armv7*-*-*-*eabihf) echo "armv7" ;;
+--
+2.9.0
+
diff --git a/main/abuild/0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch b/main/abuild/0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch
new file mode 100644
index 0000000000..84c560e7b8
--- /dev/null
+++ b/main/abuild/0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch
@@ -0,0 +1,39 @@
+From 90899669c2da9cce4b54851c45fb482e6950a876 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Fri, 8 Jul 2016 13:44:31 +0300
+Subject: [PATCH 6/6] abuild: rename distfile copy when checksum does not match
+
+The previous deletion of file did not work properly at all. Fix
+this instead to rename the file, so we keep the previous download.
+This allows builders to redownload upstream file if the checksum
+has been changed in aports.
+---
+ abuild.in | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/abuild.in b/abuild.in
+index 49e2630..d4614d1 100644
+--- a/abuild.in
++++ b/abuild.in
+@@ -247,11 +247,14 @@ sumcheck() {
+ if [ $? -ne 0 ]; then
+ endreturnval=1
+ is_remote $origin || continue
+- echo "Because the remote file above failed the ${algo}sum check it will be deleted."
++
++ local csum="${src:0:8}"
++ local file="$SRCDEST/$(filename_from_uri $origin)"
++
++ echo "Because the remote file above failed the ${algo}sum check it will be renamed."
+ echo "Rebuilding will cause it to re-download which in some cases may fix the problem."
+- file=`echo "$src" | sed 's/.*[ \t\n]\(.*\)/\1/'`
+- echo "Deleting: $file"
+- rm $file
++ echo "Renaming: ${file##*/} to ${file##*/}.$csum"
++ mv "$file" "$file.$csum"
+ fi
+ done
+ unset IFS
+--
+2.9.0
+
diff --git a/main/abuild/APKBUILD b/main/abuild/APKBUILD
index 7b59e8e04d..400e978cf9 100644
--- a/main/abuild/APKBUILD
+++ b/main/abuild/APKBUILD
@@ -2,7 +2,7 @@
pkgname=abuild
pkgver=2.27.2
_ver=${pkgver%_git*}
-pkgrel=0
+pkgrel=1
pkgdesc="Script to build Alpine Packages"
url="http://git.alpinelinux.org/cgit/abuild/"
arch="all"
@@ -20,6 +20,12 @@ subpackages="apkbuild-cpan:cpan apkbuild-gem-resolver:gems"
options="suid"
pkggroups="abuild"
source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz
+0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch
+0002-abuild-fix-cross-compilation-undeps.patch
+0003-abuild-perform-unzip-operations-quietly.patch
+0004-abuild-support-arch-all-armhf.patch
+0005-add-aarch64-architecture.patch
+0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch
"
_builddir="$srcdir/$pkgname-$_ver"
@@ -64,6 +70,24 @@ gems() {
mv "$pkgdir"/usr/bin/apkbuild-gem-resolver "$subpkgdir"/usr/bin/
}
-md5sums="cabaec423ced69b85aac19583a11af84 abuild-2.27.2.tar.xz"
-sha256sums="8b84207e7588991929570845f6f73c6e3b0fc87ed3823c5096a41d355b331175 abuild-2.27.2.tar.xz"
-sha512sums="60f47a0f103c7b7d0f5bd6aea2030971d91dec1ba3d7ffb3ebacd4bba6d5666927ec7e8ecf969ca8acdb345d01cd953a04bab593334b89587b238af603b4d6d5 abuild-2.27.2.tar.xz"
+md5sums="cabaec423ced69b85aac19583a11af84 abuild-2.27.2.tar.xz
+5d5d3337a0d225fbad8815484f7c2038 0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch
+10c61c48f539c612e636eedb3b843be2 0002-abuild-fix-cross-compilation-undeps.patch
+95c947183ec5d3a89d92dc84f7713bb8 0003-abuild-perform-unzip-operations-quietly.patch
+40255290bbf152dc41ee46674dfc4bcc 0004-abuild-support-arch-all-armhf.patch
+664363db603e041925764d0b67106295 0005-add-aarch64-architecture.patch
+5933163515ad5c7d16b4f5a19300a5f6 0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch"
+sha256sums="8b84207e7588991929570845f6f73c6e3b0fc87ed3823c5096a41d355b331175 abuild-2.27.2.tar.xz
+3c9ed9d33651ac345cfd46916c511ad44ce29c258fae2fa5872974316dcbf146 0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch
+aa88d3660d1f634cfa848c0195ddb41082caa8268fab7096b0909e22425d2e07 0002-abuild-fix-cross-compilation-undeps.patch
+4ff1b50e8f0909c5727b51dd8f75151ee0ca8400ee4afa9cf14757aa9fa9cfed 0003-abuild-perform-unzip-operations-quietly.patch
+d342dfc5284058e874137eb03bc21645738a445e107d25eaad32b5e4b4cb9d99 0004-abuild-support-arch-all-armhf.patch
+aa1ef6f318e8b270b10ef62b01c2f24a153ad335ded7331d038397aae3fc794f 0005-add-aarch64-architecture.patch
+755532a992850c5c68028bab37049406c1a3a6e33b0e0726237942ec8d392d67 0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch"
+sha512sums="60f47a0f103c7b7d0f5bd6aea2030971d91dec1ba3d7ffb3ebacd4bba6d5666927ec7e8ecf969ca8acdb345d01cd953a04bab593334b89587b238af603b4d6d5 abuild-2.27.2.tar.xz
+772f845cbb15524e2e827f1ae9afce396ae4593ab03ee83f81ca01d2adeee6bc70e36b4d391e6f1b97cb749f66f2ba8f288fef38476a629c767b0f1973549448 0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch
+9072b908f8ecd7996b3666bc3e89c940bbc407dece6499b32f7c4894d51416e0c4aa15fb875f5f37ebca7512902c2bde72e7eddf9d4dcb9b9ad6a9a83e0310a7 0002-abuild-fix-cross-compilation-undeps.patch
+0a988221ccf99014e6152d4a269267702d7392a1bb8d2a1f64abb52aaec1076b2142d7c910b9f07788a0c9682cbf1d3506dff2d25cd32ef76f367deb60880bac 0003-abuild-perform-unzip-operations-quietly.patch
+d990db97c2e5f6ce9c842928cd01f4e3402e7ca3d2a6a63f0063abe4d83b5d4040ceb26b27eaa9b6db40af38aaea34cdc9b98a6dfc888b5d2051ffa32eb7bf62 0004-abuild-support-arch-all-armhf.patch
+17596581f4f1bf35e0a06c6b0437015c38cd3527919f0db133aa1df064d8c42c4375be7282cb7a949841cb3d6cb509bbbc1a0caaffb6f40add6594982b68b4b5 0005-add-aarch64-architecture.patch
+498c105f8ee5f7e0ae639b62372a6f7bebfb1cafaeeaa3a4334cdba919a7be7419a996e981fe6a659d38d342c3278140a53525b42929047b6de8cbcd4df4011d 0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch"