summaryrefslogtreecommitdiff
path: root/libre/libretools
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-05-17 14:55:41 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-05-17 15:52:25 +0200
commit135c6bf2854a202b36af2981bf51e031c87781e9 (patch)
treebb76913757b36ba0b8b8bc0767ce55e1fabac8a2 /libre/libretools
parent082821d4c4b4455596a903a2bc203b26bf387be8 (diff)
downloadabslibre-135c6bf2854a202b36af2981bf51e031c87781e9.tar.gz
abslibre-135c6bf2854a202b36af2981bf51e031c87781e9.tar.bz2
abslibre-135c6bf2854a202b36af2981bf51e031c87781e9.zip
libretools: unbreak building packages requiring a read-write startdir
This modification was done with a patch rather than pushing it directly to libretools for several reasons: - I'm not familiar enough with libretool so the patch needs to be reviewed. - We still need to unbreak libretools to be able to build the kernel packages, for instance to fix the zombiload security issue. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre/libretools')
-rw-r--r--libre/libretools/0001-libremakepkg-fix-building-packages-requring-a-rw-sta.patch65
-rw-r--r--libre/libretools/PKGBUILD6
2 files changed, 69 insertions, 2 deletions
diff --git a/libre/libretools/0001-libremakepkg-fix-building-packages-requring-a-rw-sta.patch b/libre/libretools/0001-libremakepkg-fix-building-packages-requring-a-rw-sta.patch
new file mode 100644
index 000000000..759f686e0
--- /dev/null
+++ b/libre/libretools/0001-libremakepkg-fix-building-packages-requring-a-rw-sta.patch
@@ -0,0 +1,65 @@
+From e43ee910408794654dc3c498e4790ab39cbb3466 Mon Sep 17 00:00:00 2001
+From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+Date: Fri, 17 May 2019 02:41:43 +0200
+Subject: [PATCH] libremakepkg: fix building packages requring a rw startdir
+
+Several packages require a read-write startdir:
+- Some packages have a pkgver that is computed dynamically
+ through a pkgver function. This is the case for many packages
+ using git repositories. At the end of the package build, the
+ pkgver is automatically updated in the PKGBUILD, however,
+ without that fix that fails with libremakepkg as the PKGBUILD
+ was set read-only.
+- Some packages like linux-libre are modifying the install=
+ script. This is done by creating a temporary install script
+ in the startdir that is then modified with sed. Once this is
+ done that install script is then dynamically selected.
+ As this also require to have read-write access to the
+ startdir to be read-write it fails to build the package if
+ it's not the case.
+
+In both cases it's possible to modify the PKGBUILDs to
+workaround the issue, however the Arch Linux distribution has
+a read-write startdir, and modifying each affected packages
+would significatively increase the cost (in time and efforts)
+of maintaining Parabola.
+
+This was broken by the following commit:
+646ac02 libremakepkg,chcleanup: Be stricter about network access
+
+Thanks to elibrokeit on the #parabola IRC channel on Freenode
+for helping me identifying the cause of read-only mounts in
+libremakepkg.
+
+Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+---
+ src/chroot-tools/libremakepkg | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
+index 00eb2e0..fe7dd3a 100755
+--- a/src/chroot-tools/libremakepkg
++++ b/src/chroot-tools/libremakepkg
+@@ -124,11 +124,9 @@ build() (
+ local run_ynet=()
+ local run_nnet=()
+ if $INCHROOT; then
+- local _run=(sh -c "mount --bind -o ro -- ${startdir@Q} ${startdir@Q} && cd ${startdir@Q} && \$@" --)
+ run_ynet=(unshare --mount -- "${_run[@]}")
+ run_nnet=(unshare --mount --net -- "${_run[@]}")
+ else
+- librechroot_flags+=(-r "$startdir:/startdir")
+ run_ynet=(librechroot "${librechroot_flags[@]}" run)
+ run_nnet=(librechroot "${librechroot_flags[@]}" -N run)
+ fi
+@@ -266,6 +264,7 @@ main() {
+ "Waiting for existing lock on build directory to be released"
+ else
+ librechroot_flags+=(
++ -w "$PWD:/startdir"
+ -n "$CHROOT"
+ -l "$copy"
+ )
+--
+2.21.0
+
diff --git a/libre/libretools/PKGBUILD b/libre/libretools/PKGBUILD
index 36732b9b1..9fb85e278 100644
--- a/libre/libretools/PKGBUILD
+++ b/libre/libretools/PKGBUILD
@@ -10,12 +10,14 @@ url="https://git.parabola.nu/packages/libretools.git/"
license=('GPL3' 'GPL2')
pkgver=20181004
-source=(https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz{,.sig})
+source=(https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz{,.sig}
+ 0001-libremakepkg-fix-building-packages-requring-a-rw-sta.patch)
sha256sums=('2bdefd1803ba3e6cbd1eb955fad3de9ce8a4abfd23a0bd96a60772762df7b53b'
+ 'SKIP'
'SKIP')
validpgpkeys=('99195DD3BB6FE10A2F36ED8445698744D4FFBFC9') # Luke Shumaker
-pkgrel=2
+pkgrel=3
arch=('any')
makedepends=(ruby-ronn)
checkdepends=(