Your message dated Wed, 27 Jul 2022 11:20:58 +0000
with message-id <[email protected]>
and subject line Bug#857302: fixed in reprepro 5.4.0-1
has caused the Debian Bug report #857302,
regarding reprepro: Please run test suite on package build time
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
857302: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857302
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: reprepro
Version: 5.1.1-1
Severity: wishlist
Hi,
reprepro contains a tests directory with many tests, but there is no
documentation how to run these test and they are not run on package
build time. tests/test.inc refers to $TESTTOOL, but there is no hint how
to find that tool. Is that a custom script?
Please run the test suite on package build time to show how to run the
tests and to verify the test cases.
While developing the patch for #570623, I added shunit2-based tests.
shunit2 is available as Debian package and can be easily integrated in
the package build. Patches for some smoke tests are attached (in case
you consider using shunit2).
--
Benjamin Drung
System Developer
Debian & Ubuntu Developer
ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin
Email: [email protected]
URL: http://www.profitbricks.com
Sitz der Gesellschaft: Berlin.
Registergericht: Amtsgericht Charlottenburg, HRB 125506B.
Geschäftsführer: Andreas Gauger, Achim Weiss.
>From aa30c40b40a1c05d87c6802f2d3c7055d2e2f4f6 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Mon, 6 Feb 2017 17:49:07 +0100
Subject: [PATCH 2/3] [testsuite] Use the host architecture by default
To be able to build packages for the tests, use the host architecture
(to avoid requiring a cross-compiler).
---
tests/genpackage.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/genpackage.sh b/tests/genpackage.sh
index ee21890..ff18103 100755
--- a/tests/genpackage.sh
+++ b/tests/genpackage.sh
@@ -19,7 +19,7 @@ Maintainer: me <guess@who>
Standards-Version: 0.0
Package: $PACKAGE
-Architecture: abacus
+Architecture: ${ARCH:-$(dpkg-architecture -qDEB_HOST_ARCH)}
Description: bla
blub
--
2.9.3
>From 6123d145779b461865e5ef9b470ee3e8080c1c05 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Mon, 6 Feb 2017 17:47:38 +0100
Subject: [PATCH 1/3] [testsuite] Use dpkg-source format 1.0
To silence dpkg-source, use source format 1.0
---
tests/genpackage.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/genpackage.sh b/tests/genpackage.sh
index ac8ffec..ee21890 100755
--- a/tests/genpackage.sh
+++ b/tests/genpackage.sh
@@ -39,7 +39,7 @@ $PACKAGE ($EPOCH$VERSION$REVISION) $DISTRI; urgency=critical
-- me <guess@who> Mon, 01 Jan 1980 01:02:02 +0000
END
-dpkg-source -b "$DIR"
+dpkg-source --format=1.0 -b "$DIR"
mkdir -p "$DIR"/debian/tmp/DEBIAN
touch "$DIR"/debian/tmp/x
mkdir "$DIR"/debian/tmp/a
--
2.9.3
>From b96309dc8c8d7725e3477afecb75e06aabb4c030 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Mon, 6 Feb 2017 17:44:16 +0100
Subject: [PATCH 3/3] [testsuite] Add basic shunit2 based tests
Signed-off-by: Benjamin Drung <[email protected]>
---
tests/Makefile.am | 10 +++++++-
tests/basic.sh | 51 +++++++++++++++++++++++++++++++++++++++
tests/shunit2-helper-functions.sh | 44 +++++++++++++++++++++++++++++++++
3 files changed, 104 insertions(+), 1 deletion(-)
create mode 100755 tests/basic.sh
create mode 100644 tests/shunit2-helper-functions.sh
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 901b302..78cb38a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -45,5 +45,13 @@ good.key \
revoked.key \
revoked.pkey \
withsubkeys.key \
-withsubkeys-works.key
+withsubkeys-works.key \
+basic.sh \
+shunit2-helper-functions.sh
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
+
+check:
+ ./basic.sh
+
+clean-local:
+ rm -rf testrepo testpkgs
diff --git a/tests/basic.sh b/tests/basic.sh
new file mode 100755
index 0000000..e466f14
--- /dev/null
+++ b/tests/basic.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+set -u
+
+# Copyright (C) 2017, Benjamin Drung <[email protected]>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+. "${0%/*}/shunit2-helper-functions.sh"
+
+setUp() {
+ create_repo
+}
+
+test_empty() {
+ $REPREPRO -b $REPO export
+ call $REPREPRO -b $REPO list buster
+ assertEquals "" "$($REPREPRO -b $REPO list buster)"
+}
+
+test_list() {
+ (cd $PKGS && PACKAGE=hello SECTION=main DISTRI=buster VERSION=1.0 REVISION=-1 ../genpackage.sh)
+ call $REPREPRO -b $REPO -V -C main includedeb buster $PKGS/hello_1.0-1_${ARCH}.deb
+ assertEquals "buster|main|$ARCH: hello 1.0-1" "$($REPREPRO -b $REPO list buster)"
+}
+
+test_ls() {
+ (cd $PKGS && PACKAGE=hello SECTION=main DISTRI=buster EPOCH="1:" VERSION=2.5 REVISION=-3 ../genpackage.sh)
+ call $REPREPRO -b $REPO -V -C main includedeb buster $PKGS/hello_2.5-3_${ARCH}.deb
+ assertEquals "hello | 1:2.5-3 | buster | $ARCH" "$($REPREPRO -b $REPO ls hello)"
+}
+
+test_include_changes() {
+ (cd $PKGS && PACKAGE=sl SECTION=main DISTRI=buster EPOCH="" VERSION=3.03 REVISION=-1 ../genpackage.sh)
+ call $REPREPRO -b $REPO -V -C main include buster $PKGS/test.changes
+ assertEquals "\
+buster|main|amd64: sl 3.03-1
+buster|main|amd64: sl-addons 3.03-1
+buster|main|source: sl 3.03-1" "$($REPREPRO -b $REPO list buster)"
+}
+
+. shunit2
diff --git a/tests/shunit2-helper-functions.sh b/tests/shunit2-helper-functions.sh
new file mode 100644
index 0000000..49319ae
--- /dev/null
+++ b/tests/shunit2-helper-functions.sh
@@ -0,0 +1,44 @@
+# Copyright (C) 2017, Benjamin Drung <[email protected]>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+REPO="${0%/*}/testrepo"
+PKGS="${0%/*}/testpkgs"
+ARCH=${ARCH:-$(dpkg-architecture -qDEB_HOST_ARCH)}
+REPREPRO=$(realpath -m "${0%/*}/.." --relative-base=.)/reprepro
+
+call() {
+ echo "I: Calling $@"
+ "$@" || fail "Command '$@' failed with exit code $?."
+}
+
+create_repo() {
+ rm -rf $REPO
+ mkdir -p $REPO/conf
+ cat > $REPO/conf/distributions <<EOF
+Codename: buster
+Architectures: $ARCH source
+Components: main non-free
+EOF
+ mkdir -p $PKGS
+ $REPREPRO -b $REPO export
+}
+
+# See https://github.com/wting/shunit2/issues/23
+if test -n "${TEST_CASES-}"; then
+ suite() {
+ for testcase in "${TEST_CASES}" ; do
+ suite_addTest $testcase
+ done
+ }
+fi
--
2.9.3
--- End Message ---
--- Begin Message ---
Source: reprepro
Source-Version: 5.4.0-1
Done: Bastian Germann <[email protected]>
We believe that the bug you reported is fixed in the latest version of
reprepro, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Bastian Germann <[email protected]> (supplier of updated reprepro package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Wed, 27 Jul 2022 12:43:10 +0200
Source: reprepro
Architecture: source
Version: 5.4.0-1
Distribution: experimental
Urgency: medium
Maintainer: Bastian Germann <[email protected]>
Changed-By: Bastian Germann <[email protected]>
Closes: 570623 730572 857302
Changes:
reprepro (5.4.0-1) experimental; urgency=medium
.
* Import new upstream version 5.4.0
(Closes: #570623, #857302, #730572, LP: #799889)
* Add ISC license for new test files
* Run shunit2 tests on build time
Checksums-Sha1:
825523930c3bde6fe32f43aa6e3321bfb1a41181 1757 reprepro_5.4.0-1.dsc
982a0b97e1f2d88667e17d2991b1873dc01ade55 458700 reprepro_5.4.0.orig.tar.xz
bf4e09c5d5897a7ae33bf5a922a52a7a2b1810bf 14608 reprepro_5.4.0-1.debian.tar.xz
4ed2d1144f04a4a6c697e32fa158e6e139148f92 10211
reprepro_5.4.0-1_source.buildinfo
Checksums-Sha256:
a9c3ea5c7244063ccf4d243a7fefb166a4d4980960c78cb5f24564556f27b939 1757
reprepro_5.4.0-1.dsc
4e32f728b0053d28f832d1b51d07577f85b364a2bca44bdd573fb9024081da28 458700
reprepro_5.4.0.orig.tar.xz
101d1ed858c717a9632b9cd41d1a1990cd5c736426f64f2e9bc4543d853cfba4 14608
reprepro_5.4.0-1.debian.tar.xz
a71aa2fbc102d6aa7d8184b92c46d2fbe56ec998108fd53bd31d9eca34d1325c 10211
reprepro_5.4.0-1_source.buildinfo
Files:
25eba5c2a04c2cfac5401400f1ed76ba 1757 utils optional reprepro_5.4.0-1.dsc
eba99a3ed4c37477f47c4724608c2f9b 458700 utils optional
reprepro_5.4.0.orig.tar.xz
2e1e377dd10cd4342d052d6527cbec4f 14608 utils optional
reprepro_5.4.0-1.debian.tar.xz
71676cf7c8cbd6d2382e9c5d864248c3 10211 utils optional
reprepro_5.4.0-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQHEBAEBCgAuFiEEQGIgyLhVKAI3jM5BH1x6i0VWQxQFAmLhGRgQHGJhZ2VAZGVi
aWFuLm9yZwAKCRAfXHqLRVZDFCx8DACFvm3YEwNELSZb4Y7ndDEScuNUbKKf/hYQ
RrxYZz+3oWpF/NFmRp/Y9jclYZVzn3LzXvaL6Hp3gb5wIwLKfuoapM6g+m3zeqvE
PwkMHEyB5R4megkqcIdGD3q+HgAEC5HO92xfkukgdf3UYG3WZ9DZ7t98RtkcvN1z
x+uNPiBda3A1akxku/3YhrUJ1YK4buYwa11XkruuYcjJHh6NspLojiDKGpCmJQjL
O3Xoonfo8Uyfwtg3IQvRTFpwDF9c2GNReyf4JS1MxAEoC30P4axMcammNRI7k9Of
hj3V55RgptDbowLYWUXxuX2UfddjzodmoZiYF1pxq+2Hz1anl8Ta5+a51uMxr3Vh
kLLLCZA4uQCQ3msSIUeVAhNr5J6+3BDJ52XRAg4/SpZK6rX9P5OwA4lIEwSwhImW
2jToHuu6EMhdkLwa7E6EXvMQwdRHmZolEalL3bakxBlBohNv560Ff4Feo8Pj1beA
7C/jhcjwXU3tltiTU/w2a6MCYYp/ZFY=
=80ap
-----END PGP SIGNATURE-----
--- End Message ---