pacman: update
Move to a newer upstream commit to include https://gitlab.archlinux.org/pacman/pacman/-/commit/0147de169a2abd19 Includes one new commit from our fork.
This commit is contained in:
@@ -938,5 +938,5 @@ index 94b0930..f008f22 100644
|
||||
vprint("\ttime elapsed: %.2fs" % (time_end - time_start))
|
||||
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -54,5 +54,5 @@ index 299d287..533ed49 100644
|
||||
}
|
||||
} else if(WIFSIGNALED(status) != 0) {
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -316,5 +316,5 @@ index b6da1a3..2dd8e18 100644
|
||||
colon_printf(_("Starting full system upgrade...\n"));
|
||||
alpm_logaction(config->handle, PACMAN_CALLER_PREFIX,
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -254,5 +254,5 @@ index 9b2967e..0000000
|
||||
-self.addrule("PACMAN_RETCODE=0")
|
||||
-self.addrule("FILE_EXIST=etc/ld.so.cache")
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -51,5 +51,5 @@ index c52b3eb..2650407 100644
|
||||
printf "%s\n" "$pkgver-$pkgrel"
|
||||
fi
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -36,5 +36,5 @@ index 6c8446b..7ad3a0e 100644
|
||||
|
||||
shopt -u -o pipefail
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -51,5 +51,5 @@ index b471bf2..f7fa9d8 100644
|
||||
if(pfile_isdir) {
|
||||
if(S_ISDIR(lsbuf.st_mode)) {
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -68,5 +68,5 @@ index 2dd8e18..a5cc23b 100644
|
||||
continue;
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -75,5 +75,5 @@ index fecee3a..ce28fd8 100644
|
||||
retval = 1;
|
||||
goto cleanup;
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -110,5 +110,5 @@ index 07239c3..9c044b5 100644
|
||||
qsort(filelist->files, filelist->count,
|
||||
sizeof(alpm_file_t), _alpm_files_cmp);
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -43,5 +43,5 @@ index d1851ea..60fc8fa 100644
|
||||
#, c-format
|
||||
msgid "Starting full system upgrade...\n"
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -45,5 +45,5 @@ index a231699..8d6d32d 100644
|
||||
|
||||
create_signature "$tempname"
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -26,5 +26,5 @@ index 4aaac55..157ee4d 100644
|
||||
],
|
||||
input : input,
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -24,5 +24,5 @@ index 8536a54..d5b6dcc 100644
|
||||
'gzip.sh.in',
|
||||
'pacman.sh.in',
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@ index d5b6dcc..535da57 100644
|
||||
]
|
||||
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@ index b0697f7..3bdc66c 100644
|
||||
{ 'name' : 'util', 'has_subdir' : true },
|
||||
]
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -33,5 +33,5 @@ index 873dd82..4ba1dbc 100644
|
||||
fi
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
@@ -70,5 +70,5 @@ index 0000000..5b198ca
|
||||
+ name: install
|
||||
+ path: _dest/
|
||||
--
|
||||
2.31.1
|
||||
2.33.0
|
||||
|
||||
|
||||
44
pacman/0019-pacman.c-handle-cr-on-stdin-as-well.patch
Normal file
44
pacman/0019-pacman.c-handle-cr-on-stdin-as-well.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
From 0bd01a8a23156fabc51fbf1408a7aa441aa29b6e Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Degawa <ccom@randomderp.com>
|
||||
Date: Wed, 18 Aug 2021 10:00:26 -0500
|
||||
Subject: [PATCH 19/N] pacman.c: handle cr on stdin as well
|
||||
|
||||
Improves compatibility with Windows targets, specifically when using
|
||||
powershell for string transforming package names and piping into
|
||||
pacman as it's virtually impossible to send newline only terminated
|
||||
strings through pipes
|
||||
|
||||
Allows for stuff such as
|
||||
|
||||
```powershell
|
||||
$a="vim nano"
|
||||
$b="cmake ninja"
|
||||
$a.Split(' '), $b.Split(' ').ForEach({Write-Output mingw-w64-ucrt-x86_64-$_}) |
|
||||
pacman -S --needed -
|
||||
```
|
||||
|
||||
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
|
||||
---
|
||||
src/pacman/pacman.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
|
||||
index 36c3b5e..33feca9 100644
|
||||
--- a/src/pacman/pacman.c
|
||||
+++ b/src/pacman/pacman.c
|
||||
@@ -1156,6 +1156,12 @@ int main(int argc, char *argv[])
|
||||
if(line[nread - 1] == '\n') {
|
||||
/* remove trailing newline */
|
||||
line[nread - 1] = '\0';
|
||||
+#ifdef __MSYS__
|
||||
+ if (line[nread - 2] == '\r') {
|
||||
+ /* remove trailing carriage returns */
|
||||
+ line[nread - 2] = '\0';
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
if(line[0] == '\0') {
|
||||
/* skip empty lines */
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
pkgname=pacman
|
||||
pkgver=6.0.0
|
||||
pkgrel=7
|
||||
pkgrel=8
|
||||
pkgdesc="A library-based package manager with dependency support (MSYS2 port)"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://www.archlinux.org/pacman/"
|
||||
@@ -36,13 +36,12 @@ makedepends=('asciidoc'
|
||||
backup=("etc/pacman.conf"
|
||||
"etc/makepkg.conf"
|
||||
"etc/makepkg_mingw.conf")
|
||||
_commit="542910d684191eb7f25ddc5d3d8fe3060028a267"
|
||||
_commit="0147de169a2abd193699957d4e76aec522901fd2"
|
||||
source=(pacman-${pkgver}::git+https://gitlab.archlinux.org/pacman/pacman.git#commit=${_commit}
|
||||
"pacman.conf"
|
||||
"makepkg.conf"
|
||||
"makepkg_mingw.conf"
|
||||
"makepkg-mingw"
|
||||
"fix-sig-download-name.patch"
|
||||
0001-Msysize.patch
|
||||
0002-More-debugging-info.patch
|
||||
0003-Core-update.patch
|
||||
@@ -60,7 +59,8 @@ source=(pacman-${pkgver}::git+https://gitlab.archlinux.org/pacman/pacman.git#com
|
||||
0015-Remove-sudo.patch
|
||||
0016-Use-msys-tools.patch
|
||||
0017-Export-CC-and-CXX-variables-explicitly.patch
|
||||
0018-Add-a-CI-job.patch)
|
||||
0018-Add-a-CI-job.patch
|
||||
0019-pacman.c-handle-cr-on-stdin-as-well.patch)
|
||||
validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae <allan@archlinux.org>
|
||||
'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org>
|
||||
sha256sums=('SKIP'
|
||||
@@ -68,25 +68,25 @@ sha256sums=('SKIP'
|
||||
'ee9f8a5ec60a1334725adb102f531f38badfe1bb66bde82c4aeb3131a2becc2f'
|
||||
'606e4b2808a40e856b7043244fc993d426dab25bc2e03b2b8ee5b869f5102507'
|
||||
'2bd27c3fc5443b367e5025c9b9a35670b02202e48e92eead90755fef8d08fa83'
|
||||
'3687b6ed122d607fc549c0ec2fc29b61e7da246fd42443680e442e8526a18ab2'
|
||||
'6dd930f5da349959deb128b0fa875da11184df90afe250a51862b39beffd1240'
|
||||
'4986792235e02c62316d974e47059bcf1223c4a2d86efa1eb56d8ef6993988ad'
|
||||
'd35854bf5a14984ddb57a36be6f4e9ac62748fa2bf10c8f844a8eb17402e8839'
|
||||
'2bbeae9c91cd42f92956967b97b777e7f9bd2e2b9c160c767fc604b183571656'
|
||||
'9cf5b82e00eb6ad3b79d4e7fc7a9cc824e5748bd0fd26a5a06478f2e9ca6f3e8'
|
||||
'c5f2430aaff70e9aaf37fe54cbc2a557004f2ef74283adc51c6b99e3c9ec4801'
|
||||
'49e746cb0ee391be3ef6d60de589f61cf25bcbfa16a49fd113a2445e5c559a9a'
|
||||
'3ac53499f19e95bdb84ab9dad8a1c551b4bb75f940b8e09ae4cd4bdea2a48999'
|
||||
'5215e5a10d6e1d7b0850683f3d27114a31143ac3112103a59a1094e5702954ca'
|
||||
'6f865181a93c499b21e7d31d8a423cecc9b8b6c205dbb8c9bb460ac5a86f7725'
|
||||
'b880a0d9e07b4a6198b3a2b318611dd53419978e60bf397ba9910c4358656de7'
|
||||
'd81b84c2a4e4a03dca169ec8b05f967bd8f5c3f3b7bc2895c0a9cbd0fa719d4b'
|
||||
'1de924b4bf41e0603fac3b3a2b83db18211ae9e65e15ac0dbaf5448c587dfb76'
|
||||
'8d9a5dd13df1f18e94abe8520dfc1f1f80ac45677e93ff64b4c3a8f5adbc9fa1'
|
||||
'e3aef7b31ff56d128ac8b213437987c57a1490f52b31185199241da43233547d'
|
||||
'bc16b167293aca73eec011d42b6d69a88e7a51be778e56e4d9a0ab1bc421efaa'
|
||||
'8388d3c5edfe66f5f023fe5df275e7223cc5d92f9163a8a85a99987f538b30f0'
|
||||
'94f1f32544311713ec4f76a1058625d4215e0a7582ca3f08208841c0bf4ed723')
|
||||
'0f7875bafbf224d7b376bedfde1c99a1050d86e699ecdad298d26544e340fbc6'
|
||||
'e8af0c7f5f1040749e317a97f64d4a7e66427a607bb46b25b4af946ef73c4a0b'
|
||||
'96108bce98683b3482b224b88eb6ca3aa69e236d0d20a5a4bb139a30aea1c051'
|
||||
'762c5a18495c76b50086f9e794b6dfecc0ab478d6645399e94abc06c0bb46993'
|
||||
'9c815c18e4b4e37951d5f95cfdd9222b31971921d57db8a9396bc419cdbb137c'
|
||||
'04f2e1b880f0e9831eeed2e2a7da81a94e2aa1801ebb5af2ddcc4885b1933dca'
|
||||
'2730b84479c745d02d4697e0127a8db8c604a5764000705dc6692faba78b887f'
|
||||
'caf6f5e40d18967831bd1eecc6e5ac86bf2b95ef3aedf218478fdcec3547535b'
|
||||
'011c6723b6dfa71793b082077e87cf7dc526ef3f4e34a9b707a185715de9cdd6'
|
||||
'ef6c583bd50428fdc9c3a98c7a4d70650e5bb8853f8fa7194d6e1815abc2fe2d'
|
||||
'50f01c323d60e0aac6ed4924fce4734324cb0314629b870ec438e902613ab20c'
|
||||
'82d61a7d5a208bcc8f47be2c1cd14ba55dbf47c63278c6201e480ff4d39cdd39'
|
||||
'f4472552ef173d63a67c0b62ed6c51f41afcb4c1e43049e983980e7d35af0df0'
|
||||
'8f677c6c9bcf7b867cfbcdd07157483acac1681ecbf61c945c7974f8576ca033'
|
||||
'279b834adb2a8491247561452bf5bd7c794f39894e73ef92f096d78e686a09ea'
|
||||
'7809a3460eefd53c6600fc4319689979868dd1ce093e8c85d22c17d630b52a88'
|
||||
'3e9631c1ab823ec335e6381a89b81d9a25228aa5bc6cde3b530f3e412452506a'
|
||||
'2ea3924bd78d241df918747fb1f2776ba416f30c7864e96fb5ce00030f7ba968'
|
||||
'38b952dc162b5b672d054c13436dcf8681174c8175de6a6d1fbafd009fef3fc2')
|
||||
|
||||
apply_git_am_with_msg() {
|
||||
for _patch in "$@"
|
||||
@@ -103,9 +103,6 @@ prepare() {
|
||||
git config core.symlinks true
|
||||
git reset HEAD --hard
|
||||
|
||||
# https://bugs.archlinux.org/task/71274#comment200612
|
||||
patch -Np1 -i "${srcdir}/fix-sig-download-name.patch"
|
||||
|
||||
apply_git_am_with_msg 0001-Msysize.patch \
|
||||
0002-More-debugging-info.patch \
|
||||
0003-Core-update.patch \
|
||||
@@ -123,7 +120,8 @@ prepare() {
|
||||
0015-Remove-sudo.patch \
|
||||
0016-Use-msys-tools.patch \
|
||||
0017-Export-CC-and-CXX-variables-explicitly.patch \
|
||||
0018-Add-a-CI-job.patch
|
||||
0018-Add-a-CI-job.patch \
|
||||
0019-pacman.c-handle-cr-on-stdin-as-well.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
|
||||
index 2c14841f..ca6be7b6 100644
|
||||
--- a/lib/libalpm/dload.c
|
||||
+++ b/lib/libalpm/dload.c
|
||||
@@ -614,6 +614,7 @@ static int curl_check_finished_download(CURLM *curlm, CURLMsg *msg,
|
||||
if(!payload->signature && payload->download_signature && curlerr == CURLE_OK && payload->respcode < 400) {
|
||||
struct dload_payload *sig = NULL;
|
||||
|
||||
+ const char* realname = payload->destfile_name ? payload->destfile_name : payload->tempfile_name;
|
||||
int len = strlen(effective_url) + 5;
|
||||
CALLOC(sig, 1, sizeof(*sig), GOTO_ERR(handle, ALPM_ERR_MEMORY, cleanup));
|
||||
MALLOC(sig->fileurl, len, FREE(sig); GOTO_ERR(handle, ALPM_ERR_MEMORY, cleanup));
|
||||
@@ -623,13 +624,18 @@ static int curl_check_finished_download(CURLM *curlm, CURLMsg *msg,
|
||||
/* In this case server might provide a new name for the main payload.
|
||||
* Choose *.sig filename based on this new name.
|
||||
*/
|
||||
- const char* realname = payload->destfile_name ? payload->destfile_name : payload->tempfile_name;
|
||||
const char *final_file = get_filename(realname);
|
||||
int remote_name_len = strlen(final_file) + 5;
|
||||
MALLOC(sig->remote_name, remote_name_len, FREE(sig->fileurl); FREE(sig); GOTO_ERR(handle, ALPM_ERR_MEMORY, cleanup));
|
||||
snprintf(sig->remote_name, remote_name_len, "%s.sig", final_file);
|
||||
}
|
||||
|
||||
+ /* force the filename to be realname + ".sig" */
|
||||
+ int destfile_name_len = strlen(realname) + 5;
|
||||
+ MALLOC(sig->destfile_name, destfile_name_len, FREE(sig->remote_name);
|
||||
+ FREE(sig->fileurl); FREE(sig); GOTO_ERR(handle, ALPM_ERR_MEMORY, cleanup));
|
||||
+ snprintf(sig->destfile_name, destfile_name_len, "%s.sig", realname);
|
||||
+
|
||||
sig->signature = 1;
|
||||
sig->handle = handle;
|
||||
sig->force = payload->force;
|
||||
@@ -762,7 +768,9 @@ static int curl_add_payload(alpm_handle_t *handle, CURLM *curlm,
|
||||
}
|
||||
|
||||
if(payload->remote_name && strlen(payload->remote_name) > 0) {
|
||||
- payload->destfile_name = get_fullpath(localpath, payload->remote_name, "");
|
||||
+ if(!payload->destfile_name) {
|
||||
+ payload->destfile_name = get_fullpath(localpath, payload->remote_name, "");
|
||||
+ }
|
||||
payload->tempfile_name = get_fullpath(localpath, payload->remote_name, ".part");
|
||||
if(!payload->destfile_name || !payload->tempfile_name) {
|
||||
goto cleanup;
|
||||
Reference in New Issue
Block a user