diff options
-rw-r--r-- | libre/pacman/0001-pacman-key-compatibility-with-gnupg-2.1.patch | 27 | ||||
-rw-r--r-- | libre/pacman/PKGBUILD | 35 | ||||
-rw-r--r-- | libre/pacman/makepkg-pkgrel-4.patch | 56 | ||||
-rw-r--r-- | libre/pacman/makepkg.conf | 12 | ||||
-rw-r--r-- | libre/pacman/pacman-4.2.0-roundup.patch | 243 |
5 files changed, 297 insertions, 76 deletions
diff --git a/libre/pacman/0001-pacman-key-compatibility-with-gnupg-2.1.patch b/libre/pacman/0001-pacman-key-compatibility-with-gnupg-2.1.patch deleted file mode 100644 index 65b72efd3..000000000 --- a/libre/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/libre/pacman/PKGBUILD b/libre/pacman/PKGBUILD index 148d6dff7..c6749f5b8 100644 --- a/libre/pacman/PKGBUILD +++ b/libre/pacman/PKGBUILD @@ -1,19 +1,23 @@ +# vim: set ts=2 sw=2 et: +# $Id: PKGBUILD 228108 2014-12-28 09:07:13Z allan $ # Maintainer (Arch): Dan McGee <dan@archlinux.org> # Maintainer (Arch): Dave Reisner <dreisner@archlinux.org> # Maintainer: André Silva <emulatorman@parabola.nu> -# Maintainer: Márcio Silva <coadde@parabola.nu> +# Contributor: Márcio Silva <coadde@parabola.nu> # Contributor: Nicolás Reynolds <fauno@kiwwwi.com.ar> +# Contributor: Luke Shumaker <lukeshu@sbcglobal.net> pkgname=pacman -pkgver=4.1.2 -pkgrel=7.parabola2 +pkgver=4.2.0 +pkgrel=5.parabola1 pkgdesc="A library-based package manager with dependency support" arch=('i686' 'x86_64' 'mips64el') 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' - 'gpgme' 'pacman-mirrorlist' 'archlinux-keyring' 'parabola-keyring' 'ca-certificates-cacert') +depends=('bash' 'glibc' 'libarchive>=3.1.2' 'curl>=7.39.0' + 'gpgme' 'pacman-mirrorlist' 'archlinux-keyring' + 'parabola-keyring' 'ca-certificates-cacert') makedepends=('asciidoc') # build man pages checkdepends=('python2' 'fakechroot') optdepends=('fakeroot: for makepkg usage as normal user') @@ -23,30 +27,33 @@ replaces=("$pkgname-contrib" "$pkgname-parabola" 'cacert-dot-org') backup=('etc/pacman.conf' 'etc/makepkg.conf') options=('strip' 'debug') source=("ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig} - "0001-pacman-key-compatibility-with-gnupg-2.1.patch" "$pkgname.conf."{i686,x86_64,mips64el} "makepkg.conf" + "pacman-4.2.0-roundup.patch" "gpg.conf" "sks-keyservers.netCA.pem" "makepkg-pkgrel-4.patch" "refresh-$pkgname-keys") -md5sums=('063c8b0ff6bdf903dc235445525627cd' +md5sums=('184ce14f1f326fede72012cca51bba51' 'SKIP' - 'd0e015b1bf78cbf9762d9c44ea5f77a9' '9c1454e48b2216b23f931e04d6dab1ee' '7279d086428df483fd60c33f7c88cf3e' 'a12b1a4533c170aecc8b9b8561048248' - 'f0f310df411f943dbc4e2dd376c88662' + 'ce525a9af50f1d9b824806d2e5a4f0c8' + '8b8e478e3b6f785f6fb0029f792cea38' '8c339b2bf027979d1edcfc6ac0e7e81d' '3cfc5d2867a6672f4f629220632948f4' - '5873359871833b40c2a8e08863d0613c' + '0ee98dc38ff80ba127772f5104e18e46' '093f0779ac55ae781ba028ad74b95f84') validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD') # Allan McRae <allan@archlinux.org> -prepare(){ +prepare() { cd "$pkgname-$pkgver" - patch -p1 -i $srcdir/0001-pacman-key-compatibility-with-gnupg-2.1.patch - patch -Np1 -i "$srcdir/makepkg-pkgrel-4.patch" + + # v4.2.0-13-gacc639a + patch -p1 -i "$srcdir/pacman-4.2.0-roundup.patch" + + patch -p1 -i "$srcdir/makepkg-pkgrel-4.patch" } build() { @@ -121,5 +128,3 @@ package() { install -Dm644 "${srcdir}/gpg.conf" \ "${pkgdir}/etc/pacman.d/gpg.conf" } - -# vim: set ts=2 sw=2 et: diff --git a/libre/pacman/makepkg-pkgrel-4.patch b/libre/pacman/makepkg-pkgrel-4.patch index 4024b0ad6..aeeb17859 100644 --- a/libre/pacman/makepkg-pkgrel-4.patch +++ b/libre/pacman/makepkg-pkgrel-4.patch @@ -16,20 +16,19 @@ enforcing /[0-9]+(\.([0-9]+)?/ on a version spec seems silly. test/util/vercmptest.sh | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) -diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt -index e78a8e5..986a4f6 100644 ---- a/doc/PKGBUILD.5.txt -+++ b/doc/PKGBUILD.5.txt -@@ -46,7 +46,7 @@ similar to `$_basekernver`. +diff -Nur pacman-4.2.0.orig/doc/PKGBUILD.5.txt pacman-4.2.0/doc/PKGBUILD.5.txt +--- pacman-4.2.0.orig/doc/PKGBUILD.5.txt 2014-10-13 22:44:20.000000000 -0200 ++++ pacman-4.2.0/doc/PKGBUILD.5.txt 2014-12-29 21:54:08.717826697 -0200 +@@ -48,7 +48,7 @@ *pkgver*:: The version of the software as released from the author (e.g., '2.7.1'). - The variable is not allowed to contain colons or hyphens. + The variable is not allowed to contain colons, hyphens or whitespace. + - The `pkgver` variable can be automatically updated by providing a `pkgver()` function - in the PKGBUILD that outputs the new package version. This is run after downloading -@@ -58,7 +58,7 @@ This is most useful when used with sources from version control systems (see bel + The `pkgver` variable can be automatically updated by providing a `pkgver()` + function in the PKGBUILD that outputs the new package version. +@@ -62,7 +62,7 @@ allows package maintainers to make updates to the package's configure flags, for example. This is typically set to '1' for each new upstream software release and incremented for intermediate PKGBUILD updates. The @@ -38,26 +37,24 @@ index e78a8e5..986a4f6 100644 *pkgdesc*:: This should be a brief description of the package and its functionality. -diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in -index 940e947..88b654d 100644 ---- a/scripts/makepkg.sh.in -+++ b/scripts/makepkg.sh.in -@@ -2134,8 +2134,8 @@ check_sanity() { - awk -F'=' '$1 ~ /^[[:space:]]*pkgrel$/' "$BUILDFILE" | sed "s/[[:space:]]*#.*//" | - while IFS='=' read -r _ i; do - eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "${i%%+([[:space:]])}")\" -- if [[ $i != +([0-9])?(.+([0-9])) ]]; then -- error "$(gettext "%s must be a decimal.")" "pkgrel" -+ if [[ $i = *[[:space:]:-]* ]]; then -+ error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgrel" - return 1 - fi - done || ret=1 -diff --git a/test/util/vercmptest.sh b/test/util/vercmptest.sh -index 04b841f..7985ddc 100755 ---- a/test/util/vercmptest.sh -+++ b/test/util/vercmptest.sh -@@ -144,6 +144,24 @@ runtest 1:1.0 1.0 1 +diff -Nur pacman-4.2.0.orig/scripts/makepkg.sh.in pacman-4.2.0/scripts/makepkg.sh.in +--- pacman-4.2.0.orig/scripts/makepkg.sh.in 2014-12-29 21:53:44.674296011 -0200 ++++ pacman-4.2.0/scripts/makepkg.sh.in 2014-12-29 22:00:21.607534761 -0200 +@@ -2576,8 +2576,8 @@ + return 1 + fi + +- if [[ $pkgrel != +([0-9])?(.+([0-9])) ]]; then +- error "$(gettext "%s must be a decimal, not %s.")" "pkgrel" "$pkgrel" ++ if [[ $pkgrel = *[[:space:]:-]* ]]; then ++ error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgrel" "$pkgrel" + return 1 + fi + } +diff -Nur pacman-4.2.0.orig/test/util/vercmptest.sh pacman-4.2.0/test/util/vercmptest.sh +--- pacman-4.2.0.orig/test/util/vercmptest.sh 2014-01-06 02:40:08.000000000 -0200 ++++ pacman-4.2.0/test/util/vercmptest.sh 2014-12-29 21:54:08.717826697 -0200 +@@ -142,6 +142,24 @@ runtest 1:1.0 1.1 1 runtest 1:1.1 1.1 1 @@ -82,6 +79,3 @@ index 04b841f..7985ddc 100755 #END TESTS if [[ $failure -eq 0 ]]; then --- -2.1.0 - diff --git a/libre/pacman/makepkg.conf b/libre/pacman/makepkg.conf index 758d7d029..f997615e6 100644 --- a/libre/pacman/makepkg.conf +++ b/libre/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 ######################################################################### @@ -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. diff --git a/libre/pacman/pacman-4.2.0-roundup.patch b/libre/pacman/pacman-4.2.0-roundup.patch new file mode 100644 index 000000000..db18e1800 --- /dev/null +++ b/libre/pacman/pacman-4.2.0-roundup.patch @@ -0,0 +1,243 @@ +diff --git a/contrib/paclist.sh.in b/contrib/paclist.sh.in +index 1c10b32..f4fd540 100644 +--- a/contrib/paclist.sh.in ++++ b/contrib/paclist.sh.in +@@ -31,7 +31,7 @@ if ! type gettext &>/dev/null; then + fi + + usage() { +- printf "%s (pacman) v%s\n" "${myname}" "myver" ++ printf "%s (pacman) v%s\n" "${myname}" "${myver}" + echo + printf "List all packages installed from a given repository\n" "${myname}" + echo +diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in +index 712ca60..9ed7ef9 100644 +--- a/etc/makepkg.conf.in ++++ b/etc/makepkg.conf.in +@@ -19,6 +19,13 @@ DLAGENTS=('ftp::/usr/bin/curl -qfC - --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 ++# Format: 'protocol::package' ++VCSCLIENTS=('bzr::bzr' ++ 'git::git' ++ 'hg::mercurial' ++ 'svn::subversion') ++ + ######################################################################### + # ARCHITECTURE, COMPILE FLAGS + ######################################################################### +diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c +index d232bcc..9af5e84 100644 +--- a/lib/libalpm/log.c ++++ b/lib/libalpm/log.c +@@ -52,7 +52,7 @@ int SYMEXPORT alpm_logaction(alpm_handle_t *handle, const char *prefix, + int fd; + do { + fd = open(handle->logfile, O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC, +- 0000); ++ 0644); + } while(fd == -1 && errno == EINTR); + if(fd >= 0) { + handle->logstream = fdopen(fd, "a"); +diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c +index e2997f6..d9ed3d3 100644 +--- a/lib/libalpm/package.c ++++ b/lib/libalpm/package.c +@@ -574,7 +574,7 @@ int _alpm_pkg_dup(alpm_pkg_t *pkg, alpm_pkg_t **new_ptr) + newpkg->installdate = pkg->installdate; + STRDUP(newpkg->packager, pkg->packager, goto cleanup); + STRDUP(newpkg->md5sum, pkg->md5sum, goto cleanup); +- STRDUP(newpkg->sha256sum, pkg->md5sum, goto cleanup); ++ STRDUP(newpkg->sha256sum, pkg->sha256sum, goto cleanup); + STRDUP(newpkg->arch, pkg->arch, goto cleanup); + newpkg->size = pkg->size; + newpkg->isize = pkg->isize; +diff --git a/scripts/makepkg-template.pl.in b/scripts/makepkg-template.pl.in +index 6e6d944..d9da167 100755 +--- a/scripts/makepkg-template.pl.in ++++ b/scripts/makepkg-template.pl.in +@@ -70,7 +70,7 @@ sub parse_template_line { + foreach my $element (@elements) { + my ($key, $val) = ($element =~ /^([a-z0-9]+)=(.*)$/); + unless ($key and $val) { +- die gettext("invalid key/value pair\n%s:%s: %s"), ++ die gettext("invalid key/value pair\n"), + "$filename:$linenumber: $line"; + } + $values{$key} = $val; +diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in +index 33dff24..18b2822 100644 +--- a/scripts/makepkg.sh.in ++++ b/scripts/makepkg.sh.in +@@ -1317,47 +1317,41 @@ verify_integrity_sums() { + fi + } + +-have_sources() { +- local a +- +- (( ${#source[*]} )) && return 0 ++check_checksums() { ++ local integ a ++ declare -A correlation ++ (( SKIPCHECKSUMS )) && return 0 + ++ # Initialize a map which we'll use to verify that every source array has at ++ # least some kind of checksum array associated with it. ++ (( ${#source[*]} )) && correlation['source']=1 + case $1 in + all) + for a in "${arch[@]}"; do +- array_build _ source_"$a" && return 0 ++ array_build _ source_"$a" && correlation["source_$a"]=1 + done + ;; + *) +- array_build _ source_"$CARCH" && return 0 ++ array_build _ source_"$CARCH" && correlation["source_$CARCH"]=1 + ;; + esac + +- return 1 +-} +- +-check_checksums() { +- (( SKIPCHECKSUMS )) && return 0 +- have_sources "$1" || return 0 +- +- local correlation=0 +- local integ a + for integ in "${known_hash_algos[@]}"; do +- verify_integrity_sums "$integ" && correlation=1 ++ verify_integrity_sums "$integ" && unset "correlation[source]" + + case $1 in + all) + for a in "${arch[@]}"; do +- verify_integrity_sums "$integ" "$a" && correlation=1 ++ verify_integrity_sums "$integ" "$a" && unset "correlation[source_$a]" + done + ;; + *) +- verify_integrity_sums "$integ" "$CARCH" && correlation=1 ++ verify_integrity_sums "$integ" "$CARCH" && unset "correlation[source_$CARCH]" + ;; + esac + done + +- if (( ! correlation )); then ++ if (( ${#correlation[*]} )); then + error "$(gettext "Integrity checks are missing.")" + exit 1 # TODO: error code + fi +@@ -1627,7 +1621,10 @@ merge_arch_attrs() { + + source_buildfile() { + source_safe "$@" +- merge_arch_attrs ++ ++ if (( !SOURCEONLY )); then ++ merge_arch_attrs ++ fi + } + + run_function_safe() { +@@ -2142,8 +2139,6 @@ write_pkginfo() { + local size="$(@DUPATH@ @DUFLAGS@)" + size="$(( ${size%%[^0-9]*} * 1024 ))" + +- merge_arch_attrs +- + msg2 "$(gettext "Generating %s file...")" ".PKGINFO" + printf "# Generated by makepkg %s\n" "$makepkg_version" + printf "# using %s\n" "$(fakeroot -v)" +@@ -2896,7 +2891,7 @@ get_vcsclient() { + } + + check_vcs_software() { +- local ret=0 ++ local all_sources all_deps deps ret=0 + + if (( SOURCEONLY == 1 )); then + # we will not download VCS sources +@@ -2908,7 +2903,17 @@ check_vcs_software() { + return $ret + fi + +- for netfile in ${source[@]}; do ++ # we currently only use global depends/makedepends arrays for --syncdeps ++ for attr in depends makedepends; do ++ pkgbuild_get_attribute "$pkg" "$attr" 1 'deps' ++ all_deps+=("${deps[@]}") ++ ++ pkgbuild_get_attribute "$pkg" "${attr}_$CARCH" 1 'deps' ++ all_deps+=("${deps[@]}") ++ done ++ ++ get_all_sources_for_arch 'all_sources' ++ for netfile in ${all_sources[@]}; do + local proto=$(get_protocol "$netfile") + + case $proto in +@@ -2921,7 +2926,7 @@ check_vcs_software() { + uninstalled="$(set +E; check_deps $client)" || exit 1 + # if not installed, check presence in depends or makedepends + if [[ -n "$uninstalled" ]] && (( ! NODEPS || ( VERIFYSOURCE && !DEP_BIN ) )); then +- if ! in_array "$client" ${depends[@]} ${makedepends[@]}; then ++ if ! in_array "$client" ${all_deps[@]}; then + error "$(gettext "Cannot find the %s package needed to handle %s sources.")" \ + "$client" "${proto%%+*}" + ret=1 +@@ -3435,7 +3440,7 @@ CARCH=${_CARCH:-$CARCH} + 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.")" ++catastrophic damage to your system.")" "makepkg" + exit 1 # $E_USER_ABORT + fi + else +@@ -3597,7 +3602,7 @@ if (( SOURCEONLY )); then + download_sources allarch + elif ( (( ! SKIPCHECKSUMS )) || \ + ( (( ! SKIPPGPCHECK )) && source_has_signatures ) ); then +- download_sources novcs ++ download_sources allarch novcs + fi + check_source_integrity all + cd_safe "$startdir" +diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in +index 7bb277b..7d01bce 100644 +--- a/scripts/pacman-db-upgrade.sh.in ++++ b/scripts/pacman-db-upgrade.sh.in +@@ -19,6 +19,9 @@ + # along with this program. If not, see <http://www.gnu.org/licenses/>. + # + ++# Avoid creating world-unreadable files ++umask 022 ++ + # gettext initialization + export TEXTDOMAIN='pacman-scripts' + export TEXTDOMAINDIR='@localedir@' +@@ -167,6 +170,8 @@ if [[ -z "$db_version" ]]; then + fi + + # pacman 4.1 to 4.2 upgrade - remove directory symlink support ++ msg "$(gettext "Pre-4.2 database format detected - upgrading...")" ++ + dirlist=() + + unset GREP_OPTIONS +@@ -180,8 +185,6 @@ if [[ -z "$db_version" ]]; then + done) + + if [[ ${#dirlist[@]} != 0 ]]; then +- msg "$(gettext "Pre-4.2 database format detected - upgrading...")" +- + pacroot="$(resolve_dir "$pacroot")" + + for dir in "${dirlist[@]}"; do |