me
/
guix
Archived
1
0
Fork 0

gnu: shepherd: Build fix for the Hurd.

* gnu/packages/patches/shepherd-hurd.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/admin.scm (shepherd): Use it.
master
Jan Nieuwenhuizen 2020-03-07 16:11:48 +01:00
parent 22ee720979
commit c0a5cd1be3
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
3 changed files with 47 additions and 0 deletions

View File

@ -1428,6 +1428,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/shepherd-hurd.patch \
%D%/packages/patches/shishi-fix-libgcrypt-detection.patch \
%D%/packages/patches/slim-session.patch \
%D%/packages/patches/slim-config.patch \

View File

@ -74,6 +74,7 @@
#:use-module (gnu packages file)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
#:use-module (gnu packages hurd)
#:use-module (gnu packages libbsd)
#:use-module (gnu packages linux)
#:use-module (gnu packages lua)
@ -202,6 +203,7 @@ and provides a \"top-like\" mode (monitoring).")
(method url-fetch)
(uri (string-append "mirror://gnu/shepherd/shepherd-"
version ".tar.gz"))
(patches (search-patches "shepherd-hurd.patch"))
(sha256
(base32
"07j3vd0y8zab2nwbrwj0ahrfif1ldm5sjssn7m3dw4s307fsrfzx"))))

View File

@ -0,0 +1,44 @@
Fixes compilation on the Hurd.
Taken from upstream: http://git.savannah.gnu.org/cgit/shepherd.git/commit/?id=232331369fe2a0495c7c777e11eecabee6257b3f
From 232331369fe2a0495c7c777e11eecabee6257b3f Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Sat, 7 Mar 2020 22:01:23 +0100
Subject: [PATCH] system: Support compilation on the Hurd.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* modules/shepherd/system.scm.in (prctl): Wrap 'dynamic-func' call in
'false-if-exception'.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
modules/shepherd/system.scm.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/shepherd/system.scm.in b/modules/shepherd/system.scm.in
index 769404a..0b2cc9d 100644
--- a/modules/shepherd/system.scm.in
+++ b/modules/shepherd/system.scm.in
@@ -1,6 +1,7 @@
;; system.scm -- Low-level operating system interface.
;; Copyright (C) 2013, 2014, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
;; Copyright (C) 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
+;; Copyright (C) 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;
;; This file is part of the GNU Shepherd.
;;
@@ -145,7 +146,7 @@ ctrlaltdel(8) and see kernel/reboot.c in Linux."
(define PR_SET_CHILD_SUBREAPER @PR_SET_CHILD_SUBREAPER@)
(define prctl
- (if (dynamic-func "prctl" (dynamic-link))
+ (if (false-if-exception (dynamic-func "prctl" (dynamic-link)))
(let ((proc (syscall->procedure long "prctl" (list int int))))
(lambda (process operation)
"Perform an operation on the given process"
--
2.24.0