tar_1.29b-2ubuntu0.3 fails to build with nodoc build profile

Bug #1965438 reported by Alex Kompel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tar (Ubuntu)
New
Undecided
Unassigned

Bug Description

tar source package fails to build with nodoc build profile (DEB_BUILD_PROFILES="nodoc")

$ lsb_release -rd
Description: Ubuntu 18.04.6 LTS
Release: 18.04

$ apt-get source tar
$ cd tar-1.29b
$ DEB_BUILD_PROFILES="nodoc nocheck" debuild -us -uc
...
dh_testdir
dh_testroot
dh_installdocs
mv -f debian/tar/usr/share/doc/tar/ChangeLog \
        debian/tar/usr/share/doc/tar/changelog
mv: cannot stat 'debian/tar/usr/share/doc/tar/ChangeLog': No such file or directory
debian/rules:87: recipe for target 'binary-arch' failed
make: *** [binary-arch] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2

-----

dh_installdocs and dh_installman are no-op under nodoc profile so build script should not assume that doc files are present:

diff -ru tar-1.29b.orig/debian/rules tar-1.29b/debian/rules
--- tar-1.29b.orig/debian/rules 2022-03-17 10:58:33.940191507 -0700
+++ tar-1.29b/debian/rules 2022-03-17 11:29:57.061510969 -0700
@@ -88,15 +88,15 @@
        dh_testroot
        dh_installdocs
        mv -f debian/tar/usr/share/doc/tar/ChangeLog \
- debian/tar/usr/share/doc/tar/changelog
+ debian/tar/usr/share/doc/tar/changelog || true
        mv -f debian/tar/usr/share/doc/tar/ChangeLog.1 \
- debian/tar/usr/share/doc/tar/changelog.1
+ debian/tar/usr/share/doc/tar/changelog.1 || true
        dh_installexamples
        dh_installmenu
        dh_installcron
        dh_installman doc/tar.1 doc/rmt.8 debian/tarcat.1
        mv debian/tar/usr/share/man/man8/rmt.8 \
- debian/tar/usr/share/man/man8/rmt-tar.8
+ debian/tar/usr/share/man/man8/rmt-tar.8 || true
        dh_installinfo
        rm -f debian/tar/usr/share/info/dir*
        dh_installmime

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.