[pacman-dev] [PATCH] makepkg: add more information to .BUILDINFO

Allan McRae allan at archlinux.org
Thu Jul 6 04:02:58 UTC 2017


From: Levente Polyak <anthraxx at archlinux.org>

The .BUILDINFO file should retain all the information needed to reproducibly
build a package.  Add some extra information to the file and also provide a
version number to keep track of future changes.

Signed-off-by: Allan McRae <allan at archlinux.org>
---

@Levente: with other changes suggested by Dave on earlier versions of your
patches, the refactoring became somewhat useless.  Are you happy with this
version of your patch?

 scripts/makepkg.sh.in | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 3c29c2d8..20e9dd7e 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -667,13 +667,21 @@ write_pkginfo() {
 write_buildinfo() {
 	msg2 "$(gettext "Generating %s file...")" ".BUILDINFO"
 
-	write_kv_pair "builddir"  "${BUILDDIR}"
+	write_kv_pair "format" "1"
+
+	write_kv_pair "pkgname" "$pkgname"
+	write_kv_pair "pkgbase" "$pkgbase"
+
+	local fullver=$(get_full_version)
+	write_kv_pair "pkgver" "$fullver"
 
 	local sum="$(sha256sum "${BUILDFILE}")"
 	sum=${sum%% *}
-
 	write_kv_pair "pkgbuild_sha256sum" $sum
 
+	write_kv_pair "packager" "${PACKAGER}"
+	write_kv_pair "builddate" "${SOURCE_DATE_EPOCH}"
+	write_kv_pair "builddir"  "${BUILDDIR}"
 	write_kv_pair "buildenv" "${BUILDENV[@]}"
 	write_kv_pair "options" "${OPTIONS[@]}"
 
-- 
2.13.2


More information about the pacman-dev mailing list