diff --git a/srcpkgs/xbps/libxbps-devel.template b/srcpkgs/xbps/libxbps-devel.template index 65483aa9afd..38a5fbdc8d0 100644 --- a/srcpkgs/xbps/libxbps-devel.template +++ b/srcpkgs/xbps/libxbps-devel.template @@ -1,11 +1,12 @@ -# Template file for 'libxbps'. +# Template file for 'libxbps-devel'. # short_desc="${short_desc} - runtime library (development files)" long_desc="${long_desc} This package contains the libxbps develoment files." -depends="zlib-devel proplib-devel confuse-devel libfetch-devel libarchive-devel libxbps>=$version" +depends="zlib-devel proplib-devel confuse-devel libfetch-devel + libarchive-devel libxbps>=$version" replaces="xbps-static<0.16.3_2 libxbps-devel>=0" do_install() { diff --git a/srcpkgs/xbps/patches/0001-xbps-create-if-a-symlink-points-to-an-unexistent-fil.patch b/srcpkgs/xbps/patches/0001-xbps-create-if-a-symlink-points-to-an-unexistent-fil.patch deleted file mode 100644 index ee7640130d6..00000000000 --- a/srcpkgs/xbps/patches/0001-xbps-create-if-a-symlink-points-to-an-unexistent-fil.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 42c21e1c3c0fbc98b56bedbc63022c5e086feb40 Mon Sep 17 00:00:00 2001 -From: Juan RP -Date: Thu, 4 Oct 2012 09:40:52 +0200 -Subject: [PATCH 1/4] xbps-create: if a symlink points to an unexistent file - store symlink target as is. - -Seen in recent builds when building the systemd binpkg: - -[chroot] => Building systemd-194_1.x86_64.xbps... -xbps-create.real: main.c:219: ftw_cb: Assertion `p' failed. - -Which was asserting in a symlink that was pointing to a file provided by the udev -pkg, therefore realpath(3) failed. ---- - bin/xbps-create/main.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/bin/xbps-create/main.c b/bin/xbps-create/main.c -index 2a098ca..beb79df 100644 ---- a/bin/xbps-create/main.c -+++ b/bin/xbps-create/main.c -@@ -216,9 +216,17 @@ ftw_cb(const char *fpath, const struct stat *sb, int type, struct FTW *ftwbuf) - */ - if (strncmp(buf, "../", 3) == 0) { - p = realpath(fpath, NULL); -- assert(p); -- xe->target = strdup(p + strlen(destdir)); -- free(p); -+ if (p == NULL) { -+ /* -+ * This symlink points to an unexistent file, -+ * which might be provided in another package. -+ * So let's use the same target. -+ */ -+ xe->target = strdup(buf); -+ } else { -+ xe->target = strdup(p + strlen(destdir)); -+ free(p); -+ } - } else if (strchr(buf, '/') == NULL) { - p = strdup(filep); - assert(p); --- -1.7.12.2 - diff --git a/srcpkgs/xbps/patches/0002-Do-not-add-to-the-queue-a-pkgdep-that-has-been-alrea.patch b/srcpkgs/xbps/patches/0002-Do-not-add-to-the-queue-a-pkgdep-that-has-been-alrea.patch deleted file mode 100644 index 175d01cb507..00000000000 --- a/srcpkgs/xbps/patches/0002-Do-not-add-to-the-queue-a-pkgdep-that-has-been-alrea.patch +++ /dev/null @@ -1,85 +0,0 @@ -From ebc0f27ae1ce9da34b11e8efbca2ebe75b6bec36 Mon Sep 17 00:00:00 2001 -From: Juan RP -Date: Sat, 6 Oct 2012 10:34:29 +0200 -Subject: [PATCH] Do not add to the queue a pkgdep that has been already added - via a vpkg. - -The problem was after merging udev into systemd, udev is now a virtual pkg -and another dependency was requiring it and added systemd (real pkg) to -the list, but later in the sorting phase systemd was added again breaking -the dependency order. ---- - lib/transaction_sortdeps.c | 41 ++++++++++++++++++++++++++++++++++++----- - 1 file changed, 36 insertions(+), 5 deletions(-) - -diff --git a/lib/transaction_sortdeps.c b/lib/transaction_sortdeps.c -index e70ef09..88d701e 100644 ---- a/lib/transaction_sortdeps.c -+++ b/lib/transaction_sortdeps.c -@@ -290,12 +290,14 @@ again: - int HIDDEN - xbps_transaction_sort_pkg_deps(struct xbps_handle *xhp) - { -- prop_array_t sorted, unsorted, rundeps; -+ prop_array_t provides, sorted, unsorted, rundeps; - prop_object_t obj; - struct pkgdep *pd; -- size_t i, ndeps = 0, cnt = 0; -- const char *pkgname, *pkgver, *tract; -+ size_t i, j, ndeps = 0, cnt = 0; -+ char *vpkg, *vpkgname; -+ const char *pkgname, *pkgver, *tract, *vpkgdep; - int rv = 0; -+ bool vpkg_found; - - if ((sorted = prop_array_create()) == NULL) - return ENOMEM; -@@ -325,14 +327,43 @@ xbps_transaction_sort_pkg_deps(struct xbps_handle *xhp) - * its package dependencies. - */ - for (i = 0; i < ndeps; i++) { -+ vpkg_found = false; - obj = prop_array_get(unsorted, i); - prop_dictionary_get_cstring_nocopy(obj, "pkgname", &pkgname); - prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver); - prop_dictionary_get_cstring_nocopy(obj, "transaction", &tract); -+ provides = prop_dictionary_get(obj, "provides"); - xbps_dbg_printf(xhp, "Sorting package '%s' (%s): ", pkgver, tract); - -- pd = pkgdep_find(pkgname, tract); -- if (pd == NULL) { -+ if (provides) { -+ /* -+ * If current pkgdep provides any virtual pkg check -+ * if any of them was previously added. If true, don't -+ * add it into the list again just order its deps. -+ */ -+ for (j = 0; j < prop_array_count(provides); j++) { -+ prop_array_get_cstring_nocopy(provides, -+ j, &vpkgdep); -+ if (strchr(vpkgdep, '_') == NULL) { -+ vpkg = xbps_xasprintf("%s_1", vpkgdep); -+ assert(vpkg); -+ vpkgname = xbps_pkg_name(vpkg); -+ free(vpkg); -+ } else { -+ vpkgname = xbps_pkg_name(vpkgdep); -+ } -+ assert(vpkgname); -+ pd = pkgdep_find(vpkgname, tract); -+ free(vpkgname); -+ if (pd != NULL) { -+ xbps_dbg_printf_append(xhp, "already " -+ "sorted via `%s' vpkg.", vpkgdep); -+ vpkg_found = true; -+ break; -+ } -+ } -+ } -+ if (!vpkg_found && (pd = pkgdep_find(pkgname, tract)) == NULL) { - /* - * If package not in list, just add to the tail. - */ --- -1.7.12.2 - diff --git a/srcpkgs/xbps/patches/0003-xbps-bin-8-the-check-target-now-handles-symlinks-cor.patch b/srcpkgs/xbps/patches/0003-xbps-bin-8-the-check-target-now-handles-symlinks-cor.patch deleted file mode 100644 index 8df99b0fd98..00000000000 --- a/srcpkgs/xbps/patches/0003-xbps-bin-8-the-check-target-now-handles-symlinks-cor.patch +++ /dev/null @@ -1,86 +0,0 @@ -From d59ad72ee4f05ea46b35984e8346158634041e38 Mon Sep 17 00:00:00 2001 -From: Juan RP -Date: Thu, 4 Oct 2012 12:05:04 +0200 -Subject: [PATCH 3/4] xbps-bin(8): the 'check' target now handles symlinks - correctly. - ---- - NEWS | 3 +++ - bin/xbps-bin/check_pkg_symlinks.c | 38 ++++++++++++++++++++++++-------------- - 2 files changed, 27 insertions(+), 14 deletions(-) - -diff --git a/bin/xbps-bin/check_pkg_symlinks.c b/bin/xbps-bin/check_pkg_symlinks.c -index a5369f0..125c0d4 100644 ---- a/bin/xbps-bin/check_pkg_symlinks.c -+++ b/bin/xbps-bin/check_pkg_symlinks.c -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - #include - - #include -@@ -55,7 +56,7 @@ check_pkg_symlinks(struct xbps_handle *xhp, - prop_object_iterator_t iter; - prop_dictionary_t pkg_filesd = arg; - const char *file, *tgt = NULL; -- char *path, buf[PATH_MAX]; -+ char *path, *buf, *buf2, *buf3, *dname, *path_target; - bool broken = false, test_broken = false; - - (void)pkgdb_update; -@@ -80,28 +81,37 @@ check_pkg_symlinks(struct xbps_handle *xhp, - if (path == NULL) - return -1; - -- memset(&buf, 0, sizeof(buf)); -- if (realpath(path, buf) == NULL) { -+ if ((buf = realpath(path, NULL)) == NULL) { - xbps_error_printf("%s: broken symlink `%s': " - "%s\n", pkgname, file, strerror(errno)); - test_broken = true; - continue; - } -- -- free(path); -- if (strcmp(xhp->rootdir, "/") && -- strstr(buf, xhp->rootdir)) -- path = buf + strlen(xhp->rootdir); -- else -- path = buf; -- -- if (strcmp(path, tgt)) { -+ if (strncmp(tgt, "../", 3) == 0) { -+ /* relative symlink target */ -+ dname = dirname(path); -+ buf2 = xbps_xasprintf("%s/%s", dname, tgt); -+ assert(buf2); -+ buf3 = realpath(buf2, NULL); -+ assert(buf3); -+ free(buf2); -+ path_target = buf3; -+ } else { -+ path_target = buf; -+ } -+ if (strcmp(buf, path_target)) { - xbps_error_printf("%s: modified symlink `%s' " - "points to: `%s' (shall be: `%s')\n", -- pkgname, file, path, tgt); -+ pkgname, file, buf, path_target); - test_broken = true; - } -- path = NULL; -+ free(buf); -+ free(path); -+ if (buf3) -+ free(buf3); -+ -+ path = buf = buf2 = buf3 = NULL; -+ - } - prop_object_iterator_release(iter); - } --- -1.7.12.2 - diff --git a/srcpkgs/xbps/patches/0004-Added-support-for-installing-exact-dependencies-i.e-.patch b/srcpkgs/xbps/patches/0004-Added-support-for-installing-exact-dependencies-i.e-.patch deleted file mode 100644 index f7e563730d5..00000000000 --- a/srcpkgs/xbps/patches/0004-Added-support-for-installing-exact-dependencies-i.e-.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 22a86d82f8b2bee41b5c192daf0ba91999251b80 Mon Sep 17 00:00:00 2001 -From: Juan RP -Date: Tue, 9 Oct 2012 07:35:59 +0200 -Subject: [PATCH] Added support for installing exact dependencies, i.e pkg X - depends on 'Y-1.0_1'. - ---- - include/xbps_api.h.in | 2 +- - lib/repository_finddeps.c | 3 ++- - lib/transaction_sortdeps.c | 4 ++-- - 3 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/lib/repository_finddeps.c b/lib/repository_finddeps.c -index 01845e3..b5b7f31 100644 ---- a/lib/repository_finddeps.c -+++ b/lib/repository_finddeps.c -@@ -196,7 +196,8 @@ find_repo_deps(struct xbps_handle *xhp, - * Pass 1: check if required dependency is already installed - * and its version is fully matched. - */ -- if ((pkgname = xbps_pkgpattern_name(reqpkg)) == NULL) { -+ if (((pkgname = xbps_pkgpattern_name(reqpkg)) == NULL) && -+ ((pkgname = xbps_pkg_name(reqpkg)) == NULL)) { - rv = EINVAL; - xbps_dbg_printf(xhp, "failed to get " - "pkgname from `%s'!", reqpkg); -diff --git a/lib/transaction_sortdeps.c b/lib/transaction_sortdeps.c -index 88d701e..6202a3a 100644 ---- a/lib/transaction_sortdeps.c -+++ b/lib/transaction_sortdeps.c -@@ -192,8 +192,8 @@ sort_pkg_rundeps(struct xbps_handle *xhp, - again: - for (i = idx; i < prop_array_count(pkg_rundeps); i++) { - prop_array_get_cstring_nocopy(pkg_rundeps, i, &str); -- pkgnamedep = xbps_pkgpattern_name(str); -- if (pkgnamedep == NULL) { -+ if (((pkgnamedep = xbps_pkgpattern_name(str)) == NULL) && -+ ((pkgnamedep = xbps_pkg_name(str)) == NULL)) { - rv = ENOMEM; - break; - } --- -1.7.12.2 - diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index 971c8c1072d..2b4abe34c10 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -1,13 +1,12 @@ # Template file for 'xbps' pkgname=xbps -version=0.17 -revision=5 -patch_args="-Np1" +version=0.18 +revision=1 build_style=configure configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin --with-tests --with-static" depends="xbps-triggers" -makedepends="which pkg-config zlib-devel proplib-devel>=0.6.1_3 openssl-devel -libfetch-devel libarchive-devel confuse-devel atf-devel>=0.16" +makedepends="which pkg-config zlib-devel proplib-devel>=0.6.2 openssl-devel + libfetch-devel libarchive-devel confuse-devel atf-devel>=0.16" conf_files="/etc/xbps/xbps.conf" subpackages="libxbps libxbps-devel xbps-static xbps-tests" replaces="xbps>=0" @@ -16,7 +15,7 @@ maintainer="Juan RP " homepage="http://code.google.com/p/xbps" license="Simplified BSD" distfiles="http://xbps.googlecode.com/files/xbps-$version.tar.gz" -checksum=f3e9cb41fbb6075fc5cbc4403179e7ad5c07cd7b0092090f619807b950bfb371 +checksum=f4cfc73ef1aeab88f812a3b50652142d66c8e03189adecb9262d8c989d25964c long_desc=" The XBPS package system. A new, fast, from scratch and simple binary package manager. This package includes the binary utilities diff --git a/srcpkgs/xbps/xbps-static.template b/srcpkgs/xbps/xbps-static.template index 53a7224183b..2764e711ba6 100644 --- a/srcpkgs/xbps/xbps-static.template +++ b/srcpkgs/xbps/xbps-static.template @@ -1,10 +1,10 @@ # Template file for 'xbps-static'. # depends="xbps-triggers" -short_desc="${short_desc} - static binaries and development files" +short_desc="${short_desc} - static binaries" long_desc="${long_desc} - This package contains the static binaries and library, that can be + This package contains the static binaries, that can be used on any GNU/Linux distribution matching the architecture." replaces="xbps-static>=0"