Bug#971432: debhelper: Build fails when transitional package is configured in control file

2020-09-30 Thread Arjen Balfoort

On Wed, 30 Sep 2020 19:25:12 +0200 Niels Thykier  wrote:
> Hi,
>
> You have hit an intentional design choice from debhelper - one that I am
> admittedly have been considering to change for exactly this the problem
> you are running into.
>
> What happens is that debhelper special-cases "single-binary packages"
> (namely dh_auto_install defaults to "--destdir=debian/" rather
> than --destdir=debian/tmp" in this case). In compat 13, the dh_missing
> warning becomes an error preventing you from accidentally uploading the
> two empty packages - but it is still an unpleasant experience.
>
> If you need a second /empty/ binary, then you can override
> dh_auto_install and set dh_auto_install --destdir=debian/ 
for now.

>
> I am leaving this open until I figure out what to do about this 
corner case.

>
> Thanks,
> ~Niels
>
>

Thanks for your fast reply.
Your suggested workaround worked perfectly.

For those coming to this page, the new rules file is attached.

#!/usr/bin/make -f
export DH_VERBOSE = 1

%:
dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_install:
# Set destination directory when co-building a transition package
dh_auto_install --destdir=debian/debhello


Bug#971432: debhelper: Build fails when transitional package is configured in control file

2020-09-30 Thread Niels Thykier
Arjen Balfoort:
> Package: debhelper
> Version: 13.2.1
> Severity: normal
> X-Debbugs-Cc: arjenbalfo...@hotmail.com
> 
> Dear Maintainer,
> 
> * What led up to the situation?
> I needed a package name change of a pybuild package.
> 
> * What exactly did you do (or not do) that was effective (or ineffective)?
> I added the configuration of the transitional package to the package
> control
> file.
> 
> * What was the outcome of this action?
> dh_missing threw the following warning on all files:
> dh_missing: warning: usr/bin/hello exists in debian/tmp but is not
> installed to
> anywhere
> 
> Resulting in two empty packages: the new named package and the old
> (transitional) package.
> 
> * What outcome did you expect instead?
> A complete package with a new name and an empty transitional package
> with the
> old name.
> 
> Note: after removing the configuration of the transitional package the
> new package was built correctly.
> 
> 
> 
> [...]


Hi,

You have hit an intentional design choice from debhelper - one that I am
admittedly have been considering to change for exactly this the problem
you are running into.

What happens is that debhelper special-cases "single-binary packages"
(namely dh_auto_install defaults to "--destdir=debian/" rather
than --destdir=debian/tmp" in this case).  In compat 13, the dh_missing
warning becomes an error preventing you from accidentally uploading the
two empty packages - but it is still an unpleasant experience.

If you need a second /empty/ binary, then you can override
dh_auto_install and set dh_auto_install --destdir=debian/ for now.

I am leaving this open until I figure out what to do about this corner case.

Thanks,
~Niels



Bug#971432: debhelper: Build fails when transitional package is configured in control file

2020-09-30 Thread Arjen Balfoort

Package: debhelper
Version: 13.2.1
Severity: normal
X-Debbugs-Cc: arjenbalfo...@hotmail.com

Dear Maintainer,

* What led up to the situation?
I needed a package name change of a pybuild package.

* What exactly did you do (or not do) that was effective (or ineffective)?
I added the configuration of the transitional package to the package control
file.

* What was the outcome of this action?
dh_missing threw the following warning on all files:
dh_missing: warning: usr/bin/hello exists in debian/tmp but is not 
installed to

anywhere

Resulting in two empty packages: the new named package and the old
(transitional) package.

* What outcome did you expect instead?
A complete package with a new name and an empty transitional package 
with the

old name.

Note: after removing the configuration of the transitional package the 
new package was built correctly.




-- System Information:
Distributor ID: Solydxk
Description: SolydK 11 64-bit
Release: 11
Codename: solydxk-11
Architecture: x86_64

Kernel: Linux 5.8.0-2-amd64 (SMP w/16 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:nl
Shell: /bin/sh linked to /usr/bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debhelper depends on:
ii autotools-dev 20180224.1
ii dh-autoreconf 19
ii dh-strip-nondeterminism 1.9.0-1
ii dpkg 1.20.5
ii dpkg-dev 1.20.5
ii dwz 0.13-5
ii file 1:5.38-5
ii libdebhelper-perl 13.2.1
ii libdpkg-perl 1.20.5
ii man-db 2.9.3-2
ii perl 5.30.3-4
ii po-debconf 1.0.21

debhelper recommends no packages.

Versions of packages debhelper suggests:
pn dh-make 

Source: debhello
Section: devel
Priority: optional
Maintainer: My Name 
Build-Depends: debhelper-compat (= 12)
 , dh-python
 , python3-all
Standards-Version: 4.5.0
Homepage: 
Vcs-Git: 
X-Python3-Version: >= 3.6

Package: debhello
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}
 , ${python3:Depends}
 , gir1.2-gtk-3.0
 , python3-gi
Description: example package in the debmake-doc package
 This is an example package to demonstrate Debian packaging using
 the debmake command.

Package: myfirst-debhello
Architecture: all
Section: oldlibs
Depends: debhello, ${misc:Depends}
Description: transitional package
 This is a transitional package. It can safely be removed.
#!/usr/bin/make -f
export DH_VERBOSE = 1

%:
dh $@ --with python3 --buildsystem=pybuild
debuild output WITH transitional package in control file:


$ debuild
 dpkg-buildpackage -us -uc -ui
dpkg-buildpackage: info: source package debhello
dpkg-buildpackage: info: source version 1.0
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by My Name 
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
 fakeroot debian/rules clean
dh clean --with python3 --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
pybuild --clean -i python{version} -p 3.8
I: pybuild base:217: python3.8 setup.py clean 
running clean
removing '/home/shared/Development/dev/debhello/.pybuild/cpython3_3.8/build' 
(and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.8' does not exist -- can't clean it
rm -rf .pybuild/
find . -name \*.pyc -exec rm {} \;
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
rm -f debian/debhelper-build-stamp
rm -rf debian/.debhelper/
rm -f -- debian/debhello.substvars debian/myfirst-debhello.substvars 
debian/files
rm -fr -- debian/debhello/ debian/tmp/ debian/myfirst-debhello/
find .  \( \( \
\( -path .\*/.git -o -path .\*/.svn -o -path .\*/.bzr -o -path 
.\*/.hg -o -path .\*/CVS -o -path .\*/.pc -o -path .\*/_darcs \) -prune -o 
-type f -a \
\( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
 -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
 -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
 -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
\) -exec rm -f {} + \) -o \
\( -type d -a -name autom4te.cache -prune -exec rm -rf {} + \) 
\)
 dpkg-source -b .
dpkg-source: info: using source format '3.0 (native)'
dpkg-source: info: building debhello in debhello_1.0.tar.xz
dpkg-source: info: building debhello in debhello_1.0.dsc
 debian/rules build
dh build --with python3 --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
pybuild --configure -i python{version} -p 3.8
I: pybuild base:217: python3.8 setup.py config 
running config
   dh_auto_build -O--buildsystem=pybuild
pybuild --build -i python{version} -p 3.8
I: pybuild base:217: /usr/bin/python3 setup.py build 
running build