Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 21b8d8a21a03e0d44294626f7222adda6b48dfac Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Thu, 30 Apr 2026 12:31:13 +0200
Subject: [PATCH 1/1] libalpm: invalidate curl data in child

Touching that data inside the child makes it crash. So let's invalidate
and ignore it there.

https://github.com/curl/curl/issues/21466

---
lib/libalpm/util.c | 5 +++++
1 file changed, 5 insertions(+)

Taken from https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/commit/387ebf06060fd5f

diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 6739161b..8a99ef87 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -673,6 +673,11 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
close(cwdfd);
}

+#ifdef HAVE_LIBCURL
+ /* invalidate the curl data - we must not touch it in child */
+ handle->curlm = NULL;
+#endif
+
/* use fprintf instead of _alpm_log to send output through the parent */
/* don't chroot() to "/": this allows running with less caps when the
* caller puts us in the right root */
6 changes: 3 additions & 3 deletions srcpkgs/pacman/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'pacman'
pkgname=pacman
version=7.0.0
revision=2
version=7.1.0
revision=1
make_dirs="/var/lib/pacman 0755 root root
/usr/var/cache/pacman/pkg 0755 root root
/usr/share/libalpm/hooks 0755 root root"
Expand All @@ -17,7 +17,7 @@ maintainer="oreo639 <oreo6391@gmail.com>"
license="GPL-2.0-or-later"
homepage="https://www.archlinux.org/pacman/"
distfiles="https://gitlab.archlinux.org/pacman/pacman/-/releases/v${version}/downloads/pacman-${version}.tar.xz"
checksum=61cbd445d1381b4b184bc7c4e2791f07a79f0f2807b7c600399d0d08e8cd28cf
checksum=530e50d7edbb2a22581c6d6707d2113240276c1bec4ee39a99488e1243c32171
make_check=ci-skip # Some tests fail when run in CI

if [ "$XBPS_TARGET_LIBC" = musl ]; then
Expand Down
Loading