Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure the format used in FPM::Package::Deb.to_s? #1659

Closed
Rylon opened this issue Aug 7, 2019 · 4 comments
Closed

How to configure the format used in FPM::Package::Deb.to_s? #1659

Rylon opened this issue Aug 7, 2019 · 4 comments

Comments

@Rylon
Copy link

Rylon commented Aug 7, 2019

Hi @jordansissel

We've encountered an unusual issue with the Debian Epoch being missing from the resulting .deb filename. Although the Deb package type supports epoch, when the filename is generated via .to_s(), it is not included in the default format, which I can see is determined here:

https://github.com/jordansissel/fpm/blob/master/lib/fpm/package/deb.rb#L1043-L1047

I can see that this method supports passing in a format, defaulting to:
"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 via some mechanism, or do we need to monkey patch?

Behind the scenes we're using fpm-cookery and monkey patching in the recipe does work, but feels wrong :D

Thanks for your time :)

@Rylon Rylon changed the title How to configure the format used in FPM::Package::Deb ".to_s"? How to configure the format used in FPM::Package::Deb.to_s? Aug 7, 2019
@jordansissel
Copy link
Owner

jordansissel commented Aug 7, 2019 via email

@Rylon
Copy link
Author

Rylon commented Aug 8, 2019

Thanks @jordansissel yeah that should work too, however we were hoping to generate the format automatically based on the metadata, rather than specifying it statically. The only thing wrong with the default pattern (for .deb at least) is the filename excludes the epoch, which means we'd replace an existing package with a different epoch.

@jordansissel
Copy link
Owner

jordansissel commented Aug 8, 2019 via email

@Rylon
Copy link
Author

Rylon commented Aug 27, 2019

Thanks Jordan, I'm going to close this as I think the issue is how exactly to pass this through from FPM Cookery, and I already opened a separate issue there :)

Thanks!

@Rylon Rylon closed this as completed Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants