Age | Commit message (Collapse) | Author |
|
We put the bitbake command line in the buildhistory commit message for
informational purposes, but calling sys.argv to get that as we were
previously doesn't really work in memory resident mode - that gives you
the command used to start the bitbake server which is much less
interesting. Use the just-introduced BB_CMDLINE variable instead.
Part of the fix for [YOCTO #11634].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
It is possible for non-CPAN recipes to contain perl modules. These perl
modules must reside in the versioned perl library directory in order to
work in normal circumstances.. Export this logic to a separate class so
that it can be reused without the rest of the cpan logic.
Without this, dpkg will not export its perl code to the correct location
and will not be found by utilities that expect to use it.
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
With these changes it is possible to have a .bbappend that
- sets SYSCONFDIR to some persistent storage
- modifies SYSCONFDIR/sshd_config to use ssh host keys from
the (writable) sysconfdir
Signed-off-by: André Draszik <adraszik@tycoint.com>
Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
RPM's default is single-threaded gz; the change greatly helps with
both buildtimes (when there is a small number of large-sized packages)
and disk space taken by resulting rpms.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
These commands are not whitelisted by the HOSTTOOLS variable which
silently prevents the MBR disk signature from being written to the
image.
Reported-by: Michael Davis <michael.davis@essvote.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Since do_rootfs depends on cve-check results of all recipes,
we need to recursively depend on recipe do_cve_check.
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Sometimes there are control messages in cve-check-tool printed to
stderr. These lead to parsing error and thus failed build.
This can happen for instance when cve database needs to be
refreshed during build.
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
If there is cve report for a recipe in previous build and there
is no result for current one, old cves are kept in CVE_CHECK_DIR.
This happens on version upgrade or when cve/recipe is whitelisted.
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Is better to log the summary at end to see in an easy way
the actual result of the test run.
[YOCTO #11622]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Fix build when PIE is turned on. It tries to build
.so file using -pie and -shared flags together because
its doing compile and link in same step CFLAGS and LDFLAGS
are combined and does not work, ending in errors e.g.
| /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/python-pygpgme/0.3-r0/recipe-sysroot/usr/l
ib/Scrt1.o: In function `_start_c':
| /usr/src/debug/musl/1.1.16+gitAUTOINC+179766aa2e-r0/git/crt/crt1.c:17: undefined reference to `main'
| collect2: error: ld returned 1 exit status
This error while cryptic is due to the fact that we are
building a shared library but also pass -pie flag to the link
step after specify LDHSARED ( which is -shared linker flags )
we can not use -pie when doing shared libs. This is true for all the python
modules inheriting setup tools
Disable the pie flags thusly for all modules using setuptools since
this setting is done in setuptools makefiles which are then used
during module compiles
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This reverts commit 0d1418026b378389a1668761d6429a94e6c047f8.
|
|
Fix build when PIE is turned on. It tries to build
.so file using -pie and -shared flags together because
its doing compile and link in same step CFLAGS and LDFLAGS
are combined and does not work, ending in errors e.g.
| /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/python-pygpgme/0.3-r0/recipe-sysroot/usr/l
ib/Scrt1.o: In function `_start_c':
| /usr/src/debug/musl/1.1.16+gitAUTOINC+179766aa2e-r0/git/crt/crt1.c:17: undefined reference to `main'
| collect2: error: ld returned 1 exit status
This error while cryptic is due to the fact that we are
building a shared library but also pass -pie flag to the link
step after specify LDHSARED ( which is -shared linker flags )
we can not use -pie when doing shared libs. This is true for all the python
modules inheriting setup tools
Disable the pie flags thusly for all modules using setuptools since
this setting is done in setuptools makefiles which are then used
during module compiles
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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 ]
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: matchbox-desktop-2.1-r0 do_ar_original: Can not determine archive names
for original source because 'name' URL parameter is unset in more than one URL.
Add it to at least one of these: git://git.yoctoproject.org/matchbox-desktop-2
file://vfolders/%2A
ERROR: matchbox-desktop-2.1-r0 do_ar_original: Function failed: do_ar_original
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function do_ar_original, when recipes have more than one source, it added the
"name" URL parameter as suffix to identify the created tarball.
But the URL type "file://" that we always used to represent a series of patches,
it didn't have "name" parameter, so it failed.
So set "name" to the folder name to identify the created tarball, for example:
In matchbox-desktop bb file, the SRC_URI contains:
file://vfloders/*
We set "name" to "vfolders" to identify the created tarball.
In connman-gnome bb file, the SRC_URI contains:
file://images/*
We set "name" to "images" to identify the created tarball.
Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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.ylinen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Fix build when PIE is turned on. It tries to build
.so file using -pie and -shared flags together because
its doing compile and link in same step CFLAGS and LDFLAGS
are combined and does not work, ending in errors e.g.
| /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/python-pygpgme/0.3-r0/recipe-sysroot/usr/l
ib/Scrt1.o: In function `_start_c':
| /usr/src/debug/musl/1.1.16+gitAUTOINC+179766aa2e-r0/git/crt/crt1.c:17: undefined reference to `main'
| collect2: error: ld returned 1 exit status
This error while cryptic is due to the fact that we are
building a shared library but also pass -pie flag to the link
step after specify LDHSARED ( which is -shared linker flags )
we can not use -pie when doing shared libs. This is true for all the python
modules inheriting setup tools
Disable the pie flags thusly for all modules using setuptools since
this setting is done in setuptools makefiles which are then used
during module compiles
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
|
|
Toolchains are required to be prepopulated in sysroot before
entering devshell.
[YOCTO #11464]
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
|
|
KERNEL_IMAGETYPES lists all the kernel images that we want to build. in
cb17b6c2a7 (kernel.bbclass: support kernel image type of vmlinux.gz), some logic
was added to support vmlinux.gz which is not a target built by kernel
makefiles (only vmlinux). It is clear that the goal of this logic is only to
support vmlinux.gz and not others compressed format (such as Image.gz) which are
valid target for kernel makefiles.
For Image.gz we should rely on the kernel makefiles and not do the compression
in kernel class.
This patch updates the logic used to filter out non supported kernel target from
KERNEL_IMAGETYPES, and make vmlinux.gz a 'special case', instead of *.gz. If
more special cases are needed in the future, we could add them in a similar way.
This patch should be a no-op for anyone using vmlinux or vmlinux.gz, and on top
of that it is fixing the build for Image.gz which was not working until now.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
isoimage-isohybrid plugin fails with this error when
trying to find initrd image:
initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, target_arch, image_type))[0]
IndexError: list index out of range
as it uses TRANSLATED_TARGET_ARCH value as part of the image.
This approach stopped to work due to changes in oe core code.
initrd file name is made using MACHINE variable. wic can't get value
of this variable as it's not included into bitbake -e output.
Used basename of deploy dir as MACHINE value to fix the breakage.
(From OE-Core rev: cfbb3cc1279ea88ca3e2867f8a409c5120aa1f05)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The package_qa_check_rdepends() in insane.bbclass has
incorrectly replace its localdata OVERRIDES value with
the package name. Fixing it by appending the package name
to the existing OVERRIDES value. This resolves RDEPENDS QA
error when setting PACKAGECONFIG using a pn- override at
local.conf.
[YOCTO #11374]
Signed-off-by: Gan, Yau Wai <yau.wai.gan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Way back in OE-Core commit fba198ac7efe476a25c5761878ef2fcee97bf9f1 in
2012 we split committing to the repository, making a commit per
top-level directory. However, as we add more information it becomes
harder to see which commits belong to which build. Switch back to a
single commit per build to keep the history tidier.
To address the original concern, if you do want to see just the changes
for a particular subdirectory, git can filter that for you - just
specify that subdirectory as the last parameter on the git show / git
diff command line and that's all you will see.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The recipe name needs to be escaped when using it in a regular expression so
that and special characters are treated literally
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
With the new filters by <module>.[class].[testname] the modules
arg is expected to be a list so use split into TEST_SUITES variable.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
oeqa/sdk/context.py - Use OETestContextThreaded.
classes/testsdk.bbclass - Enable bb event thread mode to avoid
corrupt the PIPE when multiple threads writes.
[YOCTO #11450]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Those methods are used to write in the log the results so
it makes sense to have defined at OETestResult because
is a format of the result itself.
[YOCTO #11450]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Adds development shell support for out-of-tree kernel modules by reproducing
the build environment of the compile task.
Signed-off-by: Stefan Wiehler <stefan.wiehler@missinglinkelectronics.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Empty descriptions lines are set with a space following by a dot and
the multiline ones require a leading space. Also, for non-empty lines,
there is no need for formating with textwrap, so remove the logic for
the latter. The documentation for multiline description was taken from [1].
[1] https://web.archive.org/web/20100727133051/http://handhelds.org:80/moin/moin.cgi/BuildingIpkgs
[YOCTO #10677]
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The secondary EFI partition is used when booting in EFI mode, and
without the configuration data we don't get any boot targets.
Partial fix to [YOCTO #11503].
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
By exporting KBUILD_BUILD_USER with a pre-defined value we improve the
reproducibility of the kernel and remove the requirement for whoami in the
HOSTTOOLS.
KBUILD_BUILD_HOST also helps improve the reproducibility of the kernel.
For more kernel reproducibility options see:
https://lwn.net/Articles/437864/
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
build_efi_cfg function creates configuration files for
systemd-boot entries in 'S' directory. This directory
may not exist when api is called, which breaks the build.
Creating the directory if it doesn't exist should fix
this issue.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Rather than presuming `make` is the generator, use cmake's generic
`cmake --build` feature (which knows to call the appropriate generator).
Both DESTDIR and VERBOSE still behave as intended when used as
environment variables instead of make variable-arguments.
As cmake-based builds don't do any configuration with `make`
invocations, we only pass `PARALLEL_MAKE{,INST}` (via a
EXTRA_OECMAKE_BUILD variable) to the underlying build tool. Make &
ninja support the same `-j N` option (and a few others), so this does
happen to work for both.
This makes it more straight forward for others to select other cmake
generators (many folks have been reaching for `ninja` lately).
CC: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Cody P Schafer <dev@codyps.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
When warning users about unpatched CVE, we'd better put CVE IDs into
the warning message, so that it would be more straight forward for the
user to know which CVEs are not patched.
So instead of:
WARNING: gnutls-3.5.9-r0 do_cve_check: Found unpatched CVE, for more information check /path/to/workdir/cve/cve.log.
We should have:
WARNING: gnutls-3.5.9-r0 do_cve_check: Found unpatched CVE (CVE-2017-7869), for more information check /path/to/workdir/cve/cve.log.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Avoid archiving source for glibc-locale as its tasks
do_fetch do_unpack and do_patch have already been deleted.
Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Adding or removing archiver.bbclass from a build configuration causes
rebuilds of linux-yocto-based kernels because of the
do_kernel_configme->do_unpack_and_patch task dependency.
This particular dependency can be ignored for the do_kernel_configme
sstate signature calculcation. Idea for the fix from Richard Purdie.
Note that building the kernel and adding archiver.bbclass later to
archive sources leads to do_unpack_and_patch running after
do_kernel_configme (because that already ran in the first build),
which might be problematic. This is independent of the change here.
The use case in YOCTO #11441 is to removed archiver.bbclass between a
production build with archiving enabled and builds via oe-selftests
without archiving. That direction is fine.
Fixes: YOCTO #11441
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The diff.gz gets created in do_unpack_and_patch, but
do_deploy_archives did not depend on it, so there was a race
condition. For example, "bitbake linux-intel:do_deploy_archives"
without a prior "bitbake linux-intel:do_kernel_configme" did not
deploy the diff.gz.
When do_unpack_and_patch ran first, it failed because the output
directory didn't exist yet and the error was not detected because the
result of the diff command wasn't checked.
Changing the current working directory in create_diff_gz() without
returning to the original directory caused warnings like this:
WARNING: linux-intel-... do_unpack_and_patch: Task do_unpack_and_patch changed cwd to .../tmp-glibc/work-shared/intel-corei7-64
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Previously, do_ar_recipe ran again unnecessarily when adding or
removing classes like buildhistory.bbclass, because that changes the
BBINCLUDED variable which do_ar_recipe uses to find .bbappend files.
This is both extra work and also sometimes triggered "basehash
changed" errors (seen under oe-selftest, which adds machine.inc and
bblayers.inc) because BBINCLUDED is special and does not cause
the basehash to be recalculated.
The file *content* already was not considered in the task signature,
instead relying indirectly on PF (which includes the revision assigned
by a PR server) to ensure that a new versioned source archive gets
created each time there is a rebuild.
Therefore it makes sense to use the same mechanism and also ignore the
file *list*, i.e. exclude BBINCLUDED from the task signature.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This is needed for packages like linux-firmware which have a
legitimate reason for it. Oe-core has a separate package_qa
test for this situation, so any accidental inclusions of such
binaries will still be caught.
[YOCTO #11329]
Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Using "read-only-rootfs" feature in minimal or special
purpose images (eg mounted images) makes build to fail
because ${IMAGE_ROOTFS}/etc/fstab file does not exist.
Signed-off-by: Panagiotis Tamtamis <panagiotis.tamtamis@unify.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The default dir for do_compile & do_configure is already ${B}, no need
to cd (other than broken appends)
CC: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Cody P Schafer <dev@codyps.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Currently the LICENSE of every image is hard set to MIT.
This allows this to be overriden in derived images.
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Use a weak assignment for ROOTFS_RO_UNNEEDED to let users define their
own list overriding defaults.
Signed-off-by: David Vincent <freesilicon@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The code in useradd-staticids is generally useful for user addition
functionality but is not reusable in its current form. Refactor the
code into a set of library functions.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If sstate was used to populate the build and one of the universal-4.8
or universal-4.9 mirror urls was used, the sstate checks during eSDK
construction could fail as it would zero out the SSTATE_MIRRORs
variable.
Use the same mirrors variable setting as the eSDK would end up using
to perform the checks to avoid this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This code dates from distant times before we had class overrides.
The comments are also rather stale. Rewrite this code using class
overrides which makes it safer, more modern and more easily
understandable.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This uses more modern formatting to handle the lockfiles and control
file cleanup with try/finally, taking advantage of the previous
extra indentation.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This prepares the way to parallelise deb generation and splits the iteration
over packages and the package generation into separate functions. Whitespace
indentation is unchanged deliberately and is fixed in a followup patch. There
should be no functional change.
Some checks on variables are removed as they were pointless when you looked
at the code.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This prepares the way to parallelise ipk generation and splits the iteration
over packages and the package generation into separate functions. Whitespace
indentation is unchanged deliberately and is fixed in a followup patch. There
should be no functional change.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In the limited dependency case we don't use any of the data from
BB_TASKDEPDATA. Restructure the code so this variable doesn't have
to be set. This allows the function to be called from other contexts
without creating artificial constructs. There should be no functional
change, behaviour remains unchanged.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|