From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: [PATCH 4/5] gnu: Add syslinux. Date: Fri, 10 Feb 2017 02:18:05 +0100 Message-ID: <87d1eqsv1u.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> References: <20170209190450.29458-1-david@craven.ch> <20170209190450.29458-7-david@craven.ch> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbzqn-0006ZS-IT for guix-devel@gnu.org; Thu, 09 Feb 2017 20:18:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbzqj-0001Qt-0X for guix-devel@gnu.org; Thu, 09 Feb 2017 20:18:13 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:42884) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cbzqi-0001QN-Ou for guix-devel@gnu.org; Thu, 09 Feb 2017 20:18:08 -0500 In-Reply-To: <20170209190450.29458-7-david@craven.ch> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: David Craven , guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable David Craven writes: > * gnu/packages/grub.scm (syslinux): New variable. > --- > gnu/packages/grub.scm | 54 +++++++++++++++++++++++++++++++++++++++++++++= ++++++ > 1 file changed, 54 insertions(+) > > diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm > index 4da01ceb9..2e692a100 100644 > --- a/gnu/packages/grub.scm > +++ b/gnu/packages/grub.scm > @@ -36,6 +36,7 @@ > #:use-module (gnu packages gettext) > #:use-module (gnu packages fontutils) > #:use-module (gnu packages linux) > + #:use-module (gnu packages perl) > #:use-module (gnu packages python) > #:use-module (gnu packages qemu) > #:use-module (gnu packages man) > @@ -270,3 +271,56 @@ use of coreboot.") > (description "OVMF is an EDK II based project to enable UEFI support= for > Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM= .") > (license license:expat))) > + > +(define-public syslinux > + (let ((commit "bb41e935cc83c6242de24d2271e067d76af3585c")) > + (package > + (name "syslinux") > + (version (git-version "6.04-pre" "1" commit)) I think the most common convention is to use the latest upstream release, and adding revisions on top of it. But no strong opinion. I tried packaging 6.03 a while back and it was very difficult. Most if the problems seems to be solved here, so thanks for doing this. > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/geneC/syslinux") > + (commit commit))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + "0k8dvafd6410kqxf3kyr4y8jzmpmrih6wbjqg6gklak7945yflrc"= )))) > + (build-system gnu-build-system) > + (native-inputs > + `(("nasm" ,nasm) > + ("perl" ,perl) > + ("python-2" ,python-2))) > + (inputs > + `(("libuuid" ,util-linux))) > + (arguments > + `(#:tests? #f > + #:test-target "unittest" This is unfortunate. The "unittest" target is applied recursively, and fails with "no such target" in one of the folders. However, I was able to successfully run the tests by calling the "unittest" target "manually" for some reason, like so: (replace 'check (lambda _ (setenv "CC" "gcc") (substitute* "tests/unittest/include/unittest/unittest.h" ;; Don't look up headers under /usr. (("/usr/include/") "")) (zero? (system* "make" "unittest")))) > + #:parallel-build? #f > + #:make-flags > + (list (string-append "BINDIR=3D" %output "/bin") > + (string-append "SBINDIR=3D" %output "/sbin") > + (string-append "LIBDIR=3D" %output "/lib") > + (string-append "INCDIR=3D" %output "/include") > + (string-append "DATADIR=3D" %output "/share") > + (string-append "MANDIR=3D" %output "/share/man") > + "PERL=3Dperl" > + "bios") > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'patch-files > + (lambda _ > + (substitute* (find-files "." "Makefile.*|ppmtolss16") > + (("/bin/pwd") (which "pwd")) > + (("/bin/echo") (which "echo")) > + (("/usr/bin/perl") (which "perl"))) > + #t)) > + (delete 'configure) > + (add-before 'build 'set-permissions > + (lambda _ > + ;; Is read only because it's checked out with git. > + (zero? (system* "chmod" "a+w" "utils/isohybrid.in"))))))) > + (home-page "http://www.syslinux.org") > + (synopsis "Lightweight Linux bootloader") > + (description "Syslinux is a lightweight Linux bootloader.") > + (license license:gpl2+)))) This software bundles some third-party code in the "com32" folder. libpng@1.2, zlib, and others. Their licenses should be mentioned here. Preferably they would be scrubbed from the source in favor of system versions, but that looks to be difficult. Otherwise this LGTM. Thank you! > --=20 > 2.11.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlidFM0ACgkQoqBt8qM6 VPqdsgf8Cy0QdgyBa+P25S9cYf7a7ejTvIGoEGw3ZGkci3hzMYv87jiDN5R4f9qI q1Rmhx5ThwqsSmu3YDjEvlwxfZv3yCIVJCOqo5GDItzMUIuSBmtHEAtW3d1m8qai j3k+4St8pbA8tXTf+I/N7xWFHuQm6vCADonEOvfl5323vX5IF7OQAKZBRu4zPDMJ ZlI74kCwOhcZGPl74owiUuEPLP3HxrPBr/ocxvFau41Bf5Ux9c1LEdeTVMWTeXRb cMdl7RhQxyHjdNNwYkKRbkMRD+IUPnacRvlMagea450uf51saglOMBBBPFhffiNR UCtB8imthfRZIItnSLp3Z8CeAb2RgA== =FnTt -----END PGP SIGNATURE----- --=-=-=--