core/pacman to 5.1.0-1

This commit is contained in:
Kevin Mihelich 2018-05-29 00:53:59 +00:00
parent 507cc14f8c
commit 056d5dfb52
7 changed files with 63 additions and 123 deletions

View file

@ -1,4 +1,4 @@
From faad6b96560cc1c7c7e816299e56b3a1ea7098e0 Mon Sep 17 00:00:00 2001
From 60abb58d9db663e6050d8d61d67e0e893306dfb0 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 13 Sep 2014 18:58:16 -0600
Subject: [PATCH 1/3] Sychronize filesystem
@ -14,7 +14,7 @@ Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
1 file changed, 3 insertions(+)
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 13984707..82835ee5 100644
index af964832..b3f9049e 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -230,6 +230,9 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
@ -28,5 +28,5 @@ index 13984707..82835ee5 100644
}
--
2.13.1
2.17.0

View file

@ -1,38 +0,0 @@
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

View file

@ -1,4 +1,4 @@
From 60baf4136355d00ce141b8dc4a90637eb0245245 Mon Sep 17 00:00:00 2001
From d892998ecea95c8224b128e1797a0e5a970436a8 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 30 Jan 2016 17:19:03 -0700
Subject: [PATCH 2/3] Revert "close stdin before running install scripts"
@ -16,17 +16,17 @@ Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
1 file changed, 1 deletion(-)
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 1e554632..41cca4a7 100644
index 102a879a..c9fdd4af 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -612,7 +612,6 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
@@ -608,7 +608,6 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
if(pid == 0) {
/* this code runs for the child only (the actual chroot/exec) */
- close(0);
close(1);
close(2);
while(dup2(child2parent_pipefd[1], 1) == -1 && errno == EINTR);
while(dup2(child2parent_pipefd[HEAD], 1) == -1 && errno == EINTR);
--
2.13.1
2.17.0

View file

@ -1,4 +1,4 @@
From 87612bf6ef06e5fa5d58716f9c18ccb52c27be6c Mon Sep 17 00:00:00 2001
From dd8d526a39c86c300f158c581e028365efe60a64 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Fri, 11 Mar 2016 20:11:24 -0700
Subject: [PATCH 3/3] Revert "alpm_run_chroot: always connect parent2child
@ -10,51 +10,51 @@ This reverts commit 1d6583a58da0904fb7feafd4a666391087955a7b.
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 41cca4a7..aba0ee94 100644
index c9fdd4af..2d57b256 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -596,7 +596,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
@@ -592,7 +592,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
goto cleanup;
}
- if(pipe(parent2child_pipefd) == -1) {
+ if(stdin_cb && pipe(parent2child_pipefd) == -1) {
- if(socketpair(AF_UNIX, SOCK_STREAM, 0, parent2child_pipefd) == -1) {
+ if(stdin_cb && socketpair(AF_UNIX, SOCK_STREAM, 0, parent2child_pipefd) == -1) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not create pipe (%s)\n"), strerror(errno));
retval = 1;
goto cleanup;
@@ -616,9 +616,11 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
@@ -612,9 +612,11 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
close(2);
while(dup2(child2parent_pipefd[1], 1) == -1 && errno == EINTR);
while(dup2(child2parent_pipefd[1], 2) == -1 && errno == EINTR);
- while(dup2(parent2child_pipefd[0], 0) == -1 && errno == EINTR);
- close(parent2child_pipefd[0]);
- close(parent2child_pipefd[1]);
while(dup2(child2parent_pipefd[HEAD], 1) == -1 && errno == EINTR);
while(dup2(child2parent_pipefd[HEAD], 2) == -1 && errno == EINTR);
- while(dup2(parent2child_pipefd[TAIL], 0) == -1 && errno == EINTR);
- close(parent2child_pipefd[TAIL]);
- close(parent2child_pipefd[HEAD]);
+ if(stdin_cb) {
+ while(dup2(parent2child_pipefd[0], 0) == -1 && errno == EINTR);
+ close(parent2child_pipefd[0]);
+ close(parent2child_pipefd[1]);
+ while(dup2(parent2child_pipefd[TAIL], 0) == -1 && errno == EINTR);
+ close(parent2child_pipefd[TAIL]);
+ close(parent2child_pipefd[HEAD]);
+ }
close(child2parent_pipefd[0]);
close(child2parent_pipefd[1]);
close(child2parent_pipefd[TAIL]);
close(child2parent_pipefd[HEAD]);
if(cwdfd >= 0) {
@@ -653,16 +655,15 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
@@ -649,16 +651,15 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
child2parent->events = POLLIN;
fcntl(child2parent->fd, F_SETFL, O_NONBLOCK);
close(child2parent_pipefd[1]);
- close(parent2child_pipefd[0]);
close(child2parent_pipefd[HEAD]);
- close(parent2child_pipefd[TAIL]);
if(stdin_cb) {
parent2child->fd = parent2child_pipefd[1];
parent2child->fd = parent2child_pipefd[HEAD];
parent2child->events = POLLOUT;
fcntl(parent2child->fd, F_SETFL, O_NONBLOCK);
+ close(parent2child_pipefd[0]);
+ close(parent2child_pipefd[TAIL]);
} else {
parent2child->fd = -1;
parent2child->events = 0;
- close(parent2child_pipefd[1]);
- close(parent2child_pipefd[HEAD]);
}
#define STOP_POLLING(p) do { close(p->fd); p->fd = -1; } while(0)
--
2.13.1
2.17.0

View file

@ -11,46 +11,37 @@
# - reverts to allow scriplet input on stdin
pkgname=pacman
pkgver=5.0.2
pkgrel=3
pkgver=5.1.0
pkgrel=1
pkgdesc="A library-based package manager with dependency support"
arch=('x86_64')
url="http://www.archlinux.org/pacman/"
license=('GPL')
groups=('base' 'base-devel')
depends=('bash' 'glibc' 'libarchive' 'curl'
'gpgme' 'pacman-mirrorlist')
'gpgme' 'pacman-mirrorlist' 'archlinuxarm-keyring')
makedepends=('asciidoc')
checkdepends=('python2' 'fakechroot')
optdepends=('fakeroot: for makepkg usage as normal user')
provides=('pacman-contrib')
conflicts=('pacman-contrib')
replaces=('pacman-contrib')
backup=(etc/pacman.conf etc/makepkg.conf)
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
0001-Sychronize-filesystem.patch
0002-Revert-close-stdin-before-running-install-scripts.patch
0003-Revert-alpm_run_chroot-always-connect-parent2child-p.patch
pacman.conf
makepkg.conf)
sha256sums=('dfd36086ad68564bcd977f4a1fafe51dd328acd4a95093ac4bf1249be9c41f0e'
sha256sums=('9f5993fc8923530713742f15df284677f297b3eca15ed7a24758c98ac7399bd3'
'SKIP'
'78129351e96d19e14b05bda30480df3e834a96153b7cfe72ca5c91f5cc5cae40'
'5b81731c07945db05011db153cced5294187f16e487ca2fa221bb50aa4a18dc7'
'47b3583d093a9d5305f52f402f103fc5584c986a0272acbd36acfc96a9f01147'
'c8610fbae271167c2a1ae0bf69692038eac24f13921cabf925855a8697ea82f9'
'0c81e6feb426c2def260fe7b0c0586ae191ce3a782d19c119474671f147515c7'
'b5c9c7e09525b1d671f1df96568e06ce966939f8edc788d2753fe1564fd9f64e')
'8d70fb5094f58aad98b601bbc42be354c2014b9fe734a1ee0b1e14bb041cc9cc'
'0e771370da68c855bfb4eaad4c2ae137883a474886a049b934dac2e775574cb9'
'2f586f72c34150330389854575a21be1d3ef3637c4f94bec2e948c2717a5aecb'
'4d7b47a2d1877e1426a2a0f93a595c634135b0f37a53db937e5f712fa71a1073'
'edc48d8a6c051d50241fa727e948a06ece8890d9d9da80573f8894a3bf455d36')
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
cd "$pkgname-$pkgver"
patch -p1 -i ../0001-Sychronize-filesystem.patch
patch -p1 -i ../0002-Revert-close-stdin-before-running-install-scripts.patch
@ -64,8 +55,7 @@ build() {
--localstatedir=/var --enable-doc \
--with-scriptlet-shell=/usr/bin/bash \
--with-ldconfig=/usr/bin/ldconfig
make
make -C contrib
make V=1
}
check() {
@ -75,12 +65,11 @@ check() {
package() {
cd "$pkgname-$pkgver"
make -j1 DESTDIR="$pkgdir" install
make -j1 DESTDIR="$pkgdir" -C contrib install
make DESTDIR="$pkgdir" install
# install Arch specific stuff
install -dm755 "$pkgdir/etc"
install -m644 "$srcdir/pacman.conf" "$pkgdir/etc/pacman.conf"
install -m644 "$srcdir/pacman.conf" "$pkgdir/etc"
case $CARCH in
arm)
@ -105,7 +94,6 @@ package() {
;;
esac
# set things correctly in the default conf file
install -m644 "$srcdir/makepkg.conf" "$pkgdir/etc"
sed -i "$pkgdir/etc/makepkg.conf" \
-e "s|@CARCH[@]|$mycarch|g" \
@ -122,6 +110,4 @@ package() {
for f in makepkg pacman-key; do
ln -s pacman "$pkgdir/usr/share/bash-completion/completions/$f"
done
install -Dm644 contrib/PKGBUILD.vim "$pkgdir/usr/share/vim/vimfiles/syntax/PKGBUILD.vim"
}

View file

@ -1,3 +1,4 @@
#!/hint/bash
#
# /etc/makepkg.conf
#
@ -8,9 +9,10 @@
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
@ -19,7 +21,7 @@ DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %
# /usr/bin/lftpget -c
# /usr/bin/wget
#-- The the package required by makepkg to download VCS sources
#-- The package required by makepkg to download VCS sources
# Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
'git::git'
@ -50,10 +52,9 @@ DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(!distcc color !ccache check !sign)
# Defaults: BUILDENV=(!distcc !color !ccache check !sign)
# A negated environment option will do the opposite of the comments below.
#
#-- fakeroot: Allow building packages as a non-root user
#-- distcc: Use the Distributed C/C++/ObjC compiler
#-- color: Colorize output messages
#-- ccache: Use ccache to cache compilation
@ -74,7 +75,7 @@ BUILDENV=(!distcc color !ccache check !sign)
# These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)
# Default: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug)
# A negated option will do the opposite of the comments below.
#
#-- strip: Strip symbols from binaries/libraries
@ -84,11 +85,9 @@ BUILDENV=(!distcc color !ccache check !sign)
#-- emptydirs: Leave empty directories in packages
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge: Remove files specified by PURGE_TARGETS
#-- upx: Compress binary executable files using UPX
#-- optipng: Optimize PNG images with optipng
#-- debug: Add debugging flags as specified in DEBUG_* variables
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
@ -104,6 +103,8 @@ MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"
#########################################################################
# PACKAGE OUTPUT
@ -135,7 +136,6 @@ COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
#########################################################################
# EXTENSION DEFAULTS
#########################################################################
@ -145,5 +145,3 @@ COMPRESSZ=(compress -c -f)
#
PKGEXT='.pkg.tar.xz'
SRCEXT='.src.tar.gz'
# vim: set ft=sh ts=2 sw=2 et:

View file

@ -36,20 +36,15 @@ Architecture = @CARCH@
CheckSpace
#VerbosePkgLists
# PGP signature checking
# NOTE: None of this will work without running `pacman-key --init` first.
# The compiled in default is equivalent to the following line. This requires
# you to locally sign and trust packager keys using `pacman-key` for them to be
# considered valid.
#SigLevel = Required DatabaseOptional
#LocalFileSigLevel = Optional
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# If you wish to check signatures but avoid local sign and trust issues, use
# the following line. This will treat any key imported into pacman's keyring as
# trusted.
#SigLevel = Optional TrustAll
# For now, off by default unless you read the above.
SigLevel = Never
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux ARM
# packagers with `pacman-key --populate archlinuxarm`.
#
# REPOSITORIES
@ -94,4 +89,3 @@ Include = /etc/pacman.d/mirrorlist
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs