apt installs non necessary packets, even with --mode=custom #23

Closed
opened 2 years ago by gioele · 3 comments
gioele commented 2 years ago

Problem

Using a number of modified packages, I have been able to produce a runnable VM image where no package either factually requires or formally Depends or perl-base.

However, for unknown reasons, apt decides that perl-base is nevertheless needed and decides to install it.

The use of --mode=custom should prevent the inclusion of essential packages. How come apt still believes that perl-base is needed if no package depends on it?

Expectation

apt should not install perl-base.

Actual result

apt includes perl-base in the list of packages to install.

Environment

  • mmdebstrap 0.8.4
  • apt 2.4.0

Log (highlights)

mmdebstrap:

I: 1 2081 downloading packages with apt...
D: 1 711 run_progress: exec apt-get --yes -oApt::Get::Download-Only=true install -oAPT::Status-Fd=${FD} -oDpkg::Use-Pty=false apt debian-vm-minimal
Reading package lists...
Building dependency tree...
The following additional packages will be installed:
  adduser-sysusers-sh-shim base-files base-passwd bash bsdutils cdebconf
  coreutils cpio dash debconf-dummy debian-archive-keyring debianutils
  diffutils dmsetup dpkg findutils gcc-10-base gpgv grep gzip hostname
  init-system-helpers-dummy initramfs-tools initramfs-tools-core klibc-utils
  kmod libacl1 libapparmor1 libapt-pkg6.0 libargon2-1 libattr1 libaudit-common
  libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap-ng0 libcap2 libcom-err2
  libcrypt1 libcryptsetup12 libdb5.3 libdebconfclient0 libdebian-installer4
  libdevmapper1.02.1 libffi7 libgcc-s1 libgcrypt20 libgmp10 libgnutls30 
  libgpg-error0 libgssapi-krb5-2 libhogweed6 libidn2-0 libip4tc2 libjson-c5
  libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-3 libkrb5support0 
  liblz4-1 liblzma5 libmount1 libnettle8 libnewt0.52 libnsl2 libp11-kit0
  libpam-config-common libpam-modules libpam-modules-bin libpam0g libpcre2-8-0
  libpcre3 libseccomp2 libselinux1 libslang2 libsmartcols1 libssl1.1
  libstdc++6 libsystemd0 libtasn1-6 libtextwrap1 libtinfo6 libtirpc-common
  libtirpc3 libudev1 libunistring2 libuuid1 libxxhash0 libzstd1 linux-base
  linux-image-5.10.0-10-cloud-amd64 linux-image-cloud-amd64 login logsave
  lsb-base mawk mount ncurses-base ncurses-bin perl-base sed systemd
  systemd-sysv systemd-timesyncd tar udev util-linux zlib1g
Suggested packages:

No packages in the VM require perl-base:

# apt-cache rdepends perl-base
perl-base
Reverse Depends:
#

How to reproduce

To reproduce this bug you'll need a bunch of custom packages that can be found (as equivs control files) at https://salsa.debian.org/gioele/debian-vm-minimal-pkgs. The following mmdebstrap invocation assues that these packages are served from http://localhost:8000/. The root custom package that list all essential packages is debian-vm-minimal.

PKGS="debian-vm-minimal,apt"

mmdebstrap --debug \
        --variant=custom --include=$PKGS \
        \
        --aptopt='Apt::Install-Recommends "false"' \
        \
        bullseye testvm.tar \
        "deb http://deb.debian.org/debian bullseye main" \
        "deb [trusted=yes] http://localhost:8000 unstable/"
# Problem Using a number of modified packages, I have been able to produce a runnable VM image where no package either factually requires or formally `Depends` or `perl-base`. However, for unknown reasons, apt decides that `perl-base` is nevertheless needed and decides to install it. The use of `--mode=custom` should prevent the inclusion of essential packages. How come apt still believes that `perl-base` is needed if no package depends on it? # Expectation apt should not install `perl-base`. # Actual result apt includes `perl-base` in the list of packages to install. # Environment * mmdebstrap 0.8.4 * apt 2.4.0 # Log (highlights) mmdebstrap: ``` I: 1 2081 downloading packages with apt... D: 1 711 run_progress: exec apt-get --yes -oApt::Get::Download-Only=true install -oAPT::Status-Fd=${FD} -oDpkg::Use-Pty=false apt debian-vm-minimal Reading package lists... Building dependency tree... The following additional packages will be installed: adduser-sysusers-sh-shim base-files base-passwd bash bsdutils cdebconf coreutils cpio dash debconf-dummy debian-archive-keyring debianutils diffutils dmsetup dpkg findutils gcc-10-base gpgv grep gzip hostname init-system-helpers-dummy initramfs-tools initramfs-tools-core klibc-utils kmod libacl1 libapparmor1 libapt-pkg6.0 libargon2-1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcap-ng0 libcap2 libcom-err2 libcrypt1 libcryptsetup12 libdb5.3 libdebconfclient0 libdebian-installer4 libdevmapper1.02.1 libffi7 libgcc-s1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed6 libidn2-0 libip4tc2 libjson-c5 libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-3 libkrb5support0 liblz4-1 liblzma5 libmount1 libnettle8 libnewt0.52 libnsl2 libp11-kit0 libpam-config-common libpam-modules libpam-modules-bin libpam0g libpcre2-8-0 libpcre3 libseccomp2 libselinux1 libslang2 libsmartcols1 libssl1.1 libstdc++6 libsystemd0 libtasn1-6 libtextwrap1 libtinfo6 libtirpc-common libtirpc3 libudev1 libunistring2 libuuid1 libxxhash0 libzstd1 linux-base linux-image-5.10.0-10-cloud-amd64 linux-image-cloud-amd64 login logsave lsb-base mawk mount ncurses-base ncurses-bin perl-base sed systemd systemd-sysv systemd-timesyncd tar udev util-linux zlib1g Suggested packages: ``` No packages in the VM require `perl-base`: ``` # apt-cache rdepends perl-base perl-base Reverse Depends: # ``` # How to reproduce To reproduce this bug you'll need a bunch of custom packages that can be found (as `equivs` control files) at <https://salsa.debian.org/gioele/debian-vm-minimal-pkgs>. The following `mmdebstrap` invocation assues that these packages are served from `http://localhost:8000/`. The root custom package that list all essential packages is `debian-vm-minimal`. ``` PKGS="debian-vm-minimal,apt" mmdebstrap --debug \ --variant=custom --include=$PKGS \ \ --aptopt='Apt::Install-Recommends "false"' \ \ bullseye testvm.tar \ "deb http://deb.debian.org/debian bullseye main" \ "deb [trusted=yes] http://localhost:8000 unstable/" ```
josch commented 2 years ago
Owner

It is likely a problem on your end and not with mmdebstrap. You also don't need --aptopt='Apt::Install-Recommends "false"' because mmdebstrap doesn't install Recommends by default. To figure out why perl-base gets installed in your case, please supply the EDSP document of your apt installation request like so:

APT_EDSP_DUMP_FILENAME=/tmp/dump.edsp mmdebstrap --aptopt='APT::Solver "dump"' --variant=custom --include=$PKGS bullseye /dev/null "deb http://deb.debian.org/debian bullseye main" "deb [trusted=yes] http://localhost:8000 unstable/"

And then attach /tmp/dump.edsp to this issue. Thanks!

It is likely a problem on your end and not with mmdebstrap. You also don't need `--aptopt='Apt::Install-Recommends "false"'` because mmdebstrap doesn't install Recommends by default. To figure out why perl-base gets installed in your case, please supply the EDSP document of your apt installation request like so: APT_EDSP_DUMP_FILENAME=/tmp/dump.edsp mmdebstrap --aptopt='APT::Solver "dump"' --variant=custom --include=$PKGS bullseye /dev/null "deb http://deb.debian.org/debian bullseye main" "deb [trusted=yes] http://localhost:8000 unstable/" And then attach `/tmp/dump.edsp` to this issue. Thanks!
gioele commented 2 years ago
Poster

Thank you for the support. The dumped EDSP document is at https://anonfiles.com/f5KdL7Mdx3/deb-vm-min-perl_edsp.

PS: feel free to close this issue, I will report it "upstream" as an apt issue.

Thank you for the support. The dumped EDSP document is at https://anonfiles.com/f5KdL7Mdx3/deb-vm-min-perl_edsp. PS: feel free to close this issue, I will report it "upstream" as an apt issue.
gioele commented 2 years ago
Poster

I'm closing this because this turned out to be an issues in APT and not in mmdebstrap.

Going forward, some debug aid in mmdebstrap like the one proposed in !24 could help debugging this sort of issues.

I'm closing this because this turned out to be an issues in APT and not in mmdebstrap. Going forward, some debug aid in mmdebstrap like the one proposed in !24 could help debugging this sort of issues.
gioele closed this issue 2 years ago
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: josch/mmdebstrap#23
Loading…
There is no content yet.