A few misc fixes Mentor is carrying
cover A few misc fixes Mentor is carrying
From: Christopher Larson <[email protected]>
The following changes since commit d68a86d87aa017dd0fecb0f626d22711efefcd3f:
dnf: remove systemd units in nativesdk builds (2017-03-28 10:34:26 +0100)
are available in the git repository at:
[email protected]:kergoth/openembedded-core.git misc-fixes
for you to fetch changes up to 571fe26dcf1d704cc97e834b19adb51b782b4cca:
systemd-boot: write startup.nsh (2017-03-28 21:12:18 +0500)
----------------------------------------------------------------
Abdur Rehman (1):
update_gio_module_cache: fix host user contamination
Christopher Larson (2):
sysroot-relativelinks: also consider links to dirs on the host
systemd-boot: write startup.nsh
meta/classes/systemd-boot.bbclass | 2 ++ scripts/postinst-intercepts/update_gio_module_cache | 2 ++ scripts/sysroot-relativelinks.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
2.11.1
PATCH 1/3 update_gio_module_cache: fix host user contamination
From: Abdur Rehman <[email protected]>
update_gio_module_cache intercept creates file:
$D${libdir}/gio/modules/giomodule.cache
Change ownership of this file to root:root to avoid user contamination by host.
--- scripts/postinst-intercepts/update_gio_module_cache | 2 ++ 1 file changed, 2 insertions(+)
scripts/postinst-intercepts/update_gio_module_cache +2 -0
@@ -5,3 +5,5 @@ set -e PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \ $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/ +chown root:root $D${libdir}/gio/modules/giomodule.cache +
Signature · 1 line
2.11.1
Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
Quoted 27 lines · Christopher Larson
From: Abdur Rehman <[email protected]>
update_gio_module_cacheintercept creates file:
$D${libdir}/gio/modules/giomodule.cacheChange ownership of this file to root:root to avoid user contamination by host.
Signed-off-by Abdur Rehman <[email protected]>Signed-off-by Christopher Larson <[email protected]>--- scripts/postinst-intercepts/update_gio_module_cache | 2 ++ 1 file changed, 2 insertions(+)scripts/postinst-intercepts/update_gio_module_cache +2
-1@@ -5,3 +5,5 @@ set -e PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \ $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/ +chown root:root $D${libdir}/gio/modules/giomodule.cache + --2.11.1
Quoted 5 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Hello,
There must be something wrong with this patch.
After fresh pull of an hour ago I git:
andrea@ThinkPad-T520:/oe/oe-core/build$ bitbake core-image-base Loading cache: 100% |############################################| Time: 0:00:00 Loaded 2095 entries from dependency cache. NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.33.2" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "ubuntu-16.04" TARGET_SYS = "arm-oe-linux-gnueabi" MACHINE = "c7x0" DISTRO = "nodistro" DISTRO_VERSION = "nodistro.0" TUNE_FEATURES = "arm armv5 thumb dsp" TARGET_FPU = "soft" meta = "master:c187326afcf1e9d781c1bd0923e1362a6f50f613" meta-handheld = "master:f88f5bc546ec18de232a91dc1c8185ad242c45f7"
meta-oe
meta-initramfs = "master:225e64d95bc41077782815f3dceb6f2d1a42b167"
Initialising tasks: 100% |#######################################| Time: 0:00:08
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: core-image-base-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed (exit code: 1)! See log for details! (Output: b'')
WARNING: core-image-base-1.0-r0 do_rootfs: The postinstalls for the following packages will be postponed for first boot: libglib-2.0-0
NOTE: Tasks Summary: Attempted 3440 tasks of which 3427 didn't need to be rerun and all succeeded.
Cheers
Andrea
Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
Quoted 64 lines · Andrea Adami
Quoted 8 lines · Christopher Larson
From: Abdur Rehman <[email protected]>
update_gio_module_cacheintercept creates file:
$D${libdir}/gio/modules/giomodule.cacheChange ownership of this file to root:root to avoid user contamination by host.
Review
Quoted 7 lines
Signed-off-by Abdur Rehman <[email protected]>Signed-off-by Christopher Larson <[email protected]>--- scripts/postinst-intercepts/update_gio_module_cache | 2 ++ 1 file changed, 2 insertions(+)(quoted diff) +0
-0b/scripts/postinst-intercepts/update_gio_module_cache
scripts/postinst-intercepts/update_gio_module_cache set -e · line 5
Quoted 5 lines
index
fe468092cf..92092f2144100644scripts/postinst-intercepts/update_gio_module_cache +0
-0@@ -5,3 +5,5 @@ set -e PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir}\
scripts/postinst-intercepts/update_gio_module_cache set -e · line 6
Quoted 1 line
scripts/postinst-intercepts/update_gio_module_cache +0
-0$D${libexecdir}/${binprefix}gio-querymodules$D${libdir}/gio/modules/
Quoted 11 lines
scripts/postinst-intercepts/update_gio_module_cache +2
-1+chown root:root $D${libdir}/gio/modules/giomodule.cache + --2.11.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-coreHello,
There must be something wrong with this patch.
After fresh pull of an hour ago I git:andrea@ThinkPad-T520:/oe/oe-core/build$ bitbake core-image-base Loading cache: 100% |############################################| Time: 0:00:00 Loaded 2095 entries from dependency cache. NOTE: Resolving any missing task queue dependenciesBuild Configuration:
BB_VERSION = "1.33.2" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "ubuntu-16.04" TARGET_SYS = "arm-oe-linux-gnueabi" MACHINE = "c7x0" DISTRO = "nodistro" DISTRO_VERSION = "nodistro.0" TUNE_FEATURES = "arm armv5 thumb dsp" TARGET_FPU = "soft" meta = "master:c187326afcf1e9d781c1bd0923e1362a6f50f613" meta-handheld = "master:f88f5bc546ec18de232a91dc1c8185ad242c45f7"meta-oe
meta-initramfs = "master:225e64d95bc41077782815f3dceb6f2d1a42b167"
Quoted 11 lines
Initialising tasks: 100% |#######################################| Time:
0:00:08
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: core-image-base-1.0-r0do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed (exit code: 1)! See log for details! (Output: b'')
WARNING: core-image-base-1.0-r0do_rootfs: The postinstalls for the following packages will be postponed for first boot: libglib-2.0-0
NOTE: Tasks Summary: Attempted 3440 tasks of which 3427 didn't need to be rerun and all succeeded.
Odd, we’ve been running with this applied for ages. Is there anything useful in do_rootfs? I’ll attempt to repro here. Thanks, and sorry for the hassle.
Signature · 4 lines
Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics
Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
Quoted 81 lines · Christopher Larson
Quoted 65 lines · Andrea Adami
Quoted 30 lines · Christopher Larson
From: Abdur Rehman <[email protected]>
update_gio_module_cacheintercept creates file:
$D${libdir}/gio/modules/giomodule.cacheChange ownership of this file to root:root to avoid user contamination by host.
Signed-off-by Abdur Rehman <[email protected]>Signed-off-by Christopher Larson <[email protected]>--- scripts/postinst-intercepts/update_gio_module_cache | 2 ++ 1 file changed, 2 insertions(+)scripts/postinst-intercepts/update_gio_module_cache +0
-0@@ -5,3 +5,5 @@ set -e PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \ $D${libexecdir}/${binprefix}gio-querymodules$D${libdir}/gio/modules/
scripts/postinst-intercepts/update_gio_module_cache +2
-1+chown root:root $D${libdir}/gio/modules/giomodule.cache + --2.11.1
Quoted 5 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-coreHello,
There must be something wrong with this patch.
After fresh pull of an hour ago I git:andrea@ThinkPad-T520:/oe/oe-core/build$ bitbake core-image-base Loading cache: 100% |############################################| Time: 0:00:00 Loaded 2095 entries from dependency cache. NOTE: Resolving any missing task queue dependenciesBuild Configuration:
BB_VERSION = "1.33.2" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "ubuntu-16.04" TARGET_SYS = "arm-oe-linux-gnueabi" MACHINE = "c7x0" DISTRO = "nodistro" DISTRO_VERSION = "nodistro.0" TUNE_FEATURES = "arm armv5 thumb dsp" TARGET_FPU = "soft" meta = "master:c187326afcf1e9d781c1bd0923e1362a6f50f613" meta-handheld = "master:f88f5bc546ec18de232a91dc1c8185ad242c45f7"meta-oe
meta-initramfs = "master:225e64d95bc41077782815f3dceb6f2d1a42b167"Quoted 11 lines
Initialising tasks: 100% |#######################################| Time:
0:00:08
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: core-image-base-1.0-r0do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed (exit code: 1)! See log for details! (Output: b'')
WARNING: core-image-base-1.0-r0do_rootfs: The postinstalls for the following packages will be postponed for first boot: libglib-2.0-0
NOTE: Tasks Summary: Attempted 3440 tasks of which 3427 didn't need to be rerun and all succeeded.
Quoted 3 lines
Odd, we’ve been running with this applied for ages. Is there anything useful in
do_rootfs? I’ll attempt to repro here. Thanks, and sorry for the hassle. --
There is just a laconical message:
NOTE: Running intercept scripts:
NOTE: > Executing update_gio_module_cache intercept ...
chown: cannot access '/tmp/build/tmp-glibc/work/c7x0-oe-linux-gnueabi/core-image-base/1.0-r0/rootfs/usr/lib/gio/modules/giomodule.cache':
No such file or directory
Here the permissions:
andrea@ThinkPad-T520:/tmp/build/tmp-glibc/work/c7x0-oe-linux-gnueabi/core-image-base/1.0-r0/rootfs/usr/lib/gio$ ls -al
total 0
drwxr-xr-x 3 andrea andrea 60 mar 29 21:33 .
drwxr-xr-x 6 andrea andrea 1660 mar 29 22:51 ..
drwxr-xr-x 2 andrea andrea 40 mar 29 21:33 modules
Cheers
Andrea
Quoted 4 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
Quoted 100 lines · Andrea Adami
Quoted 47 lines · Christopher Larson
Quoted 44 lines · Andrea Adami
Quoted 30 lines · Christopher Larson
From: Abdur Rehman <[email protected]>
update_gio_module_cacheintercept creates file:
$D${libdir}/gio/modules/giomodule.cacheChange ownership of this file to root:root to avoid user contamination by host.
Signed-off-by Abdur Rehman <[email protected]>Signed-off-by Christopher Larson <[email protected]>--- scripts/postinst-intercepts/update_gio_module_cache | 2 ++ 1 file changed, 2 insertions(+)scripts/postinst-intercepts/update_gio_module_cache +0
-0@@ -5,3 +5,5 @@ set -e PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \ $D${libexecdir}/${binprefix}gio-querymodules$D${libdir}/gio/modules/
scripts/postinst-intercepts/update_gio_module_cache +2
-1+chown root:root $D${libdir}/gio/modules/giomodule.cache + --2.11.1
Quoted 5 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-coreHello,
There must be something wrong with this patch.
After fresh pull of an hour ago I git:Quoted 2 lines
Quoted 2 lines
andrea@ThinkPad-T520:/oe/oe-core/build$ bitbake core-image-base Loading cache: 100% |############################################|Time:
Quoted 19 lines
Quoted 19 lines
0:00:00
Loaded 2095 entries from dependency cache.
NOTE: Resolving any missing task queue dependenciesBuild Configuration:
BB_VERSION = "1.33.2" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "ubuntu-16.04" TARGET_SYS = "arm-oe-linux-gnueabi" MACHINE = "c7x0" DISTRO = "nodistro" DISTRO_VERSION = "nodistro.0" TUNE_FEATURES = "arm armv5 thumb dsp" TARGET_FPU = "soft" meta = "master:c187326afcf1e9d781c1bd0923e1362a6f50f613" meta-handheld = "master:f88f5bc546ec18de232a91dc1c8185ad242c45f7"meta-oe
meta-initramfs = "master:225e64d95bc41077782815f3dceb6f2d1a42b167"Quoted 1 line
Quoted 1 line
Initialising tasks: 100% |#######################################|
Time:
Quoted 12 lines
Quoted 10 lines
0:00:08
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: core-image-base-1.0-r0do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed (exit code: 1)! See log for details! (Output: b'')
WARNING: core-image-base-1.0-r0do_rootfs: The postinstalls for the following packages will be postponed for first boot: libglib-2.0-0
NOTE: Tasks Summary: Attempted 3440 tasks of which 3427 didn't need to be rerun and all succeeded.Quoted 1 line
Odd, we’ve been running with this applied for ages. Is there anything
useful
Quoted 1 line
in
do_rootfs? I’ll attempt to repro here. Thanks, and sorry for thehassle.
Quoted 1 line
--
There is just a laconical message:
NOTE: Running intercept scripts:
NOTE: > Executingupdate_gio_module_cacheintercept ...
chown: cannot access '/tmp/build/tmp-glibc/work/c7x0-oe-linux-gnueabi/core-image-base/1.0-r0/rootfs/usr/lib/gio/modules/giomodule.cache':
No such file or directory
Quoted 9 lines
Here the permissions:
andrea@ThinkPad-T520:/tmp/build/tmp-glibc/work/c7x0-oe- linux-gnueabi/core-image-base/1.0-r0/rootfs/usr/lib/gio$ ls -al
total 0
drwxr-xr-x 3 andrea andrea 60 mar 29 21:33 .
drwxr-xr-x 6 andrea andrea 1660 mar 29 22:51 ..
drwxr-xr-x 2 andrea andrea 40 mar 29 21:33 modules
Can you check if usr/lib/gio/modules/giomodule.cache really exists or not? And if it does not, what the gio-querymodules call looks like in temp/run.do_rootfs?
Jussi
Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
In reply to Christopher LarsonFrom: [email protected] [mailto:[email protected]] On Behalf Of Christopher Larson
Sent: den 29 mars 2017 22:40
To: Andrea Adami
Cc: openembedded-core
Subject: Re: [OE-core] [PATCH 1/3] update_gio_module_cache: fix host user contamination
On Wed, Mar 29, 2017 at 1:33 PM, Andrea Adami <[email protected]<mailto:[email protected]>> wrote:
Quoted 27 lines · On Tue, Mar 28, 2017 at 6:14 PM, Christopher Larson…
From: Abdur Rehman <[email protected]<mailto:[email protected]>>
update_gio_module_cacheintercept creates file:
$D${libdir}/gio/modules/giomodule.cacheChange ownership of this file to root:root to avoid user contamination by host.
--- scripts/postinst-intercepts/update_gio_module_cache | 2 ++ 1 file changed, 2 insertions(+)scripts/postinst-intercepts/update_gio_module_cache +2
-1@@ -5,3 +5,5 @@ set -e PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \ $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/ +chown root:root $D${libdir}/gio/modules/giomodule.cache + --2.11.1
Quoted 5 lines
--
_______________________________________________
Openembedded-core mailing list [email protected]<mailto:[email protected]>
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Hello,
There must be something wrong with this patch.
After fresh pull of an hour ago I git:
andrea@ThinkPad-T520:/oe/oe-core/build$ bitbake core-image-base Loading cache: 100% |############################################| Time: 0:00:00 Loaded 2095 entries from dependency cache. NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.33.2" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "ubuntu-16.04" TARGET_SYS = "arm-oe-linux-gnueabi" MACHINE = "c7x0" DISTRO = "nodistro" DISTRO_VERSION = "nodistro.0" TUNE_FEATURES = "arm armv5 thumb dsp" TARGET_FPU = "soft" meta = "master:c187326afcf1e9d781c1bd0923e1362a6f50f613" meta-handheld = "master:f88f5bc546ec18de232a91dc1c8185ad242c45f7"
meta-oe
meta-initramfs = "master:225e64d95bc41077782815f3dceb6f2d1a42b167"
Initialising tasks: 100% |#######################################| Time: 0:00:08
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: core-image-base-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed (exit code: 1)! See log for details! (Output: b'')
WARNING: core-image-base-1.0-r0 do_rootfs: The postinstalls for the following packages will be postponed for first boot: libglib-2.0-0
NOTE: Tasks Summary: Attempted 3440 tasks of which 3427 didn't need to be rerun and all succeeded.
Odd, we’ve been running with this applied for ages. Is there anything useful in do_rootfs? I’ll attempt to repro here. Thanks, and sorry for the hassle. --
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
I have sent a patch to fix this. The interesting part from the log was:
chown: cannot access `${WORKDIR}/rootfs/usr/lib/gio/modules/giomodule.cache': No such file or directory
One thing that confuses me though is the “(Output: b'')” part in the warning below:
WARNING: core-image-base-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed (exit code: 1)! See log for details! (Output: b'')
What does that b'' mean?
//Peter
Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
Quoted 6 lines · Peter Kjellerstedt
I have sent a patch to fix this. The interesting part from the log was:
chown: cannot access `${WORKDIR}/rootfs/usr/lib/gio/modules/giomodule.cache': No such file or directory
Does this fix this or workaround the issue? I think the bigger worry is why the cache file doesn't exist when the previous command should have created it?
Cheers,
Richard
Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
In reply to Peter KjellerstedtQuoted 5 lines · Peter Kjellerstedt
One thing that confuses me though is the “(Output: b'')” part in the warning below:
Quoted 7 lines
WARNING: core-image-base-1.0-r0
do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed (exit code: 1)! See log for details! (Output: b'')What does that b'' mean?
A empty binary string - that's what Python 3 uses when it deals with raw bytes instead of text with a known encoding.
Signature · 6 lines
Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
Re: [PATCH 1/3] update_gio_module_cache: fix host user contamination
In reply to Christopher LarsonQuoted 5 lines · Christopher Larson
update_gio_module_cacheintercept creates file:
$D${libdir}/gio/modules/giomodule.cacheChange ownership of this file to root:root to avoid user contamination by host.
I don't understand how one is related to another, can you explain please? What is happening, and why chown is fixing the problem?
Alex
PATCH 2/3 sysroot-relativelinks: also consider links to dirs on the host
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
Dead symlinks, or symlinks to existing files will show up in 'files' of an os.walk, but symlinks to existing directories show up in 'dirs', so we need to consider both.
As one example where this is an issue, the symlink from /usr/lib/ssl/certs was left pointing to /etc/ssl/certs rather than the relative path when the sdk was built on hosts where the latter exists.
--- scripts/sysroot-relativelinks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/sysroot-relativelinks.py +1 -1
@@ -24,7 +24,7 @@ def handlelink(filep, subdir): os.symlink(os.path.relpath(topdir+link, subdir), filep) for subdir, dirs, files in os.walk(topdir): - for f in files: + for f in dirs + files: filep = os.path.join(subdir, f) if os.path.islink(filep): #print("Considering %s" % filep)
Signature · 1 line
2.11.1
PATCH 3/3 systemd-boot: write startup.nsh
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
This aligns with the behavior of grub-efi and gummiboot, and is needed to fix auto-boot of intel-corei7-64 for non-GPLv3 builds.
--- meta/classes/systemd-boot.bbclass | 2 ++ 1 file changed, 2 insertions(+)
meta/classes/systemd-boot.bbclass +2 -0
@@ -37,6 +37,8 @@ efi_populate() { install -d ${DEST}/loader install -d ${DEST}/loader/entries install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE} + EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') + printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_EFI_IMAGE" >${DEST}/startup.nsh install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf for i in ${SYSTEMD_BOOT_ENTRIES}; do install -m 0644 ${i} ${DEST}/loader/entries
Signature · 1 line
2.11.1