FS#68289 - [libvirt] libvirt_leaseshelper install location has changed

Attached to Project: Community Packages
Opened by singe infini (singeinfini) - Friday, 16 October 2020, 23:00 GMT
Last edited by freswa (frederik) - Saturday, 17 October 2020, 16:39 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To David Runge (dvzrv)
freswa (frederik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
The installation path for libvirt_leaseshelper was changed in version 6.8.0.1

Previously:
$ bsdtar -tf /var/cache/pacman/pkg/libvirt-6.5.0-2-x86_64.pkg.tar.zst | grep lease
usr/lib/libvirt/libvirt_leaseshelper

Now:
$ bsdtar -tf /var/cache/pacman/pkg/libvirt-6.8.0-1-x86_64.pkg.tar.zst | grep lease
usr/lib/libvirt_leaseshelper

But the AppArmor profile for dnsmasq (/etc/apparmor.d/dnsmasq) refers to /usr/lib/libvirt/libvirt_leaseshelper.
Consequently, the following error message may be observed at network startup:

libvirtd[2473]: internal error: Child process (VIR_BRIDGE_NAME=virbr0
/usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-scrip
t=/usr/lib/libvirt_leaseshelper) unexpected exit status 3: sh: /usr/lib/libvirt_leaseshelper:
Permission denied
dnsmasq: cannot run lease-init script /usr/lib/libvirt
_leaseshelper: Permission denied


Here is a workaround:
/etc/apparmor.d/usr.sbin.dnsmasq
89c89
< /usr/lib{,64}/libvirt/libvirt_leaseshelper Cx -> libvirt_leaseshelper,
---
> /usr/lib{,64}/{libvirt/,}libvirt_leaseshelper Cx -> libvirt_leaseshelper,
117c117
< /usr/lib{,64}/libvirt/libvirt_leaseshelper m,
---
> /usr/lib{,64}/{libvirt/,}libvirt_leaseshelper m,
This task depends upon

Closed by  freswa (frederik)
Saturday, 17 October 2020, 16:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  libvirt-6.8.0-2
Comment by singe infini (singeinfini) - Friday, 16 October 2020, 23:43 GMT
  • Field changed: Percent Complete (100% → 0%)
I'm sorry for the duplicate, I've mispelled the path. It is /etc/apparmor.d/usr.sbin.dnsmasq, which is part of the apparmor package, and not /etc/apparmor.d/dnsmasq. I opened a new bug report to correct the mispell but I shouldn't have done that. Sorry again.
Comment by David Runge (dvzrv) - Saturday, 17 October 2020, 08:24 GMT
@singeinfini: Thanks for the report!

The correct place to fix this is apparmor's upstream:
https://gitlab.com/apparmor/apparmor/-/blob/master/profiles/apparmor.d/usr.sbin.dnsmasq#L117
Comment by loqs (loqs) - Saturday, 17 October 2020, 09:09 GMT
Would it help if libvirt restored the files to their old location?
Comment by David Runge (dvzrv) - Saturday, 17 October 2020, 09:33 GMT
@loqs: Good point. I think this can actually be attributed to the recent switch to the meson build system. Will add freswa.

Loading...