janneke pushed a commit to branch wip-hurd
in repository guix.
commit fb1ebed48a651d8d18d244761619aab16429b5cb
Author: Jan Nieuwenhuizen <[email protected]>
AuthorDate: Sat Mar 7 16:38:31 2020 -0500
gnu: shadow: Build fix for the Hurd.
* gnu/packages/patches/shadow-hurd-pctrl.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/admin.scm (shadow): Use it.
---
gnu/local.mk | 1 +
gnu/packages/admin.scm | 1 +
gnu/packages/patches/shadow-hurd-pctrl.patch | 18 ++++++++++++++++++
3 files changed, 20 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index bf306b5..26d938b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1409,6 +1409,7 @@ dist_patch_DATA =
\
%D%/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch \
%D%/packages/patches/seq24-rename-mutex.patch \
%D%/packages/patches/sharutils-CVE-2018-1000097.patch \
+ %D%/packages/patches/shadow-hurd-pctrl.patch \
%D%/packages/patches/shepherd-hurd.patch \
%D%/packages/patches/shishi-fix-libgcrypt-detection.patch \
%D%/packages/patches/slim-session.patch \
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index f6b316a..1c0a2a5 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -474,6 +474,7 @@ hostname.")
(uri (string-append
"https://github.com/shadow-maint/shadow/releases/"
"download/" version "/shadow-" version ".tar.xz"))
+ (patches (search-patches "shadow-hurd-pctrl.patch"))
(sha256
(base32
"0qmfq50sdhz6xilgxvinblll8j2iqfl7hwk45bq744y4plq4dbd3"))))
diff --git a/gnu/packages/patches/shadow-hurd-pctrl.patch
b/gnu/packages/patches/shadow-hurd-pctrl.patch
new file mode 100644
index 0000000..a60b44f
--- /dev/null
+++ b/gnu/packages/patches/shadow-hurd-pctrl.patch
@@ -0,0 +1,18 @@
+Description: Avoid including sys/prctl.h on the Hurd.
+Author: Jan (janneke) Nieuwenhuizen <[email protected]>
+Bug-Guix: - XXX: [core-updates] merge wip-hurd
+Forwarded: no
+Last-Update: 2020-03-07
+
+--- shadow-4.8.1/libmisc/idmapping.c.orig 2020-03-07 16:32:05.000000000
-0500
++++ shadow-4.8.1/libmisc/idmapping.c 2020-03-07 16:32:27.000000000 -0500
+@@ -36,8 +36,8 @@
+ #include <stdio.h>
+ #include "prototypes.h"
+ #include "idmapping.h"
+-#include <sys/prctl.h>
+ #if HAVE_SYS_CAPABILITY_H
++#include <sys/prctl.h>
+ #include <sys/capability.h>
+ #endif
+