Skip to contentSkip to conversation

postinst-intercept: New recipe to include postinstall intercepts in nativesdk

PATCH Superseded David Nyström 2 participants 10 messages Jan 22, 2014 – Jan 24, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 postinst-intercept: New recipe to include postinstall intercepts in nativesdk

Adding ability to use postinstalls intercepts in the nativesdk env, and making sure the correlate between repo + SDK.

This to enable rootfs generation from a package repository using only a package repository and the toolchain tarball.

See https://github.com/nysan/rootfs-sandbox for examples.

---
 .../postinst-intercept/postinst-intercept_1.0.bb      | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb
meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb new file +19 -0
new file mode 100644
index 0000000..41b9a6e
@@ -0,0 +1,19 @@
+SUMMARY = "Postinstall scriptlets"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+FILES_${PN}_append_class-nativesdk = " ${datadir}/postinst-intercepts/*"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install_append_class-nativesdk() {
+	install -d ${D}${datadir}/postinst-intercepts
+	install -m 755 ${COREBASE}/scripts/postinst-intercepts/postinst_intercept ${D}${datadir}/postinst-intercepts/
+	install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_font_cache ${D}${datadir}/postinst-intercepts/
+	install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_icon_cache ${D}${datadir}/postinst-intercepts/
+	install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_pixbuf_cache ${D}${datadir}/postinst-intercepts/
+}
+
+BBCLASSEXTEND = "nativesdk"
+INHIBIT_DEFAULT_DEPS = "1"
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH v2 2/2 nativesdk-packagegroup-sdk-host: Adding nativesdk-postinst-intercept to SDK

Adding ability to use postinstalls intercepts in the nativesdk env, and making sure the correlate between repo + SDK.

This to enable rootfs generation from a package repository using only a package repository and the toolchain tarball.

See https://github.com/nysan/rootfs-sandbox for examples.

---
 meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1 -0
index 1065f30..f1bc1ea 100644
@@ -23,6 +23,7 @@ RDEPENDS_${PN} = "\
     nativesdk-shadow \
     nativesdk-makedevs \
     nativesdk-smartpm \
+    nativesdk-postinst-intercept \
     "
 
 RDEPENDS_${PN}_darwin = "\
Signature · 1 line
1.8.3.2
Reviewed-by on v2 1/2
#2 lore raw
In reply to David Nyström
Quoted 9 lines · David Nyström

Adding ability to use postinstalls intercepts in the nativesdk env, and making sure the correlate between repo + SDK.

This to enable rootfs generation from a package repository using only a package repository and the toolchain tarball.

See https://github.com/nysan/rootfs-sandbox for examples.

Much better. Thanks.

Regarding the rootfs-sandbox, how are you intending to proper integrate it with the toolchain?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#3 lore raw
Quoted 10 lines · Otavio Salvador
Quoted 8 lines · David Nyström

Adding ability to use postinstalls intercepts in the nativesdk env, and making sure the correlate between repo + SDK.

This to enable rootfs generation from a package repository using only a package repository and the toolchain tarball.

See https://github.com/nysan/rootfs-sandbox for examples.

Quoted 9 lines
Quoted 1 line

Much better. Thanks.

Regarding the rootfs-sandbox, how are you intending to proper integrate it with the toolchain?

Search the oe-core list for the previous discussions with Tom Zanussi.
I believe the long term goals is to redo rootfs_*.bbclass in python, and let both bitbake and MIC(WIC) use the same code for image creation.(SDK env + bitbake env.)

I'm fine with continued dev/inclusion of rootfs-sandbox, but I think that might not be acceptable as a long term solution since it may be maintenance heavy, since it uses alot of oe-core internal env. vars.

Possible routes are:
1. Use common code for rootfs assembly. (WIC)
2. Cleanup env. var. usage in postinstall hooks, and be aggressive in denying new additions. (Continue dev. on rootfs-sandbox)

Off-topic:
With above patches, I'm down to 1 postinstall failures for packagegroup-core-lsb:
1. missing shlibsign, (nss), cant get the damn thing to compile for nativesdk yet.

There are 2 other failures as well, but they fail when bitbake:ing as well. Only works well with ipk sofar.

Br,
David

#4 lore raw
Quoted 39 lines · David Nyström
Quoted 15 lines · Otavio Salvador
Quoted 10 lines · David Nyström

Adding ability to use postinstalls intercepts in the nativesdk env, and making sure the correlate between repo + SDK.

This to enable rootfs generation from a package repository using only a package repository and the toolchain tarball.

See https://github.com/nysan/rootfs-sandbox for examples.

Quoted 7 lines

Much better. Thanks.

Regarding the rootfs-sandbox, how are you intending to proper integrate it with the toolchain?

Search the oe-core list for the previous discussions with Tom Zanussi. I believe the long term goals is to redo rootfs_*.bbclass in python, and let both bitbake and MIC(WIC) use
the same code for image creation.(SDK env + bitbake env.)

I'm fine with continued dev/inclusion of rootfs-sandbox, but I think that might not be acceptable as a long term solution since
it may be maintenance heavy, since it uses alot of oe-core internal env. vars.

Possible routes are:
1. Use common code for rootfs assembly. (WIC)
2. Cleanup env. var. usage in postinstall hooks, and be aggressive in denying new additions. (Continue dev. on rootfs-sandbox)

Quoted 8 lines

Off-topic:
With above patches, I'm down to 1 postinstall failures for packagegroup-core-lsb:
1. missing shlibsign, (nss), cant get the damn thing to compile for nativesdk yet.

There are 2 other failures as well, but they fail when bitbake:ing as well. Only works well with ipk sofar.

So I think we ought to work on this in a layer and put things in OE-Core when it is ready.

What do you think?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#5 lore raw
Quoted 47 lines · Otavio Salvador
Quoted 45 lines · David Nyström
Quoted 15 lines · Otavio Salvador
Quoted 10 lines · David Nyström

Adding ability to use postinstalls intercepts in the nativesdk env, and making sure the correlate between repo + SDK.

This to enable rootfs generation from a package repository using only a package repository and the toolchain tarball.

See https://github.com/nysan/rootfs-sandbox for examples.

Quoted 7 lines

Much better. Thanks.

Regarding the rootfs-sandbox, how are you intending to proper integrate it with the toolchain?

Search the oe-core list for the previous discussions with Tom Zanussi. I believe the long term goals is to redo rootfs_*.bbclass in python, and let both bitbake and MIC(WIC) use
the same code for image creation.(SDK env + bitbake env.)

I'm fine with continued dev/inclusion of rootfs-sandbox, but I think that might not be acceptable as a long term solution since
it may be maintenance heavy, since it uses alot of oe-core internal env. vars.

Possible routes are:
1. Use common code for rootfs assembly. (WIC)
2. Cleanup env. var. usage in postinstall hooks, and be aggressive in denying new additions. (Continue dev. on rootfs-sandbox)

Off-topic:
With above patches, I'm down to 1 postinstall failures for packagegroup-core-lsb:
1. missing shlibsign, (nss), cant get the damn thing to compile for nativesdk yet.

Quoted 8 lines
Quoted 2 lines

There are 2 other failures as well, but they fail when bitbake:ing as well. Only works well with ipk sofar.

So I think we ought to work on this in a layer and put things in OE-Core when it is ready.

What do you think?

Well, the WIC is a slightly different approach.
I obviously prefer this method, since you can work against and expand the target rootfs, the nativesdk and target sysroots via the repo, and do it iteratively.
But there is also parts missing in this approach that would need to be replicated.
SD-card creation, partitioning, FS conversion et.c.

However, I have no problems with including it others +1:s this.

Br,
David

#6 lore raw
In reply to Otavio Salvador
Quoted 47 lines · Otavio Salvador
Quoted 45 lines · David Nyström
Quoted 15 lines · Otavio Salvador
Quoted 10 lines · David Nyström

Adding ability to use postinstalls intercepts in the nativesdk env, and making sure the correlate between repo + SDK.

This to enable rootfs generation from a package repository using only a package repository and the toolchain tarball.

See https://github.com/nysan/rootfs-sandbox for examples.

Quoted 7 lines

Much better. Thanks.

Regarding the rootfs-sandbox, how are you intending to proper integrate it with the toolchain?

Search the oe-core list for the previous discussions with Tom Zanussi. I believe the long term goals is to redo rootfs_*.bbclass in python, and let both bitbake and MIC(WIC) use
the same code for image creation.(SDK env + bitbake env.)

I'm fine with continued dev/inclusion of rootfs-sandbox, but I think that might not be acceptable as a long term solution since
it may be maintenance heavy, since it uses alot of oe-core internal env. vars.

Possible routes are:
1. Use common code for rootfs assembly. (WIC)
2. Cleanup env. var. usage in postinstall hooks, and be aggressive in denying new additions. (Continue dev. on rootfs-sandbox)

Off-topic:
With above patches, I'm down to 1 postinstall failures for packagegroup-core-lsb:
1. missing shlibsign, (nss), cant get the damn thing to compile for nativesdk yet.

Quoted 8 lines
Quoted 2 lines

There are 2 other failures as well, but they fail when bitbake:ing as well. Only works well with ipk sofar.

So I think we ought to work on this in a layer and put things in OE-Core when it is ready.

What do you think?

Sorry, read your mail again, I think I misunderstood. For rootfs-sandbox I agree, this is WIP.

I suspect that others already have these features, and regardless of WIC or rootfs-sandbox or other.
they will need the same functionality exposed in the SDK.
We are working on the same thing here, and as such, I think the small pieces needed to do this should be centralized in oe-core so we can cooperate around them, and define interfaces between the SDK and bitbake env in an open environment.

Br,
David

#7 lore raw
Quoted 68 lines · David Nyström
Quoted 58 lines · Otavio Salvador
Quoted 50 lines · David Nyström
Quoted 18 lines · Otavio Salvador
Quoted 11 lines · David Nyström

Adding ability to use postinstalls intercepts in the nativesdk env, and making sure the correlate between repo + SDK.

This to enable rootfs generation from a package repository using only a package repository and the toolchain tarball.

See https://github.com/nysan/rootfs-sandbox for examples.

Quoted 7 lines

Much better. Thanks.

Regarding the rootfs-sandbox, how are you intending to proper integrate it with the toolchain?

Search the oe-core list for the previous discussions with Tom Zanussi. I believe the long term goals is to redo rootfs_*.bbclass in python, and let
both bitbake and MIC(WIC) use
the same code for image creation.(SDK env + bitbake env.)

I'm fine with continued dev/inclusion of rootfs-sandbox, but I think that might not be acceptable as a long term solution since
it may be maintenance heavy, since it uses alot of oe-core internal env. vars.

Possible routes are:
1. Use common code for rootfs assembly. (WIC)
2. Cleanup env. var. usage in postinstall hooks, and be aggressive in denying new additions. (Continue dev. on rootfs-sandbox)

Off-topic:
With above patches, I'm down to 1 postinstall failures for packagegroup-core-lsb:
1. missing shlibsign, (nss), cant get the damn thing to compile for nativesdk yet.

Quoted 3 lines

There are 2 other failures as well, but they fail when bitbake:ing as well.
Only works well with ipk sofar.

Quoted 5 lines

So I think we ought to work on this in a layer and put things in OE-Core when it is ready.

What do you think?

Sorry, read your mail again, I think I misunderstood. For rootfs-sandbox I agree, this is WIP.

Quoted 7 lines

I suspect that others already have these features, and regardless of WIC or rootfs-sandbox or other.
they will need the same functionality exposed in the SDK.
We are working on the same thing here, and as such, I think the small pieces needed to do this should be centralized in oe-core so
we can cooperate around them, and define interfaces between the SDK and bitbake env in an open environment.

I agree with the principle but I think we can accomplish the same with a layer, if properly announced and put in layer index.

The reason I dislike this WIP to be in OE-Core is that implementation starts to be considered stable and people and projects starts to depends on it so changing it radically is hard as we need to carry backward compatibility.

Don't take me wrong, I do think this is important and I do think this ought to be in OE-Core but I am unsure about it being mature enough for it.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#8 lore raw
Quoted 78 lines · Otavio Salvador
Quoted 68 lines · David Nyström
Quoted 58 lines · Otavio Salvador
Quoted 50 lines · David Nyström
Quoted 18 lines · Otavio Salvador
Quoted 11 lines · David Nyström

Adding ability to use postinstalls intercepts in the nativesdk env, and making sure the correlate between repo + SDK.

This to enable rootfs generation from a package repository using only a package repository and the toolchain tarball.

See https://github.com/nysan/rootfs-sandbox for examples.

Quoted 7 lines

Much better. Thanks.

Regarding the rootfs-sandbox, how are you intending to proper integrate it with the toolchain?

Search the oe-core list for the previous discussions with Tom Zanussi. I believe the long term goals is to redo rootfs_*.bbclass in python, and let
both bitbake and MIC(WIC) use
the same code for image creation.(SDK env + bitbake env.)

I'm fine with continued dev/inclusion of rootfs-sandbox, but I think that might not be acceptable as a long term solution since
it may be maintenance heavy, since it uses alot of oe-core internal env. vars.

Possible routes are:
1. Use common code for rootfs assembly. (WIC)
2. Cleanup env. var. usage in postinstall hooks, and be aggressive in denying new additions. (Continue dev. on rootfs-sandbox)

Off-topic:
With above patches, I'm down to 1 postinstall failures for packagegroup-core-lsb:
1. missing shlibsign, (nss), cant get the damn thing to compile for nativesdk yet.

Quoted 3 lines

There are 2 other failures as well, but they fail when bitbake:ing as well.
Only works well with ipk sofar.

Quoted 5 lines

So I think we ought to work on this in a layer and put things in OE-Core when it is ready.

What do you think?

Sorry, read your mail again, I think I misunderstood. For rootfs-sandbox I agree, this is WIP.

Quoted 7 lines

I suspect that others already have these features, and regardless of WIC or rootfs-sandbox or other.
they will need the same functionality exposed in the SDK.
We are working on the same thing here, and as such, I think the small pieces needed to do this should be centralized in oe-core so
we can cooperate around them, and define interfaces between the SDK and bitbake env in an open environment.

Quoted 7 lines

I agree with the principle but I think we can accomplish the same with a layer, if properly announced and put in layer index.

The reason I dislike this WIP to be in OE-Core is that implementation starts to be considered stable and people and projects starts to depends on it so changing it radically is hard as we need to carry backward compatibility.

We need to carry backward compatibility ?.

In a stable branch I would agree to this, but not in master.

When the sstate was introduced and developed, you mean it never broke the ABI from then till now ? Buildhistory DB ABI, license report formats, build output directory renaming, naming conventions never broke the ABI ?

Can you give any other examples of where new functionality additions were rejected due to the non-stable clause ?

Quoted 3 lines

Don't take me wrong, I do think this is important and I do think this ought to be in OE-Core but I am unsure about it being mature enough for it.

This will be a quite minimal layer containing these 2 patches, and one more upcoming nativesdk-nss patch.

#9 lore raw
Quoted 104 lines · David Nyström
Quoted 94 lines · Otavio Salvador
Quoted 80 lines · David Nyström
Quoted 69 lines · Otavio Salvador
Quoted 59 lines · David Nyström
Quoted 23 lines · Otavio Salvador
Quoted 7 lines · David Nyström

Adding ability to use postinstalls intercepts in the nativesdk env, and
making sure the correlate between repo + SDK.

Quoted 7 lines

This to enable rootfs generation from a package repository using only a
package repository and the toolchain tarball.

See https://github.com/nysan/rootfs-sandbox for examples.

Quoted 7 lines

Much better. Thanks.

Regarding the rootfs-sandbox, how are you intending to proper integrate it with the toolchain?

Search the oe-core list for the previous discussions with Tom Zanussi. I believe the long term goals is to redo rootfs_*.bbclass in python, and
let
both bitbake and MIC(WIC) use
the same code for image creation.(SDK env + bitbake env.)

I'm fine with continued dev/inclusion of rootfs-sandbox, but I think that
might not be acceptable as a long term solution since
it may be maintenance heavy, since it uses alot of oe-core internal env.
vars.

Possible routes are:
1. Use common code for rootfs assembly. (WIC)
2. Cleanup env. var. usage in postinstall hooks, and be aggressive in denying new additions. (Continue dev. on rootfs-sandbox)

Off-topic:
With above patches, I'm down to 1 postinstall failures for packagegroup-core-lsb:
1. missing shlibsign, (nss), cant get the damn thing to compile for nativesdk yet.

Quoted 3 lines

There are 2 other failures as well, but they fail when bitbake:ing as well.
Only works well with ipk sofar.

Quoted 5 lines

So I think we ought to work on this in a layer and put things in OE-Core when it is ready.

What do you think?

Sorry, read your mail again, I think I misunderstood. For rootfs-sandbox I agree, this is WIP.

Quoted 9 lines

I suspect that others already have these features, and regardless of WIC or
rootfs-sandbox or other.
they will need the same functionality exposed in the SDK.
We are working on the same thing here, and as such, I think the small pieces
needed to do this should be centralized in oe-core so
we can cooperate around them, and define interfaces between the SDK and bitbake env in an open environment.

Quoted 7 lines

I agree with the principle but I think we can accomplish the same with a layer, if properly announced and put in layer index.

The reason I dislike this WIP to be in OE-Core is that implementation starts to be considered stable and people and projects starts to depends on it so changing it radically is hard as we need to carry backward compatibility.

Quoted 3 lines

We need to carry backward compatibility ?.

In a stable branch I would agree to this, but not in master.

In April master is going to be 1.6, thus a stable.

Quoted 7 lines

When the sstate was introduced and developed, you mean it never broke the ABI from then till now ?
Buildhistory DB ABI, license report formats, build output directory renaming, naming conventions never broke the ABI ?

Can you give any other examples of where new functionality additions were rejected due to the non-stable clause ?

The point here is implementation wise.

Quoted 6 lines
Quoted 3 lines

Don't take me wrong, I do think this is important and I do think this ought to be in OE-Core but I am unsure about it being mature enough for it.

This will be a quite minimal layer containing these 2 patches, and one more upcoming nativesdk-nss patch.

Well, until complete we cannot known what will be the size of it.

I will let others comment and give their view of it. I'd prefer it to be in a layer for now.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750