* [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass
2012-03-23 16:37 [PATCH 1/4] procps: use update-alternatives for pwdx, pgrep and watch Andreas Oberritter
@ 2012-03-23 16:37 ` Andreas Oberritter
2012-03-23 17:20 ` Koen Kooi
2012-03-23 17:39 ` Richard Purdie
2012-03-23 16:37 ` [PATCH 3/4] sysvinit: use update-alternatives for mountpoint and runlevel Andreas Oberritter
` (2 subsequent siblings)
3 siblings, 2 replies; 11+ messages in thread
From: Andreas Oberritter @ 2012-03-23 16:37 UTC (permalink / raw)
To: openembedded-core
* Run depmod when the rootfs gets generated.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/classes/module.bbclass | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index 53c16b7..e370b24 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -37,15 +37,16 @@ module_do_install() {
}
pkg_postinst_append () {
- if [ -n "$D" ]; then
- exit 1
- fi
+if [ -n "$D" ]; then
+ ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
+else
depmod -a
update-modules || true
+fi
}
pkg_postrm_append () {
- update-modules || true
+update-modules || true
}
EXPORT_FUNCTIONS do_compile do_install
--
1.7.5.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass
2012-03-23 16:37 ` [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass Andreas Oberritter
@ 2012-03-23 17:20 ` Koen Kooi
2012-03-23 17:58 ` Andreas Oberritter
2012-03-23 17:39 ` Richard Purdie
1 sibling, 1 reply; 11+ messages in thread
From: Koen Kooi @ 2012-03-23 17:20 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Op 23 mrt. 2012, om 17:37 heeft Andreas Oberritter het volgende geschreven:
> * Run depmod when the rootfs gets generated.
>
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> ---
> meta/classes/module.bbclass | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
> index 53c16b7..e370b24 100644
> --- a/meta/classes/module.bbclass
> +++ b/meta/classes/module.bbclass
> @@ -37,15 +37,16 @@ module_do_install() {
> }
>
> pkg_postinst_append () {
> - if [ -n "$D" ]; then
> - exit 1
> - fi
> +if [ -n "$D" ]; then
> + ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
> +else
> depmod -a
> update-modules || true
> +fi
That encodes host system paths into the package, which is not a good thing for tools like narcissus and hob.
regards,
Koen
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass
2012-03-23 17:20 ` Koen Kooi
@ 2012-03-23 17:58 ` Andreas Oberritter
2012-03-23 18:20 ` Koen Kooi
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Oberritter @ 2012-03-23 17:58 UTC (permalink / raw)
To: openembedded-core
On 23.03.2012 18:20, Koen Kooi wrote:
>
> Op 23 mrt. 2012, om 17:37 heeft Andreas Oberritter het volgende geschreven:
>
>> * Run depmod when the rootfs gets generated.
>>
>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>> ---
>> meta/classes/module.bbclass | 9 +++++----
>> 1 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
>> index 53c16b7..e370b24 100644
>> --- a/meta/classes/module.bbclass
>> +++ b/meta/classes/module.bbclass
>> @@ -37,15 +37,16 @@ module_do_install() {
>> }
>>
>> pkg_postinst_append () {
>> - if [ -n "$D" ]; then
>> - exit 1
>> - fi
>> +if [ -n "$D" ]; then
>> + ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
>> +else
>> depmod -a
>> update-modules || true
>> +fi
>
> That encodes host system paths into the package, which is not a good thing for tools like narcissus and hob.
So should we remove the same lines from kernel.bbclass?
Regards,
Andreas
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass
2012-03-23 17:58 ` Andreas Oberritter
@ 2012-03-23 18:20 ` Koen Kooi
2012-03-23 18:32 ` Richard Purdie
0 siblings, 1 reply; 11+ messages in thread
From: Koen Kooi @ 2012-03-23 18:20 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Op 23 mrt. 2012, om 18:58 heeft Andreas Oberritter het volgende geschreven:
> On 23.03.2012 18:20, Koen Kooi wrote:
>>
>> Op 23 mrt. 2012, om 17:37 heeft Andreas Oberritter het volgende geschreven:
>>
>>> * Run depmod when the rootfs gets generated.
>>>
>>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>>> ---
>>> meta/classes/module.bbclass | 9 +++++----
>>> 1 files changed, 5 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
>>> index 53c16b7..e370b24 100644
>>> --- a/meta/classes/module.bbclass
>>> +++ b/meta/classes/module.bbclass
>>> @@ -37,15 +37,16 @@ module_do_install() {
>>> }
>>>
>>> pkg_postinst_append () {
>>> - if [ -n "$D" ]; then
>>> - exit 1
>>> - fi
>>> +if [ -n "$D" ]; then
>>> + ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
>>> +else
>>> depmod -a
>>> update-modules || true
>>> +fi
>>
>> That encodes host system paths into the package, which is not a good thing for tools like narcissus and hob.
>
> So should we remove the same lines from kernel.bbclass?
I think so, I don't think we want to hand out binaries with scripts that say things like:
foo-linux-depmod -F /storage/openembedded-is-a-poopyhead/something
regards,
Koen
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass
2012-03-23 18:20 ` Koen Kooi
@ 2012-03-23 18:32 ` Richard Purdie
0 siblings, 0 replies; 11+ messages in thread
From: Richard Purdie @ 2012-03-23 18:32 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, 2012-03-23 at 19:20 +0100, Koen Kooi wrote:
> Op 23 mrt. 2012, om 18:58 heeft Andreas Oberritter het volgende geschreven:
>
> > On 23.03.2012 18:20, Koen Kooi wrote:
> >>
> >> Op 23 mrt. 2012, om 17:37 heeft Andreas Oberritter het volgende geschreven:
> >>
> >>> * Run depmod when the rootfs gets generated.
> >>>
> >>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> >>> ---
> >>> meta/classes/module.bbclass | 9 +++++----
> >>> 1 files changed, 5 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
> >>> index 53c16b7..e370b24 100644
> >>> --- a/meta/classes/module.bbclass
> >>> +++ b/meta/classes/module.bbclass
> >>> @@ -37,15 +37,16 @@ module_do_install() {
> >>> }
> >>>
> >>> pkg_postinst_append () {
> >>> - if [ -n "$D" ]; then
> >>> - exit 1
> >>> - fi
> >>> +if [ -n "$D" ]; then
> >>> + ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
> >>> +else
> >>> depmod -a
> >>> update-modules || true
> >>> +fi
> >>
> >> That encodes host system paths into the package, which is not a good thing for tools like narcissus and hob.
> >
> > So should we remove the same lines from kernel.bbclass?
>
> I think so, I don't think we want to hand out binaries with scripts that say things like:
>
> foo-linux-depmod -F /storage/openembedded-is-a-poopyhead/something
However note that the command is only run on the build system, not on
the target and avoids running postinstalls. I'm not taking a patch to
remove this unless there is some equivalent functionality added.
Cheers,
Richard
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass
2012-03-23 16:37 ` [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass Andreas Oberritter
2012-03-23 17:20 ` Koen Kooi
@ 2012-03-23 17:39 ` Richard Purdie
2012-03-23 18:00 ` Andreas Oberritter
1 sibling, 1 reply; 11+ messages in thread
From: Richard Purdie @ 2012-03-23 17:39 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, 2012-03-23 at 17:37 +0100, Andreas Oberritter wrote:
> * Run depmod when the rootfs gets generated.
>
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> ---
> meta/classes/module.bbclass | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
The post install from kernel.bbclass should take care of this at rootfs
time so we don't need to duplicate it?
Cheers,
Richard
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass
2012-03-23 17:39 ` Richard Purdie
@ 2012-03-23 18:00 ` Andreas Oberritter
0 siblings, 0 replies; 11+ messages in thread
From: Andreas Oberritter @ 2012-03-23 18:00 UTC (permalink / raw)
To: openembedded-core
On 23.03.2012 18:39, Richard Purdie wrote:
> On Fri, 2012-03-23 at 17:37 +0100, Andreas Oberritter wrote:
>> * Run depmod when the rootfs gets generated.
>>
>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>> ---
>> meta/classes/module.bbclass | 9 +++++----
>> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> The post install from kernel.bbclass should take care of this at rootfs
> time so we don't need to duplicate it?
Would exit 0 be OK then? Should kernel.bbclass changed likewise in
pkg_postinst_modules?
Regards,
Andreas
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/4] sysvinit: use update-alternatives for mountpoint and runlevel
2012-03-23 16:37 [PATCH 1/4] procps: use update-alternatives for pwdx, pgrep and watch Andreas Oberritter
2012-03-23 16:37 ` [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass Andreas Oberritter
@ 2012-03-23 16:37 ` Andreas Oberritter
2012-03-23 16:37 ` [PATCH 4/4] ppp: drop unneeded pkg-postinst Andreas Oberritter
2012-04-03 21:53 ` [PATCH 1/4] procps: use update-alternatives for pwdx, pgrep and watch Saul Wold
3 siblings, 0 replies; 11+ messages in thread
From: Andreas Oberritter @ 2012-03-23 16:37 UTC (permalink / raw)
To: openembedded-core
* mountpoint and runlevel may be provided by busybox.
* Use update-alternatives to avoid conflict.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 663e298..d3e430c 100644
--- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -5,7 +5,7 @@ SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4"
-PR = "r5"
+PR = "r6"
RDEPENDS_${PN} = "${PN}-inittab"
@@ -66,9 +66,11 @@ do_install () {
ln -s ../init.d/stop-bootlogd ${D}${sysconfdir}/rc$level.d/S99stop-bootlogd
done
mv ${D}${base_sbindir}/init ${D}${base_sbindir}/init.${BPN}
+ mv ${D}${base_bindir}/mountpoint ${D}${base_bindir}/mountpoint.${BPN}
mv ${D}${base_bindir}/pidof ${D}${base_bindir}/pidof.${BPN}
mv ${D}${base_sbindir}/halt ${D}${base_sbindir}/halt.${BPN}
mv ${D}${base_sbindir}/reboot ${D}${base_sbindir}/reboot.${BPN}
+ mv ${D}${base_sbindir}/runlevel ${D}${base_sbindir}/runlevel.${BPN}
mv ${D}${base_sbindir}/shutdown ${D}${base_sbindir}/shutdown.${BPN}
mv ${D}${base_sbindir}/poweroff ${D}${base_sbindir}/poweroff.${BPN}
mv ${D}${bindir}/last ${D}${bindir}/last.${BPN}
@@ -77,8 +79,10 @@ do_install () {
}
pkg_postinst_${PN} () {
+ update-alternatives --install ${base_bindir}/mountpoint mountpoint mountpoint.${BPN} 200
update-alternatives --install ${base_sbindir}/halt halt halt.${BPN} 200
update-alternatives --install ${base_sbindir}/reboot reboot reboot.${BPN} 200
+ update-alternatives --install ${base_sbindir}/runlevel runlevel runlevel.${BPN} 200
update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${BPN} 200
update-alternatives --install ${base_sbindir}/poweroff poweroff poweroff.${BPN} 200
update-alternatives --install ${bindir}/last last last.${BPN} 200
@@ -87,8 +91,10 @@ pkg_postinst_${PN} () {
}
pkg_prerm_${PN} () {
+ update-alternatives --remove mountpoint mountpoint.${BPN}
update-alternatives --remove halt halt.${BPN}
update-alternatives --remove reboot reboot.${BPN}
+ update-alternatives --remove runlevel runlevel.${BPN}
update-alternatives --remove shutdown shutdown.${BPN}
update-alternatives --remove poweroff poweroff.${BPN}
update-alternatives --remove last last.${BPN}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/4] ppp: drop unneeded pkg-postinst
2012-03-23 16:37 [PATCH 1/4] procps: use update-alternatives for pwdx, pgrep and watch Andreas Oberritter
2012-03-23 16:37 ` [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass Andreas Oberritter
2012-03-23 16:37 ` [PATCH 3/4] sysvinit: use update-alternatives for mountpoint and runlevel Andreas Oberritter
@ 2012-03-23 16:37 ` Andreas Oberritter
2012-04-03 21:53 ` [PATCH 1/4] procps: use update-alternatives for pwdx, pgrep and watch Saul Wold
3 siblings, 0 replies; 11+ messages in thread
From: Andreas Oberritter @ 2012-03-23 16:37 UTC (permalink / raw)
To: openembedded-core
* pkg-postinst was used to make pppd setuid root, which
can now be done in do_install() instead.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-connectivity/ppp/ppp_2.4.5.bb | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.5.bb b/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
index 9232e6f..6af0d42 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77
file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
-PR = "r3"
+PR = "r4"
SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
file://makefile.patch \
@@ -49,6 +49,7 @@ do_install_append () {
install -m 0755 ${WORKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/
install -m 0755 ${WORKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/
rm -rf ${D}/${mandir}/man8/man8
+ chmod u+s ${D}${sbindir}/pppd
}
CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
@@ -72,11 +73,3 @@ DESCRIPTION_${PN}-minconn = "Plugin for PPP to specify a minimum connect time b
DESCRIPTION_${PN}-password = "Plugin for PPP to get passwords via a pipe"
DESCRIPTION_${PN}-l2tp = "Plugin for PPP for l2tp support"
DESCRIPTION_${PN}-tools = "The pppdump and pppstats utitilities"
-
-pkg_postinst_${PN}() {
-if test "x$D" != "x"; then
- exit 1
-else
- chmod u+s ${sbindir}/pppd
-fi
-}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/4] procps: use update-alternatives for pwdx, pgrep and watch
2012-03-23 16:37 [PATCH 1/4] procps: use update-alternatives for pwdx, pgrep and watch Andreas Oberritter
` (2 preceding siblings ...)
2012-03-23 16:37 ` [PATCH 4/4] ppp: drop unneeded pkg-postinst Andreas Oberritter
@ 2012-04-03 21:53 ` Saul Wold
3 siblings, 0 replies; 11+ messages in thread
From: Saul Wold @ 2012-04-03 21:53 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 03/23/2012 09:37 AM, Andreas Oberritter wrote:
> * pwdx, pgrep and watch may be provided by busybox.
> * Use update-alternatives to avoid conflict.
>
> Signed-off-by: Andreas Oberritter<obi@opendreambox.org>
> ---
> meta/recipes-extended/procps/procps_3.2.8.bb | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-extended/procps/procps_3.2.8.bb b/meta/recipes-extended/procps/procps_3.2.8.bb
> index 27d2b5c..683badc 100644
> --- a/meta/recipes-extended/procps/procps_3.2.8.bb
> +++ b/meta/recipes-extended/procps/procps_3.2.8.bb
> @@ -1,11 +1,12 @@
> require procps.inc
>
> -PR = "r5"
> +PR = "r6"
>
> inherit update-alternatives
>
> ALTERNATIVE_LINKS = "${bindir}/top ${bindir}/uptime ${bindir}/free ${bindir}/pkill ${bindir}/pmap \
> - ${base_bindir}/kill ${base_sbindir}/sysctl ${base_bindir}/ps"
> + ${base_bindir}/kill ${base_sbindir}/sysctl ${base_bindir}/ps \
> + ${bindir}/pgrep ${bindir}/pwdx ${bindir}/watch"
> ALTERNATIVE_PRIORITY = "110"
>
> SRC_URI += "file://procmodule.patch \
Merged this along with the sysvinit and ppp patches.
Thanks
Sau!
^ permalink raw reply [flat|nested] 11+ messages in thread