core/pacman to 4.1.2-4

This commit is contained in:
Kevin Mihelich 2013-10-23 13:49:09 +00:00
parent 101d7ab8d4
commit 65a01d9ba8
3 changed files with 4 additions and 69 deletions

View file

@ -10,7 +10,7 @@
pkgname=pacman
pkgver=4.1.2
pkgrel=1
pkgrel=4
pkgdesc="A library-based package manager with dependency support"
arch=('i686' 'x86_64')
url="http://www.archlinux.org/pacman/"
@ -24,15 +24,13 @@ provides=('pacman-contrib')
conflicts=('pacman-contrib')
replaces=('pacman-contrib')
backup=(etc/pacman.conf etc/makepkg.conf)
install=pacman.install
options=(!libtool)
source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
pacman.conf
makepkg.conf)
md5sums=('063c8b0ff6bdf903dc235445525627cd'
'SKIP'
'5c491b27bae54d93d6ba972ce0fccfa7'
'4325d958e5ad4632b6a771e1df6306f9')
'e76e2b0c42b7820331abe524ac706653')
# keep an upgrade path for older installations
PKGEXT='.pkg.tar.gz'

View file

@ -67,7 +67,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 !upx !debug)
# A negated option will do the opposite of the comments below.
#
#-- strip: Strip symbols from binaries/libraries
@ -80,7 +80,7 @@ BUILDENV=(fakeroot !distcc color !ccache check !sign)
#-- upx: Compress binary executable files using UPX
#-- 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 !upx !debug)
#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)

View file

@ -1,63 +0,0 @@
#!/bin/sh
# 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
_warnupgrade
fi
}
_warnupgrade() {
echo ">>> The pacman database format has changed as of pacman 3.5.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
}