dh_compress doesn't handle already compressed manpages with .so links

Bug #1765851 reported by Andreas Hasenack
This bug affects 1 person
Affects Status Importance Assigned to Milestone
debhelper (Ubuntu)
Fix Released

Bug Description

debhelper 11.1.6ubuntu1 from bionic

I'm preparing pmdk packages (upstream: https://github.com/pmem/pmdk) in my git repo (https://code.launchpad.net/~ahasenack/ubuntu/+source/pmdk/+git/pmdk/+ref/rename-pmdk-1.4) and noticed that dh_compress is adding another .gz suffix to manpages that are already compressed if they have just ".so" macros inside pointing elsewhere.

Attached is a full build log with DH_VERBOSE set.

Here is the gist of it: https://pastebin.ubuntu.com/p/TmyKycSkGK/

rm -f debian/libpmemlog-dev/usr/share/man/man3/pmemlog_open.3.gz debian/libpmemlog-dev/usr/share/man/man3/pmemlog_open.3.gz.gz
ln -s pmemlog_create.3.gz debian/libpmemlog-dev/usr/share/man/man3/pmemlog_open.3.gz.gz

Upstream already produces compressed manpages. Using pmemlog_open as an example again:
(rename-pmdk-1.4)ubuntu@bionic-pmdk:~/pmdk/pmdk-git$ rm -rf /tmp/pmdk
(rename-pmdk-1.4)ubuntu@bionic-pmdk:~/pmdk/pmdk-git$ mkdir /tmp/pmdk
(rename-pmdk-1.4)ubuntu@bionic-pmdk:~/pmdk/pmdk-git$ make DESTDIR=/tmp/pmdk install

(rename-pmdk-1.4)ubuntu@bionic-pmdk:~/pmdk/pmdk-git$ find /tmp/pmdk/ -name pmemlog_open.3* -ls -o -name pmemlog_create.3* -ls
   115952 1 -rw-r--r-- 1 ubuntu ubuntu 56 Apr 20 21:09 /tmp/pmdk/usr/local/share/man/man3/pmemlog_open.3.gz
   115890 5 -rw-r--r-- 1 ubuntu ubuntu 2931 Apr 20 21:09 /tmp/pmdk/usr/local/share/man/man3/pmemlog_create.3.gz
(rename-pmdk-1.4)ubuntu@bionic-pmdk:~/pmdk/pmdk-git$ zcat /tmp/pmdk/usr/local/share/man/man3/pmemlog_open.3.gz
.so pmemlog_create.3

The double gzipped symlinks end up in the debs like this:
ubuntu@bionic-pmdk:~/pmdk$ for n in lib*.deb; do dpkg --contents $n|grep -E '\.gz\.gz'; done
lrwxrwxrwx root/root 0 2018-04-17 20:57 ./usr/share/man/man3/pmem_check_version.3.gz.gz -> ../man7/libpmem.7.gz
lrwxrwxrwx root/root 0 2018-04-17 20:57 ./usr/share/man/man3/pmem_deep_drain.3.gz.gz -> pmem_flush.3.gz
lrwxrwxrwx root/root 0 2018-04-17 20:57 ./usr/share/man/man3/pmem_deep_flush.3.gz.gz -> pmem_flush.3.gz
lrwxrwxrwx root/root 0 2018-04-17 20:57 ./usr/share/man/man3/pmem_deep_persist.3.gz.gz -> pmem_flush.3.gz
lrwxrwxrwx root/root 0 2018-04-17 20:57 ./usr/share/man/man3/pmem_drain.3.gz.gz -> pmem_flush.3.gz
lrwxrwxrwx root/root 0 2018-04-17 20:57 ./usr/share/man/man3/pmem_errormsg.3.gz.gz -> ../man7/libpmem.7.gz

summary: - dh_compress doesn't handle already compressed manpages
+ dh_compress doesn't handle already compressed manpages with .so links
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.6 KiB)

This bug was fixed in the package debhelper - 11.3.2ubuntu1

debhelper (11.3.2ubuntu1) cosmic; urgency=medium

  * Merge from Debian testing. Remaining changes:
    - Generate ddebs from debhelper instead of pkg-create-dbgsym
      + Make debhelper Conflict/Replace pkg-create-dbgsym to force it off.
      + Set DBGSYM_PACKAGE_TYPE to ddeb to get correct debian/files output.
    - dh_installchangelogs: Do not install upstream changelog in compat
      level 7 and higher to avoid pointlessly bloating installed packages.

debhelper (11.3.2) unstable; urgency=medium

  * dh_installchangelogs: Fix a second regression that made
    dh_installchangelogs ignore upstream changelogs in the
    source directories. Thanks to gregor herrmann for
    reporting the imcomplete fix. (Closes: #899248)

debhelper (11.3.1) unstable; urgency=medium

  * dh_installchangelogs: Fix logic error that made
    dh_installchangelogs incorrectly ignore explicitly passed
    changelogs. Thanks to Sven Joachim and Rene Engelhard
    for reporting the bug. (Closes: #899248)

debhelper (11.3) unstable; urgency=medium

  [ Niels Thykier ]
  * Buildsystem.pm: Fix use of undefined variable in certain
    error conditions.
  * dh_makeshlibs: Support -VUpstream-Version and -VNone as
    alternative to passing -V or omitting -V respectively.
  * dh_makeshlibs: Make -VUpstream-Version the default in
    compat 12 when -V is omitted. (Closes: #896464)
  * dh_makeshlibs: Correct handling of an explicit -V when
    a source builds multiple library packages and provides
    explicit shlibs files for a subset of them. Previously,
    the -V option could have been ignored for some of the
    packages containing libraries.
  * Dh_Lib.pm: Fall back to a regular mv(1) when rename fails
    with EXDEV (cross mount point moves). This restores
    debhelper's ability to move files between mount points,
    which can happen in dh_builddeb has to correct the
    extension of a binary package built by dpkg-deb.
    Thanks to Evan Krall for the report. (Closes: #897569)
  * dh_missing.1: Consistently mention that dh_missing
    defaults to --list-missing in compat 12. Thanks to
    Robie Basak for spotting the contradicting documentation.
    (Closes: #898161)
  * dh_compress: Avoid adding a duplicate ".gz" extension on
    a symlink if it already has it. This can happen e.g. with
    dh_installman recompresses a manpage that was compressed and
    had a valid symlink to it. Thanks to Andreas Hasenack for
    reporting the bug. (Closes: LP: #1765851)
  * debian/control: Depend on dwz for dh_dwz.
  * dh_dwz: Generate a per-package multifile by default. This
    feature can be disabled by --no-dwz-multifile.
  * dh: Run dh_dwz by default in compat 12.
  * dh_dwz: Remove warning about the dwz feature being experimental.
  * dwz.pm: Ditto.
  * dh_installsystemd: Use the basename of the "tmpfiles" config
    files. This makes "systemd-tmpfiles --create" search for it
    in both /usr/lib/tmpfiles.d and in /etc/tmpfiles.d. With
    this change the system administrator can now override the
    "tmpfiles" config shipped by the package in
    /usr/libtmpfiles.d. Thanks to ...


Changed in debhelper (Ubuntu):
status: New → Fix Released
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.