unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49293] [PATCH] isc-dhcp: Fix dhclient-script wrapper when cross-compiling.
@ 2021-06-30 14:13 Maxime Devos
  2021-07-07 14:28 ` Mathieu Othacehe
  0 siblings, 1 reply; 5+ messages in thread
From: Maxime Devos @ 2021-06-30 14:13 UTC (permalink / raw)
  To: 49293


[-- Attachment #1.1: Type: text/plain, Size: 167 bytes --]

This causes many rebuilds, but only when cross-compiling.
This should unbreak Internet access on cross-compiled pinebook
images.

Reported-By: Guest4977 (on IRC)

[-- Attachment #1.2: 0001-isc-dhcp-Fix-dhclient-script-wrapper-when-cross-comp.patch --]
[-- Type: text/x-patch, Size: 3119 bytes --]

From 12973e011f031f0142d1cb4ab0a6dcb1376cc449 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Wed, 30 Jun 2021 15:43:42 +0200
Subject: [PATCH] isc-dhcp: Fix dhclient-script wrapper when cross-compiling.

This causes many rebuilds, but only when cross-compiling.
This should unbreak Internet access on cross-compiled pinebook
images.

Reported-By: Guest4977 (on IRC)

* gnu/gnunet/packages/admin.scm
  (isc-dhcp)[arguments]<#:phases>{post-install}: Use the
  cross-compiled bash when cross-compiling. Work-around
  <https://issues.guix.gnu.org/49290>.
---
 gnu/packages/admin.scm | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 16fcdfcb8c..bb66e005a7 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -42,6 +42,7 @@
 ;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
 ;;; Copyright © 2021 WinterHound <winterhound@yandex.com>
 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1228,7 +1229,11 @@ connection alive.")
                            "--owner=root:0"
                            "--group=root:0")))))
            (add-after 'install 'post-install
-             (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; TODO(core-updates): native-inputs isn't required anymore.
+             (lambda* (#:key ,@(if (%current-target-system)
+                                   '(native-inputs)
+                                   '())
+                       inputs outputs #:allow-other-keys)
                ;; Install the dhclient script for GNU/Linux and make sure
                ;; if finds all the programs it needs.
                (let* ((out       (assoc-ref outputs "out"))
@@ -1253,6 +1258,13 @@ connection alive.")
                              (string-append dir "/bin:"
                                             dir "/sbin"))
                            (list inetutils net-tools coreutils sed))))
+                 ;; TODO(core-updates): should not be required anymore,
+                 ;; once <https://issues.guix.gnu.org/49290> has been merged.
+                 ,@(if (%current-target-system)
+                       '((substitute* (string-append libexec "/dhclient-script")
+                           (((assoc-ref native-inputs "bash"))
+                            (assoc-ref inputs "bash"))))
+                       '())
                  #t))))))
 
       (native-inputs
@@ -1260,6 +1272,11 @@ connection alive.")
          ("file" ,file)))
 
       (inputs `(("inetutils" ,inetutils)
+                ;; TODO(core-updates): simply make this unconditional
+                ,@(if (%current-target-system)
+                      ;; for wrap-program
+                      `(("bash" ,(canonical-package bash-minimal)))
+                      '())
                 ,@(if (hurd-target?) '()
                       `(("net-tools" ,net-tools)
                         ("iproute" ,iproute)))
-- 
2.32.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-29  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 14:13 [bug#49293] [PATCH] isc-dhcp: Fix dhclient-script wrapper when cross-compiling Maxime Devos
2021-07-07 14:28 ` Mathieu Othacehe
2021-07-08 20:44   ` Maxime Devos
2021-07-08 21:00     ` Mathieu Othacehe
2021-08-29  9:58     ` bug#49293: " Mathieu Othacehe

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).