Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
5.0.2-3
Browse files Browse the repository at this point in the history
git-svn-id: file:///srv/repos/svn-packages/svn@322529 eb2447ed-0c53-47e4-bac8-5bc4a241df78
  • Loading branch information
heftig authored and svntogit committed Apr 20, 2018
1 parent 2d71efe commit b40ce0d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
@@ -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

10 changes: 9 additions & 1 deletion trunk/PKGBUILD
Expand Up @@ -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/"
Expand All @@ -23,15 +23,23 @@ 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
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"
Expand Down

0 comments on commit b40ce0d

Please sign in to comment.