unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#45825] [PATCH] gnu: Add efi_analyzer.
@ 2021-01-12 19:37 Vincent Legoll
  2021-01-12 22:02 ` bug#45825: " Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Legoll @ 2021-01-12 19:37 UTC (permalink / raw)
  To: 45825; +Cc: Vincent Legoll

* gnu/packages/engineering.scm (efi_analyzer): New variable.
---
 gnu/packages/engineering.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 5166a4635c..1c001cbe0f 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1580,6 +1580,33 @@ like relocation symbols.  It is able to deal with malformed binaries, making
 it suitable for security research and analysis.")
     (license license:lgpl3)))
 
+(define-public efi_analyzer
+  (let ((commit "77c9e3a67cd7c2fca48a4292dad25a5429872f95")
+        (revision "0"))
+    (package
+      (name "efi_analyzer")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/xypron/efi_analyzer")
+                      (commit commit)))
+                (sha256
+                 (base32 "1izdkzybqyvzpzqz6kx4j7y47j6aa2dsdrychzgs65466x1a4br1"))
+                (file-name (string-append name "-" version "-checkout"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (delete 'configure))
+         #:make-flags (list "prefix=" (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
+    (home-page "https://github.com/xypron/efi_analyzer")
+    (synopsis "Analyze EFI binary")
+    (description
+     "The EFI Analyzer can be used to check EFI binaries and to print out header
+and section information.")
+    (license license:bsd-2))))
+
 (define-public asco
   (package
     (name "asco")
-- 
2.30.0





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

* bug#45825: [PATCH] gnu: Add efi_analyzer.
  2021-01-12 19:37 [bug#45825] [PATCH] gnu: Add efi_analyzer Vincent Legoll
@ 2021-01-12 22:02 ` Tobias Geerinckx-Rice via Guix-patches via
  2021-01-12 22:17   ` [bug#45825] " Vincent Legoll
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2021-01-12 22:02 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 45825-done, guix-patches

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

Vincent,

Vincent Legoll 写道:
> * gnu/packages/engineering.scm (efi_analyzer): New variable.

Neat!

>  gnu/packages/engineering.scm | 27 +++++++++++++++++++++++++++

I failed to see any connection to engineering and moved this to 
efi.scm.

Don't forget to add or update your copyright line.

> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url 
> "https://github.com/xypron/efi_analyzer")
> +                      (commit commit)))
> +                (sha256
> +                 (base32 
> "1izdkzybqyvzpzqz6kx4j7y47j6aa2dsdrychzgs65466x1a4br1"))

I added a newline after ‘source’ to give this 81-character line 
some breathing room.

URLs, snippets, ... can grow wide and a few columns can save a 
pointless string-append or newlines.

> +                (file-name (string-append name "-" version 
> "-checkout"))))

This can be done with the

  (file-name (git-file-name name version))

helper.

> +      (arguments
> +       `(#:phases
> +         (modify-phases %standard-phases
> +           (delete 'configure))

Not a comment on your patch, but I added a 
‘support-cross-compilation’ phase here that replaces the 
Makefile's hard-coded ‘gcc’ so you can inspect EFI binaries on 
your cross-compiled ARM box.

> +         #:make-flags (list "prefix=" (string-append "DESTDIR=" 
> (assoc-ref %outputs "out")))))

The other way 'round: set $prefix (or the BSD variant $PREFIX) to 
the destination, and never set DESTDIR unless you're working 
around a bug in a broken build system.

DESTDIR is for distributions/builds using a temporary ‘staging’ 
destination directory.  Guix doesn't.

> +    (description
> +     "The EFI Analyzer can be used to check EFI binaries and to 
> print out header
> +and section information.")

Slash empty ‘x can y’ (or ‘x allows the user to y’) filler with 
gleeful prejudice.

Pushed with these changes as 
373f808df229c12101301b766bd1810836b98481.

Thanks!

T G-R

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

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

* [bug#45825] [PATCH] gnu: Add efi_analyzer.
  2021-01-12 22:02 ` bug#45825: " Tobias Geerinckx-Rice via Guix-patches via
@ 2021-01-12 22:17   ` Vincent Legoll
  0 siblings, 0 replies; 3+ messages in thread
From: Vincent Legoll @ 2021-01-12 22:17 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 45825, 45825-done

Hello,

On Tue, Jan 12, 2021 at 11:02 PM Tobias Geerinckx-Rice <me@tobias.gr> wrote:
> >  gnu/packages/engineering.scm | 27 +++++++++++++++++++++++++++
>
> I failed to see any connection to engineering and moved this to
> efi.scm.

I searched a bit (debug.scm, etc.) but failed to find
the *really* obvious one :facepalm: I chose engineering
because another rev-eng tool (radare2) was here.

> Don't forget to add or update your copyright line.

I almost always forgot to do that.

> > +      (source (origin
> > +                (method git-fetch)
> > +                (uri (git-reference
> > +                      (url
> > "https://github.com/xypron/efi_analyzer")
> > +                      (commit commit)))
> > +                (sha256
> > +                 (base32
> > "1izdkzybqyvzpzqz6kx4j7y47j6aa2dsdrychzgs65466x1a4br1"))
>
> I added a newline after ‘source’ to give this 81-character line
> some breathing room.

This one I swear I ran the etc/indent.el script on, was it in
my brain only ?

> > +                (file-name (string-append name "-" version
> > "-checkout"))))
>
> This can be done with the
>
>   (file-name (git-file-name name version))
>
> helper.

Argh, another forgetting, you probably taught me that
a few times already.

> > +      (arguments
> > +       `(#:phases
> > +         (modify-phases %standard-phases
> > +           (delete 'configure))
>
> Not a comment on your patch, but I added a
> ‘support-cross-compilation’ phase here that replaces the
> Makefile's hard-coded ‘gcc’ so you can inspect EFI binaries on
> your cross-compiled ARM box.

I saw that, nice !

> > +         #:make-flags (list "prefix=" (string-append "DESTDIR="
> > (assoc-ref %outputs "out")))))
>
> The other way 'round: set $prefix (or the BSD variant $PREFIX) to
> the destination, and never set DESTDIR unless you're working
> around a bug in a broken build system.
>
> DESTDIR is for distributions/builds using a temporary ‘staging’
> destination directory.  Guix doesn't.

OK, I hesitated between the 2 options, and failed to choose the
right one :-))

> > +    (description
> > +     "The EFI Analyzer can be used to check EFI binaries and to
> > print out header
> > +and section information.")
>
> Slash empty ‘x can y’ (or ‘x allows the user to y’) filler with
> gleeful prejudice.

Just a copy-paste from upstream (should have proof read it, though)

Thanks a lot for your patience in bearing with my half-baked
submissions.

I think I'll owe you a beer (or two).

Tchuss

-- 
Vincent Legoll




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

end of thread, other threads:[~2021-01-12 22:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 19:37 [bug#45825] [PATCH] gnu: Add efi_analyzer Vincent Legoll
2021-01-12 22:02 ` bug#45825: " Tobias Geerinckx-Rice via Guix-patches via
2021-01-12 22:17   ` [bug#45825] " Vincent Legoll

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