From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyVEL-0000O2-Se for guix-patches@gnu.org; Wed, 21 Mar 2018 00:20:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eyVEI-0001WM-KJ for guix-patches@gnu.org; Wed, 21 Mar 2018 00:20:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36792) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eyVEI-0001WC-FE for guix-patches@gnu.org; Wed, 21 Mar 2018 00:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eyVEI-0007NB-3L for guix-patches@gnu.org; Wed, 21 Mar 2018 00:20:02 -0400 Subject: [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz. Resent-Message-ID: From: Chris Marusich References: <20180222102933.4978-1-cmmarusich@gmail.com> <20180315040915.5556-1-cmmarusich@gmail.com> <20180315040915.5556-2-cmmarusich@gmail.com> <20180316231651.6889c44a@scratchpost.org> <87y3inwiai.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <20180320110926.4791097d@scratchpost.org> Date: Wed, 21 Mar 2018 05:19:07 +0100 In-Reply-To: <20180320110926.4791097d@scratchpost.org> (Danny Milosavljevic's message of "Tue, 20 Mar 2018 11:09:26 +0100") Message-ID: <87r2oe5adg.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 30572@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Danny Milosavljevic writes: > Hi Chris, > > On Tue, 20 Mar 2018 04:13:41 +0100 > Chris Marusich wrote: > >> module. I don't know how that will interact with the rest of Guix; it >> seems safer to just avoid adding that and accept this small discrepancy >> in the bootstrap packages. It is simpler. > > It would still be possible to do it using module-ref, but I'd advise > against it. How about just passing an explicit license to the > bootstrap-binary procedure? Yes, that sounds like the right way to me. >>For example, the license of the >>"bootstrap-binaries" package (i.e., the %bootstrap-coreutils&co) >> defined to be gpl3+, even though it contains xz, which actually uses >> gpl2+ and lgpl2.1+. > > Yeah, I don't like that either. > >> Since (I suspect) these packages are intended for >> internal use, and since the canonical versions of these packages do have >> correct sources, licenses, and so forth, I'm not so sure we need to be >> very concerned about minor discrepancies like this. > > Yeah, it's just a nitpick. I'm fine with it being #f or with it being > a parameter to bootstrap-binary. But (license license:gpl3+) when it's > not actually gpl3 is where I draw the line. Wrong license like this is > never going to be flagged again except by adversaries. I understand. It isn't hard to fix, so here's a new patch that adds correct licenses. How does it look? =2D-=20 Chris --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-bootstrap-Add-trivial-packages-for-bash-mkdir-ta.patch Content-Transfer-Encoding: quoted-printable From=205398d4d98decd9e74dbf557203c6523107ce559b Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sun, 11 Mar 2018 01:13:01 +0100 Subject: [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz. * gnu/packages/bootstrap.scm (bootstrap-binary): New procedure. (%bootstrap-bash, %bootstrap-mkdir, %bootstrap-tar, %bootstrap-xz): Use it to create these new packages, and export them. =2D-- gnu/packages/bootstrap.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 27f2053c4..1480880ae 100644 =2D-- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Court=C3= =A8s ;;; Copyright =C2=A9 2014, 2015 Mark H Weaver ;;; Copyright =C2=A9 2017 Efraim Flashner +;;; Copyright =C2=A9 2018 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,6 +44,10 @@ bootstrap-guile-origin =20 %bootstrap-guile + %bootstrap-bash + %bootstrap-mkdir + %bootstrap-tar + %bootstrap-xz %bootstrap-coreutils&co %bootstrap-binutils %bootstrap-gcc @@ -345,6 +350,35 @@ $out/bin/guile --version~%" (home-page #f) (license lgpl3+)))) =20 +(define (bootstrap-binary program-name license) + (package + (name (string-append program-name "-bootstrap")) + ;; The version may differ depending on the program. + (version "unknown") + (source #f) + (build-system trivial-build-system) + (arguments + `(#:guile ,%bootstrap-guile + #:builder (let ((out (assoc-ref %outputs "out")) + (program (assoc-ref %build-inputs ,program-name))) + (mkdir out) + (mkdir (string-append out "/bin")) + (symlink program (string-append out "/bin/" ,program-na= me))))) + (inputs `((,program-name ,(search-bootstrap-binary program-name (%curr= ent-system))))) + (description (string-append "The bootstrap " program-name ".")) + (synopsis (string-append "The bootstrap " program-name ".")) + (license license) + (home-page #f))) + +;; These trivial packages provide individual binaries that are also includ= ed +;; in %bootstrap-coreutils&co. However, these packages are more minimal t= han +;; %bootstrap-coreutils&co, and they do not require network access to build +;; because these specific binaries are included in the Guix source tree. +(define %bootstrap-bash (bootstrap-binary "bash" gpl3+)) +(define %bootstrap-mkdir (bootstrap-binary "mkdir" gpl3+)) +(define %bootstrap-tar (bootstrap-binary "tar" gpl3+)) +(define %bootstrap-xz (bootstrap-binary "xz" (list gpl2+ lgpl2.1+))) + (define %bootstrap-coreutils&co (package-from-tarball "bootstrap-binaries" (lambda (system) =2D-=20 2.15.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlqx3TwACgkQ3UCaFdgi Rp33GhAAsGJSQqz7hvbcdJqSBv+zgXzsnFB4uRRXdxRjV8UJ5tLOF5633/JsjZQ+ KdwkIG/rXg0LqcbaUDbxlNvkmOsOhf80+LBEwLXJUzhzjRhiZ/77cvGm0tBQe9Hg A3PG7mBt/Zw8wcwh4w/jxchc6b2lAmubzjsxgDrD7Iq7NobdtocSReLgJVT2tvsL My6r+3Vy3lZrl59eQCXpY5X8wd7waiXcdk8RxrEVW1Dg+fedfxvmv22oYJUWLWPU E7FVO94rujndGjZdneUVqvdeaZPUjQ5fJGlrkdsgTZPS1OBPj6WR/bGZ6AVRMw5E icbLprnD0wA8ObeLRoJzMgerauv7/n109mxL7kTsglYhrpqdGJYi+X4F6QV077PY R6FDiWf8/EV0nh6O9KufZloSDe/b5992XRn4FqyDiyeiSylFDLDhju+4NRl9Pfat 45v2PKIdWryJ+1I6a7jqyQd5BTJFFe+4/A8Jd/0z2V68b5WBY0w9MvX/l/s2YphN P5FkXSel7q2BCBug4JGFHrwzIPW4S7LL7U4HkmBI+woEkSfpshkW3E2f0JuseEN1 aPJXFIlHCryzxyker4ydr6+6e8biXGMcCQvrsT2kSu4XOx+LMa+/9RWZx0WMGEyp 3eR/qPgRyTH3cVYKyKli6MPmuCFIbaWnzrCrHkKB5wB7G9Jx0Pk= =D+kj -----END PGP SIGNATURE----- --==-=-=--