repo/proj/guru:dev commit in: dev-util/tinyxxd/, dev-util/tinyxxd/files/

"Saad Abdullah" <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786995324.f2b2d80839b8ee919948b2c0f3b583326dc877aa.ingenarelitems@gentoo>
commit:     f2b2d80839b8ee919948b2c0f3b583326dc877aa
Author:     ingenarel (NeoJesus) <ingenarel_neojesus <AT> disroot <DOT> org>
AuthorDate: Mon Aug 17 19:19:28 2026 +0000
Commit:     Saad Abdullah <ingenarelitems <AT> gmail <DOT> com>
CommitDate: Mon Aug 17 19:35:24 2026 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f2b2d808

dev-util/tinyxxd: update 9999

Closes: https://codeberg.org/gentoo/guru/pulls/4
Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus <AT> disroot.org>

 ....patch => tinyxxd-123a24e1-default-fixes.patch} | 62 +++++++++++++++++-----
 ...inyxxd-123a24e1-until-gentoo-codeberg-435.patch | 36 +++++++++++++
 dev-util/tinyxxd/tinyxxd-9999.ebuild               |  5 +-
 3 files changed, 88 insertions(+), 15 deletions(-)

diff --git a/dev-util/tinyxxd/files/tinyxxd-1.3.11-fixes.patch b/dev-util/tinyxxd/files/tinyxxd-123a24e1-default-fixes.patch
similarity index 54%
rename from dev-util/tinyxxd/files/tinyxxd-1.3.11-fixes.patch
rename to dev-util/tinyxxd/files/tinyxxd-123a24e1-default-fixes.patch
index db9d0cfc2c..72bedd3b7b 100644
--- a/dev-util/tinyxxd/files/tinyxxd-1.3.11-fixes.patch
+++ b/dev-util/tinyxxd/files/tinyxxd-123a24e1-default-fixes.patch
@@ -1,5 +1,11 @@
+commit aae6ac70939bf828c13ae0ce48ce8c4dc688252f
+Author: ingenarel (NeoJesus) <[email protected]>
+Date:   Tue Aug 18 00:58:38 2026 +0600
+
+    DEFAULT-PATCHES
+
 diff --git a/Makefile b/Makefile
-index 65b372c..e8f6903 100644
+index 3c16848..22db6ac 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -1,17 +1,6 @@
@@ -13,7 +19,7 @@ index 65b372c..e8f6903 100644
 -ifeq ($(UNAME_S),Darwin)
 -	CFLAGS += -fstack-protector-strong -D_GNU_SOURCE
 -else ifeq ($(OS),Windows_NT)
--	CFLAGS += -D_WIN32
+-	CFLAGS += -D_WIN32 -s
 -else
 -	CFLAGS += -fstack-protector-strong -D_GNU_SOURCE -fno-plt -Wl,-z,now -D_FORTIFY_SOURCE=3
 -endif
@@ -40,15 +46,7 @@ index 65b372c..e8f6903 100644
  	@echo 'Preparing tests...'
  	@echo -n 'This is a test file' > sample.bin
  	@printf '\x00\x09\x0a\x0d\x20\x41\x7e\x7f\x80\xff' > colorbytes.bin
-@@ -77,15 +63,14 @@ test: xxd tinyxxd_asan
- 	@$(MAKE) run_test CMD='-o 0x100 sample.bin' DESC='Display offset +0x100'
- 	@$(MAKE) run_test CMD='-i -C sample.bin' DESC='C include capitalized'
- 	@$(MAKE) run_test CMD='-i -n myvar sample.bin' DESC='C include custom name'
--	@$(MAKE) run_test CMD='-i -b sample.bin' DESC='C include binary format'
--	@$(MAKE) verify_conversion_test
-+	@$(MAKE) run_test CMD='-i -b sample.bin' DESC='C include binary format' @$(MAKE) verify_conversion_test
- 	@rm -f -- *.hex sample.bin colorbytes.bin ebcdicbytes.bin tinyxxd_output.txt xxd_output.txt
- 	@echo 'All tests complete.'
+@@ -92,8 +78,8 @@ test: xxd tinyxxd_asan
  
  run_test:
  	@echo "Running test: $(DESC)"
@@ -59,7 +57,7 @@ index 65b372c..e8f6903 100644
  	@if diff -q tinyxxd_output.txt xxd_output.txt > /dev/null; then \
  		echo 'Test passed'; \
  	else \
-@@ -95,8 +80,8 @@ run_test:
+@@ -103,8 +89,8 @@ run_test:
  
  verify_conversion_test:
  	@echo "Running conversion and verification test..."
@@ -70,9 +68,45 @@ index 65b372c..e8f6903 100644
  	@if diff -q sample.bin sample_restored.bin > /dev/null; then \
  		echo -e "\033[0;32mConversion and verification test passed\033[0m"; \
  	else \
-@@ -128,12 +113,6 @@ fuzz: tinyxxd_fuzz
+@@ -116,7 +102,7 @@ verify_conversion_test:
+ test_revert_crlf:
+ 	@echo "Running test: Revert hex dump with CRLF line endings"
+ 	@printf "00000000: 3132 3334\r\n00000004: 3536 3738\r\n" > repro_crlf.hex
+-	@./tinyxxd_asan -r repro_crlf.hex > repro_crlf.bin
++	@./tinyxxd -r repro_crlf.hex > repro_crlf.bin
+ 	@printf "12345678" > expected_crlf.bin
+ 	@if diff -q repro_crlf.bin expected_crlf.bin > /dev/null; then \
+ 		echo 'Test passed'; \
+@@ -129,7 +115,7 @@ test_revert_crlf:
+ test_le_padding:
+ 	@echo "Running test: Little-endian hex dump with padding"
+ 	@printf "ABCDEFG" > 7.bin
+-	@./tinyxxd_asan -e -c 8 7.bin > le_padding_output.txt
++	@./tinyxxd -e -c 8 7.bin > le_padding_output.txt
+ 	@printf "00000000: 44434241   474645  ABCDEFG\n" > le_padding_expected.txt
+ 	@if diff -q le_padding_output.txt le_padding_expected.txt > /dev/null; then \
+ 		echo 'Test passed'; \
+@@ -142,7 +128,7 @@ test_le_padding:
+ 
+ test_help_stdout:
+ 	@echo "Running test: -h outputs to stdout"
+-	@if ./tinyxxd_asan -h 2>/dev/null | grep -q 'Usage'; then \
++	@if ./tinyxxd -h 2>/dev/null | grep -q 'Usage'; then \
+ 		echo 'Test passed'; \
+ 	else \
+ 		echo 'Test failed: -h should write to stdout'; \
+@@ -151,7 +137,7 @@ test_help_stdout:
+ 
+ test_error_stderr:
+ 	@echo "Running test: bad option outputs to stderr"
+-	@if ./tinyxxd_asan -Z 2>&1 >/dev/null | grep -q 'Usage'; then \
++	@if ./tinyxxd -Z 2>&1 >/dev/null | grep -q 'Usage'; then \
+ 		echo 'Test passed'; \
+ 	else \
+ 		echo 'Test failed: bad option should write to stderr'; \
+@@ -181,12 +167,6 @@ fuzz: tinyxxd_fuzz
  	@dd if=/dev/urandom of=input_dir/sample.bin count=1 bs=128
- 	afl-fuzz -i input_dir -o fuzz_output -- ./tinyxxd_fuzz @@
+ 	AFL_SKIP_CPUFREQ=1 AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 afl-fuzz -i input_dir -o fuzz_output -- ./tinyxxd_fuzz @@
  
 -testfiles/xxd.c:
 -	cd testfiles && curl -sOL "https://raw.githubusercontent.com/vim/vim/master/src/xxd/xxd.c"

diff --git a/dev-util/tinyxxd/files/tinyxxd-123a24e1-until-gentoo-codeberg-435.patch b/dev-util/tinyxxd/files/tinyxxd-123a24e1-until-gentoo-codeberg-435.patch
new file mode 100644
index 0000000000..b09ac38866
--- /dev/null
+++ b/dev-util/tinyxxd/files/tinyxxd-123a24e1-until-gentoo-codeberg-435.patch
@@ -0,0 +1,36 @@
+commit 2fb0c29bb8ff9c8972f34b889c6b52465b8f530f
+Author: ingenarel (NeoJesus) <[email protected]>
+Date:   Tue Aug 18 01:07:15 2026 +0600
+
+    ::GENTOO XXD PROBLEMS
+
+diff --git a/Makefile b/Makefile
+index 22db6ac..4ff7717 100644
+--- a/Makefile
++++ b/Makefile
+@@ -41,7 +41,6 @@ test:
+ 	@printf '\x00\x05\x0d\x25\x40\x4b\x5a\x81\xc0\xff' > ebcdicbytes.bin
+ 	@echo 'Running tests...'
+ 	@$(MAKE) run_test CMD='-a testfiles/somezeros.bin' DESC='Show nul-lines as single asterisk'
+-	@$(MAKE) run_test CMD='-Ralways -g1 -c256 -d -o 9223372036854775808 testfiles/somezeros.bin' DESC='Test for buffer overflow'
+ 	@$(MAKE) run_test CMD='-s +5 sample.bin' DESC='Seek +5'
+ 	@$(MAKE) run_test CMD='-s -5 sample.bin' DESC='Seek -5'
+ 	@$(MAKE) run_test CMD='-l 7 sample.bin' DESC='Stop after len=7'
+@@ -57,8 +56,6 @@ test:
+ 	@$(MAKE) run_test CMD='-R never colorbytes.bin' DESC='ASCII no-color output'
+ 	@$(MAKE) run_test CMD='-R always -E ebcdicbytes.bin' DESC='EBCDIC color output'
+ 	@$(MAKE) run_test CMD='-R never -E ebcdicbytes.bin' DESC='EBCDIC no-color output'
+-	@$(MAKE) run_test CMD='-b -R always colorbytes.bin' DESC='Binary color output (all color categories)'
+-	@$(MAKE) run_test CMD='-b -R always -E ebcdicbytes.bin' DESC='Binary EBCDIC color output'
+ 	@$(MAKE) run_test CMD='-g 1 sample.bin' DESC='Group bytes in 1s'
+ 	@$(MAKE) run_test CMD='-g 4 sample.bin' DESC='Group bytes in 4s'
+ 	@$(MAKE) run_test CMD='-d sample.bin' DESC='Decimal offset'
+@@ -66,8 +63,6 @@ test:
+ 	@$(MAKE) run_test CMD='-i -C sample.bin' DESC='C include capitalized'
+ 	@$(MAKE) run_test CMD='-i -n myvar sample.bin' DESC='C include custom name'
+ 	@$(MAKE) run_test CMD='-i -b sample.bin' DESC='C include binary format'
+-	@$(MAKE) run_test CMD='-i -t sample.bin' DESC='C include with terminating NUL'
+-	@$(MAKE) run_test CMD='-i -b -t sample.bin' DESC='C include binary with terminating NUL'
+ 	@$(MAKE) verify_conversion_test
+ 	@$(MAKE) test_revert_crlf
+ 	@$(MAKE) test_le_padding

diff --git a/dev-util/tinyxxd/tinyxxd-9999.ebuild b/dev-util/tinyxxd/tinyxxd-9999.ebuild
index cd91965350..8f86fedbca 100644
--- a/dev-util/tinyxxd/tinyxxd-9999.ebuild
+++ b/dev-util/tinyxxd/tinyxxd-9999.ebuild
@@ -31,7 +31,10 @@ RDEPEND="
 	test? ( dev-util/xxd )
 "
 
-PATCHES=( "${FILESDIR}/${PN}-1.3.11-fixes.patch" )
+PATCHES=( "${FILESDIR}/${PN}-123a24e1-default-fixes.patch" )
+
+# until https://codeberg.org/gentoo/gentoo/pulls/435 or something that updates xxd on ::gentoo
+PATCHES+=( "${FILESDIR}/${PN}-123a24e1-until-gentoo-codeberg-435.patch" )
 
 src_compile() {
 	export CFLAGS LDFLAGS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.