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

Re: git-buildpackage: can it recreate the orig.tar.gz without the pristine-tar?



On Mon, 3 Dec 2012 13:44:55 +0100
Miguel Telleria de Esteban <miguel@mtelleria.com> wrote:

> Dear all,
> 
> After several months of using git-buildpackage with the "recommended"
> pristine-tar option I still keep making myself the following question.
> 
> Why does git-buildpackage need pristine-tar to generate the orig.tar.gz
> file?.  Can't it just pick the contents from the upstream branch
> together with version number from debian/changelog and regenerate the
> orig.tar.gz from it?
>

In my limited experience if the upstream project uses git already and
_tags_ stable releases it is very easy to avoid using pristine-tar, I
do that when I package my own projects; actually I have never had to
learn how to use pristine-tar...

My repositories have this layout:

  - "master" branch is the upstream code base (or a clone of the
    upstream repository) with tags marking stable releases, e.g. in the
    form of v1.0 or v3.2.1

  - "debian" branch is where the packaging stuff gets added (basically
    the debian/ dir), this one branches off (and merges with) tagged
    stable releases in the "master" branch.

  - in debian/gbp.conf there are just these lines:
    	[DEFAULT]
    	debian-branch = debian
    	upstream-branch = master
    	upstream-tag = v%(version)s

By just running "git buildpackage" the package builds fine, and
the .orig.tar.gz generated gets generated.

In _my_ case having the "upstream-tag" reflect the format of the tags
marking stable release in the "upstream-branch" branch was the key to
make git-buildpackage generate the .orig.tar.gz archives.

Regards,
   Antonio

> To see if pristine-tar is absolutely needed for this I have done
> different attemps with the following workflow:
> 
> 1. Set pristine-tar to False in gbp.conf (previously was set to true)
> 
> 2. git-import-orig a .orig.tar.gz file present somewhere outside the
>    working directory.
> 
>    Everything seems fine:
>    -  upstream tag generated
>    -  orig.tar.gz content present in upstream branch
>    -  this same content merged in debian (working) branch
>    -  NO new content in pristine-tar.
> 
> 3. Issue git-dch and ensure debian/changelog has the correct upstream
>    version (matching upstream/nnn tag)
> 
> 4. Commit debian/changelog
> 
> 5. Run git-builpackage several times trying the following options:
>    --git-force-create
>    --git-upstream-tree=upstream/<tag-version>
> 
> RESULT:
> 
>    the orig.tar.gz does not get created in the build area and therefore
>    dpkg-source complains of not finding it.
> 
> EXPECTED RESULT (that I can reproduce manually)
>    -  checkout temporarily the upstream branch
>    -  generate an .orig.tar.gz from it and move it to the build-area
>    -  checkout again the debian branch
>    -  proceed as normal
> 
>          and it works !!
> 
> so why does not git-buildpackage do this?
> 

-- 
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?


Reply to: