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

handle situation when _selinux_policy_version is not defined #66

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

xsuchy
Copy link
Contributor

@xsuchy xsuchy commented Jul 31, 2024

No description provided.

Copy link
Contributor

@FrostyX FrostyX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failed CI is because of #64

@praiskup
Copy link
Member

This is interesting, I see this for the first time. Do we really want to depend on specific selinux-policy version, and rebuild anytime they bump it?

@xsuchy
Copy link
Contributor Author

xsuchy commented Sep 11, 2024

The rebuild would be needed only if the version of selinux is decreased. That will never happen.

@praiskup
Copy link
Member

praiskup commented Sep 11, 2024

Ah,

$ rpm --eval %selinux_requires

Requires: selinux-policy >= 41.16 
BuildRequires: pkgconfig(systemd) 
BuildRequires: selinux-policy 
BuildRequires: selinux-policy-devel 
Requires(post): selinux-policy-base >= 41.16 
Requires(post): libselinux-utils 
Requires(post): policycoreutils 
%if 041 || 0 > 7
Requires(post): policycoreutils-python-utils 
%else 
Requires(post): policycoreutils-python 
%endif 

@xsuchy
Copy link
Contributor Author

xsuchy commented Sep 11, 2024

Updated. I intentionally left it in two commits, so it is visible the interaction and intention.

%endif
Requires(post): /usr/sbin/semodule, /sbin/restorecon
Requires(postun): /usr/sbin/semodule, /sbin/restorecon
%{?selinux_requires}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks this macro is not yet finished :-( the %selinux_requires is not defined by redhat-rpm-config nor any other package in minimal buildroot. I reported this problem.

The docs are not updated: https://fedoraproject.org/wiki/SELinux/IndependentPolicy#Example_spec_file_changes_to_incorporate_-selinux_subpackage

IOW, we need to do:
BuildRequires: selinux-policy-devel
%{?selinux_requires}

@xsuchy
Copy link
Contributor Author

xsuchy commented Sep 12, 2024

Updated.

Copy link
Member

@praiskup praiskup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@praiskup praiskup merged commit 099da9f into release-engineering:main Sep 16, 2024
16 checks passed
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.

3 participants