• Bug#1108949: utrans-rc: installing utrans-rc generates a /etc/init.d/ex

    From Lucas Nussbaum@21:1/5 to All on Tue Jul 8 14:10:01 2025
    Package: utrans-rc
    Version: 0.7-1
    Severity: serious

    If I install utrans-rc, it generates a /etc/init.d/exim4 file, which
    conflicts with the file installed by the exim4-base
    package.

    This results in this prompt when installing exim4-base.

    Configuration file '/etc/init.d/exim4'
    File on system created by you or by a script.
    File also in package provided by package maintainer.
    What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
    D : show the differences between the versions
    Z : start a shell to examine the situation
    The default action is to keep your current version.
    *** exim4 (Y/I/N/O/D/Z) [default=N] ?

    I suppose that this happens if exim4-base is unpacked but not configured
    before utrans-rc is configured, but I'm not sure.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Hindley@21:1/5 to All on Tue Jul 8 17:00:01 2025
    Thanks. I am away until Thursday, but will look then.

    Maybe the postinst should use the trigger so it happens after all
    packages are installed and configured.

    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Hindley@21:1/5 to Lucas Nussbaum on Fri Jul 11 20:30:02 2025
    Control: tags -1 unreproducible

    Lucas,

    Thanks for this. I am afraid I am unable to reproduce.

    On Tue, Jul 08, 2025 at 01:58:19PM +0200, Lucas Nussbaum wrote:
    I suppose that this happens if exim4-base is unpacked but not configured before utrans-rc is configured, but I'm not sure.

    There might be a potential issue in that /etc/init.d/exim is in exim4-base whereas /usr/lib/systemd/system/exim4.service is in exim4-daemon-light.

    Having said that, I cannot generate a failure by installing utrans-rc and exim4-base or exim4-daemon-light. It would seem that your error is caused by utrans-rc producing /etc/init.d/exim4 from /usr/lib/systemd/system/exim4.service
    before exim4-base is installed. But exim4-daemon-light depends on exim4-base, so
    I don't currently see how that can happen.

    Do you have a reliable reproducer?

    Thanks

    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Hindley@21:1/5 to Lucas Nussbaum on Sat Jul 12 16:50:01 2025
    Control: tags -1 = patch

    Lucas,

    On Sat, Jul 12, 2025 at 01:13:25PM +0200, Lucas Nussbaum wrote:
    mmdebstrap --variant=minbase --chrooted-customize-hook='apt update && apt -o APT::Install-Recommends=yes install -y utrans-rc' trixie /dev/null
    (Inspired from Zeha's reproducer in #1108944)

    Thanks. I suggest the following patch. It fixes the mmdebstrap reroducer for me.

    Mark

    commit 27a1dee33fef7659c121eb7da3f180988351f5ed
    Author: Mark Hindley <[email protected]>
    Date: Sat Jul 12 12:54:21 2025 +0100

    utrans-rc.postinst: use manual trigger to regenerate scripts so it happens after all other packages are configured.

    Closes: #1108949

    diff --git a/debian/utrans-rc.postinst b/debian/utrans-rc.postinst
    index c0a3ae1..14078f3 100644
    --- a/debian/utrans-rc.postinst
    +++ b/debian/utrans-rc.postinst
    @@ -3,7 +3,12 @@
    set -e

    case "$1" in
    - configure) utrans-rc ;;
    + configure)
    + # Remove any timestamp to force regeneration of all scripts.
    + rm -f /var/tmp/${DPKG_MAINTSCRIPT_PACKAGE}.stamp
    + # Trigger regeneration.
    + dpkg-trigger /usr/lib/systemd/system
    + ;;
    triggered) utrans-rc -u ;;
    esac
    # dh_installdeb will replace this with shell code automatically

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)