Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian....@packages.debian.org
Usertags: pu
X-Debbugs-Cc: debian-edu-inst...@packages.debian.org
Control: affects -1 + src:debian-edu-install

Please accept a new Debian Edu upstream release of debian-edu-install as
2.12.10~deb12u1 to Debian bookworm.

[ Reason ]
After release of Debian 12.4 various adjustments have been identified and
updated in debian-edu-install 2.12.10 (see below in [Changes] section).

Also a systemd conversion of the xdebian-edu-firstboot init script has
been included (finalizing the systemd transition of all Debian Edu
parts).

[ Impact ]
Debian Edu 12 release will not be fully perfect (from our current perspective).

[ Tests ]
None, unfurtunately for the D-I part of the changes. The real testing
happens after build of the Debian Edu ISO images by the Debian CD team.

The xdebian-edu-firstboot script was tested on a bookworm and a trixie
Debian Edu system.

[ Risks ]
None for ordinary Debian users, only affects Debian Edu.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]

+debian-edu-install (2.12.10~deb12u1) bookworm; urgency=medium
+
+  * Release to bookworm.
+
+ -- Mike Gabriel <sunwea...@debian.org>  Wed, 31 Jan 2024 16:00:42 +0100
+
+debian-edu-install (2.12.10) unstable; urgency=medium
+
+  [ Wolfgang Schweer ]
+  * Fix security mirror URL generated by apt-setup generator script.
+    Closes: #1058788.
+  * Remove non-free and contrib repository components. Closes: #1058789.
+
+  [ Guido Berhoerster ]
+  * Add systemd service files equivalent to xdebian-edu-firstboot init script.
+  * Adjust debian-edu-testsuite to new UID/GID of first user.
+
+  [ Mike Gabriel ]
+  * d/changelog: typo fix in previous upload stanza.
+
+ -- Holger Levsen <hol...@debian.org>  Mon, 25 Dec 2023 11:07:01 +0100

[ Other info ]
This upload is required for the fine-polishing of Debian Edu 12.
diff -Nru 
debian-edu-install-2.12.9~deb12u1/apt-setup/generators/70debian-edu-install 
debian-edu-install-2.12.10~deb12u1/apt-setup/generators/70debian-edu-install
--- debian-edu-install-2.12.9~deb12u1/apt-setup/generators/70debian-edu-install 
2019-07-03 11:56:36.000000000 +0200
+++ 
debian-edu-install-2.12.10~deb12u1/apt-setup/generators/70debian-edu-install    
    2024-01-31 16:00:03.000000000 +0100
@@ -28,7 +28,7 @@
 # Prevent installer to contact security host as we don't have network
 # connection.  Setting apt-setup/security_host to an empty value will
 # make apt-setup/generators/90security skip the security mirror
-if ! wget -qO - http://security.debian.org/dists/$DISTRIBUTION/updates/Release 
; then
+if ! wget -qO - 
http://security.debian.org/dists/$DISTRIBUTION-security/Release ; then
        log "Disabling security mirror, unable to reach it using http/wget"
        db_fset apt-setup/security_host seen true || true
        db_set apt-setup/security_host "" || true
diff -Nru debian-edu-install-2.12.9~deb12u1/debian/changelog 
debian-edu-install-2.12.10~deb12u1/debian/changelog
--- debian-edu-install-2.12.9~deb12u1/debian/changelog  2023-08-29 
23:10:45.000000000 +0200
+++ debian-edu-install-2.12.10~deb12u1/debian/changelog 2024-01-31 
16:00:42.000000000 +0100
@@ -1,3 +1,25 @@
+debian-edu-install (2.12.10~deb12u1) bookworm; urgency=medium
+
+  * Release to bookworm.
+
+ -- Mike Gabriel <sunwea...@debian.org>  Wed, 31 Jan 2024 16:00:42 +0100
+
+debian-edu-install (2.12.10) unstable; urgency=medium
+
+  [ Wolfgang Schweer ]
+  * Fix security mirror URL generated by apt-setup generator script.
+    Closes: #1058788.
+  * Remove non-free and contrib repository components. Closes: #1058789.
+
+  [ Guido Berhoerster ]
+  * Add systemd service files equivalent to xdebian-edu-firstboot init script.
+  * Adjust debian-edu-testsuite to new UID/GID of first user.
+
+  [ Mike Gabriel ]
+  * d/changelog: typo fix in previous upload stanza.
+
+ -- Holger Levsen <hol...@debian.org>  Mon, 25 Dec 2023 11:07:01 +0100
+
 debian-edu-install (2.12.9~deb12u1) bookworm; urgency=medium
 
   * Release to bookworm.
@@ -26,7 +48,7 @@
     - Add shebang (#!/bin/sh) to silence lintian with 'W: debian-edu-profile-
       udeb udeb: executable-not-elf-or-script [lib/debian-edu-common]'.
   * debian/debian-edu-profile-udeb.postinst:
-    + Drop #DEBHELPER# macro. The have no effect in udeb:pkgs. Thanks, lintian.
+    + Drop #DEBHELPER# macro. They have no effect in udeb:pkgs. Thanks, 
lintian.
 
  -- Mike Gabriel <sunwea...@debian.org>  Sat, 19 Aug 2023 16:32:09 +0200
 
diff -Nru 
debian-edu-install-2.12.9~deb12u1/debian/debian-edu-install.debian-edu-testsuite.service
 
debian-edu-install-2.12.10~deb12u1/debian/debian-edu-install.debian-edu-testsuite.service
--- 
debian-edu-install-2.12.9~deb12u1/debian/debian-edu-install.debian-edu-testsuite.service
    1970-01-01 01:00:00.000000000 +0100
+++ 
debian-edu-install-2.12.10~deb12u1/debian/debian-edu-install.debian-edu-testsuite.service
   2024-01-31 16:00:03.000000000 +0100
@@ -0,0 +1,18 @@
+[Unit]
+Description=Check the Debian Edu installation after first boot
+After=xdebian-edu-firstboot.service graphical.target
+Requisite=xdebian-edu-firstboot.service
+ConditionPathExists=!/etc/debian-edu/debian-edu-testsuite
+
+[Service]
+EnvironmentFile=-/etc/debian-edu/config
+Type=oneshot
+ExecCondition=test ${TESTINSTALL} = true
+ExecStart=/usr/lib/debian-edu-install/debian-edu-testsuite run
+ExecStartPost=touch /etc/debian-edu/debian-edu-testsuite
+# Do not try to run after first boot even if condition failed
+ExecStopPost=touch /etc/debian-edu/debian-edu-testsuite
+RemainAfterExit=true
+
+[Install]
+WantedBy=multi-user.target
diff -Nru 
debian-edu-install-2.12.9~deb12u1/debian/debian-edu-install.xdebian-edu-firstboot.init
 
debian-edu-install-2.12.10~deb12u1/debian/debian-edu-install.xdebian-edu-firstboot.init
--- 
debian-edu-install-2.12.9~deb12u1/debian/debian-edu-install.xdebian-edu-firstboot.init
      2019-07-03 11:56:36.000000000 +0200
+++ 
debian-edu-install-2.12.10~deb12u1/debian/debian-edu-install.xdebian-edu-firstboot.init
     2024-01-31 16:00:03.000000000 +0100
@@ -25,81 +25,6 @@
 
 set -e
 
-info() {
-    logger -t debian-edu-install "info: $@"
-}
-
-error() {
-    logger -t debian-edu-install "error: $@"
-}
-
-at_exit() {
-    error "script $0 terminated unexpectedly."
-}
-disable_exception() { trap - INT TERM EXIT; }
-trap at_exit INT TERM EXIT
-
-run_testsuite() {
-    log_begin_msg "Collecting testsuite results"
-    logfile=/var/log/installer/debian-edu-install-testsuite
-
-    temp_dir=$(mktemp -d)
-    errfile=$temp_dir/errors
-
-    nice debian-edu-test-install > $logfile 2>&1
-
-    # find error and partition resize messages in the d-i log and the
-    # self test
-    if [ -f /var/log/installer/syslog  ] ; then
-        # remove syslog prefix
-        # Ignore normal errors from wget commands used to test if
-        # mirrors are available [pere 2010-07-22].
-        # Ignore also samba-ad-dc error (unused atm) [schweer 2018-11-05].
-        egrep 'error:|fsautoresize' /var/log/installer/syslog | \
-           grep -v 'wget: server returned error: HTTP/1.0 404 Not Found' | \
-           grep -v 'wget: server returned error: HTTP/1.1 404 Not Found' | \
-           grep -v 'samba-ad' | \
-       sed 's/.*error: /error: /g' > $errfile
-    fi
-    # The a param is now needed to find all errors [schweer 2018-11-05].
-    grep -a error: $logfile >> $errfile || true
-
-    if [ -s $errfile ] ; then
-    content=$(cat $errfile)
-    # Send error report via mail to first user (who has uid 1000 by default).
-    firstuser=$(getent passwd | grep 1000 | cut -d':' -f1)
-    username=$(getent passwd | grep 1000 | cut -d':' -f5)
-
-            cat << EOF | /usr/lib/sendmail $firstuser
-Subject: Test status
-
-Hello $username,
-
-these are the test results you requested by adding 'testinstall' as
-additional kernel commandline parameter. They have been collected by running
-the testsuite and searching in the /var/log/installer directory.
-
-$content
-
-(Sent from the Debian Edu first boot script.)
-
-EOF
-
-        log_end_msg 1 || true
-        log_begin_msg "Reporting errors found"
-        if $0 report-errors $errfile ; then
-            log_end_msg 0 || true
-        else
-            log_end_msg 1 || true
-        fi
-    else
-        log_end_msg 0 || true
-        $0 report-success || true
-    fi
-    rm $errfile
-    rmdir $temp_dir
-}
-
 do_start() {
     logger -t debian-edu-install "Executing xdebian-edu-firstboot"
 
@@ -118,89 +43,15 @@
     # command line param 'testinstall'.
     if [ -f /etc/debian-edu/config ] ; then . /etc/debian-edu/config ; fi
     if [ true = "$TESTINSTALL" ]; then
-       run_testsuite
+       log_begin_msg "Collecting testsuite results"
+       /usr/share/debian-edu-install/debian-edu-testsuite
+       log_end_msg $? || true
     else
        log_begin_msg "Not collecting testsuite results"
        log_end_msg 0 || true
     fi
 }
 
-prepare_debconf() {
-    # Try to get debconf to pop up the dialog on top of the display
-    # manager.  Need to do this before starting debconf.
-    if [ ! "$DEBIAN_HAS_FRONTEND" ] ; then
-        # This is generated by sddm
-       candidate="$(ls -tr /var/run/sddm/* 2>/dev/null|tail -1)"
-        # lightdm
-       candidate="$candidate /var/lib/lightdm/.Xauthority"
-
-       XAUTHORITY=
-       for f in $candidate ; do
-           if XAUTHORITY=$f DISPLAY=:0 xauth list >/dev/null 2>&1 &&
-               XAUTHORITY=$f DISPLAY=:0 xhost > /dev/null 2>&1 ; then
-               XAUTHORITY=$f
-               break
-           fi
-       done
-
-       if [ "$XAUTHORITY" ] ; then
-            info "found X authority file $XAUTHORITY, trying to start debconf 
with X frontend."
-            # Try to use gnome frontend (requires libgtk3-perl) or kde frontend
-            # (requires debconf-kde-helper). debconf will fall back to dialog 
if
-            # either frontend fails to start. The frontend needs to be set
-            # before confmodule is sourced to have effect.
-            DISPLAY=:0
-            # TODO: find graphical variant that works with dialog frontend?
-            if perl -MGtk3 -e 'exit 0' ; then
-               # use gnome frontend
-               export DEBIAN_FRONTEND=gnome
-            elif [ -x /usr/bin/debconf-kde-helper ] ; then
-               # use kde frontend
-               export DEBIAN_FRONTEND=kde
-            else
-               info "unable to find usable debconf X frontend"
-            fi
-            export XAUTHORITY DISPLAY
-       else
-            info "no X detected, not showing test status, send email"
-            return 1
-       fi
-    fi
-    . /usr/share/debconf/confmodule
-}
-
-report_errors() {
-    errfile="$2"
-
-    prepare_debconf $@ || return
-
-    # Quick fix to make sure all error entries at least are
-    # displayed.  The correct fix is to find out how to replace a
-    # debconf variable with multiline content.  not sure why I
-    # need to change this in to one long line
-    errors=`cat $errfile | sed 's/$/, /g' | tr -d "\n" | sed 's/, $//'`
-
-    # Take a look at how CURRENT_CONFIG is built up in
-    # partman/partman-lvm/choose_partition/lvm/do_option
-
-    db_subst debian-edu-install/errors-found ERRORS "$errors"
-
-    db_fset debian-edu-install/errors-found seen false
-    db_input critical debian-edu-install/errors-found || [ $? -eq 30 ]
-    db_go
-}
-
-report_success() {
-    prepare_debconf $@ || return
-
-    log_begin_msg "Reporting successful installation"
-
-    db_input critical debian-edu-install/no-errors-found || [ $? -eq 30 ]
-    db_go
-
-    log_end_msg 0 || true
-}
-
 case "$1" in
     start)
         if [ ! -f "$firstboot_file" ]; then
@@ -209,14 +60,6 @@
         ;;
     stop|force-reload|restart)
         ;;
-    report-errors)
-        # Need to pass all arguments, to get debconf re-exec to work
-        report_errors $@
-        ;;
-    report-success)
-        # Need to pass all arguments, to get debconf re-exec to work
-        report_success $@
-       ;;
     *)
         echo "Usage: /etc/init.d/xdebian-edu-firstboot 
{start|stop|restart|force-reload}"
         disable_exception
@@ -224,5 +67,4 @@
         ;;
 esac
 
-disable_exception
 exit 0
diff -Nru 
debian-edu-install-2.12.9~deb12u1/debian/debian-edu-install.xdebian-edu-firstboot.service
 
debian-edu-install-2.12.10~deb12u1/debian/debian-edu-install.xdebian-edu-firstboot.service
--- 
debian-edu-install-2.12.9~deb12u1/debian/debian-edu-install.xdebian-edu-firstboot.service
   1970-01-01 01:00:00.000000000 +0100
+++ 
debian-edu-install-2.12.10~deb12u1/debian/debian-edu-install.xdebian-edu-firstboot.service
  2024-01-31 16:00:03.000000000 +0100
@@ -0,0 +1,14 @@
+[Unit]
+Description=Run various tasks on the first boot after installation
+After=remote-fs.target network-online.target
+Wants=remote-fs.target
+ConditionPathExists=!/etc/debian-edu/xdebian-edu-firstboot
+
+[Service]
+Type=oneshot
+ExecStart=/usr/share/debian-edu-config/tools/run-at-firstboot
+ExecStartPost=touch /etc/debian-edu/xdebian-edu-firstboot
+RemainAfterExit=true
+
+[Install]
+WantedBy=multi-user.target
diff -Nru debian-edu-install-2.12.9~deb12u1/debian/rules 
debian-edu-install-2.12.10~deb12u1/debian/rules
--- debian-edu-install-2.12.9~deb12u1/debian/rules      2019-07-03 
11:56:36.000000000 +0200
+++ debian-edu-install-2.12.10~deb12u1/debian/rules     2024-01-31 
16:00:03.000000000 +0100
@@ -34,5 +34,8 @@
        cp debian-edu-profile $(CURDIR)/debian/debian-edu-profile-udeb/usr/bin
 
 override_dh_installinit:
-       # Use prefix 99x* to make sure it is the very last script in the boot 
sequence.
-       dh_installinit -pdebian-edu-install --name=xdebian-edu-firstboot 
--no-start -u"start 99 2 3 4 5 ."
+       dh_installinit -pdebian-edu-install --name=xdebian-edu-firstboot 
--no-start
+
+override_dh_installsystemd:
+       dh_installsystemd -pdebian-edu-install --no-start 
--name=xdebian-edu-firstboot
+       dh_installsystemd -pdebian-edu-install --no-start 
--name=debian-edu-testsuite
diff -Nru debian-edu-install-2.12.9~deb12u1/debian-edu-testsuite 
debian-edu-install-2.12.10~deb12u1/debian-edu-testsuite
--- debian-edu-install-2.12.9~deb12u1/debian-edu-testsuite      1970-01-01 
01:00:00.000000000 +0100
+++ debian-edu-install-2.12.10~deb12u1/debian-edu-testsuite     2024-01-31 
16:00:03.000000000 +0100
@@ -0,0 +1,167 @@
+#!/bin/sh
+#
+# debian-edu-testsuite - Check the Debian Edu installation after first boot
+#
+# Run the self test and report any errors found.
+#
+# Author: Petter Reinholdtsen
+#
+
+info() {
+    logger -t debian-edu-install "info: $@"
+}
+
+error() {
+    logger -t debian-edu-install "error: $@"
+}
+
+at_exit() {
+    error "script $0 terminated unexpectedly."
+}
+disable_exception() { trap - INT TERM EXIT; }
+trap at_exit INT TERM EXIT
+
+run_testsuite() {
+    logfile=/var/log/installer/debian-edu-install-testsuite
+
+    temp_dir=$(mktemp -d)
+    errfile=$temp_dir/errors
+
+    nice debian-edu-test-install > $logfile 2>&1
+
+    # find error and partition resize messages in the d-i log and the
+    # self test
+    if [ -f /var/log/installer/syslog  ] ; then
+        # remove syslog prefix
+        # Ignore normal errors from wget commands used to test if
+        # mirrors are available [pere 2010-07-22].
+        # Ignore also samba-ad-dc error (unused atm) [schweer 2018-11-05].
+        grep -E 'error:|fsautoresize' /var/log/installer/syslog | \
+           grep -v 'wget: server returned error: HTTP/1.0 404 Not Found' | \
+           grep -v 'wget: server returned error: HTTP/1.1 404 Not Found' | \
+           grep -v 'samba-ad' | \
+       sed 's/.*error: /error: /g' > $errfile
+    fi
+    # The a param is now needed to find all errors [schweer 2018-11-05].
+    grep -a error: $logfile >> $errfile || true
+
+    if [ -s $errfile ] ; then
+    content=$(cat $errfile)
+    # Send error report via mail to first user (who has uid 2000 by default).
+    firstuser=$(getent passwd 2000 | cut -d':' -f1)
+    username=$(getent passwd 2000 | cut -d':' -f5)
+
+            cat << EOF | /usr/lib/sendmail $firstuser
+Subject: Test status
+
+Hello $username,
+
+these are the test results you requested by adding 'testinstall' as
+additional kernel commandline parameter. They have been collected by running
+the testsuite and searching in the /var/log/installer directory.
+
+$content
+
+(Sent from the Debian Edu first boot script.)
+
+EOF
+
+        $0 report-errors $errfile || true
+    else
+        $0 report-success || true
+    fi
+    rm $errfile
+    rmdir $temp_dir
+}
+
+prepare_debconf() {
+    # Try to get debconf to pop up the dialog on top of the display
+    # manager.  Need to do this before starting debconf.
+    if [ ! "$DEBIAN_HAS_FRONTEND" ] ; then
+        # This is generated by sddm
+       candidate="$(ls -tr /var/run/sddm/* 2>/dev/null|tail -1)"
+        # lightdm
+       candidate="$candidate /var/lib/lightdm/.Xauthority"
+
+       XAUTHORITY=
+       for f in $candidate ; do
+           if XAUTHORITY=$f DISPLAY=:0 xauth list >/dev/null 2>&1 &&
+               XAUTHORITY=$f DISPLAY=:0 xhost > /dev/null 2>&1 ; then
+               XAUTHORITY=$f
+               break
+           fi
+       done
+
+       if [ "$XAUTHORITY" ] ; then
+            info "found X authority file $XAUTHORITY, trying to start debconf 
with X frontend."
+            # Try to use gnome frontend (requires libgtk3-perl) or kde frontend
+            # (requires debconf-kde-helper). debconf will fall back to dialog 
if
+            # either frontend fails to start. The frontend needs to be set
+            # before confmodule is sourced to have effect.
+            DISPLAY=:0
+            # TODO: find graphical variant that works with dialog frontend?
+            if perl -MGtk3 -e 'exit 0' ; then
+               # use gnome frontend
+               export DEBIAN_FRONTEND=gnome
+            elif [ -x /usr/bin/debconf-kde-helper ] ; then
+               # use kde frontend
+               export DEBIAN_FRONTEND=kde
+            else
+               info "unable to find usable debconf X frontend"
+            fi
+            export XAUTHORITY DISPLAY
+       else
+            info "no X detected, not showing test status, send email"
+            return 1
+       fi
+    fi
+    . /usr/share/debconf/confmodule
+}
+
+report_errors() {
+    errfile="$2"
+
+    prepare_debconf $@ || return
+
+    # Quick fix to make sure all error entries at least are
+    # displayed.  The correct fix is to find out how to replace a
+    # debconf variable with multiline content.  not sure why I
+    # need to change this in to one long line
+    errors=`cat $errfile | sed 's/$/, /g' | tr -d "\n" | sed 's/, $//'`
+
+    # Take a look at how CURRENT_CONFIG is built up in
+    # partman/partman-lvm/choose_partition/lvm/do_option
+
+    db_subst debian-edu-install/errors-found ERRORS "$errors"
+
+    db_fset debian-edu-install/errors-found seen false
+    db_input critical debian-edu-install/errors-found || [ $? -eq 30 ]
+    db_go
+}
+
+report_success() {
+    prepare_debconf $@ || return
+
+    db_input critical debian-edu-install/no-errors-found || [ $? -eq 30 ]
+    db_go
+}
+
+case "$1" in
+    run)
+        run_testsuite
+        ;;
+    report-errors)
+        # Need to pass all arguments, to get debconf re-exec to work
+        report_errors $@
+        ;;
+    report-success)
+        # Need to pass all arguments, to get debconf re-exec to work
+        report_success $@
+       ;;
+    *)
+        echo "Usage: $0 {run|report-errors|report-success}"
+        disable_exception
+        exit 1
+        ;;
+esac
+disable_exception
diff -Nru debian-edu-install-2.12.9~deb12u1/Makefile 
debian-edu-install-2.12.10~deb12u1/Makefile
--- debian-edu-install-2.12.9~deb12u1/Makefile  2023-08-29 23:10:13.000000000 
+0200
+++ debian-edu-install-2.12.10~deb12u1/Makefile 2024-01-31 16:00:03.000000000 
+0100
@@ -4,10 +4,13 @@
 
 INSTALL     = install
 INSTALL_DATA= install -m 644
+INSTALL_BIN = install -m 755
 
 libdir      = /usr/lib
 templatedir = /usr/share/debconf/templates
 pkglibdir   = $(libdir)/debian-edu-install
+libexecdir  = /usr/lib
+pkglibexecdir = $(libexecdir)/debian-edu-install
 sbindir     = /usr/sbin
 sysconfdir  = /etc
 
@@ -45,6 +48,7 @@
            $(INSTALL_DATA) preseed-values/defaults.$$profile 
$(DESTDIR)$(pkglibdir)/; \
        done
        $(INSTALL_DATA) version $(DESTDIR)$(pkglibdir)
+       $(INSTALL_BIN) debian-edu-testsuite $(DESTDIR)$(pkglibexecdir)
 
 debian-edu-profile.templates: debian/debian-edu-profile-udeb.templates
        (cd debian; po2debconf debian-edu-profile-udeb.templates) > $@
diff -Nru debian-edu-install-2.12.9~deb12u1/preseed-values/defaults.common 
debian-edu-install-2.12.10~deb12u1/preseed-values/defaults.common
--- debian-edu-install-2.12.9~deb12u1/preseed-values/defaults.common    
2019-07-03 11:56:36.000000000 +0200
+++ debian-edu-install-2.12.10~deb12u1/preseed-values/defaults.common   
2024-01-31 16:00:03.000000000 +0100
@@ -41,5 +41,3 @@
 # remove the need to set up APT sources using cfengine.
 choose-mirror-bin mirror/http/hostname string deb.debian.org
 choose-mirror-bin mirror/http/directory string /debian/
-apt-mirror-setup apt-setup/non-free boolean true
-apt-mirror-setup apt-setup/contrib boolean true

Reply via email to