[arch-commits] Commit in linux-firmware/trunk (PKGBUILD)

Jelle van der Waa jelle at archlinux.org
Sun Nov 17 17:42:07 UTC 2019


    Date: Sunday, November 17, 2019 @ 17:42:06
  Author: jelle
Revision: 368991

upgpkg: linux-firmware 20191022.2b016af-3

Make amd-ucode reproducible, thanks to esotericnonsense.

Modified:
  linux-firmware/trunk/PKGBUILD

----------+
 PKGBUILD |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-17 15:10:10 UTC (rev 368990)
+++ PKGBUILD	2019-11-17 17:42:06 UTC (rev 368991)
@@ -4,7 +4,7 @@
 pkgname=(linux-firmware amd-ucode)
 _commit=2b016afc348ba4b5fb2016ffcb2822f4a293da0c
 pkgver=20191022.2b016af
-pkgrel=2
+pkgrel=3
 pkgdesc="Firmware files for Linux"
 makedepends=('git')
 arch=('any')
@@ -30,9 +30,13 @@
 build() {
   mkdir -p kernel/x86/microcode
   cat ${pkgbase}/amd-ucode/microcode_amd*.bin > kernel/x86/microcode/AuthenticAMD.bin
-  # Make the .bin reproducible 
+
+  # Reproducibility: set the timestamp on the bin file
   [ ! -z $SOURCE_DATE_EPOCH ] && touch -d @$SOURCE_DATE_EPOCH kernel/x86/microcode/AuthenticAMD.bin
-  echo kernel/x86/microcode/AuthenticAMD.bin | bsdcpio -o -H newc -R 0:0 > amd-ucode.img
+  # Reproducibility: strip the inode and device numbers from the cpio archive
+  echo kernel/x86/microcode/AuthenticAMD.bin |
+    bsdtar --uid 0 --gid 0 -cnf - -T - |
+    bsdtar --null -cf - --format=newc @- > amd-ucode.img
 }
 
 package_linux-firmware() {



More information about the arch-commits mailing list