summaryrefslogtreecommitdiff
path: root/tests/pack.scm
AgeCommit message (Collapse)Author
2024-01-08guix: pack: Build layered images.Oleg Pykhalov
* guix/scripts/pack.scm (docker-image, guix-pack, %default-options, %docker-format-options, show-docker-format-options/detailed): Handle '--max-layers' option. * doc/guix.texi (Invoking guix pack): Document this. Change-Id: I90660b2421fcdde891f003469fe2e2edaac7da41
2023-12-02gnu: Use ‘libc-utf8-locales-for-target’.Janneke Nieuwenhuizen
* guix/packages.scm (%standard-patch-inputs): Use ‘libc-utf8-locales-for-target’ instead of ‘glibc-utf8-locales’. * guix/self.scm (%packages): Likewise. * gnu/home/services/ssh.scm (file-join): Likewise * gnu/installer.scm (build-compiled-file): Likewise. * gnu/packages/chromium.scm (ungoogled-chromium/wayland): Likewise. * gnu/packages/gnome.scm (libgweather4, tracker): Likewise. * gnu/packages/javascript.scm (js-mathjax): Likewise. * gnu/packages/package-management.scm (guix, flatpak): Likewise. * gnu/packages/raspberry-pi.scm (raspi-arm64-chainloader): Likewise. * gnu/packages/suckless.scm (svkbd): Likewise. * gnu/services.scm (cleanup-gexp): Likewise. * gnu/services/base.scm (guix-publish-shepherd-service): Likewise. * gnu/services/guix.scm (guix-build-coordinator-shepherd-services) (guix-build-coordinator-agent-shepherd-services): Likewise. * gnu/services/guix.scm (guix-build-coordinator-queue-builds-shepherd-services): (guix-data-service-shepherd-services) (nar-herder-shepherd-services) (bffe-shepherd-services): Likewise. * gnu/services/web.scm (anonip-shepherd-service) (mumi-shepherd-services): Likewise. * gnu/system/image.scm (system-disk-image, system-iso9660-image) (system-docker-image, system-tarball-image): Likewise. * gnu/system/install.scm (%installation-services): Likewise. * guix/profiles.scm (info-dir-file): Likewise. (ca-certificate-bundle, profile-derivation): Likewise. * guix/scripts/pack.scm (store-database, set-utf8-locale): Likewise. * tests/pack.scm: Likewise. * tests/profiles.scm ("profile-derivation, cross-compilation"): Likewise. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Co-authored-by: Christopher Baines <mail@cbaines.net> Change-Id: I24239f427bcc930c29d2ba5d00dc615960a6c374
2023-10-20tests: Avoid three-argument ‘test-assertm’.Ludovic Courtès
This fixes a discrepancy with other tests that have a two-argument ‘test-assertm’ macro. * tests/pack.scm (test-assertm): Move within ‘with-external-store’, and remove ‘store’ parameter.
2023-07-18tests: pack: Fix indentation.Maxim Cournoyer
* tests/pack.scm: Fix indentation.
2023-07-18pack: Move common build code to (guix build pack).Maxim Cournoyer
The rationale is to reduce the number of derivations built per pack to ideally one, to minimize storage requirements. The number of derivations had gone up with 68380db4 ("pack: Extract populate-profile-root from self-contained-tarball/builder.") as a side effect to improving code reuse. * guix/scripts/pack.scm (guix): Add commentary comment. (populate-profile-root, self-contained-tarball/builder): Extract to... * guix/build/pack.scm (populate-profile-root): ... this, and... (build-self-contained-tarball): ... that, adjusting for use on the build side. (assert-utf8-locale): New procedure. (self-contained-tarball, debian-archive, rpm-archive): Adjust accordingly. Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-03-17Revert "tests: pack: Fix indentation."Maxim Cournoyer
This reverts commit ac1d530d56c1a259630c8873b2281033878a4acb.
2023-02-27pack: Make sure tests can run without a world rebuild.Ludovic Courtès
Commit 68380db4c40a2ee1156349a87254fd7b1f1a52d5 moved from 'gexp->derivation', which as a side effect, would lead tests to require a "world rebuild"--specifically, they'd have to build (default-guile). This was mitigated by 68775338a510f84e63657ab09242d79e726fa457, but that change introduced another regression. * guix/scripts/pack.scm (populate-profile-root): Define 'bootstrap?'. Pass #:guile to 'computed-file', with a value depending on 'bootstrap?'. * tests/pack.scm ("self-contained-tarball + localstatedir") ("docker-image + localstatedir", "squashfs-image + localstatedir") ("deb archive with symlinks and control files") ("rpm archive can be installed/uninstalled"): Use a <profile> record instead of a derivation.
2023-02-19pack: Add RPM format.Maxim Cournoyer
* guix/rpm.scm: New file. * guix/scripts/pack.scm (rpm-archive): New procedure. (%formats): Register it. (show-formats): Add it. (guix-pack): Register supported extra-options for the rpm format. * tests/pack.scm (rpm-for-tests): New variable. ("rpm archive can be installed/uninstalled"): New test. * tests/rpm.scm: New test. * doc/guix.texi (Invoking guix pack): Document it.
2023-02-19tests: pack: Fix indentation.Maxim Cournoyer
* tests/pack.scm: Fix indentation.
2022-10-22Remove now unnecessary uses of (guix grafts).Ludovic Courtès
These modules would use (guix grafts) just to access '%graft?' and related bindings, which are now in (guix store). * gnu/ci.scm, guix/gexp.scm, guix/lint.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/deploy.scm, guix/scripts/environment.scm, guix/scripts/home.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/pull.scm, guix/scripts/size.scm, guix/scripts/system.scm, guix/scripts/weather.scm, tests/builders.scm, tests/channels.scm, tests/cpan.scm, tests/derivations.scm, tests/gexp.scm, tests/graph.scm, tests/guix-daemon.sh, tests/monads.scm, tests/pack.scm, tests/packages.scm, tests/profiles.scm, tests/system.scm: Remove #:use-module (guix grafts).
2021-07-18Merge branch 'master' into core-updatesLudovic Courtès
2021-07-18pack: Allow embedding custom control files in deb packs.Maxim Cournoyer
* 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.
2021-07-11pack: Adjust test to earlier <compressor> changes.Ludovic Courtès
This is a followup to 5a0997ef7f3968d216328b8c63a6e36dd29a5ab8, which broke the "self-contained tarball" test. * tests/pack.scm (%gzip-compressor): Add 'list' in third field.
2021-06-29pack: Add support for the deb format.Maxim Cournoyer
* .dir-locals.el (scheme-mode)[gexp->derivation]: Define indentation rule. * guix/scripts/pack.scm (debian-archive): New procedure. (%formats): Register the new deb format. (show-formats): Add it to the usage string. * tests/pack.scm (%ar-bootstrap): New variable. (deb archive with symlinks): New test. * doc/guix.texi (Invoking guix pack): Document it. * NEWS: Add news entry.
2021-06-29tests: pack: Fix compressor extension.Maxim Cournoyer
* tests/pack.scm (%gzip-compressor): Add the missing leading period to the gzip compressor file extension.
2020-07-20pack: Build the store database under a UTF-8 locale.Ludovic Courtès
Fixes <https://bugs.gnu.org/42389>. Reported by branjam4@gmail.com. * guix/scripts/pack.scm (store-database)[build]: Add calls to 'setenv' and 'setlocale'. * tests/pack.scm ("self-contained-tarball + localstatedir, UTF-8 file names"): New test.
2020-07-20pack: 'self-contained-tarball' runs derivation in a UTF-8local.Ludovic Courtès
* guix/scripts/pack.scm (self-contained-tarball) [set-utf8-locale]: New variable. [build]: Use it. * tests/pack.scm ("self-contained-tarball"): Use a <profile> record instead of 'profile-derivation'.
2019-12-26gnu: Remove squashfs-tools-next.Ricardo Wurmus
* gnu/packages/compression.scm (squashfs-tools-next): Remove variable. * guix/scripts/pack.scm (squashfs-image, guix-pack): Use squashfs-tools. * tests/pack.scm: Use squashfs-tools.
2019-08-27pack: Create /tmp in Docker images.Ludovic Courtès
Fixes <https://bugs.gnu.org/37161>. * guix/scripts/pack.scm (docker-image)[build]: Add a 'directory' entry for "/tmp" to DIRECTIVES. * tests/pack.scm ("docker-image + localstatedir"): Test the presence of /tmp. * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]: Test the presence and permission bits of "/tmp".
2019-03-24tests: Adjust 'guix pack -f squashfs' test.Ludovic Courtès
This is a followup to 427c87d0bdc06cc3ee7fc220fd3ad36084412533. * tests/pack.scm ("squashfs-image + localstatedir"): Expect "bin" to be a relative symlink.
2018-11-06store-copy: Canonicalize the mtime and permissions of the store copy.Ludovic Courtès
Fixes a bug whereby directories in the output of 'guix pack -f tarball' would not be read-only. * guix/build/store-copy.scm (reset-permissions): New procedure. (populate-store): Pass #:keep-mtime? #t to 'copy-recursively'. Call 'reset-permissions'. * tests/pack.scm ("self-contained-tarball"): In CHECK, define 'canonical?' and use it to check that every file has an mtime of 1 and is read-only. * tests/guix-pack.sh: Invoke "chmod -Rf +w" before "rm -rf" in trap.
2018-11-06pack: Add test for 'self-contained-tarball' with localstatedir.Ludovic Courtès
* tests/pack.scm ("self-contained-tarball + localstatedir"): New test.
2018-11-06pack: Squashfs backend now honors '--localstatedir'.Ludovic Courtès
* guix/scripts/pack.scm (squashfs-image)[database]: New variable. [build]: Add (gnu build install) to the closure. Call 'install-database-and-gc-roots' when DATABASE is true, and invoke mksquashfs once more. * tests/pack.scm ("squashfs-image + localstatedir"): New test.
2018-11-06pack: Docker backend now honors '--localstatedir'.Ludovic Courtès
* guix/docker.scm (build-docker-image): Add #:database parameter. Create /var/guix/db, /var/guix/profiles, etc. when DATABASE is true. * guix/scripts/pack.scm (docker-image): Export. Remove #:deduplicate? parameter. Define 'database' and pass it to 'docker-image'. * tests/pack.scm (test-assertm): Recompile the derivation of %BOOTSTRAP-GUILE. ("docker-image + localstatedir"): New test.
2018-11-06pack: Import (guix store database) only when '--localstatedir' is passed.Ludovic Courtès
This is another way to address <https://bugs.gnu.org/32184>, which was previously addressed in commit 19c924af4f3726688ca155a905ebf1cb9acdfca2. * gnu/build/install.scm (register-closure): Move to... * gnu/build/vm.scm (register-closure): ... here. New procedure. * guix/scripts/pack.scm (self-contained-tarball)[build]: Remove now unneeded 'with-extensions' form and custom (guix config) module. * tests/guix-pack.sh: Revert the strategy from commit 19c924af4f3726688ca155a905ebf1cb9acdfca2. * tests/pack.scm ("self-contained-tarball"): Likewise.
2018-10-28tests: Fix typo.Ludovic Courtès
This is a followup to 19c924af4f3726688ca155a905ebf1cb9acdfca2. * tests/pack.scm: Fix typo in 'test-skip'.
2018-10-19tests: Run 'guix pack' tests using the external store.Ludovic Courtès
Fixes <https://bugs.gnu.org/32184>. * guix/tests.scm (call-with-external-store): New procedure. (with-external-store): New macro. * tests/pack.scm (%store): Remove. (test-assertm): Add 'store' parameter. ("self-contained-tarball"): Wrap in 'with-external-store'. * tests/guix-pack.sh: Connect to the external store, if possible, by setting NIX_STORE_DIR and GUIX_DAEMON_SOCKET. Remove most uses of '--bootstrap'.
2018-09-18tests: Skip 'self-contained-tarball' test unconditionally.Ludovic Courtès
* tests/pack.scm ("self-contained-tarball"): Skip unconditionally.
2018-06-01pack: Adjust test to expect relative symlinks.Ludovic Courtès
Reported by Chris Marusich <cmmarusich@gmail.com>. Fixes <https://bugs.gnu.org/31560>. * tests/pack.scm ("self-contained-tarball"): Rename 'guile' to 'bin'. Expect 'bin/Guile' to be a relative symlink.
2018-06-01tests: Fix arguments in pack test.Ricardo Wurmus
This is a follow-up to commit 5ffac538aa604b71814ac74579626f0d3110b96e. * tests/pack.scm (self-contained-tarball): Adjust arguments to "self-contained-tarball".
2017-03-22tests: Skip 'guix pack' test when networking is unavailable.Ludovic Courtès
* tests/pack.scm ("self-contained-tarball"): Skip unless (network-reachable?).
2017-03-17pack: Move absolute file name to <compressor>.Ludovic Courtès
* guix/scripts/pack.scm (<compressor>)[package]: Remove. [command]: Document as being a gexp with an absolute file name. (%compressors): Adjust accordingly. (self-contained-tarball): Simplify PATH expression. Move 'string-join' for the compressor command on the build side. (docker-image): Simplify PATH expression. * tests/pack.scm (%gzip-compressor): Adjust accordingly.
2017-03-14pack: Add unit test.Ludovic Courtès
* guix/scripts/pack.scm (self-contained-tarball): Add #:tar option. [build](tar-supports-sort?): New variable. Use it. * tests/pack.scm: New file. * Makefile.am (SCM_TESTS): Add it.