Package installation using apt forces file remove/skip in /usr/share/doc/ wich often contains essential files

Bug #1955708 reported by ThatOne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-images
New
Undecided
Unassigned

Bug Description

For example
In Dockerfile:
FROM ubuntu:focal
...
RUN apt-get install -y -q apt-utils imx-code-signing-tool
...
In the result container:
# dpkg -L apt-utils
...
/usr/share/doc/apt-utils/examples
/usr/share/doc/apt-utils/examples/apt-ftparchive.conf
/usr/share/doc/apt-utils/examples/ftp-archive.conf
...
But
# ls -lha /usr/share/doc/apt-utils/examples/
total 8.0K
drwxr-xr-x 2 root root 4.0K Jun 15 2021 .
drwxr-xr-x 3 root root 4.0K Dec 24 14:25 ..

# dpkg -L imx-code-signing-tool
...
/usr/share/doc/imx-code-signing-tool
/usr/share/doc/imx-code-signing-tool/CST_UG.pdf.gz
/usr/share/doc/imx-code-signing-tool/HAB4_API.pdf.gz
/usr/share/doc/imx-code-signing-tool/README.csf_parser
/usr/share/doc/imx-code-signing-tool/ahab_signature_block_parser
/usr/share/doc/imx-code-signing-tool/ahab_signature_block_parser/README
/usr/share/doc/imx-code-signing-tool/ahab_signature_block_parser/common.py
/usr/share/doc/imx-code-signing-tool/ahab_signature_block_parser/parse_sig_blk.py
/usr/share/doc/imx-code-signing-tool/changelog.Debian.gz
/usr/share/doc/imx-code-signing-tool/copyright
/usr/share/doc/imx-code-signing-tool/hab_srktool_scripts
/usr/share/doc/imx-code-signing-tool/hab_srktool_scripts/README
/usr/share/doc/imx-code-signing-tool/hab_srktool_scripts/createSRKFuses
/usr/share/doc/imx-code-signing-tool/hab_srktool_scripts/createSRKTable
/usr/share/doc/imx-code-signing-tool/pki_scripts
/usr/share/doc/imx-code-signing-tool/pki_scripts/add_key.sh
/usr/share/doc/imx-code-signing-tool/pki_scripts/ahab_pki_tree.sh
/usr/share/doc/imx-code-signing-tool/pki_scripts/hab4_pki_tree.sh

But
# ls -lha /usr/share/doc/imx-code-signing-tool/pki_scripts/
total 8.0K
drwxr-xr-x 2 root root 4.0K Feb 4 2020 .
drwxr-xr-x 5 root root 4.0K Dec 24 14:25 ..

# ls -lha /usr/share/doc/imx-code-signing-tool/ahab_signature_block_parser/
total 8.0K
drwxr-xr-x 2 root root 4.0K Feb 4 2020 .
drwxr-xr-x 5 root root 4.0K Dec 24 14:25 ..

Reinstallation gives nothing.
How to turn files back???

Tags: focal
Revision history for this message
Thomas Bechtold (toabctl) wrote :

We try to minimize the content of the container and exclude most of /usr/share/doc . Imo it's a bug in the imx-code-signing-tool package that it installs scripts into /usr/share/doc .

As a workaround, you can remove the exclude and reinstall the package:

# sed -i 's|^path-exclude=/usr/share/doc/*|#path-exclude=/usr/share/doc/*|' /etc/dpkg/dpkg.cfg.d/excludes
# apt install --reinstall imx-code-signing-tool

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.