[arch-commits] Commit in pacman/trunk (2 files)

Jan Steffens heftig at archlinux.org
Fri Apr 20 17:45:28 UTC 2018


    Date: Friday, April 20, 2018 @ 17:45:28
  Author: heftig
Revision: 322529

5.0.2-3

Added:
  pacman/trunk/0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch
Modified:
  pacman/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch |   38 ++++++++++
 PKGBUILD                                                        |   10 ++
 2 files changed, 47 insertions(+), 1 deletion(-)

Added: 0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch
===================================================================
--- 0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch	                        (rev 0)
+++ 0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch	2018-04-20 17:45:28 UTC (rev 322529)
@@ -0,0 +1,38 @@
+From c6ffa8bb3eea231c36dab87e6051c04b16e8c0e6 Mon Sep 17 00:00:00 2001
+Message-Id: <c6ffa8bb3eea231c36dab87e6051c04b16e8c0e6.1524246116.git.jan.steffens at gmail.com>
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at 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 at 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
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-04-20 15:27:51 UTC (rev 322528)
+++ PKGBUILD	2018-04-20 17:45:28 UTC (rev 322529)
@@ -5,7 +5,7 @@
 
 pkgname=pacman
 pkgver=5.0.2
-pkgrel=2
+pkgrel=3
 pkgdesc="A library-based package manager with dependency support"
 arch=('x86_64')
 url="http://www.archlinux.org/pacman/"
@@ -23,16 +23,24 @@
 validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD'  # Allan McRae <allan at archlinux.org>
               'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew at 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
         pacman.conf.i686
         pacman.conf.x86_64
         makepkg.conf)
 sha256sums=('dfd36086ad68564bcd977f4a1fafe51dd328acd4a95093ac4bf1249be9c41f0e'
             'SKIP'
+            '78129351e96d19e14b05bda30480df3e834a96153b7cfe72ca5c91f5cc5cae40'
             'cb76123c15ca9f2a467ebecb72af611f618fcc8431cf8b437d40fa2e61c23590'
             '95b3b2416402059cf6acf3e046082e7ce261e2b88629231dbf579a4200d8a63b'
             '6066d67d818ee36760bf121c76d5019130f7875b3e5ed179b319b810a3a9685b')
 
+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
+}
+
 build() {
   cd "$pkgname-$pkgver"
 



More information about the arch-commits mailing list