* [bug#34175] [PATCH 2/4] gnu: Add sbsigntools.
2019-01-23 0:03 ` [bug#34175] [PATCH 1/4] gnu: Add gnu-efi Danny Milosavljevic
@ 2019-01-23 0:03 ` Danny Milosavljevic
2019-01-23 8:08 ` Ricardo Wurmus
2019-01-23 0:03 ` [bug#34175] [PATCH 3/4] gnu: Add efitools Danny Milosavljevic
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Danny Milosavljevic @ 2019-01-23 0:03 UTC (permalink / raw)
To: 34175
* gnu/packages/efi.scm (sbsigntools): New variable.
---
gnu/packages/efi.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm
index 3a92370ef..124a4bef8 100644
--- a/gnu/packages/efi.scm
+++ b/gnu/packages/efi.scm
@@ -17,9 +17,16 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages efi)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages man)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages tls)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system gnu)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix utils))
@@ -50,3 +57,61 @@ environment presented by Intel's EFI.")
(home-page "https://directory.fsf.org/wiki/GNU_EFI")
;; FIXME: https://metadata.ftp-master.debian.org/changelogs/main/g/gnu-efi/gnu-efi_3.0.9-1_copyright
(license license:gpl2)))
+
+(define-public sbsigntools
+ (package
+ (name "sbsigntools")
+ (version "0.9.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git")
+ (commit (string-append "v" version))
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "116649ixr6gvw9fqiljfflxsv4293hgm73bmba5ilxrzn4kpbzvb"))))
+ (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)))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("bash" ,bash)
+ ("help2man" ,help2man)
+ ("pkg-config" ,pkg-config)
+ ("util-linux" ,util-linux))) ; getopt
+ (inputs
+ `(("gnu-efi" ,gnu-efi)
+ ("openssl" ,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/")
+ (license license:gpl3+)))
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#34175] [PATCH 3/4] gnu: Add efitools.
2019-01-23 0:03 ` [bug#34175] [PATCH 1/4] gnu: Add gnu-efi Danny Milosavljevic
2019-01-23 0:03 ` [bug#34175] [PATCH 2/4] gnu: Add sbsigntools Danny Milosavljevic
@ 2019-01-23 0:03 ` Danny Milosavljevic
2019-01-23 8:09 ` Ricardo Wurmus
2019-01-23 0:03 ` [bug#34175] [PATCH 4/4] gnu: Add efilinux Danny Milosavljevic
2019-01-23 8:05 ` [bug#34175] [PATCH 1/4] gnu: Add gnu-efi Ricardo Wurmus
3 siblings, 1 reply; 11+ messages in thread
From: Danny Milosavljevic @ 2019-01-23 0:03 UTC (permalink / raw)
To: 34175
* gnu/packages/efi.scm (efitools): New variable.
---
gnu/packages/efi.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm
index 124a4bef8..cef37b62a 100644
--- a/gnu/packages/efi.scm
+++ b/gnu/packages/efi.scm
@@ -21,6 +21,7 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages linux)
#:use-module (gnu packages man)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages tls)
#:use-module ((guix licenses) #:prefix license:)
@@ -115,3 +116,64 @@ environment presented by Intel's EFI.")
(description "This package provides tools for signing EFI binaries.")
(home-page "https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git/")
(license license:gpl3+)))
+
+(define-public efitools
+ (package
+ (name "efitools")
+ (version "1.9.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jabgl2pxvfl780yvghq131ylpf82k7banjz0ksjhlm66ik8gb1i"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; No tests exist.
+ #:make-flags
+ '("CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* "Make.rules"
+ (("/usr/include/efi")
+ (string-append (assoc-ref inputs "gnu-efi")
+ "/include/efi"))
+ (("\\$\\(DESTDIR\\)/usr")
+ (string-append (assoc-ref outputs "out")))
+ (("/usr/lib/gnuefi")
+ (string-append (assoc-ref inputs "gnu-efi")
+ "/lib")))
+ #t))
+ (add-after 'unpack 'patch-more-shebangs
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "xxdi.pl"
+ (("#!.*")
+ (string-append "#!"
+ (assoc-ref inputs "perl")
+ "/bin/perl\n")))
+ #t))
+ (delete 'configure))))
+ (native-inputs
+ `(("help2man" ,help2man)
+ ("perl" ,perl)
+ ("perl-file-slurp" ,perl-file-slurp)
+ ("sbsigntools" ,sbsigntools)))
+ (inputs
+ `(("gnu-efi" ,gnu-efi)
+ ("openssl" ,openssl)))
+ (synopsis "EFI tools (key management, variable management)")
+ (description "This package provides EFI tools for EFI key management
+and EFI variable management.")
+ (home-page "https://blog.hansenpartnership.com/efitools-1-4-with-linux-key-manipulation-utilities-released/")
+ ;; Programs are under GPL 2.
+ ;; Library routines (in lib/) are under LGPL 2.1.
+ ;; Compiling/linking/using OpenSSL is permitted.
+ (license (list license:gpl2
+ license:lgpl2.1))))
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#34175] [PATCH 4/4] gnu: Add efilinux.
2019-01-23 0:03 ` [bug#34175] [PATCH 1/4] gnu: Add gnu-efi Danny Milosavljevic
2019-01-23 0:03 ` [bug#34175] [PATCH 2/4] gnu: Add sbsigntools Danny Milosavljevic
2019-01-23 0:03 ` [bug#34175] [PATCH 3/4] gnu: Add efitools Danny Milosavljevic
@ 2019-01-23 0:03 ` Danny Milosavljevic
2019-01-23 8:12 ` Ricardo Wurmus
2019-01-23 8:05 ` [bug#34175] [PATCH 1/4] gnu: Add gnu-efi Ricardo Wurmus
3 siblings, 1 reply; 11+ messages in thread
From: Danny Milosavljevic @ 2019-01-23 0:03 UTC (permalink / raw)
To: 34175
* gnu/packages/efi.scm (efilinux): New variable.
---
gnu/packages/efi.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm
index cef37b62a..3ef06dd22 100644
--- a/gnu/packages/efi.scm
+++ b/gnu/packages/efi.scm
@@ -177,3 +177,42 @@ and EFI variable management.")
;; Compiling/linking/using OpenSSL is permitted.
(license (list license:gpl2
license:lgpl2.1))))
+
+(define-public efilinux
+ (package
+ (name "efilinux")
+ (version "1.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mfleming/efilinux.git")
+ (commit (string-append "efilinux-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0b4nxzr3wl5v4b52r79iw1arfgasz26xb38r2blw9v2qz2s1q9w2"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list "CC=gcc"
+ (string-append "INCDIR=" (assoc-ref %build-inputs "gnu-efi")
+ "/include")
+ (string-append "LIBDIR=" (assoc-ref %build-inputs "gnu-efi")
+ "/lib"))
+ #:tests? #f ; No tests exist.
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (install-file "efilinux.efi"
+ (string-append (assoc-ref outputs "out")
+ "/libexec"))
+ #t)))))
+ (inputs
+ `(("gnu-efi" ,gnu-efi)))
+ (synopsis "Minimal Linux loader for UEFI")
+ (description "This package provides a minimal Linux loader as an UEFI
+program.")
+ (home-page "https://github.com/mfleming/efilinux")
+ (license license:bsd-2)))
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [bug#34175] [PATCH 4/4] gnu: Add efilinux.
2019-01-23 0:03 ` [bug#34175] [PATCH 4/4] gnu: Add efilinux Danny Milosavljevic
@ 2019-01-23 8:12 ` Ricardo Wurmus
0 siblings, 0 replies; 11+ messages in thread
From: Ricardo Wurmus @ 2019-01-23 8:12 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: 34175
Danny Milosavljevic <dannym@scratchpost.org> writes:
> * gnu/packages/efi.scm (efilinux): New variable.
[…]
> + (arguments
> + `(#:make-flags
> + (list "CC=gcc"
> + (string-append "INCDIR=" (assoc-ref %build-inputs "gnu-efi")
> + "/include")
> + (string-append "LIBDIR=" (assoc-ref %build-inputs "gnu-efi")
> + "/lib"))
Nitpick: I’d use a let binding for (assoc-ref %build-inputs "gnu-efi").
> + #:tests? #f ; No tests exist.
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure)
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (install-file "efilinux.efi"
> + (string-append (assoc-ref outputs "out")
> + "/libexec"))
The indentation of "/libexec" is off.
Otherwise LGTM.
--
Ricardo
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#34175] [PATCH 1/4] gnu: Add gnu-efi.
2019-01-23 0:03 ` [bug#34175] [PATCH 1/4] gnu: Add gnu-efi Danny Milosavljevic
` (2 preceding siblings ...)
2019-01-23 0:03 ` [bug#34175] [PATCH 4/4] gnu: Add efilinux Danny Milosavljevic
@ 2019-01-23 8:05 ` Ricardo Wurmus
2019-01-25 17:48 ` Danny Milosavljevic
3 siblings, 1 reply; 11+ messages in thread
From: Ricardo Wurmus @ 2019-01-23 8:05 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: 34175
Hi Danny,
> * gnu/packages/efi.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
[…]
> diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm
> new file mode 100644
> index 000000000..3a92370ef
> --- /dev/null
> +++ b/gnu/packages/efi.scm
> @@ -0,0 +1,52 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
It’s 2019.
> +(define-public gnu-efi
> + (package
> + (name "gnu-efi")
> + (version "3.0.9")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "mirror://sourceforge/gnu-efi/"
> + name "-" version ".tar.bz2"))
> + (sha256
> + (base32
> + "1w3p4aqlc5j93q44la7dc8cr3hky20zvsd0h0k2lyzhwmrzfl5b7"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ; None exist.
> + #:make-flags
> + (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure))))
> + (synopsis "EFI toolchain")
> + (description "This package provides an EFI (Extensible Firmware
> +Interface) toolchain for building programs that can run in the
> +environment presented by Intel's EFI.")
> + (home-page "https://directory.fsf.org/wiki/GNU_EFI")
> + ;; FIXME: https://metadata.ftp-master.debian.org/changelogs/main/g/gnu-efi/gnu-efi_3.0.9-1_copyright
> + (license license:gpl2)))
What does the FIXME tell us to do? Should this be
;; The code can be distributed under the terms of either license
(license (list license:gpl2+ license:expat))
--
Ricardo
^ permalink raw reply [flat|nested] 11+ messages in thread
* [bug#34175] [PATCH 1/4] gnu: Add gnu-efi.
2019-01-23 8:05 ` [bug#34175] [PATCH 1/4] gnu: Add gnu-efi Ricardo Wurmus
@ 2019-01-25 17:48 ` Danny Milosavljevic
0 siblings, 0 replies; 11+ messages in thread
From: Danny Milosavljevic @ 2019-01-25 17:48 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 34175
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]
Hi,
On Wed, 23 Jan 2019 09:05:53 +0100
Ricardo Wurmus <rekado@elephly.net> wrote:
> Hi Danny,
>
> > * gnu/packages/efi.scm: New file.
> > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> […]
> > diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm
> > new file mode 100644
> > index 000000000..3a92370ef
> > --- /dev/null
> > +++ b/gnu/packages/efi.scm
> > @@ -0,0 +1,52 @@
> > +;;; GNU Guix --- Functional package management for GNU
> > +;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
>
> It’s 2019.
Ah, it must be a new low of me getting the year wrong ;-)
> > + ;; FIXME: https://metadata.ftp-master.debian.org/changelogs/main/g/gnu-efi/gnu-efi_3.0.9-1_copyright
> > + (license license:gpl2)))
>
> What does the FIXME tell us to do? Should this be
>
> ;; The code can be distributed under the terms of either license
> (license (list license:gpl2+ license:expat))
I wanted the reuse the work Debian already did. They list:
* BSD-3-clause-HP
* BSD-2-clause-Linaro or gpl-2+
* BSD-2-clause-Intel
* Expat
* BSD-4-clause-Intel
* GPL-2+
BSD-4-clause is incompatible with GPL.
Therefore, it's lucky that they say "BSD-2-clause-Linaro OR gpl-2+", otherwise
we could not have distributed gnu-efi.
So I suggest:
;; Distribution is allowed only when accepting all those licenses.
(license (list license:bsd-2 license:bsd-3 license:bsd-4 license:expat))
What do you think?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread