Subject: Re: [bug#40579] [RFC PATCH] add iPXE.

From: Tobias Geerinckx-Rice <[email-masked]>
Date: Sun, 12 Apr 2020 20:47:23 +0200

Vincent,

Thank you!  Brief review, will build & maybe notice more later:

Vincent Legoll 写道：
> The licensing is "interesting", see:
>
> https://ipxe.org/licensing
>
> Is that a problem ?

Could you elaborate?  What's "interesting" about it?  That all 
looks very boring and straightforward to me (which is good! :-) — 
the result is GPL2-only, no?

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

You can use the GIT-FILE-NAME helper here.

+     `(#:phases (modify-phases %standard-phases

Aside: I'd indent arguments' #:keywords as

+     `(#:phases
+       (modify-phases %standard-phases

to give you more breathing room at deeper indentation levels. 
It's
not needed now, but if someone were to add a new phase they might
                                                            have
                                                            to
                                                            do
                                                            annoying
                                                            things,
or re-indent the entire thing later, causing noise.  Maybe that's 
just me though.

+                  (add-after 'unpack 'add-real-make-install
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (substitute* "src/Makefile"
+                        (("^install :")
+                         (string-append "install :"
+                                        "\n\t@$(MKDIR) -p "
+                                        (assoc-ref outputs "out") 
"/bin"
+                                        "\n\t@$(CP) $(ALL) "
+                                        (assoc-ref outputs "out") 
"/bin"
+                                        "\n\n__old_install :")))

Interesting approach!  I'm OK with it; looking at ALL it wouldn't 
be more readable or future-proff to use FIND-FILES & Scheme.

/bin is not the right place for these files.  /lib/ipxe looks to 
be the standard; let's use that.

+                  (replace 'build
+                     (lambda _ (with-directory-excursion "src"
+                                 (invoke "make" "-j" 
(number->string
+ 
(parallel-job-count))))))

Let's, instead:

  (add-after 'unpack 'enter-source-directory
    (lambda _ (chdir "src") #t))

Don't worry, the state can't hurt you now.  Now we can keep the 
standard build & install phases.

It might be necessary to add a ‘leave-source-directory’ after 
'install to make sure the licence files are still installed to 
share/doc/.

+       #:tests? #f))
→       #:tests? #f))                    ; no test suite

+    (native-inputs

Nitpick: sort?  :-)

+    (synopsis "PXE-compliant network boot firmware")

I personally like the ‘these are just boot loaders’ angle, but 
would users expect to find this in (gnu packages firmware) 
instead?  Shrug.

+    (license license:gpl2+)))

‘gpl2’ as mentioned above.

If you feel like it (there aren't that many files) you could list 
the licences for each output binary, but that's optional.  The 
combined work appears to be GPL2.

Kind regards,

T G-R