jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.15k stars 1.07k forks source link

Drop leading v from version for Debian #1969

Closed gliptak closed 1 year ago

gliptak commented 1 year ago

Signed-off-by: Gábor Lipták gliptak@gmail.com

1847

jordansissel commented 1 year ago

Thanks for working on this!

I think there's a few other places that use the 'version' field. I recommend, instead of modifying the deb.changes template, overriding the 'version' method as fpm does in the rpm.rb, shown here:

https://github.com/jordansissel/fpm/blob/db06af3c0357e212df48009ecd73c945519a1e76/lib/fpm/package/rpm.rb#L598-L606

Such a method def version ... end would go into lib/packages/fpm/deb.rb. This would allow any corrections to the version field to be used everywhere (the control file, deb.changes, etc)

gliptak commented 1 year ago

@jordansissel thank you for the pointer. updated

PS I'm not setup to test the project locally

jordansissel commented 1 year ago

PS I'm not setup to test the project locally

No worries! I'll take care of testing :)

jordansissel commented 1 year ago

Looks good! Thank you :)

jordansissel commented 1 year ago
% fpm -s empty -t deb -v v1.2.3  -n example
Drop leading v from package version 'v1.2.3' {:level=>:warn}
Created package {:path=>"example_1.2.3_all.deb"}

# Verify the version
% dpkg -f example_1.2.3_all.deb Version
1.2.3