* [PATCH 1/5] implement isar-bootstrap using debootstrap
2018-02-21 11:49 [PATCH 0/5] Debootstrap integration claudius.heine.ext
@ 2018-02-21 11:49 ` claudius.heine.ext
2018-02-22 8:11 ` Claudius Heine
2018-02-21 11:50 ` [PATCH 2/5] meta/isar-bootstrap-helper.bbclass: handle rfs customization centrally claudius.heine.ext
` (5 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: claudius.heine.ext @ 2018-02-21 11:49 UTC (permalink / raw)
To: isar-users; +Cc: Claudius Heine
From: Claudius Heine <ch@denx.de>
Since multistrap is deprecated for some years, it is required to change
to debootstrap.
This patch introduces the 'isar-bootstrap' recipe that implement the
creation of a minimal base root file system using debootstrap.
Signed-off-by: Claudius Heine <ch@denx.de>
---
meta-isar/conf/distro/debian-jessie.conf | 14 ++-
meta-isar/conf/distro/debian-jessie.list | 2 +
meta-isar/conf/distro/debian-stretch.conf | 12 +-
meta-isar/conf/distro/debian-stretch.list | 2 +
meta-isar/conf/distro/debian-wheezy.conf | 14 ++-
meta-isar/conf/distro/debian-wheezy.list | 2 +
meta-isar/conf/distro/raspbian-jessie.conf | 9 +-
meta/recipes-core/isar-bootstrap/isar-bootstrap.bb | 128 +++++++++++++++++++++
8 files changed, 166 insertions(+), 17 deletions(-)
create mode 100644 meta-isar/conf/distro/debian-jessie.list
create mode 100644 meta-isar/conf/distro/debian-stretch.list
create mode 100644 meta-isar/conf/distro/debian-wheezy.list
create mode 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
diff --git a/meta-isar/conf/distro/debian-jessie.conf b/meta-isar/conf/distro/debian-jessie.conf
index 3e62b14..d7efa63 100644
--- a/meta-isar/conf/distro/debian-jessie.conf
+++ b/meta-isar/conf/distro/debian-jessie.conf
@@ -1,16 +1,20 @@
-# Debian jessie multistrap configuration
+# Debian jessie distribution configuration
#
# This software is a part of ISAR.
# Copyright (C) 2015-2016 ilbers GmbH
DISTRO_SUITE ?= "jessie"
-DISTRO_COMPONENTS ?= "main contrib non-free"
+# For bootstrap purposes still needed:
DISTRO_APT_SOURCE ?= "http://ftp.debian.org/debian"
-DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security"
+DISTRO_COMPONENTS ?= "main contrib non-free"
+DISTRO_APT_SOURCES += "conf/distro/debian-jessie.list"
DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
-DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
-DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
DISTRO_KERNELS ?= "486 4kc-malta 586 5kc-malta 686-pae amd64 arm64 armmp \
armmp-lpae ixp4xx kirkwood loongson-2e loongson-2f loongson-3 octeon \
orion5x powerpc powerpc-smp powerpc64 powerpc64le r4k-ip22 r5k-ip32 \
s390x sb1-bcm91250a versatile"
+
+# No longer needed:
+DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security"
+DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
+DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
diff --git a/meta-isar/conf/distro/debian-jessie.list b/meta-isar/conf/distro/debian-jessie.list
new file mode 100644
index 0000000..3b5cc59
--- /dev/null
+++ b/meta-isar/conf/distro/debian-jessie.list
@@ -0,0 +1,2 @@
+deb http://ftp.de.debian.org/debian jessie-updates main contrib non-free
+deb http://security.debian.org jessie/updates main contrib non-free
diff --git a/meta-isar/conf/distro/debian-stretch.conf b/meta-isar/conf/distro/debian-stretch.conf
index 5a85d52..26a08c5 100644
--- a/meta-isar/conf/distro/debian-stretch.conf
+++ b/meta-isar/conf/distro/debian-stretch.conf
@@ -2,12 +2,16 @@
# Copyright (C) 2017 ilbers GmbH
DISTRO_SUITE ?= "stretch"
-DISTRO_COMPONENTS ?= "main contrib non-free"
+# For bootstrap purposes still needed:
DISTRO_APT_SOURCE ?= "http://ftp.debian.org/debian"
-DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security"
+DISTRO_COMPONENTS ?= "main contrib non-free"
+DISTRO_APT_SOURCES += "conf/distro/debian-stretch.list"
DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
-DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
-DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
DISTRO_KERNELS ?= "4kc-malta 586 5kc-malta 686 686-pae amd64 arm64 armmp \
armmp-lpae kirkwood loongson-3 marvell octeon orion5x powerpc64le \
rt-686-pae rt-amd64 s390x"
+
+# No longer needed:
+DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security"
+DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
+DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
diff --git a/meta-isar/conf/distro/debian-stretch.list b/meta-isar/conf/distro/debian-stretch.list
new file mode 100644
index 0000000..842a859
--- /dev/null
+++ b/meta-isar/conf/distro/debian-stretch.list
@@ -0,0 +1,2 @@
+deb http://ftp.de.debian.org/debian stretch-updates main contrib non-free
+deb http://security.debian.org stretch/updates main contrib non-free
diff --git a/meta-isar/conf/distro/debian-wheezy.conf b/meta-isar/conf/distro/debian-wheezy.conf
index f5ab6eb..de7a10f 100644
--- a/meta-isar/conf/distro/debian-wheezy.conf
+++ b/meta-isar/conf/distro/debian-wheezy.conf
@@ -1,14 +1,18 @@
-# Debian wheezy multistrap configuration
+# Debian wheezy distribution configuration
#
# This software is a part of ISAR.
# Copyright (C) 2015-2016 ilbers GmbH
DISTRO_SUITE ?= "wheezy"
-DISTRO_COMPONENTS ?= "main contrib non-free"
+# For bootstrap purposes still needed:
DISTRO_APT_SOURCE ?= "http://ftp.debian.org/debian"
-DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security"
+DISTRO_COMPONENTS ?= "main contrib non-free"
+DISTRO_APT_SOURCES += "conf/distro/debian-wheezy.list"
DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
-DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
-DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
DISTRO_KERNELS ?= "486 686-pae amd64 rt-686-pae rt-amd64 versatile vexpress \
iop32x ixp4xx kirkwood mv78xx0 mx5 omap orion5x"
+
+# No longer needed:
+DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security"
+DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
+DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
diff --git a/meta-isar/conf/distro/debian-wheezy.list b/meta-isar/conf/distro/debian-wheezy.list
new file mode 100644
index 0000000..2dbb112
--- /dev/null
+++ b/meta-isar/conf/distro/debian-wheezy.list
@@ -0,0 +1,2 @@
+deb http://ftp.de.debian.org/debian wheezy-updates main contrib non-free
+deb http://security.debian.org wheezy/updates main contrib non-free
diff --git a/meta-isar/conf/distro/raspbian-jessie.conf b/meta-isar/conf/distro/raspbian-jessie.conf
index c2a867d..0d66905 100644
--- a/meta-isar/conf/distro/raspbian-jessie.conf
+++ b/meta-isar/conf/distro/raspbian-jessie.conf
@@ -1,13 +1,16 @@
-# Raspbian stable multistrap configuration
+# Raspbian stable distribution configuration
#
# This software is a part of ISAR.
# Copyright (C) 2015-2016 ilbers GmbH
DISTRO_SUITE ?= "jessie"
+# For bootstrap purposes still needed:
DISTRO_COMPONENTS ?= "main contrib non-free firmware"
DISTRO_APT_SOURCE ?= "http://archive.raspbian.org/raspbian"
+DISTRO_CONFIG_SCRIPT?= "raspbian-configscript.sh"
+DISTRO_KERNELS ?= "rpi rpi2 rpi-rpfv rpi2-rpfv"
+
+# No longer needed:
DISTRO_APT_SOURCE_SEC ?= ""
-DISTRO_CONFIG_SCRIPT ?= "raspbian-configscript.sh"
DISTRO_MULTICONF_BOOTSTRAP ?= "base"
DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
-DISTRO_KERNELS ?= "rpi rpi2 rpi-rpfv rpi2-rpfv"
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
new file mode 100644
index 0000000..0e9282b
--- /dev/null
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
@@ -0,0 +1,128 @@
+# Minimal debian root file system
+#
+# This software is a part of ISAR.
+# Copyright (c) Siemens AG, 2018
+#
+# SPDX-License-Identifier: MIT
+
+Description = "Minimal debian root file system"
+
+LICENSE = "gpl-2.0"
+LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
+
+PV = "1.0"
+
+WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}"
+DEBOOTSTRAP ?= ""
+ROOTFSDIR = "${WORKDIR}/rootfs"
+APTPREFS = "${WORKDIR}/apt-preferences"
+APTSRCS = "${WORKDIR}/apt-sources"
+
+python () {
+ debootstrap = d.getVar("DEBOOTSTRAP", True)
+ if not debootstrap:
+ target = d.getVar("DISTRO_ARCH", True)
+ machine = os.uname()[4]
+ m = {
+ "x86_64": ["i386", "amd64"],
+ "x86": ["i386"],
+ }
+ if machine not in m or target not in m[machine]:
+ debootstrap = "qemu-debootstrap"
+ else:
+ debootstrap = "debootstrap"
+ d.setVar("DEBOOTSTRAP", debootstrap)
+}
+
+def aggregate_files(d, file_list, file_out):
+ import shutil
+
+ with open(file_out, "wb") as out_fd:
+ for entry in file_list:
+ entry_real = bb.parse.resolve_file(entry, d)
+ with open(entry_real, "rb") as in_fd:
+ shutil.copyfileobj(in_fd, out_fd, 1024*1024*10)
+ out_fd.write("\n".encode())
+
+def gen_components_argument(d):
+ components = d.getVar("DISTRO_COMPONENTS", True)
+ if components and components.strip():
+ return "--components=%s" % ",".join(components.split())
+ else:
+ return ""
+
+do_bootstrap[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
+do_bootstrap[dirs] = "${WORKDIR}"
+do_bootstrap[vardeps] += "DISTRO_COMPONENTS"
+do_bootstrap() {
+ E="${@bb.utils.export_proxies(d)}"
+ sudo -E "${DEBOOTSTRAP}" --verbose \
+ --variant minbase \
+ --arch "${DISTRO_ARCH}" \
+ ${@ gen_components_argument(d)} \
+ "${DISTRO_SUITE}" \
+ "${ROOTFSDIR}" \
+ "${DISTRO_APT_SOURCE}"
+}
+addtask bootstrap before do_build after do_unpack
+
+# TODO: add stamp with checksum of preferences and source files
+# TODO: add mirror handling
+do_apt_config_prepare[vardeps] += "\
+ APTPREFS \
+ DISTRO_APT_PREFERENCES \
+ DEBDISTRONAME \
+ APTSRCS \
+ DISTRO_APT_SOURCES \
+ "
+python do_apt_config_prepare() {
+ import textwrap
+
+ apt_preferences_out = d.getVar("APTPREFS", True)
+ apt_preferences_list = (d.getVar("DISTRO_APT_PREFERENCES", True) or ""
+ ).split()
+ aggregate_files(d, apt_preferences_list, apt_preferences_out)
+
+ deb_distro_name = d.getVar("DEBDISTRONAME", True) or "isar"
+ with open(apt_preferences_out, "ab") as out_fd:
+ out_fd.write(textwrap.dedent("""\
+ Package: *
+ Pin: release n={}
+ Pin-Priority: 1000
+ """.format(deb_distro_name)).encode())
+
+ apt_sources_out = d.getVar("APTSRCS", True)
+ apt_sources_list = (d.getVar("DISTRO_APT_SOURCES", True) or "").split()
+
+ aggregate_files(d, apt_sources_list, apt_sources_out)
+}
+addtask apt_config_prepare before do_build after do_bootstrap
+
+do_apt_config_install() {
+ sudo mkdir -p "${ROOTFSDIR}/etc/apt/preferences.d"
+ sudo install -v -m644 "${APTPREFS}" \
+ "${ROOTFSDIR}/etc/apt/preferences.d/bootstrap"
+ sudo mkdir -p "${ROOTFSDIR}/etc/apt/sources.list.d"
+ sudo install -v -m644 "${APTSRCS}" \
+ "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
+}
+addtask apt_config_install before do_build after do_apt_config_prepare
+
+do_apt_update() {
+ E="${@bb.utils.export_proxies(d)}"
+ export DEBIAN_FRONTEND=noninteractive
+
+ sudo mount --bind -o ro /dev ${ROOTFSDIR}/dev
+ sudo mount -t proc none ${ROOTFSDIR}/proc
+
+ sudo -E chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y
+ sudo -E chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade -y \
+ --no-install-recommends
+}
+addtask apt_update before do_build after do_apt_config_install
+
+do_deploy[dirs] = "${DEPLOY_DIR_IMAGE}"
+do_deploy() {
+ ln -Tfsr "${ROOTFSDIR}" "${DEPLOY_DIR_IMAGE}/${PN}-${DISTRO}-${DISTRO_ARCH}"
+}
+addtask deploy before do_build after do_apt_update
\ No newline at end of file
--
2.16.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] implement isar-bootstrap using debootstrap
2018-02-21 11:49 ` [PATCH 1/5] implement isar-bootstrap using debootstrap claudius.heine.ext
@ 2018-02-22 8:11 ` Claudius Heine
0 siblings, 0 replies; 12+ messages in thread
From: Claudius Heine @ 2018-02-22 8:11 UTC (permalink / raw)
To: claudius.heine.ext, isar-users
[-- Attachment #1: Type: text/plain, Size: 13778 bytes --]
Hi,
ok, now with a fresh mind, I'll start reviewing my own patches :)
On Wed, 2018-02-21 at 12:49 +0100, claudius.heine.ext@siemens.com
wrote:
> From: Claudius Heine <ch@denx.de>
>
> Since multistrap is deprecated for some years, it is required to
> change
> to debootstrap.
>
> This patch introduces the 'isar-bootstrap' recipe that implement the
> creation of a minimal base root file system using debootstrap.
>
> Signed-off-by: Claudius Heine <ch@denx.de>
> ---
> meta-isar/conf/distro/debian-jessie.conf | 14 ++-
> meta-isar/conf/distro/debian-jessie.list | 2 +
> meta-isar/conf/distro/debian-stretch.conf | 12 +-
> meta-isar/conf/distro/debian-stretch.list | 2 +
> meta-isar/conf/distro/debian-wheezy.conf | 14 ++-
> meta-isar/conf/distro/debian-wheezy.list | 2 +
> meta-isar/conf/distro/raspbian-jessie.conf | 9 +-
> meta/recipes-core/isar-bootstrap/isar-bootstrap.bb | 128
> +++++++++++++++++++++
> 8 files changed, 166 insertions(+), 17 deletions(-)
> create mode 100644 meta-isar/conf/distro/debian-jessie.list
> create mode 100644 meta-isar/conf/distro/debian-stretch.list
> create mode 100644 meta-isar/conf/distro/debian-wheezy.list
> create mode 100644 meta/recipes-core/isar-bootstrap/isar-
> bootstrap.bb
>
> diff --git a/meta-isar/conf/distro/debian-jessie.conf b/meta-
> isar/conf/distro/debian-jessie.conf
> index 3e62b14..d7efa63 100644
> --- a/meta-isar/conf/distro/debian-jessie.conf
> +++ b/meta-isar/conf/distro/debian-jessie.conf
> @@ -1,16 +1,20 @@
> -# Debian jessie multistrap configuration
> +# Debian jessie distribution configuration
> #
> # This software is a part of ISAR.
> # Copyright (C) 2015-2016 ilbers GmbH
>
> DISTRO_SUITE ?= "jessie"
> -DISTRO_COMPONENTS ?= "main contrib non-free"
> +# For bootstrap purposes still needed:
> DISTRO_APT_SOURCE ?= "http://ftp.debian.org/debian"
> -DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security
> "
> +DISTRO_COMPONENTS ?= "main contrib non-free"
> +DISTRO_APT_SOURCES += "conf/distro/debian-jessie.list"
> DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
> -DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
> -DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
> DISTRO_KERNELS ?= "486 4kc-malta 586 5kc-malta 686-pae amd64 arm64
> armmp \
> armmp-lpae ixp4xx kirkwood loongson-2e loongson-2f loongson-3
> octeon \
> orion5x powerpc powerpc-smp powerpc64 powerpc64le r4k-ip22 r5k-
> ip32 \
> s390x sb1-bcm91250a versatile"
> +
> +# No longer needed:
> +DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security
> "
> +DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
> +DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
> diff --git a/meta-isar/conf/distro/debian-jessie.list b/meta-
> isar/conf/distro/debian-jessie.list
> new file mode 100644
> index 0000000..3b5cc59
> --- /dev/null
> +++ b/meta-isar/conf/distro/debian-jessie.list
> @@ -0,0 +1,2 @@
> +deb http://ftp.de.debian.org/debian jessie-updates mai
> n contrib non-free
> +deb http://security.debian.org class="Apple-tab-span"
> style="white-space:pre"> jessie/updates main contrib non-free
> diff --git a/meta-isar/conf/distro/debian-stretch.conf b/meta-
> isar/conf/distro/debian-stretch.conf
> index 5a85d52..26a08c5 100644
> --- a/meta-isar/conf/distro/debian-stretch.conf
> +++ b/meta-isar/conf/distro/debian-stretch.conf
> @@ -2,12 +2,16 @@
> # Copyright (C) 2017 ilbers GmbH
>
> DISTRO_SUITE ?= "stretch"
> -DISTRO_COMPONENTS ?= "main contrib non-free"
> +# For bootstrap purposes still needed:
> DISTRO_APT_SOURCE ?= "http://ftp.debian.org/debian"
> -DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security
> "
> +DISTRO_COMPONENTS ?= "main contrib non-free"
> +DISTRO_APT_SOURCES += "conf/distro/debian-stretch.list"
> DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
> -DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
> -DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
> DISTRO_KERNELS ?= "4kc-malta 586 5kc-malta 686 686-pae amd64 arm64
> armmp \
> armmp-lpae kirkwood loongson-3 marvell octeon orion5x
> powerpc64le \
> rt-686-pae rt-amd64 s390x"
> +
> +# No longer needed:
> +DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security
> "
> +DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
> +DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
> diff --git a/meta-isar/conf/distro/debian-stretch.list b/meta-
> isar/conf/distro/debian-stretch.list
> new file mode 100644
> index 0000000..842a859
> --- /dev/null
> +++ b/meta-isar/conf/distro/debian-stretch.list
> @@ -0,0 +1,2 @@
> +deb http://ftp.de.debian.org/debian stretch-updates ma
> in contrib non-free
> +deb http://security.debian.org class="Apple-tab-span"
> style="white-space:pre"> stretch/updates main contrib non-free
> diff --git a/meta-isar/conf/distro/debian-wheezy.conf b/meta-
> isar/conf/distro/debian-wheezy.conf
> index f5ab6eb..de7a10f 100644
> --- a/meta-isar/conf/distro/debian-wheezy.conf
> +++ b/meta-isar/conf/distro/debian-wheezy.conf
> @@ -1,14 +1,18 @@
> -# Debian wheezy multistrap configuration
> +# Debian wheezy distribution configuration
> #
> # This software is a part of ISAR.
> # Copyright (C) 2015-2016 ilbers GmbH
>
> DISTRO_SUITE ?= "wheezy"
> -DISTRO_COMPONENTS ?= "main contrib non-free"
> +# For bootstrap purposes still needed:
> DISTRO_APT_SOURCE ?= "http://ftp.debian.org/debian"
> -DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security
> "
> +DISTRO_COMPONENTS ?= "main contrib non-free"
> +DISTRO_APT_SOURCES += "conf/distro/debian-wheezy.list"
> DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
> -DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
> -DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
> DISTRO_KERNELS ?= "486 686-pae amd64 rt-686-pae rt-amd64 versatile
> vexpress \
> iop32x ixp4xx kirkwood mv78xx0 mx5 omap orion5x"
> +
> +# No longer needed:
> +DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security
> "
> +DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
> +DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
> diff --git a/meta-isar/conf/distro/debian-wheezy.list b/meta-
> isar/conf/distro/debian-wheezy.list
> new file mode 100644
> index 0000000..2dbb112
> --- /dev/null
> +++ b/meta-isar/conf/distro/debian-wheezy.list
> @@ -0,0 +1,2 @@
> +deb http://ftp.de.debian.org/debian wheezy-updates mai
> n contrib non-free
> +deb http://security.debian.org class="Apple-tab-span"
> style="white-space:pre"> wheezy/updates main contrib non-free
> diff --git a/meta-isar/conf/distro/raspbian-jessie.conf b/meta-
> isar/conf/distro/raspbian-jessie.conf
> index c2a867d..0d66905 100644
> --- a/meta-isar/conf/distro/raspbian-jessie.conf
> +++ b/meta-isar/conf/distro/raspbian-jessie.conf
> @@ -1,13 +1,16 @@
> -# Raspbian stable multistrap configuration
> +# Raspbian stable distribution configuration
> #
> # This software is a part of ISAR.
> # Copyright (C) 2015-2016 ilbers GmbH
>
> DISTRO_SUITE ?= "jessie"
> +# For bootstrap purposes still needed:
> DISTRO_COMPONENTS ?= "main contrib non-free firmware"
> DISTRO_APT_SOURCE ?= "http://archive.raspbian.org/raspbian"
> +DISTRO_CONFIG_SCRIPT?= "raspbian-configscript.sh"
> +DISTRO_KERNELS ?= "rpi rpi2 rpi-rpfv rpi2-rpfv"
> +
> +# No longer needed:
> DISTRO_APT_SOURCE_SEC ?= ""
> -DISTRO_CONFIG_SCRIPT ?= "raspbian-configscript.sh"
> DISTRO_MULTICONF_BOOTSTRAP ?= "base"
> DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
> -DISTRO_KERNELS ?= "rpi rpi2 rpi-rpfv rpi2-rpfv"
> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
> new file mode 100644
> index 0000000..0e9282b
> --- /dev/null
> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
> @@ -0,0 +1,128 @@
> +# Minimal debian root file system
> +#
> +# This software is a part of ISAR.
> +# Copyright (c) Siemens AG, 2018
> +#
> +# SPDX-License-Identifier: MIT
> +
> +Description = "Minimal debian root file system"
> +
> +LICENSE = "gpl-2.0"
> +LIC_FILES_CHKSUM =
> "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499
> f7abaabaa882bbe"
> +
> +PV = "1.0"
> +
> +WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}"
> +DEBOOTSTRAP ?= ""
> +ROOTFSDIR = "${WORKDIR}/rootfs"
> +APTPREFS = "${WORKDIR}/apt-preferences"
> +APTSRCS = "${WORKDIR}/apt-sources"
> +
> +python () {
> + debootstrap = d.getVar("DEBOOTSTRAP", True)
> + if not debootstrap:
> + target = d.getVar("DISTRO_ARCH", True)
> + machine = os.uname()[4]
> + m = {
> + "x86_64": ["i386", "amd64"],
> + "x86": ["i386"],
> + }
> + if machine not in m or target not in m[machine]:
> + debootstrap = "qemu-debootstrap"
> + else:
> + debootstrap = "debootstrap"
> + d.setVar("DEBOOTSTRAP", debootstrap)
> +}
> +
> +def aggregate_files(d, file_list, file_out):
> + import shutil
> +
> + with open(file_out, "wb") as out_fd:
> + for entry in file_list:
> + entry_real = bb.parse.resolve_file(entry, d)
> + with open(entry_real, "rb") as in_fd:
> + shutil.copyfileobj(in_fd, out_fd, 1024*1024*10)
> + out_fd.write("\n".encode())
> +
> +def gen_components_argument(d):
> + components = d.getVar("DISTRO_COMPONENTS", True)
> + if components and components.strip():
> + return "--components=%s" % ",".join(components.split())
> + else:
> + return ""
> +
> +do_bootstrap[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
> +do_bootstrap[dirs] = "${WORKDIR}"
> +do_bootstrap[vardeps] += "DISTRO_COMPONENTS"
> +do_bootstrap() {
> + E="${@bb.utils.export_proxies(d)}"
> + sudo -E "${DEBOOTSTRAP}" --verbose \
> + --variant minbase \
> + --arch "${DISTRO_ARCH}" \
> + ${@ gen_components_argument(d)} \
> + "${DISTRO_SUITE}" \
> + "${ROOTFSDIR}" \
> + "${DISTRO_APT_SOURCE}"
> +}
> +addtask bootstrap before do_build after do_unpack
> +
> +# TODO: add stamp with checksum of preferences and source files
> +# TODO: add mirror handling
> +do_apt_config_prepare[vardeps] += "\
> + APTPREFS \
> + DISTRO_APT_PREFERENCES \
> + DEBDISTRONAME \
> + APTSRCS \
> + DISTRO_APT_SOURCES \
> + "
> +python do_apt_config_prepare() {
> + import textwrap
> +
> + apt_preferences_out = d.getVar("APTPREFS", True)
> + apt_preferences_list = (d.getVar("DISTRO_APT_PREFERENCES", True)
> or ""
> + ).split()
> + aggregate_files(d, apt_preferences_list, apt_preferences_out)
> +
> + deb_distro_name = d.getVar("DEBDISTRONAME", True) or "isar"
> + with open(apt_preferences_out, "ab") as out_fd:
> + out_fd.write(textwrap.dedent("""\
> + Package: *
> + Pin: release n={}
> + Pin-Priority: 1000
> + """.format(deb_distro_name)).encode())
I will put this in 'isar-bootstrap-helper' instead, since there
DEBDISTRONAME is used already when adding the isar-apt repository.
Thats it for this patch,
Claudius
> +
> + apt_sources_out = d.getVar("APTSRCS", True)
> + apt_sources_list = (d.getVar("DISTRO_APT_SOURCES", True) or
> "").split()
> +
> + aggregate_files(d, apt_sources_list, apt_sources_out)
> +}
> +addtask apt_config_prepare before do_build after do_bootstrap
> +
> +do_apt_config_install() {
> + sudo mkdir -p "${ROOTFSDIR}/etc/apt/preferences.d"
> + sudo install -v -m644 "${APTPREFS}" \
> + "${ROOTFSDIR}/etc/apt/preferences.d/bootst
> rap"
> + sudo mkdir -p "${ROOTFSDIR}/etc/apt/sources.list.d"
> + sudo install -v -m644 "${APTSRCS}" \
> + "${ROOTFSDIR}/etc/apt/sources.list.d/boots
> trap.list"
> +}
> +addtask apt_config_install before do_build after
> do_apt_config_prepare
> +
> +do_apt_update() {
> + E="${@bb.utils.export_proxies(d)}"
> + export DEBIAN_FRONTEND=noninteractive
> +
> + sudo mount --bind -o ro /dev ${ROOTFSDIR}/dev
> + sudo mount -t proc none ${ROOTFSDIR}/proc
> +
> + sudo -E chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y
> + sudo -E chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade -y \
> + --no-install-recommends
> +}
> +addtask apt_update before do_build after do_apt_config_install
> +
> +do_deploy[dirs] = "${DEPLOY_DIR_IMAGE}"
> +do_deploy() {
> + ln -Tfsr "${ROOTFSDIR}" "${DEPLOY_DIR_IMAGE}/${PN}-${DISTRO}-
> ${DISTRO_ARCH}"
> +}
> +addtask deploy before do_build after do_apt_update
> \ No newline at end of file
> --
> 2.16.1
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de
PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153
Keyserver: hkp://pool.sks-keyservers.net
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/5] meta/isar-bootstrap-helper.bbclass: handle rfs customization centrally
2018-02-21 11:49 [PATCH 0/5] Debootstrap integration claudius.heine.ext
2018-02-21 11:49 ` [PATCH 1/5] implement isar-bootstrap using debootstrap claudius.heine.ext
@ 2018-02-21 11:50 ` claudius.heine.ext
2018-02-22 8:20 ` Claudius Heine
2018-02-21 11:50 ` [PATCH 3/5] meta/buildchroot: switch to using isar-bootstrap claudius.heine.ext
` (4 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: claudius.heine.ext @ 2018-02-21 11:50 UTC (permalink / raw)
To: isar-users; +Cc: Claudius Heine
From: Claudius Heine <ch@denx.de>
This patch introduces the 'isar-bootstrap-helper' bitbake class to
support recipes that use the basic root file system created by
isar-bootstrap.
In this patch the function 'setup_root_file_system' is defined that
allows to copy the root file system to the directory specified in the
first parameter and installs additional packages specified by the
next parameters. It also adds the local 'isar-apt' repo to the apt
configuration and fetches its index.
Signed-off-by: Claudius Heine <ch@denx.de>
---
meta/classes/isar-bootstrap-helper.bbclass | 36 ++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 meta/classes/isar-bootstrap-helper.bbclass
diff --git a/meta/classes/isar-bootstrap-helper.bbclass b/meta/classes/isar-bootstrap-helper.bbclass
new file mode 100644
index 0000000..49c81c1
--- /dev/null
+++ b/meta/classes/isar-bootstrap-helper.bbclass
@@ -0,0 +1,36 @@
+# Helper functions for using isar-bootstrap
+#
+# This software is a part of ISAR.
+# Copyright (c) Siemens AG, 2018
+#
+# SPDX-License-Identifier: MIT
+
+setup_root_file_system() {
+ RFSDIR="$1"
+ shift
+ PACKAGES="$@"
+
+ sudo cp -Trpfx \
+ "${DEPLOY_DIR_IMAGE}/isar-bootstrap-${DISTRO}-${DISTRO_ARCH}/" \
+ "$RFSDIR"
+
+ echo "deb file:///isar-apt ${DEBDISTRONAME} main" | \
+ sudo tee "$RFSDIR/etc/apt/sources.list.d/isar-apt.list" >/dev/null
+
+ sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO} $RFSDIR/isar-apt
+ sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs $RFSDIR/dev
+ sudo mount -t proc none $RFSDIR/proc
+
+ # Install packages:
+ E="${@ bb.utils.export_proxies(d)}"
+ sudo -E chroot "$RFSDIR" /usr/bin/apt-get update \
+ -o Dir::Etc::sourcelist="sources.list.d/isar-apt.list" \
+ -o Dir::Etc::sourceparts="-" \
+ -o APT::Get::List-Cleanup="0"
+ sudo -E chroot "$RFSDIR" \
+ /usr/bin/apt-get install -y \
+ --allow-unauthenticated \
+ --no-install-recommends \
+ -o Debug::pkgProblemResolver=yes \
+ $PACKAGES
+}
--
2.16.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/5] meta/isar-bootstrap-helper.bbclass: handle rfs customization centrally
2018-02-21 11:50 ` [PATCH 2/5] meta/isar-bootstrap-helper.bbclass: handle rfs customization centrally claudius.heine.ext
@ 2018-02-22 8:20 ` Claudius Heine
0 siblings, 0 replies; 12+ messages in thread
From: Claudius Heine @ 2018-02-22 8:20 UTC (permalink / raw)
To: claudius.heine.ext, isar-users
[-- Attachment #1: Type: text/plain, Size: 3064 bytes --]
On Wed, 2018-02-21 at 12:50 +0100, claudius.heine.ext@siemens.com
wrote:
> From: Claudius Heine <ch@denx.de>
>
> This patch introduces the 'isar-bootstrap-helper' bitbake class to
> support recipes that use the basic root file system created by
> isar-bootstrap.
>
> In this patch the function 'setup_root_file_system' is defined that
> allows to copy the root file system to the directory specified in the
> first parameter and installs additional packages specified by the
> next parameters. It also adds the local 'isar-apt' repo to the apt
> configuration and fetches its index.
>
> Signed-off-by: Claudius Heine <ch@denx.de>
> ---
> meta/classes/isar-bootstrap-helper.bbclass | 36
> ++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
> create mode 100644 meta/classes/isar-bootstrap-helper.bbclass
>
> diff --git a/meta/classes/isar-bootstrap-helper.bbclass
> b/meta/classes/isar-bootstrap-helper.bbclass
> new file mode 100644
> index 0000000..49c81c1
> --- /dev/null
> +++ b/meta/classes/isar-bootstrap-helper.bbclass
> @@ -0,0 +1,36 @@
> +# Helper functions for using isar-bootstrap
> +#
> +# This software is a part of ISAR.
> +# Copyright (c) Siemens AG, 2018
> +#
> +# SPDX-License-Identifier: MIT
> +
> +setup_root_file_system() {
> + RFSDIR="$1"
For consistency sake, I'll rename this variable to ROOTFSDIR, the same
used in the isar-bootstrap recipe.
> + shift
> + PACKAGES="$@"
> +
> + sudo cp -Trpfx \
> + "${DEPLOY_DIR_IMAGE}/isar-bootstrap-${DISTRO}-
> ${DISTRO_ARCH}/" \
> + "$RFSDIR"
> +
> + echo "deb file:///isar-apt ${DEBDISTRONAME} main" | \
> + sudo tee "$RFSDIR/etc/apt/sources.list.d/isar-apt.list"
> >/dev/null
> +
> + sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO} $RFSDIR/isar-apt
> + sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs $RFSDIR/dev
> + sudo mount -t proc none $RFSDIR/proc
> +
> + # Install packages:
> + E="${@ bb.utils.export_proxies(d)}"
> + sudo -E chroot "$RFSDIR" /usr/bin/apt-get update \
> + -o Dir::Etc::sourcelist="sources.list.d/isar-apt.list" \
> + -o Dir::Etc::sourceparts="-" \
> + -o APT::Get::List-Cleanup="0"
> + sudo -E chroot "$RFSDIR" \
> + /usr/bin/apt-get install -y \
> + --allow-unauthenticated \
> + --no-install-recommends \
Should I instead of using '--no-install-recommends' put the following
in the apt configuration within the isar-bootstrap process?
APT::Install-Recommends "0" ;
APT::Install-Suggests "0" ;
regards,
Claudius
> + -o Debug::pkgProblemResolver=yes \
> + $PACKAGES
> +}
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de
PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153
Keyserver: hkp://pool.sks-keyservers.net
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/5] meta/buildchroot: switch to using isar-bootstrap
2018-02-21 11:49 [PATCH 0/5] Debootstrap integration claudius.heine.ext
2018-02-21 11:49 ` [PATCH 1/5] implement isar-bootstrap using debootstrap claudius.heine.ext
2018-02-21 11:50 ` [PATCH 2/5] meta/isar-bootstrap-helper.bbclass: handle rfs customization centrally claudius.heine.ext
@ 2018-02-21 11:50 ` claudius.heine.ext
2018-02-21 11:50 ` [PATCH 4/5] meta-isar/isar-image-base: " claudius.heine.ext
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: claudius.heine.ext @ 2018-02-21 11:50 UTC (permalink / raw)
To: isar-users; +Cc: Claudius Heine
From: Claudius Heine <ch@denx.de>
This patch removes the multistrap dependency of the buildchroot recipe
and changes it to use the 'isar-bootstrap' and 'isar-bootstrap-helper'
instead.
Signed-off-by: Claudius Heine <ch@denx.de>
---
meta/recipes-devtools/buildchroot/buildchroot.bb | 54 ++++------------
meta/recipes-devtools/buildchroot/files/build.sh | 2 +-
.../buildchroot/files/configscript.sh | 10 ---
.../buildchroot/files/multistrap.conf.in | 37 -----------
meta/recipes-devtools/buildchroot/files/setup.sh | 72 ----------------------
5 files changed, 13 insertions(+), 162 deletions(-)
delete mode 100644 meta/recipes-devtools/buildchroot/files/multistrap.conf.in
delete mode 100755 meta/recipes-devtools/buildchroot/files/setup.sh
diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb b/meta/recipes-devtools/buildchroot/buildchroot.bb
index 520daf9..809bc11 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot.bb
+++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
@@ -8,13 +8,13 @@ DESCRIPTION = "Multistrap development filesystem"
LICENSE = "gpl-2.0"
LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
-FILESPATH =. "${LAYERDIR_core}/recipes-devtools/buildchroot/files:"
-SRC_URI = "file://multistrap.conf.in \
- file://configscript.sh \
- file://setup.sh \
+FILESPATH_prepend := "${THISDIR}/files:"
+SRC_URI = "file://configscript.sh \
file://build.sh"
PV = "1.0"
+inherit isar-bootstrap-helper
+
BUILDCHROOT_PREINSTALL ?= "gcc \
make \
build-essential \
@@ -31,50 +31,20 @@ BUILDCHROOT_PREINSTALL ?= "gcc \
WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}"
do_build[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
-do_build[depends] = "isar-apt:do_cache_config"
+do_build[cleandirs] = "${BUILDCHROOT_DIR} \
+ ${BUILDCHROOT_DIR}/isar-apt \
+ ${BUILDCHROOT_DIR}/downloads \
+ ${BUILDCHROOT_DIR}/home/builder"
+do_build[depends] = "isar-apt:do_cache_config isar-bootstrap:do_deploy"
do_build() {
- E="${@ bb.utils.export_proxies(d)}"
-
- # If buildchroot re-build is triggered, this ensure that we are always
- # re-building a clean image:
- sudo rm -rf ${BUILDCHROOT_DIR}
- mkdir -p ${BUILDCHROOT_DIR}/isar-apt
- mkdir -p ${BUILDCHROOT_DIR}/downloads
- mkdir -p ${BUILDCHROOT_DIR}/dev
- mkdir -p ${BUILDCHROOT_DIR}/proc
- mkdir -p ${BUILDCHROOT_DIR}/sys
-
- chmod +x "${WORKDIR}/setup.sh"
- chmod +x "${WORKDIR}/configscript.sh"
-
- # Multistrap accepts only relative path in configuration files, so get it:
- cd ${TOPDIR}
- WORKDIR_REL=${@ os.path.relpath(d.getVar("WORKDIR", True))}
-
- # Adjust multistrap config
- sed -e 's|##BUILDCHROOT_PREINSTALL##|${BUILDCHROOT_PREINSTALL}|g' \
- -e 's|##DISTRO_MULTICONF_BOOTSTRAP##|${DISTRO_MULTICONF_BOOTSTRAP}|g' \
- -e 's|##DISTRO_MULTICONF_APTSOURCES##|${DISTRO_MULTICONF_APTSOURCES}|g' \
- -e 's|##DISTRO_APT_SOURCE##|${DISTRO_APT_SOURCE}|g' \
- -e 's|##DISTRO_APT_SOURCE_SEC##|${DISTRO_APT_SOURCE_SEC}|g' \
- -e 's|##DISTRO_SUITE##|${DISTRO_SUITE}|g' \
- -e 's|##DISTRO_COMPONENTS##|${DISTRO_COMPONENTS}|g' \
- -e 's|##CONFIG_SCRIPT##|./'"$WORKDIR_REL"'/configscript.sh|g' \
- -e 's|##SETUP_SCRIPT##|./'"$WORKDIR_REL"'/setup.sh|g' \
- -e 's|##DIR_HOOKS##|./'"$WORKDIR_REL"'/hooks_multistrap|g' \
- "${WORKDIR}/multistrap.conf.in" > "${WORKDIR}/multistrap.conf"
-
- sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO} ${BUILDCHROOT_DIR}/isar-apt
- sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs ${BUILDCHROOT_DIR}/dev
- sudo mount -t proc none ${BUILDCHROOT_DIR}/proc
-
- # Create root filesystem
- sudo -E multistrap -a ${DISTRO_ARCH} -d "${BUILDCHROOT_DIR}" -f "${WORKDIR}/multistrap.conf"
+ setup_root_file_system "${BUILDCHROOT_DIR}" ${BUILDCHROOT_PREINSTALL}
# Install package builder script
+ sudo chmod -R a+rw "${BUILDCHROOT_DIR}/home/builder"
sudo install -m 755 ${WORKDIR}/build.sh ${BUILDCHROOT_DIR}
# Configure root filesystem
+ sudo install -m 755 ${WORKDIR}/configscript.sh ${BUILDCHROOT_DIR}
sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
}
diff --git a/meta/recipes-devtools/buildchroot/files/build.sh b/meta/recipes-devtools/buildchroot/files/build.sh
index 048f76f..06172f7 100644
--- a/meta/recipes-devtools/buildchroot/files/build.sh
+++ b/meta/recipes-devtools/buildchroot/files/build.sh
@@ -29,7 +29,7 @@ install_cmd="${install_cmd} --allow-unauthenticated"
# APT::Get::List-Cleanup - do not erase obsolete packages list for
# upstream in '/var/lib/apt/lists'
apt-get update \
- -o Dir::Etc::sourcelist="sources.list.d/multistrap-isar-apt.list" \
+ -o Dir::Etc::sourcelist="sources.list.d/isar-apt.list" \
-o Dir::Etc::sourceparts="-" \
-o APT::Get::List-Cleanup="0"
diff --git a/meta/recipes-devtools/buildchroot/files/configscript.sh b/meta/recipes-devtools/buildchroot/files/configscript.sh
index a5942b5..c2a599a 100644
--- a/meta/recipes-devtools/buildchroot/files/configscript.sh
+++ b/meta/recipes-devtools/buildchroot/files/configscript.sh
@@ -31,13 +31,3 @@ debconf-set-selections <<END
locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8
locales locales/default_environment_locale select en_US.UTF-8
END
-
-#set up non-interactive configuration
-export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
-export LC_ALL=C LANGUAGE=C LANG=C
-
-#run pre installation script
-/var/lib/dpkg/info/dash.preinst install
-
-#configuring packages
-dpkg --configure -a
diff --git a/meta/recipes-devtools/buildchroot/files/multistrap.conf.in b/meta/recipes-devtools/buildchroot/files/multistrap.conf.in
deleted file mode 100644
index 480a4b8..0000000
--- a/meta/recipes-devtools/buildchroot/files/multistrap.conf.in
+++ /dev/null
@@ -1,37 +0,0 @@
-# This software is a part of ISAR.
-# Copyright (C) 2015-2017 ilbers GmbH
-
-[General]
-noauth=true
-unpack=true
-ignorenativearch=true
-bootstrap=##DISTRO_MULTICONF_BOOTSTRAP##
-aptsources=isar-apt ##DISTRO_MULTICONF_APTSOURCES##
-configscript=##CONFIG_SCRIPT##
-setupscript=##SETUP_SCRIPT##
-hookdir=##DIR_HOOKS##
-
-[base]
-source=##DISTRO_APT_SOURCE##
-suite=##DISTRO_SUITE##
-components=##DISTRO_COMPONENTS##
-packages=##BUILDCHROOT_PREINSTALL##
-omitdebsrc=true
-
-[updates]
-source=##DISTRO_APT_SOURCE##
-suite=##DISTRO_SUITE##-updates
-components=##DISTRO_COMPONENTS##
-omitdebsrc=true
-
-[security]
-source=##DISTRO_APT_SOURCE_SEC##
-suite=##DISTRO_SUITE##/updates
-components=##DISTRO_COMPONENTS##
-omitdebsrc=true
-
-[isar-apt]
-source=file:///isar-apt
-suite=isar
-components=main
-omitdebsrc=true
diff --git a/meta/recipes-devtools/buildchroot/files/setup.sh b/meta/recipes-devtools/buildchroot/files/setup.sh
deleted file mode 100755
index 21c004e..0000000
--- a/meta/recipes-devtools/buildchroot/files/setup.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-#
-# This software is a part of ISAR.
-# Copyright (C) 2015-2016 ilbers GmbH
-#
-# Based on multistrap/examples/chroot.sh
-
-set -e
-
-# The script is called with the following arguments:
-# $1 = $DIR - the top directory of the bootstrapped system
-# $2 = $ARCH - the specified architecture, already checked with
-# dpkg-architecture.
-# setup.sh needs to be executable.
-
-TARGET=$1
-
-# Prevent daemons from starting in buildchroot
-if [ -x "$TARGET/sbin/start-stop-daemon" ]; then
- echo "initctl: Trying to prevent daemons from starting in $TARGET"
-
- # Disable start-stop-daemon
- mv $TARGET/sbin/start-stop-daemon $TARGET/sbin/start-stop-daemon.REAL
- cat > $TARGET/sbin/start-stop-daemon << EOF
-#!/bin/sh
-echo
-echo Warning: Fake start-stop-daemon called, doing nothing
-EOF
- chmod 755 $TARGET/sbin/start-stop-daemon
-fi
-
-if [ -x "$TARGET/sbin/initctl" ]; then
- echo "start-stop-daemon: Trying to prevent daemons from starting in $TARGET"
-
- # Disable initctl
- mv "$TARGET/sbin/initctl" "$TARGET/sbin/initctl.REAL"
- cat > $TARGET/sbin/initctl << EOF
-#!/bin/sh
-echo
-echo "Warning: Fake initctl called, doing nothing"
-EOF
- chmod 755 $TARGET/sbin/initctl
-fi
-
-# Define sysvinit policy 101 to prevent daemons from starting in buildchroot
-if [ -x "$TARGET/sbin/init" -a ! -f "$TARGET/usr/sbin/policy-rc.d" ]; then
- echo "sysvinit: Using policy-rc.d to prevent daemons from starting in $TARGET"
-
- cat > $TARGET/usr/sbin/policy-rc.d << EOF
-#!/bin/sh
-echo "sysvinit: All runlevel operations denied by policy" >&2
-exit 101
-EOF
- chmod a+x $TARGET/usr/sbin/policy-rc.d
-fi
-
-# Install QEMU emulator to execute ARM binaries
-if [ ! -x /usr/bin/qemu-arm-static ]; then
- echo "qemu-arm-static binary not present, unable to execute ARM binaries"
-else
- sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
-fi
-
-# Set hostname
-echo "isar" > $TARGET/etc/hostname
-
-# Create packages build folder
-sudo install -d $TARGET/home/builder
-sudo chmod -R a+rw $TARGET/home/builder
-
-# Install host networking settings
-sudo cp /etc/resolv.conf $TARGET/etc
--
2.16.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/5] meta-isar/isar-image-base: switch to using isar-bootstrap
2018-02-21 11:49 [PATCH 0/5] Debootstrap integration claudius.heine.ext
` (2 preceding siblings ...)
2018-02-21 11:50 ` [PATCH 3/5] meta/buildchroot: switch to using isar-bootstrap claudius.heine.ext
@ 2018-02-21 11:50 ` claudius.heine.ext
2018-02-21 11:50 ` [PATCH 5/5] meta-isar/multiconfig: remove multistrap references claudius.heine.ext
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: claudius.heine.ext @ 2018-02-21 11:50 UTC (permalink / raw)
To: isar-users; +Cc: Claudius Heine
From: Claudius Heine <ch@denx.de>
This patch removes the multistrap dependency of the isar-image-base
recipe and changes it to use the 'isar-bootstrap' and
'isar-bootstrap-helper' instead.
Signed-off-by: Claudius Heine <ch@denx.de>
---
.../recipes-core/images/files/download_dev-random | 24 --------
.../recipes-core/images/files/multistrap.conf.in | 38 ------------
meta-isar/recipes-core/images/files/setup.sh | 67 ----------------------
meta-isar/recipes-core/images/isar-image-base.bb | 59 +++++--------------
4 files changed, 14 insertions(+), 174 deletions(-)
delete mode 100644 meta-isar/recipes-core/images/files/download_dev-random
delete mode 100644 meta-isar/recipes-core/images/files/multistrap.conf.in
delete mode 100755 meta-isar/recipes-core/images/files/setup.sh
diff --git a/meta-isar/recipes-core/images/files/download_dev-random b/meta-isar/recipes-core/images/files/download_dev-random
deleted file mode 100644
index f7f5fe5..0000000
--- a/meta-isar/recipes-core/images/files/download_dev-random
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# This software is a part of ISAR.
-# Copyright (C) 2017 ilbers GmbH
-
-set -e
-
-readonly ROOTFS="$1"
-
-if [ ! -c ${ROOTFS}/dev/random ]; then
- rm -f ${ROOTFS}/dev/random
- mknod "${ROOTFS}/dev/random" c 1 8
- chmod 666 "${ROOTFS}/dev/random"
- chown 0:0 "${ROOTFS}/dev/random"
-fi
-
-if [ ! -c ${ROOTFS}/dev/urandom ]; then
- rm -f ${ROOTFS}/dev/urandom
- mknod "${ROOTFS}/dev/urandom" c 1 9
- chmod 666 "${ROOTFS}/dev/urandom"
- chown 0:0 "${ROOTFS}/dev/urandom"
-fi
-
-exit 0
diff --git a/meta-isar/recipes-core/images/files/multistrap.conf.in b/meta-isar/recipes-core/images/files/multistrap.conf.in
deleted file mode 100644
index 432b6af..0000000
--- a/meta-isar/recipes-core/images/files/multistrap.conf.in
+++ /dev/null
@@ -1,38 +0,0 @@
-# This software is a part of ISAR.
-# Copyright (C) 2015-2017 ilbers GmbH
-
-[General]
-noauth=true
-unpack=true
-ignorenativearch=true
-bootstrap=##DISTRO_MULTICONF_BOOTSTRAP## Isar
-aptsources=##DISTRO_MULTICONF_APTSOURCES##
-configscript=##CONFIG_SCRIPT##
-setupscript=##SETUP_SCRIPT##
-hookdir=##DIR_HOOKS##
-
-[base]
-source=##DISTRO_APT_SOURCE##
-suite=##DISTRO_SUITE##
-components=##DISTRO_COMPONENTS##
-packages=##IMAGE_PREINSTALL##
-omitdebsrc=true
-
-[updates]
-source=##DISTRO_APT_SOURCE##
-suite=##DISTRO_SUITE##-updates
-components=##DISTRO_COMPONENTS##
-omitdebsrc=true
-
-[security]
-source=##DISTRO_APT_SOURCE_SEC##
-suite=##DISTRO_SUITE##/updates
-components=##DISTRO_COMPONENTS##
-omitdebsrc=true
-
-[Isar]
-packages=##IMAGE_INSTALL##
-source=##DEPLOY_DIR_APT##
-suite=##ISAR_DISTRO_SUITE##
-components=main
-omitdebsrc=true
diff --git a/meta-isar/recipes-core/images/files/setup.sh b/meta-isar/recipes-core/images/files/setup.sh
deleted file mode 100755
index 39b828c..0000000
--- a/meta-isar/recipes-core/images/files/setup.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-#
-# This software is a part of ISAR.
-# Copyright (C) 2015-2016 ilbers GmbH
-#
-# Based on multistrap/examples/chroot.sh
-
-set -e
-
-# The script is called with the following arguments:
-# $1 = $DIR - the top directory of the bootstrapped system
-# $2 = $ARCH - the specified architecture, already checked with
-# dpkg-architecture.
-# setup.sh needs to be executable.
-
-TARGET=$1
-
-# Prevent daemons from starting in postinstall during the initial "dpkg
-# --configure -a" under QEMU on the build host
-if [ -x "$TARGET/sbin/start-stop-daemon" ]; then
- echo "initctl: Trying to prevent daemons from starting in $TARGET"
-
- # Disable start-stop-daemon
- mv $TARGET/sbin/start-stop-daemon $TARGET/sbin/start-stop-daemon.REAL
- cat > $TARGET/sbin/start-stop-daemon << EOF
-#!/bin/sh
-echo
-echo Warning: Fake start-stop-daemon called, doing nothing
-EOF
- chmod 755 $TARGET/sbin/start-stop-daemon
-fi
-
-if [ -x "$TARGET/sbin/initctl" ]; then
- echo "start-stop-daemon: Trying to prevent daemons from starting in $TARGET"
-
- # Disable initctl
- mv "$TARGET/sbin/initctl" "$TARGET/sbin/initctl.REAL"
- cat > $TARGET/sbin/initctl << EOF
-#!/bin/sh
-echo
-echo "Warning: Fake initctl called, doing nothing"
-EOF
- chmod 755 $TARGET/sbin/initctl
-fi
-
-# Define sysvinit policy 101 to prevent daemons from starting in postinstall
-# during the initial "dpkg --configure -a" under QEMU on the build host
-if [ -x "$TARGET/sbin/init" -a ! -f "$TARGET/usr/sbin/policy-rc.d" ]; then
- echo "sysvinit: Using policy-rc.d to prevent daemons from starting in $TARGET"
-
- cat > $TARGET/usr/sbin/policy-rc.d << EOF
-#!/bin/sh
-echo "sysvinit: All runlevel operations denied by policy" >&2
-exit 101
-EOF
- chmod a+x $TARGET/usr/sbin/policy-rc.d
-fi
-
-# Install QEMU emulator to execute ARM binaries
-if [ ! -x /usr/bin/qemu-arm-static ]; then
- echo "qemu-arm-static binary not present, unable to execute ARM binaries"
-else
- sudo cp /usr/bin/qemu-arm-static ${TARGET}/usr/bin
-fi
-
-# Set hostname
-echo "isar" > $TARGET/etc/hostname
diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index b444258..bc29408 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -9,14 +9,12 @@ LICENSE = "gpl-2.0"
LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
FILESPATH =. "${LAYERDIR_isar}/recipes-core/images/files:"
-SRC_URI = "file://multistrap.conf.in \
- file://${DISTRO_CONFIG_SCRIPT} \
- file://setup.sh \
- file://download_dev-random"
+SRC_URI = "file://${DISTRO_CONFIG_SCRIPT}"
PV = "1.0"
inherit image
+inherit isar-bootstrap-helper
IMAGE_INSTALL += "linux-image-${KERNEL_NAME}"
@@ -28,50 +26,21 @@ IMAGE_PREINSTALL += "apt \
WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}"
-do_rootfs[dirs] = "${WORKDIR}/hooks_multistrap"
+do_rootfs[cleandirs] = "${IMAGE_ROOTFS} \
+ ${IMAGE_ROOTFS}/isar-apt"
do_rootfs() {
- E="${@ bb.utils.export_proxies(d)}"
-
- sudo rm -rf ${IMAGE_ROOTFS}
-
- chmod +x "${WORKDIR}/${DISTRO_CONFIG_SCRIPT}"
- chmod +x "${WORKDIR}/setup.sh"
- install -m 755 "${WORKDIR}/download_dev-random" "${WORKDIR}/hooks_multistrap/"
-
- # Multistrap accepts only relative path in configuration files, so get it:
- cd ${TOPDIR}
- WORKDIR_REL=${@ os.path.relpath(d.getVar("WORKDIR", True))}
-
- # Adjust multistrap config
- sed -e 's|##IMAGE_PREINSTALL##|${IMAGE_PREINSTALL}|g' \
- -e 's|##DISTRO_MULTICONF_BOOTSTRAP##|${DISTRO_MULTICONF_BOOTSTRAP}|g' \
- -e 's|##DISTRO_MULTICONF_APTSOURCES##|${DISTRO_MULTICONF_APTSOURCES}|g' \
- -e 's|##DISTRO_APT_SOURCE##|${DISTRO_APT_SOURCE}|g' \
- -e 's|##DISTRO_APT_SOURCE_SEC##|${DISTRO_APT_SOURCE_SEC}|g' \
- -e 's|##DISTRO_SUITE##|${DISTRO_SUITE}|g' \
- -e 's|##DISTRO_COMPONENTS##|${DISTRO_COMPONENTS}|g' \
- -e 's|##CONFIG_SCRIPT##|./'"$WORKDIR_REL"'/${DISTRO_CONFIG_SCRIPT}|g' \
- -e 's|##SETUP_SCRIPT##|./'"$WORKDIR_REL"'/setup.sh|g' \
- -e 's|##DIR_HOOKS##|./'"$WORKDIR_REL"'/hooks_multistrap|g' \
- -e 's|##IMAGE_INSTALL##|${IMAGE_INSTALL}|g' \
- -e 's|##DEPLOY_DIR_APT##|copy:///${DEPLOY_DIR_APT}/${DISTRO}|g' \
- -e 's|##ISAR_DISTRO_SUITE##|${DEBDISTRONAME}|g' \
- "${WORKDIR}/multistrap.conf.in" > "${WORKDIR}/multistrap.conf"
-
- # Do not use bitbake flag [dirs] here because this folder should have
- # specific ownership.
- [ ! -d ${IMAGE_ROOTFS}/proc ] && sudo install -d -o 0 -g 0 -m 555 ${IMAGE_ROOTFS}/proc
- sudo mount -t proc none ${IMAGE_ROOTFS}/proc
-
- # Create root filesystem. We must use sudo -E here to preserve the environment
- # because of proxy settings
- sudo -E multistrap -a ${DISTRO_ARCH} -d "${IMAGE_ROOTFS}" -f "${WORKDIR}/multistrap.conf"
+ setup_root_file_system "${IMAGE_ROOTFS}" ${IMAGE_PREINSTALL} ${IMAGE_INSTALL}
# Configure root filesystem
- sudo chroot ${IMAGE_ROOTFS} /${DISTRO_CONFIG_SCRIPT} ${MACHINE_SERIAL} ${BAUDRATE_TTY} \
- ${ROOTFS_DEV}
- sudo rm "${IMAGE_ROOTFS}/${DISTRO_CONFIG_SCRIPT}"
+ sudo install -m 755 "${WORKDIR}/${DISTRO_CONFIG_SCRIPT}" "${IMAGE_ROOTFS}"
+ sudo chroot ${IMAGE_ROOTFS} /${DISTRO_CONFIG_SCRIPT} ${MACHINE_SERIAL} \
+ ${BAUDRATE_TTY} \
+ ${ROOTFS_DEV}
- sudo umount ${IMAGE_ROOTFS}/proc 2>/dev/null || true
+ # Cleanup
+ sudo rm "${IMAGE_ROOTFS}/${DISTRO_CONFIG_SCRIPT}"
+ sudo rm "${IMAGE_ROOTFS}/etc/apt/sources.list.d/isar-apt.list"
+ sudo umount -l ${IMAGE_ROOTFS}/isar-apt
+ sudo rmdir ${IMAGE_ROOTFS}/isar-apt
}
--
2.16.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 5/5] meta-isar/multiconfig: remove multistrap references
2018-02-21 11:49 [PATCH 0/5] Debootstrap integration claudius.heine.ext
` (3 preceding siblings ...)
2018-02-21 11:50 ` [PATCH 4/5] meta-isar/isar-image-base: " claudius.heine.ext
@ 2018-02-21 11:50 ` claudius.heine.ext
2018-02-21 17:37 ` [PATCH 0/5] Debootstrap integration Jan Kiszka
2018-02-22 8:20 ` Alexander Smirnov
6 siblings, 0 replies; 12+ messages in thread
From: claudius.heine.ext @ 2018-02-21 11:50 UTC (permalink / raw)
To: isar-users; +Cc: Claudius Heine
From: Claudius Heine <ch@denx.de>
This patch removes the left-over references to multistrap from the
configuration files.
Signed-off-by: Claudius Heine <ch@denx.de>
---
meta-isar/conf/distro/debian-jessie.conf | 5 -----
meta-isar/conf/distro/debian-stretch.conf | 5 -----
meta-isar/conf/distro/debian-wheezy.conf | 5 -----
meta-isar/conf/distro/raspbian-jessie.conf | 5 -----
meta-isar/conf/multiconfig/qemuarm-jessie.conf | 2 +-
meta-isar/conf/multiconfig/qemuarm-wheezy.conf | 2 +-
meta-isar/conf/multiconfig/rpi-jessie.conf | 2 +-
7 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/meta-isar/conf/distro/debian-jessie.conf b/meta-isar/conf/distro/debian-jessie.conf
index d7efa63..ce7d049 100644
--- a/meta-isar/conf/distro/debian-jessie.conf
+++ b/meta-isar/conf/distro/debian-jessie.conf
@@ -13,8 +13,3 @@ DISTRO_KERNELS ?= "486 4kc-malta 586 5kc-malta 686-pae amd64 arm64 armmp \
armmp-lpae ixp4xx kirkwood loongson-2e loongson-2f loongson-3 octeon \
orion5x powerpc powerpc-smp powerpc64 powerpc64le r4k-ip22 r5k-ip32 \
s390x sb1-bcm91250a versatile"
-
-# No longer needed:
-DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security"
-DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
-DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
diff --git a/meta-isar/conf/distro/debian-stretch.conf b/meta-isar/conf/distro/debian-stretch.conf
index 26a08c5..000317b 100644
--- a/meta-isar/conf/distro/debian-stretch.conf
+++ b/meta-isar/conf/distro/debian-stretch.conf
@@ -10,8 +10,3 @@ DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
DISTRO_KERNELS ?= "4kc-malta 586 5kc-malta 686 686-pae amd64 arm64 armmp \
armmp-lpae kirkwood loongson-3 marvell octeon orion5x powerpc64le \
rt-686-pae rt-amd64 s390x"
-
-# No longer needed:
-DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security"
-DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
-DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
diff --git a/meta-isar/conf/distro/debian-wheezy.conf b/meta-isar/conf/distro/debian-wheezy.conf
index de7a10f..e9065f5 100644
--- a/meta-isar/conf/distro/debian-wheezy.conf
+++ b/meta-isar/conf/distro/debian-wheezy.conf
@@ -11,8 +11,3 @@ DISTRO_APT_SOURCES += "conf/distro/debian-wheezy.list"
DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
DISTRO_KERNELS ?= "486 686-pae amd64 rt-686-pae rt-amd64 versatile vexpress \
iop32x ixp4xx kirkwood mv78xx0 mx5 omap orion5x"
-
-# No longer needed:
-DISTRO_APT_SOURCE_SEC ?= "http://security.debian.org/debian-security"
-DISTRO_MULTICONF_BOOTSTRAP ?= "base updates security"
-DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
diff --git a/meta-isar/conf/distro/raspbian-jessie.conf b/meta-isar/conf/distro/raspbian-jessie.conf
index 0d66905..51d3023 100644
--- a/meta-isar/conf/distro/raspbian-jessie.conf
+++ b/meta-isar/conf/distro/raspbian-jessie.conf
@@ -9,8 +9,3 @@ DISTRO_COMPONENTS ?= "main contrib non-free firmware"
DISTRO_APT_SOURCE ?= "http://archive.raspbian.org/raspbian"
DISTRO_CONFIG_SCRIPT?= "raspbian-configscript.sh"
DISTRO_KERNELS ?= "rpi rpi2 rpi-rpfv rpi2-rpfv"
-
-# No longer needed:
-DISTRO_APT_SOURCE_SEC ?= ""
-DISTRO_MULTICONF_BOOTSTRAP ?= "base"
-DISTRO_MULTICONF_APTSOURCES ?= "${DISTRO_MULTICONF_BOOTSTRAP}"
diff --git a/meta-isar/conf/multiconfig/qemuarm-jessie.conf b/meta-isar/conf/multiconfig/qemuarm-jessie.conf
index 74fb7d9..fe1d760 100644
--- a/meta-isar/conf/multiconfig/qemuarm-jessie.conf
+++ b/meta-isar/conf/multiconfig/qemuarm-jessie.conf
@@ -9,7 +9,7 @@
# This sets the default machine to be qemuarm in this configuration:
MACHINE ?= "qemuarm"
-# This sets the default multistrap configuration:
+# This sets the default distribution configuration:
DISTRO ?= "debian-jessie"
DISTRO_ARCH ?= "armhf"
diff --git a/meta-isar/conf/multiconfig/qemuarm-wheezy.conf b/meta-isar/conf/multiconfig/qemuarm-wheezy.conf
index 11355a4..c573254 100644
--- a/meta-isar/conf/multiconfig/qemuarm-wheezy.conf
+++ b/meta-isar/conf/multiconfig/qemuarm-wheezy.conf
@@ -9,7 +9,7 @@
# This sets the default machine to be qemuarm in this configuration:
MACHINE ?= "qemuarm"
-# This sets the default multistrap configuration:
+# This sets the default distribution configuration:
DISTRO ?= "debian-wheezy"
DISTRO_ARCH ?= "armhf"
diff --git a/meta-isar/conf/multiconfig/rpi-jessie.conf b/meta-isar/conf/multiconfig/rpi-jessie.conf
index 3f33731..fcc10d9 100644
--- a/meta-isar/conf/multiconfig/rpi-jessie.conf
+++ b/meta-isar/conf/multiconfig/rpi-jessie.conf
@@ -9,7 +9,7 @@
# This sets the default machine to be rpi in this configuration:
MACHINE ?= "rpi"
-# This sets the default multistrap configuration:
+# This sets the default distribution configuration:
DISTRO ?= "raspbian-jessie"
DISTRO_ARCH ?= "armhf"
--
2.16.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/5] Debootstrap integration
2018-02-21 11:49 [PATCH 0/5] Debootstrap integration claudius.heine.ext
` (4 preceding siblings ...)
2018-02-21 11:50 ` [PATCH 5/5] meta-isar/multiconfig: remove multistrap references claudius.heine.ext
@ 2018-02-21 17:37 ` Jan Kiszka
2018-02-21 21:38 ` Claudius Heine
2018-02-22 8:20 ` Alexander Smirnov
6 siblings, 1 reply; 12+ messages in thread
From: Jan Kiszka @ 2018-02-21 17:37 UTC (permalink / raw)
To: [ext] claudius.heine.ext@siemens.com, isar-users; +Cc: Claudius Heine
On 2018-02-21 12:49, [ext] claudius.heine.ext@siemens.com wrote:
> From: Claudius Heine <ch@denx.de>
>
> Hi,
>
> this patchset contains the change from multistrap to debootstrap.
>
Nice!
> There are a view points left on the TODO list, but I think its now at a
> good state to start the discussion about this.
>
> Here is the TODO list:
>
> TODO:
> - Move "DISTRO_APT_SOURCE" and "DISTRO_COMPONENTS" to source list
> - requires some parsing of the source.list format
Would you consider this todo a blocking point for merging your series
(provided it otherwise works)? The other points below I would see as
things that could be done on top.
Jan
> - Implement mirror support
> - requires some parsing of the source.list format as well
> - propose handling it similar to how PREMIRRORS is done in oe[1]
> - Implement sharing of apt database:
> - bind mount local apt index (/var/lib/apt)
> - ro mount is not possible since it needs to update the isar-apt repo
> maybe forbid writing to non-local indexies some other way.(ideas?)
> - bind mount rw local apt package cache (/var/cache/apt)
> - some care must be taken that no recipe calls 'apt clean' before
> that is umounted.
>
> [1] https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PREMIRRORS
>
> Cheers,
> Claudius
>
> Claudius Heine (5):
> implement isar-bootstrap using debootstrap
> meta/isar-bootstrap-helper.bbclass: handle rfs customization centrally
> meta/buildchroot: switch to using isar-bootstrap
> meta-isar/isar-image-base: switch to using isar-bootstrap
> meta-isar/multiconfig: remove multistrap references
>
> meta-isar/conf/distro/debian-jessie.conf | 9 +-
> meta-isar/conf/distro/debian-jessie.list | 2 +
> meta-isar/conf/distro/debian-stretch.conf | 7 +-
> meta-isar/conf/distro/debian-stretch.list | 2 +
> meta-isar/conf/distro/debian-wheezy.conf | 9 +-
> meta-isar/conf/distro/debian-wheezy.list | 2 +
> meta-isar/conf/distro/raspbian-jessie.conf | 8 +-
> meta-isar/conf/multiconfig/qemuarm-jessie.conf | 2 +-
> meta-isar/conf/multiconfig/qemuarm-wheezy.conf | 2 +-
> meta-isar/conf/multiconfig/rpi-jessie.conf | 2 +-
> .../recipes-core/images/files/download_dev-random | 24 ----
> .../recipes-core/images/files/multistrap.conf.in | 38 ------
> meta-isar/recipes-core/images/files/setup.sh | 67 -----------
> meta-isar/recipes-core/images/isar-image-base.bb | 59 +++-------
> meta/classes/isar-bootstrap-helper.bbclass | 36 ++++++
> meta/recipes-core/isar-bootstrap/isar-bootstrap.bb | 128 +++++++++++++++++++++
> meta/recipes-devtools/buildchroot/buildchroot.bb | 54 ++-------
> meta/recipes-devtools/buildchroot/files/build.sh | 2 +-
> .../buildchroot/files/configscript.sh | 10 --
> .../buildchroot/files/multistrap.conf.in | 37 ------
> meta/recipes-devtools/buildchroot/files/setup.sh | 72 ------------
> 21 files changed, 214 insertions(+), 358 deletions(-)
> create mode 100644 meta-isar/conf/distro/debian-jessie.list
> create mode 100644 meta-isar/conf/distro/debian-stretch.list
> create mode 100644 meta-isar/conf/distro/debian-wheezy.list
> delete mode 100644 meta-isar/recipes-core/images/files/download_dev-random
> delete mode 100644 meta-isar/recipes-core/images/files/multistrap.conf.in
> delete mode 100755 meta-isar/recipes-core/images/files/setup.sh
> create mode 100644 meta/classes/isar-bootstrap-helper.bbclass
> create mode 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
> delete mode 100644 meta/recipes-devtools/buildchroot/files/multistrap.conf.in
> delete mode 100755 meta/recipes-devtools/buildchroot/files/setup.sh
>
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/5] Debootstrap integration
2018-02-21 17:37 ` [PATCH 0/5] Debootstrap integration Jan Kiszka
@ 2018-02-21 21:38 ` Claudius Heine
0 siblings, 0 replies; 12+ messages in thread
From: Claudius Heine @ 2018-02-21 21:38 UTC (permalink / raw)
To: Jan Kiszka, [ext] claudius.heine.ext@siemens.com, isar-users
[-- Attachment #1: Type: text/plain, Size: 1642 bytes --]
Hi Jan,
On Wed, 2018-02-21 at 18:37 +0100, Jan Kiszka wrote:
> On 2018-02-21 12:49, [ext] claudius.heine.ext@siemens.com wrote:
> > There are a view points left on the TODO list, but I think its now
> > at a
> > good state to start the discussion about this.
> >
> > Here is the TODO list:
> >
> > TODO:
> > - Move "DISTRO_APT_SOURCE" and "DISTRO_COMPONENTS" to source list
> > - requires some parsing of the source.list format
>
> Would you consider this todo a blocking point for merging your series
> (provided it otherwise works)? The other points below I would see as
> things that could be done on top.
No, I wouldn't consider any of those points as blocking. All of this
can be done at a later point and I am currently working on it, but this
patchset should already replace multistrap with just some non-essential
features, like mirror selection missing.
In my tests it worked, but since I only test my use-cases its best if
all of you test it as well to find if I missed anything. It is a big
change in the isar core and a thorough review is necessary. I expect
some more versions of this patchset it until everything is right.
When I have a fresh mind, I will take a look at this code again as
well. :)
Cheers,
Claudius
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de
PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153
Keyserver: hkp://pool.sks-keyservers.net
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/5] Debootstrap integration
2018-02-21 11:49 [PATCH 0/5] Debootstrap integration claudius.heine.ext
` (5 preceding siblings ...)
2018-02-21 17:37 ` [PATCH 0/5] Debootstrap integration Jan Kiszka
@ 2018-02-22 8:20 ` Alexander Smirnov
2018-02-22 10:20 ` Claudius Heine
6 siblings, 1 reply; 12+ messages in thread
From: Alexander Smirnov @ 2018-02-22 8:20 UTC (permalink / raw)
To: claudius.heine.ext, isar-users; +Cc: Claudius Heine
> this patchset contains the change from multistrap to debootstrap.
>
> There are a view points left on the TODO list, but I think its now at a
> good state to start the discussion about this.
>
> Here is the TODO list:
>
> TODO:
> - Move "DISTRO_APT_SOURCE" and "DISTRO_COMPONENTS" to source list
> - requires some parsing of the source.list format
> - Implement mirror support
> - requires some parsing of the source.list format as well
> - propose handling it similar to how PREMIRRORS is done in oe[1]
> - Implement sharing of apt database:
> - bind mount local apt index (/var/lib/apt)
> - ro mount is not possible since it needs to update the isar-apt repo
> maybe forbid writing to non-local indexies some other way.(ideas?)
> - bind mount rw local apt package cache (/var/cache/apt)
> - some care must be taken that no recipe calls 'apt clean' before
> that is umounted.
>
> [1] https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PREMIRRORS
>
Please rebase it on current next. I can't apply this series so can't
test it. 'next' branch was updated the day before your contribution.
@all: please always rebase your contributions on the latest next. I will
not apply anything until I'm able to apply and test.
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/5] Debootstrap integration
2018-02-22 8:20 ` Alexander Smirnov
@ 2018-02-22 10:20 ` Claudius Heine
0 siblings, 0 replies; 12+ messages in thread
From: Claudius Heine @ 2018-02-22 10:20 UTC (permalink / raw)
To: Alexander Smirnov, isar-users; +Cc: Claudius Heine
Hi Alex,
On 02/22/2018 09:20 AM, Alexander Smirnov wrote:
>> this patchset contains the change from multistrap to debootstrap.
>>
>> There are a view points left on the TODO list, but I think its now at a
>> good state to start the discussion about this.
>>
>> Here is the TODO list:
>>
>> TODO:
>> - Move "DISTRO_APT_SOURCE" and "DISTRO_COMPONENTS" to source list
>> - requires some parsing of the source.list format
>> - Implement mirror support
>> - requires some parsing of the source.list format as well
>> - propose handling it similar to how PREMIRRORS is done in oe[1]
>> - Implement sharing of apt database:
>> - bind mount local apt index (/var/lib/apt)
>> - ro mount is not possible since it needs to update the
>> isar-apt repo
>> maybe forbid writing to non-local indexies some other
>> way.(ideas?)
>> - bind mount rw local apt package cache (/var/cache/apt)
>> - some care must be taken that no recipe calls 'apt clean' before
>> that is umounted.
>>
>> [1]
>> https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PREMIRRORS
>>
>>
>
> Please rebase it on current next. I can't apply this series so can't
> test it. 'next' branch was updated the day before your contribution.
I will poste a rebased version soon, with some fixes I found while
testing different configurations.
Cheers,
Claudius
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de
^ permalink raw reply [flat|nested] 12+ messages in thread