How to configure the format used in FPM::Package::Deb.to_s?
Hi,
I raised this on the FPM project too, but wondered if you had any insights related to doing this via a recipe:
https://github.com/jordansissel/fpm/issues/1659
We want to make sure the Epoch gets included in the filename, we can see that FPM::Package::Deb.to_s is responsible for interpolating the filename, but it defaults to this:
"NAME_FULLVERSION_ARCH.EXTENSION"
We'd like to change it to match the Debian packaging spec: "NAME_EPOCH:FULLVERSION_ARCH.EXTENSION".
Is it possible to set this properly via some mechanism?
For the time being we've monkey patched inside our recipe.rb:
# Monkey patches to override default format to contain the Epoch according to Debian Packaging Specs.
class FPM::Package::Deb < FPM::Package
def to_s(format=nil)
return super("NAME_EPOCH:FULLVERSION_ARCH.EXTENSION")
end
end
@Rylon Quite late, but better than never. :smile:
I created PR #215 to add a package_name_format field to the recipe object to allow the modification of the file format.
Nice, thanks @bernd !