From a939011b58c65f4192a10cde9e925e85702bacf4 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 30 Sep 2021 03:58:42 +0200 Subject: build-system: linux-module: Normalise the ‘M’ source-directory. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "make modules_install" with an "M=" file name ending in "/." breaks at least rtl8812au-aircrack-ng-linux-module. In general, passing a more human-generated-looking value seems prudent as these are more likely to be tested upstream. * guix/build/linux-module-build-system.scm (build, install): Call CANONICALIZE-PATH on SOURCE-DIRECTORY instead of STRING-APPEND. Reported by Maxim Cournoyer . as apteryx on #guix --- guix/build/linux-module-build-system.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guix/build/linux-module-build-system.scm') diff --git a/guix/build/linux-module-build-system.scm b/guix/build/linux-module-build-system.scm index 729ab6154f..1541b6393e 100644 --- a/guix/build/linux-module-build-system.scm +++ b/guix/build/linux-module-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Danny Milosavljevic ;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2021 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -53,7 +54,7 @@ (define* (build #:key inputs make-flags (source-directory ".") #:allow-other-key (apply invoke "make" "-C" (string-append (assoc-ref inputs "linux-module-builder") "/lib/modules/build") - (string-append "M=" (getcwd) "/" source-directory) + (string-append "M=" (canonicalize-path source-directory)) (or make-flags '()))) ;; This block was copied from make-linux-libre--only took the "modules_install" @@ -68,7 +69,7 @@ (define* (install #:key make-flags (source-directory ".") (apply invoke "make" "-C" (string-append (assoc-ref inputs "linux-module-builder") "/lib/modules/build") - (string-append "M=" (getcwd) "/" source-directory) + (string-append "M=" (canonicalize-path source-directory)) ;; Disable depmod because the Guix system's module directory ;; is an union of potentially multiple packages. It is not ;; possible to use depmod to usefully calculate a dependency -- cgit v1.2.3