unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#63793] [PATCH] gnu: sbsigntools: Update to 0.9.5.
@ 2023-05-29 21:53 kiasoc5 via Guix-patches via
  2023-06-04  9:41 ` bug#63793: " Josselin Poiret via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: kiasoc5 via Guix-patches via @ 2023-05-29 21:53 UTC (permalink / raw)
  To: 63793; +Cc: kiasoc5

This fixes a build failure with openssl-3.

* gnu/packages/efi.scm (sbsigntools): Update to 0.9.5.
[arguments]: Remove trailing #t's. Use Gexps. Use "this-package-input". Simplify lambdas.
[inputs]: Remove labels.
---
 gnu/packages/efi.scm | 58 +++++++++++++++++++++-----------------------
 1 file changed, 28 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm
index 75eb24bf86..50d52c4d65 100644
--- a/gnu/packages/efi.scm
+++ b/gnu/packages/efi.scm
@@ -30,6 +30,7 @@ (define-module (gnu packages efi)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -99,7 +100,7 @@ (define-public efi-analyzer
 (define-public sbsigntools
   (package
     (name "sbsigntools")
-    (version "0.9.4")
+    (version "0.9.5")
     (source
      (origin
        (method git-fetch)
@@ -110,34 +111,31 @@ (define-public sbsigntools
          (recursive? #t)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1y76wy65y6k10mjl2dm5hb5ms475alr4s080xzj8y833x01xvf3m"))))
+        (base32 "060n6w0dx1mrilhdv482ncckanqz6pdv53piimiki0bm15d2fcp4"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-more-shebangs
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "lib/ccan.git/tools/create-ccan-tree"
-              (("#!/bin/bash")
-               (string-append "#!"
-                              (assoc-ref inputs "bash")
-                              "/bin/bash")))
-             #t))
-         (add-after 'unpack 'patch
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (substitute* '("configure.ac"
-                            "tests/Makefile.am")
-              (("/usr/include/efi")
-               (string-append (assoc-ref inputs "gnu-efi")
-                              "/include/efi"))
-              (("/usr/lib/gnuefi")
-               (string-append (assoc-ref inputs "gnu-efi")
-                              "/lib")))
-             #t))
-         (add-after 'unpack 'setenv
-           (lambda _
-             (setenv "CC" "gcc")
-             #t)))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-more-shebangs
+                 (lambda _
+                   (substitute* "lib/ccan.git/tools/create-ccan-tree"
+                     (("#!/bin/bash")
+                      (string-append "#!"
+                                     #$(this-package-native-input "bash")
+                                     "/bin/bash")))))
+               (add-after 'unpack 'patch
+                 (lambda _
+                   (substitute* '("configure.ac"
+                                  "tests/Makefile.am")
+                     (("/usr/include/efi")
+                      (string-append #$(this-package-input "gnu-efi")
+                                     "/include/efi"))
+                     (("/usr/lib/gnuefi")
+                      (string-append #$(this-package-input "gnu-efi")
+                                     "/lib")))))
+               (add-after 'unpack 'setenv
+                 (lambda _
+                   (setenv "CC" "gcc"))))))
     (native-inputs
      (list autoconf
            automake
@@ -146,9 +144,9 @@ (define-public sbsigntools
            pkg-config
            util-linux)) ; getopt
     (inputs
-     `(("gnu-efi" ,gnu-efi)
-       ("libuuid" ,util-linux "lib")
-       ("openssl" ,openssl)))
+     (list gnu-efi
+           `(,util-linux "lib") ; libuuid
+           openssl))
     (synopsis "EFI signing tools")
     (description "This package provides tools for signing EFI binaries.")
     (home-page "https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git/")

base-commit: b96b82bcd4bc24529941ff74a91432481f1a71b5
-- 
2.40.1





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

* bug#63793: [PATCH] gnu: sbsigntools: Update to 0.9.5.
  2023-05-29 21:53 [bug#63793] [PATCH] gnu: sbsigntools: Update to 0.9.5 kiasoc5 via Guix-patches via
@ 2023-06-04  9:41 ` Josselin Poiret via Guix-patches via
  2023-06-04 13:54   ` [bug#63793] " kiasoc5 via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-06-04  9:41 UTC (permalink / raw)
  To: kiasoc5, 63793-done; +Cc: Felix Lechner

[-- Attachment #1: Type: text/plain, Size: 3263 bytes --]

Hi,

kiasoc5 via Guix-patches via <guix-patches@gnu.org> writes:

> This fixes a build failure with openssl-3.
>
> * gnu/packages/efi.scm (sbsigntools): Update to 0.9.5.
> [arguments]: Remove trailing #t's. Use Gexps. Use "this-package-input". Simplify lambdas.
> [inputs]: Remove labels.

Thanks for your patch!  Pushed as
f72f3a909a41dce5dc4512c30d4cd0673bc6560f with the following best
practices modifications (importantly, note cc-for-target and
search-input-file for bash).

By the way, please enable forceinbodyfrom in git so that a pristine From
field is inserted into your patches, as your mail From list is being
rewritten to comply with your domain's DKIM.

diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm
index 50d52c4d65..499745eba1 100644
--- a/gnu/packages/efi.scm
+++ b/gnu/packages/efi.scm
@@ -114,28 +114,29 @@ (define-public sbsigntools
         (base32 "060n6w0dx1mrilhdv482ncckanqz6pdv53piimiki0bm15d2fcp4"))))
     (build-system gnu-build-system)
     (arguments
-     (list #:phases
-           #~(modify-phases %standard-phases
-               (add-after 'unpack 'patch-more-shebangs
-                 (lambda _
-                   (substitute* "lib/ccan.git/tools/create-ccan-tree"
-                     (("#!/bin/bash")
-                      (string-append "#!"
-                                     #$(this-package-native-input "bash")
-                                     "/bin/bash")))))
-               (add-after 'unpack 'patch
-                 (lambda _
-                   (substitute* '("configure.ac"
-                                  "tests/Makefile.am")
-                     (("/usr/include/efi")
-                      (string-append #$(this-package-input "gnu-efi")
-                                     "/include/efi"))
-                     (("/usr/lib/gnuefi")
-                      (string-append #$(this-package-input "gnu-efi")
-                                     "/lib")))))
-               (add-after 'unpack 'setenv
-                 (lambda _
-                   (setenv "CC" "gcc"))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-more-shebangs
+            (lambda* (#:key inputs native-inputs #:allow-other-keys)
+              (substitute* "lib/ccan.git/tools/create-ccan-tree"
+                (("#!/bin/bash")
+                 (string-append "#!"
+                                (search-input-file (or native-inputs inputs)
+                                                   "/bin/bash"))))))
+          (add-after 'unpack 'patch
+            (lambda _
+              (substitute* '("configure.ac"
+                             "tests/Makefile.am")
+                (("/usr/include/efi")
+                 (string-append #$(this-package-input "gnu-efi")
+                                "/include/efi"))
+                (("/usr/lib/gnuefi")
+                 (string-append #$(this-package-input "gnu-efi")
+                                "/lib")))))
+          (add-after 'unpack 'setenv
+            (lambda _
+              (setenv "CC" #$(cc-for-target)))))))
     (native-inputs
      (list autoconf
            automake

-- 
Josselin Poiret

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

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

* [bug#63793] [PATCH] gnu: sbsigntools: Update to 0.9.5.
  2023-06-04  9:41 ` bug#63793: " Josselin Poiret via Guix-patches via
@ 2023-06-04 13:54   ` kiasoc5 via Guix-patches via
  2023-06-04 15:06     ` Josselin Poiret via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: kiasoc5 via Guix-patches via @ 2023-06-04 13:54 UTC (permalink / raw)
  To: Josselin Poiret, 63793-done; +Cc: Felix Lechner

Hi Josselin,

On 6/4/23 05:41, Josselin Poiret wrote:

> Thanks for your patch!  Pushed as
> f72f3a909a41dce5dc4512c30d4cd0673bc6560f with the following best
> practices modifications (importantly, note cc-for-target and
> search-input-file for bash).

Thanks for merging!

What is the difference between this

> -                 (lambda _
> -                   (substitute* "lib/ccan.git/tools/create-ccan-tree"
> -                     (("#!/bin/bash")
> -                      (string-append "#!"
> -                                     #$(this-package-native-input "bash")
> -                                     "/bin/bash")))))

and this?

> +            (lambda* (#:key inputs native-inputs #:allow-other-keys)
> +              (substitute* "lib/ccan.git/tools/create-ccan-tree"
> +                (("#!/bin/bash")
> +                 (string-append "#!"
> +                                (search-input-file (or native-inputs inputs)
> +                                                   "/bin/bash"))))))

I meant to search for bash as a native input but I guess they are different.




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

* [bug#63793] [PATCH] gnu: sbsigntools: Update to 0.9.5.
  2023-06-04 13:54   ` [bug#63793] " kiasoc5 via Guix-patches via
@ 2023-06-04 15:06     ` Josselin Poiret via Guix-patches via
  0 siblings, 0 replies; 4+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-06-04 15:06 UTC (permalink / raw)
  To: kiasoc5, 63793-done; +Cc: Felix Lechner

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

Hi kiasoc5,

kiasoc5 <kiasoc5@disroot.org> writes:

> What is the difference between this
>
>> -                 (lambda _
>> -                   (substitute* "lib/ccan.git/tools/create-ccan-tree"
>> -                     (("#!/bin/bash")
>> -                      (string-append "#!"
>> -                                     #$(this-package-native-input "bash")
>> -                                     "/bin/bash")))))
>
> and this?
>
>> +            (lambda* (#:key inputs native-inputs #:allow-other-keys)
>> +              (substitute* "lib/ccan.git/tools/create-ccan-tree"
>> +                (("#!/bin/bash")
>> +                 (string-append "#!"
>> +                                (search-input-file (or native-inputs inputs)
>> +                                                   "/bin/bash"))))))
>
> I meant to search for bash as a native input but I guess they are different.

In general, the first method doesn't compose well with package
transformations that replace inputs, since it will still refer to the
original bash input.  The bottom one will always search for a /bin/bash
binary among all the inputs, so will pick up a new one if the input is
replaced.  Also, in general, inside phases, if you're building natively,
native-inputs is always #f and inputs also contains the native inputs,
hence the need for that (or ...) form.

HTH,
-- 
Josselin Poiret

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

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

end of thread, other threads:[~2023-06-04 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 21:53 [bug#63793] [PATCH] gnu: sbsigntools: Update to 0.9.5 kiasoc5 via Guix-patches via
2023-06-04  9:41 ` bug#63793: " Josselin Poiret via Guix-patches via
2023-06-04 13:54   ` [bug#63793] " kiasoc5 via Guix-patches via
2023-06-04 15:06     ` Josselin Poiret via Guix-patches via

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).