summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-07-06 12:27:36 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-07-18 02:10:49 -0400
commit11f0698243da27be93b16cec574fbf262279779a (patch)
tree2f963278251112d113a448ee8c2ab9d92e324ba6 /tests
parentb019496fc3643f0bd837c62078086e3ff51b6001 (diff)
downloadguix-11f0698243da27be93b16cec574fbf262279779a.tar.gz
pack: Streamline how files are included in tarballs.
Thanks to Guillem Jover <guillem@debian.org> on the OFTC's #debian-dpkg
channel for helping with troubleshooting.

Letting GNU Tar recursively walk the complete files hierarchy side-steps the
risks associated with providing a list of file names:

1. Duplicated files in the archive (recorded as hard links by GNU Tar)
2. Missing parent directories.

The above would cause dpkg to malfunction, for example by aborting early and
skipping triggers when there were missing parent directories.

* guix/scripts/pack.scm (self-contained-tarball/builder): Do not call
POPULATE-SINGLE-PROFILE-DIRECTORY, which creates extraneous files such as
/root.  Instead, call POPULATE-STORE and INSTALL-DATABASE-AND-GC-ROOTS
individually to more precisely generate the file system.  Replace the list of
files by the current directory, "." and streamline the way options are passed.
* gnu/system/file-systems.scm (reduce-directories): Remove procedure.
* tests/file-systems.scm ("reduce-directories"): Remove test.
Diffstat (limited to 'tests')
-rw-r--r--tests/file-systems.scm7
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/file-systems.scm b/tests/file-systems.scm
index 80acb6d5b9..7f7c373884 100644
--- a/tests/file-systems.scm
+++ b/tests/file-systems.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2017 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,11 +50,6 @@
                    (device "/foo")
                    (flags '(bind-mount read-only)))))))))
 
-(test-equal "reduce-directories"
-  '("./opt/gnu/" "./opt/gnuism" "a/b/c")
-  (reduce-directories '("./opt/gnu/etc" "./opt/gnu/" "./opt/gnu/bin"
-                        "./opt/gnu/lib/debug" "./opt/gnuism" "a/b/c" "a/b/c")))
-
 (test-assert "does not pull (guix config)"
   ;; This module is meant both for the host side and "build side", so make
   ;; sure it doesn't pull in (guix config), which depends on the user's