diff options
Diffstat (limited to 'abs/core/pacman')
-rw-r--r-- | abs/core/pacman/0001-libmakepkg-fix-is_array-function.patch | 32 | ||||
-rw-r--r-- | abs/core/pacman/0001-pacman-key-compatibility-with-gnupg-2.1.patch | 27 | ||||
-rw-r--r-- | abs/core/pacman/PKGBUILD | 45 | ||||
-rw-r--r-- | abs/core/pacman/__changelog | 4 | ||||
-rw-r--r-- | abs/core/pacman/makepkg-asroot.patch | 22 | ||||
-rw-r--r-- | abs/core/pacman/makepkg.conf | 21 | ||||
-rw-r--r-- | abs/core/pacman/pacman.conf | 95 | ||||
-rw-r--r-- | abs/core/pacman/pacman.conf.i686 | 1 | ||||
-rw-r--r-- | abs/core/pacman/pacman.conf.x86_64 | 1 | ||||
-rw-r--r-- | abs/core/pacman/pacman.cron | 20 | ||||
-rw-r--r-- | abs/core/pacman/pacman.install | 67 |
11 files changed, 128 insertions, 207 deletions
diff --git a/abs/core/pacman/0001-libmakepkg-fix-is_array-function.patch b/abs/core/pacman/0001-libmakepkg-fix-is_array-function.patch new file mode 100644 index 0000000..b8ada06 --- /dev/null +++ b/abs/core/pacman/0001-libmakepkg-fix-is_array-function.patch @@ -0,0 +1,32 @@ +From 2822a45fa91b430c99b4b8bd3531ee745ada1ab7 Mon Sep 17 00:00:00 2001 +From: Allan McRae <allan@archlinux.org> +Date: Fri, 26 Feb 2016 15:01:11 +1000 +Subject: [PATCH] libmakepkg: fix is_array function + +This happened to work for the majority of cases because the only calling +function used a variable named "i" that was related to the variable being +passed to the function. + +Fixes FS#48340. + +Signed-off-by: Allan McRae <allan@archlinux.org> +--- + scripts/libmakepkg/util/util.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/libmakepkg/util/util.sh b/scripts/libmakepkg/util/util.sh +index 675e75d..f9f1c20 100644 +--- a/scripts/libmakepkg/util/util.sh ++++ b/scripts/libmakepkg/util/util.sh +@@ -46,7 +46,7 @@ is_array() { + local shellopts=$(shopt -p) + shopt -s extglob + +- if [[ $(declare -p "$i") == declare\ -*([[:alnum:]])a*([[:alnum:]])\ * ]]; then ++ if [[ $(declare -p "$v") == declare\ -*([[:alnum:]])a*([[:alnum:]])\ * ]]; then + ret=0 + fi + +-- +2.7.1 + diff --git a/abs/core/pacman/0001-pacman-key-compatibility-with-gnupg-2.1.patch b/abs/core/pacman/0001-pacman-key-compatibility-with-gnupg-2.1.patch deleted file mode 100644 index 65b72ef..0000000 --- a/abs/core/pacman/0001-pacman-key-compatibility-with-gnupg-2.1.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 41c8263ba289dac191d7f74faaa62476baf41c28 Mon Sep 17 00:00:00 2001 -From: Tobias Powalowski <tpowa@archlinux.org> -Date: Fri, 21 Nov 2014 20:54:58 +1000 -Subject: [PATCH] pacman-key: compatibility with gnupg-2.1 - -GnuPG 2.1 no longer allow empty passphrases by default. - -Signed-off-by: Allan McRae <allan@archlinux.org> ---- - scripts/pacman-key.sh.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in -index ba8d02e..5ba0ad8 100644 ---- a/scripts/pacman-key.sh.in -+++ b/scripts/pacman-key.sh.in -@@ -151,6 +151,7 @@ Key-Usage: sign - Name-Real: Pacman Keyring Master Key - Name-Email: pacman@localhost - Expire-Date: 0 -+%no-protection - %commit - %echo Done - EOF --- -2.1.3 - diff --git a/abs/core/pacman/PKGBUILD b/abs/core/pacman/PKGBUILD index 4e0fbf9..877dc11 100644 --- a/abs/core/pacman/PKGBUILD +++ b/abs/core/pacman/PKGBUILD @@ -4,38 +4,37 @@ # Maintainer: Dave Reisner <dreisner@archlinux.org> pkgname=pacman -pkgver=4.1.2 -pkgrel=7 +pkgver=5.0.1 +pkgrel=2 pkgdesc="A library-based package manager with dependency support" arch=('i686' 'x86_64') url="http://www.archlinux.org/pacman/" license=('GPL') groups=('base' 'base-devel') -depends=('bash>=4.2.042-2' 'glibc>=2.17-2' 'libarchive>=3.1.2' 'curl>=7.19.4' +depends=('bash' 'glibc' 'libarchive' 'curl' 'gpgme' 'pacman-mirrorlist' 'archlinux-keyring') +makedepends=('asciidoc') # roundup patch alters docs 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) +install=pacman.install options=('strip' 'debug') -source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig} - 0001-pacman-key-compatibility-with-gnupg-2.1.patch +source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig} + 0001-libmakepkg-fix-is_array-function.patch pacman.conf.i686 pacman.conf.x86_64 + makepkg-asroot.patch + pacman.cron makepkg.conf) -md5sums=('063c8b0ff6bdf903dc235445525627cd' - 'SKIP' - 'd0e015b1bf78cbf9762d9c44ea5f77a9' - '2db6c94709bb30cc614a176ecf8badb1' - 'de74a13618347f08ae4a9637f74471c4' - '2da6544e387f940588a90cb4b9b914e2') validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD') # Allan McRae <allan@archlinux.org> + prepare() { cd "$pkgname-$pkgver" - patch -p1 -i $srcdir/0001-pacman-key-compatibility-with-gnupg-2.1.patch + + patch -p1 -i $srcdir/0001-libmakepkg-fix-is_array-function.patch } build() { @@ -45,8 +44,8 @@ build() { --localstatedir=/var --enable-doc \ --with-scriptlet-shell=/usr/bin/bash \ --with-ldconfig=/usr/bin/ldconfig - make - make -C contrib + make V=1 + make -C contrib } check() { @@ -93,4 +92,20 @@ package() { 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" + + #run pacman-db-upgrade from cron + mkdir -p "$pkgdir/usr/MythVantage/bin" + install -m 0644 "$srcdir/pacman.cron" "$pkgdir/usr/MythVantage/bin/pacman.cron" } +md5sums=('377a2664d6007d72d6d8a126add83bcf' + 'SKIP' + '55732144f1048f714f1f93203e9b7728' + 'bdb40c76225c2fd8874bd34b6a3f6ad7' + 'c511ee4c7a86a37e8841440ede89300d' + '4950b7c5adf80e082a726dd11b9cb12f' + 'd62e10ea6cc7ae617ba1a99d8f11eaf5' + 'f5b59fe5f016eebd9590318530bbd996') diff --git a/abs/core/pacman/__changelog b/abs/core/pacman/__changelog index e69de29..59c5ecc 100644 --- a/abs/core/pacman/__changelog +++ b/abs/core/pacman/__changelog @@ -0,0 +1,4 @@ +PKGBUILD: add pacman.install +PKGBUILD: add makepkg-asroot.patch +PKGBUILD: remove source sig +PKGBUILD & .install: add pacman.cron to run pacman-db-upgrade after update diff --git a/abs/core/pacman/makepkg-asroot.patch b/abs/core/pacman/makepkg-asroot.patch new file mode 100644 index 0000000..8da3fb0 --- /dev/null +++ b/abs/core/pacman/makepkg-asroot.patch @@ -0,0 +1,22 @@ +--- makepkg.orig 2016-04-22 15:35:51.860386914 +0000 ++++ makepkg 2016-04-22 15:39:19.543784899 +0000 +@@ -1917,7 +1917,7 @@ + 'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'noarchive' 'nobuild' + 'nocolor' 'nocheck' 'nodeps' 'noextract' 'noprepare' 'nosign' 'packagelist' + 'printsrcinfo' 'repackage' 'rmdeps' 'sign' 'skipchecksums' 'skipinteg' +- 'skippgpcheck' 'source' 'syncdeps' 'verifysource' 'version') ++ 'skippgpcheck' 'source' 'syncdeps' 'verifysource' 'version' 'asroot') + + # Pacman Options + OPT_LONG+=('asdeps' 'noconfirm' 'needed' 'noprogressbar') +@@ -2114,9 +2114,7 @@ + + 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 ++ : + fi + else + if [[ -z $FAKEROOTKEY ]]; then diff --git a/abs/core/pacman/makepkg.conf b/abs/core/pacman/makepkg.conf index 8cf5faa..bd0e0cf 100644 --- a/abs/core/pacman/makepkg.conf +++ b/abs/core/pacman/makepkg.conf @@ -19,6 +19,13 @@ DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o % # /usr/bin/lftpget -c # /usr/bin/wget +#-- The package required by makepkg to download VCS sources +# Format: 'protocol::package' +VCSCLIENTS=('bzr::bzr' + 'git::git' + 'hg::mercurial' + 'svn::subversion') + ######################################################################### # ARCHITECTURE, COMPILE FLAGS ######################################################################### @@ -30,8 +37,8 @@ CHOST="@CHOST@" # -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 --param=ssp-buffer-size=4" -CXXFLAGS="@CARCHFLAGS@ -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4" +CFLAGS="@CARCHFLAGS@ -mtune=generic -O2 -pipe -fstack-protector-strong" +CXXFLAGS="@CARCHFLAGS@ -mtune=generic -O2 -pipe -fstack-protector-strong" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro" #-- Make Flags: change this for DistCC/SMP systems #MAKEFLAGS="-j2" @@ -43,17 +50,16 @@ DEBUG_CXXFLAGS="-g -fvar-tracking-assignments" # BUILD ENVIRONMENT ######################################################################### # -# Defaults: BUILDENV=(fakeroot !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 #-- check: Run the check() function if present in the PKGBUILD #-- sign: Generate PGP signature file # -BUILDENV=(fakeroot !distcc color !ccache check !sign) +BUILDENV=(!distcc color !ccache check !sign) # #-- If using DistCC, your MAKEFLAGS will also need modification. In addition, #-- specify a space-delimited list of hosts running in the DistCC cluster. @@ -67,7 +73,7 @@ BUILDENV=(fakeroot !distcc color !ccache check !sign) # These are default values for the options=() settings ######################################################################### # -# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !upx !debug) +# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug) # A negated option will do the opposite of the comments below. # #-- strip: Strip symbols from binaries/libraries @@ -78,9 +84,10 @@ BUILDENV=(fakeroot !distcc color !ccache check !sign) #-- 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 !upx !debug) +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug) #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 INTEGRITY_CHECK=(md5) diff --git a/abs/core/pacman/pacman.conf b/abs/core/pacman/pacman.conf deleted file mode 100644 index 0596b7a..0000000 --- a/abs/core/pacman/pacman.conf +++ /dev/null @@ -1,95 +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/ -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#UseDelta -#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 = Optional TrustedOnly - -# 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] -#SigLevel = PackageRequired -#Include = /etc/pacman.d/mirrorlist - -[core] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[extra] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -#[community-testing] -#SigLevel = PackageRequired -#Include = /etc/pacman.d/mirrorlist - -[community] -SigLevel = PackageRequired -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 - diff --git a/abs/core/pacman/pacman.conf.i686 b/abs/core/pacman/pacman.conf.i686 index 92e76b4..0ea1570 100644 --- a/abs/core/pacman/pacman.conf.i686 +++ b/abs/core/pacman/pacman.conf.i686 @@ -14,6 +14,7 @@ #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 diff --git a/abs/core/pacman/pacman.conf.x86_64 b/abs/core/pacman/pacman.conf.x86_64 index f43fe39..8ce6919 100644 --- a/abs/core/pacman/pacman.conf.x86_64 +++ b/abs/core/pacman/pacman.conf.x86_64 @@ -14,6 +14,7 @@ #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 diff --git a/abs/core/pacman/pacman.cron b/abs/core/pacman/pacman.cron new file mode 100644 index 0000000..9155aed --- /dev/null +++ b/abs/core/pacman/pacman.cron @@ -0,0 +1,20 @@ +#!/bin/bash + +function pacman_wait { + if [ -f /var/lib/pacman/db.lck ] + then + echo "Pacman is running and must quit before continuing." + echo " Waiting for pacman to quit..." + while [ -f /var/lib/pacman/db.lck ] + do + sleep 5 + done + fi +} + +pacman_wait +pacman-db-upgrade & +#remove pacman.cron from root crontab +grep -v "* * * * * /usr/bin/bash /usr/MythVantage/bin/pacman.cron" /var/spool/cron/root > /var/spool/cron/root2 +mv /var/spool/cron/root2 /var/spool/cron/root +echo "root" >> /var/spool/cron/cron.update diff --git a/abs/core/pacman/pacman.install b/abs/core/pacman/pacman.install index 42b2808..637a741 100644 --- a/abs/core/pacman/pacman.install +++ b/abs/core/pacman/pacman.install @@ -2,76 +2,17 @@ # arg 1: the new package version # arg 2: the old package version post_upgrade() { - # one time stuff for md5sum issue with older pacman versions - if [ "$(vercmp $2 3.0.2)" -lt 0 ]; then - _resetbackups - fi - if [ "$(vercmp $2 3.5.0)" -lt 0 ]; then + if [ "$(vercmp $2 4.2.0)" -lt 0 ]; then _warnupgrade fi - if [ ! -f "etc/pacman.d/gnupg/pubring.gpg" ] || [ "$(vercmp $2 4.0.3-2)" -lt 0 ]; then - _check_pubring - fi sed -i '/^# If upgrades are available/d' /etc/pacman.conf sed -i '/^SyncFirst/d' /etc/pacman.conf } -post_install() { - _check_pubring -} - -_check_pubring() { - echo " >>> Run \`pacman-key --init; pacman-key --populate archlinux\`" - echo " >>> to import the data required by pacman for package verification." - echo " >>> See: https://www.archlinux.org/news/having-pacman-verify-packages" -} - _warnupgrade() { - echo ">>> The pacman database format has changed as of pacman 3.5.0." + echo ">>> The pacman database format has changed as of pacman 4.2.0." echo ">>> You will need to run \`pacman-db-upgrade\` as root." echo ">>>" -} - -_resetbackups() { - echo ">>> Performing one-time reset of NoUpgrade md5sums. After this reset" - echo ">>> you are able to remove all NoUpgrade lines of already protected" - echo ">>> files from pacman.conf." - echo ">>>" - - # path variables - pacconf="/etc/pacman.conf" - dbpath="/var/lib/pacman/local" - - # get a list of NoUpgrade files from the user's pacman.conf - echo ">>> Retrieving pacman.conf NoUpgrade list..." - config=$(grep "^NoUpgrade" $pacconf | cut -d'=' -f2) - # add the standard list of files, even if they are already above - config="$config \ - etc/passwd etc/group etc/shadow etc/sudoers \ - etc/fstab etc/raidtab etc/ld.so.conf \ - etc/rc.conf etc/rc.local \ - etc/modprobe.conf etc/modules.conf \ - etc/lilo.conf boot/grub/menu.lst" - - # blank md5sum for use in sed expression - zeroes='00000000000000000000000000000000' - - for file in $config; do - echo ">>> -> finding owner of /$file..." - line=$(LC_ALL=C LANG=C pacman -Qo /$file 2>/dev/null) - # if file is owned by a package, go find its incorrectly stored sum - if [ ! -z "$line" ]; then - # get the name and version of the package owning file - name=$(echo $line | awk '{print $5}') - version=$(echo $line | awk '{print $6}') - # set the path to the backup array holding the md5sum - path="$dbpath/$name-$version/files" - # run a sed on the path to reset the line containing $file - # NOTE: literal tab characters in sed expression after $file - echo ">>> -> resetting sum of /$file..." - sed -i "s#$file [0-9a-fA-F]*#$file $zeroes#" $path - else - echo ">>> -> $file is unowned." - fi - done + echo "* * * * * /usr/bin/bash /usr/MythVantage/bin/pacman.cron" >> /var/spool/cron/root + echo "root" >> /var/spool/cron/cron.update } |