Patchwork [1/1] kmod: fix installation path of pkgconfig files

login
register
mail settings
Submitter Otavio Salvador
Date May 14, 2012, 1:47 p.m.
Message ID <f1b02094a00615abfdee28e820c70e50c2ca9471.1337003246.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/27571/
State New
Headers show

Comments

Otavio Salvador - May 14, 2012, 1:47 p.m.
The pkgconfig files need to be installed in ${libdir} instead of
${base_libdir}.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/recipes-kernel/kmod/kmod_git.bb |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Koen Kooi - May 14, 2012, 2:06 p.m.
Op 14 mei 2012, om 15:47 heeft Otavio Salvador het volgende geschreven:

> The pkgconfig files need to be installed in ${libdir} instead of
> ${base_libdir}.

Thanks for the patch, I was working on something similar :) I talked with the kmod and udev people and they asked why we want kmod libs in /lib instead of /usr/lib. I didn't have an answer to that, does anyone else have a decent one? If not, let's not mess with $prefix and remove all the do_install changes.

regards,

Koen
Otavio Salvador - May 14, 2012, 3:24 p.m.
On Mon, May 14, 2012 at 11:06 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
>
> Op 14 mei 2012, om 15:47 heeft Otavio Salvador het volgende geschreven:
>
>> The pkgconfig files need to be installed in ${libdir} instead of
>> ${base_libdir}.
>
> Thanks for the patch, I was working on something similar :) I talked with the kmod and udev people and they asked why we want kmod libs in /lib instead of /usr/lib. I didn't have an answer to that, does anyone else have a decent one? If not, let's not mess with $prefix and remove all the do_install changes.

OE-Core try to allow the use of /usr in a separated partition so it
seems it is a requirement for it to work in initrdless systems.
Richard Purdie - May 15, 2012, 5:55 p.m.
On Mon, 2012-05-14 at 12:24 -0300, Otavio Salvador wrote:
> On Mon, May 14, 2012 at 11:06 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> >
> > Op 14 mei 2012, om 15:47 heeft Otavio Salvador het volgende geschreven:
> >
> >> The pkgconfig files need to be installed in ${libdir} instead of
> >> ${base_libdir}.
> >
> > Thanks for the patch, I was working on something similar :) I talked
> with the kmod and udev people and they asked why we want kmod libs
> in /lib instead of /usr/lib. I didn't have an answer to that, does
> anyone else have a decent one? If not, let's not mess with $prefix and
> remove all the do_install changes.
> 
> OE-Core try to allow the use of /usr in a separated partition so it
> seems it is a requirement for it to work in initrdless systems.

I've heard requests from people that / be bootable with /usr being
mounted later. For something like kmod, there is therefore a case for
putting the library in base_libdir, not libdir. Not doing so sounds like
a bit of a cop-out from the maintainers.

Cheers,

Richard
Koen Kooi - May 15, 2012, 6:21 p.m.
Op 15 mei 2012, om 19:55 heeft Richard Purdie het volgende geschreven:

> On Mon, 2012-05-14 at 12:24 -0300, Otavio Salvador wrote:
>> On Mon, May 14, 2012 at 11:06 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>> 
>>> Op 14 mei 2012, om 15:47 heeft Otavio Salvador het volgende geschreven:
>>> 
>>>> The pkgconfig files need to be installed in ${libdir} instead of
>>>> ${base_libdir}.
>>> 
>>> Thanks for the patch, I was working on something similar :) I talked
>> with the kmod and udev people and they asked why we want kmod libs
>> in /lib instead of /usr/lib. I didn't have an answer to that, does
>> anyone else have a decent one? If not, let's not mess with $prefix and
>> remove all the do_install changes.
>> 
>> OE-Core try to allow the use of /usr in a separated partition so it
>> seems it is a requirement for it to work in initrdless systems.
> 
> I've heard requests from people that / be bootable with /usr being
> mounted later. For something like kmod, there is therefore a case for
> putting the library in base_libdir, not libdir. Not doing so sounds like
> a bit of a cop-out from the maintainers.

Good luck with booting a split /usr without udev. Can we *please* get the .pc in the right place so udev builds before trying to fix pie-in-the-sky things like split /usr?
Khem Raj - May 15, 2012, 8:55 p.m.
On Tue, May 15, 2012 at 10:55 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> I've heard requests from people that / be bootable with /usr being
> mounted later. For something like kmod, there is therefore a case for
> putting the library in base_libdir, not libdir. Not doing so sounds like
> a bit of a cop-out from the maintainers.

I think this should not be made so mandatory in OE-Core IMO since none of modern
systems would do something like that.
Otavio Salvador - May 15, 2012, 9 p.m.
On Tue, May 15, 2012 at 5:55 PM, Khem Raj <raj.khem@gmail.com> wrote:
> I think this should not be made so mandatory in OE-Core IMO since none of modern
> systems would do something like that.

I agree with you Khem; I think that systems that require this ought to
use a initramfs or initrd image for it. I see no it as not worth to
support it and the amount of hassle to support it is not worth it.

Patch

diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb
index d9c4d8b..7b4a45a 100644
--- a/meta/recipes-kernel/kmod/kmod_git.bb
+++ b/meta/recipes-kernel/kmod/kmod_git.bb
@@ -3,7 +3,7 @@ 
 
 require kmod.inc
 
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
 
 PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
 RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
@@ -34,6 +34,10 @@  do_install_append () {
 
         # install depmod.d file for search/ dir
         install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf"
+
+		# fix pkgconfig installation path
+		install -dm755 ${D}${libdir}
+		mv ${D}${base_libdir}/pkgconfig ${D}{libdir}
 }
 
 pkg_postinst_kmod() {