From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: =?UTF-8?q?=5BPATCH=5D=20gnu=3A=20Add=20busybox=2E?= Date: Fri, 13 Jun 2014 14:54:01 +0200 Message-ID: <1402664042-14123-1-git-send-email-jmd@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvQzw-0000tT-Te for guix-devel@gnu.org; Fri, 13 Jun 2014 08:54:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvQzs-00088o-4W for guix-devel@gnu.org; Fri, 13 Jun 2014 08:54:24 -0400 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: John Darrington * gnu/packages/busybox.scm: New file * gnu-system.am: Add gnu/packages/busybox.scm --- gnu-system.am | 1 + gnu/packages/busybox.scm | 108 ++++++++++++++++++++++++++++++++++++++++= ++++++ 2 files changed, 109 insertions(+) create mode 100644 gnu/packages/busybox.scm diff --git a/gnu-system.am b/gnu-system.am index c5331fa..fbe031a 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -45,6 +45,7 @@ GNU_SYSTEM_MODULES =3D \ gnu/packages/bison.scm \ gnu/packages/boost.scm \ gnu/packages/bootstrap.scm \ + gnu/packages/busybox.scm \ gnu/packages/calcurse.scm \ gnu/packages/ccache.scm \ gnu/packages/cdrom.scm \ diff --git a/gnu/packages/busybox.scm b/gnu/packages/busybox.scm new file mode 100644 index 0000000..953cd2a --- /dev/null +++ b/gnu/packages/busybox.scm @@ -0,0 +1,108 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 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 (a= t +;;; 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=20 + (alist-replace + 'configure=20 + (lambda _ (zero? (system* "make" "defconfig"))) + (alist-replace + 'check=20 + (lambda _ + (begin + (substitute* '("testsuite/du/du-s-works" + "testsuite/du/du-works") + (("/bin") "/etc")) ; there is no /bin but there is a /et= c + + ;; There is no /usr/bin - replace it with /gnu/store + (substitute* "testsuite/cpio.tests" + (("/usr/bin") "/gnu/store")) + + (substitute* "testsuite/cpio.tests" + (("usr") "gnu")) + + (substitute* "testsuite/date/date-works-1" + (("/bin/date") (which "date"))) + + ;; The pidof tests assume that pid 1 is called "init" but t= hat 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 ups= tream (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 k= now to have bugs) + (("testing \"grep -w \\^str doesn't match str not at the = beginning\"")=20 + "test x\"$SKIP_KNOWN_BUGS\" =3D 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" w= hen 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"=20 + ;; "V=3D1" + "SKIP_KNOWN_BUGS=3D1" + "SKIP_INTERNET_TESTS=3D1" + "check")))) + (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (zero? + (system* "make" + (string-append "CONFIG_PREFIX=3D" 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 uti= lities +into a single small executable. It provides a fairly complete +environment for any small or embedded system.") =20 + (home-page "http://www.busybox.net") + ;; Some files are gplv2+ + (license gpl2))) --=20 1.7.10.4