aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-05-20 10:37:14 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-05-20 10:37:14 +0300
commit993a630a83cd7c7457206b31ae4f639d6f936d5c (patch)
treeffd7352a1b3994f69672fc08218f085975ff786c
parent877b733c02957e318388f08016aee7b75ec9b18a (diff)
downloadaports-993a630a83cd7c7457206b31ae4f639d6f936d5c.tar.bz2
aports-993a630a83cd7c7457206b31ae4f639d6f936d5c.tar.xz
main/apk-tools: upgrade to 2.4.4
-rw-r--r--main/apk-tools/0001-db-allow-replacing-files-of-origin-package-is-same.patch29
-rw-r--r--main/apk-tools/0001-finally-fix-building-PIE-binaries.patch146
-rw-r--r--main/apk-tools/APKBUILD18
3 files changed, 5 insertions, 188 deletions
diff --git a/main/apk-tools/0001-db-allow-replacing-files-of-origin-package-is-same.patch b/main/apk-tools/0001-db-allow-replacing-files-of-origin-package-is-same.patch
deleted file mode 100644
index 5ead3bc5ec..0000000000
--- a/main/apk-tools/0001-db-allow-replacing-files-of-origin-package-is-same.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 73a03c2e40b9c429342729d009801751bd0812da Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Fri, 25 Apr 2014 22:17:49 +0300
-Subject: [PATCH] db: allow replacing files of origin package is same
-
-basically this makes packager's life simpler as there is no need
-to list the subpkg names in replaces. this was also very error
-prone and tedious job to do properly.
----
- src/database.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/database.c b/src/database.c
-index 7fb700b..356ba22 100644
---- a/src/database.c
-+++ b/src/database.c
-@@ -2294,6 +2294,9 @@ static int apk_db_install_archive_entry(void *_ctx,
- /* Upgrading package? */
- if (opkg->name == pkg->name)
- break;
-+ /* Or same source package? */
-+ if (opkg->origin == pkg->origin && pkg->origin)
-+ break;
- /* Does the original package replace the new one? */
- foreach_array_item(dep, opkg->ipkg->replaces) {
- if (apk_dep_is_materialized(dep, pkg)) {
---
-1.9.2
-
diff --git a/main/apk-tools/0001-finally-fix-building-PIE-binaries.patch b/main/apk-tools/0001-finally-fix-building-PIE-binaries.patch
deleted file mode 100644
index b1316f682e..0000000000
--- a/main/apk-tools/0001-finally-fix-building-PIE-binaries.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-From 1e36692a8aee88564b19e6855febd91b4feea5eb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Mon, 12 May 2014 19:42:32 +0300
-Subject: [PATCH] finally fix building PIE binaries
-
-the dynamic applet registration never worked with PIE, and as
-a temporary hack -nopie was added to default link flags in 2008.
-
-this commit reworks the applet registration mechanism to something
-that is compatible with PIE, and removes the hack. finally!
----
- src/Makefile | 4 ++--
- src/apk.c | 38 +++++++++++++++++++++++++++++---------
- src/apk_applet.h | 9 ++++++---
- 3 files changed, 37 insertions(+), 14 deletions(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index 4487007..8fdaf4b 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -62,8 +62,8 @@ progs-$(STATIC) += apk.static
- apk.static-objs := $(filter-out apk.o,$(apk-objs)) apk-static.o
- LDFLAGS_apk.static := -static
- LIBS_apk.static := -Wl,--as-needed -ldl -Wl,--no-as-needed
--LDFLAGS_apk += -nopie -L$(obj)
--LDFLAGS_apk-test += -nopie -L$(obj)
-+LDFLAGS_apk += -L$(obj)
-+LDFLAGS_apk-test += -L$(obj)
-
- CFLAGS_ALL += $(shell $(PKG_CONFIG) --cflags $(PKGDEPS))
- LIBS := -Wl,--as-needed \
-diff --git a/src/apk.c b/src/apk.c
-index 6cd01de..daf4d7f 100644
---- a/src/apk.c
-+++ b/src/apk.c
-@@ -33,6 +33,9 @@
- #include "apk_print.h"
- #include "apk_io.h"
-
-+static struct list_head apk_applet_list;
-+#define foreach_applet(iter) list_for_each_entry(iter, &apk_applet_list, node)
-+
- char **apk_argv;
-
- static struct apk_option generic_options[] = {
-@@ -150,17 +153,16 @@ static int usage(struct apk_applet *applet)
- {
- version();
- if (applet == NULL) {
-- struct apk_applet **a;
-+ struct apk_applet *a;
-
- print_usage("COMMAND", "[ARGS]...",
- ARRAY_SIZE(generic_options), generic_options);
-
- printf("\nThe following commands are available:\n");
-- for (a = &__start_apkapplets; a < &__stop_apkapplets; a++) {
-+ foreach_applet(a) {
- struct apk_indent indent = { .indent = 12 };
--
-- indent.x = printf(" %-*s", indent.indent - 3, (*a)->name);
-- apk_print_indented_words(&indent, (*a)->help);
-+ indent.x = printf(" %-*s", indent.indent - 3, a->name);
-+ apk_print_indented_words(&indent, a->help);
- printf("\n");
- }
- } else {
-@@ -186,11 +188,11 @@ static int usage(struct apk_applet *applet)
-
- static struct apk_applet *find_applet(const char *name)
- {
-- struct apk_applet **a;
-+ struct apk_applet *a;
-
-- for (a = &__start_apkapplets; a < &__stop_apkapplets; a++) {
-- if (strcmp(name, (*a)->name) == 0)
-- return *a;
-+ foreach_applet(a) {
-+ if (strcmp(name, a->name) == 0)
-+ return a;
- }
-
- return NULL;
-@@ -289,6 +291,22 @@ static void setup_automatic_flags(void)
- apk_flags |= APK_INTERACTIVE;
- }
-
-+void apk_applet_register(struct apk_applet *applet)
-+{
-+ list_init(&applet->node);
-+ list_add_tail(&applet->node, &apk_applet_list);
-+}
-+
-+static void apk_applet_register_builtin(void)
-+{
-+ extern apk_init_func_t __start_initapplets[], __stop_initapplets[];
-+ apk_init_func_t *p;
-+
-+ list_init(&apk_applet_list);
-+ for (p = __start_initapplets; p < __stop_initapplets; p++)
-+ (*p)();
-+}
-+
- int main(int argc, char **argv)
- {
- struct apk_applet *applet;
-@@ -309,6 +327,8 @@ int main(int argc, char **argv)
- apk_string_array_init(&test_repos);
- #endif
-
-+ apk_applet_register_builtin();
-+
- apk_argv = malloc(sizeof(char*[argc+2]));
- memcpy(apk_argv, argv, sizeof(char*[argc]));
- apk_argv[argc] = NULL;
-diff --git a/src/apk_applet.h b/src/apk_applet.h
-index fa690fc..d11c259 100644
---- a/src/apk_applet.h
-+++ b/src/apk_applet.h
-@@ -25,6 +25,8 @@ struct apk_option {
- };
-
- struct apk_applet {
-+ struct list_head node;
-+
- const char *name;
- const char *arguments;
- const char *help;
-@@ -39,10 +41,11 @@ struct apk_applet {
- int (*main)(void *ctx, struct apk_database *db, struct apk_string_array *args);
- };
-
--extern struct apk_applet *__start_apkapplets, *__stop_apkapplets;
-+void apk_applet_register(struct apk_applet *);
-+typedef void (*apk_init_func_t)(void);
-
- #define APK_DEFINE_APPLET(x) \
-- static struct apk_applet *__applet_##x \
-- __attribute__((__section__("apkapplets"))) __attribute((used)) = &x;
-+static void __register_##x(void) { apk_applet_register(&x); } \
-+static apk_init_func_t __regfunc_##x __attribute__((__section__("initapplets"))) __attribute((used)) = __register_##x;
-
- #endif
---
-1.9.2
-
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD
index a1bd73b2ff..803d8a3d36 100644
--- a/main/apk-tools/APKBUILD
+++ b/main/apk-tools/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apk-tools
-pkgver=2.4.3
-pkgrel=2
+pkgver=2.4.4
+pkgrel=0
pkgdesc="Alpine Package Keeper - package manager for alpine"
subpackages="$pkgname-static"
depends=
@@ -13,8 +13,6 @@ if [ "$CBUILD" == "$CHOST" ]; then
makedepends="$makedepends lua5.2-dev"
fi
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz
- 0001-db-allow-replacing-files-of-origin-package-is-same.patch
- 0001-finally-fix-building-PIE-binaries.patch
"
url="http://git.alpinelinux.org/cgit/apk-tools/"
@@ -84,12 +82,6 @@ luaapk() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/
}
-md5sums="40e287741880f8a24ddaca5fe9f545b7 apk-tools-2.4.3.tar.xz
-cd234f5f9c5963a519332a99d9b73547 0001-db-allow-replacing-files-of-origin-package-is-same.patch
-3294eec1ff1d75a4e87f910636eaf7e2 0001-finally-fix-building-PIE-binaries.patch"
-sha256sums="3198d3cdb718116665e609b5d3842a05f528f37fcbb6c52a2e9d46bfd2646288 apk-tools-2.4.3.tar.xz
-8810c75716c32e875a46143d371c15e954d81e2fe95a9097bfd849c5aebcca57 0001-db-allow-replacing-files-of-origin-package-is-same.patch
-1eaaa65b790013add87c3f6b458a842a42852f1c4207687adccc2f25caa11347 0001-finally-fix-building-PIE-binaries.patch"
-sha512sums="327ca4bd19b35c521edddb4b1f56ac3f68e212c9b5be5a18219416048489a536bf948f6e4a0443456d42026aed71fd6255d2c73ff178e0726b392a5553e6680e apk-tools-2.4.3.tar.xz
-03d8e95ed2f53126bc40494a5335b4b550edb532b1d1e90cd757b4b8a10efcf84fb030b913ba924ba42cc1ef38becef4c55b05383eb71c194c587b6212b49a52 0001-db-allow-replacing-files-of-origin-package-is-same.patch
-3cca632d4ec459ca6d5647c4b7712ffabbcda668987f7b305f3c21e3c1e852a4d943ccc957cefaefafebb5e35e5a56c97717a047207c741721899453ad875a8d 0001-finally-fix-building-PIE-binaries.patch"
+md5sums="2f43f516ef5bee0abc37c68443b5b26f apk-tools-2.4.4.tar.xz"
+sha256sums="ed86f679605e248c9a96986834de33da9ff260081e82fbd29a39d836d0c55cbf apk-tools-2.4.4.tar.xz"
+sha512sums="e1381312334d36b38dec57d59556aa20c5d1c95dcc95690f6289a854b78bbc0c2745beb0658aeb42a174680ef9effa248c54651104919ad9b1005352c57a21c1 apk-tools-2.4.4.tar.xz"