[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Creating a source tarball for repackaged source using dpkg-source -b



On (09/03/07 23:54), Benjamin Mesing wrote:
> Hello,
> 
> the developer reference describes how to do the repackaging of upstream
> source.
> Among others the following two points are mentioned for the
> repackaged .orig.tar.gz:
>       * should use <packagename>-<upstream-version>.orig as the name of
>         the top-level directory in its tarball. This makes it possible
>         to distinguish pristine tarballs from repackaged ones. 
>       * should be gzipped with maximal compression.
> 
> And it is said, that those points can be met, by using "dpkg-source -b"
> to construct the repackaged tarball from an unpacked directory.
> (http://www.debian.org/doc/manuals/developers-reference/ch-best-pkging-practices.en.html#s-bpp-origtargz)
> 
> How do I invoke dpkg-source to create the .orig.tar.gz file?
> 

I would say that you don't need dpkg-source to, tar + gzip should work
just fine.

Most (all?) builder scripts are happy with just finding an appropriately
named tarball in the correct place. I would try the following steps
(though you probably have done some already).

1. Grab the pristene upstream tarball.
2. Untar somewhere.
3. Remove files as required to make it DFSG free.
3. Rename the base directory that it unpacked to (to add the .orig
   prefix)
4. Run
     tar czf <package>_<upstream-version>.dfsg.orig.tar.gz \
     <package>-<upstream-version>.orig/

   (adjusting paths appropriately)

   I have never checked that tar czf actually produces gzip -9 files, so
   you might need to form a pipeline if not.
5. Then make the Debian changes in the unpacked dir that you created the
   tarball from (or whatever procdure you use). Remebering to document
   what you did to repack in README.Debian-source. You can also provide
   a get-orig-source target in debian/rules that autmates it, but is not
   invoked during the build. The last thing is to get the version
   correct in debian/changelog. It should include the .dfsg suffix that
   you used in the name of the tarfile above, or whatever you chose.
   .dfsg is a good choice if repackaging to meet the DFSG, and any other
   repackaging should be considered carefully, but .ds standing for Debian
   source is a common choice for suffix.

Thanks,

James

-- 
  James Westby   --    GPG Key ID: B577FE13    --     http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256



Reply to: