All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Postinst trigger improvements for images
@ 2012-03-03 17:39 Otavio Salvador
  2012-03-03 17:39 ` [PATCH 1/4] run-postinsts: fix opkg data path Otavio Salvador
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Otavio Salvador @ 2012-03-03 17:39 UTC (permalink / raw)
  To: openembedded-core

This patchset make consistent the name used as postinst trigger in rootfs.

The following changes since commit 857840472705af1c0fbb8db917b4bb6809b929a6:

  wpa-supplicant: fix breakage during rebuild (2012-03-02 22:35:03 +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 (4):
  run-postinsts: fix opkg data path
  image.bbclass: fix rootfs generation without package management tools
  rootfs_rpm.bbclass: rename postinst trigger script
  opkg: rename postinst trigger script

 meta/classes/core-image.bbclass                    |    2 --
 meta/classes/image.bbclass                         |    7 +++++--
 meta/classes/rootfs_rpm.bbclass                    |    6 +++---
 .../dpkg/run-postinsts/run-postinsts               |    4 ++--
 .../dpkg/run-postinsts/run-postinsts.awk           |    2 +-
 meta/recipes-devtools/dpkg/run-postinsts_1.0.bb    |    2 +-
 meta/recipes-devtools/opkg/opkg.inc                |    8 ++++----
 7 files changed, 16 insertions(+), 15 deletions(-)

-- 
1.7.2.5




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

* [PATCH 1/4] run-postinsts: fix opkg data path
  2012-03-03 17:39 [PATCH 0/4] Postinst trigger improvements for images Otavio Salvador
@ 2012-03-03 17:39 ` Otavio Salvador
  2012-03-03 17:39 ` [PATCH 2/4] image.bbclass: fix rootfs generation without package management tools Otavio Salvador
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2012-03-03 17:39 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../dpkg/run-postinsts/run-postinsts               |    4 ++--
 .../dpkg/run-postinsts/run-postinsts.awk           |    2 +-
 meta/recipes-devtools/dpkg/run-postinsts_1.0.bb    |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts b/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts
index 584a92e..5f6442c 100755
--- a/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts
@@ -8,8 +8,8 @@
 PKGSYSTEM=/var/lib/dpkg
 
 if [ ! -e $PKGSYSTEM/status ]; then
-  if [ -e /usr/lib/opkg/status ]; then
-    PKGSYSTEM=/usr/lib/opkg
+  if [ -e /var/lib/opkg/status ]; then
+    PKGSYSTEM=/var/lib/opkg
   else
     echo "No package system found"
     exit 1
diff --git a/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts.awk b/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts.awk
index d92200b..18a0492 100644
--- a/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts.awk
+++ b/meta/recipes-devtools/dpkg/run-postinsts/run-postinsts.awk
@@ -11,7 +11,7 @@ BEGIN {
   if (rc==0)
     pkgdir="/var/lib/dpkg/info"
   else
-    pkgdir="/usr/lib/opkg/info"
+    pkgdir="/var/lib/opkg/info"
   package=""
 }
 /Package:.*/ {
diff --git a/meta/recipes-devtools/dpkg/run-postinsts_1.0.bb b/meta/recipes-devtools/dpkg/run-postinsts_1.0.bb
index f8f3368..7438a10 100644
--- a/meta/recipes-devtools/dpkg/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/dpkg/run-postinsts_1.0.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "Run postinstall scripts on device using awk"
 SECTION = "devel"
-PR = "r7"
+PR = "r8"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-- 
1.7.2.5




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

* [PATCH 2/4] image.bbclass: fix rootfs generation without package management tools
  2012-03-03 17:39 [PATCH 0/4] Postinst trigger improvements for images Otavio Salvador
  2012-03-03 17:39 ` [PATCH 1/4] run-postinsts: fix opkg data path Otavio Salvador
@ 2012-03-03 17:39 ` Otavio Salvador
  2012-03-03 17:39 ` [PATCH 3/4] rootfs_rpm.bbclass: rename postinst trigger script Otavio Salvador
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2012-03-03 17:39 UTC (permalink / raw)
  To: openembedded-core

When building without package management tools the
ROOTFS_BOOTSTRAP_INSTALL packages need to be available to provide the
bare minimal for rootfs unconfigure postinsts to be on first boot.

Those packages where being include in core-image.bbclass' based images
however every image needs those available for proper rootfs generation.

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

diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass
index 668297b..e2ad0fc 100644
--- a/meta/classes/core-image.bbclass
+++ b/meta/classes/core-image.bbclass
@@ -51,8 +51,6 @@ CORE_IMAGE_BASE_INSTALL = '\
     task-core-boot \
     task-base-extended \
     \
-    ${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)} \
-    \
     ${CORE_IMAGE_EXTRA_INSTALL} \
     '
 
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index dfce381..8e9da99 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -5,7 +5,7 @@ inherit imagetest-${IMAGETEST}
 
 LICENSE = "MIT"
 PACKAGES = ""
-RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL}"
+RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL}"
 RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}"
 
 INHIBIT_DEFAULT_DEPS = "1"
@@ -14,6 +14,9 @@ INHIBIT_DEFAULT_DEPS = "1"
 IMAGE_FEATURES ?= ""
 IMAGE_FEATURES[type] = "list"
 
+# rootfs bootstrap install
+ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
+
 # packages to install from features
 FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
 FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
@@ -52,7 +55,7 @@ PACKAGE_GROUP_doc-pkgs[optional] = "1"
 IMAGE_INSTALL ?= ""
 IMAGE_INSTALL[type] = "list"
 IMAGE_BASENAME[export] = "1"
-export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${FEATURE_INSTALL}"
+export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL} ${FEATURE_INSTALL}"
 PACKAGE_INSTALL_ATTEMPTONLY ?= "${FEATURE_INSTALL_OPTIONAL}"
 
 # Images are generally built explicitly, do not need to be part of world.
-- 
1.7.2.5




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

* [PATCH 3/4] rootfs_rpm.bbclass: rename postinst trigger script
  2012-03-03 17:39 [PATCH 0/4] Postinst trigger improvements for images Otavio Salvador
  2012-03-03 17:39 ` [PATCH 1/4] run-postinsts: fix opkg data path Otavio Salvador
  2012-03-03 17:39 ` [PATCH 2/4] image.bbclass: fix rootfs generation without package management tools Otavio Salvador
@ 2012-03-03 17:39 ` Otavio Salvador
  2012-03-04  4:31   ` Richard Purdie
  2012-03-03 17:39 ` [PATCH 4/4] opkg: " Otavio Salvador
  2012-03-03 17:54 ` [PATCH 0/4] Postinst trigger improvements for images Otavio Salvador
  4 siblings, 1 reply; 8+ messages in thread
From: Otavio Salvador @ 2012-03-03 17:39 UTC (permalink / raw)
  To: openembedded-core

Use 'run-postinsts' as trigger script name for consistency against
package managers.

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

diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 48133f0..9039b21 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -112,7 +112,7 @@ EOF
 	install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
 	# Stop $i getting expanded below...
 	i=\$i
-	cat > ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure << EOF
+	cat > ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF
 #!/bin/sh
 for i in /etc/rpm-postinsts/*; do
 	echo "Running postinst $i..."
@@ -122,9 +122,9 @@ for i in /etc/rpm-postinsts/*; do
 		echo "ERROR: postinst $i failed."
 	fi
 done
-rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
+rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
 EOF
-	chmod 0755 ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}configure
+	chmod 0755 ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
 
 	install -d ${IMAGE_ROOTFS}/${sysconfdir}
 	echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
-- 
1.7.2.5




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

* [PATCH 4/4] opkg: rename postinst trigger script
  2012-03-03 17:39 [PATCH 0/4] Postinst trigger improvements for images Otavio Salvador
                   ` (2 preceding siblings ...)
  2012-03-03 17:39 ` [PATCH 3/4] rootfs_rpm.bbclass: rename postinst trigger script Otavio Salvador
@ 2012-03-03 17:39 ` Otavio Salvador
  2012-03-03 17:54 ` [PATCH 0/4] Postinst trigger improvements for images Otavio Salvador
  4 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2012-03-03 17:39 UTC (permalink / raw)
  To: openembedded-core

Use 'run-postinsts' as trigger script name for consistency against
package managers.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/recipes-devtools/opkg/opkg.inc |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
index a67066f..689bd4a 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -11,7 +11,7 @@ DEPENDS_virtclass-native = "curl-native"
 DEPENDS_virtclass-nativesdk = "curl-nativesdk"
 
 PE = "1"
-INC_PR = "r7"
+INC_PR = "r8"
 
 FILESDIR = "${@os.path.dirname(d.getVar('FILE',1))}/opkg"
 
@@ -60,9 +60,9 @@ if [ "x$D" != "x" ]; then
 	# 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
+rm -f /${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
+" > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
+	chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
 fi
 
 update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
-- 
1.7.2.5




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

* Re: [PATCH 0/4] Postinst trigger improvements for images
  2012-03-03 17:39 [PATCH 0/4] Postinst trigger improvements for images Otavio Salvador
                   ` (3 preceding siblings ...)
  2012-03-03 17:39 ` [PATCH 4/4] opkg: " Otavio Salvador
@ 2012-03-03 17:54 ` Otavio Salvador
  4 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2012-03-03 17:54 UTC (permalink / raw)
  To: openembedded-core

On Sat, Mar 3, 2012 at 14:39, Otavio Salvador <otavio@ossystems.com.br> wrote:
> Otavio Salvador (4):
>  run-postinsts: fix opkg data path
>  image.bbclass: fix rootfs generation without package management tools
>  rootfs_rpm.bbclass: rename postinst trigger script
>  opkg: rename postinst trigger script

I pushed the dpkg patch for my branch doing the same as opkg. I forgot
pushing it before doing the pull request.

-- 
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



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

* Re: [PATCH 3/4] rootfs_rpm.bbclass: rename postinst trigger script
  2012-03-03 17:39 ` [PATCH 3/4] rootfs_rpm.bbclass: rename postinst trigger script Otavio Salvador
@ 2012-03-04  4:31   ` Richard Purdie
  2012-03-05 11:46     ` Otavio Salvador
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2012-03-04  4:31 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Sat, 2012-03-03 at 17:39 +0000, Otavio Salvador wrote:
> Use 'run-postinsts' as trigger script name for consistency against
> package managers.
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  meta/classes/rootfs_rpm.bbclass |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

I find the consistency argument a little confusing when you had to
rename this for all of the packaging backends from the same thing?

I understand you want a less confusing name though as configure is an
overloaded word.

Also, please do post the deb patch too. Saying you've just pushed an
extra patch somewhere doesn't really work...

Cheers,

Richard




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

* Re: [PATCH 3/4] rootfs_rpm.bbclass: rename postinst trigger script
  2012-03-04  4:31   ` Richard Purdie
@ 2012-03-05 11:46     ` Otavio Salvador
  0 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2012-03-05 11:46 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Sun, Mar 4, 2012 at 01:31, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> I find the consistency argument a little confusing when you had to
> rename this for all of the packaging backends from the same thing?

I did it because I used run-postinsts package for bootstrap in ipk.

> I understand you want a less confusing name though as configure is an
> overloaded word.

If you prefer I can change this; doesn't matter for me.

> Also, please do post the deb patch too. Saying you've just pushed an
> extra patch somewhere doesn't really work...

Right; once you reply if you want me to change wording I do.

-- 
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



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

end of thread, other threads:[~2012-03-05 11:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-03 17:39 [PATCH 0/4] Postinst trigger improvements for images Otavio Salvador
2012-03-03 17:39 ` [PATCH 1/4] run-postinsts: fix opkg data path Otavio Salvador
2012-03-03 17:39 ` [PATCH 2/4] image.bbclass: fix rootfs generation without package management tools Otavio Salvador
2012-03-03 17:39 ` [PATCH 3/4] rootfs_rpm.bbclass: rename postinst trigger script Otavio Salvador
2012-03-04  4:31   ` Richard Purdie
2012-03-05 11:46     ` Otavio Salvador
2012-03-03 17:39 ` [PATCH 4/4] opkg: " Otavio Salvador
2012-03-03 17:54 ` [PATCH 0/4] Postinst trigger improvements for images Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.