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

WITH_MODULEMD CMake Option Is Not Excluding Compilation With modulemd-2.0 #1031

Closed
sameluch opened this issue Nov 21, 2023 · 8 comments
Closed
Assignees
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@sameluch
Copy link

When trying to build dnf5 from the dnf5.spec in this repository, I am running into an issue where I cannot compile without modulemd. I am building with most all of the extras outside of the core package turned off (modulemd, zchunk, perl, ruby, etc) to get the "leanest" version possible. I am currently working on version 5.0.14, though it doesn't appear to have any difference in the includes vs the current version.

Is modulemd-2.0 meant to be an optional package or a build requirement for libdnf5? hardcoded #includes are in the libdnf5/module directory forcing a dependency on this.

I found that there is a WITH_MODULEMD cmake option that doesn't seem to serve any functional purpose, at least when compared to WITH_COMPS or WITH_ZCHUNK which exclude the CMake requirement of these packages specifically.

@jan-kolarik
Copy link
Member

Hi, you're right. It appears that there was originally an intention to make the modulemd dependency optional, but currently, it remains in an unfinished state.

@j-mracek, please do you have an estimate of the effort required to complete this? Briefly looking into the code, it seems that the modules are scattered in many places, indicating a non-trivial amount of work.

@j-mracek
Copy link
Contributor

I agree that the work is not trivial but not too difficult, but it will require maintenance because modularity is still under development.

The compilation without modulemd-2.0 is important for distributions that never used modules therefore they have no libmodulemd in distribution.

The feature might be interesting for containers where we don't have to support modules. The support of modules will be not required in Fedora 41 (Fedora 40 requires a support of modules due to upgrade path from Fedora 38).

@mcurlej May I ask you for your opinion?

@mcurlej mcurlej added Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take Priority: MEDIUM labels Nov 24, 2023
@mcurlej mcurlej added this to DNF team Nov 24, 2023
@github-project-automation github-project-automation bot moved this to Backlog in DNF team Nov 24, 2023
@mcurlej
Copy link
Member

mcurlej commented Nov 24, 2023

In DNF5 we implement Modularity for legacy reasons mostly. The feature set is limited to basic commands and nothing else. Currently not all of the basic commands are yet implemented. To be able to build DNF5 without modulemd is a valid request. But it is not a high priority.

@sameluch
Copy link
Author

@j-mracek While the changes are non-trivial, do you know what they entail? I am considering making a temporary set of changes until the feature is implemented. Is this mostly limiting the scope of building the libdnf5/module folder in CMake and adding directives to the locations that reference any of the produced objects? Or am I missing a critical component here?

@j-mracek
Copy link
Contributor

j-mracek commented Dec 1, 2023

The code that should be handled is not only in libdnf5/module. There are DNF5 commands, modular filtering applied during loading repositories. Creation of transaction tables, system state where it stores information about modules. But core part is in libdnf5/module and DNF5 commands.

When the build option is functional, I think it would be good to enable a build and test with build flag to ensure that additional changes in modularity would not brake it. I think this is the most difficult part - keep it functional.

@robert-scheck
Copy link
Contributor

As already mentioned in rpm-software-management/libdnf#641 a couple of years ago, I am also interested in being able to build dnf(5) without libmodulemd.

@kontura
Copy link
Contributor

kontura commented Jun 3, 2024

I have created a PR that should make building with -DWITH_LIBMODULEMD=OFF work.

@kontura
Copy link
Contributor

kontura commented Jul 1, 2024

This should be now working.

@kontura kontura closed this as completed Jul 1, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in DNF team Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
Archived in project
Development

No branches or pull requests

6 participants