[packages/detox] Up to 3.0.1
arekm
arekm at pld-linux.org
Thu May 21 15:01:58 CEST 2026
commit 2d7b6e49e515d16be3860a12b5751f1a841b6288
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu May 21 15:01:39 2026 +0200
Up to 3.0.1
detox.spec | 35 ++++++++++++++++++++++++-----------
format-security.patch | 32 --------------------------------
test-valgrind-opt-in.patch | 20 ++++++++++++++++++++
3 files changed, 44 insertions(+), 43 deletions(-)
---
diff --git a/detox.spec b/detox.spec
index 4e8ffeb..452ec4d 100644
--- a/detox.spec
+++ b/detox.spec
@@ -1,17 +1,20 @@
#
-# TODO: move samples to docs
+# Conditional build:
+%bcond_without tests # build with tests
#
Summary: Utility designed to clean up filenames
Name: detox
-Version: 1.2.0
-Release: 4
-License: BSD-like
+Version: 3.0.1
+Release: 1
+License: BSD-3-Clause
Group: Applications
-Source0: http://downloads.sourceforge.net/detox/%{name}-%{version}.tar.gz
-# Source0-md5: 04f1bc8501cd40c21610ea3fee7a6fc5
-Patch0: format-security.patch
-URL: http://detox.sourceforge.net/
-#BuildRequires: -
+Source0: https://github.com/dharple/detox/releases/download/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 65cd26a1ed9753ad73be665066be695e
+Patch0: test-valgrind-opt-in.patch
+URL: https://github.com/dharple/detox
+BuildRequires: bison
+BuildRequires: flex
+%{?with_tests:BuildRequires: check-devel}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -25,25 +28,35 @@ equivalents.
%patch -P0 -p1
%build
-%configure
+%configure \
+ %{?with_tests:--with-check}
%{__make}
+%if %{with tests}
+%{__make} check
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
%{__make} -j1 install \
DESTDIR=$RPM_BUILD_ROOT
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc CHANGES README
+%doc BUILD.md CHANGELOG.md README.md THANKS.md
%attr(755,root,root) %{_bindir}/detox
%attr(755,root,root) %{_bindir}/inline-detox
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/detoxrc
%dir %{_datadir}/detox
+%dir %{_datadir}/detox/legacy
%{_datadir}/detox/*.tbl
+%{_datadir}/detox/legacy/*.tbl
%{_mandir}/man1/detox*
+%{_mandir}/man1/inline-detox*
%{_mandir}/man5/detox*
diff --git a/format-security.patch b/format-security.patch
deleted file mode 100644
index 7918c61..0000000
--- a/format-security.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- detox-1.2.0/parse_options_getopt.c~ 2006-07-03 18:45:54.000000000 +0200
-+++ detox-1.2.0/parse_options_getopt.c 2015-09-24 23:02:33.218616787 +0200
-@@ -98,9 +98,9 @@
- #endif
- switch (optcode) {
- case 'h':
-- printf(usage_message);
-+ printf("%s", usage_message);
- printf("\n");
-- printf(help_message);
-+ printf("%s", help_message);
- exit(EXIT_SUCCESS);
-
- case 'f':
-@@ -138,7 +138,7 @@
- exit(EXIT_SUCCESS);
-
- case '?':
-- printf(usage_message);
-+ printf("%s", usage_message);
- exit(EXIT_SUCCESS);
-
- case 0:
-@@ -195,7 +195,7 @@
- }
- else {
- #ifndef INLINE_MODE
-- printf(usage_message);
-+ printf("%s", usage_message);
- exit(EXIT_FAILURE);
- #endif
- }
diff --git a/test-valgrind-opt-in.patch b/test-valgrind-opt-in.patch
new file mode 100644
index 0000000..026528b
--- /dev/null
+++ b/test-valgrind-opt-in.patch
@@ -0,0 +1,20 @@
+Gate the github-issue-0056 valgrind invocation behind USE_VALGRIND, matching
+the rest of tests/legacy. Without it the test always runs under valgrind when
+the binary is on PATH, which fails on build environments that ship valgrind
+but not glibc debuginfo (so the mandatory memcmp redirection cannot be set up).
+
+--- detox-3.0.1/tests/legacy/github-issue-0056/test.sh.orig
++++ detox-3.0.1/tests/legacy/github-issue-0056/test.sh
+@@ -27,7 +27,11 @@
+ WORK=$(realpath $(mktemp -d $BASE/test-custom-XXXXXX))
+ cd "$WORK"
+
+-VALGRIND=$(command -v valgrind || true)
++if [ -n "$USE_VALGRIND" ] ; then
++ VALGRIND=$(command -v valgrind || true)
++else
++ VALGRIND=
++fi
+
+ touch a b c d e f g h i j k
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/detox.git/commitdiff/2d7b6e49e515d16be3860a12b5751f1a841b6288
More information about the pld-cvs-commit
mailing list