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

Implement RPM-free mode #434

Open
nforro opened this issue Nov 27, 2024 · 3 comments
Open

Implement RPM-free mode #434

nforro opened this issue Nov 27, 2024 · 3 comments
Labels
kind/feature New feature or a request for enhancement.

Comments

@nforro
Copy link
Member

nforro commented Nov 27, 2024

specfile uses RPM for macro expansion and condition evaluation, however, that's not always necessary, hence the force_parse argument to the Specfile constructor that allows to use the created instance even if RPM parsing fails. But since specfile is already capable of parsing macro definitions as well as macro substitutions, we could go one step further and implement a simple, self-contained macro expansion, without using RPM.

@nforro nforro added the kind/feature New feature or a request for enhancement. label Nov 27, 2024
@lachmanfrantisek
Copy link
Member

Two main benefits:

  • No need to rely on RPM.
  • Be able to parse parts of specfile or specfiles that are not parsable as a whole (e.g. on a particular system).

This might be highly beneficial for Copr as well.

The solution might be in the form of a different mode people can switch to.

@praiskup will start a community discussion to gather some feedback.

@lachmanfrantisek lachmanfrantisek moved this from new to backlog in Packit Kanban Board Nov 28, 2024
@ssbarnea
Copy link

ssbarnea commented Dec 5, 2024

I don't know how state how important this is. With the current dependency on https://pypi.org/project/rpm/ - packit is not effectively usable and sometimes even not even installable on: macos, windows and ubuntu and we cannot even lint (validate) the config.

By default packit should not list binary dependencies directly, so it can install easily. The extra dependencies can be added to extras.

@lachmanfrantisek
Copy link
Member

Thanks @ssbarnea for your interest. Sadly, currently, Packit is quite dependent on rpm. Both via specfile library and by direct use as well. This issue can help with specfile parsing and if you require only validation, we would need to factor that out to not require rpm.

There is also a workaround in the form of containers -- I hope adding more architecture can help here at least a bit -- here are the fresh PRs:


To be really honest and to better understand why it's taking us so long to tackle this issue. Our team prioritises work based on demand and there haven't been many people requesting this so far. But if we know there are enough people, we are happy to spend time on this. As usual, an external contribution can help and we are happy to guide anyone willing to help. (I know, it's not easy.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or a request for enhancement.
Projects
Status: backlog
Development

No branches or pull requests

3 participants