Some security enhancing packages can cause our initrd to be not readable
by a normal user. So we need to copy with sudo.
Also regular cp would destroy ownership and other attributes of files,
possibly creating problems in the future.
Signed-off-by: Henning Schild <henning...@siemens.com>
---
meta/classes/ext4-img.bbclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass
index 65d4c11..6dc2039 100644
--- a/meta/classes/ext4-img.bbclass
+++ b/meta/classes/ext4-img.bbclass
@@ -21,16 +21,16 @@ do_ext4_image() {
mkdir -p ${WORKDIR}/mnt
sudo mount -o loop ${EXT4_IMAGE_FILE} ${WORKDIR}/mnt
- sudo cp -r ${S}/* ${WORKDIR}/mnt
+ sudo cp -a ${S}/* ${WORKDIR}/mnt
sudo umount ${WORKDIR}/mnt
rm -r ${WORKDIR}/mnt
if [ -n "${KERNEL_IMAGE}" ]; then
- cp ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
+ sudo cp -a ${S}/boot/${KERNEL_IMAGE} ${DEPLOY_DIR_IMAGE}
fi
if [ -n "${INITRD_IMAGE}" ]; then
- cp ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
+ sudo cp -a ${S}/boot/${INITRD_IMAGE} ${DEPLOY_DIR_IMAGE}
fi
}
--
2.13.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/5e98880f61dba959ada0c9bc8feca65b0a5760e5.1501582237.git.henning.schild%40siemens.com.
For more options, visit https://groups.google.com/d/optout.
Signed-off-by: Henning Schild <henning...@siemens.com>
---
.../doc/bitbake-user-manual/bitbake-user-manual-execution.xml | 2 +-
meta-isar/recipes-core/images/isar-image-base.bb | 8 ++++----
meta/classes/isar-base.bbclass | 2 --
meta/recipes-devtools/buildchroot/buildchroot.bb | 10 +++++-----
4 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
index ec75893..b9aafd1 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
@@ -765,7 +765,7 @@
the concept:
<literallayout class='monospaced'>
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
- SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
+ SSTATE_DIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
--
2.13.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/5ac96edda9115c2d1e7fd7b8c9aec563fbd07c05.1501582237.git.henning.schild%40siemens.com.
--
2.13.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/87b84dd21dce51befba81e7c2214fd62d7817899.1501582237.git.henning.schild%40siemens.com.
# Setup our default hash policy
BB_SIGNATURE_HANDLER ?= "noop"
--
2.13.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/0450af95b41e6b31b881b961e21d424df34e10ba.1501582237.git.henning.schild%40siemens.com.
Signed-off-by: Henning Schild <henning...@siemens.com>
---
meta/classes/dpkg.bbclass | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 3d7aafb..1d0132b 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -10,9 +10,7 @@ do_unpack[deptask] = "do_build"
# Each package should have its own unique build folder, so use
# recipe name as identifier
PP = "/home/builder/${PN}"
-BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
-
-do_fetch[dirs] = "${DL_DIR}"
+WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
# Fetch package from the source link
python do_fetch() {
@@ -28,10 +26,10 @@ python do_fetch() {
}
addtask fetch before do_build
+do_fetch[dirs] = "${DL_DIR}"
-do_unpack[dirs] = "${BUILDROOT}"
do_unpack[stamp-extra-info] = "${DISTRO}"
-S ?= "${BUILDROOT}"
+S ?= "${WORKDIR}"
# Unpack package and put it into working directory in buildchroot
python do_unpack() {
@@ -39,16 +37,15 @@ python do_unpack() {
if len(src_uri) == 0:
return
- rootdir = d.getVar('BUILDROOT', True)
-
try:
fetcher = bb.fetch2.Fetch(src_uri, d)
- fetcher.unpack(rootdir)
+ fetcher.unpack(d.getVar('WORKDIR', True))
except bb.fetch2.BBFetchException as e:
raise bb.build.FuncFailed(e)
}
addtask unpack after do_fetch before do_build
+do_unpack[dirs] = "${WORKDIR}"
do_build[stamp-extra-info] = "${DISTRO}"
@@ -62,7 +59,7 @@ do_install[stamp-extra-info] = "${MACHINE}"
# Install package to dedicated deploy directory
do_install() {
install -d ${DEPLOY_DIR_DEB}
- install -m 755 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
+ install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
}
addtask do_install after do_build
--
2.13.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/048e88d5072fc038c8bd6207334e9967d5a29e0c.1501582237.git.henning.schild%40siemens.com.
--
2.13.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/ef97842f18e67eb7140790542c0d88a04490421f.1501582237.git.henning.schild%40siemens.com.
build is bitbakes default target and queing tasks behind it is asking
for trouble
Introduce do_compile where we "build" the debian packages.
Signed-off-by: Henning Schild <henning...@siemens.com>
---
meta/classes/dpkg.bbclass | 8 ++++----
meta/classes/image.bbclass | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 4228b0d..71c7122 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -13,19 +13,19 @@ PP = "/home/builder/${PN}"
WORKDIR = "${BUILDCHROOT_DIR}/${PP}"
S ?= "${WORKDIR}"
-do_build[stamp-extra-info] = "${DISTRO}"
-
# Build package from sources using build script
-do_build() {
+do_compile() {
sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
}
+addtask compile after do_unpack before do_install
+do_compile[stamp-extra-info] = "${DISTRO}"
# Install package to dedicated deploy directory
do_install() {
install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
}
-addtask install after do_build
+addtask install after do_compile before do_build
do_install[dirs] = "${DEPLOY_DIR_DEB}"
do_install[stamp-extra-info] = "${MACHINE}"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 3e4877c..8db3352 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -27,4 +27,4 @@ do_populate() {
}
addtask populate before do_build
-do_populate[deptask] = "do_install"
+do_populate[deptask] = "do_build"
--
2.13.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/32e4ef6d06af30a76fdb645a4108f817301d3007.1501582237.git.henning.schild%40siemens.com.
install will be used by later patches to actually populate debian
packages
Signed-off-by: Henning Schild <henning...@siemens.com>
---
meta/classes/dpkg.bbclass | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 71c7122..2a1b85c 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -18,14 +18,14 @@ do_compile() {
sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
}
-addtask compile after do_unpack before do_install
+addtask compile after do_unpack before do_install_package
do_compile[stamp-extra-info] = "${DISTRO}"
# Install package to dedicated deploy directory
-do_install() {
+do_install_package() {
install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/
}
-addtask install after do_compile before do_build
-do_install[dirs] = "${DEPLOY_DIR_DEB}"
-do_install[stamp-extra-info] = "${MACHINE}"
+addtask install_package after do_compile before do_build
+do_install_package[dirs] = "${DEPLOY_DIR_DEB}"
+do_install_package[stamp-extra-info] = "${MACHINE}"
--
2.13.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/448d9587745e4ce887e8f0768ddb3bbce5526751.1501582237.git.henning.schild%40siemens.com.
Signed-off-by: Henning Schild <henning...@siemens.com>
---
meta-isar/recipes-app/hello/hello.bb | 2 +-
meta/classes/{dpkg.bbclass => dpkg-src.bbclass} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename meta/classes/{dpkg.bbclass => dpkg-src.bbclass} (100%)
diff --git a/meta-isar/recipes-app/hello/hello.bb b/meta-isar/recipes-app/hello/hello.bb
index 56424fb..5c5d714 100644
--- a/meta-isar/recipes-app/hello/hello.bb
+++ b/meta-isar/recipes-app/hello/hello.bb
@@ -15,4 +15,4 @@ SRCREV = "ad7065ecc4840cc436bfcdac427386dbba4ea719"
SRC_DIR = "git"
-inherit dpkg
+inherit dpkg-src
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg-src.bbclass
similarity index 100%
rename from meta/classes/dpkg.bbclass
rename to meta/classes/dpkg-src.bbclass
--
2.13.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/f3b8fd43828bf124f4125fb0ba4853cb8a795571.1501582237.git.henning.schild%40siemens.com.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/1411c20e-fff4-cef4-9e15-460eebc14dab%40siemens.com.
--
2.13.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/7c03d914f33ef0563cb7af2951f56e8cd5fd20bc.1501760818.git.henning.schild%40siemens.com.
For more options, visit https://groups.google.com/d/optout.
Am Mon, 7 Aug 2017 22:40:55 +0300
schrieb Alexander Smirnov <alex.bluesman.smirnov@gmail.com>:
> > send an email to isar-users+unsubscribe@googlegroups.com.
> > To post to this group, send email to isar-...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/
> > msgid/isar-users/7c03d914f33ef0563cb7af2951f56e8cd5fd20bc.1501760818.git.