[LU-15995] rpmbuild: Illegal char '-' (0x2d) in: Version: 2.15.0-RC5 Created: 06/Jul/22  Updated: 13/Jul/22

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Jian Yu Assignee: Jian Yu
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

I downloaded the tgz archive from a b2_15 patch on Gerrit and tried to build it. While running "make rpms", I hit the following error:

tardir=lustre-2.15.0-RC5 && tar --format=posix -chf - "$tardir" | eval GZIP= gzip --best -c >lustre-2.15.0-RC5.tar.gz
make[1]: Leaving directory '/root/b2_15'
if test -d "lustre-2.15.0-RC5"; then find "lustre-2.15.0-RC5" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "lustre-2.15.0-RC5" || { sleep 5 && rm -rf "lustre-2.15.0-RC5"; }; else :; fi
rpmbuilddir=`mktemp -t -d rpmbuild-lustre-$USER-XXXXXXXX`; \
make  \
	rpmbuilddir="$rpmbuilddir" rpm-local || exit 1; \
cp ./rpm/* .; \
/usr/bin/rpmbuild \
	--define "_tmppath $rpmbuilddir/TMP" \
	--define "_topdir $rpmbuilddir" \
	--define "dist %{nil}" \
	-ts lustre-2.15.0-RC5.tar.gz || exit 1; \
cp $rpmbuilddir/SRPMS/lustre-2.15.0-RC5-*.src.rpm . || exit 1; \
rm -rf $rpmbuilddir
make[1]: Entering directory '/root/b2_15'
make[1]: Leaving directory '/root/b2_15'
error: line 176: Illegal char '-' (0x2d) in: Version: 2.15.0-RC5
make: *** [autoMakefile:1211: srpm] Error 1

According to http://ftp.rpm.org/max-rpm/s1-rpm-inside-tags.html:

The version tag defines the version of the software being packaged. The version specified should be as close as possible to the format of the original software's version. In most cases, there should be no problem specifying the version just as the software's original developer did. However, there is a restriction. There can be no dashes in the version.



 Comments   
Comment by Jian Yu [ 13/Jul/22 ]

Hi Oleg,
While updating LUSTRE-VERSION-GEN to create a new RC, could you please avoid using dash char '-' in DEFAULT_VERSION?
FYI, after I changed '2.15.0-RC5' to '2.15.0_RC5', 'make rpms' passed.

Generated at Sat Feb 10 03:23:04 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.