git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 2/2] version-gen: fix versions

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 14, 2013, 05:01 UTC
Message-ID
<20131014050104.GA25344@google.com>
In-Reply-To
<CAJDDKr5K0UjcbhUpAjHjGcEk6=E2+cAVC8-RpxY+C1atSVj-Tg@mail.gmail.com>
Hi,
David Aguilar wrote:
> Felipe Contreras <felipe.contreras@gmail.com> wrote:
Show 6 quoted lines
>> Virtually all packaging guidelines would prefer 1.8.4~rc1, over
>> 1.8.4.rc1 or 1.8.4-rc1, so it makes sense to use that instead.
>>
>> In particular, the only packaging we provide, git.spec, generates a
>> wrong version, because git-1.8.4 < git-1.8.4.rc1, changing to ~rc1 fixes
>> the problem as it's considered newer.

A more conservative fix would be to tweak the .spec generation in the Makefile to follow whatever the appropriate Red Hat convention is. For example, something like this:

-- >8 --
diff --git i/Makefile w/Makefile
index 0f931a2..73bd89d 100644
--- i/Makefile
+++ w/Makefile
@@ -2385,8 +2385,9 @@ quick-install-html:
 
 ### Maintainer's dist rules
 
+GIT_VERSION_RPM = $(subst -rc,~rc,$(GIT_VERSION))
 git.spec: git.spec.in GIT-VERSION-FILE
-	sed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@+
+	sed -e 's/@@VERSION@@/$(GIT_VERSION_RPM)/g' < $< > $@+
 	mv $@+ $@
 
 GIT_TARNAME = git-$(GIT_VERSION)
-- 8< --

That way, programs that parse the git version by splitting at '.'
(there are more than a few, unfortunately) would continue to work, but
the packaging system would get the benefit of the proposed versioning
style change.

>> The same happens in dpkg.

Have you tested this?  I thought the Debian packaging did not use the
GIT-VERSION-GEN generated version in this way.

[...]
> This seems related:
>
> http://lintian.debian.org/tags/rc-version-greater-than-expected-version.html

If I understand correctly, that page has an exhaustive list of affected
packages in the Debian archive and doesn't include git.

Thanks and hope that helps,
Jonathan
Previous: Felipe ContrerasNext: Felipe Contreras
Message 6 of 7 in “Version fixes and cleanups”
  1. 0/2 Version fixes and cleanupsFelipe Contreras, Oct 12, 2013
  2. 1/2 version-gen: cleanupFelipe Contreras, Oct 12, 2013
  3. 2/2 version-gen: fix versionsFelipe Contreras, Oct 12, 2013
  4. David AguilarOct 13, 2013
  5. Felipe ContrerasOct 14, 2013
  6. Jonathan NiederOct 14, 2013
  7. Felipe ContrerasOct 14, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.