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

2007-03-22 Thread Justin Pryzby
On Thu, Mar 15, 2007 at 12:22:12PM +, Ben Hutchings wrote:
 On Fri, 2007-03-09 at 23:50 +, James Westby wrote:
 snip
  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.
 snip
 
 It doesn't.  The pipeline would be:
 tar cf - $source_dir | gzip -c9  $tarball
Or set GZIP=-9


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2007-03-22 Thread Chris Lamb
Ben Hutchings [EMAIL PROTECTED] wrote:

 This is what you should do *if* you need to repackage upstream source.
 That is only necessary if it:
 - contains non-DFSG-compliant material, and you want to upload to main
 - is not a gzipped tarball
 - is divided into multiple tarballs

 It is not necesssary to repackage merely to change the directory name
 (dpkg-source -x deals with that automatically) or to improve
 compression.

Mmm. Mentors should (and do!) reject packages that have been unnecessarily
repackaged by checking their MD5 or SHA1 sums against the upstream
version.

-- 
 Chris Lamb, Leamington Spa, UKGPG: 0x634F9A20


signature.asc
Description: PGP signature


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

2007-03-15 Thread Ben Hutchings
On Fri, 2007-03-09 at 23:54 +0100, 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.

This is what you should do *if* you need to repackage upstream source.
That is only necessary if it:
- contains non-DFSG-compliant material, and you want to upload to main
- is not a gzipped tarball
- is divided into multiple tarballs

It is not necesssary to repackage merely to change the directory name
(dpkg-source -x deals with that automatically) or to improve
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 think if you have the original source unpacked in the directory
$name-$version.orig and the Debian-modified source in the directory
$name-$version then dpkg-source -b $name-$version will use
$name-$version.orig to build the orig.tar.gz.

Ben.

-- 
Ben Hutchings
Teamwork is essential - it allows you to blame someone else.


signature.asc
Description: This is a digitally signed message part


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

2007-03-15 Thread Ben Hutchings
On Fri, 2007-03-09 at 23:50 +, James Westby wrote:
snip
 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.
snip

It doesn't.  The pipeline would be:
tar cf - $source_dir | gzip -c9  $tarball

Ben.

-- 
Ben Hutchings
Teamwork is essential - it allows you to blame someone else.


signature.asc
Description: This is a digitally signed message part


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

2007-03-09 Thread Benjamin Mesing
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 have tried specifying the location of the changelog and the control
file (using -l and -c)
dpkg-source -b -lchangelog -ccontrol unmodified-source-dir
but this created a file: umlet_7.1-1.tar.gz with an unchanged top level
directory.
I've also tried:
dpkg-source -sU -b -lchangelog -ccontrol unmodified-source-dir 
unmodified-source-dir
which created (among others) a umlet_7.1.orig.tar.gz but still the top
level directory remained unchanged.


Help would be appreciated!

Regards Ben


-- 
Please do not send any email to [EMAIL PROTECTED] -- all email not
originating from the mailing list will be deleted. Use the reply to
address instead.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2007-03-09 Thread James Westby
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)T0AM - secp256r1/nistp256


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2007-03-09 Thread James Westby
On (09/03/07 23:50), James Westby wrote:
 On (09/03/07 23:54), Benjamin Mesing wrote:
  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.

Sorry, I was referring to things like dpkg-buildpackage, debuild etc.
They all call dpkg-source from an unpacked directory and create the
tarball if it is not present. However most work if you provide a tarball
to start with, and they will use that. I find this good as it means you
can create the tarball in the simple manner so that you know what
happens, and that you don't need to worry about the options to pass to
dpkg-source.

If you are actually looking to do it with dpkg-source then that is
possible to. It would probably be a good learning experience, but if you
are just looking to get on with it, then you may find the method I
outlined easier.

Thanks,

James

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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]