summaryrefslogtreecommitdiffstats
path: root/debian/tests/reproducibility
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 04:42:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 04:42:34 +0000
commitc5efd282371d5b199d2d96c13ea3334a42161dfb (patch)
treefb8f55cadae3b93ef210a1be5237a7834362e6d4 /debian/tests/reproducibility
parentAdding upstream version 1.7. (diff)
downloaddh-nss-c5efd282371d5b199d2d96c13ea3334a42161dfb.tar.xz
dh-nss-c5efd282371d5b199d2d96c13ea3334a42161dfb.zip
Adding debian version 1.7.debian/1.7debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/reproducibility')
-rwxr-xr-xdebian/tests/reproducibility49
1 files changed, 49 insertions, 0 deletions
diff --git a/debian/tests/reproducibility b/debian/tests/reproducibility
new file mode 100755
index 0000000..5572054
--- /dev/null
+++ b/debian/tests/reproducibility
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+set -eu
+
+. "$(dirname "$0")/shared-functions.sh"
+
+testname="$(basename "$0")"
+pkgname="libnss-test-$testname"
+
+nss_lines="
+passwd last mynss
+group last mynss
+shadow last mynss
+gshadow last mynss
+"
+
+echo "Enable fr_CH.UTF-8 locale..."
+echo "fr_CH.UTF-8 UTF-8" >> /etc/locale.gen
+locale-gen
+locale -a | grep -q "fr_CH.UTF-8" && echo "OK"
+
+echo "Set up and build test package LC_ALL=C.UTF-8..."
+cd "$AUTOPKGTEST_TMP"
+
+mkdir "$pkgname-c"
+cd "$pkgname-c"
+setup_pkg "$pkgname" "$testname"
+build_pkg "$pkgname" "1" "$nss_lines"
+cd "$AUTOPKGTEST_TMP"
+dpkg-deb -e "${pkgname}_1_all.deb" c
+dpkg-deb -x "${pkgname}_1_all.deb" c
+
+echo "Set up and build test package LC_ALL=fr_CH.UTF-8..."
+cd "$AUTOPKGTEST_TMP"
+
+mkdir "$pkgname-fr"
+cd "$pkgname-fr"
+export LC_ALL="fr_CH.UTF-8"
+export LANGUAGE="fr_CH.UTF-8:fr"
+setup_pkg "$pkgname" "$testname"
+build_pkg "$pkgname" "1" "$nss_lines"
+cd "$AUTOPKGTEST_TMP"
+dpkg-deb -e "${pkgname}_1_all.deb" fr
+dpkg-deb -x "${pkgname}_1_all.deb" fr
+
+echo "Test whether both packages are identical..."
+diff -ur c/ fr/ && echo "OK"
+
+