Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 6ad47a464f | |||
| dcfefa4ddf | |||
| 9556561989 | |||
| e8689a8872 |
3
trurl-0.16.1.tar.gz
Normal file
3
trurl-0.16.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:aac947d4fb421a58abc19a3771e87942cd4721b8f855c433478c94c11a8203ba
|
||||
size 64088
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2c26e3016f591f06234838bbe1dd4b165dce2c871c82ca6a32222d19696588d6
|
||||
size 59327
|
||||
218
trurl-395-exculdes-uppercase.patch
Normal file
218
trurl-395-exculdes-uppercase.patch
Normal file
@@ -0,0 +1,218 @@
|
||||
From cf31169316dad2357c1314f444b9eeffa99431eb Mon Sep 17 00:00:00 2001
|
||||
From: Jacob Mealey <jacobmealey.maine@gmail.com>
|
||||
Date: Sat, 5 Jul 2025 14:52:10 -0400
|
||||
Subject: [PATCH] introduce 'excludes' option for tests, address hexadecimal
|
||||
changes from libcurl
|
||||
|
||||
Thanks @charles2910 for reporting this bug
|
||||
fixes: #394
|
||||
---
|
||||
test.py | 7 ++-
|
||||
tests.json | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
trurl.c | 2 +
|
||||
3 files changed, 132 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test.py b/test.py
|
||||
index f1c489c5..a7855656 100644
|
||||
--- a/test.py
|
||||
+++ b/test.py
|
||||
@@ -250,11 +250,16 @@ def main(argc, argv):
|
||||
print(f"Missing feature, skipping test {testIndex + 1}.")
|
||||
numTestsSkipped += 1
|
||||
continue
|
||||
+ excludes = allTests[testIndex].get("excludes", None)
|
||||
+ if excludes and set(excludes).issubset(set(features)):
|
||||
+ print(f"Test not compatible, skipping test {testIndex + 1}")
|
||||
+ numTestsSkipped += 1
|
||||
+ continue
|
||||
encoding = allTests[testIndex].get("encoding", None)
|
||||
if encoding and encoding != getcharmap():
|
||||
print(f"Invalid locale, skipping test {testIndex + 1}.")
|
||||
numTestsSkipped += 1
|
||||
- continue;
|
||||
+ continue
|
||||
|
||||
test = TestCase(testIndex + 1, runnerCmd, baseCmd, **allTests[testIndex])
|
||||
|
||||
diff --git a/tests.json b/tests.json
|
||||
index 891271ca..10b995ae 100644
|
||||
--- a/tests.json
|
||||
+++ b/tests.json
|
||||
@@ -702,6 +702,7 @@
|
||||
"user=:hej:"
|
||||
]
|
||||
},
|
||||
+ "excludes": ["uppercase-hex"],
|
||||
"expected": {
|
||||
"stdout": "https://%3ahej%3a@curl.se/hello\n",
|
||||
"stderr": "",
|
||||
@@ -2030,6 +2031,7 @@
|
||||
"localhost"
|
||||
]
|
||||
},
|
||||
+ "excludes": ["uppercase-hex"],
|
||||
"expected": {
|
||||
"stdout": "/\\\\\n/%5c%5c\n",
|
||||
"returncode": 0,
|
||||
@@ -2045,6 +2047,7 @@
|
||||
"localhost"
|
||||
]
|
||||
},
|
||||
+ "excludes": ["uppercase-hex"],
|
||||
"expected": {
|
||||
"stdout": [
|
||||
{
|
||||
@@ -2071,6 +2074,7 @@
|
||||
"localhost"
|
||||
]
|
||||
},
|
||||
+ "excludes": ["uppercase-hex"],
|
||||
"expected": {
|
||||
"stdout": "/%5c%5c\n/%5c%5c\n",
|
||||
"returncode": 0,
|
||||
@@ -2089,6 +2093,7 @@
|
||||
"localhost"
|
||||
]
|
||||
},
|
||||
+ "excludes": ["uppercase-hex"],
|
||||
"expected": {
|
||||
"stdout": [
|
||||
{
|
||||
@@ -3318,5 +3323,124 @@
|
||||
"stdout": "http://e/?e&a\n",
|
||||
"returncode": 0
|
||||
}
|
||||
+ },
|
||||
+ {
|
||||
+ "input": {
|
||||
+ "arguments": [
|
||||
+ "-s",
|
||||
+ "path=\\\\",
|
||||
+ "--json",
|
||||
+ "localhost"
|
||||
+ ]
|
||||
+ },
|
||||
+ "required": ["uppercase-hex"],
|
||||
+ "expected": {
|
||||
+ "stdout": [
|
||||
+ {
|
||||
+ "url": "http://localhost/%5C%5C",
|
||||
+ "parts": {
|
||||
+ "scheme": "http",
|
||||
+ "host": "localhost",
|
||||
+ "path": "/\\\\"
|
||||
+ }
|
||||
+ }
|
||||
+ ],
|
||||
+ "returncode": 0,
|
||||
+ "stderr": ""
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ "input": {
|
||||
+ "arguments": [
|
||||
+ "-s",
|
||||
+ "path=\\\\",
|
||||
+ "-g",
|
||||
+ "{path}\\n{:path}",
|
||||
+ "--urlencode",
|
||||
+ "localhost"
|
||||
+ ]
|
||||
+ },
|
||||
+ "required": ["uppercase-hex"],
|
||||
+ "expected": {
|
||||
+ "stdout": "/%5C%5C\n/%5C%5C\n",
|
||||
+ "returncode": 0,
|
||||
+ "stderr": ""
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ "input": {
|
||||
+ "arguments": [
|
||||
+ "-s",
|
||||
+ "path=abc\\\\",
|
||||
+ "-s",
|
||||
+ "query:=a&b&a%26b",
|
||||
+ "--urlencode",
|
||||
+ "--json",
|
||||
+ "localhost"
|
||||
+ ]
|
||||
+ },
|
||||
+ "required": ["uppercase-hex"],
|
||||
+ "expected": {
|
||||
+ "stdout": [
|
||||
+ {
|
||||
+ "url": "http://localhost/abc%5C%5C?a&b&a%26b",
|
||||
+ "parts": {
|
||||
+ "scheme": "http",
|
||||
+ "host": "localhost",
|
||||
+ "path": "/abc%5C%5C",
|
||||
+ "query": "a&b&a%26b"
|
||||
+ },
|
||||
+ "params": [
|
||||
+ {
|
||||
+ "key": "a",
|
||||
+ "value": ""
|
||||
+ },
|
||||
+ {
|
||||
+ "key": "b",
|
||||
+ "value": ""
|
||||
+ },
|
||||
+ {
|
||||
+ "key": "a&b",
|
||||
+ "value": ""
|
||||
+ }
|
||||
+ ]
|
||||
+ }
|
||||
+ ],
|
||||
+ "returncode": 0,
|
||||
+ "stderr": ""
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ "input": {
|
||||
+ "arguments": [
|
||||
+ "--url",
|
||||
+ "https://curl.se/hello",
|
||||
+ "--set",
|
||||
+ "user=:hej:"
|
||||
+ ]
|
||||
+ },
|
||||
+ "required": ["uppercase-hex"],
|
||||
+ "expected": {
|
||||
+ "stdout": "https://%3Ahej%3A@curl.se/hello\n",
|
||||
+ "stderr": "",
|
||||
+ "returncode": 0
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ "input": {
|
||||
+ "arguments": [
|
||||
+ "-s",
|
||||
+ "path=\\\\",
|
||||
+ "-g",
|
||||
+ "{path}\\n{:path}",
|
||||
+ "localhost"
|
||||
+ ]
|
||||
+ },
|
||||
+ "required": ["uppercase-hex"],
|
||||
+ "expected": {
|
||||
+ "stdout": "/\\\\\n/%5C%5C\n",
|
||||
+ "returncode": 0,
|
||||
+ "stderr": ""
|
||||
+ }
|
||||
}
|
||||
]
|
||||
diff --git a/trurl.c b/trurl.c
|
||||
index f79b1791..5a3311d9 100644
|
||||
--- a/trurl.c
|
||||
+++ b/trurl.c
|
||||
@@ -316,6 +316,8 @@ static void show_version(void)
|
||||
#ifdef SUPPORTS_ZONEID
|
||||
fprintf(stdout, " zone-id");
|
||||
#endif
|
||||
+ if(data->version_num >= 0x080f00)
|
||||
+ fprintf(stdout, " uppercase-hex");
|
||||
|
||||
fprintf(stdout, "\n");
|
||||
exit(0);
|
||||
@@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 19 14:27:03 UTC 2025 - Christoph G <foss@grueninger.de>
|
||||
|
||||
- Add trurl-395-exculdes-uppercase.patch to fix failing test,
|
||||
upstream from https://github.com/curl/trurl/pull/395
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun May 18 08:13:12 UTC 2025 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 0.16.1
|
||||
* Generate ZSH completions base on trurl.md.
|
||||
* Makefile: only create MANDIR when manpage is installed.
|
||||
* trurl: handle zero length query pairs.
|
||||
- Create subpackage for zsh-completion
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 19 14:56:57 UTC 2024 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
|
||||
26
trurl.spec
26
trurl.spec
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# spec file for package trurl
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2023-2024, Martin Hauke <mardnh@gmx.de>
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2023-2025, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
Name: trurl
|
||||
Version: 0.16
|
||||
Version: 0.16.1
|
||||
Release: 0
|
||||
Summary: Command line tool for URL parsing and manipulation
|
||||
License: MIT
|
||||
@@ -26,6 +26,8 @@ Group: Productivity/Networking/Web/Utilities
|
||||
#Git-Clone: https://github.com/curl/trurl.git
|
||||
URL: https://curl.se/trurl
|
||||
Source: https://github.com/curl/trurl/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM exclude tests with uppercase
|
||||
Patch0: trurl-395-exculdes-uppercase.patch
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python3
|
||||
BuildRequires: pkgconfig(libcurl) >= 7.62.0
|
||||
@@ -34,14 +36,26 @@ BuildRequires: pkgconfig(libcurl) >= 7.62.0
|
||||
A CLI tool that parses and manipulates URLs, designed to help
|
||||
shell script authors everywhere.
|
||||
|
||||
%package zsh-completion
|
||||
Summary: Zsh Completion for %{name}
|
||||
Group: System/Shells
|
||||
Supplements: (%{name} and zsh)
|
||||
Requires: zsh
|
||||
BuildArch: noarch
|
||||
|
||||
%description zsh-completion
|
||||
Zsh command-line completion support for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
%make_build PREFIX=%{_prefix}
|
||||
make completions
|
||||
|
||||
%install
|
||||
make PREFIX=%{_prefix} DESTDIR=%{buildroot} install
|
||||
install -Dm 0644 completions/_trurl.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
|
||||
|
||||
%check
|
||||
make test
|
||||
@@ -52,4 +66,8 @@ make test
|
||||
%{_bindir}/trurl
|
||||
%{_mandir}/man1/trurl.1%{?ext_man}
|
||||
|
||||
%files zsh-completion
|
||||
%dir %{_datadir}/zsh
|
||||
%{_datadir}/zsh/*
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user