commit:     8677a8da5d5ad13c53a7ae484a3d6e5af5ca6690
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed May 21 22:50:33 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 21 22:52:44 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8677a8da

net-misc/trurl: add 0.16.1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/trurl/Manifest                            |  1 +
 .../trurl/files/trurl-0.16.1-completions.patch     | 49 ++++++++++++++++++++++
 net-misc/trurl/files/trurl-0.16.1-free-match.patch | 46 ++++++++++++++++++++
 .../{trurl-9999.ebuild => trurl-0.16.1.ebuild}     |  7 +++-
 net-misc/trurl/trurl-9999.ebuild                   |  2 +-
 5 files changed, 103 insertions(+), 2 deletions(-)

diff --git a/net-misc/trurl/Manifest b/net-misc/trurl/Manifest
index 285f2c40663a..479d72ebea5d 100644
--- a/net-misc/trurl/Manifest
+++ b/net-misc/trurl/Manifest
@@ -1 +1,2 @@
 DIST trurl-0.16-tmp.tar.gz 59327 BLAKE2B 
d349cf57eb4ad048a9d4a15aac0d0f9e6e577f379eb97b21530d2e080d78e1cb333aca7625805e0e6e555f356bad985e0961c43d499d02b9369b505b8c8d2757
 SHA512 
da4f7afd4a0685037549543ece23ad30d8f98ed9613d9050cbb269524ea4242d097bf74f7642c386d664eb2f24aff910f3cae9c8efda0e6a4f6a2a644a8c82f2
+DIST trurl-0.16.1.tar.gz 64088 BLAKE2B 
5e8527af9b0b5a7e4abecf3f55ba286bfbc40d5258c52ef83fe050c681e07e23309b9d82249425745d88f4ae40b5441978a5f58b5762eead1beeb5374333f5cb
 SHA512 
75e3fc342abd53f386627475a3a8228eed84fe687ef25025b61cc8bbffe5c553725b2be3798fc4188e681ac45e5e4ce44fa4152adfbdedf407a4f4aab6c899a5

diff --git a/net-misc/trurl/files/trurl-0.16.1-completions.patch 
b/net-misc/trurl/files/trurl-0.16.1-completions.patch
new file mode 100644
index 000000000000..5c861f1afe11
--- /dev/null
+++ b/net-misc/trurl/files/trurl-0.16.1-completions.patch
@@ -0,0 +1,49 @@
+https://github.com/curl/trurl/commit/bbb62f7f05af1365c7f12645fcc77b6ac7538439
+https://github.com/curl/trurl/commit/0ce73c17cb865db0df424d410ea6a7b808e89067
+
+From bbb62f7f05af1365c7f12645fcc77b6ac7538439 Mon Sep 17 00:00:00 2001
+From: Caleb Maclennan <ca...@alerque.com>
+Date: Mon, 12 May 2025 12:29:03 +0300
+Subject: [PATCH] Makefile: fix completions check to expect correct generated
+ file
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8192781f..ca603465 100644
+--- a/Makefile
++++ b/Makefile
+@@ -39,7 +39,7 @@ PREFIX ?= /usr/local
+ BINDIR ?= $(PREFIX)/bin
+ MANDIR ?= $(PREFIX)/share/man/man1
+ ZSH_COMPLETIONSDIR ?= $(PREFIX)/share/zsh/site-functions
+-COMPLETION_FILES=scripts/_trurl.zsh
++COMPLETION_FILES=completions/_trurl.zsh
+ 
+ INSTALL ?= install
+ PYTHON3 ?= python3
+
+From 0ce73c17cb865db0df424d410ea6a7b808e89067 Mon Sep 17 00:00:00 2001
+From: Caleb Maclennan <ca...@alerque.com>
+Date: Mon, 12 May 2025 12:35:10 +0300
+Subject: [PATCH] Makefile: fix install completions to correct distdir path
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index ca603465..6fc8d3eb 100644
+--- a/Makefile
++++ b/Makefile
+@@ -64,7 +64,7 @@ install:
+       fi)
+       (if test -f $(COMPLETION_FILES); then \
+       $(INSTALL) -d $(DESTDIR)$(ZSH_COMPLETIONSDIR); \
+-      $(INSTALL) -m 0755 $(COMPLETION_FILES) $(ZSH_COMPLETIONSDIR)/_trurl; \
++      $(INSTALL) -m 0755 $(COMPLETION_FILES) 
$(DESTDIR)$(ZSH_COMPLETIONSDIR)/_trurl; \
+       fi)
+ 
+ .PHONY: clean

diff --git a/net-misc/trurl/files/trurl-0.16.1-free-match.patch 
b/net-misc/trurl/files/trurl-0.16.1-free-match.patch
new file mode 100644
index 000000000000..b9cffde141b8
--- /dev/null
+++ b/net-misc/trurl/files/trurl-0.16.1-free-match.patch
@@ -0,0 +1,46 @@
+https://github.com/curl/trurl/commit/a4d8ba2aaa237e3db90d350b97209838ee240aa5
+
+From a4d8ba2aaa237e3db90d350b97209838ee240aa5 Mon Sep 17 00:00:00 2001
+From: Dan Fandrich <d...@coneharvesters.com>
+Date: Wed, 14 May 2025 20:24:01 -0700
+Subject: [PATCH] trurl: use curl_free() on a pointer coming from
+ curl_maprintf()
+
+One instance of a pointer coming from curl_maprintf() was freed with a
+normal free() which breaks and causes ASAN/valgrind to complain when
+using a debug-enabled libcurl. Since the function could return a normal
+heap-allocated pointer or a curl-allocated one, copy the string and
+curl_free() the original.
+
+Closes #393
+---
+ trurl.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/trurl.c b/trurl.c
+index b5a716ca..f79b1791 100644
+--- a/trurl.c
++++ b/trurl.c
+@@ -1381,6 +1381,7 @@ static struct string *memdupzero(char *source, size_t 
len, bool *modified)
+       int rlen;
+       int leftside;
+       int rightside;
++      char *temp;
+ 
+       /* decode both sides */
+       leftside = (int)(sep - source);
+@@ -1420,7 +1421,12 @@ static struct string *memdupzero(char *source, size_t 
len, bool *modified)
+           goto error;
+       }
+ 
+-      encode = curl_maprintf("%s=%s", el ? el : "", er ? er : "");
++      temp = curl_maprintf("%s=%s", el ? el : "", er ? er : "");
++      if(!temp)
++        goto error;
++      /* pointers from curl_maprintf() must be curl_free()d so make a copy */
++      encode = strdup(temp);
++      curl_free(temp);
+       if(!encode)
+         goto error;
+     }
+

diff --git a/net-misc/trurl/trurl-9999.ebuild 
b/net-misc/trurl/trurl-0.16.1.ebuild
similarity index 88%
copy from net-misc/trurl/trurl-9999.ebuild
copy to net-misc/trurl/trurl-0.16.1.ebuild
index 001952499158..be023511155f 100644
--- a/net-misc/trurl/trurl-9999.ebuild
+++ b/net-misc/trurl/trurl-0.16.1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_COMPAT=( python3_{11..14} )
 inherit toolchain-funcs python-any-r1
 
 DESCRIPTION="Command line tool for URL parsing and manipulation"
@@ -27,6 +27,11 @@ DEPEND=">=net-misc/curl-7.81.0"
 RDEPEND="${DEPEND}"
 BDEPEND="test? ( ${PYTHON_DEPS} )"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-completions.patch
+       "${FILESDIR}"/${P}-free-match.patch
+)
+
 pkg_setup() {
        use test && python-any-r1_pkg_setup
 }

diff --git a/net-misc/trurl/trurl-9999.ebuild b/net-misc/trurl/trurl-9999.ebuild
index 001952499158..33790544ebfe 100644
--- a/net-misc/trurl/trurl-9999.ebuild
+++ b/net-misc/trurl/trurl-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_COMPAT=( python3_{11..14} )
 inherit toolchain-funcs python-any-r1
 
 DESCRIPTION="Command line tool for URL parsing and manipulation"

Reply via email to