commit
2512cb511a
@ -0,0 +1,40 @@
|
||||
From 4cfaf53950c1e2bbef7262e2e9b608f4f5a280d5 Mon Sep 17 00:00:00 2001
|
||||
From: Allan McRae <allan@archlinux.org>
|
||||
Date: Mon, 12 Dec 2022 18:37:59 +1000
|
||||
Subject: [PATCH 31/N] libmakepkg: fix compatibility with bash-5.2
|
||||
patsub_replacement
|
||||
|
||||
Bash-5.2 introduced the patsub_replacement shell option, which is enabled
|
||||
by default. Apparently is it supposed to handle a sed-like idiom, but
|
||||
what it does achieve is making any substitution involving a "&" requiring
|
||||
special care.
|
||||
|
||||
For makepkg's DLAGENTS, we replace "%o" and "%u" if present. Any "&" in
|
||||
the replacement fields triggers patsub_replacement unless quoted. This is
|
||||
particularly important for the URL field.
|
||||
|
||||
Add relevant quotes to avoid issues.
|
||||
|
||||
Signed-off-by: Allan McRae <allan@archlinux.org>
|
||||
---
|
||||
scripts/libmakepkg/source/file.sh.in | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/libmakepkg/source/file.sh.in b/scripts/libmakepkg/source/file.sh.in
|
||||
index 905a5e2..c368041 100644
|
||||
--- a/scripts/libmakepkg/source/file.sh.in
|
||||
+++ b/scripts/libmakepkg/source/file.sh.in
|
||||
@@ -60,11 +60,11 @@ download_file() {
|
||||
# replace %o by the temporary dlfile if it exists
|
||||
if [[ ${cmdline[*]} = *%o* ]]; then
|
||||
dlfile=$filename.part
|
||||
- cmdline=("${cmdline[@]//%o/$dlfile}")
|
||||
+ cmdline=("${cmdline[@]//%o/"$dlfile"}")
|
||||
fi
|
||||
# add the URL, either in place of %u or at the end
|
||||
if [[ ${cmdline[*]} = *%u* ]]; then
|
||||
- cmdline=("${cmdline[@]//%u/$url}")
|
||||
+ cmdline=("${cmdline[@]//%u/"$url"}")
|
||||
else
|
||||
cmdline+=("$url")
|
||||
fi
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
pkgname=pacman
|
||||
pkgver=6.0.2
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="A library-based package manager with dependency support (MSYS2 port)"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://www.archlinux.org/pacman/"
|
||||
@ -71,7 +71,8 @@ source=(pacman-${pkgver}::git+https://gitlab.archlinux.org/pacman/pacman.git#com
|
||||
0027-pacman.c-handle-cr-on-stdin-as-well.patch
|
||||
0028-Add-a-CI-job.patch
|
||||
0029-Fix-building-staticlibs-with-LTO.patch
|
||||
0030-Make-lint_pkgbuild-opt-in-via-MAKEPKG_LINT_PKGBUILD-.patch)
|
||||
0030-Make-lint_pkgbuild-opt-in-via-MAKEPKG_LINT_PKGBUILD-.patch
|
||||
0031-libmakepkg-fix-compatibility-with-bash-5.2-patsub_re.patch)
|
||||
validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae <allan@archlinux.org>
|
||||
'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org>
|
||||
sha256sums=('SKIP'
|
||||
@ -108,7 +109,8 @@ sha256sums=('SKIP'
|
||||
'06b0abe321240d19127e0578ee2b7607d3ce38c62c696e48f71b58f181134c56'
|
||||
'347222818ffbbc2b72bfe7cdb9e00247cae240372ac629aa5fd1e9386813d9ca'
|
||||
'80796220c074856f55a63d4ef576f5b5d45cfa4fdc5701b5c7f384e5d92d72bd'
|
||||
'7b8588bb8ac9c2c74bc5b537e3e17ea90c81d8cf70ea2bd8ff48e3583c24d67f')
|
||||
'7b8588bb8ac9c2c74bc5b537e3e17ea90c81d8cf70ea2bd8ff48e3583c24d67f'
|
||||
'c5cd177455d2f403f1d7d6dc7f9d19925c8b7662f1984ed9eae91af0f49697b2')
|
||||
|
||||
apply_git_with_msg() {
|
||||
for _patch in "$@"
|
||||
@ -154,7 +156,8 @@ prepare() {
|
||||
0027-pacman.c-handle-cr-on-stdin-as-well.patch \
|
||||
0028-Add-a-CI-job.patch \
|
||||
0029-Fix-building-staticlibs-with-LTO.patch \
|
||||
0030-Make-lint_pkgbuild-opt-in-via-MAKEPKG_LINT_PKGBUILD-.patch
|
||||
0030-Make-lint_pkgbuild-opt-in-via-MAKEPKG_LINT_PKGBUILD-.patch \
|
||||
0031-libmakepkg-fix-compatibility-with-bash-5.2-patsub_re.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user