[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Fix and improve autopkgtest
Wolfgang Schweer (@schweer-guest)
gitlab at salsa.debian.org
Fri Oct 22 23:29:19 BST 2021
Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-config
Commits:
8c8a0ee1 by Wolfgang Schweer at 2021-10-23T00:27:36+02:00
Fix and improve autopkgtest
debian/tests/control: Add locales to Depends
debian/tests/{improve-desktop-l10n,install-task-pkgs}: Actually generate
the wanted locale for a more useful test, simplify code
debian/tests/configure-edu-gateway: Simplify code
share/debian-edu-config/tools/configure-edu-gateway: Deal with network
interfaces in case of virtual setup to fix related test.
Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>
- - - - -
6 changed files:
- debian/changelog
- debian/tests/configure-edu-gateway
- debian/tests/control
- debian/tests/improve-desktop-l10n
- debian/tests/install-task-pkgs
- share/debian-edu-config/tools/configure-edu-gateway
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+debian-edu-config (2.12.8) UNRELEASED; urgency=medium
+
+ * Fix and improve autopkgtest:
+ - debian/tests/control: Add locales to Depends.
+ - debian/tests/{improve-desktop-l10n,install-task-pkgs}: Actually generate
+ the wanted locale for a more useful test, simplify code.
+ - debian/tests/configure-edu-gateway: Simplify code.
+ - share/debian-edu-config/tools/configure-edu-gateway: Deal with network
+ interfaces in case of virtual setup to fix related test.
+
+ -- Wolfgang Schweer <wschweer at arcor.de> Fri, 22 Oct 2021 23:58:47 +0200
+
debian-edu-config (2.12.7) unstable; urgency=medium
[ Wolfgang Schweer ]
=====================================
debian/tests/configure-edu-gateway
=====================================
@@ -1,29 +1,14 @@
#!/bin/sh
set -e
-chroot_test() {
- echo
- echo "Installing Debian Edu chroot using profile $PROFILE, then running"
- echo "a script to turn this minimal system into a dedicated gateway."
- echo
- cd $AUTOPKGTEST_TMP
- PROFILE=$PROFILE DESKTOP=$DESKTOP /usr/share/debian-edu-config/tools/debian-edu-bless && \
- /usr/share/debian-edu-config/tools/configure-edu-gateway --firewall yes 2>&1
-}
-
export LC_ALL=C
export PROFILE=Minimal
export DESKTOP=none
-# Undo the effect of libpam-tmpdir in case it is active, and use the
-# test specific temp directory.
-export TMP=$AUTOPKGTEST_TMP
-export TMPDIR=$AUTOPKGTEST_TMP
-export TEMP=$AUTOPKGTEST_TMP
-export TEMPDIR=$AUTOPKGTEST_TMP
-
-echo "info: File system status (/proc/mounts):"
-cat /proc/mounts
echo
-
-chroot_test
+echo "Install Debian Edu chroot using profile $PROFILE, then run a script"
+echo "to turn this minimal system into a dedicated gateway."
+echo
+cd $AUTOPKGTEST_TMP
+PROFILE=$PROFILE DESKTOP=$DESKTOP /usr/share/debian-edu-config/tools/debian-edu-bless
+/usr/share/debian-edu-config/tools/configure-edu-gateway --firewall yes
=====================================
debian/tests/control
=====================================
@@ -1,3 +1,3 @@
Tests: install-task-pkgs, improve-desktop-l10n, configure-edu-gateway
-Depends: debian-edu-install, education-common
+Depends: debian-edu-install, education-common, locales
Restrictions: needs-root allow-stderr
=====================================
debian/tests/improve-desktop-l10n
=====================================
@@ -1,31 +1,12 @@
#!/bin/sh
set -e
-chroot_test() {
- echo
- echo "Installing Debian Edu chroot using profile $PROFILE and desktop $DESKTOP,"
- echo "then running a script to install some packages to improve desktop task"
- echo "related packages for $LANG locale."
- echo
- cd $AUTOPKGTEST_TMP
- PROFILE=$PROFILE DESKTOP=$DESKTOP LANG=$LANG /usr/share/debian-edu-config/tools/debian-edu-bless && \
- /usr/share/debian-edu-config/tools/improve-desktop-l10n 2>&1
-}
-
-export LC_ALL=C
+localedef -f UTF-8 -i fr_FR fr_FR.UTF-8
export PROFILE=Minimal
export DESKTOP=none
export LANG=fr_FR.UTF-8
-
-# Undo the effect of libpam-tmpdir in case it is active, and use the
-# test specific temp directory.
-export TMP=$AUTOPKGTEST_TMP
-export TMPDIR=$AUTOPKGTEST_TMP
-export TEMP=$AUTOPKGTEST_TMP
-export TEMPDIR=$AUTOPKGTEST_TMP
-
-echo "info: File system status (/proc/mounts):"
-cat /proc/mounts
-echo
-
-chroot_test
+echo "Installing Debian Edu system using profile $PROFILE and desktop $DESKTOP,"
+echo "then running a script to install some packages to improve desktop task"
+echo "related packages for $LANG locale."
+PROFILE=$PROFILE DESKTOP=$DESKTOP LANG=$LANG /usr/share/debian-edu-config/tools/debian-edu-bless
+/usr/share/debian-edu-config/tools/improve-desktop-l10n
=====================================
debian/tests/install-task-pkgs
=====================================
@@ -1,30 +1,11 @@
#!/bin/sh
set -e
-chroot_test() {
- echo
- echo "Installing Debian Edu chroot using profile $PROFILE and desktop $DESKTOP, then"
- echo "running a script to install some packages to improve localization for $LANG."
- echo
- cd $AUTOPKGTEST_TMP
- PROFILE=$PROFILE DESKTOP=$DESKTOP LANG=$LANG /usr/share/debian-edu-config/tools/debian-edu-bless && \
- /usr/share/debian-edu-config/tools/install-task-pkgs 2>&1
-}
-
-export LC_ALL=C
+localedef -f UTF-8 -i pt_BR pt_BR.UTF-8
export PROFILE=Minimal
export DESKTOP=none
export LANG=pt_BR.UTF-8
-
-# Undo the effect of libpam-tmpdir in case it is active, and use the
-# test specific temp directory.
-export TMP=$AUTOPKGTEST_TMP
-export TMPDIR=$AUTOPKGTEST_TMP
-export TEMP=$AUTOPKGTEST_TMP
-export TEMPDIR=$AUTOPKGTEST_TMP
-
-echo "info: File system status (/proc/mounts):"
-cat /proc/mounts
-echo
-
-chroot_test
+echo "Installing Debian Edu system using profile $PROFILE and desktop $DESKTOP, then"
+echo "running a script to install some packages to improve localization for $LANG."
+PROFILE=$PROFILE DESKTOP=$DESKTOP LANG=$LANG /usr/share/debian-edu-config/tools/debian-edu-bless
+/usr/share/debian-edu-config/tools/install-task-pkgs
=====================================
share/debian-edu-config/tools/configure-edu-gateway
=====================================
@@ -9,7 +9,7 @@
# Author/Copyright: Wolfgang Schweer <wschweer at arcor.de>
# Licence: GPL2+
# first edited: 2020-04-17
-# last edited: 2021-02-03
+# last edited: 2021-10-22
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -47,8 +47,16 @@ EOF
exit 0
fi
+# Warn if physical or virtual network interfaces are missing
+if ! grep eth0 /etc/network/interfaces ; then
+ rm -f /etc/network/interfaces
+ echo ""
+ echo "WARNING: This machine seems to lack network interfaces! Please check."
+ echo ""
+fi
+
# Prevent to do this more than one time
-if ! grep -Eq 10.0.0.0 /etc/default/enable-nat ; then
+if ! grep -Eq 10.0.0.0 /etc/default/enable-nat && [ -f /etc/network/interfaces ]; then
sed -i 's/auto eth0/auto eth0 eth1/' /etc/network/interfaces
sed -i '/eth1/ s/dhcp/static/' /etc/network/interfaces
sed -i '/post-up/d' /etc/network/interfaces
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/8c8a0ee198e472766bb10c3cab2a0c306f639e12
--
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/8c8a0ee198e472766bb10c3cab2a0c306f639e12
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20211022/b502d826/attachment-0001.htm>
More information about the debian-edu-commits
mailing list