mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
Fix RPM upgrades from F11 to F12
* libvirt.spec.in: Create qemu/kvm user/group in %pre script
This commit is contained in:
parent
d3209478d5
commit
eb78ccf391
@ -412,6 +412,18 @@ chmod 0644 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirtd
|
||||
%clean
|
||||
rm -fr %{buildroot}
|
||||
|
||||
%pre
|
||||
%if 0%{?fedora} >= 12
|
||||
# Normally 'setup' adds this in /etc/passwd, but this is
|
||||
# here for case of upgrades from earlier Fedora. This
|
||||
# UID/GID pair is reserved for qemu:qemu
|
||||
getent group kvm >/dev/null || groupadd -g 36 -r kvm
|
||||
getent group qemu >/dev/null || groupadd -g 107 -r qemu
|
||||
getent passwd qemu >/dev/null || \
|
||||
useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
|
||||
-c "qemu user" qemu
|
||||
%endif
|
||||
|
||||
%post
|
||||
|
||||
%if %{with_libvirtd}
|
||||
|
Loading…
Reference in New Issue
Block a user