ibm-openbmc / ibm-acf

Apache License 2.0
0 stars 12 forks source link

build: handle usrmerge #39

Closed anoo1 closed 12 months ago

anoo1 commented 1 year ago

When building for merged-usr systems, the location of libdir might be in /usr/lib. We should rely on the passed in ${libdir} for installation rather than hard-coding as /lib/security

Change-Id: I88549455d1f17ad40d9b2953559408261b623f16

anoo1 commented 1 year ago

Based on this fix: https://gerrit.openbmc.org/c/openbmc/pam-ipmi/+/63589

bentyner commented 1 year ago

Change looks good as coded - do we know that libdir is correctly detected in our builds? From Meson documentation: libdir is automatically detected based on your platform, it should be correct when doing "native" (build machine == host machine) compilation. For cross compiles Meson will try to guess the correct libdir, but it may not be accurate, especially on Linux where different distributions have different defaults. Using a cross file, particularly the paths section may be necessary.

anoo1 commented 1 year ago

Hmm, other repos that use libdir in meson.build appear that have their library files installed in /usr/lib/ on the BMC. Need to do some additional investigation.

anoo1 commented 1 year ago

For my reference, we might need to update the recipe as well: https://gerrit.openbmc.org/c/openbmc/openbmc/+/63590/1/meta-phosphor/recipes-extended/pam/pam-ipmi_git.bb

joseph-reynolds commented 1 year ago

Is my understanding correct that this directory is not changing on Power systems and remains /usr/lib? Because that would be a scary change for a firmware update. If this is changing to /lib/security then we should consider waiting to make this change on a new release family such as PNext.

geissonator commented 1 year ago

I verified with this change + latest yocto that the file ends up at /usr/lib/security/pam_ibmacf.so so I think we're good @joseph-reynolds ?

bentyner commented 1 year ago

Not sure where the concern(s) are. My concern is that we get the right path (/lib or /usr/lib) with this change. As for where things should be installed is there concern here?

https://docs.yoctoproject.org/3.1.2/ref-manual/ref-manual.html

https://wiki.debian.org/UsrMerge