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

2019-11-15 Thread Bernd Zeimetz



On 11/11/19 6:30 PM, Theodore Y. Ts'o wrote:
> Yes, and that's why I use debian/master instead of debian/buster or
> debian/bullseye.  :-)
> 
> When I do create debian/buster (once it became the stable branch), the
> first thing I did after I branched off debian/buster from
> debian/master was to edit debian/gbp.conf was to have:
> 
> debian-branch=debian/buster
> 
> I only do this when I need to do the first stable backport of a
> serious/security bug, such that I have to create the debian/buster
> branch in the first place.  So it hasn't been all that annoying for
> me.

+1
I do pretty much similar things in my repositories, and I neither want
people to mess with the way I choose branch names nor do NMUers want do
have to figure out which branch to use for what.
debian/gbp.conf is perfect for that, so please maintain it. It is very easy!

-- 
 Bernd ZeimetzDebian GNU/Linux Developer
 http://bzed.dehttp://www.debian.org
 GPG Fingerprint: ECA1 E3F2 8E11 2432 D485  DD95 EB36 171A 6FF9 435F



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

2019-11-14 Thread Thomas Goirand
On 11/14/19 1:59 AM, Jeremy Bicha wrote:
> Let me try to be more specific. Many packages are maintained by people
> who use gbp. Many packages have pristine-tar branches but do not have
> "pristine-tar = True" set. When I work on one of these packages (and I
> work on many packages with many maintainers), I need to have
> "pristine-tar = True" set in my ~/.gbp.conf. However, when I then want
> to work on an OpenStack package, I have to change my user config to
> set "pristine-tar = False".

No you don't. The only think you need is the orig tarball form the
archive in your build path.

Cheers,

Thomas Goirand (zigo)



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

2019-11-14 Thread Simon McVittie
On Wed, 13 Nov 2019 at 19:59:07 -0500, Jeremy Bicha wrote:
> Let me try to be more specific. Many packages are maintained by people
> who use gbp. Many packages have pristine-tar branches but do not have
> "pristine-tar = True" set. When I work on one of these packages (and I
> work on many packages with many maintainers), I need to have
> "pristine-tar = True" set in my ~/.gbp.conf. However, when I then want
> to work on an OpenStack package, I have to change my user config to
> set "pristine-tar = False". This is a very manual process and I'm
> likely to make a mistake.

I think it's worth emphasizing that the options for which this is
valuable are exactly the options that affect interoperability with other
maintainers, or to put it another way, that affect what you commit.

For example, pristine-tar, debian-branch, upstream-branch and
upstream-vcs-tag affect what `gbp import-orig` does, so they need to be
the same for anyone who plans to import new upstream releases. I think
that means they make sense in d/gbp.conf for the reasons Jeremy stated.

If you prefer to use ignore-branch instead of debian-branch then that's
your choice, or perhaps your team's, and if you use that option then
maybe you don't need debian-branch; but when you import a new upstream
release you're not on the upstream branch, so `gbp import-orig` still
needs to know where the upstream-branch is.

Conversely, tarball-dir, export-dir and builder are personal preference
or local system configuration, and should not appear in d/gbp.conf, only
in ~/.gbp.conf or .git/gbp.conf. The first few packages I maintained with
git in Debian did have tarball-dir and export-dir in d/gbp.conf, mimicking
the way svn-buildpackage's directory properties worked; but that was a
bug, which I believe has now been fixed in everything I still maintain.

smcv



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

2019-11-13 Thread Jeremy Bicha
On Tue, Nov 12, 2019 at 5:23 AM Thomas Goirand  wrote:
> On 11/11/19 12:50 PM, Jeremy Bicha wrote:
> > 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.
>
> 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.
> ...
> 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.

Let me try to be more specific. Many packages are maintained by people
who use gbp. Many packages have pristine-tar branches but do not have
"pristine-tar = True" set. When I work on one of these packages (and I
work on many packages with many maintainers), I need to have
"pristine-tar = True" set in my ~/.gbp.conf. However, when I then want
to work on an OpenStack package, I have to change my user config to
set "pristine-tar = False". This is a very manual process and I'm
likely to make a mistake.

Ideally, packages maintained by someone who wants to consistently use
pristine-tar will have that set in debian/gbp.conf and the minority of
maintainers who don't will have that set in debian/gbp.conf too.

While you could use sbuild to build gnome-calculator for instance, you
do have to use gbp to **maintain** gnome-calculator -- especially when
packaging new versions. That is because gnome-calculator is
team-maintained by the Debian GNOME team and we have guidelines for
how our packages are maintained [1]. To make life easier for
contributors, we enforce as many of those guidelines as possible in
debian/gbp.conf.

Similarly, you have guidelines for how OpenStack packaging updates and
bugfixes are handled and it seems to me like it would make a whole lot
more sense for you to explicitly "forbid" pristine-tar from being used
in your packages, as long as you are the maintainer and you believe
that pristine-tar is unsuitable for those packages.

[1] https://wiki.debian.org/Gnome/Git

Thanks,
Jeremy Bicha



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

2019-11-13 Thread Thomas Goirand
On 11/13/19 1:53 PM, Andreas Tille wrote:
> Except for not agreeing with your opinion about pristine-tar I agree that
> debian/gbp.conf is frequently not very helpful and flooded with unneeded
> options sometimes.  It really makes sense to use ~/.gbp.conf instead.

This was the single and only point I was trying to make, and I wasn't
trying to convince anyone about anything else! :)

Cheers,

Thomas Goirand (zigo)



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

2019-11-13 Thread Andreas Tille
On Tue, Nov 12, 2019 at 11:23:08AM +0100, Thomas Goirand wrote:
> 
> 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.

... but there are teams that rely successfully on pristine-tar which
solves the problem you describe at least to my experience perfectly.
 
> I also think this should become the default too:
> no-create-orig = True

Please don't.
 
> 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).

>From time to time I hear this statement.  I can confirm that in all
teams I'm working on pristine-tar belongs to the team policy and I never
experienced in those > 2000 packages I've touched any problem with this.
For me this makes some statistically relevant set which makes me believe
that blaming pristine-tar to be broken in many ways is exaggerating and
should not become a reason to force standard options that would really
break pristine-tar.

> 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.

Except for not agreeing with your opinion about pristine-tar I agree that
debian/gbp.conf is frequently not very helpful and flooded with unneeded
options sometimes.  It really makes sense to use ~/.gbp.conf instead.

Kind regards

  Andreas. 

-- 
http://fam-tille.de



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

2019-11-12 Thread Thomas Goirand
On 11/11/19 12:50 PM, Jeremy Bicha wrote:
> On Mon, Nov 11, 2019 at 2:59 AM Thomas Goirand  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)



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

2019-11-11 Thread Theodore Y. Ts'o
On Mon, Nov 11, 2019 at 08:58:42AM +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).

Yes, and that's why I use debian/master instead of debian/buster or
debian/bullseye.  :-)

When I do create debian/buster (once it became the stable branch), the
first thing I did after I branched off debian/buster from
debian/master was to edit debian/gbp.conf was to have:

debian-branch=debian/buster

I only do this when I need to do the first stable backport of a
serious/security bug, such that I have to create the debian/buster
branch in the first place.  So it hasn't been all that annoying for
me.

Cheers,

- Ted



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

2019-11-11 Thread Jeremy Bicha
On Mon, Nov 11, 2019 at 2:59 AM Thomas Goirand  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.

On the other hand, there are some developer-level preferences like
export-dir and "pbuilder = True". Those should not be in the repo's
debian/gbp.conf but they should be in ~/.gbp.conf .

Thanks,
Jeremy Bicha



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

2019-11-10 Thread Thomas Goirand
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).

Cheers,

Thomas Goirand (zigo)



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

2019-11-10 Thread Theodore Y. Ts'o
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

If you are going to be cloning the e2fsprogs repository and wanting to
use gbp-buildpackage, you *will* want to use these settings, and
putting them in ~/.gbp.conf doesn't work well, since they won't apply
for all packages that they might want to build.

Regards,

- Ted



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

2019-11-10 Thread Thomas Goirand
On 10/5/19 7:48 PM, Attila Szalay wrote:
> I added the "pbuilder-options = --source-only-changes" option to the
> [buildpackage] part of the debian/gbp.conf

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.

Just an example: if someone is using pbuilder, and wants to add a new
binary to your package, then your debian/gbp.conf will be super
annoying, because in such case, we need to upload *with* binaries (as
source-only uploads aren't possible in the NEW queue).

Also, please remember that not everyone is using git-buildpackage, and
that nobody is ever, forced to do so, even when using git for packaging
(just calling plain sbuild works perfectly, for example).

A few years ago, we decided to *completely* remove all traces of
debian/gbp.conf inside the OpenStack team, and I very much enjoy this
choice. The only annoying bit, is that now, everyone *must* write in
~/.gbp.conf this:

[DEFAULT]
ignore-branch = True

By the way, it'd be nice if it became the default in git-buildpackage.
This missleads everyone into writing a debian/gbp.conf just in order to
tell git-buildpackage what branch to build with.

Cheers,

Thomas Goirand (zigo)