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

[ Reason ]

The primary reason for doing a stable upload is that login has become
non-essential in unstable. Thus the default experience of "debvm-create
&& debvm-run" which spawns an unstable vm will lack the login package
and thus result in a respawning getty. That's not a nice default
experience.

As I go through the pu process, I considered other patches that would be
reasonable to backport.
 * debvm-run fails hard when TERM happens to be unset.
 * debvm-create installs a broken resolv.conf for Debian stretch.
 * debvm-waitssh does not correctly parse --timeout=123.

I hope you can agree to also add these targeted fixes.

[ Impact ]

The default experience of debvm will be impacted. Most of the problems
can be worked around at ease:

 * login: debvm-create ... --include=login
 * TERM: TERM=something debvm-run ...
 * --timeout: debvm-waitssh --timeout 123

[ Tests ]

None of the relevant changes happen to be covered by automated tests
unfortunately. I have resorted performing manual tests of these changes.
All but the login change have been part of unstable for quite a while
already.

[ Risks ]

The relevant changes have relatively low risks of introducing
regressions, because the changes mostly turn failing code paths into
non-failing ones and otherwise do not affect behaviour.

[ Checklist ]
  [ ] *all* changes are documented in the d/changelog
      Not yet. All changes are documented in git and I intend to run
      gbp dch at upload time.
  [*] I reviewed all changes and I approve them
  [ ] attach debdiff against the package in (old)stable
      I opted for attaching a git log and hope this also works for you,
      because gives more details for the targeted fixes and contains
      what will end up in the debian/changelog.
  [*] the issue is verified as fixed in unstable

[ Changes ]

I think this is covered by the attached git log.

[ Other info ]

If you think that none of the changes warrant a stable upload because
their severity is not sufficiently important and they can be worked
around, please close this bug tagging it wontfix. If you object to
individual fixes, I am happy to reduce the scope.

You may find my git branch at:
https://salsa.debian.org/helmutg/debvm/-/tree/debian/bookworm

Helmut
commit 137d9a489bb022af8a082d9990846809ab3b4466
Author: Helmut Grohne <hel...@subdivi.de>
Date:   Sun Jun 23 06:29:44 2024 +0200

    debvm-create: do install login
    
    login has become non-essential and autologin simply respawns
    indefinitely when login is not installed. We better install it
    explicitly and that works on all releases. If we are only interested in
    logging in via ssh (and thus --skip=autologin), no login package is
    needed.
    
    (cherry picked from commit aba9e12e719375d7032d7b88268dbea5036d6035)

diff --git a/bin/debvm-create b/bin/debvm-create
index 1c7c29d..0fb9654 100755
--- a/bin/debvm-create
+++ b/bin/debvm-create
@@ -386,7 +386,9 @@ if ! check_skip usrmerge; then
 fi
 
 if ! check_skip autologin; then
-       set -- "--customize-hook=$SHARE_DIR/customize-autologin.sh" "$@"
+       set -- \
+               --include=login \
+               "--customize-hook=$SHARE_DIR/customize-autologin.sh" "$@"
 fi
 
 set -- "$SUITE" "$IMAGE" "$@"

commit 8af26f324f0f20b2bba961974d60c29b64257b6b
Author: Johannes Schauer Marin Rodrigues <jo...@mister-muffin.de>
Date:   Sun Sep 24 00:39:48 2023 +0200

    bin/debvm-waitssh: make --timeout=N work
    
    (cherry picked from commit 73a4050552c2f2c620362beb6f9fd7ca86b9377c)

diff --git a/bin/debvm-waitssh b/bin/debvm-waitssh
index 2b843a5..199903f 100755
--- a/bin/debvm-waitssh
+++ b/bin/debvm-waitssh
@@ -107,7 +107,7 @@ while getopts :qt:-: OPTCHAR; do
                                        "opt_$OPTARG" "$(nth_arg "$OPTIND" 
"$@")"
                                        OPTIND=$((OPTIND+1))
                                ;;
-                               timeout=)
+                               timeout=*)
                                        "opt_${OPTARG%%=*}" "${OPTARG#*=}"
                                ;;
                                *)

commit 0015617762916b6efa2fc3ac01ecbf3e267c900b
Author: Jochen Sprickerhof <g...@jochen.sprickerhof.de>
Date:   Tue Jul 25 14:45:51 2023 +0200

    Fix resolv.conf in stretch
    
    stub-resolv.conf was introduced in systemd 236 (e6b2d948f8).
    
    Regression of c751e22.
    
    (cherry picked from commit efc7b2e5a831c8b996e7dd39a2c4f3898872b883)

diff --git a/share/customize-resolved.sh b/share/customize-resolved.sh
index e8fe248..8885d18 100755
--- a/share/customize-resolved.sh
+++ b/share/customize-resolved.sh
@@ -18,7 +18,7 @@ if dpkg --compare-versions "$LIBNSS_RESOLVE_VERSION" lt 
251.3-2~exp1; then
                chroot "$TARGET" systemctl enable systemd-resolved.service
        fi
 
-       if test -z "$LIBNSS_RESOLVE_VERSION"; then
+       if test -z "$LIBNSS_RESOLVE_VERSION" || dpkg --compare-versions 
"$LIBNSS_RESOLVE_VERSION" lt 236; then
                ln -fs ../run/systemd/resolve/resolv.conf 
"$TARGET/etc/resolv.conf"
        else
                ln -fs ../run/systemd/resolve/stub-resolv.conf 
"$TARGET/etc/resolv.conf"

commit df0b788393af8a9c444bfcb5d7ff397469bcfce3
Author: Johannes Schauer Marin Rodrigues <jo...@mister-muffin.de>
Date:   Sat Jun 24 09:05:30 2023 +0200

    bin/debvm-run: allow being run in environments without TERM set
    
    (cherry picked from commit ab52e6cbdd09fe37c40cf0e136a2e79bdc32d12f)

diff --git a/bin/debvm-run b/bin/debvm-run
index 7da7cd0..6d98562 100755
--- a/bin/debvm-run
+++ b/bin/debvm-run
@@ -356,7 +356,7 @@ if test -z "$GRAPHICAL"; then
                        KERNEL_CMDLINE="$KERNEL_CMDLINE console=ttyS0"
                ;;
        esac
-       if test -t 0 && test -t 1 && test -n "$TERM"; then
+       if test -t 0 && test -t 1 && test -n "${TERM:-}"; then
                KERNEL_CMDLINE="$KERNEL_CMDLINE TERM=$TERM"
        fi
 else

Reply via email to