5

I need to build a DEB package from mainly Node.js Javascript files, but it should include some binary files as well. They are listed inside debian/source/include-binaries. Otherwise I get the error message

dpkg-source: error: unrepresentable changes to source

The command in question is:

bzr builddeb -- -us -uc

After adding the file include-binaries, when running bzr builddeb -- -us -uc again, now I get a different error: It says

dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/mailadmin_0.0-1.diff.n6m5_6

I have no idea how to get rid of this.

In the next line of output it tells me

dpkg-source: info: you can integrate the local changes with dpkg-source --commit

But if I run this command in the build area of my package, it gives me the unrepresentable changes to source error message again, even though debian/source/include-binaries is present in the build area as well.

I am missing the way out of this...

I tried deleting all files that are produced by the build process, still no success.

Further details:

The target directory is /opt/mailadmin. Since this directory is unusual, I listed it in the file debian/mailadmin.install (which contains one line:)

opt/mailadmin opt/

The bzr builddeb process uses this file as expected.

There is no upstream tarball, because the project is new.

2
  • What are these binaries? Are they executable files? Jun 4, 2014 at 14:19
  • Mostly images, but one executable as well.
    – user22611
    Jun 5, 2014 at 8:21

1 Answer 1

2

Your error doesn't have anything to do with binary file. Though it does sound extremely similar. (Might be worth filing a bug on dpkg about better error messages in these cases.) If it was about a binary file it would look like:

dpkg-source: error: cannot represent change to package_name-X.Y/debian/some_binary_file.png: binary file contents changed

And even then, it would only happen if you were using an old style version 1.0 source package.

This has to do with the upstream tarball. If you're really using bzr builddeb -- -us -uc you must have convinced bzr builddeb you have an upstream tarball or it would have errored looking for one. The contents of whatever tarball you created don't match the contents of the bzr branch, so you get the error about "unexpected upstream changes."

The simplest way to deal with this case is to pass the --split flag:

bzr builddeb --split -- -us -uc

From bzr help builddeb:

  --split               Automatically create an .orig.tar.gz from a full
                        source branch.

This simply puts everything outside of /debian into a tarball and uses that.

3
  • Thanks for your input. Now I am building in split mode and I am happy with that. Unfortunately, the packaging guide did not say a word about split mode: packaging.ubuntu.com/html/packaging-new-software.html . Now bzr builddeb -- -us -uc always builds the package, even when building in normal mode without any pre-existing .tar.gz files. I do not know why exactly, but I am happy with this result :-)
    – user22611
    Jun 5, 2014 at 8:16
  • Right. That guide is more concerned with packaging for the official Ubuntu archives, and in that case you'd want the proper upstream tarball. You don't need to use --split again as the created tarball is still around. If you delete it, you'll need to do that again. Jun 5, 2014 at 14:34
  • I just applied a quilt patch to a package to get it to work with ubuntu better and got this error building. Is --split still the recommended method to proceed?
    – Seth
    Oct 18, 2014 at 17:23

You must log in to answer this question.

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