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

[PATCH v3 3/3] build: fix rpm versioning

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Sep 14, 2013, 06:28 UTC
Message-ID
<1379140128-12397-4-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1379140128-12397-1-git-send-email-felipe.contreras@gmail.com>
The current versioning scheme doesn't work properly:
  git-1.8.4 < git-1.8.4.rc1
  git-1.8.4 < git-1.8.4-rc1
  git-1.8.4 > git-1.8.4~rc1

Since v1.8.4 final is obviously greater than v1.8.4-rc1, we need to use a tilde so RPM detects it properly as a greater version number.

This works in rpm-4.10, in older versions, a tilde would work as bad as anything else.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 3588ca1..7a8bee7 100644
--- a/Makefile
+++ b/Makefile
@@ -2426,7 +2426,7 @@ quick-install-html:
 ### Maintainer's dist rules
 
 git.spec: git.spec.in GIT-VERSION-FILE
-	sed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@+
+	sed -e 's/@@VERSION@@/$(subst -,~,$(GIT_VERSION))/g' < $< > $@+
 	mv $@+ $@
 
 GIT_TARNAME = git-$(GIT_VERSION)
-- 
1.8.4-fc
Previous: Felipe Contreras
Message 4 of 4 in “Version fixes and cleanups”
  1. 0/3 Version fixes and cleanupsFelipe Contreras, Sep 14, 2013
  2. 1/3 version-gen: cleanupFelipe Contreras, Sep 14, 2013
  3. 2/3 version-gen: avoid messing the versionFelipe Contreras, Sep 14, 2013
  4. 3/3 build: fix rpm versioningFelipe Contreras, Sep 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.