From 024c121c844a4ec920133eb3f7e6b6ee8044c0b6 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sat, 12 Dec 2020 04:05:56 +0000 Original-Patch: https://bugs.debian.org/977177 Subject: [PATCH] Set uid, username, gid, and group name on files in generated tarball. The user and group may otherwise vary between builds on different systems. --- util/meson_aux/skeletonmm-tarball.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/util/meson_aux/skeletonmm-tarball.py b/util/meson_aux/skeletonmm-tarball.py index db9e650..89049b6 100755 --- a/util/meson_aux/skeletonmm-tarball.py +++ b/util/meson_aux/skeletonmm-tarball.py @@ -39,10 +39,18 @@ elif output_file.endswith('.gz'): else: mode = 'w' +def reproducible(tarinfo): + # Set consistent user and group on files in the tar archive + tarinfo.uid = 0 + tarinfo.uname = 'root' + tarinfo.gid = 0 + tarinfo.gname = 'root' + return tarinfo + with tarfile.open(output_file, mode=mode) as tar_file: os.chdir(source_dir) # Input filenames are relative to source_dir. for file in sys.argv[3:]: - tar_file.add(file) + tar_file.add(file, filter=reproducible) # Errors raise exceptions. If an exception is raised, Meson+ninja will notice # that the command failed, despite exit(0). sys.exit(0) -- 2.29.2 /home/services/utils.scm?id=8bea1e05fac2e24ac926f155d76e42aa90690467'>commitdiff
path: root/gnu/home/services/utils.scm
AgeCommit message (Expand)Author
2021-11-14gnu: home: services: Fix typo....* gnu/home/services/utils.scm: Fix spelling of "anything". Vagrant Cascadian
2021-10-08gnu: Move (gnu home-services) to (gnu home services)....* gnu/home-services/configuration.scm: Move the content ... * gnu/home/services/configuration.scm: ... here. * doc/guix.texi: Replace (gnu home-services mcron) with (gnu home services mcron). Replace (gnu home-services) with (gnu home services). * gnu/home.scm: Replace (gnu home-services fontutils) with (gnu services fontutils). Replace (gnu home-services shells) with (gnu home services shells). Replace (gnu home-services symlink-manager) with (gnu home services symlink-manager). Replace (gnu home-services xdg) with (gnu home services xdg). * gnu/home-services/fontutils.scm: Rename to gnu/services/fontutils.scm. * gnu/home-services/mcron.scm: Move to gnu/home/services/mcron.scm. Replace (gnu home-services shepherd) with (gnu home services shepherd). * gnu/home-services.scm (%service-type-path): Search home services in "gnu/services". * gnu/home-services/shells.scm: Replace (gnu home-services configuration) with (gnu home services configuration). Rename to gnu/home/services/shells.scm. Replace (gnu home-services utils) with (gnu home services utils). * gnu/home-services/shepherd.scm: Move to gnu/home/services/shepherd.scm. * gnu/home-services/symlink-manager.scm: Rename to gnu/home/services/symlink-manager.scm. * gnu/home-services/utils.scm: Rename to gnu/home/services/utils.scm. * gnu/home-services/xdg.scm: Rename to gnu/home/services/xdg.scm. * guix/scripts/home/import.scm: Replace (gnu home-services bash) with (gnu home services bash). * gnu/home-services.scm: Update documentation string. * doc/he-config-bare-bones.scm: Apply new (gnu home-services ...) modules location. * gnu/local.mk (GNU_SYSTEM_MODULES): Same. Oleg Pykhalov