summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-05-02 19:13:23 +0200
committerMarius Bakke <marius@gnu.org>2021-05-05 23:29:36 +0200
commit0e2251fcf8189a4f642074d3aa898221b29c3a55 (patch)
tree1945ab1def2a53d75deb5763dcc157d80b0efdac /gnu/packages/linux.scm
parentd6104e3b85fe95bc74319df091a85cfb05aa3e4c (diff)
downloadguix-patches-0e2251fcf8189a4f642074d3aa898221b29c3a55.tar
guix-patches-0e2251fcf8189a4f642074d3aa898221b29c3a55.tar.gz
gnu: linux-libre-headers: Remove rsync dependency.
The resulting packages are bit-identical, sans for a missing empty "uapi" directory in versions < 5.3. * gnu/packages/commencement.scm (rsync-boot0): Remove variable. (linux-libre-headers-boot0)[native-inputs]: Remove RSYNC-BOOT0. * gnu/packages/linux.scm (make-linux-libre-headers*)[native-inputs]: Remove RSYNC. [arguments]: For newer kernel versions, run "make headers" instead of "make headers_check" before installing. Use FIND-FILES and INSTALL-FILE instead of calling "make headers_install". Remove ".install" files workaround.
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm40
1 files changed, 21 insertions, 19 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 4286c912b0..5317e6eda7 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -141,7 +141,6 @@
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
#:use-module (gnu packages groff)
- #:use-module (gnu packages rsync)
#:use-module (gnu packages selinux)
#:use-module (gnu packages swig)
#:use-module (guix build-system cmake)
@@ -534,14 +533,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
,@(if (version>=? version "4.16")
`(("flex" ,flex)
("bison" ,bison))
- '())
- ,@(if (version>=? version "5.3")
- `(("rsync" ,rsync))
'())))
(arguments
`(#:modules ((guix build gnu-build-system)
(guix build utils)
- (srfi srfi-1))
+ (srfi srfi-1)
+ (ice-9 match))
#:phases
(modify-phases %standard-phases
(delete 'configure)
@@ -552,32 +549,37 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
(%current-system))))
(defconfig ,(system->defconfig
(or (%current-target-system)
- (%current-system)))))
+ (%current-system))))
+ (make-target ,(if (version>=? version "5.3")
+ "headers"
+ "headers_check")))
(setenv "ARCH" arch)
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
(invoke "make" defconfig)
- (invoke "make" "mrproper" "headers_check"))))
+ (invoke "make" "mrproper" make-target))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
- (invoke "make"
- (string-append "INSTALL_HDR_PATH=" out)
- "headers_install")
+
+ ;; Mimic the quiet_cmd_headers_install target to avoid a
+ ;; dependency on rsync.
+ (for-each (lambda (file)
+ (let ((destination (string-append
+ out "/include/"
+ ;; Drop the 'usr/include' prefix.
+ (match (string-split file #\/)
+ ((_ _ path ...)
+ (string-join path "/"))))))
+ (format #t "`~a' -> `~a'~%" file destination)
+ (install-file file (dirname destination))))
+ (find-files "usr/include" "\\.h$"))
(mkdir (string-append out "/include/config"))
(call-with-output-file
(string-append out
"/include/config/kernel.release")
(lambda (p)
- (format p "~a-default~%" ,version)))
-
- ;; Remove the '.install' and '..install.cmd' files; the
- ;; latter contains store paths, which pulls in bootstrap
- ;; binaries in the build environment, and prevents bit
- ;; reproducibility for the bootstrap binaries.
- (for-each delete-file (find-files out "\\.install"))
-
- #t))))
+ (format p "~a-default~%" ,version)))))))
#:allowed-references ()
#:tests? #f))
(home-page "https://www.gnu.org/software/linux-libre/")