summaryrefslogtreecommitdiff
path: root/libre/pacman
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-09-17 21:16:44 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-09-17 21:16:44 -0400
commit1aaea6064032560107692f5a2dced71eae458133 (patch)
treec51bfceaf7026d8b00a44b9a945c4d20ea3c2f9b /libre/pacman
parent3a77e496a160b2767175c8cc208466ba121b621d (diff)
downloadabslibre-1aaea6064032560107692f5a2dced71eae458133.tar.gz
abslibre-1aaea6064032560107692f5a2dced71eae458133.tar.bz2
abslibre-1aaea6064032560107692f5a2dced71eae458133.zip
libre/pacman: Backport more patches
- Fully remove whirlpoolsums=() support from makepkg, rather than having weird half-support. - Pass --stream to `hg clone` when creating the working copy.
Diffstat (limited to 'libre/pacman')
-rw-r--r--libre/pacman/0001-Revert-makepkg-add-whirlpool-to-the-list-of-hashing-.patch52
-rw-r--r--libre/pacman/0001-makepkg-Pass-stream-to-hg-clone-when-creating-the-wo.patch38
-rw-r--r--libre/pacman/PKGBUILD19
3 files changed, 106 insertions, 3 deletions
diff --git a/libre/pacman/0001-Revert-makepkg-add-whirlpool-to-the-list-of-hashing-.patch b/libre/pacman/0001-Revert-makepkg-add-whirlpool-to-the-list-of-hashing-.patch
new file mode 100644
index 000000000..2eb858902
--- /dev/null
+++ b/libre/pacman/0001-Revert-makepkg-add-whirlpool-to-the-list-of-hashing-.patch
@@ -0,0 +1,52 @@
+From patchwork Wed Aug 29 06:49:29 2018
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [pacman-dev] Revert "makepkg: add whirlpool to the list of hashing
+ algorithms"
+X-Patchwork-Submitter: Eli Schwartz <eschwartz@archlinux.org>
+X-Patchwork-Id: 751
+Message-Id: <20180829064929.29120-1-eschwartz@archlinux.org>
+To: pacman-dev@archlinux.org
+Date: Wed, 29 Aug 2018 02:49:29 -0400
+From: Eli Schwartz <eschwartz@archlinux.org>
+List-Id: Discussion list for pacman development <pacman-dev.archlinux.org>
+
+This reverts commit 9cdfd18739cc4b0e2b2efeb9a92a3ea612c8505f.
+
+We've never documented whirlpoolsums support in the manpage and no one
+really seems to have realized we support it, let alone use it -- except
+for a few parabola packages, being the contributor's motivation for
+adding support.
+
+The problem is that for two years the code has been broken. In commit
+577701250d645d1fc1a505cde34aedbeb3208ea5 we moved to coreutils to
+provide checksum commands, rather than openssl, but there is no
+whirlpoolsums binary.
+
+Properly fixing this would require re-adding a dependency on openssl,
+independent of the libalpm crypto backend -- which defeats the purpose
+of moving to coreutils in the general case. nettle-hash does not provide
+a whirlpool algorithm any more than it does base64 (the original reason
+for moving to coreutils).
+
+Therefore, we should just drop support for this again.
+
+Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
+---
+ scripts/makepkg.sh.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
+index cf5fda91..f9c619f2 100644
+--- a/scripts/makepkg.sh.in
++++ b/scripts/makepkg.sh.in
+@@ -54,7 +54,7 @@ splitpkg_overrides=('pkgdesc' 'arch' 'url' 'license' 'groups' 'depends'
+ 'options' 'install' 'changelog')
+ readonly -a build_options splitpkg_overrides
+
+-known_hash_algos=('md5' 'sha1' 'sha224' 'sha256' 'sha384' 'sha512' 'whirlpool')
++known_hash_algos=('md5' 'sha1' 'sha224' 'sha256' 'sha384' 'sha512')
+
+ # Options
+ ASDEPS=0
diff --git a/libre/pacman/0001-makepkg-Pass-stream-to-hg-clone-when-creating-the-wo.patch b/libre/pacman/0001-makepkg-Pass-stream-to-hg-clone-when-creating-the-wo.patch
new file mode 100644
index 000000000..e666299ff
--- /dev/null
+++ b/libre/pacman/0001-makepkg-Pass-stream-to-hg-clone-when-creating-the-wo.patch
@@ -0,0 +1,38 @@
+From 59e20edc16b7f13c3d753ac3a28358c467e32965 Mon Sep 17 00:00:00 2001
+From: Luke Shumaker <lukeshu@parabola.nu>
+Date: Mon, 27 Aug 2018 16:41:29 -0400
+Subject: [PATCH] makepkg: Pass --stream to `hg clone` when creating the
+ working copy
+
+Without --stream, `hg clone` reencodes+recompresses the entire repository,
+to the storage settings of the host. But download_hg() already did that
+on the initial network clone, and it is 100% pointless duplicated work for
+the local clone.
+
+The work that this saves is CPU-bound (not disk-bound), and is restricted
+to a single core.
+
+The --stream flag has only existed since Mercurial 4.4 (2017-11-01). Prior
+to that, it was named --uncompressed. --uncompressed still exists as a
+compatibility alias for --stream, and marked deprecated, though there is
+currently no schedule for its removal.
+---
+ scripts/libmakepkg/source/hg.sh.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/libmakepkg/source/hg.sh.in b/scripts/libmakepkg/source/hg.sh.in
+index ae9aed3b..7346e1e3 100644
+--- a/scripts/libmakepkg/source/hg.sh.in
++++ b/scripts/libmakepkg/source/hg.sh.in
+@@ -94,7 +94,7 @@ extract_hg() {
+ plain "$(gettext "Aborting...")"
+ exit 1
+ fi
+- elif ! hg clone -u "$ref" "$dir" "${dir##*/}"; then
++ elif ! hg clone -u "$ref" --stream "$dir" "${dir##*/}"; then
+ error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "hg"
+ plain "$(gettext "Aborting...")"
+ exit 1
+--
+2.18.0
+
diff --git a/libre/pacman/PKGBUILD b/libre/pacman/PKGBUILD
index 1976af1fc..44099356d 100644
--- a/libre/pacman/PKGBUILD
+++ b/libre/pacman/PKGBUILD
@@ -12,7 +12,7 @@
pkgname=pacman
pkgver=5.1.1
pkgrel=1
-pkgrel+=.parabola5
+pkgrel+=.parabola6
pkgdesc="A library-based package manager with dependency support"
arch=('x86_64')
arch+=('i686' 'armv7h')
@@ -41,7 +41,9 @@ source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig
0001-makepkg-Better-error-messages-for-versions-in-check-.patch
0002-makepkg-check_pkgrel-Don-t-say-decimal-in-the-error-.patch
0003-makepkg-check_pkgver-Report-what-the-bad-pkgver-is.patch
- 0004-makepkg-Treat-pkgrel-more-similarly-to-pkgver.patch)
+ 0004-makepkg-Treat-pkgrel-more-similarly-to-pkgver.patch
+ 0001-makepkg-Pass-stream-to-hg-clone-when-creating-the-wo.patch
+ 0001-Revert-makepkg-add-whirlpool-to-the-list-of-hashing-.patch)
source_armv7h=(0001-Sychronize-filesystem.patch
0002-Revert-close-stdin-before-running-install-scripts.patch
0003-Revert-alpm_run_chroot-always-connect-parent2child-p.patch)
@@ -56,7 +58,9 @@ sha256sums=('be04b9162d62d2567e21402dcbabb5bedfdb03909fa5ec6e8568e02ab325bd8d'
'075ac1f8d782ac9868f5e7f3043f684a00da33915eba9ec7e4a8940992ddc269'
'8065c468706be669bc6718a6634e5e58507cba9b8121bf5cfe1703daacab1c3e'
'd01100d19b9868da8c689a7a14b6340574ecca0105a8d8ef866b281ad3d7e637'
- 'cc2c82ca0c3a45dd4e200fa2219da52912a8718ab7e16091ad2938ada657f033')
+ 'cc2c82ca0c3a45dd4e200fa2219da52912a8718ab7e16091ad2938ada657f033'
+ 'a73a98b395ec671575ceb0d18a22d1b9ff09935528104941b12a9a124024f9a1'
+ '1f6a0a8518dc912bc5d9df335b6da220bd3cc51630b6b47c09ec9d4cd47ae432')
sha256sums_armv7h=('8d70fb5094f58aad98b601bbc42be354c2014b9fe734a1ee0b1e14bb041cc9cc'
'0e771370da68c855bfb4eaad4c2ae137883a474886a049b934dac2e775574cb9'
'2f586f72c34150330389854575a21be1d3ef3637c4f94bec2e948c2717a5aecb')
@@ -76,6 +80,15 @@ prepare() {
patch -p1 -i ../0002-makepkg-check_pkgrel-Don-t-say-decimal-in-the-error-.patch
patch -p1 -i ../0003-makepkg-check_pkgver-Report-what-the-bad-pkgver-is.patch
patch -p1 -i ../0004-makepkg-Treat-pkgrel-more-similarly-to-pkgver.patch
+
+ # From Parabola
+ patch -p1 -i ../0001-makepkg-Pass-stream-to-hg-clone-when-creating-the-wo.patch
+
+ # From pacman-dev mailing list
+ # Properly drop whirlpoolsums support (instead of mysteriously
+ # failing). Backported because some Parabola packages actually use
+ # whirlpoolsums.
+ patch -p1 -i ../0001-Revert-makepkg-add-whirlpool-to-the-list-of-hashing-.patch
}
build() {