#1135076 Please use a relative symlink in /etc/apt/apt.conf.d

#1135076#5
Date:
2026-04-27 10:15:39 UTC
From:
To:
Since Debian 13, mmdebstrap building a rootfs can use the host's apt,
instead of the chrooting into the rootfs and running the guest's apt.

libdvd-pkg puts a symlink in /etc/apt/apt.conf.d/.
Because it is absolute (not relative), it only works when chrooted.

Here is a minimal demonstration:

    $ mmdebstrap forky /dev/null --quiet --components=main,contrib --include=libdvdcss2 \
        --customize-hook='set -x; APT_CONFIG=$MMDEBSTRAP_APT_CONFIG apt clean; ls -ld $1/etc/apt/apt.conf.d/88libdvdcss-pkg; chroot $1 apt clean'
    + APT_CONFIG=/tmp/mmdebstrap.sgGQCYGnzi/tmp/mmdebstrap.apt.conf.wXBQ_gyppdKU apt clean
    Notice: Ignoring '88libdvdcss-pkg' in directory '/tmp/mmdebstrap.sgGQCYGnzi/etc/apt/apt.conf.d/' as it is not a regular file
    + ls -ld /tmp/mmdebstrap.sgGQCYGnzi/etc/apt/apt.conf.d/88libdvdcss-pkg
    lrwxrwxrwx 1 root root 35 2026-04-27 20:09 /tmp/mmdebstrap.sgGQCYGnzi/etc/apt/apt.conf.d/88libdvdcss-pkg -> /usr/lib/libdvd-pkg/88libdvdcss-pkg
    + chroot /tmp/mmdebstrap.sgGQCYGnzi apt clean

This issue is also present in trixie (libdvd-pkg=1.4.3-1-1.1):

    $ mmdebstrap trixie /dev/null --quiet --components=main,contrib --include=libdvdcss2 \
        --customize-hook='set -x; APT_CONFIG=$MMDEBSTRAP_APT_CONFIG apt clean; ls -ld $1/etc/apt/apt.conf.d/88libdvdcss-pkg; chroot $1 apt clean'
    + APT_CONFIG=/tmp/mmdebstrap.pKAV66Smvf/tmp/mmdebstrap.apt.conf.irIyNjOcwj45 apt clean
    Notice: Ignoring '88libdvdcss-pkg' in directory '/tmp/mmdebstrap.pKAV66Smvf/etc/apt/apt.conf.d/' as it is not a regular file
    + ls -ld /tmp/mmdebstrap.pKAV66Smvf/etc/apt/apt.conf.d/88libdvdcss-pkg
    lrwxrwxrwx 1 root root 35 2026-04-27 20:14 /tmp/mmdebstrap.pKAV66Smvf/etc/apt/apt.conf.d/88libdvdcss-pkg -> /usr/lib/libdvd-pkg/88libdvdcss-pkg
    + chroot /tmp/mmdebstrap.pKAV66Smvf apt clean

Please make the symlink a relative symlink instead of an absolute symlink, so these have the same behaviour:

    chroot $1 apt [...]
    APT_CONFIG=$MMDEBSTRAP_APT_CONFIG apt [...]

It would also work if it was a regular file, i.e. if the postinst used cp instead of ln.

This is the relevant line, I think:

https://sources.debian.org/src/libdvd-pkg/1.5.0-1-1/debian/postinst#L20

#1135076#10
Date:
2026-04-27 10:55:15 UTC
From:
To:
Hi Trent,

Am 2026-04-27 12:15, schrieb Trent W. Buck:

this package is only very sparsely maintained. If you could file a
(tested!) PR with the supposed change here, that would be appreciated:

https://salsa.debian.org/multimedia-team/libdvd-pkg

Thanks!

  - Fabian

#1135076#15
Date:
2026-04-27 10:58:32 UTC
From:
To:
Understood.

This is a very low-priority issue for me, so I have no estimate for when
I'll get to it.

#1135076#20
Date:
2026-04-27 12:04:05 UTC
From:
To:
Am 2026-04-27 12:58, schrieb Trent W. Buck:

Not even sure, though, if Debian Policy even allows relative symlinks
between two files that do not share the same top-level directory.

  - Fabian