diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-23 13:56:41 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-23 14:05:17 +0000 |
commit | ec0a35ab05242d2f0ad23529f1e94ccaa5b4753a (patch) | |
tree | 29239b95cef15e02f3ca0c17e3ebcd0b20dde152 /main/apk-tools | |
parent | 45af5bda242ec3f6b0a43af9cae6e90b511601ad (diff) | |
download | aports-ec0a35ab05242d2f0ad23529f1e94ccaa5b4753a.tar.bz2 aports-ec0a35ab05242d2f0ad23529f1e94ccaa5b4753a.tar.xz |
main/apk-tools: upgrade to 2.0.6
fixes #427
Diffstat (limited to 'main/apk-tools')
-rw-r--r-- | main/apk-tools/0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch | 42 | ||||
-rw-r--r-- | main/apk-tools/0001-db-optionally-remove-dirs-when-unref.patch | 97 | ||||
-rw-r--r-- | main/apk-tools/APKBUILD | 17 | ||||
-rw-r--r-- | main/apk-tools/apk-tools-static.patch | 65 | ||||
-rw-r--r-- | main/apk-tools/eglibc.patch | 57 |
5 files changed, 3 insertions, 275 deletions
diff --git a/main/apk-tools/0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch b/main/apk-tools/0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch deleted file mode 100644 index 52ef141863..0000000000 --- a/main/apk-tools/0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch +++ /dev/null @@ -1,42 +0,0 @@ -From fc4c60f233ebe9fe85b7b03d0cf5deec4ab1b32d Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Wed, 16 Jun 2010 07:37:17 +0000 -Subject: [PATCH] Makefile: do not require lua pkgconfig unless you intend build lua module - ---- - src/Makefile | 11 ++++++----- - 1 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/src/Makefile b/src/Makefile -index 50f9664..bea288e 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -1,12 +1,9 @@ --PKGDEPS := openssl zlib lua -- --ifeq ($(shell pkg-config --print-errors --exists $(PKGDEPS) || echo fail),fail) --$(error Build dependencies are not met) --endif -+PKGDEPS := openssl zlib - - # lua module - ifneq ($(LUAAPK),) - LIBAPK := YesPlease -+PKGDEPS += lua - shlibs-y += apk.so - apk.so-objs := lua-apk.o - CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\" -@@ -16,6 +13,10 @@ install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) \ - $(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR) - endif - -+ifeq ($(shell pkg-config --print-errors --exists $(PKGDEPS) || echo fail),fail) -+$(error Build dependencies are not met) -+endif -+ - progs-y += apk - apk-objs := apk.o add.o del.o fix.o update.o info.o \ - search.o upgrade.o cache.o ver.o index.o fetch.o \ --- -1.7.1 - diff --git a/main/apk-tools/0001-db-optionally-remove-dirs-when-unref.patch b/main/apk-tools/0001-db-optionally-remove-dirs-when-unref.patch deleted file mode 100644 index e6497dda49..0000000000 --- a/main/apk-tools/0001-db-optionally-remove-dirs-when-unref.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 5c4583a9027de2a26d3bff8b443f7db7f0c37074 Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Wed, 22 Sep 2010 14:16:18 +0000 -Subject: [PATCH] db: optionally remove dirs when unref - -We want remove dirs when they are unreferenced so we remove all dirs on -apk del, but we don't want remove dirs when closing database. So we make -removing dir optional when unreferencing it. - -This partially reverts commit c7ffc96a16c6963fe0a07be7ee75e8f1f7426882. - -fixes #406 ---- - src/database.c | 28 +++++++++++++++------------- - 1 files changed, 15 insertions(+), 13 deletions(-) - -diff --git a/src/database.c b/src/database.c -index 925aa4a..0054837 100644 ---- a/src/database.c -+++ b/src/database.c -@@ -30,6 +30,11 @@ - #include "apk_archive.h" - #include "apk_print.h" - -+enum { -+ APK_DISALLOW_RMDIR = 0, -+ APK_ALLOW_RMDIR = 1 -+}; -+ - int apk_verbosity = 1; - unsigned int apk_flags = 0; - -@@ -188,16 +193,19 @@ struct apk_name *apk_db_get_name(struct apk_database *db, apk_blob_t name) - return pn; - } - --static void apk_db_dir_unref(struct apk_database *db, struct apk_db_dir *dir) -+static void apk_db_dir_unref(struct apk_database *db, struct apk_db_dir *dir, -+ int allow_rmdir) - { - dir->refs--; - if (dir->refs > 0) - return; - - db->installed.stats.dirs--; -+ if (allow_rmdir) -+ unlinkat(db->root_fd, dir->name, AT_REMOVEDIR); - - if (dir->parent != NULL) -- apk_db_dir_unref(db, dir->parent); -+ apk_db_dir_unref(db, dir->parent, allow_rmdir); - } - - static struct apk_db_dir *apk_db_dir_ref(struct apk_db_dir *dir) -@@ -307,16 +315,11 @@ static void apk_db_diri_mkdir(struct apk_database *db, struct apk_db_dir_instanc - } - } - --static void apk_db_diri_rmdir(struct apk_database *db, struct apk_db_dir_instance *diri) --{ -- if (diri->dir->refs == 1) -- unlinkat(db->root_fd, diri->dir->name, 1); --} -- - static void apk_db_diri_free(struct apk_database *db, -- struct apk_db_dir_instance *diri) -+ struct apk_db_dir_instance *diri, -+ int allow_rmdir) - { -- apk_db_dir_unref(db, diri->dir); -+ apk_db_dir_unref(db, diri->dir, allow_rmdir); - free(diri); - } - -@@ -1265,7 +1268,7 @@ void apk_db_close(struct apk_database *db) - - list_for_each_entry(ipkg, &db->installed.packages, installed_pkgs_list) { - hlist_for_each_entry_safe(diri, dc, dn, &ipkg->owned_dirs, pkg_dirs_list) { -- apk_db_diri_free(db, diri); -+ apk_db_diri_free(db, diri, APK_DISALLOW_RMDIR); - } - } - -@@ -1884,9 +1887,8 @@ static void apk_db_purge_pkg(struct apk_database *db, - db->installed.stats.files--; - } - } -- apk_db_diri_rmdir(db, diri); - __hlist_del(dc, &ipkg->owned_dirs.first); -- apk_db_diri_free(db, diri); -+ apk_db_diri_free(db, diri, APK_ALLOW_RMDIR); - } - } - --- -1.7.2.3 - diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD index e698b02e2e..f64df8a815 100644 --- a/main/apk-tools/APKBUILD +++ b/main/apk-tools/APKBUILD @@ -1,16 +1,12 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=apk-tools -pkgver=2.0.5 -pkgrel=3 +pkgver=2.0.6 +pkgrel=0 pkgdesc="Alpine Package Keeper - package manager for alpine" subpackages="$pkgname-static" depends= makedepends="zlib-dev openssl-dev pkgconfig" source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 - 0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch - 0001-db-optionally-remove-dirs-when-unref.patch - apk-tools-static.patch - eglibc.patch " url="http://git.alpinelinux.org/cgit/apk-tools/" @@ -24,9 +20,6 @@ prepare() { *.patch) patch -p1 -i "$srcdir"/$i || return 1 esac done - # the patch includes a symlink - rm -f src/apk-static.c - ln -s apk.c src/apk-static.c } build() { @@ -54,8 +47,4 @@ static() { "$subpkgdir"/sbin/apk.static } -md5sums="7f9234ab210557b064d7bd9b42833f0a apk-tools-2.0.5.tar.bz2 -f63d483b724e8e9344ce8cb965d5ed22 0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch -c2ea3684c22740ef210a9b1a64ba4058 0001-db-optionally-remove-dirs-when-unref.patch -3c1f21719a6c4aba51333cf0d88c5600 apk-tools-static.patch -a4de86c6c4df6d4d125ff82e607797d6 eglibc.patch" +md5sums="5933a61f91f44c5c534f8a62e6effb65 apk-tools-2.0.6.tar.bz2" diff --git a/main/apk-tools/apk-tools-static.patch b/main/apk-tools/apk-tools-static.patch deleted file mode 100644 index c122964b45..0000000000 --- a/main/apk-tools/apk-tools-static.patch +++ /dev/null @@ -1,65 +0,0 @@ -commit dd6008995a8e8509d71ffa906c837e7a320e8a15 -Author: Timo Teräs <timo.teras@iki.fi> -Date: Wed Jun 30 16:53:56 2010 +0300 - - static build: do not use openssl engines - - We want minimal static build. And this now also breaks with our openssl - since it tries to automatically dlopen some of the engine modules. - -diff --git a/.gitignore b/.gitignore -index f6f9cf6..2b22f52 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -1,4 +1,5 @@ - apk -+apk.static - *.o - *.d - *.cmd -diff --git a/src/Makefile b/src/Makefile -index bea288e..c9cda6a 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -41,9 +41,10 @@ endif - - CFLAGS_ALL += -D_ATFILE_SOURCE - CFLAGS_apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\" -+CFLAGS_apk-static.o := -DAPK_VERSION=\"$(FULL_VERSION)\" -DOPENSSL_NO_ENGINE - - progs-$(STATIC) += apk.static --apk.static-objs := $(apk-objs) -+apk.static-objs := $(filter-out apk.o,$(apk-objs)) apk-static.o - LDFLAGS_apk.static := -static - LDFLAGS_apk += -nopie -L$(obj) - -diff --git a/src/apk-static.c b/src/apk-static.c -new file mode 120000 -index 0000000..bf745af ---- /dev/null -+++ b/src/apk-static.c -@@ -0,0 +1 @@ -+apk.c -\ No newline at end of file -diff --git a/src/apk.c b/src/apk.c -index 81bb950..4196f74 100644 ---- a/src/apk.c -+++ b/src/apk.c -@@ -12,13 +12,17 @@ - #include <stdio.h> - #include <fcntl.h> - #include <ctype.h> -+#include <errno.h> - #include <stdarg.h> - #include <stdlib.h> - #include <string.h> - #include <getopt.h> - #include <sys/stat.h> - -+#include <openssl/crypto.h> -+#ifndef OPENSSL_NO_ENGINE - #include <openssl/engine.h> -+#endif - - #include "apk_defines.h" - #include "apk_database.h" diff --git a/main/apk-tools/eglibc.patch b/main/apk-tools/eglibc.patch deleted file mode 100644 index 32bf69a715..0000000000 --- a/main/apk-tools/eglibc.patch +++ /dev/null @@ -1,57 +0,0 @@ -From b4adf7645ff6c14e19682b9ef17e15756c5b0b14 Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Mon, 30 Aug 2010 13:04:25 +0000 -Subject: Fix building on eglibc - -Seems like recent eglibc requires that you include sys/stat.h ---- -diff --git a/src/archive.c b/src/archive.c -index f60cb1b..3ac8a64 100644 ---- a/src/archive.c -+++ b/src/archive.c -@@ -20,6 +20,7 @@ - #include <unistd.h> - #include <sysexits.h> - #include <sys/wait.h> -+#include <sys/stat.h> - #include <limits.h> - #include <stdint.h> - -diff --git a/src/database.c b/src/database.c -index 5dcd9e0..925aa4a 100644 ---- a/src/database.c -+++ b/src/database.c -@@ -20,6 +20,7 @@ - #include <signal.h> - #include <fnmatch.h> - #include <sys/file.h> -+#include <sys/stat.h> - - #include "apk_defines.h" - #include "apk_package.h" -diff --git a/src/io.c b/src/io.c -index 2b0c892..5100d41 100644 ---- a/src/io.c -+++ b/src/io.c -@@ -15,6 +15,7 @@ - #include <unistd.h> - #include <malloc.h> - #include <sys/mman.h> -+#include <sys/stat.h> - #include <pwd.h> - #include <grp.h> - -diff --git a/src/package.c b/src/package.c -index e73814a..8f15e7a 100644 ---- a/src/package.c -+++ b/src/package.c -@@ -19,6 +19,7 @@ - #include <stdlib.h> - #include <unistd.h> - #include <sys/wait.h> -+#include <sys/stat.h> - - #include <openssl/pem.h> - --- -cgit v0.8.3.1 |