From 3c98dfdf2bb4b1ff46869531ce1405354aef131b5daed5b1a21a601cbb4c31c0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 25 Apr 2023 22:15:35 +0000 Subject: [PATCH] - Enable running the regression tests OBS-URL: https://build.opensuse.org/package/show/network:telephony/libsrtp2?expand=0&rev=19 --- libsrtp2-test-verbose.patch | 63 +++++++++++++++++++++++++++++++++++++ libsrtp2.changes | 7 +++++ libsrtp2.spec | 25 ++++++++++----- 3 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 libsrtp2-test-verbose.patch diff --git a/libsrtp2-test-verbose.patch b/libsrtp2-test-verbose.patch new file mode 100644 index 0000000..32b9054 --- /dev/null +++ b/libsrtp2-test-verbose.patch @@ -0,0 +1,63 @@ +Description: Avoid runtest silencing its output +Author: Victor Seva +Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;bug=460534 +Bug-Debian: http://bugs.debian.org/460534 +Last-Update: 2016-03-15 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/Makefile.in ++++ b/Makefile.in +@@ -44,24 +44,24 @@ + + runtest: test + @echo "running libsrtp2 test applications..." +- $(FIND_LIBRARIES) crypto/test/cipher_driver$(EXE) -v >/dev/null +- $(FIND_LIBRARIES) crypto/test/kernel_driver$(EXE) -v >/dev/null +- $(FIND_LIBRARIES) test/test_srtp$(EXE) >/dev/null +- $(FIND_LIBRARIES) test/rdbx_driver$(EXE) -v >/dev/null +- $(FIND_LIBRARIES) test/srtp_driver$(EXE) -v >/dev/null +- $(FIND_LIBRARIES) test/roc_driver$(EXE) -v >/dev/null +- $(FIND_LIBRARIES) test/replay_driver$(EXE) -v >/dev/null +- cd test; $(CRYPTO_LIBDIR_FORWARD) $(abspath $(srcdir))/test/rtpw_test.sh -w $(abspath $(srcdir))/test/words.txt >/dev/null ++ $(FIND_LIBRARIES) crypto/test/cipher_driver$(EXE) -v ++ $(FIND_LIBRARIES) crypto/test/kernel_driver$(EXE) -v ++ $(FIND_LIBRARIES) test/test_srtp$(EXE) ++ $(FIND_LIBRARIES) test/rdbx_driver$(EXE) -v ++ $(FIND_LIBRARIES) test/srtp_driver$(EXE) -v ++ $(FIND_LIBRARIES) test/roc_driver$(EXE) -v ++ $(FIND_LIBRARIES) test/replay_driver$(EXE) -v ++ cd test; $(CRYPTO_LIBDIR_FORWARD) $(abspath $(srcdir))/test/rtpw_test.sh -w $(abspath $(srcdir))/test/words.txt + ifeq (1, $(USE_EXTERNAL_CRYPTO)) +- cd test; $(CRYPTO_LIBDIR_FORWARD) $(abspath $(srcdir))/test/rtpw_test_gcm.sh -w $(abspath $(srcdir))/test/words.txt >/dev/null ++ cd test; $(CRYPTO_LIBDIR_FORWARD) $(abspath $(srcdir))/test/rtpw_test_gcm.sh -w $(abspath $(srcdir))/test/words.txt + endif + @echo "libsrtp2 test applications passed." + $(MAKE) -C crypto runtest + + runtest-valgrind: test + @echo "running libsrtp2 test applications... (valgrind)" +- valgrind --error-exitcode=1 --leak-check=full test/test_srtp$(EXE) -v >/dev/null +- valgrind --error-exitcode=1 --leak-check=full test/srtp_driver$(EXE) -v >/dev/null ++ valgrind --error-exitcode=1 --leak-check=full test/test_srtp$(EXE) -v ++ valgrind --error-exitcode=1 --leak-check=full test/srtp_driver$(EXE) -v + @echo "libsrtp2 test applications passed. (valgrind)" + + # makefile variables +--- a/crypto/Makefile.in ++++ b/crypto/Makefile.in +@@ -86,11 +86,11 @@ + ifneq (1, $(USE_EXTERNAL_CRYPTO)) + $(FIND_LIBRARIES) test `test/aes_calc $(k128) $(p128)` = $(c128) + $(FIND_LIBRARIES) test `test/aes_calc $(k256) $(p256)` = $(c256) +- $(FIND_LIBRARIES) test/sha1_driver$(EXE) -v >/dev/null ++ $(FIND_LIBRARIES) test/sha1_driver$(EXE) -v + endif +- $(FIND_LIBRARIES) test/cipher_driver$(EXE) -v >/dev/null +- $(FIND_LIBRARIES) test/datatypes_driver$(EXE) -v >/dev/null +- $(FIND_LIBRARIES) test/kernel_driver$(EXE) -v >/dev/null ++ $(FIND_LIBRARIES) test/cipher_driver$(EXE) -v ++ $(FIND_LIBRARIES) test/datatypes_driver$(EXE) -v ++ $(FIND_LIBRARIES) test/kernel_driver$(EXE) -v + @echo "crypto test applications passed." + + diff --git a/libsrtp2.changes b/libsrtp2.changes index f6346d3..f39e7bd 100644 --- a/libsrtp2.changes +++ b/libsrtp2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Apr 25 12:33:30 UTC 2023 - Pedro Monreal + +- Enable running the regression tests: + * Add libsrtp2-test-verbose.patch from the debian folks: + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=460534 + ------------------------------------------------------------------- Wed Feb 1 11:25:03 UTC 2023 - Jan Engelhardt diff --git a/libsrtp2.spec b/libsrtp2.spec index 9b3fa61..a2b542e 100644 --- a/libsrtp2.spec +++ b/libsrtp2.spec @@ -27,20 +27,25 @@ URL: https://github.com/cisco/libsrtp Source: https://github.com/cisco/libsrtp/archive/v%version.tar.gz Source99: baselibs.conf +Patch1: libsrtp2-test-verbose.patch +BuildRequires: libpcap-devel BuildRequires: pkg-config -BuildRequires: pkgconfig(openssl) >= 1.0.1 +BuildRequires: procps +BuildRequires: pkgconfig(openssl) >= 1.1.0 %description -libsrtp is an implementation of the Secure Real-time Transport -Protocol (SRTP) originally authored by Cisco Systems, Inc. +libsrtp is Cisco's implementation of the Secure Real-time Transport +Protocol (SRTP), the Universal Security Transform (UST), +and a +supporting cryptographic kernel. %package -n %lname Summary: Secure Real-Time Transport Protocol (SRTP) library v2 Group: System/Libraries %description -n %lname -libsrtp is an implementation of the Secure Real-time Transport -Protocol (SRTP) originally authored by Cisco Systems, Inc. +libsrtp is Cisco's implementation of the Secure Real-time Transport +Protocol (SRTP), the Universal Security Transform (UST), +and a +supporting cryptographic kernel. SRTP is a security profile for RTP that adds confidentiality, message authentication, and replay protection to that protocol. It is @@ -53,13 +58,14 @@ Group: Development/Libraries/C and C++ Requires: %lname = %version %description devel -libsrtp is an implementation of the Secure Real-time Transport -Protocol (SRTP) originally authored by Cisco Systems, Inc. +libsrtp is Cisco's implementation of the Secure Real-time Transport +Protocol (SRTP), the Universal Security Transform (UST), +and a +supporting cryptographic kernel. This subpackage contains the development headers. %prep -%autosetup -p0 -n libsrtp-%version +%autosetup -p1 -n libsrtp-%version %build %configure --enable-openssl @@ -68,6 +74,9 @@ This subpackage contains the development headers. %install %make_install +%check +%make_build test + %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig