• Override dh_builddeb destdir causes dpkg-genbuildinfo to fail

    From Kerry@21:1/5 to All on Mon Nov 1 22:40:02 2021
    Hi,

    I am trying to package my Python application into a Debian package. So far this is successful in that I get a binary .deb in the parent directory of my application directory. I would like to change this so that all .debs are placed in a different
    directory so I tried overriding 'dh_builddeb' in 'rules':

    override_dh_builddeb:
        mkdir ./deb_package
        dh_builddeb --destdir=./deb_package

    This successfully puts the package in the desired directory but the next stage of the packaging fails:

    dh_gencontrol
    dpkg-gencontrol: warning: unknown information field 'Version' in input data in package's section of control info file
    dpkg-gencontrol: warning: package skriblr: substitution variable ${shlibs:Depends} unused, but is defined
    dpkg-gencontrol: warning: unknown information field 'Version' in input data in package's section of control info file
    dpkg-gencontrol: warning: package skriblr: substitution variable ${shlibs:Depends} unused, but is defined
       dh_md5sums
       debian/rules override_dh_builddeb
    make[1]: Entering directory '/home/kerry/PycharmProjects/pydraw'
    mkdir ./deb_package
    dh_builddeb --destdir=./deb_package
    dpkg-deb: building package 'skriblr' in './deb_package/skriblr_0.1-1_amd64.deb'.
    dpkg-deb: building package 'skriblr-dbgsym' in 'debian/.debhelper/scratch-space/build-skriblr/skriblr-dbgsym_0.1-1_amd64.deb'.
        Renaming skriblr-dbgsym_0.1-1_amd64.deb to skriblr-dbgsym_0.1-1_amd64.ddeb
    make[1]: Leaving directory '/home/kerry/PycharmProjects/pydraw'
     dpkg-genbuildinfo --build=binary
    dpkg-genbuildinfo: error: cannot fstat file ../skriblr-dbgsym_0.1-1_amd64.ddeb: No such file or directory
    dpkg-buildpackage: error: dpkg-genbuildinfo --build=binary subprocess returned exit status 255

    The cause of the failure is obvious but I cannot find how to specify a different input directory to 'dpkg-genbuildinfo'. Is there another dh_*** function I need to override to do this or something else?

    As an alternate means I tried moving the .deb at the end of override_dh_builddeb:

    override_dh_builddeb:
        rm -rf ./deb_package
        mkdir ./deb_package
        dh_builddeb
        mv ../skriblr*.deb ./deb_package
        mv ../skriblr*.ddeb ./deb_package

    But this causes a similar issue to above:

    dh_gencontrol
    dpkg-gencontrol: warning: unknown information field 'Version' in input data in package's section of control info file
    dpkg-gencontrol: warning: package skriblr: substitution variable ${shlibs:Depends} unused, but is defined
    dpkg-gencontrol: warning: unknown information field 'Version' in input data in package's section of control info file
    dpkg-gencontrol: warning: package skriblr: substitution variable ${shlibs:Depends} unused, but is defined
       dh_md5sums
       debian/rules override_dh_builddeb
    make[1]: Entering directory '/home/kerry/PycharmProjects/pydraw'
    rm -rf ./deb_package
    mkdir ./deb_package
    dh_builddeb
    dpkg-deb: building package 'skriblr' in '../skriblr_0.1-1_amd64.deb'.
    dpkg-deb: building package 'skriblr-dbgsym' in 'debian/.debhelper/scratch-space/build-skriblr/skriblr-dbgsym_0.1-1_amd64.deb'.
        Renaming skriblr-dbgsym_0.1-1_amd64.deb to skriblr-dbgsym_0.1-1_amd64.ddeb
    mv ../skriblr*.deb ./deb_package
    mv ../skriblr*.ddeb ./deb_package
    make[1]: Leaving directory '/home/kerry/PycharmProjects/pydraw'
     dpkg-genbuildinfo --build=binary
    dpkg-genbuildinfo: error: cannot fstat file ../skriblr-dbgsym_0.1-1_amd64.ddeb: No such file or directory
    dpkg-buildpackage: error: dpkg-genbuildinfo --build=binary subprocess returned exit status 255

    Thanks,

    Kerry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rahmatullin@21:1/5 to Kerry on Mon Nov 1 23:10:01 2021
    On Mon, Nov 01, 2021 at 09:24:29PM +0000, Kerry wrote:
    I get a binary .deb in the parent directory of my application directory.
    I would like to change this so that all .debs are placed in a different directory so I tried overriding 'dh_builddeb' in 'rules':
    d/rules is a wrong place for this, for several reasons. Don't do this.

        Renaming skriblr-dbgsym_0.1-1_amd64.deb to skriblr-dbgsym_0.1-1_amd64.ddeb
    And this isn't even Debian.

    --
    WBR, wRAR

    -----BEGIN PGP SIGNATURE-----

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmGAZYYtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh 2IMQAIjrsI/dSy2E+G+YbetJoDKghyZonPgHmfIMpKfnRenLM29f8keZaFSxWz3u sugsMlkaXArb0rQyFa5pkwnHbykJArYWbSlTe9oY6zsYmpG5sWoyNQAdb5yebCkE 8jnZbh+YEBcF2qakQi2NBoTfGDUiIbtVW2K4Xfsf3p2pir9mAbWR503NKDnjTarQ 51WLv44slv8nZBN51rWjtGjM7VmVWNE1ff+jYMG+1YNbO+iOPOKEGwO336QroXdM 2gMoydB1A4ics2IM9HUhgAqeoWMqCmbwNS3gZAEo8HZQYvMlYVeYdhSdpi1RSieh 9ZYA+qgC8VnSFeikg2XwVU0d5hp/tUjyBDjsoQabekKTnT+RsYBD0EEOKDyY3otZ 55v3lc9BsisW38oeB1S/dqHgSg8i/DsSXo979nvoIEKKSWW601XK9eoyeLZhC/zI MqNUCJ5wF70KuFinA60rIqIo865oBqo9apPQ0HbnvivRqLsssHEAPUPxXUUsGJ2H rERxy3Lb9RjehgYWVZtshp0+Mojqsm1Q9eq0GQnlsyVB+SZlNBoOps+SWbZs7nnQ qletkrNBVcmAJzM+fd/zCn3f5j6AfLbLXG2GE/YTqzYhqO/uclylSMV3BPuFpSs/ ptLj7KRItYRsjOZIKKg44FGdC3PG5dm4fbFEg33hV7V6/Ga+
    =GC1T
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)