Closed chriseskow closed 10 years ago
I just released version 0.18.0 which changes the computation of the package version.
<version>.<vendor><revision>
became <version>-<revision>.<vendor>
.So the following should work for you.
class My < FPM::Cookery::Recipe
name 'pkg'
version '1.0.0'
revision '1'
vendor 'el6.myrepo'
end
This will build the following package version: 1.0.0-1.el6.myrepo
I hope this helps and thanks for the report!
Thanks, but this still causes the release and vendor to be appended to the version, and causes the release/revision number to be reset to 1. What I'm asking for is to keep the version (and release) to be EXACTLY what I typed in the recipe. The release ("1" in your example) and vendor ("el6.myrepo") should not be part of the version string.
So I'm looking to create a recipe like this:
class Foo < FPM::Cookery::Recipe
name 'foo'
version '1.0.0'
revision '1.el6.myrepo'
vendor 'somevendor'
end
... and fpm-cook -t rpm
should create the following package:
$ rpm -qlp pkg/foo-1.0.0-1.el6.myrepo.x86_64.rpm
Name: foo
Version: 1.0.0
Release: 1.el6.myrepo
Vendor: somevendor
In other words, I would expect the above recipe to generate the same package as if I just used fpm itself like so:
$ fpm \
-t rpm \
--name foo \
--version 1.0.0 \
--iteration 1.el6.myrepo \
--vendor somevendor \
[...]
Okay, I hope I got it right this time. :)
The problem was that I still just set #version
on the fpm object. Now I set #version
, #iteration
(revision) and #vendor
on the fpm object. In my tests, the Version, Release and Vendor fields are now correctly set for a rpm package. (and similar fields for deb packages)
I released 0.19.0 with these changes. Please let me know if it works for you now.
Thank you!
Happy to report this is now fixed properly :+1:
Awesome, thank you for testing!
YES! Fixed! Thanks for working through this! :smiley:
Thank you for the report!
I'd like to create RPMs that use a version string that matches the upstream version number exactly, and a release string that uses a format of
<release-num>.el<rhel-version>.<repo-name>
, e.g.1.el6.myrepo
. Similar conventions are used by popular RPM repos like EPEL, RepoForge, IUS, and so on.However, it appears that fpm-cookery appends the vendor name and release string to the end of the version, and always keeps the package release number as "1". From reading #42 it seems this is intentional.
Is there any way to force fpm-cookery to use the EXACT version and release strings I specify?