Skip to content

Conversation

@ekohl
Copy link
Contributor

@ekohl ekohl commented Nov 24, 2023

This implements rich RPM dependencies, which are available with RPM 4.14+ (introduced in Fedora 271). This means only a single line for a dependency is used. That doesn't play well with the .with_requires.commented_out approach that was implemented. This instead uses parameters.

An alternative approach could be to move this to the template. I'll submit a separate PR to demonstrate that.

@ekohl
Copy link
Contributor Author

ekohl commented Nov 24, 2023

An alternative approach could be to move this to the template. I'll submit a separate PR to demonstrate that.

That's #124 and I think it's much cleaner.

This implements rich RPM dependencies, which are available with RPM
4.14+ (introduced in Fedora 27[1]). This means only a single line for a
dependency is used. That doesn't play well with the
.with_requires.commented_out approach that was implemented. This instead
uses parameters.

An alternative approach could be to move this to the template.

[1]: https://fedoraproject.org/wiki/Changes/RPM-4.14
@voxik
Copy link
Member

voxik commented Nov 24, 2023

There is one more alternative implementation and that is to drop the versions. Or keep just the lower bound versions. But of course it depends what is the desired outcome. Any thoughts?

@ekohl
Copy link
Contributor Author

ekohl commented Nov 25, 2023

My use case is Foreman plugin packaging, which compiles assets at build time. This means the runtime dependencies must be present during build time. Long term I'd prefer to move to dynamically generating those, but until we drop EL8 support that won't be possible.

I have debated dropping the version numbers altogether as well, which will cause it to fail later in the process. But you'll still need to keep it in sync when dependencies are added/removed so for now I'd prefer to keep them proper.

After trying two approaches I think #124 is IMHO the approach to go with. If you agree, we can close this.

@voxik
Copy link
Member

voxik commented Nov 27, 2023

Thx for elaborating and providing more context. In addition are you using some custom template or the default one?

I have provided further comments in #124, because it seems to be better starting point.

@ekohl
Copy link
Contributor Author

ekohl commented Nov 28, 2023

In addition are you using some custom template or the default one?

The one that needs it right now is https://github.com/theforeman/foreman-packaging/blob/rpm/develop/gem2rpm/foreman_plugin.spec.erb

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

Successfully merging this pull request may close these issues.

2 participants