summaryrefslogtreecommitdiff
path: root/libre/pacman
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-07-12 02:13:13 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-07-12 02:13:46 -0400
commit36874999c237bac6bed665e4380ad5004e46fd4b (patch)
tree31cf6f62eccf56f4d1e7f34256e25ee31299fb59 /libre/pacman
parent601f2c2213803b73a6ff480920f80007a1a6f509 (diff)
downloadabslibre-36874999c237bac6bed665e4380ad5004e46fd4b.tar.gz
abslibre-36874999c237bac6bed665e4380ad5004e46fd4b.tar.bz2
abslibre-36874999c237bac6bed665e4380ad5004e46fd4b.zip
libre/pacman: Patch to fix debug packages for split packages
https://bugs.archlinux.org/task/59060
Diffstat (limited to 'libre/pacman')
-rw-r--r--libre/pacman/0001-Revert-makepkg-use-the-declare-builtin-when-backing-.patch66
-rw-r--r--libre/pacman/PKGBUILD11
2 files changed, 74 insertions, 3 deletions
diff --git a/libre/pacman/0001-Revert-makepkg-use-the-declare-builtin-when-backing-.patch b/libre/pacman/0001-Revert-makepkg-use-the-declare-builtin-when-backing-.patch
new file mode 100644
index 000000000..d3d96b87d
--- /dev/null
+++ b/libre/pacman/0001-Revert-makepkg-use-the-declare-builtin-when-backing-.patch
@@ -0,0 +1,66 @@
+From 10ca4f48311370cdd580f66096d5e94858fde467 Mon Sep 17 00:00:00 2001
+From: Allan McRae <allan@archlinux.org>
+Date: Tue, 19 Jun 2018 21:08:28 +1000
+Subject: [PATCH] Revert "makepkg: use the `declare` builtin when backing up
+ variables to eval"
+
+This reverts commit 9e52a36794552b77ecf26f7f34b226d096978f1e.
+
+The change to use declare for the split package metadata backup/restore
+resulted in variables being declared at a local scope. When these variables
+were unset (mostly noticed with debug packaging) this left the variable at
+global scope defined. The decided fix for this requires the use of
+bash-4.2 features, which is greater than our current minimum version and so
+is not suitable for a maint release. Revert the change in the meantime.
+
+Signed-off-by: Allan McRae <allan@archlinux.org>
+---
+ scripts/makepkg.sh.in | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
+index 32423262..d35dd62d 100644
+--- a/scripts/makepkg.sh.in
++++ b/scripts/makepkg.sh.in
+@@ -1125,22 +1125,34 @@ check_build_status() {
+ backup_package_variables() {
+ local var
+ for var in ${splitpkg_overrides[@]}; do
+- declare -p $var 2>/dev/null || printf '%s\n' "unset $var"
++ local indirect="${var}_backup"
++ eval "${indirect}=(\"\${$var[@]}\")"
++ done
++}
++
++restore_package_variables() {
++ local var
++ for var in ${splitpkg_overrides[@]}; do
++ local indirect="${var}_backup"
++ if [[ -n ${!indirect} ]]; then
++ eval "${var}=(\"\${$indirect[@]}\")"
++ else
++ unset ${var}
++ fi
+ done
+ }
+
+ run_split_packaging() {
+ local pkgname_backup=("${pkgname[@]}")
+- local restore_package_variables
+ for pkgname in ${pkgname_backup[@]}; do
+ pkgdir="$pkgdirbase/$pkgname"
+ mkdir "$pkgdir"
+- restore_package_variables="$(backup_package_variables)"
++ backup_package_variables
+ run_package $pkgname
+ tidy_install
+ lint_package || exit $E_PACKAGE_FAILED
+ create_package
+- eval "$restore_package_variables"
++ restore_package_variables
+ done
+ pkgname=("${pkgname_backup[@]}")
+ create_debug_package
+--
+2.17.1
+
diff --git a/libre/pacman/PKGBUILD b/libre/pacman/PKGBUILD
index 4533617ee..62ec0cc21 100644
--- a/libre/pacman/PKGBUILD
+++ b/libre/pacman/PKGBUILD
@@ -12,7 +12,7 @@
pkgname=pacman
pkgver=5.1.0
pkgrel=2
-pkgrel+=.parabola1
+pkgrel+=.parabola2
pkgdesc="A library-based package manager with dependency support"
arch=('x86_64')
arch+=('i686' 'armv7h')
@@ -43,7 +43,8 @@ source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig
0001-Sychronize-filesystem.patch
0002-Revert-close-stdin-before-running-install-scripts.patch
0003-Revert-alpm_run_chroot-always-connect-parent2child-p.patch
- 0001-makepkg-treat-pkgrel-more-similarly-to-pkgver.patch)
+ 0001-makepkg-treat-pkgrel-more-similarly-to-pkgver.patch
+ 0001-Revert-makepkg-use-the-declare-builtin-when-backing-.patch)
sha256sums=('9f5993fc8923530713742f15df284677f297b3eca15ed7a24758c98ac7399bd3'
'SKIP'
'9b2304141582a421e812c76760a74f360a3cbd780472cbb60cf023a34d6fcb3d'
@@ -57,7 +58,8 @@ sha256sums=('9f5993fc8923530713742f15df284677f297b3eca15ed7a24758c98ac7399bd3'
'635ef682073878b6273e3376b00a89a572c4f5f39b118f7b0b4c7497a265a16c'
'e9e63a58ba7022869b001f4badbfcf340c47c19ab345c77bef3b2287cf9045fd'
'94e6771cc47ba0bd19f67f2c866dfd0336560e89ee72b4af373a20d3ae1abab7'
- '91bdcb8b29cc75a2e9f0fe821c1599fec2736a5115308ad502d309f04f3320a2')
+ '91bdcb8b29cc75a2e9f0fe821c1599fec2736a5115308ad502d309f04f3320a2'
+ 'a00d733c89869afe58a6c54f22c18c2d700c57e887db5f0ca7d3ef61b7baf355')
prepare() {
cd "$pkgname-$pkgver"
@@ -74,6 +76,9 @@ prepare() {
# From Parabola
patch -p1 -i $srcdir/0001-makepkg-treat-pkgrel-more-similarly-to-pkgver.patch
+ # Actually from upstream git/ML, but actually worth backporting in
+ # Parabola because we build debug packages by default
+ patch -p1 -i $srcdir/0001-Revert-makepkg-use-the-declare-builtin-when-backing-.patch
}
build() {