Reputation: 565
Machine 1
#uname -r
Machine 1:3.2.45-0.6.wd.561.41.269.metal1.x86_64
#rpmbuild --version
RPM version 4.8.0
While trying rpmbuild I encountered Illegal char ''' in: Release: 25.'4283295'.mybranch
There was error in the script I wrote which appended the quotes around the number.
On machine 2
# uname -r
2.6.16.33-xenU
# rpmbuild --version
RPM version 4.4.2
Here rpmbuild seemed to work with single quoted number in the name: myapp-1.4.25.'4283295'.mybranch.x86_64.rpm
I gathered that single quote is not allowed in the Release in the earlier case. What is the set of characters that I should always avoid ?
Are there differences due to the rpmbuild version ?
I failed to find allowed characters in the rpm name/version/release. any pointers will be much appreciated.
Upvotes: 2
Views: 5227
Reputation: 54455
The question appears to equate version and release tags. The tools can treat these differently.
In making a script, single-quotes would be "eaten" by a shell. What gets stored in the RPM database are the actual characters. RPM uses period .
as a delimiter, so you cannot use that as part of a version/release value.
Generally alpha/numerics, hyphen (minus) and a few other punctuation characters may be used in each field, but the tools and policies will further limit that rule. These are all from the POSIX character set (not mentioned and not supported would be UTF-8, it seems).
According to Fedora, the release tag has to be an integer followed by an optional distribution tag. Another source says that hyphen cannot appear in a release tag. Those two differ about whether tilde is allowed, and the latter states that plus +
and colon :
are allowed (but not the former).
Further reading:
Upvotes: 8