3

I am trying to use pbuilder to upload to PPA. Package builds ok with the command:

sudo pbuilder build <package>_<version>.dsc

But upload fails with error:

Source/binary (i.e. mixed) uploads are not allowed.

It is said that I need to use pdebuild to build source package, but pdebuild doesn't resolve build dependencies. How can I build this package, so it can be finally uploaded? I don't want to install dependencies manually.

2 Answers 2

4

The answer is that you don't. pbuilder takes the source package and builds binaries. It also can take the source code without a source package built and create the binaries that you would either host yourself or add to your own debian repository systems to host on your own.

That's not what you need for a PPA.


What you want to do, and what I strongly recommend, is that you follow traditional packaging procedures, and run debuild -S on the code, with the directory for the package there, containing the source code, the debian/ folder, and everything else.

Then, after you've built the source package by debuild -S, you can then upload the created .changes file in one directory above the source directory to the PPA via dput. (this step is referred to on Launchpad's PPA Uploading help docs).

You can in theory use pdebuilder to keep your system clean and build inside a chroot, but read on for my statements on this, as to why it failed previously for you.


Per the comments, you have correctly identified that debhelper is unable to find the autoreconf plugin.

Also as I said in my comments on this answer, pbuilder and pdebuilder are both not smart enough to determine the debhelper dependencies.

To solve your issue so that your stuff can build, you will have to manually use pbuilder or pdebuilder to login to the chroot. Then, you will have to manually install dh-autoreconf into the chroot, usually with apt-get install dh-autoreconf after you've logged into the chroot.

Once you've done that, and saved the state of the chroot, you should be able to pbuilder or pdebuilder your package.

(However, I prefer traditionally working with packages, and I don't care if my build system is entirely clean or not, all I really build are source packages, and the debhelper plugins aren't going to clutter my system that badly)

10
  • I need pbuilder to make clean builds without installing anything on my system. If I just execute debuild -S, it fails with error message with unsatisfied dependencies. pbuilder had pdebuild command, so I thought it is used to build source packages with tools from chroot. Dec 28, 2013 at 7:27
  • 1
    @techtonik That may be the case, however, for your chroot you'll have to install the specific debhelper packages anyways. What's the specific errors you got? (Unsatisfied deps during debuild -S indicates that you've got a special package that requires additional debhelper stuff, and usually requiring some things to be pre-built and uploaded for the builders to work with it, and neither pdebuilder nor pbuilder won't be able to automatically handle that, as a case in point, your attempts.)
    – Thomas Ward
    Dec 28, 2013 at 7:36
  • I wish I knew that before starting askubuntu.com/questions/395584/… The error log is at pastebin.ca/2519158 and it seems that I need this dh-autoreconf. I really hoped that pbuilder is the tool not only to run chroot, but also to resolve dependencies. Dec 28, 2013 at 7:59
  • @techtonik ultimately, you can login to your chroot and force it to install dh-autoreconf but the chroot is the same as the standard debuild -S to that extent, if it has certain debhelper dependencies those have to be installed either by yourself to your system OR installed manually into the chroot. Ultimately, while pdebuilder and pbuilder are smart, they aren't smart enough to determine what debhelper dependencies that need to be installed (they're smart to read the build-deps lines, in debian/control, but that doesn't dictate the debhelper dependencies.)
    – Thomas Ward
    Dec 28, 2013 at 8:01
  • (out of space) Ultimately, what pbuilder and pdebuilder do, as far as I can tell, is run the debuild or debuild -S inside the chroot with all the build deps, but that's pretty identical to me doing debuild (or debuild -S after debhelper stuff is installed) after installing the build-deps myself. You have to read through the logs either way to figure out WHY your stuff failed, but ultimately, the end result is the same either way, you still need to install debhelper dependencies by hand beforehand, so the source package has all the stuff in it that it needs to build.
    – Thomas Ward
    Dec 28, 2013 at 8:05
2

pbuilder is used to build binary packages from a source package. PPAs also build binary packages from source packages. Simply dput the source.changes file that you created when you also created the <package>_<version>.dsc file.

One of the main points in using pbuilder is to locally mimic the clean chroot environment that is used to build the binary packages both in the official archives and in PPAs.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .