Date: Wednesday, May 18, 2016 @ 07:54:54
  Author: allan
Revision: 268273

upgpkg: pacman 5.0.1-4

pull upstream patchset, fixes pacman-key with latest gpg

Added:
  pacman/trunk/pacman-5.0.1-roundup.patch
Modified:
  pacman/trunk/PKGBUILD
Deleted:
  pacman/trunk/0001-libmakepkg-fix-is_array-function.patch

---------------------------------------------+
 0001-libmakepkg-fix-is_array-function.patch |   32 ----
 PKGBUILD                                    |   10 -
 pacman-5.0.1-roundup.patch                  |  174 ++++++++++++++++++++++++++
 3 files changed, 180 insertions(+), 36 deletions(-)

Deleted: 0001-libmakepkg-fix-is_array-function.patch
===================================================================
--- 0001-libmakepkg-fix-is_array-function.patch 2016-05-17 23:40:45 UTC (rev 
268272)
+++ 0001-libmakepkg-fix-is_array-function.patch 2016-05-18 05:54:54 UTC (rev 
268273)
@@ -1,32 +0,0 @@
-From 2822a45fa91b430c99b4b8bd3531ee745ada1ab7 Mon Sep 17 00:00:00 2001
-From: Allan McRae <al...@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 <al...@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
-

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2016-05-17 23:40:45 UTC (rev 268272)
+++ PKGBUILD    2016-05-18 05:54:54 UTC (rev 268273)
@@ -5,7 +5,7 @@
 
 pkgname=pacman
 pkgver=5.0.1
-pkgrel=3
+pkgrel=4
 pkgdesc="A library-based package manager with dependency support"
 arch=('i686' 'x86_64')
 url="http://www.archlinux.org/pacman/";
@@ -13,6 +13,7 @@
 groups=('base' 'base-devel')
 depends=('bash' 'glibc' 'libarchive' 'curl'
          'gpgme' 'pacman-mirrorlist' 'archlinux-keyring')
+makedepends=('asciidoc')
 checkdepends=('python2' 'fakechroot')
 provides=('pacman-contrib')
 conflicts=('pacman-contrib')
@@ -20,13 +21,13 @@
 backup=(etc/pacman.conf etc/makepkg.conf)
 options=('strip' 'debug')
 
source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
-        0001-libmakepkg-fix-is_array-function.patch
+        pacman-5.0.1-roundup.patch
         pacman.conf.i686
         pacman.conf.x86_64
         makepkg.conf)
 md5sums=('377a2664d6007d72d6d8a126add83bcf'
          'SKIP'
-         '55732144f1048f714f1f93203e9b7728'
+         '1a6573187531068d38cb4478cd20368c'
          'bdb40c76225c2fd8874bd34b6a3f6ad7'
          'c511ee4c7a86a37e8841440ede89300d'
          'f5b59fe5f016eebd9590318530bbd996')
@@ -36,7 +37,8 @@
 prepare() {
   cd "$pkgname-$pkgver"
   
-  patch -p1 -i $srcdir/0001-libmakepkg-fix-is_array-function.patch
+  # v5.0.1..pacman-5.0.1..c2f97580
+  patch -p1 -i $srcdir/pacman-5.0.1-roundup.patch
 }
 
 build() {

Added: pacman-5.0.1-roundup.patch
===================================================================
--- pacman-5.0.1-roundup.patch                          (rev 0)
+++ pacman-5.0.1-roundup.patch  2016-05-18 05:54:54 UTC (rev 268273)
@@ -0,0 +1,174 @@
+diff --git a/NEWS b/NEWS
+index 07aa028..b7298bf 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,5 +1,22 @@
+ VERSION         DESCRIPTION
+ -----------------------------------------------------------------------------
++5.0.1         - fix alignment issues with wide character locales (FS#47980)
++              - fix removal of .pacnew files (FS#47993)
++              - fix triggering of Install hooks (FS#47996)
++              - fix handling of stdin scripts called by pacman
++              - hook activity is logged
++              - documentataion updates for alpm-hooks (FS#48080)
++              - makepkg:
++                - increase robustness of variable array checks
++                - makepkg -g does not perform current architecture checks
++                - do not run prepare() with --noextract
++                - all directories in the packaging directory are cleared
++                  before each build
++                - fix translations issues (FS#48057, FS#48298)
++              - repo-add:
++                - fix checking for non-existent database
++              - contrib:
++                - zsh_completion: updated makepkg options
+ 5.0.0         - pacman can run hooks pre- and post-transaction. See the
+                 alpm-hooks(5) man page for details and an example hook 
(FS#2985)
+               - pacman can now sync and read .files databases (-Fy) and do 
basic
+diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
+index e410481..4b4a22c 100644
+--- a/doc/PKGBUILD.5.txt
++++ b/doc/PKGBUILD.5.txt
+@@ -52,10 +52,10 @@ similar to `$_basekernver`.
+ +
+ 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 and extracting the sources so it can use those
+-files in determining the new `pkgver`.
+-This is most useful when used with sources from version control systems (see
+-below).
++This is run after downloading and extracting the sources and running the
++`prepare()` function (if present), so it can use those files in determining 
the
++new `pkgver`.  This is most useful when used with sources from version control
++systems (see below).
+ 
+ *pkgrel*::
+       This is the release number specific to the Arch Linux release. This
+diff --git a/scripts/libmakepkg/tidy/emptydirs.sh.in 
b/scripts/libmakepkg/tidy/emptydirs.sh.in
+index 32b8d8c..85ab39d 100644
+--- a/scripts/libmakepkg/tidy/emptydirs.sh.in
++++ b/scripts/libmakepkg/tidy/emptydirs.sh.in
+@@ -33,6 +33,7 @@ tidy_remove+=('tidy_emptydirs')
+ tidy_emptydirs() {
+       if check_option "emptydirs" "n"; then
+               msg2 "$(gettext "Removing empty directories...")"
+-              find . -depth -type d -exec rmdir '{}' + 2>/dev/null
++              # we are unable to use '-empty' as it is non-POSIX and not 
support by all find variants
++              find . -depth -type d -exec rmdir '{}' \; 2>/dev/null
+       fi
+ }
+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
+ 
+diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
+index 30d2704..0db0952 100644
+--- a/scripts/pacman-key.sh.in
++++ b/scripts/pacman-key.sh.in
+@@ -483,7 +483,7 @@ verify_sig() {
+       local ret=0
+       for sig; do
+               msg "Checking %s..." "$sig"
+-              if ! "${GPG_PACMAN[@]}" --status-fd 1 --verify "$sig" | grep 
-qE '^\[GNUPG:\] TRUST_(FULLY|ULTIMATE)$'; then
++              if ! "${GPG_PACMAN[@]}" --status-fd 1 --verify "$sig" | grep 
-qE '^\[GNUPG:\] TRUST_(FULLY|ULTIMATE).*$'; then
+                       error "$(gettext "The signature identified by %s could 
not be verified.")" "$sig"
+                       ret=1
+               fi
+diff --git a/src/pacman/check.c b/src/pacman/check.c
+index 0fe74e8..d282cc2 100644
+--- a/src/pacman/check.c
++++ b/src/pacman/check.c
+@@ -254,7 +254,6 @@ int check_pkg_full(alpm_pkg_t *pkg)
+       const char *root, *pkgname;
+       size_t errors = 0;
+       size_t rootlen;
+-      char filepath[PATH_MAX];
+       struct archive *mtree;
+       struct archive_entry *entry = NULL;
+       size_t file_count = 0;
+@@ -267,7 +266,6 @@ int check_pkg_full(alpm_pkg_t *pkg)
+               pm_printf(ALPM_LOG_ERROR, _("path too long: %s%s\n"), root, "");
+               return 1;
+       }
+-      strcpy(filepath, root);
+ 
+       pkgname = alpm_pkg_get_name(pkg);
+       mtree = alpm_pkg_mtree_open(pkg);
+@@ -282,6 +280,8 @@ int check_pkg_full(alpm_pkg_t *pkg)
+       while(alpm_pkg_mtree_next(pkg, mtree, &entry) == ARCHIVE_OK) {
+               struct stat st;
+               const char *path = archive_entry_pathname(entry);
++              char filepath[PATH_MAX];
++              int filepath_len;
+               mode_t type;
+               size_t file_errors = 0;
+               int backup = 0;
+@@ -292,31 +292,37 @@ int check_pkg_full(alpm_pkg_t *pkg)
+                       path += 2;
+               }
+ 
+-              if(strcmp(path, ".INSTALL") == 0) {
+-                      char filename[PATH_MAX];
+-                      snprintf(filename, PATH_MAX, "%slocal/%s-%s/install",
+-                                      alpm_option_get_dbpath(config->handle) 
+ 1,
+-                                      pkgname, alpm_pkg_get_version(pkg));
+-                      archive_entry_set_pathname(entry, filename);
+-                      path = archive_entry_pathname(entry);
+-              } else if(strcmp(path, ".CHANGELOG") == 0) {
+-                      char filename[PATH_MAX];
+-                      snprintf(filename, PATH_MAX, "%slocal/%s-%s/changelog",
+-                                      alpm_option_get_dbpath(config->handle) 
+ 1,
+-                                      pkgname, alpm_pkg_get_version(pkg));
+-                      archive_entry_set_pathname(entry, filename);
+-                      path = archive_entry_pathname(entry);
+-              } else if(*path == '.') {
+-                      continue;
+-              }
++              if(*path == '.') {
++                      const char *dbfile = NULL;
+ 
+-              file_count++;
++                      if(strcmp(path, ".INSTALL") == 0) {
++                              dbfile = "install";
++                      } else if(strcmp(path, ".CHANGELOG") == 0) {
++                              dbfile = "changelog";
++                      } else {
++                              continue;
++                      }
+ 
+-              if(rootlen + 1 + strlen(path) > PATH_MAX) {
+-                      pm_printf(ALPM_LOG_WARNING, _("path too long: %s%s\n"), 
root, path);
+-                      continue;
++                      /* Do not append root directory as 
alpm_option_get_dbpath is already
++                       * an absoute path */
++                      filepath_len = snprintf(filepath, PATH_MAX, 
"%slocal/%s-%s/%s",
++                                      alpm_option_get_dbpath(config->handle),
++                                      pkgname, alpm_pkg_get_version(pkg), 
dbfile);
++                      if(filepath_len >= PATH_MAX) {
++                              pm_printf(ALPM_LOG_WARNING, _("path too long: 
%slocal/%s-%s/%s\n"),
++                                              
alpm_option_get_dbpath(config->handle),
++                                              pkgname, 
alpm_pkg_get_version(pkg), dbfile);
++                              continue;
++                      }
++              } else {
++                      filepath_len = snprintf(filepath, PATH_MAX, "%s%s", 
root, path);
++                      if(filepath_len >= PATH_MAX) {
++                              pm_printf(ALPM_LOG_WARNING, _("path too long: 
%s%s\n"), root, path);
++                              continue;
++                      }
+               }
+-              strcpy(filepath + rootlen, path);
++
++              file_count++;
+ 
+               exists = check_file_exists(pkgname, filepath, rootlen, &st);
+               if(exists == 1) {

Reply via email to