From: claudius.heine.ext@siemens.com
To: isar-users@googlegroups.com
Cc: Claudius Heine <ch@denx.de>
Subject: [PATCH v4 1/8] meta: remove transient package support
Date: Thu, 23 May 2019 16:55:14 +0200 [thread overview]
Message-ID: <20190523145521.23050-2-claudius.heine.ext@siemens.com> (raw)
In-Reply-To: <20190523145521.23050-1-claudius.heine.ext@siemens.com>
From: Claudius Heine <ch@denx.de>
Transient packages where meant for configuring images via packages,
which proved to not be fit for purpose.
Packages are meant to be shared across images, configuring it this way
would mean that every possible configuration permutation would need to
result in a separate package just so that no image accidentally installs
a configuration package meant for a different build/image.
Instead images need to be configured while its specific root file system
is created using the new root file system creation pipeline.
Signed-off-by: Claudius Heine <ch@denx.de>
---
meta/classes/image.bbclass | 4 +-
meta/classes/isar-bootstrap-helper.bbclass | 13 +---
.../isar-cfg-localepurge/files/postinst | 15 ----
.../isar-cfg-localepurge.bb | 70 -------------------
.../isar-cfg-rootpw/files/postinst.tmpl | 19 -----
.../isar-cfg-rootpw/isar-cfg-rootpw.bb | 19 -----
6 files changed, 2 insertions(+), 138 deletions(-)
delete mode 100644 meta/recipes-support/isar-cfg-localepurge/files/postinst
delete mode 100644 meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb
delete mode 100644 meta/recipes-support/isar-cfg-rootpw/files/postinst.tmpl
delete mode 100644 meta/recipes-support/isar-cfg-rootpw/isar-cfg-rootpw.bb
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 3eb261f..d77626c 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -36,9 +36,7 @@ def cfg_script(d):
FILESPATH =. "${LAYERDIR_core}/conf/distro:"
SRC_URI += "${@ cfg_script(d) }"
-DEPENDS += "${IMAGE_INSTALL} ${IMAGE_TRANSIENT_PACKAGES}"
-
-IMAGE_TRANSIENT_PACKAGES += "isar-cfg-localepurge isar-cfg-rootpw"
+DEPENDS += "${IMAGE_INSTALL}"
ISAR_RELEASE_CMD_DEFAULT = "git -C ${LAYERDIR_core} describe --tags --dirty --match 'v[0-9].[0-9]*'"
ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}"
diff --git a/meta/classes/isar-bootstrap-helper.bbclass b/meta/classes/isar-bootstrap-helper.bbclass
index 8612be2..bbc6322 100644
--- a/meta/classes/isar-bootstrap-helper.bbclass
+++ b/meta/classes/isar-bootstrap-helper.bbclass
@@ -5,8 +5,6 @@
#
# SPDX-License-Identifier: MIT
-IMAGE_TRANSIENT_PACKAGES ??= ""
-
def reverse_bb_array(d, varname):
array = d.getVar(varname, True)
if array is None:
@@ -113,19 +111,10 @@ setup_root_file_system() {
sudo -E chroot "$ROOTFSDIR" /usr/bin/apt-get update
fi
sudo -E chroot "$ROOTFSDIR" \
- /usr/bin/apt-get ${APT_ARGS} --download-only $PACKAGES \
- ${IMAGE_TRANSIENT_PACKAGES}
+ /usr/bin/apt-get ${APT_ARGS} --download-only $PACKAGES
[ ${CLEAN} ] && sudo rm -f ${CLEAN_FILES}
sudo -E chroot "$ROOTFSDIR" \
/usr/bin/apt-get ${APT_ARGS} $PACKAGES
- for pkg in ${IMAGE_TRANSIENT_PACKAGES}; do
- sudo -E chroot "$ROOTFSDIR" \
- /usr/bin/apt-get ${APT_ARGS} $pkg
- done
- for pkg in ${@reverse_bb_array(d, "IMAGE_TRANSIENT_PACKAGES") or ""}; do
- sudo -E chroot "$ROOTFSDIR" \
- /usr/bin/apt-get purge --yes $pkg
- done
if [ ${CLEAN} ]; then
if [ ${KEEP_APT_CACHE} -eq 1 ]; then
mkdir -p ${WORKDIR}/apt_cache
diff --git a/meta/recipes-support/isar-cfg-localepurge/files/postinst b/meta/recipes-support/isar-cfg-localepurge/files/postinst
deleted file mode 100644
index 9dfd6f9..0000000
--- a/meta/recipes-support/isar-cfg-localepurge/files/postinst
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-set -e
-
-cat /usr/lib/isar-cfg-localepurge/locale.gen \
- >> /etc/locale.gen
-cat /usr/lib/isar-cfg-localepurge/locale.default \
- > /etc/default/locale
-cat /usr/lib/isar-cfg-localepurge/locale.nopurge \
- > /etc/locale.nopurge
-
-debconf-set-selections /usr/lib/isar-cfg-localepurge/locale.debconf
-
-dpkg-reconfigure -f noninteractive locales
-
-localepurge
diff --git a/meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb b/meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb
deleted file mode 100644
index 62b4b2d..0000000
--- a/meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb
+++ /dev/null
@@ -1,70 +0,0 @@
-# This software is a part of ISAR.
-
-DESCRIPTION = "Isar configuration package for locale and localepurge"
-MAINTAINER = "isar-users <isar-users@googlegroups.com>"
-DEBIAN_DEPENDS = "localepurge"
-
-SRC_URI = "file://postinst"
-
-inherit dpkg-raw
-
-LOCALE_GEN ?= "en_US.UTF-8 UTF-8\n\
- en_US ISO-8859-1\n"
-LOCALE_DEFAULT ?= "en_US.UTF-8"
-
-def get_locale_gen(d):
- locale_gen = d.getVar("LOCALE_GEN", True) or ""
- return '\n'.join(sorted(set(i.strip()
- for i in locale_gen.split('\\n')
- if i.strip())))
-
-def get_dc_locale_gen(d):
- locale_gen = d.getVar("LOCALE_GEN", True) or ""
- return ', '.join(sorted(set(i.strip()
- for i in locale_gen.split('\\n')
- if i.strip())))
-
-def get_nopurge(d):
- locale_gen = d.getVar("LOCALE_GEN", True) or ""
- return '\n'.join(sorted(set(i.strip()
- for j in locale_gen.split('\\n')
- if j.strip()
- for i in (j.split()[0].split("_")[0],
- j.split()[0].split(".")[0],
- j.split()[0]))))
-
-do_gen_config[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
-do_gen_config() {
- cat<<-__EOF__ > ${WORKDIR}/locale.gen
- ${@get_locale_gen(d)}
- __EOF__
- cat<<-__EOF__ > ${WORKDIR}/locale.debconf
- locales locales/locales_to_be_generated multiselect ${@get_dc_locale_gen(d)}
- locales locales/default_environment_locale select ${LOCALE_DEFAULT}
- __EOF__
- cat<<-__EOF__ > ${WORKDIR}/locale.default
- LANG=${LOCALE_DEFAULT}
- __EOF__
- cat<<-__EOF__ > ${WORKDIR}/locale.nopurge
- #USE_DPKG
- MANDELETE
- DONTBOTHERNEWLOCALE
- #SHOWFREEDSPACE
- #QUICKNDIRTYCALC
- #VERBOSE
- ${@get_nopurge(d)}
- __EOF__
-}
-addtask gen_config after do_unpack before do_install
-
-do_install() {
- install -v -d ${D}/usr/lib/${PN}
- install -v -m 644 ${WORKDIR}/locale.debconf \
- ${D}/usr/lib/${PN}/locale.debconf
- install -v -m 644 ${WORKDIR}/locale.gen \
- ${D}/usr/lib/${PN}/locale.gen
- install -v -m 644 ${WORKDIR}/locale.default \
- ${D}/usr/lib/${PN}/locale.default
- install -v -m 644 ${WORKDIR}/locale.nopurge \
- ${D}/usr/lib/${PN}/locale.nopurge
-}
diff --git a/meta/recipes-support/isar-cfg-rootpw/files/postinst.tmpl b/meta/recipes-support/isar-cfg-rootpw/files/postinst.tmpl
deleted file mode 100644
index ca08a41..0000000
--- a/meta/recipes-support/isar-cfg-rootpw/files/postinst.tmpl
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-set -e
-
-if ! grep -q 'root:\*:' /etc/shadow; then
- echo "ERROR:isar-cfg-rootpw: root password was set by a different package" >&2
- exit -1
-fi
-
-if [ -n '${CFG_ROOT_PW}' ]; then
- echo 'root:${CFG_ROOT_PW}' | chpasswd -e
-else
- passwd -d root
-fi
-
-if [ '${CFG_ROOT_LOCKED}' = "1" ]; then
- # Lock the account after setting the password, since unlocking it at some
- # point later would set it to the back to the previous one.
- passwd -l root
-fi
diff --git a/meta/recipes-support/isar-cfg-rootpw/isar-cfg-rootpw.bb b/meta/recipes-support/isar-cfg-rootpw/isar-cfg-rootpw.bb
deleted file mode 100644
index adee3b5..0000000
--- a/meta/recipes-support/isar-cfg-rootpw/isar-cfg-rootpw.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-# This software is a part of ISAR.
-
-DESCRIPTION = "Isar configuration package for root password"
-MAINTAINER = "isar-users <isar-users@googlegroups.com>"
-DEBIAN_DEPENDS = "passwd"
-
-SRC_URI = "file://postinst.tmpl"
-
-TEMPLATE_FILES = "postinst.tmpl"
-TEMPLATE_VARS = "CFG_ROOT_PW CFG_ROOT_LOCKED"
-
-CFG_ROOT_PW ??= ""
-CFG_ROOT_LOCKED ??= "0"
-
-inherit dpkg-raw
-
-do_install() {
- echo "intentionally left blank"
-}
--
2.20.1
next prev parent reply other threads:[~2019-05-23 14:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-23 14:55 [PATCH v4 0/8] pre-processing pipeline and transient package replacement claudius.heine.ext
2019-05-23 14:55 ` claudius.heine.ext [this message]
2019-05-23 14:55 ` [PATCH v4 2/8] split up isar-bootstrap helper and implement pre-process pipeline claudius.heine.ext
2019-05-24 12:49 ` Maxim Yu. Osipov
2019-05-27 6:55 ` Claudius Heine
2019-05-27 7:20 ` Maxim Yu. Osipov
2019-05-27 7:36 ` Maxim Yu. Osipov
2019-05-27 8:30 ` Claudius Heine
2019-05-27 9:03 ` Claudius Heine
2019-05-27 9:49 ` Maxim Yu. Osipov
2019-05-27 10:44 ` [PATCH] rootfs.bbclass: add comment about task weights claudius.heine.ext
2019-05-29 12:38 ` Maxim Yu. Osipov
2019-08-14 16:00 ` [PATCH v4 2/8] split up isar-bootstrap helper and implement pre-process pipeline Jan Kiszka
2019-08-19 6:59 ` Claudius Heine
2019-08-19 7:02 ` Jan Kiszka
2019-08-19 7:09 ` Claudius Heine
2019-05-23 14:55 ` [PATCH v4 3/8] meta/classes: add image-locales-extension class claudius.heine.ext
2019-05-23 14:55 ` [PATCH v4 4/8] meta/classes: add image-account-extension class claudius.heine.ext
2019-05-31 7:29 ` Jan Kiszka
2019-06-03 9:14 ` Claudius Heine
2019-05-23 14:55 ` [PATCH v4 5/8] doc: update description of image customization claudius.heine.ext
2019-05-23 14:55 ` [PATCH v4 6/8] doc: some fixes claudius.heine.ext
2019-05-23 14:55 ` [PATCH v4 7/8] meta-isar: local.conf.sample: update root password and isar user creation claudius.heine.ext
2019-05-23 14:55 ` [PATCH v4 8/8] RECIPE-API-CHANGELOG: update transient package removal + root password claudius.heine.ext
2019-05-24 12:56 ` [PATCH v4 0/8] pre-processing pipeline and transient package replacement Maxim Yu. Osipov
2019-05-27 7:56 ` Claudius Heine
2019-05-27 8:10 ` Maxim Yu. Osipov
2019-05-27 8:24 ` Claudius Heine
2019-05-27 9:28 ` Maxim Yu. Osipov
2019-05-27 15:22 ` Maxim Yu. Osipov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190523145521.23050-2-claudius.heine.ext@siemens.com \
--to=claudius.heine.ext@siemens.com \
--cc=ch@denx.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox