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

Re: please avoid writing useless/annoying stuff in debian/gbp.conf (was: source only upload with git-buildpackage)



On 11/11/19 12:50 PM, Jeremy Bicha wrote:
> On Mon, Nov 11, 2019 at 2:59 AM Thomas Goirand <zigo@debian.org> wrote:
>> On 11/11/19 1:02 AM, Theodore Y. Ts'o wrote:
>>> On Sun, Nov 10, 2019 at 11:20:45PM +0100, Thomas Goirand wrote:
>>>>
>>>> Please, *never* do that. It's generally a very bad idea to write
>>>> anything to debian/gbp.conf. It's as if you were adding your text editor
>>>> preferences in the package. Instead, please prefer writing in ~/.gbp.conf.
>>>
>>> I keep most of my git-buildpackage settings which are specific to my
>>> developer environment in ~/.gbp.conf.  However, there are some gbp
>>> settings which are specific to the repository set up, and those I
>>> think, IMHO, *are* appropriate for debian/gbp.conf.  For example:
>>>
>>> [DEFAULT]
>>> pristine-tar = True
>>> upstream-tag='v%(version)s'
>>> debian-branch=debian/master
>>
>> The first 2, yes. The last one, it's my opinion that it's useless, and
>> that you only need it because "ignore-branch = True" isn't the default
>> in git-buildpackage. It's ok as long as you always keep the same
>> packagig branch, but if, like in my team, we need a new branch name
>> every 6 months, and for 400+ repositories, then keeping the branch name
>> declared in debian/gbp.conf becomes super annoying (as it forces one to
>> change the "debian-branch" each time).
> 
> Could you please add debian/gbp.conf back to your packages? As I
> understand it, I think your preferred settings would look something
> like this:
> 
> [DEFAULT]
> ignore-branch = True
> pristine-tar = False
> 
> [buildpackage]
> sign-tags = True
> 
> [dch]
> multimaint-merge = True
> 
> [import-orig]
> upstream-tag = %(version)s
> 
> [pq]
> patch-numbers = False
> 
> 
> 
> It is absolutely not possible to set the correct
> pristine-tar=True/False in ~/.gbp.conf to work with your packages
> (which avoid pristine-tar) and the vast majority of gbp packages in
> Debian which do use pristine-tar. Those settings are specific to the
> workflow for that repo, and everyone using that repo needs to use
> those same settings to avoid issues.

Hi Jeremy,

I don't think what you wrote above is correct. None of the options you
mentioned are mandatory. If GBP doesn't see the use of pristine-tar, it
will assume that we're using an upstream tag, which is fine.

If you're rebuilding a package which is already in the archive, you're
supposed to take the .orig.tar.xz from the archive, and if not, you're
supposed to generate it with git archive (or with the shortcut for that
command: ./debian/rules gen-orig-xz). Either ways, you don't need to set
pristine-tar to do that.

So, as I wrote, the only single thing you need, is:
ignore-branch = True

and it is my view that it should be good to have it become the default.

I also think this should become the default too:
no-create-orig = True

because otherwise, you easily get a generated wrong file, which will not
be the same as the archive one (because pristine-tar is broken in many
ways, as many of us know already).

Besides this, nobody is forced to use gbp. Just typing "sbuild" to build
a package is also perfectly valid. So why adding preferences for one set
of tooling, when there's many alternatives? It doesn't make sense.

Cheers,

Thomas Goirand (zigo)


Reply to: