[elbe-devel] [PATCH v2 06/12] init: init-elbe.sh.mako: call 'elbe buildrepo' as last thing
Torben Hohn
torben.hohn at linutronix.de
Mon Nov 12 17:43:07 CET 2018
"elbe fetch_initvm_pkgs" is supposed to create package repositories which carry
binaries and sources used in the initvm. cdrom generation will use these
repos to a) speedup the build and b) allow for "offline" initvm.
call "elbe fetch_initvm_pkgs" as the last step during initvm install in
init-elbe.sh
cdrom has to be mounted, because its already unmounted, when init-elbe.sh
is executed. "in-target" can not be used to mount the cdrom, because
it cleans up mounts.
In case of a cdrom build specify "elbe fetch_initvm_pkgs" options:
"--cdrom-device /dev/sr0 --cdrom-mount-path /media/cdrom0"
This triggers a cdrom build.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
Signed-off-by: Manuel Traut <manut at linutronix.de>
Reviewed-by: Manuel Traut <manut at linutronix.de>
---
elbepack/init/init-elbe.sh.mako | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/elbepack/init/init-elbe.sh.mako b/elbepack/init/init-elbe.sh.mako
index b29480dc..e9c9e620 100644
--- a/elbepack/init/init-elbe.sh.mako
+++ b/elbepack/init/init-elbe.sh.mako
@@ -6,6 +6,12 @@
## SPDX-License-Identifier: GPL-3.0-or-later
##
#! /bin/sh
+<%
+elbe_exe = 'elbe'
+
+if opt.devel:
+ elbe_exe = '/var/cache/elbe/devel/elbe'
+%>
# First unset the variables which are set by the debian-installer
unset DEBCONF_REDIR DEBCONF_OLD_FD_BASE MENU
@@ -36,4 +42,15 @@ cp vmlinuz /buildenv/var/cache/elbe/installer
sed -i s%/usr/bin/elbe%/var/cache/elbe/devel/elbe% /buildenv/lib/systemd/system/elbe-daemon.service
% endif
+# since elbe fetch_initvm_pkgs generates repo keys,
+# we need entropy in the target
+
+in-target haveged
+
+% if prj.has("mirror/cdrom"):
+ in-target ${elbe_exe} fetch_initvm_pkgs --cdrom-device /dev/sr0 --cdrom-mount-path /media/cdrom0 /var/cache/elbe/source.xml
+% else:
+ in-target ${elbe_exe} fetch_initvm_pkgs /var/cache/elbe/source.xml
+% endif
+
exit 0
--
2.11.0
More information about the elbe-devel
mailing list