Debian Bug report logs - #1009163
import-orig: please make --upstream-vcs-tag=%(version)s strip +dfsg/+ds repack suffixes

version graph

Package: git-buildpackage; Maintainer for git-buildpackage is Guido Günther <agx@sigxcpu.org>; Source for git-buildpackage is src:git-buildpackage (PTS, buildd, popcon).

Reported by: Guilhem Moulin <guilhem@debian.org>

Date: Fri, 8 Apr 2022 00:12:20 UTC

Severity: wishlist

Found in version git-buildpackage/0.9.25

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#1009163; Package git-buildpackage. (Fri, 08 Apr 2022 00:12:22 GMT) (full text, mbox, link).


Acknowledgement sent to Guilhem Moulin <guilhem@debian.org>:
New Bug report received and forwarded. Copy sent to Guido Günther <agx@sigxcpu.org>. (Fri, 08 Apr 2022 00:12:22 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Guilhem Moulin <guilhem@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: import-orig: please make --upstream-vcs-tag=%(version)s strip +dfsg/+ds repack suffixes
Date: Fri, 8 Apr 2022 02:10:28 +0200
[Message part 1 (text/plain, inline)]
Package: git-buildpackage
Version: 0.9.25
Severity: wishlist

Dear Maintainer,

`gpg import-orig --upstream-vcs-tag=%(version)s` is great, however the
substitution doesn't work well will repack suffixes such as +dfsg or
+ds.  Perhaps ‘%(version)s’ shouldn't unconditionally strip repack
suffixes, but unfortunately ‘%(version%+ds%)s’ doesn't work either

	>>> DebianGitRepository.version_to_tag(r'%(version%+ds%)s', "1.2.3+ds")
	[…]
    gbp.errors.GbpError: Failed to format %(version%+ds%)s: Missing value 'version%+ds%' in {'version': '1.2.3+ds', 'hversion': '1-2-3+ds'}

AFAIK one can't use d/gbp.conf, instead one needs to manually run `gpg
import-orig --upstream-vcs-tag=1.2.3 --uscan` which requires to find out
the most recent upstream version number beforehand.  It would be nice if
d/gbp.conf had a way to specify a substitution string or template that
works with repack suffixes.

Thanks for maintaining gbp!
-- 
Guilhem.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#1009163; Package git-buildpackage. (Thu, 30 Jun 2022 21:42:02 GMT) (full text, mbox, link).


Acknowledgement sent to Luca Boccassi <bluca@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Thu, 30 Jun 2022 21:42:02 GMT) (full text, mbox, link).


Message #10 received at 1009163@bugs.debian.org (full text, mbox, reply):

From: Luca Boccassi <bluca@debian.org>
To: 1009163@bugs.debian.org
Cc: Guido Günther <agx@sigxcpu.org>
Subject: Re: import-orig: please make --upstream-vcs-tag=%(version)s strip +dfsg/+ds repack suffixes
Date: Thu, 30 Jun 2022 22:38:15 +0100
[Message part 1 (text/plain, inline)]
On Fri, 8 Apr 2022 02:10:28 +0200 Guilhem Moulin <guilhem@debian.org>
wrote:
> Package: git-buildpackage
> Version: 0.9.25
> Severity: wishlist
> 
> Dear Maintainer,
> 
> `gpg import-orig --upstream-vcs-tag=%(version)s` is great, however
the
> substitution doesn't work well will repack suffixes such as +dfsg or
> +ds.  Perhaps ‘%(version)s’ shouldn't unconditionally strip repack
> suffixes, but unfortunately ‘%(version%+ds%)s’ doesn't work either
> 
>       >>> DebianGitRepository.version_to_tag(r'%(version%+ds%)s',
"1.2.3+ds")
>       […]
>     gbp.errors.GbpError: Failed to format %(version%+ds%)s: Missing
value 'version%+ds%' in {'version': '1.2.3+ds', 'hversion': '1-2-3+ds'}
> 
> AFAIK one can't use d/gbp.conf, instead one needs to manually run
`gpg
> import-orig --upstream-vcs-tag=1.2.3 --uscan` which requires to find
out
> the most recent upstream version number beforehand.  It would be nice
if
> d/gbp.conf had a way to specify a substitution string or template
that
> works with repack suffixes.
> 
> Thanks for maintaining gbp!
> -- 
> Guilhem.

Any update on this? It makes using gbp when repacking with +ds or +dfsg
impossible, as you get a Lintian error when repacking without appending
a suffix.

-- 
Kind regards,
Luca Boccassi
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#1009163; Package git-buildpackage. (Tue, 09 Aug 2022 08:57:02 GMT) (full text, mbox, link).


Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. (Tue, 09 Aug 2022 08:57:02 GMT) (full text, mbox, link).


Message #15 received at submit@bugs.debian.org (full text, mbox, reply):

From: Guido Günther <agx@sigxcpu.org>
To: Guilhem Moulin <guilhem@debian.org>, 1009163@bugs.debian.org
Cc: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: Bug#1009163: import-orig: please make --upstream-vcs-tag=%(version)s strip +dfsg/+ds repack suffixes
Date: Tue, 9 Aug 2022 10:54:54 +0200
Hi,
On Fri, Apr 08, 2022 at 02:10:28AM +0200, Guilhem Moulin wrote:
> Package: git-buildpackage
> Version: 0.9.25
> Severity: wishlist
> 
> Dear Maintainer,
> 
> `gpg import-orig --upstream-vcs-tag=%(version)s` is great, however the
> substitution doesn't work well will repack suffixes such as +dfsg or
> +ds.  Perhaps ‘%(version)s’ shouldn't unconditionally strip repack
> suffixes, but unfortunately ‘%(version%+ds%)s’ doesn't work either
> 
> 	>>> DebianGitRepository.version_to_tag(r'%(version%+ds%)s', "1.2.3+ds")
> 	[…]
>     gbp.errors.GbpError: Failed to format %(version%+ds%)s: Missing value 'version%+ds%' in {'version': '1.2.3+ds', 'hversion': '1-2-3+ds'}
> 
> AFAIK one can't use d/gbp.conf, instead one needs to manually run `gpg
> import-orig --upstream-vcs-tag=1.2.3 --uscan` which requires to find out
> the most recent upstream version number beforehand.  It would be nice if
> d/gbp.conf had a way to specify a substitution string or template that
> works with repack suffixes.

We could fix the replacement to be empty:

  https://github.com/agx/git-buildpackage/compare/master...ds

This causes trouble for people though that need this *and* to mangle the
version by other means.

Cheers,
 -- Guido



> 
> Thanks for maintaining gbp!
> -- 
> Guilhem.





Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#1009163; Package git-buildpackage. (Tue, 09 Aug 2022 08:57:04 GMT) (full text, mbox, link).


Acknowledgement sent to Guido Günther <agx@sigxcpu.org>:
Extra info received and forwarded to list. (Tue, 09 Aug 2022 08:57:04 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Guido Günther <agx@sigxcpu.org>:
Bug#1009163; Package git-buildpackage. (Tue, 09 Aug 2022 11:09:03 GMT) (full text, mbox, link).


Acknowledgement sent to Guilhem Moulin <guilhem@debian.org>:
Extra info received and forwarded to list. Copy sent to Guido Günther <agx@sigxcpu.org>. (Tue, 09 Aug 2022 11:09:03 GMT) (full text, mbox, link).


Message #25 received at 1009163@bugs.debian.org (full text, mbox, reply):

From: Guilhem Moulin <guilhem@debian.org>
To: Guido Günther <agx@sigxcpu.org>
Cc: 1009163@bugs.debian.org
Subject: Re: Bug#1009163: import-orig: please make --upstream-vcs-tag=%(version)s strip +dfsg/+ds repack suffixes
Date: Tue, 9 Aug 2022 13:07:34 +0200
[Message part 1 (text/plain, inline)]
Hi Guido,

On Tue, 09 Aug 2022 at 10:54:54 +0200, Guido Günther wrote:
> We could fix the replacement to be empty:
> 
> https://github.com/agx/git-buildpackage/compare/master...ds
> 
> This causes trouble for people though that need this *and* to mangle the
> version by other means.

That'd work for me, thanks!  Some ideas to cover other use-cases if
desired:

 - Always strip ‘+ds(\.\d*)?’ and ‘+dfsg(\.\d*)?’ repack suffixes
   *after* version mangling.  After all, if upstream uses such suffixes
   in its tags or version number, then the revision has to be mangled so
   it doesn't collide with a repack suffix no?
 - New option --upstream-vcs-tag-strip='\+ds(\.\d*)?$'
 - AFAIK substitution in tag formats currently support a single
   character; it could be changed so the remaining of the middle portion
   is stripped, so ‘%(version%.+ds%_)’ rewrites ‘1.2.3+ds’ to ‘1_2_3’
   and ‘%(version%.+ds%.)’ rewrite it to ‘1.2.3’.  Odd semantics though
   and not trivial to document…

cheers
-- 
Guilhem.
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Tue Sep 20 02:45:21 2022; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.