unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: 30572@debbugs.gnu.org
Subject: [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz.
Date: Wed, 21 Mar 2018 05:19:07 +0100	[thread overview]
Message-ID: <87r2oe5adg.fsf@gmail.com> (raw)
In-Reply-To: <20180320110926.4791097d@scratchpost.org> (Danny Milosavljevic's message of "Tue, 20 Mar 2018 11:09:26 +0100")


[-- Attachment #1.1: Type: text/plain, Size: 1492 bytes --]

Danny Milosavljevic <dannym@scratchpost.org> writes:

> Hi Chris,
>
> On Tue, 20 Mar 2018 04:13:41 +0100
> Chris Marusich <cmmarusich@gmail.com> 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?

-- 
Chris

[-- Attachment #1.2: 0001-gnu-bootstrap-Add-trivial-packages-for-bash-mkdir-ta.patch --]
[-- Type: text/x-patch, Size: 3079 bytes --]

From 5398d4d98decd9e74dbf557203c6523107ce559b Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
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.
---
 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
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,10 @@
             bootstrap-guile-origin
 
             %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+))))
 
+(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-name)))))
+    (inputs `((,program-name ,(search-bootstrap-binary program-name (%current-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 included
+;; in %bootstrap-coreutils&co.  However, these packages are more minimal than
+;; %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)
-- 
2.15.1


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

  reply	other threads:[~2018-03-21  4:20 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 10:29 [bug#30572] [PATCH 0/7] Add "guix system docker-image" command Chris Marusich
2018-03-15  4:09 ` [bug#30572] [PATCH 0/7] Add "guix system docker-image" command (v2) Chris Marusich
2018-03-15  4:09   ` [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz Chris Marusich
2018-03-16 22:16     ` Danny Milosavljevic
2018-03-20  3:13       ` Chris Marusich
2018-03-20 10:09         ` Danny Milosavljevic
2018-03-21  4:19           ` Chris Marusich [this message]
2018-03-21  9:17             ` Danny Milosavljevic
2018-03-17 21:58     ` Ludovic Courtès
2018-03-21  4:22       ` Chris Marusich
2018-03-21 20:54         ` Ludovic Courtès
2018-03-22  4:37           ` Chris Marusich
2018-03-15  4:09   ` [bug#30572] [PATCH 2/7] tests: Add tests for "guix pack" Chris Marusich
2018-03-16 21:07     ` Danny Milosavljevic
2018-03-17 18:23       ` Ludovic Courtès
2018-03-21  4:00         ` Chris Marusich
2018-03-21  4:28           ` Chris Marusich
2018-03-22  4:41             ` Chris Marusich
2018-03-22  9:22               ` Ludovic Courtès
2018-03-24  2:05                 ` bug#30572: " Chris Marusich
2018-03-24 17:15                   ` [bug#30572] " Ludovic Courtès
2018-03-15  4:09   ` [bug#30572] [PATCH 3/7] vm: Allow control of deduplication in root-partition-initializer Chris Marusich
2018-03-16 20:47     ` Danny Milosavljevic
2018-03-17 18:21     ` Ludovic Courtès
2018-03-15  4:09   ` [bug#30572] [PATCH 4/7] gnu: When building in a VM, share a temporary directory Chris Marusich
2018-03-16 22:00     ` Danny Milosavljevic
2018-03-20  3:20       ` Chris Marusich
2018-03-15  4:09   ` [bug#30572] [PATCH 5/7] guix: Rewrite build-docker-image to allow more paths Chris Marusich
2018-03-16 22:29     ` Danny Milosavljevic
2018-03-20  3:26       ` Chris Marusich
2018-03-15  4:09   ` [bug#30572] [PATCH 6/7] system: Add "guix system docker-image" command Chris Marusich
2018-03-16 22:11     ` Danny Milosavljevic
2018-03-17 21:56     ` Ludovic Courtès
2018-03-21  3:58       ` Chris Marusich
2018-03-21  4:25         ` Chris Marusich
2018-03-21 20:50         ` Ludovic Courtès
2018-03-15  4:09   ` [bug#30572] [PATCH 7/7] tests: Add tests for "guix system disk-image" et al Chris Marusich
2018-03-16 22:04     ` Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r2oe5adg.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=30572@debbugs.gnu.org \
    --cc=dannym@scratchpost.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).