From 76553bdb8d56067936ffb3d056c074948d22ae5d Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Thu, 3 May 2018 12:33:23 +0000 Subject: [PATCH] core/pacman to 5.0.2-3 --- ...rt-file-5.33-s-application-x-pie-exe.patch | 38 +++++++++++++++++++ core/pacman/PKGBUILD | 9 ++++- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 core/pacman/0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch diff --git a/core/pacman/0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch b/core/pacman/0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch new file mode 100644 index 000000000..94ff82864 --- /dev/null +++ b/core/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: +From: "Jan Alexander Steffens (heftig)" +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) +--- + 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/core/pacman/PKGBUILD b/core/pacman/PKGBUILD index 7da930543..5e65fb77e 100644 --- a/core/pacman/PKGBUILD +++ b/core/pacman/PKGBUILD @@ -12,9 +12,9 @@ pkgname=pacman pkgver=5.0.2 -pkgrel=2.1 +pkgrel=3 pkgdesc="A library-based package manager with dependency support" -arch=('i686' 'x86_64') +arch=('x86_64') url="http://www.archlinux.org/pacman/" license=('GPL') groups=('base' 'base-devel') @@ -31,6 +31,7 @@ options=('strip' 'debug') validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae 'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig} + 0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch 0001-Sychronize-filesystem.patch 0002-Revert-close-stdin-before-running-install-scripts.patch 0003-Revert-alpm_run_chroot-always-connect-parent2child-p.patch @@ -38,6 +39,7 @@ source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig makepkg.conf) sha256sums=('dfd36086ad68564bcd977f4a1fafe51dd328acd4a95093ac4bf1249be9c41f0e' 'SKIP' + '78129351e96d19e14b05bda30480df3e834a96153b7cfe72ca5c91f5cc5cae40' '5b81731c07945db05011db153cced5294187f16e487ca2fa221bb50aa4a18dc7' '47b3583d093a9d5305f52f402f103fc5584c986a0272acbd36acfc96a9f01147' 'c8610fbae271167c2a1ae0bf69692038eac24f13921cabf925855a8697ea82f9' @@ -47,6 +49,9 @@ sha256sums=('dfd36086ad68564bcd977f4a1fafe51dd328acd4a95093ac4bf1249be9c41f0e' prepare() { cd $srcdir/$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 + patch -p1 -i ../0001-Sychronize-filesystem.patch patch -p1 -i ../0002-Revert-close-stdin-before-running-install-scripts.patch patch -p1 -i ../0003-Revert-alpm_run_chroot-always-connect-parent2child-p.patch