I'm attempting to backport Clang 3.2 to Quantal from Raring. Thinking this would be a relatively painless process, I ran the following command:

backportpackage -s raring -d quantal -u ppa:george-edison55/clang3.2-backports clang

The package was uploaded to the PPA without any errors and built without any errors as well. Unfortunately, it cannot be installed because the debian/control file contains the following dependencies:

Depends: ... libgcc-4.7-dev, libobjc-4.7-dev ...

Those packages do not exist in Quantal. The contents of those packages is contained in the gcc-4.7 Install gcc-4.7 and gobjc-4.7 Install gobjc-4.7 packages instead. My problem is that I have no idea how to make the change before uploading the package to my PPA.

I tried instructing backportpackage not to upload to my PPA and dump the files in /tmp/clang3.2 where I edited them. However, attempting to upload the package simply results in the original .tar.gz being downloaded again and overwriting my changes.

What is the proper way of doing this?


Even though there's -w option that tells backportpackage to preserve the working directory, there's still no way to tell it keep the unpacked (and modified) sources as well. So here's what worked for me:

  1. Copy the program locally to modify it:

    cp /usr/bin/backportpackage ~

  2. Open the local file and find do_backport function. Its last line should look like


  3. Delete that line, save the file, and run the script as you normally do it, make sure to provide -w option to specify the working directory.

  4. Go to the working directory. There should be sub-directory with the name like <package>-<dist>, e.g. gcc-xenial.
  5. cd to that directory, do whatever changes you want to do.
  6. Make a debian package. Sign and upload the result:

    debuild --no-lintian -S -nc -uc -us -sd

    debsign ../<package-version>_source.changes

    dput -u ppa:<user>/<repo> <package-version>_source.changes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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