2

I am testing out the build of a .deb package on different distributions using test-kitchen. The built .deb file installs the command to /usr/bin fine on both Debian and Ubuntu. My problem is that the man pages don't get installed on Ubuntu. The contents of the built .deb file on Ubuntu is:

kitchen@ceddd8d3564c:/opt/workspace$ dpkg -c $(find . -name \*.deb)
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/bin/
-rwxr-xr-x 0/0           33742 2018-06-08 14:24 ./usr/bin/git-secret
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/man7/
-rw-r--r-- 0/0            5298 2018-06-08 14:24 ./usr/share/man/man7/git-secret.7
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/man1/
-rw-r--r-- 0/0            1355 2018-06-08 14:24 ./usr/share/man/man1/git-secret-add.1
-rw-r--r-- 0/0             819 2018-06-08 14:24 ./usr/share/man/man1/git-secret-init.1
-rw-r--r-- 0/0            1440 2018-06-08 14:24 ./usr/share/man/man1/git-secret-hide.1
-rw-r--r-- 0/0            1734 2018-06-08 14:24 ./usr/share/man/man1/git-secret-tell.1
-rw-r--r-- 0/0             931 2018-06-08 14:24 ./usr/share/man/man1/git-secret-clean.1
-rw-r--r-- 0/0             936 2018-06-08 14:24 ./usr/share/man/man1/git-secret-remove.1
-rw-r--r-- 0/0             959 2018-06-08 14:24 ./usr/share/man/man1/git-secret-list.1
-rw-r--r-- 0/0            1246 2018-06-08 14:24 ./usr/share/man/man1/git-secret-cat.1
-rw-r--r-- 0/0             843 2018-06-08 14:24 ./usr/share/man/man1/git-secret-usage.1
-rw-r--r-- 0/0            1337 2018-06-08 14:24 ./usr/share/man/man1/git-secret-reveal.1
-rw-r--r-- 0/0            1445 2018-06-08 14:24 ./usr/share/man/man1/git-secret-changes.1
-rw-r--r-- 0/0             998 2018-06-08 14:24 ./usr/share/man/man1/git-secret-killperson.1
-rw-r--r-- 0/0             940 2018-06-08 14:24 ./usr/share/man/man1/git-secret-whoknows.1
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/doc/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/doc/git-secret/
-rw-r--r-- 0/0             149 2018-06-08 14:24 ./usr/share/doc/git-secret/changelog.gz
kitchen@ceddd8d3564c:/opt/workspace$

The install command is sudo dpkg --force-all --install $(find . -name \*.deb) which outputs:

(Reading database ... 41209 files and directories currently installed.)
Preparing to unpack .../git-secret_0.2.4_all.deb ...
Unpacking git-secret (0.2.4) over (0.2.4) ...
Setting up git-secret (0.2.4) ...
Processing triggers for man-db (2.8.3-2) ...

After that the man git-secret and man git-secret-init report "No manual entry for git-secret-init".

Things are working on Debian latest with the same package:

kitchen@c71479c4f76c:/opt/workspace$ dpkg -c $(find . -name \*.deb)
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/bin/
-rwxr-xr-x 0/0           33742 2018-06-08 14:24 ./usr/bin/git-secret
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/man7/
-rw-r--r-- 0/0            5298 2018-06-08 14:24 ./usr/share/man/man7/git-secret.7
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/man/man1/
-rw-r--r-- 0/0            1355 2018-06-08 14:24 ./usr/share/man/man1/git-secret-add.1
-rw-r--r-- 0/0             819 2018-06-08 14:24 ./usr/share/man/man1/git-secret-init.1
-rw-r--r-- 0/0            1440 2018-06-08 14:24 ./usr/share/man/man1/git-secret-hide.1
-rw-r--r-- 0/0            1734 2018-06-08 14:24 ./usr/share/man/man1/git-secret-tell.1
-rw-r--r-- 0/0             931 2018-06-08 14:24 ./usr/share/man/man1/git-secret-clean.1
-rw-r--r-- 0/0             936 2018-06-08 14:24 ./usr/share/man/man1/git-secret-remove.1
-rw-r--r-- 0/0             959 2018-06-08 14:24 ./usr/share/man/man1/git-secret-list.1
-rw-r--r-- 0/0            1246 2018-06-08 14:24 ./usr/share/man/man1/git-secret-cat.1
-rw-r--r-- 0/0             843 2018-06-08 14:24 ./usr/share/man/man1/git-secret-usage.1
-rw-r--r-- 0/0            1337 2018-06-08 14:24 ./usr/share/man/man1/git-secret-reveal.1
-rw-r--r-- 0/0            1445 2018-06-08 14:24 ./usr/share/man/man1/git-secret-changes.1
-rw-r--r-- 0/0             998 2018-06-08 14:24 ./usr/share/man/man1/git-secret-killperson.1
-rw-r--r-- 0/0             940 2018-06-08 14:24 ./usr/share/man/man1/git-secret-whoknows.1
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/doc/
drwxr-xr-x 0/0               0 2018-06-08 14:24 ./usr/share/doc/git-secret/
-rw-r--r-- 0/0             149 2018-06-08 14:24 ./usr/share/doc/git-secret/changelog.gz
kitchen@c71479c4f76c:/opt/workspace$

Installed the same way:

kitchen@c71479c4f76c:/opt/workspace$ sudo dpkg --force-all --install $(find . -name \*.deb)
Selecting previously unselected package git-secret.
(Reading database ... 29069 files and directories currently installed.)
Preparing to unpack .../git-secret_0.2.4_all.deb ...
Unpacking git-secret (0.2.4) ...
Setting up git-secret (0.2.4) ...
Processing triggers for man-db (2.7.6.1-2) ...
kitchen@c71479c4f76c:/opt/workspace$

Works:

kitchen@c71479c4f76c:/opt/workspace$ man -w git-secret-init
/usr/share/man/man1/git-secret-init.1
kitchen@c71479c4f76c:/opt/workspace$ man -w git-secret
/usr/share/man/man7/git-secret.7
kitchen@c71479c4f76c:/opt/workspace$

The version of Debian that works is:

kitchen@c71479c4f76c:/opt/workspace$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.4 (stretch)
Release:        9.4
Codename:       stretch
kitchen@c71479c4f76c:/opt/workspace$

The version of Ubuntu which doesn't is:

kitchen@ceddd8d3564c:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:        18.04
Codename:       bionic
kitchen@ceddd8d3564c:~$

Why don't the man pages install on Ubuntu?

  • 1
    Do you happen to have dpkg path exclusions on the Ubuntu system? Look at the output of grep -r path-exclude /etc/dpkg/dpkg.cfg* to find out. – Stephen Kitt Jun 8 '18 at 15:11
  • aha! ```kitchen@ceddd8d3564c:~$ grep -r path-exclude /etc/dpkg/dpkg.cfg* /etc/dpkg/dpkg.cfg.d/excludes:path-exclude=/usr/share/man/* /etc/dpkg/dpkg.cfg.d/excludes:path-exclude=/usr/share/doc/*`` – simbo1905 Jun 8 '18 at 15:34
  • sudo rm /etc/dpkg/dpkg.cfg.d/excludes fixes it. @StephenKitt please submit as an answer so that I can accept. – simbo1905 Jun 8 '18 at 15:37
4

Your dpkg configuration on your Ubuntu system, namely the path-exclude=/usr/share/man/* directive in /etc/dpkg/dpkg.cfg.d/excludes, instructs dpkg to not install manpages.

If you do want to install manpages, remove the corresponding line and install the package again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.