From 536b22aa02c6508560e7b2ee4c48bb5a62fd006f Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Fri, 21 Jun 2019 16:34:34 +0200
Subject: [PATCH 1/2] xbps: update to 0.55.

---
 ...d0323852c22fd5fa78fc8c04e33b4410cd4a.patch | 28 -------------------
 ...7bd7745f6ce3b776d06a25a36a34687072ee.patch | 19 -------------
 ...0a93d13a70c4a9e7af50f5f1d53e48cc52db.patch | 19 -------------
 ...bf3c2395edfe0009ba232fee7a1f8e71a91a.patch | 26 -----------------
 srcpkgs/xbps/template                         |  6 ++--
 5 files changed, 3 insertions(+), 95 deletions(-)
 delete mode 100644 srcpkgs/xbps/patches/5098d0323852c22fd5fa78fc8c04e33b4410cd4a.patch
 delete mode 100644 srcpkgs/xbps/patches/70867bd7745f6ce3b776d06a25a36a34687072ee.patch
 delete mode 100644 srcpkgs/xbps/patches/9c300a93d13a70c4a9e7af50f5f1d53e48cc52db.patch
 delete mode 100644 srcpkgs/xbps/patches/a72cbf3c2395edfe0009ba232fee7a1f8e71a91a.patch

diff --git a/srcpkgs/xbps/patches/5098d0323852c22fd5fa78fc8c04e33b4410cd4a.patch b/srcpkgs/xbps/patches/5098d0323852c22fd5fa78fc8c04e33b4410cd4a.patch
deleted file mode 100644
index ace59f657ad..00000000000
--- a/srcpkgs/xbps/patches/5098d0323852c22fd5fa78fc8c04e33b4410cd4a.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-commit 5098d0323852c22fd5fa78fc8c04e33b4410cd4a
-Author: Juan RP <xtraeme@gmail.com>
-Date:   Thu Jun 20 19:26:43 2019 +0200
-
-    mk/prog.mk: set proper target for bins.
-    
-    Fixes build failure in aarch64-musl and cross compilation...
-    weird it didn't fail on native.
-
-diff --git a/mk/prog.mk b/mk/prog.mk
-index 2d99ff55..007a1cac 100644
---- mk/prog.mk
-+++ mk/prog.mk
-@@ -46,12 +46,12 @@ endif
- 	@printf " [CC]\t\t$@\n"
- 	${SILENT}$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $<
- 
--$(BIN).static: $(OBJS) $(STATIC_LIBS)
-+$(BIN).static: $(OBJS) $(TOPDIR)/lib/libxbps.a
- 	@printf " [CCLD]\t\t$@\n"
- 	${SILENT}$(CC) -static $(OBJS) $(CPPFLAGS) -L$(TOPDIR)/lib \
- 		$(CFLAGS) $(LDFLAGS) $(PROG_LDFLAGS) $(STATIC_LIBS) -o $@
- 
--$(BIN): $(OBJS)
-+$(BIN): $(OBJS) $(TOPDIR)/lib/libxbps.so
- 	@printf " [CCLD]\t\t$@\n"
- 	${SILENT}$(CC) $^ $(CPPFLAGS) -L$(TOPDIR)/lib \
- 		$(CFLAGS) $(PROG_CFLAGS) $(LDFLAGS) $(PROG_LDFLAGS) \
diff --git a/srcpkgs/xbps/patches/70867bd7745f6ce3b776d06a25a36a34687072ee.patch b/srcpkgs/xbps/patches/70867bd7745f6ce3b776d06a25a36a34687072ee.patch
deleted file mode 100644
index 71907c2cba2..00000000000
--- a/srcpkgs/xbps/patches/70867bd7745f6ce3b776d06a25a36a34687072ee.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 70867bd7745f6ce3b776d06a25a36a34687072ee
-Author: Duncaen <mail@duncano.de>
-Date:   Thu Jun 20 18:04:39 2019 +0200
-
-    lib/transaction_files.c: fix size_t printf
-
-diff --git a/lib/transaction_files.c b/lib/transaction_files.c
-index c9e15518..14cf7c22 100644
---- lib/transaction_files.c
-+++ lib/transaction_files.c
-@@ -194,7 +194,7 @@ can_delete_directory(struct xbps_handle *xhp, const char *file, size_t len, size
- 	fcount -= 2;
- 
- 	if (fcount <= rmcount) {
--		xbps_dbg_printf(xhp, "[files] only removed %lu out of %lu files: %s\n",
-+		xbps_dbg_printf(xhp, "[files] only removed %zu out of %zu files: %s\n",
- 		    rmcount, fcount, file);
- 	}
- 
diff --git a/srcpkgs/xbps/patches/9c300a93d13a70c4a9e7af50f5f1d53e48cc52db.patch b/srcpkgs/xbps/patches/9c300a93d13a70c4a9e7af50f5f1d53e48cc52db.patch
deleted file mode 100644
index a3a2f381164..00000000000
--- a/srcpkgs/xbps/patches/9c300a93d13a70c4a9e7af50f5f1d53e48cc52db.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 9c300a93d13a70c4a9e7af50f5f1d53e48cc52db
-Author: Duncaen <mail@duncano.de>
-Date:   Fri Jun 21 00:32:16 2019 +0200
-
-    bin/xbps-checkvers: fix --format long form
-
-diff --git a/bin/xbps-checkvers/main.c b/bin/xbps-checkvers/main.c
-index 43ac0e89..d792e008 100644
---- bin/xbps-checkvers/main.c
-+++ bin/xbps-checkvers/main.c
-@@ -645,7 +645,7 @@ main(int argc, char **argv)
- 		{ "config", required_argument, NULL, 'C' },
- 		{ "distdir", required_argument, NULL, 'D' },
- 		{ "debug", no_argument, NULL, 'd' },
--		{ "format", no_argument, NULL, 'f' },
-+		{ "format", required_argument, NULL, 'f' },
- 		{ "installed", no_argument, NULL, 'I' },
- 		{ "ignore-conf-repos", no_argument, NULL, 'i' },
- 		{ "manual", no_argument, NULL, 'm' },
diff --git a/srcpkgs/xbps/patches/a72cbf3c2395edfe0009ba232fee7a1f8e71a91a.patch b/srcpkgs/xbps/patches/a72cbf3c2395edfe0009ba232fee7a1f8e71a91a.patch
deleted file mode 100644
index 85c128f1bde..00000000000
--- a/srcpkgs/xbps/patches/a72cbf3c2395edfe0009ba232fee7a1f8e71a91a.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit a72cbf3c2395edfe0009ba232fee7a1f8e71a91a
-Author: q66 <daniel@octaforge.org>
-Date:   Fri Jun 21 03:34:27 2019 +0200
-
-    lib/package_unpack.c: silence gcc false positive
-    
-    On some systems, something like this happens:
-    
-    package_unpack.c:375:11: error: 'buf' may be used uninitialized in this function
-    
-    This is not actually a bug as logically `buf` is always initialized
-    in that place, but gcc doesn't like it anyway.
-
-diff --git a/lib/package_unpack.c b/lib/package_unpack.c
-index ecebc694..e995d40c 100644
---- lib/package_unpack.c
-+++ lib/package_unpack.c
-@@ -84,7 +84,7 @@ unpack_archive(struct xbps_handle *xhp,
- 	size_t  instbufsiz = 0, rembufsiz = 0;
- 	ssize_t entry_size;
- 	const char *entry_pname, *transact, *binpkg_pkgver;
--	char *pkgname, *buf;
-+	char *pkgname, *buf = NULL;
- 	int ar_rv, rv, error, entry_type, flags;
- 	bool preserve, update, file_exists, keep_conf_file;
- 	bool skip_extract, force, xucd_stats;
diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template
index 54af9d76e43..f5da7e85a49 100644
--- a/srcpkgs/xbps/template
+++ b/srcpkgs/xbps/template
@@ -1,7 +1,7 @@
 # Template file for 'xbps'
 pkgname=xbps
-version=0.54
-revision=5
+version=0.55
+revision=1
 bootstrap=yes
 build_style=configure
 short_desc="XBPS package system utilities"
@@ -10,7 +10,7 @@ license="BSD-2-Clause"
 homepage="https://github.com/void-linux/xbps"
 changelog="https://github.com/void-linux/xbps/blob/master/NEWS"
 distfiles="https://github.com/void-linux/xbps/archive/${version}.tar.gz"
-checksum=f7e97a342d9eb3f38274bef3136f91398692f50d84fd23bc7990da2000936a98
+checksum=982620ec3c207a8b935ebb3b50f81ce553e53a5da291be2719609adf0a5f48d2
 
 hostmakedepends="pkg-config"
 checkdepends="kyua"

From 983480d5b364b34cd002ccb94a9c16f9b1c22e2b Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Fri, 21 Jun 2019 16:36:28 +0200
Subject: [PATCH 2/2] xbps-static: update to 0.55.

---
 srcpkgs/xbps-static/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xbps-static/template b/srcpkgs/xbps-static/template
index 12464e99819..66221ffe337 100644
--- a/srcpkgs/xbps-static/template
+++ b/srcpkgs/xbps-static/template
@@ -1,8 +1,8 @@
 # Template file for 'xbps-static'
 # NOTE: keep this package synchronized with "srcpkgs/xbps"
 pkgname=xbps-static
-version=0.54
-revision=5
+version=0.55
+revision=1
 # only musl
 archs="*-musl"
 wrksrc="xbps-${version}"
@@ -16,7 +16,7 @@ license="BSD-2-Clause"
 homepage="https://www.voidlinux.org/xbps"
 changelog="https://github.com/void-linux/xbps/blob/master/NEWS"
 distfiles="https://github.com/void-linux/xbps/archive/${version}.tar.gz"
-checksum=f7e97a342d9eb3f38274bef3136f91398692f50d84fd23bc7990da2000936a98
+checksum=982620ec3c207a8b935ebb3b50f81ce553e53a5da291be2719609adf0a5f48d2
 
 do_configure() {
 	./configure --prefix=/usr --sysconfdir=/etc --enable-static
