Just for the record, there is ${nonarch_libdir} that expands to “/usr/lib” regardless of whether multilib is used or not. It is typically intended for cases like this. //Peter From: meta-virtualization@lists.yoctoproject.org On Behalf Of Bruce Ashfield Sent: den 11 april 2022 15:53 To: Chen, Qi Cc: preeti.sachan@intel.com; meta-virtualization@lists.yoctoproject.org Subject: Re: [meta-virtualization] [PATCH] libvirt: fix do_package issue On Mon, Apr 11, 2022 at 9:45 AM Chen, Qi > wrote: The only package I found which uses /usr/lib/sysctl.d is systemd. It packages ${exec_prefix}/lib/sysctl.d. And it has its reason. It treats /usr/lib as an arch-independent vendor dir, and $libdir is treated as the dir to hold libs. file-hierarchy (www.freedesktop.org) Hmm. Indeed. In that case, I'll go with a variant of the original patch, with a tweaked commit log. I'll take care of that now. Bruce Regards, Qi From: Bruce Ashfield > Sent: Monday, April 11, 2022 9:35 PM To: Chen, Qi > Cc: preeti.sachan@intel.com; meta-virtualization@lists.yoctoproject.org Subject: Re: [meta-virtualization] [PATCH] libvirt: fix do_package issue On Mon, Apr 11, 2022 at 9:32 AM Chen, Qi > wrote: Hi Bruce, Looking at the issue a little further, I found we need to use the hardcoded ‘/usr/lib’. This is because sysctl is hardcoding that. That's a larger issue, and it breaks other parts of the system. We shouldn't have anything with hard coded /usr/lib. How are other packages dealing with this ? In that case, I'll do individual scripts in the packaging, since I don't want a global /usr/lib/ as part of the packaging. Bruce Some codes in sysctl.c from procps: static int PreloadSystem(void) { unsigned di, i; const char *dirs[] = { "/etc/sysctl.d", "/run/sysctl.d", "/usr/local/lib/sysctl.d", "/usr/lib/sysctl.d", "/lib/sysctl.d", }; I’ve sent out a patch to fix the issue. Please help review it. Regards, Qi From: Bruce Ashfield > Sent: Monday, April 11, 2022 9:05 PM To: Chen, Qi > Cc: preeti.sachan@intel.com; meta-virtualization@lists.yoctoproject.org Subject: Re: [meta-virtualization] [PATCH] libvirt: fix do_package issue On Mon, Apr 11, 2022 at 9:01 AM Chen, Qi > wrote: Hi Bruce & Preeti, I was trying to fix the same issue when I found this thread. This issue appears when multilib is enabled. When multilib is disabled, ${libdir} is /usr/lib, thus packaging the file into libvirt-python. When multilib is enabled, ${libdir} is /usr/lib64, and the file is not packaged. Aha. Right you are. So we should tweak libvirt to use ${libdir} and not the hardcoded /user/lib (which it never really should have been), and package anything that gets installed into sysctl.d/ It isn't clear that this particular .conf belongs in libvirtd, but it is just as good there, as in the libvirt-python. I'll do some tests in the non-multiconfig configuration to ensure that everything still packages properly. Bruce Regards, Qi From: meta-virtualization@lists.yoctoproject.org > On Behalf Of Bruce Ashfield Sent: Monday, April 11, 2022 8:44 PM To: preeti.sachan@intel.com Cc: meta-virtualization@lists.yoctoproject.org Subject: Re: [meta-virtualization] [PATCH] libvirt: fix do_package issue There's definitely something different in your configuration, so that needs to be understood first. That file is packaged as part of libvirt-python here, and should be the same for others, as I haven't had any reports of failures. You have a multiconfig in play. Anything else ? What is your init system ? Any bbappends in play ? Bruce On Sun, Apr 10, 2022 at 11:49 PM > wrote: ERROR: mc:x86-2020:libvirt-8.1.0-r0 do_package: QA Issue: libvirt: Files/directories were installed but not shipped in any package: /usr/lib/sysctl.d/60-qemu-postcopy-migration.conf Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. libvirt: 1 installed and not shipped files. [installed-vs-shipped] ERROR: mc:x86-2020:libvirt-8.1.0-r0 do_package: Fatal QA errors were found, failing task.