[arch-commits] CVS update of core/base/pacman (PKGBUILD pacman.install)
Dan McGee
dan at archlinux.org
Thu Jan 10 02:34:48 UTC 2008
Date: Wednesday, January 9, 2008 @ 21:34:48
Author: dan
Path: /home/cvs-core/core/base/pacman
Modified: PKGBUILD (1.151 -> 1.152) pacman.install (1.13 -> 1.14)
upgpkg: pacman 3.1.0-1
-m
----------------+
PKGBUILD | 40 ++++++---------
pacman.install | 146 ++++++++++++++++++++++++++++++-------------------------
2 files changed, 96 insertions(+), 90 deletions(-)
Index: core/base/pacman/PKGBUILD
diff -u core/base/pacman/PKGBUILD:1.151 core/base/pacman/PKGBUILD:1.152
--- core/base/pacman/PKGBUILD:1.151 Thu Nov 15 19:02:36 2007
+++ core/base/pacman/PKGBUILD Wed Jan 9 21:34:47 2008
@@ -1,43 +1,35 @@
-# $Id: PKGBUILD,v 1.151 2007/11/16 00:02:36 daniel Exp $
+# $Id: PKGBUILD,v 1.152 2008/01/10 02:34:47 dan Exp $
# Maintainer: Aaron Griffin <aaron at archlinux.org>
# Maintainer: Dan McGee <dan at archlinux.org>
pkgname=pacman
-pkgver=3.0.6
-pkgrel=2
+pkgver=3.1.0
+pkgrel=1
pkgdesc="A library-based package manager with dependency support"
arch=('i686' 'x86_64')
url="http://www.archlinux.org/pacman/"
license=('GPL')
groups=('base')
-#makedepends=(doxygen)
-depends=('bash' 'libarchive>=2.2.3' 'libdownload')
-#makepkg depends=('fakeroot')
-#abs depends=('csup')
-replaces=(pacman-rc)
-conflicts=(pacman-rc)
-backup=(etc/pacman.conf etc/makepkg.conf etc/abs/abs.conf
- etc/pacman.d/{core,release,extra,unstable,community,testing}
- etc/abs/supfile.{core,extra,community,testing,unstable})
+depends=('gcc-libs' 'bash' 'libarchive>=2.4.11' 'libdownload>=1.3')
+backup=(etc/pacman.conf etc/makepkg.conf
+ etc/pacman.d/{mirrorlist,core,release,extra,unstable,community,testing})
install=pacman.install
-source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz)
options=(!libtool)
-md5sums=('40c5bfdc5eb3377e3fc85a3a61001aac')
+source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz)
+md5sums=('6c60c72c276c575775c9d6cafa22b1b1')
build() {
cd $startdir/src/$pkgname-$pkgver
- # nothing fancy here
- ./configure --prefix=/usr --sysconfdir=/etc --disable-doxygen
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make || return 1
make DESTDIR=$startdir/pkg install || return 1
- # change ABS tags for x86_64 to correct values
- if [ "$CARCH" = "x86_64" ]; then
- sed -i "s|CURRENT|CURRENT-64|g" \
- $startdir/pkg/etc/abs/supfile.{core,extra,community,unstable}
- sed -i "s|TESTING|TESTING-64|g" $startdir/pkg/etc/abs/supfile.testing
- sed -i "s|\[community\]|\#\[community\]|" $startdir/pkg/etc/pacman.conf
- sed -i "s|Include\ =\ \/etc\/pacman.d\/community|\#Include\ =\ \/etc\/pacman.d\/community|" $startdir/pkg/etc/pacman.conf
- fi
+ # install completion files
+ mkdir -p $startdir/pkg/etc/bash_completion.d/
+ install -m644 contrib/bash_completion $startdir/pkg/etc/bash_completion.d/pacman
+ mkdir -p $startdir/pkg/usr/share/zsh/site-functions/
+ install -m644 contrib/zsh_completion $startdir/pkg/usr/share/zsh/site-functions/pacman
}
+
+# vim: set ts=2 sw=2 noet:
Index: core/base/pacman/pacman.install
diff -u core/base/pacman/pacman.install:1.13 core/base/pacman/pacman.install:1.14
--- core/base/pacman/pacman.install:1.13 Sun Sep 16 22:56:35 2007
+++ core/base/pacman/pacman.install Wed Jan 9 21:34:48 2008
@@ -6,41 +6,17 @@
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
- if [ "$(vercmp $2 3.0.2)" -lt 0 ]; then
- 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."
- _resetbackups
- fi
- if [ "$(vercmp $2 3.0.0)" -lt 0 ]; then
- echo ">>> The makepkg.conf syntax has changed, please note the new format"
- echo ">>> when merging the pacnew file with your old configuration."
- echo ">>>"
- fi
- if [ "$(vercmp $2 3.0.4-4)" -lt 0 ]; then
- echo ">>> Please add \"-mtune=generic\" to CFLAGS/CXXFLAGS in makepkg.conf if you"
- echo ">>> build packages for others with gcc4.2. Use \"-mtune=native\" for local"
- echo ">>> optimised builds. Check the /etc/makepkg.conf.pacnew file."
- fi
- if [ "$(vercmp $2 3.0.5-1)" -eq 0 ]; then
- echo ">>> VERY IMPORTANT <<<"
- echo ">>> pacman 3.0.5-1 had a bad bug when dealing with symlinks in packages,"
- echo ">>> causing possible dangerous file permissions. It is recommended you"
- echo ">>> reinstall any packages you have installed since upgrading to version"
- echo ">>> 3.0.5-1. Use /var/log/pacman.log for this information."
- fi
- if [ "$(vercmp $2 3.0.5-4)" -lt 0 ]; then
- echo ">>> VERY IMPORTANT <<<"
- echo ">>> We have changed our repo layout:"
- echo ">>> The current repo is gone and has been replaced by the new core repo."
- echo ">>> IT IS IMPORTANT TO CHANGE THE ENTRIES FOR THE CURRENT REPO TO CORE REPO"
- echo ">>> IN YOUR /etc/pacman.conf to keep on getting updates. This is also"
- echo ">>> important to satisfy dependencies of new packages in the extra repo."
- fi
+ # 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.1.0)" -lt 0 ]; then
+ _upgrade310
+ fi
}
_rankmirrors() {
- echo ">>> Use of the new rankmirrors script on your /etc/pacman.d/ files is"
+ echo ">>> Use of the rankmirrors script on /etc/pacman.d/mirrorfile file is"
echo ">>> highly recommended. Python is required, and read rankmirrors --help"
echo ">>> for details. In addition, mirrors are now listed by country, so"
echo ">>> move those that are geographically close to you to the top and"
@@ -48,42 +24,80 @@
}
_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
+ 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
+}
+
+# TODO not used yet, we'll use it in later pacman upgrades
+_cleanrequiredby() {
+ dbpath="/var/lib/pacman/local"
+ echo ">>> Cleaning out unnecessary requiredby entries from DB."
+ echo ">>> -> making local DB backup at /tmp/pacmanDB.tgz..."
+ bsdtar -czf /tmp/pacmanDB.tgz "$dbpath"
+ echo ">>> -> removing entries..."
+ grep -Rl REQUIREDBY /var/lib/pacman/local | xargs sed -i '/^%REQUIREDBY%/,/^$/ d'
+ echo ">>> -> done."
+}
+
+_upgrade310() {
+ # makepkg.conf syntax changed in 3.1
+ echo ">>> The makepkg.conf syntax has changed, please note the new format"
+ echo ">>> when merging the pacnew file with your old configuration."
+ echo ">>>"
+ # pacman.conf syntax changed in 3.1
+ echo ">>> The pacman.conf default file has changed. Please update your"
+ echo ">>> config to use the single mirrorlist, and any additional files"
+ echo ">>> in /etc/pacman.d/ (core, extra, etc.) can be deleted."
+ echo ">>>"
+ # sync DB location changed in 3.1
+ echo ">>> The location of sync DBs has moved from /var/lib/pacman/ to"
+ echo ">>> /var/lib/pacman/sync/ for several reasons. To delete older"
+ echo ">>> DBs, please run pacman -Sc and follow the instructions."
+ echo ">>> You will also have to run pacman -Sy to refresh the sync DBs."
+ echo ">>>"
+ # abs is no longer included
+ echo ">>> abs is no longer included; please install the 'abs' package"
+ echo ">>> to use abs. You may need to edit abs.conf to re-enable repos."
- # 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
}
op=$1
More information about the arch-commits
mailing list