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

Improve build determinism (replace soft dependencies with strict ones) #2855

Closed
kanavin opened this issue Jan 18, 2024 · 1 comment · Fixed by #2914
Closed

Improve build determinism (replace soft dependencies with strict ones) #2855

kanavin opened this issue Jan 18, 2024 · 1 comment · Fixed by #2914
Labels
bug build Build-system related

Comments

@kanavin
Copy link
Contributor

kanavin commented Jan 18, 2024

This is a followup to #2852

There is still a number of soft dependencies in https://github.com/rpm-software-management/rpm/blob/master/CMakeLists.txt:

find_package(BZip2)
find_package(Iconv)
...
pkg_check_modules(ZSTD IMPORTED_TARGET libzstd>=1.3.8)
pkg_check_modules(LIBELF IMPORTED_TARGET libelf)
pkg_check_modules(LIBDW IMPORTED_TARGET libdw)
pkg_check_modules(LIBLZMA IMPORTED_TARGET liblzma>=5.2.0)

Then, the respective build options get enabled depending on whether or not these components were found on the build system.

I believe it's better to make them strict (add REQUIRED parameter), and (optionally) wrap them in cmake options (like was just done for readline support), if there are situations where they should be disabled. I can write the patch, but wanted first to confirm what would be preferred.

@kanavin kanavin added the bug label Jan 18, 2024
@dmnks dmnks self-assigned this Feb 7, 2024
@dmnks dmnks added the build Build-system related label Feb 13, 2024
@dmnks
Copy link
Contributor

dmnks commented Feb 14, 2024

Oh, sure! This looks useful. Please go ahead and submit a PR, we'll take it from there. Thanks!

kanavin pushed a commit to kanavin/rpm that referenced this issue Feb 16, 2024
Prior to this, the respective build options would get enabled depending
on whether or not these components were found on the build system.

I believe it's better to make them strict (add REQUIRED parameter),
so that rpm builds are always deterministic, subject to cmake options.

As a follow-up, some of these newly hardened dependencies can be wrapped
in cmake options (like was just done for readline support), if there are situations
where they should be disabled.

Fixes: rpm-software-management#2855

Signed-off-by: Alexander Kanavin <[email protected]>
kanavin pushed a commit to kanavin/rpm that referenced this issue Feb 16, 2024
Prior to this, the respective build options would get enabled depending
on whether or not these components were found on the build system.

I believe it's better to make them strict (add REQUIRED parameter),
so that rpm builds are always deterministic, subject to cmake options.

As a follow-up, some of these newly hardened dependencies can be wrapped
in cmake options (like was just done for readline support), if there are situations
where they should be disabled.

Resolves: rpm-software-management#2855
kanavin pushed a commit to kanavin/rpm that referenced this issue Feb 20, 2024
Prior to this, the respective build options would get enabled depending
on whether or not these components were found on the build system.

I believe it's better to make them strict (add REQUIRED parameter),
so that rpm builds are always deterministic, subject to cmake options.

Resolves: rpm-software-management#2855
@dmnks dmnks removed their assignment Mar 6, 2024
dmnks pushed a commit that referenced this issue Mar 6, 2024
Prior to this, the respective build options would get enabled depending
on whether or not these components were found on the build system.

I believe it's better to make them strict (add REQUIRED parameter),
so that rpm builds are always deterministic, subject to cmake options.

Resolves: #2855
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build Build-system related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants