From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: [PATCH 1/4] gnu: Separate util-linux into three packages. Date: Thu, 10 Nov 2016 22:14:18 +0100 Message-ID: <1478812461-18483-1-git-send-email-jmd@gnu.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4wg9-0003Fz-So for guix-devel@gnu.org; Thu, 10 Nov 2016 16:14:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4wg5-0003fs-10 for guix-devel@gnu.org; Thu, 10 Nov 2016 16:14:37 -0500 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" To: guix-devel@gnu.org Cc: John Darrington * gnu/packages/linux.scm (util-linux/base): New variable, (util-linux/mount): New variable, (util-linux) Refine inheriting from util-linux/base. --- gnu/packages/linux.scm | 69 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 14 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 73c177a..0a1eff5 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -430,15 +430,15 @@ use the proc file system. We're not about changing the world, but providing the system administrator with some help in common tasks.") (license license:gpl2+))) -(define-public util-linux +(define-public util-linux/base (package - (name "util-linux") + (name "util-linux-base") (version "2.27") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/linux/utils/" - name "/v" (version-major+minor version) "/" - name "-" version ".tar.xz")) + "util-linux" "/v" (version-major+minor version) "/" + "util-linux" "-" version ".tar.xz")) (sha256 (base32 "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw")) @@ -453,8 +453,40 @@ providing the system administrator with some help in common tasks.") (("build_kill=yes") "build_kill=no")) #t)))) (build-system gnu-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after + 'install 'move-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (static (assoc-ref outputs "static"))) + (mkdir-p (string-append static "/lib")) + (with-directory-excursion out + (for-each (lambda (file) + (rename-file file + (string-append static "/" + file))) + (find-files "lib" "\\.a$"))) + #t)))))) (outputs '("out" "static")) ; >2 MiB of static .a libraries + (home-page "https://www.kernel.org/pub/linux/utils/util-linux/") + (synopsis "Collection of utilities for the Linux kernel") + (description "Util-linux is a diverse collection of Linux kernel +utilities. It provides dmesg and includes tools for working with file systems, +block devices, UUIDs, TTYs, and many other tools.") + + ;; Note that util-linux doesn't use the same license for all the + ;; code. GPLv2+ is the default license for a code without an + ;; explicitly defined license. + (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+ + license:bsd-4 license:public-domain)))) + +(define-public util-linux + (package + (inherit util-linux/base) + (name "util-linux") + (source (origin (inherit (package-source util-linux/base)))) (arguments `(#:configure-flags (list "--disable-use-tty-group" @@ -500,18 +532,27 @@ providing the system administrator with some help in common tasks.") ("ncurses" ,ncurses))) (native-inputs `(("perl" ,perl) - ("net-base" ,net-base))) ;for tests - (home-page "https://www.kernel.org/pub/linux/utils/util-linux/") - (synopsis "Collection of utilities for the Linux kernel") + ("net-base" ,net-base))))) ;for tests + +(define-public util-linux/mount + (package + (inherit util-linux/base) + (name "util-linux-mount") + (source (origin (inherit (package-source util-linux/base)))) + (arguments + `(#:configure-flags (list "--disable-all-programs" + "--disable-bash-completion" + "--disable-nls" + "--enable-libmount" + "--enable-libblkid" + "--enable-libuuid" + "--enable-mount") + ,@(package-arguments util-linux/base))) + (synopsis "Mount/Umount utilities for the Linux kernel") (description "Util-linux is a diverse collection of Linux kernel -utilities. It provides dmesg and includes tools for working with file systems, -block devices, UUIDs, TTYs, and many other tools.") +utilities. However, this is a minimally configured package providing just +the @code{mount} and @code{umount} utilities."))) - ;; Note that util-linux doesn't use the same license for all the - ;; code. GPLv2+ is the default license for a code without an - ;; explicitly defined license. - (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+ - license:bsd-4 license:public-domain)))) (define-public procps (package -- 2.1.4