Ubuntu – Cannot build on launchpad

aptlaunchpadpackagingppa

I have succesfully uploaded my app to launchpad:However it fails to build on both i386 and amd64.
Here is the link:
https://launchpad.net/~mkamenjak/+archive/ubuntu/bugappppa/+packages

Here is the build log from launchpad:
https://launchpadlibrarian.net/190190054/buildlog_ubuntu-utopic-amd64.bugapp_1-2ubuntu2_FAILEDTOBUILD.txt.gz

Here are the contents of my debian/control file:

    Source: bugapp
    Section: web
    Priority: optional
    Maintainer: Mario Kamenjak <mkamenjak77@gmail.com>
    Build-Depends: debhelper (>= 9)
    Standards-Version: 3.9.5
    Homepage: <insert the upstream URL, if relevant>

    Package: bugapp
    Architecture: any
    Depends: ${shlibs:Depends}, ${misc:Depends}
    Description: A webapp for bug.hr
     <insert long description, indented with spaces>

Here are the contents of my debian/rules file:

    #!/usr/bin/make -f
    %:
        dh $@

Why does it not build and how exactly do I fix this?

Note: I never packaged anything before.No experience in either .deb or .rpm packaging whatsoever.

Best Answer

Dobey's answer, it is more easy/quick to track dependencies using pbuild or sbuild. Check SimpleBuild.

However if you have small tool to package with low bandwidth connect, myself prefer building on launchpad directly as I don't have a ready setup of chroot environment, sometimes working on low resource machine.

From the buildlog:

   dh_auto_test -a
make[1]: Entering directory '/build/buildd/bugapp-1'
qmltestrunner -input tests/unit
make[1]: qmltestrunner: Command not found
Makefile:18: recipe for target 'check' failed
make[1]: *** [check] Error 127
make[1]: Leaving directory '/build/buildd/bugapp-1'
dh_auto_test: make -j1 check returned exit code 2

It clear that you need the qmltestrunner tool for build, check it's package:

$ dpkg -S qmltestrunner
qtdeclarative5-dev-tools: /usr/lib/x86_64-linux-gnu/qt5/bin/qmltestrunner
qtchooser: /usr/bin/qmltestrunner
  1. So add them to build dependencies.

     Build-Depends: debhelper (>= 9), qtdeclarative5-dev-tools, qtchooser
    
  2. Then upload it again.

Update:

I have used pbuild long time ago and I looked again for new things. I think cowbuilder is the simplest available tool.

  1. Install it.

     sudo apt-get install cowbuilder
    
  2. Edit the pbuildrc config

     # this is your configuration file for pbuilder.
     # the file in /usr/share/pbuilder/pbuilderrc is the default template.
     # /etc/pbuilderrc is the one meant for overwriting defaults in
     # the default template
     #
     # read pbuilderrc.5 document for notes on specific options.
     MIRRORSITE=archive.ubuntu.com/ubuntu
    
     COMPONENTS="main universe"
    

    Two known problems:

    • The MIRRORSITE=archive.canonical.com/ubuntu will not work. (seen in trusty, no such problem in wily)
    • COMPONENTS="main universe", default is main only, universe is needed for cowdancer.
  3. Create the cow image

     sudo cowbuilder --create
    
  4. Build your debian source pacakge

     sudo cowbuilder --build yourpackage.dsc
    
  5. Find the built packages in:

     /var/cache/pbuilder/result/
    

Reference:

Debian Wiki: cowbuilder (pbuilder wrapper)
LP Bug#747053: cowbuilder requires universe to be enabled in pbuilderrc

Related Question