Openembedded Core Discussions
 help / color / mirror / Atom feed
* [Patch v3] rootfs_ipk bbclass: special-case base-passwd preinst to run first
@ 2011-11-04 11:44 Koen Kooi
  2011-11-04 15:45 ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Koen Kooi @ 2011-11-04 11:44 UTC (permalink / raw)
  To: openembedded-core; +Cc: Koen Kooi

Preinst are run alphabetically which breaks when e.g. avahi-daemon needs /etc/passwd present.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/classes/rootfs_ipk.bbclass |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index e02b816..3094c1a 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -77,6 +77,12 @@ fakeroot rootfs_ipk_do_rootfs () {
 	${ROOTFS_POSTINSTALL_COMMAND}
 	
 	runtime_script_required=0
+
+	# Base-passwd needs to run first to install /etc/passwd and friends
+	if [ -e ${IMAGE_ROOTFS}${opkglibdir}/info/base-passwd.preinst ] ; then
+		sh ${IMAGE_ROOTFS}${opkglibdir}/info/base-passwd.preinst
+	fi
+
 	for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do
 		if [ -f $i ] && ! sh $i; then
 		     	runtime_script_required=1
-- 
1.7.2.5




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Patch v3] rootfs_ipk bbclass: special-case base-passwd preinst to run first
  2011-11-04 11:44 [Patch v3] rootfs_ipk bbclass: special-case base-passwd preinst to run first Koen Kooi
@ 2011-11-04 15:45 ` Richard Purdie
  2011-11-04 16:09   ` Koen Kooi
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2011-11-04 15:45 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Koen Kooi, saul.wold

On Fri, 2011-11-04 at 12:44 +0100, Koen Kooi wrote:
> Preinst are run alphabetically which breaks when e.g. avahi-daemon needs /etc/passwd present.
> 
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
>  meta/classes/rootfs_ipk.bbclass |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)

I've merged this to master. I'm not particularly happy about it but
right now I can't see a good way to fix this short/medium term.

Saul: We'd better check if the rpm rootfs class needs this help

Cheers,

Richard




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch v3] rootfs_ipk bbclass: special-case base-passwd preinst to run first
  2011-11-04 15:45 ` Richard Purdie
@ 2011-11-04 16:09   ` Koen Kooi
  2011-11-04 16:23     ` Mark Hatle
  0 siblings, 1 reply; 4+ messages in thread
From: Koen Kooi @ 2011-11-04 16:09 UTC (permalink / raw)
  To: Richard Purdie; +Cc: saul.wold, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 776 bytes --]


Op 4 nov. 2011, om 16:45 heeft Richard Purdie het volgende geschreven:

> On Fri, 2011-11-04 at 12:44 +0100, Koen Kooi wrote:
>> Preinst are run alphabetically which breaks when e.g. avahi-daemon needs /etc/passwd present.
>> 
>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>> ---
>> meta/classes/rootfs_ipk.bbclass |    6 ++++++
>> 1 files changed, 6 insertions(+), 0 deletions(-)
> 
> I've merged this to master. I'm not particularly happy about it but
> right now I can't see a good way to fix this short/medium term.

RP and discussed this and we're both not happy with it, but no viable other options short/medium term. The idea is to see if we can have opkg run all the preinsts since opkg does dependency resolving nowadays.

regards,

Koen

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch v3] rootfs_ipk bbclass: special-case base-passwd preinst to run first
  2011-11-04 16:09   ` Koen Kooi
@ 2011-11-04 16:23     ` Mark Hatle
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Hatle @ 2011-11-04 16:23 UTC (permalink / raw)
  To: openembedded-core

One way to possibly address this is to create a distribution image creation
policy.  (That is how most of the distributions I'm aware of do it..
desktop/server and embedded.)

The policy is generally:

install passwd/group files
install filesystem hierarchy (it's second because it needs uid/gids)
install "everything else"

Something needs to set down the base set of components so the filesystem is sane
before we do the actual package installs and pre/post install scripts for each.

We could make this generic by defining "critical" or "base" or whatever name you
want packages and setting a specific order for these packages.  (The list needs
to kept small, there generally are one or two items that need to be done very
early.)

--Mark


On 11/4/11 11:09 AM, Koen Kooi wrote:
> 
> Op 4 nov. 2011, om 16:45 heeft Richard Purdie het volgende geschreven:
> 
>> On Fri, 2011-11-04 at 12:44 +0100, Koen Kooi wrote:
>>> Preinst are run alphabetically which breaks when e.g. avahi-daemon needs /etc/passwd present.
>>>
>>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>>> ---
>>> meta/classes/rootfs_ipk.bbclass |    6 ++++++
>>> 1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> I've merged this to master. I'm not particularly happy about it but
>> right now I can't see a good way to fix this short/medium term.
> 
> RP and discussed this and we're both not happy with it, but no viable other options short/medium term. The idea is to see if we can have opkg run all the preinsts since opkg does dependency resolving nowadays.
> 
> regards,
> 
> Koen
> 
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-04 16:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-04 11:44 [Patch v3] rootfs_ipk bbclass: special-case base-passwd preinst to run first Koen Kooi
2011-11-04 15:45 ` Richard Purdie
2011-11-04 16:09   ` Koen Kooi
2011-11-04 16:23     ` Mark Hatle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox