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

dh_wraporig [was: Creating a source tarball for repackaged source...]



I hacked up a small script dh_wraporig
http://svn.debian.org/wsvn/pkg-exppsy/tools/dh_wraporig
for the cases when

* repackaging is required to remove some non-dfsg content

* wrapping original source-ball is desired (.xpi for ice*
extension, or even if .zip/.rar is shipped) to preserve the original
sources for easy confirmation of their authenticity

Customization of the parameters is done via their definition in
debian/dh_wraporig.local.

Now, whenever a new upstream version comes out, dh_wraporig is called by uscan
and my new fresh .orig.tar.gz is created for me automatically with
undesired content removed, or original source wrapped in the tarball and then
optional command ran (like svn-upgrade) on the generated tarball. Also I get an
updated debian/README.Debian-source file which looks like

,----
| README on source packaging of remake:
| --------------------------------------------------------------
|
| The source tarball of the package was generated by
| dh_wraporig v.0.1.236 script which
| can be obtained from alioth's exppsy project repository:
| http://svn.debian.org/wsvn/pkg-exppsy/tools/dh_wraporig
|
| For this package dh_wraporig performed following actions:
| * Extracted files from
|  md5:23428d1d5e85774b2a4149ef01fddaac  ../remake_3.80+dbg0.62.orig.tar.gz
| * Removed following files/directories:
|  doc/make.{texi,info*,html} doc/{make-stds,fdl}.*
|
| Additional information:
| * Following patches were present to be applied to the original source
|  at build time
| 00-dfsg-no-makedoc
| 00-correct-info-title
`---

debian/dh_wraporig.local for this case looks like
,---
| # later on should be changed to svn-upgrade
| # but now that would just annoy
| post_command=
|
| #
| # files/directories to delete. bash patterns
| delete_files='doc/make.{texi,info*,html} doc/{make-stds,fdl}.*'
|
| #
| # suffix to attach
| suffix_out=~dfsg
|
| #
| # for now we better simply create a symlink
| do_orig_symlink=" pleasedo ;-) "
|
| #
| # do we need original tarball? I guess so for now,
| # if not - uncomment
| #do_delete_originals=" kill the beast "
|
| #
| # Create README.Debian-source
| do_create_readme=" of course "
`---
Then in collaboration with uscan's
,-----------------------------------------------------------
| opts="versionmangle=s/-//,dversionmangle=s/~dfsg\.\d+$//"
`---
at the end I am effortlessly getting
,-----------------------------------
| remake-3.80+dbg0.62~dfsg.1.tar.gz
`---

This way anyone who gets this source can confirm the authenticity of upstream
tarball, and can replicate all the steps which were done to ship debian version
of the upstream source. Otherwise, I found it difficult some times to
figure out what was actually done to the upstream source and what tarball was
actually used to generate .orig.tar.gz.

May be an improved version of such script can become a part of debhelper utils
- that would unify things a bit.

-- 
Yaroslav Halchenko
Research Assistant, Psychology Department, Rutgers-Newark
Student  Ph.D. @ CS Dept. NJIT
Office: (973) 353-5440x263 | FWD: 82823 | Fax: (973) 353-1171
        101 Warren Str, Smith Hall, Rm 4-105, Newark NJ 07102
WWW:     http://www.linkedin.com/in/yarik        



Reply to: