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

spec: Fix files and directories ownership #1527

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions dnf5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ It supports RPM packages, modulemd modules, and comps groups & environments.
%dir %{_datadir}/bash-completion/
%dir %{_datadir}/bash-completion/completions/
%{_datadir}/bash-completion/completions/dnf*
%dir %{_prefix}/lib/sysimage/dnf
%verify(not md5 size mtime) %ghost %{_prefix}/lib/sysimage/dnf/*
%dir %{_prefix}/lib/sysimage/libdnf5
%verify(not md5 size mtime) %ghost %{_prefix}/lib/sysimage/libdnf5/*
%license COPYING.md
%license gpl-2.0.txt
%{_mandir}/man8/dnf5.8.*
Expand Down Expand Up @@ -358,6 +358,7 @@ Package management library.
%else
%exclude %{_sysconfdir}/dnf/dnf.conf
%endif
%ghost %{_sysconfdir}/dnf/versionlock.toml
%dir %{_datadir}/dnf5/libdnf.conf.d
%dir %{_sysconfdir}/dnf/libdnf5.conf.d
%dir %{_datadir}/dnf5/repos.override.d
Expand Down Expand Up @@ -822,15 +823,18 @@ done
%endif

# own dirs and files that dnf5 creates on runtime
mkdir -p %{buildroot}%{_prefix}/lib/sysimage/dnf
for files in \
groups.toml modules.toml nevras.toml packages.toml \
system.toml transaction_history.sqlite \
transaction_history.sqlite-shm \
transaction_history.sqlite-wal userinstalled.toml
mkdir -p %{buildroot}%{_prefix}/lib/sysimage/libdnf5
for file in \
environments.toml groups.toml modules.toml nevras.toml packages.toml \
system.toml \
transaction_history.sqlite transaction_history.sqlite-shm \
transaction_history.sqlite-wal
do
touch %{buildroot}%{_prefix}/lib/sysimage/dnf/$files
touch %{buildroot}%{_prefix}/lib/sysimage/libdnf5/$file
done
mkdir -p %{buildroot}%{_prefix}/lib/sysimage/libdnf5/comps_groups
mkdir -p %{buildroot}%{_prefix}/lib/sysimage/libdnf5/offline
touch %{buildroot}%{_sysconfdir}/dnf/versionlock.toml

# Remove if condition when Fedora 37 is EOL
%if 0%{?fedora} > 37 || 0%{?rhel} > 10
Expand Down
Loading