]> git.pld-linux.org Git - packages/apk-tools.git/commitdiff
- up to 2.10.5 master auto/th/apk-tools-2.10.5-1
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 20 Oct 2021 21:03:55 +0000 (23:03 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Wed, 20 Oct 2021 21:03:55 +0000 (23:03 +0200)
- don't use -Werror when using deprecated openssl APIs
- the Makefiles are utterly broken and rebuild everything on install :(

0001-fix-strncpy-bounds-errors.patch [deleted file]
0002-include-sys-sysmacros.h-for-makedev-definition.patch [deleted file]
apk-tools.spec
no-Werror.patch [new file with mode: 0644]

diff --git a/0001-fix-strncpy-bounds-errors.patch b/0001-fix-strncpy-bounds-errors.patch
deleted file mode 100644 (file)
index 9bb47ec..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-From d409acef489f9c96cd0566b2427760fda2a57221 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@delfi.ee>
-Date: Sat, 3 Nov 2018 20:53:39 +0200
-Subject: [PATCH 1/2] fix strncpy bounds errors
-
-error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
----
- libfetch/http.c |  3 ++-
- src/archive.c   | 12 ++++++++----
- src/database.c  |  3 ++-
- 3 files changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/libfetch/http.c b/libfetch/http.c
-index 638c9a8..de43a36 100644
---- a/libfetch/http.c
-+++ b/libfetch/http.c
-@@ -499,7 +499,8 @@ http_parse_mtime(const char *p, time_t *mtime)
-       char locale[64], *r;
-       struct tm tm;
--      strncpy(locale, setlocale(LC_TIME, NULL), sizeof(locale));
-+      strncpy(locale, setlocale(LC_TIME, NULL), sizeof(locale) - 1);
-+      locale[sizeof(locale) - 1] = '\0';
-       setlocale(LC_TIME, "C");
-       r = strptime(p, "%a, %d %b %Y %H:%M:%S GMT", &tm);
-       /* XXX should add support for date-2 and date-3 */
-diff --git a/src/archive.c b/src/archive.c
-index f3a66c2..059f3ff 100644
---- a/src/archive.c
-+++ b/src/archive.c
-@@ -385,11 +385,15 @@ int apk_tar_write_entry(struct apk_ostream *os, const struct apk_file_info *ae,
-               else
-                       return -1;
--              if (ae->name != NULL)
--                      strncpy(buf.name, ae->name, sizeof(buf.name));
-+              if (ae->name != NULL) {
-+                      strncpy(buf.name, ae->name, sizeof(buf.name) - 1);
-+                      buf.name[sizeof(buf.name) - 1] = '\0';
-+              }
--              strncpy(buf.uname, ae->uname ?: "root", sizeof(buf.uname));
--              strncpy(buf.gname, ae->gname ?: "root", sizeof(buf.gname));
-+              strncpy(buf.uname, ae->uname ?: "root", sizeof(buf.uname) - 1);
-+              buf.uname[sizeof(buf.uname) - 1] = '\0';
-+              strncpy(buf.gname, ae->gname ?: "root", sizeof(buf.gname) - 1);
-+              buf.gname[sizeof(buf.gname) - 1] = '\0';
-               PUT_OCTAL(buf.size, ae->size);
-               PUT_OCTAL(buf.uid, ae->uid);
-diff --git a/src/database.c b/src/database.c
-index 91fcedd..92c4793 100644
---- a/src/database.c
-+++ b/src/database.c
-@@ -2778,7 +2778,8 @@ static int apk_db_unpack_pkg(struct apk_database *db,
-               if (!(pkg->repos & db->local_repos))
-                       need_copy = TRUE;
-       } else {
--              strncpy(file, pkg->filename, sizeof(file));
-+              strncpy(file, pkg->filename, sizeof(file) - 1);
-+              file[sizeof(file) - 1] = '\0';
-               need_copy = TRUE;
-       }
-       if (!apk_db_cache_active(db))
--- 
-2.19.1
-
diff --git a/0002-include-sys-sysmacros.h-for-makedev-definition.patch b/0002-include-sys-sysmacros.h-for-makedev-definition.patch
deleted file mode 100644 (file)
index 37d1288..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-From 79b56618237d54ff302d9eef1c0c44ee980fe1a2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@delfi.ee>
-Date: Sat, 3 Nov 2018 20:54:12 +0200
-Subject: [PATCH 2/2] include sys/sysmacros.h for makedev definition
-
----
- src/archive.c  | 1 +
- src/database.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/src/archive.c b/src/archive.c
-index 059f3ff..9ad5835 100644
---- a/src/archive.c
-+++ b/src/archive.c
-@@ -21,6 +21,7 @@
- #include <sys/wait.h>
- #include <sys/stat.h>
- #include <sys/xattr.h>
-+#include <sys/sysmacros.h>
- #include <limits.h>
- #include <stdint.h>
- #include <stdlib.h>
-diff --git a/src/database.c b/src/database.c
-index 92c4793..0f3c87e 100644
---- a/src/database.c
-+++ b/src/database.c
-@@ -27,6 +27,7 @@
- #include <sys/stat.h>
- #include <sys/mount.h>
- #include <sys/statvfs.h>
-+#include <sys/sysmacros.h>
- #include <linux/magic.h>
- #include "apk_defines.h"
--- 
-2.19.1
-
index 10812263ec3c210bc2a9e8bfc746457eca78ff19..f889f1144aed114944a0dde290d01582bb106c02 100644 (file)
@@ -4,14 +4,13 @@
 
 Summary:       Alpine Package Keeper - package manager for alpine
 Name:          apk-tools
-Version:       2.10.3
-Release:       3
+Version:       2.10.5
+Release:       1
 License:       GPL v2
 Group:         Base
 Source0:       https://dev.alpinelinux.org/archive/apk-tools/%{name}-%{version}.tar.xz
-# Source0-md5: deecb1be266f02279b8eeba74e60772a
-Patch0:                0001-fix-strncpy-bounds-errors.patch
-Patch1:                0002-include-sys-sysmacros.h-for-makedev-definition.patch
+# Source0-md5: 6ae9263da44456776ff4836ad5b4c571
+Patch0:                no-Werror.patch
 URL:           https://git.alpinelinux.org/apk-tools/
 %{?with_lua:BuildRequires:     lua52-devel}
 BuildRequires: openssl-devel
@@ -34,7 +33,6 @@ Lua module for apk-tools.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
 
 %build
 generate_config() {
@@ -45,11 +43,15 @@ cat <<-EOF
 EOF
 }
 generate_config > config.mk
-%{__make}
+%{__make} \
+       V=1 \
+       CFLAGS="%{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
+       V=1 \
+       CFLAGS="%{rpmcflags}" \
        DESTDIR=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/apk/{keys,protected_paths.d}
diff --git a/no-Werror.patch b/no-Werror.patch
new file mode 100644 (file)
index 0000000..8593207
--- /dev/null
@@ -0,0 +1,11 @@
+--- apk-tools-2.10.5/Make.rules~       2020-02-18 15:19:48.000000000 +0100
++++ apk-tools-2.10.5/Make.rules        2021-10-20 23:00:57.635002409 +0200
+@@ -71,7 +71,7 @@
+ INSTALLDIR    := $(INSTALL) -d
+ CFLAGS                ?= -g -O2
+-CFLAGS_ALL    := -Werror -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC
++CFLAGS_ALL    := -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC
+ CFLAGS_ALL    += $(CFLAGS)
+ LDFLAGS               ?= -g
This page took 0.096208 seconds and 4 git commands to generate.