From: John Ellson <ellson@research.att.com>
To: git@vger.kernel.org
Subject: [PATCH] rpmbuild doesn't like '-' in version strings
Date: Fri, 30 Dec 2005 12:29:10 -0500 [thread overview]
Message-ID: <dp3qpb$7uk$1@sea.gmane.org> (raw)
Problem:
ellson@ellson:git> make rpm
GIT_VERSION = 1.0.6-g58e3
sed -e 's/@@VERSION@@/1.0.6-g58e3/g' < git.spec.in > git.spec
./git-tar-tree HEAD git-1.0.6-g58e3 > git-1.0.6-g58e3.tar
tar rf git-1.0.6-g58e3.tar git-1.0.6-g58e3/git.spec
gzip -f -9 git-1.0.6-g58e3.tar
rpmbuild -ta git-1.0.6-g58e3.tar.gz
error: line 3: Illegal char '-' in version: Version: 1.0.6-g58e3
make: *** [rpm] Error 1
Suggested fix: Use '_' instead of '-'
There is probably a cleaner implementation of the fix, but this works for me.
----------------------------------------
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 845b9dc..e4e0ab1 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -3,7 +3,9 @@
GVF=GIT-VERSION-FILE
VN=$(git-describe --abbrev=4 HEAD 2>/dev/null) || VN=v1.0.GIT
-VN=$(expr "$VN" : v'\(.*\)')
+VN1=$(expr "$VN" : '[^-]*-\(.*\)')
+VN=$(expr "$VN" : v'\([^-]*\)')
+test "$VN1" = "" || VN="$VN"_"$VN1"
if test -r $GVF
then
VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
--------------------------------------------
Signed-off-by: John Ellson <ellson@research.att.com>
next reply other threads:[~2005-12-30 17:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-30 17:29 John Ellson [this message]
2006-01-06 22:37 ` [PATCH] rpmbuild doesn't like '-' in version strings Junio C Hamano
2006-01-07 0:04 ` Andreas Ericsson
2006-01-07 0:47 ` Johannes Schindelin
2006-01-07 1:22 ` Ryan Anderson
2006-01-14 15:39 ` John Ellson
2006-01-14 17:53 ` Linus Torvalds
2006-01-14 19:17 ` Junio C Hamano
2006-01-14 20:25 ` John Ellson
2006-01-14 20:35 ` Junio C Hamano
2006-01-16 9:15 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='dp3qpb$7uk$1@sea.gmane.org' \
--to=ellson@research.att.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.