libc-package.bbclass: Add a progress meter for the package task
The package task for glibc-locale takes a very long time to execute,
especially if using qemu. In that case, a progress meter helps a lot to
show the progress of the task.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libc-package.bbclass: Only extract wanted files in prep_locale_tree()
prep_locale_tree() predates the usrmerge DISTRO_FEATURE, which meant it
was not prepared for the case when ${base_libdir} == ${libdir}. This
lead to it extracting files and directories where it shouldn't.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sun, 17 Feb 2019 22:12:40 +0000 (22:12 +0000)]
scripts/oe-git-archive: Separate out functionality to library function
This turns the core of the script into a library function. Ultimately this
will let us call that code with custom 'keywords' rather than relying
on the data parsed from bitbake metadata which can't be used when archiving
historical results.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Manjukumar Matha [Fri, 15 Feb 2019 00:45:18 +0000 (16:45 -0800)]
kernel-fitimage.bbclass: Fix the dependency issue while generating fitimage_initramfs
When building fitimage_initramfs, the correct depedency is to build
after do_bundle_initramfs. We can run into the following dependency
issue
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_assemble_fitimage_initramfs
aarch64-xilinx-linux-objcopy: 'vmlinux': No such file
This happens because initramfs renames vmlinux to vmlinux.bak while
generating vmlinux.initramfs, there is a chance that fitimage_initramfs
can also start during this process and create the above issue.
This patch resolve the dependency issue by running fitimage_initramfs
task after do_bundle_initramfs
Alex Kiernan [Sat, 16 Feb 2019 13:41:55 +0000 (13:41 +0000)]
bmap-tools: update from 3.4 to 3.5
bmap-tools 3.5 was released August 2018 but has no release tarball, so
switch to using the git fetcher. Also pull in the fix for StopIteration
being transformed into RuntimeError for Python 3.7.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sat, 16 Feb 2019 15:00:45 +0000 (15:00 +0000)]
quilt: Merge recipe files into a more coherent form
The style of this recipe is dated, move most of the code into the main
shared include file, making some of the configuration much clearer using
modern overrides to do so.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sat, 16 Feb 2019 14:52:29 +0000 (14:52 +0000)]
native: Enable RDEPENDS handling
Native recipes don't currently honour their RDEPENDS. In the case of
some python scripts this has started causing problems since whilst they're
not needed at build time (DEPENDS), they are needed at runtime.
We put off making this change due to circular dependency issues. I believe
the three such problems in OE-Core are now fixed, as is the dependency loop
identfication code in bitbake so its time to improve this situation.
[YOCTO #10113]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sat, 16 Feb 2019 14:48:29 +0000 (14:48 +0000)]
quilt-native: Remove RDEPENDS on util-linux-native
This code is actually inactive and inaccurate. If we fix other code to
enable native RDEPENDS handling, this then breaks.
quilt-native is early in the dependency tree and can't depend on
util-linux-native which may need to applu patches. The pieces of
util-linux which quilt needs are long established as part of HOSTTOOLS.
The other RDEPENDS are already part of ASSUME_PROVIDED. util-linux-native
doesn't belong there since it has multiple components and is used as a valid
dependency elsewhere in the codebase.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sat, 16 Feb 2019 14:01:56 +0000 (14:01 +0000)]
lib/oe/utils: Fix hang in multiprocess_launch()
If large results values are returned by the subprocesses, we can hit a deadlock
where the subprocess is trying to write data back to the parent, the pipe is full
and the parent is waiting for the child to exit.
Avoid this by calling the update() method which would trigger reading a result
from the child, avoiding the deadlock. The issue is described in
https://bugs.python.org/issue8426
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Wed, 30 Jan 2019 17:42:25 +0000 (17:42 +0000)]
package: Rework debug source file handling
Currently we parallel process the files we install running dwarfsrcfiles over
each one in parallel threads but requiring a lock to write the results to one
file. This is not ideal for performance and means we can't then use per file
data for other purposes such as source code license processing.
Rework the code so that the list of source files is generated per installed
file and is reusable.
The code still generates a null separated debugsources.list file since this
is used by a shell pipeline but it no longer needs locking.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adam Trhon [Tue, 12 Feb 2019 12:14:58 +0000 (12:14 +0000)]
icecc-env: don't raise error when icecc not installed
When icecc is not installed, the `which icecc` command in icecc-env.sh
returns nonzero. This happens when environment is being sourced. When
the terminal has `set -e`, the whole script fails and terminal is
closed.
Fix this by ignoring errors from the which command.
Signed-off-by: Adam Trhon <adam.trhon@tbs-biometrics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Pascal Bach [Thu, 14 Feb 2019 16:15:29 +0000 (17:15 +0100)]
nfs-utils: build tools with target compiler
Some tools were built with CC_FOR_BUILD which points to the target
compiler. The current patch avoided issues by deleting some of the
binaries during install.
This patch replaces the CC_FOR_BUILD with CC so the tools are built with
the target compiler. This means the binaries no longer need to be
deleted.
I stumbled upon this by trying to globally add "--ffile-prefix-map", which
is not supported by my host GCC, to get rid of some "buildpaths" QA Warnings.
Cc: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alex Kiernan [Tue, 15 Jan 2019 06:55:07 +0000 (06:55 +0000)]
perf: Package libperf-jvmti.so as part of ${PN}
perf's jvmti support builds libperf-jvmti.so that needs to be packaged
as part of the main package, not a developer package. Given there's no
files in the developer package, override FILES_SOLIBSDEV so it's not
gobbled by FILES_${PN}-dev, and then add just that file to FILES_${PN}
so that if in the future there other files which would be added to the
dev package we'll fail then.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Fri, 15 Feb 2019 15:58:49 +0000 (15:58 +0000)]
target-sdk-provides-dummy: Extend to -dev and -src packages
This avoids errors when running populate_sdk under opkg:
* Problem 1/1:
* - package busybox-dev-1.30.1-r0.core2-64 requires busybox = 1.30.1-r0, but none of the providers can be installed
*
* Solution 1:
* - allow deinstallation of target-sdk-provides-dummy-1.0-r0.sdk-provides-dummy-target
* Solution 2:
* - do not ask to install a package providing busybox-dev
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Kai Kang [Fri, 15 Feb 2019 02:06:38 +0000 (21:06 -0500)]
openssl: update patch to fix buildpaths qa issue for -fmacro-prefix-map
Gcc option '-fmacro-prefix-map' is added to DEBUG_PREFIX_MAP. It has a
patch to deal option '-fdebug-prefix-map' already. Update the patch
0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch to fix
buildpaths qa issue for '-fmacro-prefix-map' too.
Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Kai Kang [Fri, 15 Feb 2019 02:06:36 +0000 (21:06 -0500)]
go-cross-canadian: set default value of DEBUG_PREFIX_MAP
It uses gcc on build machine during go-cross-canadian bootstrap, but the
gcc version may be old and not support option '-fmacro-prefix-map' which
is one of default values of DEBUG_PREFIX_MAP.
So set default value of DEBUG_PREFIX_MAP for go-cross-canadian.
Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Kai Kang [Fri, 15 Feb 2019 02:06:35 +0000 (21:06 -0500)]
bitbake.conf: update DEBUG_PREFIX_MAP with -fmacro-prefix-map
Add option '-fmacro-prefix-map' to DEBUG_PREFIX_MAP. It could resolve
buildpaths qa warnings which caused by macros '__FILE__' and
'__BASE_FILE__'.
Though option '-ffile-prefix-map' could cover '-fdebug-prefix-map' and
'-fdebug-prefix-map' both, it is not supported by 'as' and causes
buildpaths qa warnings of glibc:
| QA Issue: File
| /work/i586-poky-linux/glibc/2.29-r0/packages-split/glibc-dev/usr/lib/crti.o
| in package contained reference to tmpdir
So only add '-fmacro-prefix-map' to DEBUG_PREFIX_MAP rather than replace
'-fdebug-prefix-map' with '-ffile-prefix-map'.
Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Robert Yang [Fri, 15 Feb 2019 08:14:51 +0000 (16:14 +0800)]
runqemu: Let qemuparams override default settings
Fixed:
In meta/conf/machine/include/qemuboot-x86.inc:
QB_CPU_x86-64 = "-cpu core2duo"
$ runqemu qemux86-64 qemuparams="-cpu coreduo"
Check /proc/cpuinfo, it should use coreduo rather than core2duo since user
specifies it, but it doesn't, append qemuparams to the last can fix the
problem.
[YOCTO #11773]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
OE-Core rev: a88bcbae850a2e6d182291d3f8e167aabdbe4842 broke the ability
to find parted as it may be in sbin which is not in PATH for some users
on some distros.
Iterate on the original patch to fix this and also fix the original problem.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Fixes up the permissions on the license files when they are put on the
target file system so that they are readable by everyone. Previously,
they would have inherited whatever permissions the file had in the
recipe, which may not have been appropriate.
[YOCTO #13175]
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Ross Burton [Thu, 14 Feb 2019 15:05:26 +0000 (15:05 +0000)]
default-distrovars: set CONNECTIVITY_CHECK_URIS
Connectivity checking is useful, so set a default value of https://example.com/.
This checks both that we have connectivity and HTTPS makes it through any
proxies.
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This error is caused by enable_uninative(), it runs twice (ConfigParsed and
BuildStarted), the error would happen when there is no ConfigParsed event
(no hosttools is created), but BuildStarted. This patch can fix the problem.
[YOCTO #13022]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Ross Burton [Wed, 13 Feb 2019 13:25:51 +0000 (13:25 +0000)]
utils: add -src to system package name blacklist
oe.utils.packages_filter_out_system() returns PACKAGES after removing "system"
packages but it doesn't handle ${PN}-src as generated by
PACKAGE_DEBUG_SPLIT_STYLE=debug-with-srcpkg.
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
William Bourque [Mon, 11 Feb 2019 20:00:48 +0000 (15:00 -0500)]
wic/engine.py: Load paths from PATH environment variable
Load self.paths from environment variable and
if it fails, fall back to hardcoded list.
This is required for users that would need to load
different e2fsprogs binaries if their system's ones
are not recent enought
Signed-off-by: William Bourque <wbourque@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
André Draszik [Mon, 11 Feb 2019 12:04:33 +0000 (12:04 +0000)]
systemd: RDEPENDS on util-linux-umount
It looks like there is an implicit dependency on util-linux'
umount - as otherwise when using busybox' umount we see a
long delay on shutdown / reboot.
[YOCTO #13058]
Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/engine: Fix cp's target path for ext* filesystems
Python subprocess' shell=True defaults to /bin/sh[1][2], which
often refers to a POSIX-compliant shell. As the -e flag is
not defined in the POSIX standard[3], some shells may
interpret "-e" as the first argument to the echo command,
causing the rest of the command line to fail.
In this particular case, "echo -e 'cd {}'" is interpreted
as "-e cd {}", which causes the first line of the command
to fail, and causing cp to always place the source file
in the filesystem's root.
Replacing "echo -e" for a printf command makes this
more portable.
This issue only affects "wic cp" for ext* filesystems.
Ross Burton [Mon, 11 Feb 2019 11:04:25 +0000 (11:04 +0000)]
bitbake: use GCC ar and ranlib wrappers
Instead of calling 'ar' and 'ranlib' directly, set AR=gcc-ar and
RANLIB=gcc-ranlib. This fixes builds with link-time optimisation where more
arguments would need to be passed to ranlib but gcc-ranlib will do that
automatically.
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
As of now in case of ARC there's no in-kernel implementation of basic libgcc
functions used for millicode, multiplication, division etc instead we simply
link with libgcc.a which provides everything used by the compiler.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Author: Alexey Brodkin <alexey.brodkin@synopsys.com>
Date: Fri Feb 8 17:29:40 2019 +0300
ARC: Add nsimhs- and hsdk-standard configs
With ARC support ramping-up in upstream OE we're ready to
build more complicated distributions and linux-yocto is
a nice and configurable base for that.
This commit adds support of 1 simulated board (nSIM) and
the mast affordable and powerful to date development board (HSDK).
Once Qemu port for ARC is functional (it's being actively developed now)
we'll switch from nSIM to Qemu.
Still it would be really good to keep nSIM support in linux-yocto for now
as it allows for simpler testing as compared to real HW.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alexey Brodkin [Sat, 9 Feb 2019 18:37:06 +0000 (18:37 +0000)]
linux-yocto: Add dependency on libgcc for ARC
As of now in case of ARC there's no in-kernel implementation of basic libgcc
functions used for millicode, multiplication, division etc instead we simply
link with libgcc.a which provides everything used by the compiler.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Bruce Ashfield [Sat, 9 Feb 2019 18:37:05 +0000 (18:37 +0000)]
linux-yocto: tweak console boot check
boot/main: don't check console device file on fs when booting with
initrd/initramfs
In case of initrd/initramfs /dev/console might not exist that early
as devtmpfs is mounted a bit later by /init process so disable this
check in that case.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
ruby: remove CVE-2018-1000073.patch as already fixed
rubygems 2.7.6 which is in ruby 2.5.3 has this fix and as currently
applied all gem extraction fails as the realpath check is done against
the full path including the file to be extracted which will always fail
as the file hasnt been extracted yet
Signed-off-by: Brett Grandbois <brett.grandbois@opengear.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
André Draszik [Tue, 5 Feb 2019 02:32:41 +0000 (02:32 +0000)]
util-linux: final cleanup
* use ${PN} instead of util-linux
* use PACKAGESPLITFUNCS for creating util-linux-lib* packages
rather than an _append OVERRIDE
* sort ALTERNATIVE_LINK_NAME alphabetically
* use systemd_system_unitdir instead of open-coding
* inherit manpages so as to benefit from man-db processing (note
that manpages are not generated here, we just want the
automatic update of the package index caches
* use EXTRA_OEMAKE instead of duplicating command line arguments
[YOCTO #13058]
Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The util-linux meta-package now simply RRECOMMENDS all
subpackages created. There is no distinction between what
it previously recommended or depended on for existing
packages.
This is to streamline the dependencies and to make things
less surprising.
It also stops the -dev package from depending on non-existing
packages like util-linux-losetup-dev etc.
[YOCTO #13058]
Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
André Draszik [Tue, 5 Feb 2019 02:32:37 +0000 (02:32 +0000)]
util-linux: one package per binary (pt 4: bindir)
Similar to the previous patch.
Existing packages (and current dependency by main package):
* ionice <- RRECOMMENDS
* lsblk <- RDEPENDS
* lscpu
* mcookie
* prlimit <- RRECOMMENDS
* unshare
* uuidgen
New packages:
* too many to list
To avoid breaking existing users, all the new packages
are added to the main package as RRECOMMENDS_${PN}, so
they are pulled into existing images etc.
The existing RDEPENDS_${PN} will need some further
clean-up in the future, as it appears a bit random which
packages the main package depends on vs. recommends.
Nevertheless, all existing packages have been added to
RRECOMMENDS this time, even if they weren't in RDEPENDS /
RRECOMMENDS before.
Unfortunately, we need to add explicit ALTERNATIVE_LINK_NAME[]
for a few cases, as previously they were implied using
defaults by being specified in ALTERNATIVE_${PN}. We can't
easily automate that using do_split_packages(), so we
simply add them explicitly.
[YOCTO #13058]
Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
To avoid breaking existing users, all the new packages
are added to the main package as RRECOMMENDS_${PN}, so
they are pulled into existing images etc.
The existing RDEPENDS_${PN} will need some further
clean-up in the future, as it appears a bit random which
packages the main package depends on vs. recommends.
Nevertheless, all existing packages have been added to
RRECOMMENDS this time, even if they weren't in RDEPENDS /
RRECOMMENDS before.
[YOCTO #13058]
Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
André Draszik [Tue, 5 Feb 2019 02:32:35 +0000 (02:32 +0000)]
util-linux: one package per binary (pt 2: base_bindir)
Similar to the previous patch.
Existing packages (and current dependency by main package):
* mount <- RRECOMMENDS
* umount <- RDEPENDS
* mountpoint <- RRECOMMENDS
* getopt
* su <- RDEPENDS
New packages:
* dmesg
* kill
* more
To avoid breaking existing users, all the new packages
are added to the main package as RRECOMMENDS_${PN}, so
they are pulled into existing images etc.
The existing RDEPENDS_${PN} will need some further
clean-up in the future, as it appears a bit random which
packages the main package depends on vs. recommends.
Existing packages that aren't in RDEPENDS / RRECOMMENDS
haven't been added to RRECOMMENDS for that reason.
[YOCTO #13058]
Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
swaponoff is empty now and simply depends on swapon swapoff
To avoid breaking existing users, all the new packages
are added to the main package as RRECOMMENDS_${PN}, so
they are pulled into existing images etc.
The existing RDEPENDS_${PN} will need some further
clean-up in the future, as it appears a bit random which
packages the main package depends on vs. recommends.
Existing packages that aren't in RDEPENDS / RRECOMMENDS
haven't been added to RRECOMMENDS for that reason.
[YOCTO #13058]
Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
util-linux is configured with --libdir=${base_libdir} for -target builds,
but with the default --libdir=${libdir} for all other builds. Furthermore,
dynamic util-linux-lib* packages are unconditionally being generated from
${base_libdir}, which is the right location for -target builds, only.
IOW, in the nativesdk case, util-linux-lib* packages are empty, and all
the shared libraries implicitly become part of the main package again.
While this surely wasn't intended, this also is going to cause problems as
upcoming changes are explicitly making util-linux an empty meta-package,
which then is going to cause packaging failures.
While fixing this, clean up the existing use of EXTRA_OECONF as it is a
bit confusing, hard to follow, and needlessly duplicates information:
target: ${SHARED_EXTRA_OECONF} --libdir=${base_libdir}
native/nativesdk: ${SHARED_EXTRA_OECONF} --disable-use-tty-group
where ${SHARED_EXTRA_OECONF} already contains --disable-use-tty-group.
This can be simplified by completely dropping the duplicated EXTRA_OECONF
assignments and simply using a new variable UTIL_LINUX_LIBDIR with a
_class-target override.
Additionally, this allows to easily fix packaging of the util-linux-lib*
packages, as we can now simply inspect UTIL_LINUX_LIBDIR where and as
needed to get to the right directories.
Lastly, all this can be moved from the .bb file into the .inc file as none
of that appears to actually be version specific, and we can sort the
configure options alphabetically for clarity.
[YOCTO #13058]
Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>