Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 3 down vote accepted

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)

share|improve this answer
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. – anatoly techtonik Dec 28 '13 at 7:27
@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 W. Dec 28 '13 at 7:36
I wish I knew that before starting… The error log is at 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. – anatoly techtonik Dec 28 '13 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 W. Dec 28 '13 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 W. Dec 28 '13 at 8:05

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.