diff options
-rw-r--r-- | abs/core/pacman/PKGBUILD | 88 | ||||
-rw-r--r-- | abs/core/pacman/makepkg-asroot.patch | 13 | ||||
-rw-r--r-- | abs/core/pacman/makepkg-fix-one-more-file-seccomp-issue.patch | 30 | ||||
-rw-r--r-- | abs/core/pacman/makepkg-wait-f.patch | 11 | ||||
-rw-r--r-- | abs/core/pacman/makepkg.conf | 36 | ||||
-rw-r--r-- | abs/core/pacman/pacman-5.2.1-fix-pactest-package-tar-format.patch | 32 | ||||
-rw-r--r-- | abs/core/pacman/pacman-5.2.1-reproducible-libprovides.patch | 13 | ||||
-rw-r--r-- | abs/core/pacman/pacman.conf (renamed from abs/core/pacman/pacman.conf.x86_64) | 3 | ||||
-rw-r--r-- | abs/core/pacman/pacman.conf.i686 | 91 |
9 files changed, 147 insertions, 170 deletions
diff --git a/abs/core/pacman/PKGBUILD b/abs/core/pacman/PKGBUILD index e30c4bd..94ef2a4 100644 --- a/abs/core/pacman/PKGBUILD +++ b/abs/core/pacman/PKGBUILD @@ -1,33 +1,50 @@ # vim: set ts=2 sw=2 et: -# $Id$ # Maintainer: Dan McGee <dan@archlinux.org> # Maintainer: Dave Reisner <dreisner@archlinux.org> pkgname=pacman -pkgver=5.0.2 -pkgrel=2 +pkgver=5.2.1 +pkgrel=6 pkgdesc="A library-based package manager with dependency support" arch=('x86_64') -url="http://www.archlinux.org/pacman/" +url="https://www.archlinux.org/pacman/" license=('GPL') -groups=('base' 'base-devel') +groups=('base-devel') depends=('bash' 'glibc' 'libarchive' 'curl' 'gpgme' 'pacman-mirrorlist' 'archlinux-keyring') makedepends=('asciidoc') -checkdepends=('python2' 'fakechroot') -provides=('pacman-contrib') -conflicts=('pacman-contrib') -replaces=('pacman-contrib') -backup=(etc/pacman.conf etc/makepkg.conf) +checkdepends=('python' 'fakechroot') +optdepends=('perl-locale-gettext: translation support in makepkg-template') +provides=('libalpm.so') +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} - pacman.conf.i686 - pacman.conf.x86_64 makepkg-asroot.patch + makepkg-wait-f.patch + pacman-5.2.1-fix-pactest-package-tar-format.patch + makepkg-fix-one-more-file-seccomp-issue.patch + pacman-5.2.1-reproducible-libprovides.patch + pacman.conf makepkg.conf) +sha256sums=('1930c407265fd039cb3a8e6edc82f69e122aa9239d216d9d57b9d1b9315af312' + 'SKIP' + 'd86967f28c57adf778070e7b92021a7e0dd14dcd67e32aa75fd09518c7cfe114' + '2f7f800e5632de4f51307c82006be5c86e183a6f649292d9e4c41ed00ce7f048' + '824a5c9dd458fb27b05a9a0b4b5d75b7a392de0dae79a18f5cfe8beaf4d82f0c' + 'e481a161bba76729cd434c97e0b319ddfcb1d93b2e4890d72b4e8a32982531d9' + '667ba659f85e3740fda9808e4751a44a63e0484072594d961b87e474c607b79c' + '3353f363088c73f1f86a890547c0f87c7473e5caf43bbbc768c2e9a7397f2aa2' + '8c100b64450f5a19a16325dd05c143d49395bdeb96bd957f863cde4b95d3cb86') +prepare() { + cd "$pkgname-$pkgver" + patch -Np1 < ../pacman-5.2.1-fix-pactest-package-tar-format.patch + patch -Np1 < ../makepkg-fix-one-more-file-seccomp-issue.patch + patch -Np1 < ../pacman-5.2.1-reproducible-libprovides.patch +} build() { cd "$pkgname-$pkgver" @@ -37,7 +54,6 @@ build() { --with-scriptlet-shell=/usr/bin/bash \ --with-ldconfig=/usr/bin/ldconfig make V=1 - make -C contrib } check() { @@ -48,51 +64,19 @@ package() { cd "$pkgname-$pkgver" make DESTDIR="$pkgdir" install - make DESTDIR="$pkgdir" -C contrib install # install Arch specific stuff install -dm755 "$pkgdir/etc" - install -m644 "$srcdir/pacman.conf.$CARCH" "$pkgdir/etc/pacman.conf" - - case $CARCH in - i686) - mycarch="i686" - mychost="i686-pc-linux-gnu" - myflags="-march=i686" - ;; - x86_64) - mycarch="x86_64" - mychost="x86_64-pc-linux-gnu" - myflags="-march=x86-64" - ;; - esac - - # set things correctly in the default conf file + install -m644 "$srcdir/pacman.conf" "$pkgdir/etc" install -m644 "$srcdir/makepkg.conf" "$pkgdir/etc" - sed -i "$pkgdir/etc/makepkg.conf" \ - -e "s|@CARCH[@]|$mycarch|g" \ - -e "s|@CHOST[@]|$mychost|g" \ - -e "s|@CARCHFLAGS[@]|$myflags|g" - - # put bash_completion in the right location - install -dm755 "$pkgdir/usr/share/bash-completion/completions" - mv "$pkgdir/etc/bash_completion.d/pacman" "$pkgdir/usr/share/bash-completion/completions" - rmdir "$pkgdir/etc/bash_completion.d" - - 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" #restore --asroot makepkg option cd $pkgdir/usr/bin/ patch -p0 -i "$srcdir/makepkg-asroot.patch" - rm $pkgdir/usr/bin/makepkg.orig + #rm $pkgdir/usr/bin/makepkg.orig + + #remove wait -t option in makepkg + cd $pkgdir/usr/bin/ + patch -p0 -i "$srcdir/makepkg-wait-f.patch" + } -md5sums=('f36f5e7e95a89436febe1bcca874fc33' - 'SKIP' - 'bdb40c76225c2fd8874bd34b6a3f6ad7' - 'c511ee4c7a86a37e8841440ede89300d' - '4950b7c5adf80e082a726dd11b9cb12f' - 'ce959232a30f1fbd33f536c76a9df198') diff --git a/abs/core/pacman/makepkg-asroot.patch b/abs/core/pacman/makepkg-asroot.patch index 8da3fb0..e0f085b 100644 --- a/abs/core/pacman/makepkg-asroot.patch +++ b/abs/core/pacman/makepkg-asroot.patch @@ -1,6 +1,6 @@ ---- makepkg.orig 2016-04-22 15:35:51.860386914 +0000 -+++ makepkg 2016-04-22 15:39:19.543784899 +0000 -@@ -1917,7 +1917,7 @@ +--- makepkg.orig 2020-05-24 03:07:41.473343487 +0000 ++++ makepkg 2020-05-24 03:39:17.572299608 +0000 +@@ -1027,7 +1027,7 @@ 'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'noarchive' 'nobuild' 'nocolor' 'nocheck' 'nodeps' 'noextract' 'noprepare' 'nosign' 'packagelist' 'printsrcinfo' 'repackage' 'rmdeps' 'sign' 'skipchecksums' 'skipinteg' @@ -9,14 +9,15 @@ # Pacman Options OPT_LONG+=('asdeps' 'noconfirm' 'needed' 'noprogressbar') -@@ -2114,9 +2114,7 @@ +@@ -1173,9 +1173,8 @@ if (( ! INFAKEROOT )); then if (( EUID == 0 )); then - error "$(gettext "Running %s as root is not allowed as it can cause permanent,\n\ -catastrophic damage to your system.")" "makepkg" -- exit 1 # $E_USER_ABORT -+ : +- exit $E_ROOT ++ error "$(gettext "Running %s as root.")" "makepkg" ++ #exit $E_ROOT fi else if [[ -z $FAKEROOTKEY ]]; then diff --git a/abs/core/pacman/makepkg-fix-one-more-file-seccomp-issue.patch b/abs/core/pacman/makepkg-fix-one-more-file-seccomp-issue.patch new file mode 100644 index 0000000..7b077ad --- /dev/null +++ b/abs/core/pacman/makepkg-fix-one-more-file-seccomp-issue.patch @@ -0,0 +1,30 @@ +From 00cfc6c5c9700b597c384743c2f057a2ba7125e2 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz@archlinux.org> +Date: Thu, 9 Jan 2020 20:49:17 -0500 +Subject: [pacman-dev] [PATCH] makepkg: fix one more file-seccomp issue + +When file is called via fakeroot, it doesn't matter whether you use -z +or not, it is still incompatible with seccomp. Fix by configuring it +with FILECMD when used in the fakeroot 'tidy' run. + +Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> +--- + scripts/libmakepkg/tidy/strip.sh.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in +index 1bd810f0..876f00f0 100644 +--- a/scripts/libmakepkg/tidy/strip.sh.in ++++ b/scripts/libmakepkg/tidy/strip.sh.in +@@ -111,7 +111,7 @@ tidy_strip() { + + local binary strip_flags + find . -type f -perm -u+w -print0 2>/dev/null | while IFS= read -rd '' binary ; do +- case "$(file -bi "$binary")" in ++ case "$(@FILECMD@ -bi "$binary")" in + *application/x-sharedlib*) # Libraries (.so) + strip_flags="$STRIP_SHARED";; + *application/x-archive*) # Libraries (.a) +-- +2.24.1 + diff --git a/abs/core/pacman/makepkg-wait-f.patch b/abs/core/pacman/makepkg-wait-f.patch new file mode 100644 index 0000000..fb71c50 --- /dev/null +++ b/abs/core/pacman/makepkg-wait-f.patch @@ -0,0 +1,11 @@ +--- makepkg.orig 2020-05-24 04:58:00.752558800 +0000 ++++ makepkg 2020-05-24 04:58:35.088199407 +0000 +@@ -432,7 +432,7 @@ + + $pkgfunc &>"$logpipe" + +- wait -f $teepid ++ wait $teepid + rm "$logpipe" + else + "$pkgfunc" diff --git a/abs/core/pacman/makepkg.conf b/abs/core/pacman/makepkg.conf index 8fa4fb0..cecfd9d 100644 --- a/abs/core/pacman/makepkg.conf +++ b/abs/core/pacman/makepkg.conf @@ -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') @@ -30,15 +32,13 @@ VCSCLIENTS=('bzr::bzr' # ARCHITECTURE, COMPILE FLAGS ######################################################################### # -CARCH="@CARCH@" -CHOST="@CHOST@" +CARCH="x86_64" +CHOST="x86_64-pc-linux-gnu" #-- Compiler and Linker Flags -# -march (or -mcpu) builds exclusively for an architecture -# -mtune optimizes for an architecture, but builds for whole processor family CPPFLAGS="-D_FORTIFY_SOURCE=2" -CFLAGS="@CARCHFLAGS@ -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt" -CXXFLAGS="@CARCHFLAGS@ -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt" +CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt" +CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" #-- Make Flags: change this for DistCC/SMP systems #MAKEFLAGS="-j2" @@ -50,7 +50,7 @@ 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. # #-- distcc: Use the Distributed C/C++/ObjC compiler @@ -73,7 +73,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 @@ -83,11 +83,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) @@ -103,6 +101,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 @@ -130,18 +130,16 @@ PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) COMPRESSGZ=(gzip -c -f -n) COMPRESSBZ2=(bzip2 -c -f) COMPRESSXZ=(xz -c -z -) +COMPRESSZST=(zstd -c -z -q -) COMPRESSLRZ=(lrzip -q) COMPRESSLZO=(lzop -q) COMPRESSZ=(compress -c -f) +COMPRESSLZ4=(lz4 -q) +COMPRESSLZ=(lzip -c -f) ######################################################################### # EXTENSION DEFAULTS ######################################################################### # -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# PKGEXT='.pkg.tar.xz' SRCEXT='.src.tar.gz' - -# vim: set ft=sh ts=2 sw=2 et: diff --git a/abs/core/pacman/pacman-5.2.1-fix-pactest-package-tar-format.patch b/abs/core/pacman/pacman-5.2.1-fix-pactest-package-tar-format.patch new file mode 100644 index 0000000..cdf7e32 --- /dev/null +++ b/abs/core/pacman/pacman-5.2.1-fix-pactest-package-tar-format.patch @@ -0,0 +1,32 @@ +From b9faf652735c603d1bdf849a570185eb721f11c1 Mon Sep 17 00:00:00 2001 +From: Allan McRae <allan@archlinux.org> +Date: Tue, 12 Nov 2019 16:14:57 +1000 +Subject: pactest: set package tar format to GNU_FORMAT + +python-3.8 changed the default tar format to PAX_FORMAT. This caused +issues in our testsuite with package extraction of files with UTF-8 +characters as we run the tests under the C locale. + +sycn600.py: +error: error while reading package /tmp/pactest-xuhri4xa/var/cache/pacman/pkg/unicodechars-2.0-1.pkg.tar.gz: Pathname can't be converted from UTF-8 to current locale. + +Set format back to GNU_FORMAT. + +Signed-off-by: Allan McRae <allan@archlinux.org> +--- + test/pacman/pmpkg.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py +index 6a845222..e40868cc 100644 +--- a/test/pacman/pmpkg.py ++++ b/test/pacman/pmpkg.py +@@ -142,7 +142,7 @@ class pmpkg(object): + util.mkdir(os.path.dirname(self.path)) + + # Generate package metadata +- tar = tarfile.open(self.path, "w:gz") ++ tar = tarfile.open(self.path, "w:gz", format=tarfile.GNU_FORMAT) + for name, data in archive_files: + info = tarfile.TarInfo(name) + info.size = len(data) diff --git a/abs/core/pacman/pacman-5.2.1-reproducible-libprovides.patch b/abs/core/pacman/pacman-5.2.1-reproducible-libprovides.patch new file mode 100644 index 0000000..fea6958 --- /dev/null +++ b/abs/core/pacman/pacman-5.2.1-reproducible-libprovides.patch @@ -0,0 +1,13 @@ +diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in +index d1416d15..b95a03af 100644 +--- a/scripts/makepkg.sh.in ++++ b/scripts/makepkg.sh.in +@@ -521,7 +521,7 @@ find_libprovides() { + missing=0 + case "$p" in + *.so) +- mapfile -t filename < <(find "$pkgdir" -type f -name $p\*) ++ mapfile -t filename < <(find "$pkgdir" -type f -name $p\* | LC_ALL=C sort) + if [[ $filename ]]; then + # packages may provide multiple versions of the same library + for fn in "${filename[@]}"; do diff --git a/abs/core/pacman/pacman.conf.x86_64 b/abs/core/pacman/pacman.conf index 8ce6919..0a04238 100644 --- a/abs/core/pacman/pacman.conf.x86_64 +++ b/abs/core/pacman/pacman.conf @@ -16,10 +16,9 @@ #GPGDir = /etc/pacman.d/gnupg/ #HookDir = /etc/pacman.d/hooks/ HoldPkg = pacman glibc -#XferCommand = /usr/bin/curl -C - -f %u > %o +#XferCommand = /usr/bin/curl -L -C - -f -o %o %u #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u #CleanMethod = KeepInstalled -#UseDelta = 0.7 Architecture = auto # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup diff --git a/abs/core/pacman/pacman.conf.i686 b/abs/core/pacman/pacman.conf.i686 deleted file mode 100644 index 0ea1570..0000000 --- a/abs/core/pacman/pacman.conf.i686 +++ /dev/null @@ -1,91 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -#HookDir = /etc/pacman.d/hooks/ -HoldPkg = pacman glibc -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -#UseDelta = 0.7 -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#Color -#TotalDownload -CheckSpace -#VerbosePkgLists - -# 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 - -# 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 -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -#[testing] -#Include = /etc/pacman.d/mirrorlist - -[core] -Include = /etc/pacman.d/mirrorlist - -[extra] -Include = /etc/pacman.d/mirrorlist - -#[community-testing] -#Include = /etc/pacman.d/mirrorlist - -[community] -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs |