Robin Candau pushed to branch main at Arch Linux / Packaging / Packages / prometheus
Commits: ed5dc01e by Robin Candau at 2025-02-13T18:32:03+01:00 upgpkg: 3.1.0-2: Add a patch to ignore timestamps recording in gzip metadata Required for reproducible builds See https://github.com/prometheus/prometheus/pull/16035 - - - - - 3 changed files: - .SRCINFO - PKGBUILD - + ignore_gzip_timestamps.patch Changes: ===================================== .SRCINFO ===================================== @@ -1,7 +1,7 @@ pkgbase = prometheus pkgdesc = An open-source systems monitoring and alerting toolkit pkgver = 3.1.0 - pkgrel = 1 + pkgrel = 2 url = https://prometheus.io arch = x86_64 license = Apache-2.0 @@ -20,9 +20,11 @@ pkgbase = prometheus source = prometheus.service source = prometheus.sysusers source = prometheus.conf + source = ignore_gzip_timestamps.patch sha256sums = b23aefb9e0018788ea048fd1c0dbac945c4acf7b20a6ab0cf81bd3e717a2995f sha256sums = a6deb1f678960ee9b406e4458364c5082db11f93fae6286940aacd3e3933beb7 sha256sums = 2747fabb4e56b808361eb7dd7acf9729ab8973d1ebe2f857dd56f6c71f71e45f sha256sums = 6d32deb125381cbebac11b6953a7d9a65eb7e50f209dc1e22c63facf678a3070 + sha256sums = cd2be58b613e51416fbf91e7c0f25d4f0050bbe0036c48b8691b3fec9c5ba486 pkgname = prometheus ===================================== PKGBUILD ===================================== @@ -3,7 +3,7 @@ pkgname=prometheus pkgver=3.1.0 -pkgrel=1 +pkgrel=2 pkgdesc='An open-source systems monitoring and alerting toolkit' url='https://prometheus.io' @@ -19,12 +19,23 @@ backup=('etc/prometheus/prometheus.yml' 'etc/conf.d/prometheus') source=("prometheus-v$pkgver.tar.gz::https://github.com/prometheus/prometheus/archive/v$pkgver.tar.gz" prometheus.service prometheus.sysusers - prometheus.conf) + prometheus.conf + ignore_gzip_timestamps.patch) sha256sums=('b23aefb9e0018788ea048fd1c0dbac945c4acf7b20a6ab0cf81bd3e717a2995f' 'a6deb1f678960ee9b406e4458364c5082db11f93fae6286940aacd3e3933beb7' '2747fabb4e56b808361eb7dd7acf9729ab8973d1ebe2f857dd56f6c71f71e45f' - '6d32deb125381cbebac11b6953a7d9a65eb7e50f209dc1e22c63facf678a3070') + '6d32deb125381cbebac11b6953a7d9a65eb7e50f209dc1e22c63facf678a3070' + 'cd2be58b613e51416fbf91e7c0f25d4f0050bbe0036c48b8691b3fec9c5ba486') + +prepare() { + cd prometheus-$pkgver + + # Ignore timestamps recording in gzip metadata + # This is required for reproducible builds + # See https://github.com/prometheus/prometheus/pull/16035 + patch -Np1 -i $srcdir/ignore_gzip_timestamps.patch +} build() { cd prometheus-$pkgver ===================================== ignore_gzip_timestamps.patch ===================================== @@ -0,0 +1,16 @@ +diff --git a/scripts/compress_assets.sh b/scripts/compress_assets.sh +index 19e1e2248..91b1c7b31 100755 +--- a/scripts/compress_assets.sh ++++ b/scripts/compress_assets.sh +@@ -13,9 +13,9 @@ fi + cd web/ui + cp embed.go.tmpl embed.go + +-GZIP_OPTS="-fk" ++GZIP_OPTS="-fkn" + # gzip option '-k' may not always exist in the latest gzip available on different distros. +-if ! gzip -k -h &>/dev/null; then GZIP_OPTS="-f"; fi ++if ! gzip -k -h &>/dev/null; then GZIP_OPTS="-fn"; fi + + mkdir -p static + find static -type f -name '*.gz' -delete View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/prometheus/-/commit/ed5dc01eb2871d0324e11ab8f84da2adbf834d1f -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/prometheus/-/commit/ed5dc01eb2871d0324e11ab8f84da2adbf834d1f You're receiving this email because of your account on gitlab.archlinux.org.