spec: Fix ownership of the dnf-json rpmmd files
dnf-json previously ran as a service, and the /var/cache/osbuild-composer/rpmmd directory and files were owned by root. As a script called from osbuild-composer those directories and files need to be owned by _osbuild-composer:_osbuild-composer, otherwise it will not be able to depsolve after an upgrade from the previous implementation. This can be worked around by removing the /var/cache/osbuild-composer/rpmmd directory and restarting the service or rebooting. Fixes #3079
This commit is contained in:
parent
8fdd158799
commit
d1e69fe528
1 changed files with 6 additions and 0 deletions
|
|
@ -350,6 +350,12 @@ The dnf-json binary used by osbuild-composer and the workers.
|
||||||
%files dnf-json
|
%files dnf-json
|
||||||
%{_libexecdir}/osbuild-composer/dnf-json
|
%{_libexecdir}/osbuild-composer/dnf-json
|
||||||
|
|
||||||
|
%post dnf-json
|
||||||
|
# Fix ownership of the rpmmd cache files from previous versions where it was owned by root:root
|
||||||
|
if [ -e /var/cache/osbuild-composer/rpmmd ]; then
|
||||||
|
chown -f -R --from root:root _osbuild-composer:_osbuild-composer /var/cache/osbuild-composer/rpmmd
|
||||||
|
fi
|
||||||
|
|
||||||
%if %{with tests} || 0%{?rhel}
|
%if %{with tests} || 0%{?rhel}
|
||||||
|
|
||||||
%package tests
|
%package tests
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue