7

What is the correct naming convention for a patched package?

I am trying to put together a version of exiv2 with patch to add an extra schema.

here is what I have done so far:

$ sudo apt-get build-dep exiv2
$ cd src/exiv2
$ apt-get source exiv2
$ cd exiv2-0.23-1ubuntu2
 ... apply patch
$ dpkg-source --commit
$ dch -i
    exiv2 (0.23-1ubuntu2-DwC1) trusty; urgency=medium
$ debuild -S -sd -k1230CB40

But I then get an error message:

This package has a Debian revision number but there does not seem to be an appropriate original tar file or .orig directory in the parent directory; (expected one of exiv2_0.23-1ubuntu2.orig.tar.gz, exiv2_0.23-1ubuntu2.orig.tar.bz2, exiv2_0.23-1ubuntu2.orig.tar.lzma, exiv2_0.23-1ubuntu2.orig.tar.xz or exiv2-0.23-1ubuntu2.orig) continue anyway? (y/n) y

dpkg-source -b exiv2-0.23-1ubuntu2 dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../exiv2_0.23-1ubuntu2.orig.tar.{bz2,gz,lzma,xz} dpkg-buildpackage: error: dpkg-source -b exiv2-0.23-1ubuntu2 gave error exit status 255 debuild: fatal error at line 1364: dpkg-buildpackage -rfakeroot -d -us -uc -S -sd failed

$ ls ..
exiv2-0.23-1ubuntu2  exiv2_0.23-1ubuntu2.debian.tar.gz  exiv2_0.23-1ubuntu2.dsc  exiv2_0.23-1ubuntu2-DwC1_source.build  exiv2_0.23.orig.tar.gz

What do I need to do to allow debuild to recognize the original tar file?

4

The problem is the -DwC1 in your version string. Per Debian policy the upstream version can contain . + - : ~ but the debian revision can only contain + . ~, so everything before -DwC1 is considered part of the upstream version, and so it is looking for an original tarball with that version.

dch gives a clue about this when you added that entry:

dch warning: your current directory has been renamed to:
../exiv2-0.23-1ubuntu2
dch warning: no orig tarball found for the new version.

Usually when I do a ppa upload of a package I will bump the ubuntu version and add something like ~ppa0 and usually the target release, say ~trusty. So for instance 1ubuntu2 to 1ubuntu3~ppa0~trusty. The extra strings with ~ will cause the version to compare less than 1ubuntu3 so if the package is updated in the main repositories the user will get the newer version.

Really though all you need to do is drop the hyphen from your version, so 1ubuntu2DwC1 would work, or maybe 1ubuntu2.DwC1.

  • If I use exiv2-0.23-1ubuntu3~DwC1 dch renames the current directory. I don't think that is what I want either. But exiv2-0.23-1ubuntu2DwC1 works! – asp Apr 19 '14 at 18:20
  • @asp Strange, 0.23-1ubuntu3~DwC1 is working fine here. – Jason Conti Apr 19 '14 at 18:25
  • @asp Oh I bet I know what the problem was. If you continued working from your source directory where you named the version -DwC1 then changed the version to ~DwC1 dch will rename the directory back, but it shouldn't get you the dch warning: no orig tarball found for the new version. warning. So it was probably okay. – Jason Conti Apr 19 '14 at 18:39

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.