;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages busybox) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages perl) #:use-module (gnu packages zip)) (define-public busybox (package (name "busybox") (version "1.22.1") (source (origin (method url-fetch) (uri (string-append "http://www.busybox.net/downloads/" name "-" version ".tar.bz2")) (sha256 (base32 "12v7nri79v8gns3inmz4k24q7pcnwi00hybs0wddfkcy1afh42xf")))) (build-system gnu-build-system) (arguments `(#:phases (alist-replace 'configure (lambda _ (zero? (system* "make" "defconfig"))) (alist-replace 'check (lambda _ (substitute* '("testsuite/du/du-s-works" "testsuite/du/du-works") (("/bin") "/etc")) ; there is no /bin but there is a /etc ;; There is no /usr/bin or /bin - replace it with /gnu/store (substitute* "testsuite/cpio.tests" (("/usr/bin") (%store-directory)) (("usr") (car (filter (negate string-null?) (string-split (%store-directory) #\/))))) (substitute* "testsuite/date/date-works-1" (("/bin/date") (which "date"))) ;; The pidof tests assume that pid 1 is called "init" but that is not ;; true in guix build environment (substitute* "testsuite/pidof.tests" (("-s init") "-s $(cat /proc/1/comm)")) (substitute* "testsuite/grep.tests" ;; The subject of this test is buggy. It is known by upstream (fixed in git) ;; So mark it with SKIP_KNOWN_BUGS like the others. ;; Presumably it wasn't known at the time of release ... ;; (It is strange that they release software which they know to have bugs) (("testing \"grep -w \\^str doesn't match str not at the beginning\"") "test x\"$SKIP_KNOWN_BUGS\" = x\"\" && testing \"grep -w ^str doesn't match str not at the beginning\"")) ;; This test cannot possibly pass. ;; It is trying to test that "which ls" returns "/bin/ls" when PATH is not set. ;; However, this relies on /bin/ls existing. Which it does not in guix. (delete-file "testsuite/which/which-uses-default-path") (rmdir "testsuite/which") (zero? (system* "make" ;; "V=1" "SKIP_KNOWN_BUGS=1" "SKIP_INTERNET_TESTS=1" "check"))) (alist-replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (zero? (system* "make" (string-append "CONFIG_PREFIX=" out) "install")))) %standard-phases))))) (native-inputs `(("perl" ,perl) ; needed to generate the man pages (pod2man) ;; The following are needed by the tests. ("inetutils" ,inetutils) ("zip" ,zip))) (synopsis "Many common UNIX utilities in a single executable") (description "BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides a fairly complete environment for any small or embedded system.") (home-page "http://www.busybox.net") ;; Some files are gplv2+ (license gpl2))) 17b1432c744'>download: Use Disarchive as a last resort....This is a fixed version of 66b14dccdd0d83c875ce3a8d50ceab8b6f0a3ce2, which was reverted in e74250c3c535b75dd2225a26df51febb7ed94654. * guix/download.scm (%disarchive-mirrors): New variable. (%disarchive-mirror-file): New variable. (built-in-download): Add 'disarchive-mirrors' keyword argument and pass its value along to the 'builtin:download' derivation. (url-fetch): Pass '%disarchive-mirror-file' to 'built-in-download'. * guix/scripts/perform-download.scm (perform-download): Read Disarchive mirrors from the environment and pass them to 'url-fetch'. * guix/build/download.scm (disarchive-fetch/any): New procedure. (url-fetch): Add 'disarchive-mirrors' keyword argument, use it to make a list of URIs, and use the new procedure to fetch the file if all other methods fail. * build-aux/build-self.scm (build-program)[select?]: Exclude '(guix build download)'. * guix/self.scm (compiled-guix)[*core-modules*]: Add 'guile-json' to the list of extensions. Timothy Sample 2021-04-01build-self: Take care of the spinner in the parent process....This simplifies code and mostly ensures we don't print a spinner while there's build activity going on. * build-aux/build-self.scm (build-program): Remove 'spin' and 'call-with-new-thread' call from "compute-guix-derivation" body. Remove "Computing Guix derivation" message. (proxy): Pass extra argument to 'select'. Display a spinner when 'select' returns empty lists. (build): Print "Computing Guix derivation" message here. Ludovic Courtès 2021-04-01build-self: Forward sub-process build output to (current-build-output-port)....Fixes <https://bugs.gnu.org/41930>. * build-aux/build-self.scm (build-program): Add extra 'build-output' parameter. Interpret it as a socket name and connect to it; use it as the CURRENT-BUILD-OUTPUT-PORT. (proxy): New procedure. (build): Open a named socket. Accept connections and call 'proxy' on it. Ludovic Courtès 2021-03-19build-self: Silent Guile warnings while computing the derivation....In particular, silence the Guile-Git autoload warnings introduced by c1940fde43c7aca37d67589cc5cb248086d17d56. * build-aux/build-self.scm (build-program): Wrap 'guix-derivation' call in 'parameterize'. Ludovic Courtès