diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2025-12-01 10:35:21 +0200 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2025-12-02 15:47:45 +0200 |
| commit | d48a3379d1b19ef24d98ed6f3d932b9d545cbcb8 (patch) | |
| tree | fd24c2d85832623df2b58f2244ad64b7ce648b15 | |
| parent | 642f28f47ff9b8d4cb04b59aac3bff875ab60639 (diff) | |
gnu: libcap: Fix build on powerpc-linux.
* gnu/packages/linux.scm (libcap)[arguments]: When building for
powerpc-linux add a phase to apply a patch.
* gnu/packages/patches/libcap-magic-glibc-constant.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Change-Id: I3d2d7d09684af604b17b13ffbcfcc31db46d2d82
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/linux.scm | 11 | ||||
| -rw-r--r-- | gnu/packages/patches/libcap-magic-glibc-constant.patch | 43 |
3 files changed, 54 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index bd1920ce5c1..f110841381f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -1725,6 +1725,7 @@ dist_patch_DATA = \ | |||
| 1725 | %D%/packages/patches/libbraiding-no-s.patch \ | 1725 | %D%/packages/patches/libbraiding-no-s.patch \ |
| 1726 | %D%/packages/patches/libcaca-CVE-2021-3410-pt1.patch \ | 1726 | %D%/packages/patches/libcaca-CVE-2021-3410-pt1.patch \ |
| 1727 | %D%/packages/patches/libcaca-CVE-2021-3410-pt2.patch \ | 1727 | %D%/packages/patches/libcaca-CVE-2021-3410-pt2.patch \ |
| 1728 | %D%/packages/patches/libcap-magic-glibc-constant.patch \ | ||
| 1728 | %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \ | 1729 | %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \ |
| 1729 | %D%/packages/patches/libcanberra-wayland-crash.patch \ | 1730 | %D%/packages/patches/libcanberra-wayland-crash.patch \ |
| 1730 | %D%/packages/patches/libcroco-CVE-2020-12825.patch \ | 1731 | %D%/packages/patches/libcroco-CVE-2020-12825.patch \ |
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 1ef168b1441..83dc35610fb 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm | |||
| @@ -4903,7 +4903,16 @@ configuration (iptunnel, ipmaddr).") | |||
| 4903 | (arguments | 4903 | (arguments |
| 4904 | (list #:phases | 4904 | (list #:phases |
| 4905 | #~(modify-phases %standard-phases | 4905 | #~(modify-phases %standard-phases |
| 4906 | (delete 'configure)) | 4906 | (delete 'configure) |
| 4907 | #$@(if (target-ppc32?) | ||
| 4908 | #~((add-after 'unpack 'apply-patch | ||
| 4909 | (lambda _ | ||
| 4910 | (let ((patch | ||
| 4911 | #$(local-file | ||
| 4912 | (search-patch | ||
| 4913 | "libcap-magic-glibc-constant.patch")))) | ||
| 4914 | (invoke "patch" "--force" "-p1" "-i" patch))))) | ||
| 4915 | #~())) | ||
| 4907 | #:test-target "test" | 4916 | #:test-target "test" |
| 4908 | #:make-flags | 4917 | #:make-flags |
| 4909 | #~(list "lib=lib" | 4918 | #~(list "lib=lib" |
diff --git a/gnu/packages/patches/libcap-magic-glibc-constant.patch b/gnu/packages/patches/libcap-magic-glibc-constant.patch new file mode 100644 index 00000000000..a4aca5ef8c6 --- /dev/null +++ b/gnu/packages/patches/libcap-magic-glibc-constant.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | This patch is from the upstream repo, from between the tags libcap-2.75 | ||
| 2 | and libcap-2.76, and can be removed after the update to 2.76. | ||
| 3 | |||
| 4 | From 04b285680bfb45117af685eabf1675917118bdb5 Mon Sep 17 00:00:00 2001 | ||
| 5 | Message-ID: <04b285680bfb45117af685eabf1675917118bdb5.1764517342.git.efraim@flashner.co.il> | ||
| 6 | From: "Andrew G. Morgan" <morgan@kernel.org> | ||
| 7 | Date: Sat, 22 Mar 2025 09:49:50 -0700 | ||
| 8 | Subject: [PATCH] Glibc needs a constant to be defined for puts() to work. | ||
| 9 | |||
| 10 | See https://bugzilla.kernel.org/show_bug.cgi?id=219880 | ||
| 11 | |||
| 12 | Signed-off-by: Andrew G. Morgan <morgan@kernel.org> | ||
| 13 | --- | ||
| 14 | libcap/execable.h | 11 +++++++++++ | ||
| 15 | 1 file changed, 11 insertions(+) | ||
| 16 | |||
| 17 | diff --git a/libcap/execable.h b/libcap/execable.h | ||
| 18 | index 89e61a3..a68ea24 100644 | ||
| 19 | --- a/libcap/execable.h | ||
| 20 | +++ b/libcap/execable.h | ||
| 21 | @@ -23,6 +23,17 @@ | ||
| 22 | #endif | ||
| 23 | #define __EXECABLE_H | ||
| 24 | |||
| 25 | +#ifdef __GLIBC__ | ||
| 26 | +/* | ||
| 27 | + * https://bugzilla.kernel.org/show_bug.cgi?id=219880 So far as I can | ||
| 28 | + * tell this value is some legacy magic meaning, but is a detail no | ||
| 29 | + * longer important to glibc. Only the existence of this constant in | ||
| 30 | + * the linkage is needed. | ||
| 31 | + */ | ||
| 32 | +extern const int _IO_stdin_used; | ||
| 33 | +const int _IO_stdin_used __attribute__((weak)) = 131073; | ||
| 34 | +#endif /* def __GLIBC__ */ | ||
| 35 | + | ||
| 36 | const char __execable_dl_loader[] __attribute((section(".interp"))) = | ||
| 37 | SHARED_LOADER ; | ||
| 38 | |||
| 39 | -- | ||
| 40 | Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר | ||
| 41 | GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 | ||
| 42 | Confidentiality cannot be guaranteed on emails sent or received unencrypted | ||
| 43 | |||
