Christian Hesse pushed to branch main at Arch Linux / Packaging / Packages / diffutils
Commits: 4ba7dd86 by Robin Candau at 2025-12-05T13:21:55+01:00 Fix unstable GNU translations GNU does not include PO files (used for translations) in their git repositories. When building GNU software from git sources, PO files are downloaded during the bootstrap script in `prepare()` from https://translationproject.org/latest/ in an unstable way (see `/latest/` in the URL). This is problematic because: - It implies file downloading **during** the build process (which should generally be avoided) - It may break reproducibility - It may ship unstable / unmatching translation files to users Fully switching back to dist tarball as the *primary* source for the package is not desirable as per our guidelines established in [RFC 46](https://rfc.archlinux.page/0046-upstream-package-sources/). As such, we are only building & installing translation files from the dist tarball, the software itself is still compiled against git / "transparent" sources. See the [related ToDo list](https://archlinux.org/todo/unstable-gnu-translations/) (and additional links there) for more details and rationale. - - - - - 2 changed files: - .SRCINFO - PKGBUILD Changes: ===================================== .SRCINFO ===================================== @@ -13,8 +13,12 @@ pkgbase = diffutils depends = glibc source = git+https://git.savannah.gnu.org/git/diffutils.git#tag=v3.12?signed source = git+https://git.savannah.gnu.org/git/gnulib.git + source = https://ftp.gnu.org/gnu/diffutils/diffutils-3.12.tar.gz + source = https://ftp.gnu.org/gnu/diffutils/diffutils-3.12.tar.gz.sig validpgpkeys = 155D3FC500C834486D1EEA677FD9FCCB000BEEEE b2sums = d7e72109db2b1607c2d17253df9232555d0dd3a87a2d1a1f90fac4ecdc4035a538c08078c741eea987eb37b0ab8c772553abddbc986fbeeda186fff7d2ff31da b2sums = SKIP + b2sums = 3c1c75257d919ae08e279ea33ccde0b537d9d9a9e48a4ac73e691cc48877b69281361a9ad18ca4b8a9ffa02030d1fdd6b25bd5c0d3c81779d14f279b1bab5834 + b2sums = SKIP pkgname = diffutils ===================================== PKGBUILD ===================================== @@ -13,13 +13,21 @@ depends=('glibc') makedepends=('git' 'gperf' 'help2man' 'python' 'wget') validpgpkeys=('155D3FC500C834486D1EEA677FD9FCCB000BEEEE') # Jim Meyering source=("git+https://git.savannah.gnu.org/git/diffutils.git#tag=v${pkgver}?signed" - "git+https://git.savannah.gnu.org/git/gnulib.git") + "git+https://git.savannah.gnu.org/git/gnulib.git" + "https://ftp.gnu.org/gnu/diffutils/diffutils-${pkgver}.tar.gz"{,.sig}) b2sums=('d7e72109db2b1607c2d17253df9232555d0dd3a87a2d1a1f90fac4ecdc4035a538c08078c741eea987eb37b0ab8c772553abddbc986fbeeda186fff7d2ff31da' + 'SKIP' + '3c1c75257d919ae08e279ea33ccde0b537d9d9a9e48a4ac73e691cc48877b69281361a9ad18ca4b8a9ffa02030d1fdd6b25bd5c0d3c81779d14f279b1bab5834' 'SKIP') prepare() { cd $pkgname + # Skip downloading unstable po files in bootstrap scripts to avoid non-deterministic builds + export SKIP_PO="1" + # The $SKIP_PO environment variable is only honored by the gnulib submodule if using its "sh" implementation + export GNULIB_TOOL_IMPL="sh" + git submodule init git config submodule.gnulib.url "${srcdir}/gnulib" git -c protocol.file.allow=always submodule update @@ -34,6 +42,12 @@ build() { --prefix=/usr \ --disable-gcc-warnings make + + # Generate diffutils mo files from dist tarball + cd "${srcdir}/${pkgname}-${pkgver}/po" + for po in *.po; do + msgfmt "${po}" -o "${po%.po}.mo" + done } check() { @@ -46,6 +60,12 @@ package() { cd $pkgname make DESTDIR="$pkgdir" install + + # Install diffutils mo files from dist tarball + cd "${srcdir}/${pkgname}-${pkgver}/po" + for mo in *.mo; do + install -Dm 644 "${mo}" "${pkgdir}/usr/share/locale/${mo%.mo}/LC_MESSAGES/${pkgname}.mo" + done } # vim:set ts=2 sw=2 et: View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/diffutils/-/commit/4ba7dd862996f513264d3e882586e8d7894679f4 -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/diffutils/-/commit/4ba7dd862996f513264d3e882586e8d7894679f4 You're receiving this email because of your account on gitlab.archlinux.org.
