[Dev] [PATCH] libremakepkg: fix building packages requring a rw startdir

bill-auger bill-auger at peers.community
Sun May 19 08:33:25 GMT 2019


the log message for the commit that introduced this change indicates that it was necessary for some reason - i think it would be hasty to revert this until we know what the trade-off would be

  "- We mount the temporary directory containing the extracted source package files read-only, to be sure that makepkg doesn't modify the PKGBUILD. This is necessary because --holdver only disables pkgver() if it's a VCS package."

right now, i think the only packages that are broken by this are the kernels - there is a single command that requires a writable /startdir, and it does not appear to have any value whatsoever - all that it does is write the 'pkgbase' into the .install script - 'pkgbase' will never change, so that could and should be hard-coded into the .install script - i suggest this change to the kernels PKGBUILDs instead


--- a/linux.install
+++ b/linux.install
@@ -7,8 +7,6 @@
 }
 
 post_remove() {
-  rm -f boot/initramfs-%PKGBASE%.img
-  rm -f boot/initramfs-%PKGBASE%-fallback.img
+  rm -f boot/initramfs-linux-libre.img
+  rm -f boot/initramfs-linux-libre-fallback.img
 }
-
-# vim:set ft=sh ts=8 sts=2 sw=2 et:


--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@
 # Based on linux package
 
 pkgbase=linux-libre         # Build stock kernel
-#pkgbase=linux-libre-custom # Build kernel with a different name
+#pkgbase=linux-libre-custom # Build kernel with a different name (ASSERT: hard-coded into linux.install)
 _srcbasever=5.1-gnu
 _srcver=5.1.3-gnu
 
@@ -225,10 +225,6 @@
   "
   fi
 
-  # hack to allow specifying an initially nonexisting install file
-  sed "$subst" "$startdir/$install" > "$startdir/$install.pkg"
-  true && install=$install.pkg
-
   # fill in mkinitcpio preset and pacman hooks
   sed "$subst" ../linux.preset | install -Dm644 /dev/stdin \
     "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset"



More information about the Dev mailing list