mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
pack: Allow embedding custom control files in deb packs.
* guix/scripts/pack.scm (self-contained-tarball/builder) [extra-options]: New argument. (self-contained-tarball, squashfs-image, docker-image) (debian-archive): Likewise. Remove two TODO comments. Document EXTRA-OPTIONS. Use the custom control files when provided. (%deb-format-options): New variable. (show-deb-format-options, show-deb-format-options/detailed): New procedures. (%options): Register new options. (show-help): Augment with new usage. (guix-pack): Validate and propagate new argument values. * doc/guix.texi (Invoking guix pack)[deb]: Document how to list advanced options. Add an example. * tests/pack.scm (deb archive...): Provide extra-options to the debian-archive procedure, and validate that the provided files are embedded in the pack.
This commit is contained in:
@@ -277,17 +277,25 @@
|
||||
(built-derivations (list check))))
|
||||
|
||||
(unless store (test-skip 1))
|
||||
(test-assertm "deb archive with symlinks" store
|
||||
(test-assertm "deb archive with symlinks and control files" store
|
||||
(mlet* %store-monad
|
||||
((guile (set-guile-for-build (default-guile)))
|
||||
(profile (profile-derivation (packages->manifest
|
||||
(list %bootstrap-guile))
|
||||
#:hooks '()
|
||||
#:locales? #f))
|
||||
(deb (debian-archive "deb-pack" profile
|
||||
#:compressor %gzip-compressor
|
||||
#:symlinks '(("/opt/gnu/bin" -> "bin"))
|
||||
#:archiver %tar-bootstrap))
|
||||
(deb (debian-archive
|
||||
"deb-pack" profile
|
||||
#:compressor %gzip-compressor
|
||||
#:symlinks '(("/opt/gnu/bin" -> "bin"))
|
||||
#:archiver %tar-bootstrap
|
||||
#:extra-options
|
||||
(list #:triggers-file
|
||||
(plain-file "triggers"
|
||||
"activate-noawait /usr/share/icons/hicolor\n")
|
||||
#:postinst-file
|
||||
(plain-file "postinst"
|
||||
"echo running configure script\n"))))
|
||||
(check
|
||||
(gexp->derivation "check-deb-pack"
|
||||
(with-imported-modules '((guix build utils))
|
||||
@@ -344,6 +352,15 @@
|
||||
(unless (null? hard-links)
|
||||
(error "hard links found in data.tar.gz" hard-links))
|
||||
|
||||
;; Verify the presence of the control files.
|
||||
(invoke "tar" "-xf" "control.tar.gz")
|
||||
(assert (file-exists? "control"))
|
||||
(assert (and (file-exists? "postinst")
|
||||
(= #o111 ;script is executable
|
||||
(logand #o111 (stat:perms
|
||||
(stat "postinst"))))))
|
||||
(assert (file-exists? "triggers"))
|
||||
|
||||
(mkdir #$output))))))
|
||||
(built-derivations (list check)))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user