[pacman-dev] [PATCH] makepkg: do not save fflags when creating packages

Eli Schwartz eschwartz at archlinux.org
Mon Oct 7 21:18:11 UTC 2019


This breaks reproducible builds due to encoding information specific to
the filesystem which was used to build the package, information which we
are never interested in for packaging purposes anyway.

It also means that attempting to extract a package file as root (or
fakeroot) might result in angry warnings being printed to the console by
bsdtar, followed by a non-zero exit code, unless the user remembers to
use --no-fflags during extraction. This is unpleasant UI, even if pacman
itself won't care about these.

Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
 scripts/makepkg.sh.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index abe669de..908ce751 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -721,7 +721,7 @@ create_package() {
 	msg2 "$(gettext "Compressing package...")"
 	# TODO: Maybe this can be set globally for robustness
 	shopt -s -o pipefail
-	list_package_files | LANG=C bsdtar -cnf - --null --files-from - |
+	list_package_files | LANG=C bsdtar --no-fflags -cnf - --null --files-from - |
 		compress_as "$PKGEXT" > "${pkg_file}" || ret=$?
 
 	shopt -u -o pipefail
@@ -812,7 +812,7 @@ create_srcpackage() {
 
 	# TODO: Maybe this can be set globally for robustness
 	shopt -s -o pipefail
-	LANG=C bsdtar -cLf - ${pkgbase} | compress_as "$SRCEXT" > "${pkg_file}" || ret=$?
+	LANG=C bsdtar --no-fflags -cLf - ${pkgbase} | compress_as "$SRCEXT" > "${pkg_file}" || ret=$?
 
 	shopt -u -o pipefail
 
-- 
2.23.0


More information about the pacman-dev mailing list