aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/busybox.scm
blob: 7a548582f314819a5f3cb66a680a00e9b746500d (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; 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 <http://www.gnu.org/licenses/>.

(define-module (gnu packages busybox)
  #:use-module (guix gexp)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix utils)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
  #:use-module (gnu packages admin)
  #:use-module (gnu packages algebra)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages perl))

(define-public busybox
  (package
    (name "busybox")
    (version "1.33.1")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://www.busybox.net/downloads/" name "-"
                    version ".tar.bz2"))
              (sha256
               (base32
                "0a0dcvsh7nxnhxc5y73fky0z30i9p7r30qfidm2akn0n5fywdkhj"))))
    (build-system gnu-build-system)
    (arguments
     '(#:phases
       (modify-phases %standard-phases
         (add-before 'configure 'disable-timestamps
           (lambda _
             (setenv "KCONFIG_NOTIMESTAMP" "1")
             #t))
         (add-before 'configure 'disable-taskset
           ;; This feature fails its tests in the build environment,
           ;; was default 'n' until after 1.26.2.
           (lambda _
             (substitute* "util-linux/taskset.c"
               (("default y") "default n"))
             #t))
         (replace 'configure
           (lambda* (#:key make-flags #:allow-other-keys)
             (apply invoke "make" "defconfig" make-flags)))
         (add-after 'configure 'dont-install-to-usr
           (lambda _
             (substitute* ".config"
               (("# CONFIG_INSTALL_NO_USR is not set")
                "CONFIG_INSTALL_NO_USR=y"))
             #t))
         (replace 'check
           (lambda* (#:key make-flags #:allow-other-keys)
             (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")))

             (substitute* "testsuite/start-stop-daemon.tests"
              (("/bin/false") (which "false")))

             ;; 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)"))

             ;; 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")

             (apply invoke "make"
                     ;; "V=1"
                     "SKIP_KNOWN_BUGS=1"
                     "SKIP_INTERNET_TESTS=1"
                     "check" make-flags)))
         (replace 'install
           (lambda* (#:key outputs make-flags #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (apply invoke "make"
                       (string-append "CONFIG_PREFIX=" out)
                       "install" make-flags)))))))
    (native-inputs (list perl ; needed to generate the man pages (pod2man)
                         ;; The following are needed by the tests.
                         inetutils
                         (@ (gnu packages base) which)
                         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 "https://www.busybox.net")
    ;; Some files are gplv2+
    (license gpl2)))

(define-public toybox
  (package
    (name "toybox")
    (version "0.8.6")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://landley.net/toybox/downloads/toybox-"
                    version ".tar.gz"))
              (sha256
               (base32
                "0jq3368jps6jg717ikzhlc6whml3k2s9xy69zpj4i0r35c5ck622"))))
    (build-system gnu-build-system)
    (arguments
     (list #:phases
           #~(modify-phases %standard-phases
               (add-before 'configure 'set-environment-variables
                 (lambda _
                   (setenv "CC" #$(cc-for-target))
                   (setenv "HOSTCC" (which "gcc"))))
               (replace 'configure
                 (lambda _ (invoke "make" "defconfig")))
               (add-before 'check 'fix-or-skip-broken-tests
                 (lambda _
                   ;; Some tests expect $USER to magically be the current user.
                   (setenv "USER" (passwd:name (getpwnam (geteuid))))
                   ;; This expects directories to be exactly 4K.  They aren't!
                   (delete-file "tests/du.test")
                   ;; Delete tests that expect a root or 0 user to exist.
                   (substitute* "tests/id.test"
                     (("^testing .*[ \\(]root.*") ""))))
               (replace 'install
                 (lambda* (#:key outputs #:allow-other-keys)
                   (invoke "make"
                           (string-append "PREFIX=" #$output)
                           "install")))
               (add-after 'install 'remove-usr-directory
                 (lambda* (#:key outputs #:allow-other-keys)
                   (delete-file-recursively (string-append #$output "/usr")))))
           #:test-target "tests"))
    (native-inputs (list bc))
    (synopsis "Many common UNIX utilities in a single executable")
    (description "ToyBox 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 "https://landley.net/toybox/")
    (license bsd-2)))
21-07-10 14:17:49 -0400'>2021-07-10gnu: qpdfview: Use qt-build-system....This fixes compilation after the recent reorganization of qt-build-system. As a side effect, specifying Qt plugins with environment variables now works. * gnu/packages/pdf.scm (qpdfview)[build-system]: Use qt-build-system. [arguments]: Drop #:modules and #:imported-modules, and the 'qt-wrap phase. Specify that there are no tests. Signed-off-by: Leo Famulari <leo@famulari.name> Timotej Lazar 2021-06-19Merge branch 'master' into core-updates...Note: this merge actually changes the 'curl' and 'python-attrs' derivations, as part of solving caf4a7a2770ef4d05a6e18f40d602e51da749ddc and 12964df69a99de6190422c752fef65ef813f3b6b respectively. 4604d43c0e (gnu: gnutls@3.6.16: Fix cross-compilation.) was ignored because it cannot currently be tested. Conflicts: gnu/local.mk gnu/packages/aidc.scm gnu/packages/boost.scm gnu/packages/curl.scm gnu/packages/nettle.scm gnu/packages/networking.scm gnu/packages/python-xyz.scm gnu/packages/tls.scm Marius Bakke 2021-06-19gnu: poppler: Update to 21.06.1....* gnu/packages/pdf.scm (poppler): Update to 21.06.1. [arguments]: Add "-DENABLE_BOOST=OFF" to #:configure-flags. Marius Bakke 2021-06-14gnu: Rename qtbase to qtbase-5....This change was automated via the following command: $ git ls-files | xargs sed -i 's/,qtbase)/,qtbase-5)/g' $ git ls-files | xargs sed -i 's/inherit qtbase)/inherit qtbase-5)/g' $ git ls-files | xargs sed -i 's/package-version qtbase)/package-version qtbase-5)/g' $ git checkout etc # to clear some spurious changes This is done so the qtbase package can be upgraded to version 6 in the following commit. Maxim Cournoyer 2021-06-13gnu: poppler: Update to 21.05.0....* gnu/packages/pdf.scm (poppler): Update to 21.05.0. Marius Bakke 2021-05-09gnu: img2pdf: Update to 0.4.1....* gnu/packages/pdf.scm (img2pdf): Update to 0.4.1. Nicolas Goaziou 2021-05-02gnu: Replace hard-coded "CC=gcc" with CC-FOR-TARGET calls....* gnu/packages/admin.scm (cbatticon)[arguments]<#:make-flags>: Use CC-FOR-TARGET. * gnu/packages/assembly.scm (dev86)[arguments]<#:make-flags>: Likewise. * gnu/packages/cdrom.scm (cd-discid)[arguments]<#:make-flags>: Likewise. * gnu/packages/crypto.scm (signify, keyutils, ssss, libscrypt, enchive) [arguments]<#:make-flags>: Likewise. * gnu/packages/emacs-xyz.scm (emacs-emacsql, emacs-telega)[arguments] <#:phases>: Likewise. * gnu/packages/gnupg.scm (pgpdump)[arguments]<#:make-flags>: Likewise. * gnu/packages/image-viewers.scm (feh, imv)[arguments]<#:make-flags>: Likewise. * gnu/packages/image.scm (libjxr, giflib, freeimage)[arguments] <#:make-flags>: Likewise. * gnu/packages/irc.scm (ii, sic)[arguments]<#:make-flags>: Likewise. * gnu/packages/lua.scm (make-lua-expat, make-lua-ossl, make-lua-sec) (make-lua-cqueues, make-lua-lgi, lua-resty-signal)[arguments] <#:make-flags>: Likewise. * gnu/packages/networking.scm (httping, pixiewps, sslh, nethogs, spiped) (can-utils, hcxtools, batctl)[arguments]<#:make-flags>: Likewise. * gnu/packages/pdf.scm (fbida)[arguments]<#:make-flags>: Likewise. * gnu/packages/ssh.scm (endlessh)[arguments]<#:make-flags>: Likewise. * gnu/packages/toys.scm (nyancat)[arguments]<#:make-flags>: Likewise. * gnu/packages/upnp.scm (miniupnpc)[arguments]<#:make-flags>: Likewise. * gnu/packages/xdisorg.scm (bemenu, xbanish, sxhkd, xcape, xssproxy) (xrandr-invert-colors, hsetroot, xsettingsd)[arguments]<#:make-flags>: Likewise. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Maxime Devos 2021-04-09gnu: python-sip: Update to 5.5.0. Add python-sip-4...* gnu/packages/qt.scm (python-sip): Update to 5.5.0. (python-sip-4): New variable. Rename the old python-sip to python-sip-4. (python2-sip): Inherit from python-sip-4. * gnu/packages/maths.scm (veusz)[native-inputs]: Use python-sip-4. * gnu/packages/pdf.scm (python-poppler-qt5): Use python-sip-4. * gnu/packages/geo.scm (qgis)[arguments]: Fix build for python-sip@5. Brendan Tildesley 2021-03-29gnu: python-poppler-qt5: Update to 21.1.0....* gnu/packages/pdf.scm (python-poppler-qt5): Update to 21.1.0. Brendan Tildesley 2021-03-25gnu: Remove QT 4....For more information, see: https://lists.gnu.org/archive/html/guix-devel/2016-02/msg00596.html https://bugs.gnu.org/45704 * gnu/packages/qt.scm (qt-4, python2-pyqt-4): Remove variables. * gnu/packages/engineering.scm (qucs, qucs-s): Remove variables. * gnu/packages/messaging.scm (pybitmessage): Remove variable. * gnu/packages/password-utils.scm (keepassx): Remove variable. * gnu/packages/pdf.scm (poppler-qt4): Remove variable. Leo Famulari 2021-03-14gnu: pdfarranger: Update to 1.7.1....* gnu/packages/pdf.scm (pdfarranger): Update to 1.7.1. Nicolas Goaziou