Re: [OE-core] [PATCH] linux-firmware: make i.MX SDMA split complete
Hi, On 11/10/17 17:29, Otavio Salvador wrote: Hello Mikko, On Tue, Oct 10, 2017 at 9:27 AM, Mikko Ylinen <mikko.yli...@linux.intel.com> wrote: The commit to split i.MX SDMA firmware blobs in their own packages was not complete and results in a failure when trying to install full linux-firmware: * Solver encountered 1 problem(s): * Problem 1/1: * - nothing provides linux-firmware-imx-sdma-license needed * by linux-firmware-1:0.0+git0+a61ac5cf83-r0.all * * Solution 1: * - do not ask to install a package providing linux-firmware Make the split complete by installing the license in ${PN}-imx-sdma-license and have the blob packages depend on it. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> First, thanks for fixing my mistake ... I will try to find what I did wrong here as I did test it. No problem. I'm guessing you did not install linux-firmware (perhaps just the newly created packages only). The recipe builds fine but fails to install resulting .ipk/.rpm. -- Mikko -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] staging.bbclass: handle postinst-useradd-* fixmes
After 02457ef7f600ce954874e2d11e74b1c6daaa3bfc, PSEUDO for postinst-useradd-* scripts get to use only one PSEUDO_LOCALSTATEDIR which is set under recipes ${WORKDIR}. When the those scripts are run in a clean build environment that is built from the sstate (populate_sysroot_setscene run for postinst-useradd-* providers), pseudo fails to run because it cannot access the PSEUDO_LOCALSTATEDIR (recipe ${WORKDIR}s do not exist). This triggers a sysroot staging error. Previously, the PSEUDO_LOCALSTATEDIR setting in useradd.bbclass worked because the RSS sstate/staging logic automagically processed ${STAGING_DIR_TARGET} in postinst-useradd-* scripts to point under the sysroot being built. The fix uses the same fixme processing by adding PSEUDO_LOCALSTATEDIR variable to it. Furthermore, LOGFIFO is added to be able to use the logging fifo of the recipe that actually runs postinst-useradd-*. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/classes/staging.bbclass | 2 +- meta/classes/useradd.bbclass | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index d21e198ae8..c479bd93ea 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass @@ -167,7 +167,7 @@ def staging_processfixme(fixme, target, recipesysroot, recipesysrootnative, d): if not fixme: return cmd = "sed -e 's:^[^/]*/:%s/:g' %s | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (target, " ".join(fixme), recipesysroot, recipesysrootnative) -for fixmevar in ['COMPONENTS_DIR', 'HOSTTOOLS_DIR', 'PKGDATA_DIR']: +for fixmevar in ['COMPONENTS_DIR', 'HOSTTOOLS_DIR', 'PKGDATA_DIR', 'PSEUDO_LOCALSTATEDIR', 'LOGFIFO']: fixme_path = d.getVar(fixmevar) cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path) bb.debug(2, cmd) diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index 686e5fbefe..c9103cbe6a 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass @@ -133,9 +133,10 @@ useradd_sysroot () { } # The export of PSEUDO in useradd_sysroot() above contains references to -# ${COMPONENTS_DIR}. These need to be handled when restoring +# ${COMPONENTS_DIR} and ${PSEUDO_LOCALSTATEDIR}. Additionally, the logging +# shell functions use ${LOGFIFO}. These need to be handled when restoring # postinst-useradd-${PN} from the sstate cache. -EXTRA_STAGING_FIXMES += "COMPONENTS_DIR" +EXTRA_STAGING_FIXMES += "COMPONENTS_DIR PSEUDO_LOCALSTATEDIR LOGFIFO" python useradd_sysroot_sstate () { scriptfile = None -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/2] package_manager: rpm: improve logging
To be able to better debug remove() behaviour, add more logging to rpm calls via bb.note(). The change also makes remove() logging more consistent with other package managers' remove() (e.g., opkg). Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/lib/oe/package_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 994e462..eb0824e 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py @@ -614,10 +614,12 @@ class RpmPM(PackageManager): self._invoke_dnf(["remove"] + pkgs) else: cmd = bb.utils.which(os.getenv('PATH'), "rpm") -args = ["-e", "--nodeps", "--root=%s" %self.target_rootfs] +args = ["-e", "-v", "--nodeps", "--root=%s" %self.target_rootfs] try: +bb.note("Running %s" % ' '.join([cmd] + args + pkgs)) output = subprocess.check_output([cmd] + args + pkgs, stderr=subprocess.STDOUT).decode("utf-8") +bb.note(output) except subprocess.CalledProcessError as e: bb.fatal("Could not invoke rpm. Command " "'%s' returned %d:\n%s" % (' '.join([cmd] + args + pkgs), e.returncode, e.output.decode("utf-8"))) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/2] rootfs.py: remove update-alternatives correctly
With "read-only-rootfs" in IMAGE_FEATURES, packages in ROOTFS_RO_UNNEEDED are removed when building the rootfs. The list of packages to remove is passed to the package manager and the list is sorted so that update-alternatives provider is the last entry. This is with the assumption that the last entry on the list/command line is removed last. However, it turns out rpm does not care about "last on the command line" and update-alternatives provider is removed before other the packages get to run their %preun scripts for update-alternatives. This leaves broken alternative symlinks in rootfs. The fix is to first remove all but update-alternatives provider and after that update-alternatives provider in its own remove() call. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/lib/oe/rootfs.py | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 9d4727e..5f62015 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -261,15 +261,22 @@ class Rootfs(object, metaclass=ABCMeta): # Remove components that we don't need if it's a read-only rootfs unneeded_pkgs = self.d.getVar("ROOTFS_RO_UNNEEDED").split() pkgs_installed = image_list_installed_packages(self.d) -# Make sure update-alternatives is last on the command line, so -# that it is removed last. This makes sure that its database is -# available while uninstalling packages, allowing alternative -# symlinks of packages to be uninstalled to be managed correctly. +# Make sure update-alternatives is removed last. This is +# because its database has to available while uninstalling +# other packages, allowing alternative symlinks of packages +# to be uninstalled or to be managed correctly otherwise. provider = self.d.getVar("VIRTUAL-RUNTIME_update-alternatives") pkgs_to_remove = sorted([pkg for pkg in pkgs_installed if pkg in unneeded_pkgs], key=lambda x: x == provider) +# update-alternatives provider is removed in its own remove() +# call because all package managers do not guarantee the packages +# are removed in the order they given in the list (which is +# passed to the command line). The sorting done earlier is +# utilized to implement the 2-stage removal. +if len(pkgs_to_remove) > 1: +self.pm.remove(pkgs_to_remove[:-1], False) if len(pkgs_to_remove) > 0: -self.pm.remove(pkgs_to_remove, False) +self.pm.remove([pkgs_to_remove[-1]], False) if delayed_postinsts: self._save_postinsts() -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2 0/2] remove update-alternatives correctly
v2: move the fix to rootfs.py and implement 2-stage removal based on the feedback. split the fix and the logging improvements in two commits. Mikko Ylinen (2): rootfs.py: remove update-alternatives correctly package_manager: rpm: improve logging meta/lib/oe/package_manager.py | 4 +++- meta/lib/oe/rootfs.py | 17 - 2 files changed, 15 insertions(+), 6 deletions(-) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] package_manager: rpm: remove update-alternatives correctly
With "read-only-rootfs" in IMAGE_FEATURES, packages in ROOTFS_RO_UNNEEDED are removed when building the rootfs. rootfs.py has a note about some of the assumptions to that removal: "Make sure update-alternatives is last on the command line, so that it is removed last. This makes sure that its database is available while uninstalling packages, allowing alternative symlinks of packages to be uninstalled to be managed correctly." However, it turns out rpm does not care about "last on the command line" and update-alternatives provider is removed before other the packages get to run their %preun scripts for update-alternatives. This leaves broken alternative symlinks in rootfs. The fix is to remove packages one by one (reversed command line list did not work either) and process update-alternatives provider last. And while we're at it, make logging more verbose to better see what's happening (and to get it consistent with opkg's remove() logging). Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/lib/oe/package_manager.py | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 994e462..c122902 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py @@ -614,13 +614,16 @@ class RpmPM(PackageManager): self._invoke_dnf(["remove"] + pkgs) else: cmd = bb.utils.which(os.getenv('PATH'), "rpm") -args = ["-e", "--nodeps", "--root=%s" %self.target_rootfs] +args = ["-e", "-v", "--nodeps", "--root=%s" %self.target_rootfs] -try: -output = subprocess.check_output([cmd] + args + pkgs, stderr=subprocess.STDOUT).decode("utf-8") -except subprocess.CalledProcessError as e: -bb.fatal("Could not invoke rpm. Command " - "'%s' returned %d:\n%s" % (' '.join([cmd] + args + pkgs), e.returncode, e.output.decode("utf-8"))) +for pkg in pkgs: +try: +bb.note("Running %s" % ' '.join([cmd] + args + [pkg])) +output = subprocess.check_output([cmd] + args + [pkg], stderr=subprocess.STDOUT).decode("utf-8") +bb.note(output) +except subprocess.CalledProcessError as e: +bb.fatal("Could not invoke rpm. Command " + "'%s' returned %d:\n%s" % (' '.join([cmd] + args + [pkg]), e.returncode, e.output.decode("utf-8"))) def upgrade(self): self._prepare_pkg_transaction() -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2] sanity.bbclass: fix AttributeError in mirror format checks
mirrors is a list after split() and results in: AttributeError: 'list' object has no attribute 'strip' when the 'mirror values are pairs' check fails. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- v2: drop redundant .strip() because it's guaranteed str(mirrors) does not have leading or trailing spaces. meta/classes/sanity.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index e8064ac483..9e0f57ddfe 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -839,7 +839,7 @@ def check_sanity_everybuild(status, d): # Split into pairs if len(mirrors) % 2 != 0: -bb.warn('Invalid mirror variable value for %s: %s, should contain paired members.' % (mirror_var, mirrors.strip())) +bb.warn('Invalid mirror variable value for %s: %s, should contain paired members.' % (mirror_var, str(mirrors))) continue mirrors = list(zip(*[iter(mirrors)]*2)) -- 2.13.2 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] sanity.bbclass: fix AttributeError in mirror format checks
mirrors is a list after split() and results in: AttributeError: 'list' object has no attribute 'strip' when the 'mirror values are pairs' check fails. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/classes/sanity.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index e8064ac483..1f74026e13 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -839,7 +839,7 @@ def check_sanity_everybuild(status, d): # Split into pairs if len(mirrors) % 2 != 0: -bb.warn('Invalid mirror variable value for %s: %s, should contain paired members.' % (mirror_var, mirrors.strip())) +bb.warn('Invalid mirror variable value for %s: %s, should contain paired members.' % (mirror_var, str(mirrors).strip())) continue mirrors = list(zip(*[iter(mirrors)]*2)) -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] runqemu: change terminal settings for valid tty's
runqemu uses stty to change terminal settings to give users better control to qemu. However, stty does not work when runqemu is run directly or indirectly via oe-selftest in a Docker container (presumably some problems with Docker's pseudo-tty implementation). The error reported is: stty: 'standard input': Inappropriate ioctl for device As runqemu recently moved to subprocess.check_call() for stty calls we now get thrown an error and all runqemu runs fail. sys.stdin.isatty() does proper job in detecting if the stty calls can work so we use that check before running the stty subprocess operations. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- scripts/runqemu | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/runqemu b/scripts/runqemu index 311fbebdf4..26328e5b51 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -955,8 +955,8 @@ class BaseConfig(object): def setup_network(self): if self.get('QB_NET') == 'none': return -cmd = "stty -g" -self.saved_stty = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8') +if sys.stdin.isatty(): +self.saved_stty = subprocess.check_output("stty -g", shell=True).decode('utf-8') self.network_device = self.get('QB_NETWORK_DEVICE') or self.network_device if self.slirp_enabled: self.setup_slirp() @@ -1096,9 +1096,9 @@ class BaseConfig(object): self.qemu_opt += " -snapshot" if self.serialstdio: -logger.info("Interrupt character is '^]'") -cmd = "stty intr ^]" -subprocess.check_call(cmd, shell=True) +if sys.stdin.isatty(): +subprocess.check_call("stty intr ^]", shell=True) +logger.info("Interrupt character is '^]'") first_serial = "" if not re.search("-nographic", self.qemu_opt): -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] archiver: preserve sysroot paths in configured mode
On 06/06/17 18:03, Ross Burton wrote: do_ar_configured alters WORKDIR but also expects to be able to run do_configure, so forcibly expand the paths to the sysroots as otherwise they'll point to a non-existant directory in the temporary WORKDIR. [ YOCTO #11584 ] This patch is not enough because the problem is in do_unpack_and_patch which is shared by most archiver modes. This patch fails, e.g., with "original + diff" https://patchwork.openembedded.org/series/7068/ -- Mikko -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] archiver.bbclass: adapt do_unpack_and_patch to RSS
do_unpack_and_patch was not correctly run until recently ("archiver.bbclass: various fixes for original+diff mode") but with the fix applied, the errors we get indicate the function is not adapted to work with recipe specific sysroots. do_unpack_and_patch sets WORKDIR to ARCHIVER_WORKDIR which affects all path settings relative to WORKDIR, inluding the paths to recipes' sysroots. IOW, when do_unpack and do_patch are run, they cannot find the necessary native tools and files located in the sysroot (e.g., quiltrc) because the paths point to ARCHIVER_WORKDIR. Adapt do_unpack_and_patch to RSS by restoring the original STAGING_DIR_NATIVE after WORKDIR is changed to ARCHIVER_WORKDIR. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/classes/archiver.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 37a21fe61b..1319f4df08 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass @@ -315,12 +315,15 @@ python do_unpack_and_patch() { return ar_outdir = d.getVar('ARCHIVER_OUTDIR') ar_workdir = d.getVar('ARCHIVER_WORKDIR') +ar_sysroot_native = d.getVar('STAGING_DIR_NATIVE') pn = d.getVar('PN') # The kernel class functions require it to be on work-shared, so we dont change WORKDIR if not (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source')): # Change the WORKDIR to make do_unpack do_patch run in another dir. d.setVar('WORKDIR', ar_workdir) +# Restore the original path to recipe's native sysroot (it's relative to WORKDIR). +d.setVar('STAGING_DIR_NATIVE', ar_sysroot_native) # The changed 'WORKDIR' also caused 'B' changed, create dir 'B' for the # possibly requiring of the following tasks (such as some recipes's -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v2 2/5] image_types_wic: add do_populate_bootfs task
Hi Ed, On 11/05/17 15:21, Ed Bartosh wrote: +d.setVar("APPEND", "root=PARTUUID=%s" % partuuid) +bb.build.exec_func('build_efi_cfg', d) The rootfs wic allows you to build multiple rootfs'es in the image. With that, it'd be good to be able to set PARTUUIDs for each of the rootfs partitions and so that the bootloader LABELs give the options to boot from those. +} + +addtask do_populate_bootfs after do_image before do_image_wic What if user needed the artifacts on rootfs too. For example IMAGE_ROOTFS could be used as is to prepare sw updates (meta-swupd or ostree). -- Mikko -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] classes/populate_sdk_ext: reset TCLIBCAPPEND to get consistent TMPDIR
populate_sdk_ext sets TMPDIR to a known static value with '/tmp' directory name and that name is hard coded in a few places (e.g., in meta-environment-extsdk.bb that writes the eSDK environment variables). Distros that do not reset TCLIBCAPPEND (poky does) end up getting TMPDIR = /tmp-${TCLIBCAPPEND} via defaultsetup.conf and that breaks the functionality in eSDK that expects everything is in /tmp. To get TMPDIR consistent, we also need to reset TCLIBCAPPEND in populate_sdk_ext.bbclass. Fixes: [YOCTO #11298] Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/classes/populate_sdk_ext.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index db822bf771..21fd122468 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass @@ -114,6 +114,7 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath): f.write('SSTATE_MIRRORS_forcevariable = ""\n') # Ensure TMPDIR is the default so that clean_esdk_builddir() can delete it f.write('TMPDIR_forcevariable = "${TOPDIR}/tmp"\n') +f.write('TCLIBCAPPEND_forcevariable = ""\n') # Drop uninative if the build isn't using it (or else NATIVELSBSTRING will # be different and we won't be able to find our native sstate) if not bb.data.inherits_class('uninative', d): @@ -289,6 +290,7 @@ python copy_buildsystem () { f.write('\n') f.write('TMPDIR = "${TOPDIR}/tmp"\n') +f.write('TCLIBCAPPEND = ""\n') f.write('DL_DIR = "${TOPDIR}/downloads"\n') f.write('INHERIT += "%s"\n' % 'uninative') -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] systemd: check 'efi' in MACHINE_FEATURES
On 30/03/17 19:15, Burton, Ross wrote: On 30 March 2017 at 07:59, Mikko Ylinen <mikko.yli...@linux.intel.com <mailto:mikko.yli...@linux.intel.com>> wrote: I'm fine. Perhaps 'efi' should not be a PACKAGECONFIG at all (and unconditionally disabled here) and the functionality (just bootctl?) is moved in systemd-boot. Thoughts? I'm not fully aware of the details here but this seems like a good idea. Can you prepare a patch? Looks like it's not very easy to build bootctl part of systemd-boot (without re-building the whole systemd there too). Therefore, I'd just: - ${@bb.utils.filter('DISTRO_FEATURES', 'efi pam selinux ldconfig', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam selinux ldconfig', d)} \ and perhaps: -PACKAGECONFIG[efi] = "--enable-efi,--disable-efi" +PACKAGECONFIG[bootctl] = "--enable-efi,--disable-efi" efi/bootctl can then be added in PACKAGECONFIG by those who need bootctl. -- Mikko -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] systemd: check 'efi' in MACHINE_FEATURES
On 30/03/17 02:36, Peter Kjellerstedt wrote: For the record, this is just correcting a regression that was introduced with my change to use bb.utils.filter() where I apparently missed that not all the features were DISTRO_FEATURES… Yes, this was the case. I got a report that 'bootctl' is no longer installed part of systemd. That said, I do agree that it would be preferable to get rid of the machine specific dependency if possible. I'm fine. Perhaps 'efi' should not be a PACKAGECONFIG at all (and unconditionally disabled here) and the functionality (just bootctl?) is moved in systemd-boot. Thoughts? -- Mikko -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] systemd: check 'efi' in MACHINE_FEATURES
The recipe checks 'efi' in DISTRO_FEATURES but it's a machine feature. Fix the check to use MACHINE_FEATURES to determine whether to enable/disable 'efi' PACKAGECONFIG. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/recipes-core/systemd/systemd_232.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/systemd/systemd_232.bb b/meta/recipes-core/systemd/systemd_232.bb index fa6a6a817f..150bb9ea65 100644 --- a/meta/recipes-core/systemd/systemd_232.bb +++ b/meta/recipes-core/systemd/systemd_232.bb @@ -40,7 +40,8 @@ SRC_URI_append_libc-uclibc = "\ SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch" PACKAGECONFIG ??= "xz \ - ${@bb.utils.filter('DISTRO_FEATURES', 'efi pam selinux ldconfig', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam selinux ldconfig', d)} \ + ${@bb.utils.filter('MACHINE_FEATURES', 'efi', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ binfmt \ -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2] bitbake.conf: whitelist socat as non-fatal host tool
oe-git-proxy depends on socat host tool but it's not whitelisted and triggers a 'binary not in PATH' error. Whitelist socat but make it a HOSTTOOLS_NONFATAL since it's not a hard dependency. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/conf/bitbake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 0de8a74c43..d92c5cd0ca 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -469,7 +469,7 @@ HOSTTOOLS += " \ HOSTTOOLS += "ps stty ip ssh scp ping vi" # Link to these if present -HOSTTOOLS_NONFATAL += "ccache pip3 ld.bfd ld.gold gcc-ar gpg sftp nc" +HOSTTOOLS_NONFATAL += "ccache pip3 ld.bfd ld.gold gcc-ar gpg sftp nc socat" CCACHE ??= "" # Disable ccache explicitly if CCACHE is null since gcc may be a symlink -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] bitbake.conf: whitelist socat as non-fatal host tool
oe-git-proxy depends on socat host tool but it's not whitelisted and triggers a 'binary not in PATH' error. Whitelist socat but make it a HOSTTOOLS_NONFATAL since it's not a hard dependency. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/conf/bitbake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index bc115117c9..ea5309462f 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -469,7 +469,7 @@ HOSTTOOLS += " \ HOSTTOOLS += "ps stty ip ssh scp ping vi" # Link to these if present -HOSTTOOLS_NONFATAL += "ccache pip3 ld.bfd ld.gold gcc-ar gpg sftp" +HOSTTOOLS_NONFATAL += "ccache pip3 ld.bfd ld.gold gcc-ar gpg sftp socat" CCACHE ??= "" # Disable ccache explicitly if CCACHE is null since gcc may be a symlink -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] gcc-runtime: Enable libmpx for x86-64
Intel MPX was recently enabled on x86 (_append_x86) but that didn't enable it on x86-64. Explicitly enable libmpx on x86-64 too. Signed-off-by: Mikko Ylinen <mikko.yli...@linux.intel.com> --- meta/recipes-devtools/gcc/gcc-runtime.inc | 7 +++ 1 file changed, 7 insertions(+) diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index a5be491ad3..0dc405c591 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc @@ -25,6 +25,7 @@ RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \ ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \ " RUNTIMETARGET_append_x86 = " libmpx" +RUNTIMETARGET_append_x86-64 = " libmpx" RUNTIMETARGET_remove_libc-musl = "libmpx" # libiberty @@ -146,6 +147,12 @@ PACKAGES_append_x86 = "\ libmpx-staticdev \ " +PACKAGES_append_x86-64 = "\ +libmpx \ +libmpx-dev \ +libmpx-staticdev \ +" + # The base package doesn't exist, so we clear the recommends. RRECOMMENDS_${PN}-dbg = "" -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] useradd-staticids.bbclass: catch missing uid/gid exceptions
The change to get rid of FuncFailed exceptions changed the behavior of how missing uid/gid error are be handled. Instead of catching the exception and handling that via bb.parse.SkipPackage(), a fatal error was called. This won't work with recipes that are unused and therefore do not have UID/GIDs defined. The problem triggers when parsing all recipes (e.g., oe-selftest runs bitbake -p). The right way to handle this is to raise bb.parse.SkipPackage(). This will error correctly once the recipe is needed. Signed-off-by: Mikko Ylinen <mikko.yli...@intel.com> --- meta/classes/useradd-staticids.bbclass | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta/classes/useradd-staticids.bbclass b/meta/classes/useradd-staticids.bbclass index afb580a..4162774 100644 --- a/meta/classes/useradd-staticids.bbclass +++ b/meta/classes/useradd-staticids.bbclass @@ -53,8 +53,7 @@ def update_useradd_static_config(d): def handle_missing_id(id, type, pkg): # For backwards compatibility we accept "1" in addition to "error" if d.getVar('USERADD_ERROR_DYNAMIC', True) == 'error' or d.getVar('USERADD_ERROR_DYNAMIC', True) == '1': -#bb.error("Skipping recipe %s, package %s which adds %sname %s does not have a static ID defined." % (d.getVar('PN', True), pkg, type, id)) -bb.fatal("%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN', True), pkg, type, id)) +raise NotImplementedError("%s - %s: %sname %s does not have a static ID defined. Skipping it." % (d.getVar('PN', True), pkg, type, id)) elif d.getVar('USERADD_ERROR_DYNAMIC', True) == 'warn': bb.warn("%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN', True), pkg, type, id)) @@ -323,7 +322,7 @@ python __anonymous() { and not bb.data.inherits_class('native', d): try: update_useradd_static_config(d) -except bb.build.FuncFailed as f: +except NotImplementedError as f: bb.debug(1, "Skipping recipe %s: %s" % (d.getVar('PN', True), f)) raise bb.parse.SkipPackage(f) } -- 2.9.3 - Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] buildstats: check IMAGE_ROOTFS exists before checking its size
After 0d6b7276003f1afabc6de683f663540327d52bdc, the exceptions are correctly checked if the rootfs size check fails. In case of a failure a build error is triggered. However, there are cases where this is known to fail (e.g., with meta-swupd the rootfs for swupd images is other than IMAGE_ROOTFS). Because of that, check IMAGE_ROOTFS exists before trying to get the size of it. Also, in case of any error catched as err, simply print out a warning. Signed-off-by: Mikko Ylinen <mikko.yli...@intel.com> --- meta/classes/buildstats.bbclass | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass index 8c2b7b3..599a219 100644 --- a/meta/classes/buildstats.bbclass +++ b/meta/classes/buildstats.bbclass @@ -163,12 +163,13 @@ python run_buildstats () { bs = os.path.join(bsdir, "build_stats") with open(bs, "a") as f: rootfs = d.getVar('IMAGE_ROOTFS', True) -try: -rootfs_size = subprocess.check_output(["du", "-sh", rootfs], -stderr=subprocess.STDOUT).decode('utf-8') -except subprocess.CalledProcessError as e: -bb.error("Failed to get rootfs size: %s" % e.output) -f.write("Uncompressed Rootfs size: %s" % rootfs_size) +if os.path.isdir(rootfs): +try: +rootfs_size = subprocess.check_output(["du", "-sh", rootfs], +stderr=subprocess.STDOUT).decode('utf-8') +f.write("Uncompressed Rootfs size: %s" % rootfs_size) +except subprocess.CalledProcessError as err: +bb.warn("Failed to get rootfs size: %s" % err.output.decode('utf-8')) elif isinstance(e, bb.build.TaskFailed): # Can have a failure before TaskStarted so need to mkdir here too -- 2.9.3 - Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] image_types: check COMPRESS_DEPENDS for backwards compatibility
To complete the transition/renaming to chained image type CONVERSION while maintaining bacwards compatibility to COMPRESS(ION), make sure also COMPRESS_DEPENDS is checked. Without this, the dependencies for legacy COMPRESSIONTYPES do not get built. Signed-off-by: Mikko Ylinen <mikko.yli...@intel.com> --- meta/classes/image_types.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 2e852af..21e2ff9 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -30,6 +30,7 @@ def imagetypes_getdepends(d): adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps) for ctype in resttypes: adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype, True), deps) +adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps) # Sort the set so that ordering is consistant return " ".join(sorted(deps)) -- 2.9.3 - Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core