Archived
1
0
Fork 0

gnu: fakeroot: Update to 1.26.

* gnu/packages/linux.scm (fakeroot): Update to 1.26.
[source]: Remove generated man page translations in a new snippet.
[arguments]: Patch Makefile.am instead of Makefile, and do so before
bootstrapping.  Don't explicitly return #t from phases.
[native-inputs]: Use autoconf-2.71.
This commit is contained in:
Tobias Geerinckx-Rice 2021-10-13 23:19:12 +02:00
parent 1961b28445
commit 7b1c73f330
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -7827,68 +7827,78 @@ the superuser to make device nodes.")
(define-public fakeroot (define-public fakeroot
(package (package
(name "fakeroot") (name "fakeroot")
(version "1.25.3") (version "1.26")
(source (origin (source
;; There are no tags in the repository, so take this snapshot. (origin
(method url-fetch) ;; There are no tags in the repository, so take this snapshot.
(uri (string-append "https://deb.debian.org/debian/pool/main/f/" (method url-fetch)
"fakeroot/fakeroot_" version ".orig.tar.gz")) (uri (string-append "https://deb.debian.org/debian/pool/main/f/"
(file-name (string-append name "-" version ".tar.gz")) "fakeroot/fakeroot_" version ".orig.tar.gz"))
(sha256 (file-name (string-append name "-" version ".tar.gz"))
(base32 (sha256
"0v4m3v1bdqvblwj3vqsb3mllgbci6dsgsydq6765nzvz6n1kd44f")))) (base32
"1sg8inv1zzp4h9ncbbmxip3svd11sd86j22cvxrjwnf5zn7mf2j8"))
(modules '((guix build utils)
(ice-9 ftw)))
(snippet
`(begin
;; Delete pregenerated man page translations, but not the originals.
(with-directory-excursion "doc"
(for-each (lambda (language)
(for-each delete-file
(find-files language "\\.[0-9]$")))
(scandir "."
(lambda (file)
(and (not (string-prefix? "." file))
(eq? 'directory
(stat:type (lstat file))))))))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases `(#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'patch-Makefile.am
(lambda _
(substitute* "Makefile.am"
(("/bin/sh") (which "sh")))))
(add-after 'unpack 'patch-script
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "scripts/fakeroot.in"
(("getopt")
(string-append (assoc-ref inputs "util-linux")
"/bin/getopt"))
(("sed")
(string-append (assoc-ref inputs "sed")
"/bin/sed"))
(("cut")
(string-append (assoc-ref inputs "coreutils")
"/bin/cut")) )))
(replace 'bootstrap (replace 'bootstrap
(lambda _ (lambda _
;; The "preroll" script takes care of Autoconf and also ;; The "preroll" script takes care of Autoconf and also
;; prepares the translated manuals. ;; prepares the translated manuals.
(invoke "sh" "./preroll"))) (invoke "sh" "./preroll")))
(add-after 'configure 'patch-Makefile (add-before 'configure 'setenv
(lambda _ (lambda _
;; Note: The root of the problem is already in "Makefile.am". (setenv "LIBS" "-lacl")))
(substitute* "Makefile" (add-before 'check 'prepare-check
(("/bin/sh") (which "sh"))) (lambda _
#t)) (setenv "SHELL" (which "bash"))
(add-after 'unpack 'patch-script (setenv "VERBOSE" "1")
(lambda* (#:key inputs #:allow-other-keys) (substitute* "test/t.touchinstall"
(substitute* "scripts/fakeroot.in" ;; We don't have the name of the root user, so use ID=0.
(("getopt") (("grep root") "grep \"\\<0\\>\""))
(string-append (assoc-ref inputs "util-linux") (substitute* "test/tartest"
"/bin/getopt")) ;; We don't have the name of the root group, so use ID=0.
(("sed") (("ROOTGROUP=root") "ROOTGROUP=0")
(string-append (assoc-ref inputs "sed") ;; We don't have the name of the daemon user, so use IDs.
"/bin/sed")) (("daemon:sys") "1:3")
(("cut") (("daemon:") "1:"))
(string-append (assoc-ref inputs "coreutils") ;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
"/bin/cut")) ) (substitute* "test/compare-tar"
#t)) (("tar -tvf") "tar --numeric-owner -tvf")))))))
(add-before 'configure 'setenv
(lambda _
(setenv "LIBS" "-lacl")
#t))
(add-before 'check 'prepare-check
(lambda _
(setenv "SHELL" (which "bash"))
(setenv "VERBOSE" "1")
(substitute* "test/t.touchinstall"
;; We don't have the name of the root user, so use ID=0.
(("grep root") "grep \"\\<0\\>\""))
(substitute* "test/tartest"
;; We don't have the name of the root group, so use ID=0.
(("ROOTGROUP=root") "ROOTGROUP=0")
;; We don't have the name of the daemon user, so use IDs.
(("daemon:sys") "1:3")
(("daemon:") "1:"))
;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
(substitute* "test/compare-tar"
(("tar -tvf") "tar --numeric-owner -tvf"))
#t)))))
(native-inputs (native-inputs
`(;; For bootstrapping the package. `(;; For bootstrapping the package.
("autoconf" ,autoconf) ("autoconf" ,autoconf-2.71)
("automake" ,automake) ("automake" ,automake)
("libtool" ,libtool) ("libtool" ,libtool)
("gettext" ,gettext-minimal) ("gettext" ,gettext-minimal)