GNU bug report logs - #44576
[PATCH] gnu: sed: selinux test when running on a foreign os that uses

Previous Next

Package: guix-patches;

Reported by: Daniel Brooks <db48x <at> db48x.net>

Date: Wed, 11 Nov 2020 14:47:01 UTC

Severity: normal

Tags: patch

Done: Timothy Sample <samplet <at> ngyro.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44576 in the body.
You can then email your comments to 44576 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#44576; Package guix-patches. (Wed, 11 Nov 2020 14:47:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Brooks <db48x <at> db48x.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 11 Nov 2020 14:47:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Brooks <db48x <at> db48x.net>
To: Guix Patches List <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: sed: selinux test when running on a foreign os that uses
Date: Wed, 11 Nov 2020 06:46:33 -0800
[0001-gnu-sed-selinux-test-when-running-on-a-foreign-os-th.patch (text/x-patch, inline)]
From a14efc3664d2eccb49f37cb5b14058261f3c8726 Mon Sep 17 00:00:00 2001
From: Daniel Brooks <db48x <at> db48x.net>
Date: Wed, 11 Nov 2020 06:40:58 -0800
Subject: [PATCH] gnu: sed: selinux test when running on a foreign os that uses
 selinux

* gnu/packages/patches/sed-inplace-selinux-test.patch: new patch
* gnu/packages/base.scm (sed): add patch that sets the CONFIG_HEADER variable
to the appropriate value. sed's build system is supposed to pass this variable
along form the Makefile, but fails to do so. After several attempts to fix the
build system, I decided just to fix it the simplest way. This does make the
assumption that Guix isn't going to override the name of the config header,
but that seems like a pretty safe assumption.
---
 gnu/packages/base.scm                               |  3 ++-
 gnu/packages/patches/sed-inplace-selinux-test.patch | 11 +++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/sed-inplace-selinux-test.patch

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index c83775d8ee..419f6039cc 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -141,7 +141,8 @@ including, for example, recursive directory searching.")
                                 ".tar.gz"))
             (sha256
              (base32
-              "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk"))))
+              "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk"))
+            (patches (search-patches "sed-inplace-selinux-test.patch"))))
    (build-system gnu-build-system)
    (synopsis "Stream editor")
    (native-inputs
diff --git a/gnu/packages/patches/sed-inplace-selinux-test.patch b/gnu/packages/patches/sed-inplace-selinux-test.patch
new file mode 100644
index 0000000000..16238c119c
--- /dev/null
+++ b/gnu/packages/patches/sed-inplace-selinux-test.patch
@@ -0,0 +1,11 @@
+--- sed-4.8/testsuite/inplace-selinux.sh	2020-01-01 11:38:19.000000000 -0800
++++ sed/testsuite/inplace-selinux.sh	2020-11-11 06:35:49.850724638 -0800
+@@ -16,6 +16,8 @@
+ # along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ . "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+ print_ver_ sed
++# this is a hack, but it's easier than trying to decypher sed's build system
++CONFIG_HEADER=config.h
+ require_selinux_
+ 
+ sed --version | grep -q "with SELinux" \
-- 
2.26.2





Information forwarded to guix-patches <at> gnu.org:
bug#44576; Package guix-patches. (Wed, 11 Nov 2020 15:20:01 GMT) Full text and rfc822 format available.

Message #8 received at 44576 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Brooks <db48x <at> db48x.net>
To: 44576 <at> debbugs.gnu.org
Subject: [PATCH] I forgot to add the patch to gnu/local.mk
Date: Wed, 11 Nov 2020 07:19:08 -0800
[0001-I-forgot-to-add-the-patch-to-gnu-local.mk.patch (text/x-patch, inline)]
From ae5d5ce3ff8109d6a7105b60a8f14b957826d7ad Mon Sep 17 00:00:00 2001
From: Daniel Brooks <db48x <at> db48x.net>
Date: Wed, 11 Nov 2020 07:10:57 -0800
Subject: [PATCH] I forgot to add the patch to gnu/local.mk

* gnu/packages/patches/sed-inplace-selinux-test.patch: improve explanatory comment
* gnu/local.mk (dist_patch_DATA): add patch
---
 gnu/local.mk                                        | 1 +
 gnu/packages/patches/sed-inplace-selinux-test.patch | 9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index c2b2143213..96f65a24ae 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1427,6 +1427,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
   %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch		\
   %D%/packages/patches/samba-fix-fcntl-hint-detection.patch		\
+  %D%/packages/patches/sed-inplace-selinux-test.patch			\
   %D%/packages/patches/sdcc-disable-non-free-code.patch		\
   %D%/packages/patches/sdl-pango-api_additions.patch		\
   %D%/packages/patches/sdl-pango-blit_overflow.patch		\
diff --git a/gnu/packages/patches/sed-inplace-selinux-test.patch b/gnu/packages/patches/sed-inplace-selinux-test.patch
index 16238c119c..f4a22427d0 100644
--- a/gnu/packages/patches/sed-inplace-selinux-test.patch
+++ b/gnu/packages/patches/sed-inplace-selinux-test.patch
@@ -1,10 +1,13 @@
 --- sed-4.8/testsuite/inplace-selinux.sh	2020-01-01 11:38:19.000000000 -0800
-+++ sed/testsuite/inplace-selinux.sh	2020-11-11 06:35:49.850724638 -0800
-@@ -16,6 +16,8 @@
++++ sed/testsuite/inplace-selinux.sh	2020-11-11 07:03:39.127760794 -0800
+@@ -16,6 +16,11 @@
  # along with this program.  If not, see <https://www.gnu.org/licenses/>.
  . "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
  print_ver_ sed
-+# this is a hack, but it's easier than trying to decypher sed's build system
++# This is a hack, but it's easier than trying to decipher sed's build
++# system.  require_selinux_ checks the contents of CONFIG_HEADER to
++# see if sed was configured to support selinux; if it cannot find the
++# header, then it bails out with an error.
 +CONFIG_HEADER=config.h
  require_selinux_
  
-- 
2.26.2





Reply sent to Timothy Sample <samplet <at> ngyro.com>:
You have taken responsibility. (Wed, 11 Nov 2020 15:38:01 GMT) Full text and rfc822 format available.

Notification sent to Daniel Brooks <db48x <at> db48x.net>:
bug acknowledged by developer. (Wed, 11 Nov 2020 15:38:02 GMT) Full text and rfc822 format available.

Message #13 received at 44576-done <at> debbugs.gnu.org (full text, mbox):

From: Timothy Sample <samplet <at> ngyro.com>
To: Daniel Brooks <db48x <at> db48x.net>
Cc: 44576-done <at> debbugs.gnu.org
Subject: Re: [bug#44576] [PATCH] gnu: sed: selinux test when running on a
 foreign os that uses
Date: Wed, 11 Nov 2020 10:37:36 -0500
Hi Daniel,

Daniel Brooks <db48x <at> db48x.net> writes:

> From a14efc3664d2eccb49f37cb5b14058261f3c8726 Mon Sep 17 00:00:00 2001
> From: Daniel Brooks <db48x <at> db48x.net>
> Date: Wed, 11 Nov 2020 06:40:58 -0800
> Subject: [PATCH] gnu: sed: selinux test when running on a foreign os that uses
>  selinux

Thanks for the patch!  However, this is already fixed on the
“core-updates” branch <https://issues.guix.gnu.org/41498>.  It requires
too many rebuilds to fix on “master”.


-- Tim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 Dec 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 187 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.