Postinst trigger improvements for images
v2 cover Postinst trigger improvements for images
This patchset make consistent and more meanful the name used as postinst trigger in rootfs.
The following changes since commit d7b8c247227f3cc82f92292407f548927e9fde78:
base.bbclass: Fix PACKAGECONFIG handling when no flags are set (2012-03-05 13:03:41 -0800)
are available in the git repository at:
git://github.com/OSSystems/oe-core master
https://github.com/OSSystems/oe-core/tree/HEAD
Otavio Salvador (5):
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
dpkg: rename postinst trigger script
meta/classes/core-image.bbclass | 2 -- meta/classes/image.bbclass | 7 +++++-- meta/classes/rootfs_rpm.bbclass | 6 +++--- meta/recipes-devtools/dpkg/dpkg.inc | 8 ++++---- .../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 ++++---- 8 files changed, 20 insertions(+), 19 deletions(-)
Signature · 1 line
1.7.2.5
PATCH v2 1/5 run-postinsts: fix opkg data path
--- .../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(-)
meta/recipes-devtools/dpkg/run-postinsts/run-postinsts +2 -2
@@ -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
meta/recipes-devtools/dpkg/run-postinsts/run-postinsts.awk +1 -1
@@ -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:.*/ {
meta/recipes-devtools/dpkg/run-postinsts_1.0.bb +1 -1
@@ -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"
Signature · 1 line
1.7.2.5
PATCH v2 2/5 image.bbclass: fix rootfs generation without package management tools
In reply to Otavio SalvadorWhen 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.
--- meta/classes/core-image.bbclass | 2 -- meta/classes/image.bbclass | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-)
meta/classes/core-image.bbclass +0 -2
@@ -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} \ '
meta/classes/image.bbclass +5 -2
@@ -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.
Signature · 1 line
1.7.2.5
PATCH v2 3/5 rootfs_rpm.bbclass: rename postinst trigger script
In reply to Otavio SalvadorUse 'run-postinsts' as trigger script name as it describes better the intent of it.
--- meta/classes/rootfs_rpm.bbclass | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/rootfs_rpm.bbclass +3 -3
@@ -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
Signature · 1 line
1.7.2.5
PATCH v2 4/5 opkg: rename postinst trigger script
In reply to Otavio SalvadorUse 'run-postinsts' as trigger script name as it describes better the intent of it.
--- meta/recipes-devtools/opkg/opkg.inc | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-devtools/opkg/opkg.inc +4 -4
@@ -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
Signature · 1 line
1.7.2.5
PATCH v2 5/5 dpkg: rename postinst trigger script
In reply to Otavio SalvadorUse 'run-postinsts' as trigger script name as it describes better the intent of it.
--- meta/recipes-devtools/dpkg/dpkg.inc | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-devtools/dpkg/dpkg.inc +4 -4
@@ -2,7 +2,7 @@ DESCRIPTION = "Package maintenance system for Debian." LICENSE = "GPLv2.0+" SECTION = "base" -INC_PR = "r15" +INC_PR = "r16" SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.bz2 \ file://ignore_extra_fields.patch"
@@ -42,9 +42,9 @@ do_install_prepend () { # this happens at S98 where our good 'ole packages script used to run printf "#!/bin/sh dpkg --configure -a -rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure -" > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure - chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure +rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts +" > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts + chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts } do_install_append () {
Signature · 1 line
1.7.2.5
Saul Wold
AppliedQuoted 18 lines · Otavio Salvador
This patchset make consistent and more meanful the name used as postinst trigger in rootfs.
The following changes since commit
d7b8c247227f3cc82f92292407f548927e9fde78:base.bbclass: Fix PACKAGECONFIG handling when no flags are set (2012-03-05 13:03:41 -0800)
are available in the git repository at:
git://github.com/OSSystems/oe-coremaster
https://github.com/OSSystems/oe-core/tree/HEADOtavio Salvador (5):
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
dpkg: rename postinst trigger script
Quoted 10 lines
meta/classes/core-image.bbclass | 2 -- meta/classes/image.bbclass | 7 +++++-- meta/classes/rootfs_rpm.bbclass | 6 +++--- meta/recipes-devtools/dpkg/dpkg.inc | 8 ++++---- .../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 ++++---- 8 files changed, 20 insertions(+), 19 deletions(-)
Merged into OE-Core
Thanks
Sau!