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

Re: Using a script to generate orig tarball



On Jan 1, 2008 9:51 AM, Miriam Ruiz <little.miry@gmail.com> wrote:
> 2008/1/1, Emmet Hikory <emmet.hikory@gmail.com>:
> > On Jan 1, 2008 7:34 PM, Andres Mejia wrote:
> > > I submitted a patch for svn-buildpackage that allows for using a
> > > script to download and generate an orig tarball. Take a look at
> > > http://bugs.debian.org/458508
> > >
> > > I was wondering what anyone here might think of this.
> >
> >     I'd like to advocate that this script either be the application of
> > the watch file, or a get-orig-source rule in debian/rules, rather than
> > a seprarately maintained script.  On the other hand, I like having an
> > orig.tar.gz available in a common location, as this make it easy to
> > preserve state when there is a repack (e.g. upstream is a zip file).
>
> I usually implement that in a get-orig-source target in debian/rules.
> It's a good idea to also document whatever you might have removed in
> Debian.README file, so that end users might be aware of it. It's
> important to have the get-orig-source target for me, but more for
> visual inspection of what must be done than for really automaticing
> the download.
>
> In any case, whenever the repackaging has been made, I prefer to
> upload it to tarballs and stick to it, so that the MD5 of the package
> doesn't change. Once the orig file has been uploaded to debian, it
> cannot be changed, anyway.
>
> Greetings, and happy new year!
> Miry

I revised my patch to include an option to force the download of a
tarball using origUrl. This should be useful in the case that a
package does get accepted into Debian.

As far as the get-orig-source target in debian/rules go, the behavior
in svn-buildpackage is that it expects there to be an orig tarball
first before running anything for debian/rules, so having
get-orig-source target wouldn't help svn-buildpackage. There could be
a check for such a target in svn-buildpackage, but I think it would
complicate the code for svn-buildpackage more than it has to, plus it
would assume things like say the maintainer uses a get-orig-source
target instead of some other named target. It would be easier to have
the get-orig-source target call a script itself. Pseudocode for
something like this would go:

get-orig-source:
    dh_testdir
    GET_ORIG_SCRIPT=$(CWD)/debian/path_to_script
    cd .. && \
        $(GET_ORIG_SCRIPT)

As far as having the script either be the application of the watch
file, does this mean having uscan/uupdate call the script?

-- 
Regards,
Andres Mejia


Reply to: