summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre')
-rw-r--r--libre/pacman/0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch38
-rw-r--r--libre/pacman/PKGBUILD9
2 files changed, 45 insertions, 2 deletions
diff --git a/libre/pacman/0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch b/libre/pacman/0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch
new file mode 100644
index 000000000..94ff82864
--- /dev/null
+++ b/libre/pacman/0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch
@@ -0,0 +1,38 @@
+From c6ffa8bb3eea231c36dab87e6051c04b16e8c0e6 Mon Sep 17 00:00:00 2001
+Message-Id: <c6ffa8bb3eea231c36dab87e6051c04b16e8c0e6.1524246116.git.jan.steffens@gmail.com>
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
+Date: Fri, 20 Apr 2018 19:25:55 +0200
+Subject: [PATCH] libmakepkg: Support file 5.33's application/x-pie-executable
+
+file 5.33 introduces a new MIME type "application/x-pie-executable",
+which is used for relocatable binaries. makepkg ignored these binaries
+and did not attempt to strip them.
+
+Handle the new MIME type like the old "application/x-sharedlib".
+Stripping the binaries with --strip-unneeded to keep relocation
+information should be the correct thing to do.
+
+file 5.33 also misidentifies actual libraries as PIE executables, so we
+didn't strip any shared libraries, either. We now work around this bug.
+
+Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+---
+ scripts/libmakepkg/tidy/strip.sh.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in
+index e20114c0..36d1b89e 100644
+--- a/scripts/libmakepkg/tidy/strip.sh.in
++++ b/scripts/libmakepkg/tidy/strip.sh.in
+@@ -125,6 +125,8 @@ tidy_strip() {
+ esac;;
+ *application/x-executable*) # Binaries
+ strip_flags="$STRIP_BINARIES";;
++ *application/x-pie-executable*) # Relocatable binaries
++ strip_flags="$STRIP_SHARED";;
+ *)
+ continue ;;
+ esac
+--
+2.17.0
+
diff --git a/libre/pacman/PKGBUILD b/libre/pacman/PKGBUILD
index 2dbefbe75..dc731f1c2 100644
--- a/libre/pacman/PKGBUILD
+++ b/libre/pacman/PKGBUILD
@@ -11,8 +11,8 @@
pkgname=pacman
pkgver=5.0.2
-pkgrel=2
-pkgrel+=.parabola2
+pkgrel=3
+pkgrel+=.parabola1
pkgdesc="A library-based package manager with dependency support"
arch=('i686' 'x86_64')
arch+=('armv7h')
@@ -36,6 +36,7 @@ options=('strip' 'debug')
validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae <allan@archlinux.org>
'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org>
source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
+ 0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch
"${arch[@]/#/pacman.conf.}"
makepkg.conf.in
pacman-keyring.service
@@ -46,6 +47,7 @@ source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig
0001-makepkg-treat-pkgrel-more-similarly-to-pkgver.patch)
sha256sums=('dfd36086ad68564bcd977f4a1fafe51dd328acd4a95093ac4bf1249be9c41f0e'
'SKIP'
+ '78129351e96d19e14b05bda30480df3e834a96153b7cfe72ca5c91f5cc5cae40'
'19853ea9a2138157bbb334eb7f3a9b3098b88e513678b54b7b4f19d2ffd6ecad'
'1b2c8f4ec84d0dc496516880a54b5e4deb78798618c9cf5e284a45303f156e58'
'b2cb3ba229edba338c0af7d7f5bb1a6ef6143bcd453c693bfee0c02fa1cfa18a'
@@ -60,6 +62,9 @@ sha256sums=('dfd36086ad68564bcd977f4a1fafe51dd328acd4a95093ac4bf1249be9c41f0e'
prepare() {
cd "$pkgname-$pkgver"
+ # Fix up makepkg stripping with file 5.33
+ patch -Np1 -i ../0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch
+
# From Arch ARM
if [ "${CARCH}" = "armv7h" ]; then
patch -p1 -i $srcdir/0001-Sychronize-filesystem.patch