[Pkg-libvirt-maintainers] Bug#973489: libvirt-daemon-system: upgrade overwrites generated file /etc/libvirt/qemu/networks/default.xml
Andrea Bolognani
eof at kiyuko.org
Sun Nov 15 22:36:20 GMT 2020
On Tue, Nov 10, 2020 at 12:20:13AM +0100, Andrea Bolognani wrote:
> I agree that it should probably not be in /etc; in fact, the upstream
> spec file deals with it pretty much how Thorsten suggested above:
>
> %install
>
> install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/
> cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \
> $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
> chmod 0600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
>
> %post daemon-config-network
>
> if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml; then
> UUID=`/usr/bin/uuidgen`
> sed -e "s/${orig_sub}/${sub}/g" \
> -e "s,</name>,</name>\n <uuid>$UUID</uuid>," \
> < %{_datadir}/libvirt/networks/default.xml \
> > %{_sysconfdir}/libvirt/qemu/networks/default.xml
> ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
> chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml
> fi
>
> We should do something similar in Debian as well, possibly including
> shipping the default network configuration in a separate binary
> package. I'll look into it over the next few days :)
I've taken a stab at addressing this:
https://salsa.debian.org/libvirt-team/libvirt/-/merge_requests/78
Thorsten, I would appreciate if you could take a look, especially
since you seem to have some familiarity with this sort of situation
already.
--
Andrea Bolognani <eof at kiyuko.org>
Resistance is futile, you will be garbage collected.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-maintainers/attachments/20201115/bfcfe6c5/attachment.sig>
More information about the Pkg-libvirt-maintainers
mailing list