Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] Pending O.S. Systems' tree patches
@ 2012-02-17 17:47 Otavio Salvador
  2012-02-17 17:47 ` [PATCH 1/3] update-rc.d.bbclass: do nothing for extended cross packages Otavio Salvador
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Otavio Salvador @ 2012-02-17 17:47 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit e5ad03093dfc4364d1407183f458df79f347c7a1:

  guile: fix cross configure failure (2012-02-10 13:38:16 +0000)

are available in the git repository at:
  git://github.com/OSSystems/oe-core master
  https://github.com/OSSystems/oe-core/tree/HEAD

Otavio Salvador (3):
  update-rc.d.bbclass: do nothing for extended cross packages
  rootfs_ipk.bbclass: fix status file location in rootfs
  rootfs_ipk.bbclass: fix unpacked postinst support if no package
    management

 meta/classes/rootfs_ipk.bbclass  |   21 ++++++++++++++++++---
 meta/classes/update-rc.d.bbclass |    1 +
 2 files changed, 19 insertions(+), 3 deletions(-)

-- 
1.7.2.5




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

* [PATCH 1/3] update-rc.d.bbclass: do nothing for extended cross packages
  2012-02-17 17:47 [PATCH 0/3] Pending O.S. Systems' tree patches Otavio Salvador
@ 2012-02-17 17:47 ` Otavio Salvador
  2012-02-17 17:47 ` [PATCH 2/3] rootfs_ipk.bbclass: fix status file location in rootfs Otavio Salvador
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2012-02-17 17:47 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/update-rc.d.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index e72cf78..db88a8e 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -2,6 +2,7 @@ UPDATERCPN ?= "${PN}"
 
 DEPENDS_append = " update-rc.d-native"
 UPDATERCD = "update-rc.d"
+UPDATERCD_virtclass-cross = ""
 UPDATERCD_virtclass-native = ""
 UPDATERCD_virtclass-nativesdk = ""
 
-- 
1.7.2.5




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

* [PATCH 2/3] rootfs_ipk.bbclass: fix status file location in rootfs
  2012-02-17 17:47 [PATCH 0/3] Pending O.S. Systems' tree patches Otavio Salvador
  2012-02-17 17:47 ` [PATCH 1/3] update-rc.d.bbclass: do nothing for extended cross packages Otavio Salvador
@ 2012-02-17 17:47 ` Otavio Salvador
  2012-02-17 17:47 ` [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management Otavio Salvador
  2012-02-24  4:06 ` [PATCH 0/3] Pending O.S. Systems' tree patches Saul Wold
  3 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2012-02-17 17:47 UTC (permalink / raw)
  To: openembedded-core

This fixes runtime requirement checking and read-only-fs checking.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/rootfs_ipk.bbclass |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 5342035..2df8ca4 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -76,7 +76,7 @@ fakeroot rootfs_ipk_do_rootfs () {
 	${ROOTFS_POSTINSTALL_COMMAND}
 	
 	if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then
-		if grep Status:.install.ok.unpacked ${IMAGE_ROOTFS}${opkglibdir}status; then
+		if grep Status:.install.ok.unpacked ${STATUS}; then
 			echo "Some packages could not be configured offline and rootfs is read-only."
 			exit 1
 		fi
@@ -88,9 +88,8 @@ fakeroot rootfs_ipk_do_rootfs () {
 	${ROOTFS_POSTPROCESS_COMMAND}
 	
 	rm -f ${IMAGE_ROOTFS}${opkglibdir}/lists/*
-
 	if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
-		if ! grep Status:.install.ok.unpacked ${IMAGE_ROOTFS}${opkglibdir}status; then
+		if ! grep Status:.install.ok.unpacked ${STATUS}; then
 			# All packages were successfully configured.
 			# update-rc.d, base-passwd are no further use, remove them now
 			opkg-cl ${IPKG_ARGS} --force-depends remove update-rc.d base-passwd || true
-- 
1.7.2.5




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

* [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 17:47 [PATCH 0/3] Pending O.S. Systems' tree patches Otavio Salvador
  2012-02-17 17:47 ` [PATCH 1/3] update-rc.d.bbclass: do nothing for extended cross packages Otavio Salvador
  2012-02-17 17:47 ` [PATCH 2/3] rootfs_ipk.bbclass: fix status file location in rootfs Otavio Salvador
@ 2012-02-17 17:47 ` Otavio Salvador
  2012-02-17 17:51   ` Phil Blundell
  2012-02-24  4:06 ` [PATCH 0/3] Pending O.S. Systems' tree patches Saul Wold
  3 siblings, 1 reply; 15+ messages in thread
From: Otavio Salvador @ 2012-02-17 17:47 UTC (permalink / raw)
  To: openembedded-core

When building without package management we can end with a system
without opkg and thus without support for running unfinished postinsts
on first boot, we fix this providing a S98configure script for this
use case.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/rootfs_ipk.bbclass |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 2df8ca4..11ab8a1 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -96,6 +96,22 @@ fakeroot rootfs_ipk_do_rootfs () {
 
 			# Also delete the status files
 			rm -rf ${IMAGE_ROOTFS}${opkglibdir}
+		else
+			if [ ! -e ${IMAGE_ROOTFS}${bindir}/opkg-cl ]; then
+				# We need to run postinsts but lack opkg, do it byhand
+				cat > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S98configure <<EOF
+#!/bin/sh
+
+for pkg in \`grep -B4 Status:.install.ok.unpacked ${opkglibdir}/status | awk '/^Package: / { print \$2 }'\`; do
+	${opkglibdir}/info/\$pkg.postinst configure
+done
+
+rm -rf ${opkglibdir}
+
+rm ${sysconfdir}/rcS.d/S98configure
+EOF
+				chmod a+x ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S98configure
+			fi
 		fi
 	fi
 	set +x
-- 
1.7.2.5




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

* Re: [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 17:47 ` [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management Otavio Salvador
@ 2012-02-17 17:51   ` Phil Blundell
  2012-02-17 19:06     ` Otavio Salvador
  0 siblings, 1 reply; 15+ messages in thread
From: Phil Blundell @ 2012-02-17 17:51 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-02-17 at 17:47 +0000, Otavio Salvador wrote:
> When building without package management we can end with a system
> without opkg and thus without support for running unfinished postinsts
> on first boot, we fix this providing a S98configure script for this
> use case.

Isn't this what run-postinsts is meant to be doing?

p.





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

* Re: [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 17:51   ` Phil Blundell
@ 2012-02-17 19:06     ` Otavio Salvador
  2012-02-17 19:25       ` Phil Blundell
  0 siblings, 1 reply; 15+ messages in thread
From: Otavio Salvador @ 2012-02-17 19:06 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

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

On Fri, Feb 17, 2012 at 15:51, Phil Blundell <philb@gnu.org> wrote:

> On Fri, 2012-02-17 at 17:47 +0000, Otavio Salvador wrote:
> > When building without package management we can end with a system
> > without opkg and thus without support for running unfinished postinsts
> > on first boot, we fix this providing a S98configure script for this
> > use case.
>
> Isn't this what run-postinsts is meant to be doing?
>

Except it calls opkg-cl configure; that's why I check if opkg-cl is not
available.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

[-- Attachment #2: Type: text/html, Size: 1209 bytes --]

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

* Re: [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 19:06     ` Otavio Salvador
@ 2012-02-17 19:25       ` Phil Blundell
  2012-02-17 19:30         ` Otavio Salvador
  0 siblings, 1 reply; 15+ messages in thread
From: Phil Blundell @ 2012-02-17 19:25 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-02-17 at 17:06 -0200, Otavio Salvador wrote:
> On Fri, Feb 17, 2012 at 15:51, Phil Blundell <philb@gnu.org> wrote:
>         On Fri, 2012-02-17 at 17:47 +0000, Otavio Salvador wrote:
>         > When building without package management we can end with a
>         system
>         > without opkg and thus without support for running unfinished
>         postinsts
>         > on first boot, we fix this providing a S98configure script
>         for this
>         > use case.
>         
>         
>         Isn't this what run-postinsts is meant to be doing?
> 
> 
> Except it calls opkg-cl configure; that's why I check if opkg-cl is
> not available.

Er, does it?  My copy doesn't seem to.

pb@x121e:~/oe/oe-core$ grep opkg-cl meta/recipes-devtools/dpkg/run-postinsts/*
pb@x121e:~/oe/oe-core$

Where are you seeing the call to opkg-cl?

p.





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

* Re: [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 19:25       ` Phil Blundell
@ 2012-02-17 19:30         ` Otavio Salvador
  2012-02-17 19:59           ` Phil Blundell
  0 siblings, 1 reply; 15+ messages in thread
From: Otavio Salvador @ 2012-02-17 19:30 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

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

On Fri, Feb 17, 2012 at 17:25, Phil Blundell <philb@gnu.org> wrote:

> Er, does it?  My copy doesn't seem to.
>
> pb@x121e:~/oe/oe-core$ grep opkg-cl
> meta/recipes-devtools/dpkg/run-postinsts/*
> pb@x121e:~/oe/oe-core$
>
> Where are you seeing the call to opkg-cl?


I don't use dpkg but opkg.

So, looking at opkg.inc we find out:

...
pkg_postinst_${PN} () {
#!/bin/sh
if [ "x$D" != "x" ]; then
        install -d $D${sysconfdir}/rcS.d
        # this happens at S98 where our good 'ole packages script used to
run
        echo "#!/bin/sh
opkg-cl configure
rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
" > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
        chmod 0755
$D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
fi
...

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

[-- Attachment #2: Type: text/html, Size: 1678 bytes --]

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

* Re: [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 19:30         ` Otavio Salvador
@ 2012-02-17 19:59           ` Phil Blundell
  2012-02-17 20:03             ` Otavio Salvador
  0 siblings, 1 reply; 15+ messages in thread
From: Phil Blundell @ 2012-02-17 19:59 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-02-17 at 17:30 -0200, Otavio Salvador wrote:

> I don't use dpkg but opkg.
> 
> 
> So, looking at opkg.inc we find out:
> 
> 
> ...
> pkg_postinst_${PN} () {
> #!/bin/sh
> if [ "x$D" != "x" ]; then
>         install -d $D${sysconfdir}/rcS.d

Well, right, but that's not the run-postinsts package.  You mentioned
that opkg-cl wasn't installed so its own postinst is probably irrelevant
here.

p.






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

* Re: [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 19:59           ` Phil Blundell
@ 2012-02-17 20:03             ` Otavio Salvador
  2012-02-17 20:11               ` Phil Blundell
  0 siblings, 1 reply; 15+ messages in thread
From: Otavio Salvador @ 2012-02-17 20:03 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

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

On Fri, Feb 17, 2012 at 17:59, Phil Blundell <philb@gnu.org> wrote:

> Well, right, but that's not the run-postinsts package.  You mentioned
> that opkg-cl wasn't installed so its own postinst is probably irrelevant
> here.


That's why I added this.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

[-- Attachment #2: Type: text/html, Size: 928 bytes --]

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

* Re: [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 20:03             ` Otavio Salvador
@ 2012-02-17 20:11               ` Phil Blundell
  2012-02-17 20:14                 ` Otavio Salvador
  0 siblings, 1 reply; 15+ messages in thread
From: Phil Blundell @ 2012-02-17 20:11 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-02-17 at 18:03 -0200, Otavio Salvador wrote:
> On Fri, Feb 17, 2012 at 17:59, Phil Blundell <philb@gnu.org> wrote:
>         Well, right, but that's not the run-postinsts package.  You
>         mentioned
>         that opkg-cl wasn't installed so its own postinst is probably
>         irrelevant
>         here.
> 
> 
> That's why I added this.

We seem to be going in circles here but, to go back to what I said at
the beginning, why can't you use the existing run-postinsts recipe
rather than adding a new script?

p.






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

* Re: [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 20:11               ` Phil Blundell
@ 2012-02-17 20:14                 ` Otavio Salvador
  2012-02-17 20:29                   ` Phil Blundell
  0 siblings, 1 reply; 15+ messages in thread
From: Otavio Salvador @ 2012-02-17 20:14 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

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

On Fri, Feb 17, 2012 at 18:11, Phil Blundell <philb@gnu.org> wrote:

> We seem to be going in circles here but, to go back to what I said at
> the beginning, why can't you use the existing run-postinsts recipe
> rather than adding a new script?


My image didn't end with it installed. I did a very small image and I
expect that independently of what I choose, rootfs behave right.

I think we can check for 98configure and 98run-postinsts, instead of
opkg-cl, but something as I added is still useful as a safe route.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

[-- Attachment #2: Type: text/html, Size: 1220 bytes --]

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

* Re: [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 20:14                 ` Otavio Salvador
@ 2012-02-17 20:29                   ` Phil Blundell
  2012-02-18  3:56                     ` Otavio Salvador
  0 siblings, 1 reply; 15+ messages in thread
From: Phil Blundell @ 2012-02-17 20:29 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-02-17 at 18:14 -0200, Otavio Salvador wrote:
> On Fri, Feb 17, 2012 at 18:11, Phil Blundell <philb@gnu.org> wrote:
>         We seem to be going in circles here but, to go back to what I
>         said at
>         the beginning, why can't you use the existing run-postinsts
>         recipe
>         rather than adding a new script?
> 
> 
> My image didn't end with it installed. I did a very small image and I
> expect that independently of what I choose, rootfs behave right.

Ah, I see.  Yes, that's a fair point.  Maybe rootfs_ipk itself should
inject ${ROOTFS_PKGMANAGE_BOOTSTRAP} into the image if it notices that
there are postinsts which require running and no other package manager
is installed.  I think it would be better not to have multiple scripts
doing the same thing if we can avoid it, otherwise you end up having to
fix things like ordering issues in all of them independently.

p.






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

* Re: [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management
  2012-02-17 20:29                   ` Phil Blundell
@ 2012-02-18  3:56                     ` Otavio Salvador
  0 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2012-02-18  3:56 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

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

On Fri, Feb 17, 2012 at 18:29, Phil Blundell <philb@gnu.org> wrote:

> On Fri, 2012-02-17 at 18:14 -0200, Otavio Salvador wrote:
> > On Fri, Feb 17, 2012 at 18:11, Phil Blundell <philb@gnu.org> wrote:
> >         We seem to be going in circles here but, to go back to what I
> >         said at
> >         the beginning, why can't you use the existing run-postinsts
> >         recipe
> >         rather than adding a new script?
> >
> >
> > My image didn't end with it installed. I did a very small image and I
> > expect that independently of what I choose, rootfs behave right.
>
> Ah, I see.  Yes, that's a fair point.  Maybe rootfs_ipk itself should
> inject ${ROOTFS_PKGMANAGE_BOOTSTRAP} into the image if it notices that
> there are postinsts which require running and no other package manager
> is installed.  I think it would be better not to have multiple scripts
> doing the same thing if we can avoid it, otherwise you end up having to
> fix things like ordering issues in all of them independently.


Not easy to do because it might not have been built before.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

[-- Attachment #2: Type: text/html, Size: 1875 bytes --]

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

* Re: [PATCH 0/3] Pending O.S. Systems' tree patches
  2012-02-17 17:47 [PATCH 0/3] Pending O.S. Systems' tree patches Otavio Salvador
                   ` (2 preceding siblings ...)
  2012-02-17 17:47 ` [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management Otavio Salvador
@ 2012-02-24  4:06 ` Saul Wold
  3 siblings, 0 replies; 15+ messages in thread
From: Saul Wold @ 2012-02-24  4:06 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 02/17/2012 09:47 AM, Otavio Salvador wrote:
> The following changes since commit e5ad03093dfc4364d1407183f458df79f347c7a1:
>
>    guile: fix cross configure failure (2012-02-10 13:38:16 +0000)
>
> are available in the git repository at:
>    git://github.com/OSSystems/oe-core master
>    https://github.com/OSSystems/oe-core/tree/HEAD
>
> Otavio Salvador (3):
>    update-rc.d.bbclass: do nothing for extended cross packages
>    rootfs_ipk.bbclass: fix status file location in rootfs
Merged these first 2 into OE-core

>    rootfs_ipk.bbclass: fix unpacked postinst support if no package
>      management
>
Not sure where this one stand with your discussion with Phil

Thanks
	Sau!


>   meta/classes/rootfs_ipk.bbclass  |   21 ++++++++++++++++++---
>   meta/classes/update-rc.d.bbclass |    1 +
>   2 files changed, 19 insertions(+), 3 deletions(-)
>



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

end of thread, other threads:[~2012-02-24  4:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-17 17:47 [PATCH 0/3] Pending O.S. Systems' tree patches Otavio Salvador
2012-02-17 17:47 ` [PATCH 1/3] update-rc.d.bbclass: do nothing for extended cross packages Otavio Salvador
2012-02-17 17:47 ` [PATCH 2/3] rootfs_ipk.bbclass: fix status file location in rootfs Otavio Salvador
2012-02-17 17:47 ` [PATCH 3/3] rootfs_ipk.bbclass: fix unpacked postinst support if no package management Otavio Salvador
2012-02-17 17:51   ` Phil Blundell
2012-02-17 19:06     ` Otavio Salvador
2012-02-17 19:25       ` Phil Blundell
2012-02-17 19:30         ` Otavio Salvador
2012-02-17 19:59           ` Phil Blundell
2012-02-17 20:03             ` Otavio Salvador
2012-02-17 20:11               ` Phil Blundell
2012-02-17 20:14                 ` Otavio Salvador
2012-02-17 20:29                   ` Phil Blundell
2012-02-18  3:56                     ` Otavio Salvador
2012-02-24  4:06 ` [PATCH 0/3] Pending O.S. Systems' tree patches Saul Wold

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