From c602eb3aba0e7a098a331b926f2a0180b0699335 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 8 Feb 2018 10:01:18 +0100 Subject: [PATCH] rebase: the latest upstream release Resolves: rhbz#1469513 Version: 3.3.2-1 --- .gitignore | 2 +- libarchive-3.3.1-cpio-getid.patch | 100 ------------------------------ libarchive.spec | 10 +-- sources | 2 +- 4 files changed, 7 insertions(+), 107 deletions(-) delete mode 100644 libarchive-3.3.1-cpio-getid.patch diff --git a/.gitignore b/.gitignore index 5f27adb..66e4612 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/libarchive-3.3.1.tar.gz +/libarchive-3.3.2.tar.gz diff --git a/libarchive-3.3.1-cpio-getid.patch b/libarchive-3.3.1-cpio-getid.patch deleted file mode 100644 index 682d0b3..0000000 --- a/libarchive-3.3.1-cpio-getid.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 1bfa37818f5e6d8f4fe143084e81d0a102febcba Mon Sep 17 00:00:00 2001 -From: Pavel Raiskup -Date: Mon, 20 Feb 2017 18:28:19 +0100 -Subject: [PATCH] bsdcpio: ignore ENOENT for get{grg,pwu}id() - -Starting from glibc 2.25, those calls set errno to ENOENT -when the requested id is not found. So let's stop throwing -warning in this expected case. - -Also rework the api of lookup_* functions so it is guaranteed that -lookup_name never returns NULL (unless ENOMEM). ---- - cpio/cpio.c | 46 ++++++++++++++++++++++------------------------ - 1 file changed, 22 insertions(+), 24 deletions(-) - -diff --git a/cpio/cpio.c b/cpio/cpio.c -index 6c20ee6..5961960 100644 ---- a/cpio/cpio.c -+++ b/cpio/cpio.c -@@ -1344,23 +1344,23 @@ lookup_name(struct cpio *cpio, struct name_cache **name_cache_variable, - cache->cache[slot].name = NULL; - } - -- if (lookup_fn(cpio, &name, id) == 0) { -- if (name == NULL || name[0] == '\0') { -- /* If lookup failed, format it as a number. */ -- snprintf(asnum, sizeof(asnum), "%u", (unsigned)id); -- name = asnum; -- } -- cache->cache[slot].name = strdup(name); -- if (cache->cache[slot].name != NULL) { -- cache->cache[slot].id = id; -- return (cache->cache[slot].name); -- } -- /* -- * Conveniently, NULL marks an empty slot, so -- * if the strdup() fails, we've just failed to -- * cache it. No recovery necessary. -- */ -+ if (lookup_fn(cpio, &name, id)) { -+ /* If lookup failed, format it as a number. */ -+ snprintf(asnum, sizeof(asnum), "%u", (unsigned)id); -+ name = asnum; - } -+ -+ cache->cache[slot].name = strdup(name); -+ if (cache->cache[slot].name != NULL) { -+ cache->cache[slot].id = id; -+ return (cache->cache[slot].name); -+ } -+ -+ /* -+ * Conveniently, NULL marks an empty slot, so -+ * if the strdup() fails, we've just failed to -+ * cache it. No recovery necessary. -+ */ - return (NULL); - } - -@@ -1381,15 +1381,14 @@ lookup_uname_helper(struct cpio *cpio, const char **name, id_t id) - errno = 0; - pwent = getpwuid((uid_t)id); - if (pwent == NULL) { -- *name = NULL; -- if (errno != 0 && errno != ENOENT) -+ if (errno && errno != ENOENT) - lafe_warnc(errno, "getpwuid(%s) failed", - cpio_i64toa((int64_t)id)); -- return (errno); -+ return 1; - } - - *name = pwent->pw_name; -- return (0); -+ return 0; - } - - static const char * -@@ -1409,15 +1408,14 @@ lookup_gname_helper(struct cpio *cpio, const char **name, id_t id) - errno = 0; - grent = getgrgid((gid_t)id); - if (grent == NULL) { -- *name = NULL; -- if (errno != 0) -+ if (errno && errno != ENOENT) - lafe_warnc(errno, "getgrgid(%s) failed", - cpio_i64toa((int64_t)id)); -- return (errno); -+ return 1; - } - - *name = grent->gr_name; -- return (0); -+ return 0; - } - - /* --- -2.9.3 - diff --git a/libarchive.spec b/libarchive.spec index 27f6a75..ae25c7b 100644 --- a/libarchive.spec +++ b/libarchive.spec @@ -1,17 +1,14 @@ %bcond_without check Name: libarchive -Version: 3.3.1 -Release: 5%{?dist} +Version: 3.3.2 +Release: 1%{?dist} Summary: A library for handling streaming archive formats License: BSD URL: http://www.libarchive.org/ Source0: http://www.libarchive.org/downloads/%{name}-%{version}.tar.gz -# Upstream commit 1bfa37818f5e6 -Patch: libarchive-3.3.1-cpio-getid.patch - BuildRequires: bison BuildRequires: sharutils BuildRequires: zlib-devel @@ -216,6 +213,9 @@ run_testsuite %changelog +* Thu Feb 08 2018 Pavel Raiskup - 3.3.2-1 +- rebase to latest upstream release + * Wed Feb 07 2018 Fedora Release Engineering - 3.3.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index 2b2ef29..d4364dc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libarchive-3.3.1.tar.gz) = 90702b393b6f0943f42438e277b257af45eee4fa82420431f6a4f5f48bb846f2a72c8ff084dc3ee9c87bdf8b57f4d8dddf7814870fe2604fe86c55d8d744c164 +SHA512 (libarchive-3.3.2.tar.gz) = 1e538cd7d492f54b11c16c56f12c1632ba14302a3737ec0db786272aec0c8020f1e27616a7654d57e26737e5ed9bfc9a62f1fdda61a95c39eb726aa7c2f673e4