aboutsummaryrefslogtreecommitdiffstats
path: root/lib/python2.7/site-packages/autobuilder/buildsteps/CreateAutoConf.py
AgeCommit message (Collapse)Author
2019-04-26README: Make it clear this repo is deprecated and people should use ↵HEADmasterRichard Purdie
yocto-autobuilder2 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-09buildsteps/CreateAutoConf: add option to enable image-buildinfoJoshua Lock
For QA purposes it's useful to be able to understand details about the system from within a running image. Therefore add an option to enable the image-buildinfo class with IMAGE_BASENAME and IMAGE_NAME included in the written variables. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2018-01-08buildsteps/CreateAutoConf: fix / placement in SSTATE_MIRRORSJoshua Lock
The prior commit appends the release number to the SSTATE_MIRRORS variable but does so without adding a separating / (due to a typo). Fix that issue. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2018-01-08buildsteps/CreateAutoConf: correctly set SSTATE_MIRRORS for a releaseJoshua Lock
We recently switched to publishing sstate artefacts into a per-release directory, therefore we need to append the same directory name to the value we set in SSTATE_MIRRORS to ensure a generated eSDK is pointing to the correct shared state mirror and able to install objects. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2018-01-05buildsteps/CreateAutoConf: set PV when setting build-appliance's SRCREVJoshua Lock
Setting SRCREV without changing PV isn't correct and can lead to unexpected issues. Ensure we're in-keeping with best practices and set the PV for build-appliance-image whenever we are setting SRCREV. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-11-10buildsteps/CreateAutoConf: fix beaglebone backwards compatJoshua Lock
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-11-10buildsteps/CreateAutoConf: support beaglebone→beaglebone-yocto renameJoshua Lock
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-11-10buildsteps/CreateAutoConf: drop support for releases before mortyJoshua Lock
We are no longer actively supporting Yocto Project releases older than the morty branch. Simplify the logic of the buildstep by dropping any code paths related to supporting versions older than morty. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-09-11autobuilder/buildsteps/CreateAutoConf: add source to setProperty() callsJoshua Lock
This helps trace properties and their lineage when viewing them in the web UI. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-08-22autobuilder/buildsteps/CreateAutoConf: add lockedsigs optionJoshua Lock
We want to be able to create an auto.conf which uses locked-sigs.inc, but the support for this feature is incomplete in some older version we support with yocto-autobuilder. Therefore add this as an option and disable it for OE-Core versions older than Pyro. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-07-20autobuilder/buildsteps/CreateAutoConf: support workers with PARALLEL_MAKEJoshua Lock
Continue to support older environments where PARALLEL_MAKE was set and the newer variant PARALLEL_MAKE_NUM isn't set. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-07-20autobuilder/buildsteps/CreateAutoConf: PARALLEL_MAKE -> PARALLEL_MAKE_NUMJoshua Lock
Having variables in the environment which match OE variable names and are not part of the default Bitbake environment whitelist are a bad idea. They can have adverse affects on the build such as when a child invocation of bitbake, as in oe-selftest, picks up the environment variable due to weak assignment of the variable in the configuration. Rename the autobuilder configuration variable from PARALLEL_MAKE to PARALLEL_MAKE_NUM to prevent the above scenario. This makes further sense as the semantics of PARALLEL_MAKE[_NUM] in yocto-autobuilder differ from those in OE-Core, as the former expects only a number whereas the latter expects a full value flag including the "-j" Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-07-10buildsteps/CreateAutoConf: add new directory for release SSTATEJoshua Lock
The new variable SSTATE_RELEASE_DIR, when set, will be used as the SSTATE_DIR for release builds. The usual SSTATE_DIR will be configured as a file SSTATE_MIRRORS entry. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-07-10autobuilder/buildsteps/CreateAutoConf: support empty IMAGE_FSTYPESJoshua Lock
If the IMAGE_FSTYPES variable in conf/autobuilder.conf is set to the empty string this should not result in an empty append assignment. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-07-03autobuilder/buildsteps/CreateAutoConf: change release sstate configurationJoshua Lock
When making a release we create a separate SSTATE_DIR (with the major release number in the SSTATE_DIR's name) and use the shared SSTATE_DIR as an SSTATE_MIRROR. This simplifies things because we no longer rely on SSTATE_MIRROR having been set in order to create the directory of sstate artefacts for a release and further we no longer need to traverse the network to fetch sstate objects when making a release build. The downside is that the publishing of the artefacts now requires a "deep" copy where we detect symlinks and follow them to ensure the file is copied, rather than the link (i.e. pass -L or --dereference to cp). Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-06-07autobuilder/buildsteps/CreateAutoConf: ensure append text is at the endJoshua Lock
atextappend specifies text to be appended at the end of generated the auto.conf, yet some recent changes have resulted in entries being written to auto.conf *after* the atextappend. This resolves that so that the atextappend value is the final thing to be written to the generated auto.conf file. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-06-07autobuilder/buildsteps/CreateAutoConf: fix setting non-default TMPDIRJoshua Lock
Fix the tmpdir argument so that the value is include after the variable name and assignment operator in the output. Further, add logic so that if the argument doesn't begin with a / the provided value is assumed to be relative to the build directory, rather than a full path. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-05-30autobuilder/buildsteps/CreateAutoConf: mingw on krogoth workaroundJoshua Lock
The meta-mingw branch for krogoth includes a defect where SDK builds made in the same TMPDIR as a Linux SDK build fail due to conflicting sysroot paths. Work around this for krogoth only mingw SDK builds by setting a different TMPDIR in that situation. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-03-17buildsteps/CreateAutoConf: add option to disable PRServerJoshua Lock
Traditionally we've configured a PRServer in auto.conf whenever the global options in autobuilder.conf are set, however there are scenarios where we might want to run a single builder (or a subset of builds performed by a builder) without the PRServer. To facilitate this add an extra optional parameter to the CreateAutoConf arguments dictionary, prserv. If prserv is any value other than the string "False" the global PRServer configuration will be adhered to. If prserv is the string "False" the generated auto.conf will not include a PRSERV_HOST entry. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-03-16buildsteps/CreateAutoConf: don't use a separate SSTATE_DIR for multilibJoshua Lock
It's not entirely clear why we do this, other than historical reasons, therefore switch to a consistent SSTATE_DIR regardless of multilib. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-03-16buildsteps/CreateAutoConf: also use SSTATE_MIRRORS in non-release buildsJoshua Lock
Always enable SSTATE_MIRRORS when SSTATE_MIRROR_BASE is set and OE-Core's layer version is greater than 8, rather than just when building a release. This should speed up builds a bit and removes a release-specific, and therefore less frequently tested, code path. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-03-02autobuilder/buildsteps/CreateAutoConf: fix whitespaceJoshua Lock
The SSTATE_MIRRORS variable was being assigned a value without whitespace between the \n and the file protocol declaration. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-03-02autobuilder/buildsteps/CreateAutoConf: disable distro sanity testingJoshua Lock
Set SANITY_TESTED_DISTROS = "" so that we don't cause a cacophony of errors when the worker host OS isn't in that list. This is likely to happen when testing new distros or when the workers haven't yet been upgraded as a distro falls out of official testing. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-03-02autobuilder/buildsteps/CreateAutoConf: fix format of SSTATE_MIRRORSJoshua Lock
We need to use an append (+=) operating to add to SSTATE_MIRRORS as the populate_sdk_ext class already sets an SSTATE_MIRRORS variable to pick up uninative tarballs. Furthermore fix the inclusion of a new line in the variable assignment by correctly escaping special sequences in the string. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-02-27autobuilder/buildsteps: clean up property usageJoshua Lock
buildbot.interfaces.IProperties.getProperty() takes a default value as a second parameter. Use this to clean up property usage so that we don't always have to check the property is set before accessing its value. Furthermore when the property is an int-as-string, which we'll only ever use as a string, create an int object from the string once and store it at the time of reading the property rather than creating the int object every time we wish to compare the value. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-02-20CreateAutoConf: re-enable build minimal eSDK installers for pyroJoshua Lock
With fixes in OE-Core for running selftests against minimal eSDK installers (by installing any packages required by the tests into the eSDK) we can now build minimal eSDK installers for pyro or newer. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2017-01-20buildsteps/CreateAutoConf.py: Add support for specify MACHINE by build propAníbal Limón
Sometimes is a good idea to could specify a machine to build via a build property/web interface input. Without this patch if you specify the machine via a build property/web interface input, the machine is overwrite taking only into account the default machine set in the buildset. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-12-21CreateAutoConf: don't call start() after finished()Joshua Lock
Only chain up and call ShellCommand.start() when finished() isn't called, otherwise return None. This prevents exceptions being thrown related to start() having been called after finished(). Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-12CreateAutoConf: disable minimal extensible SDK installers for nowJoshua Lock
The minimal eSDK results in sanity test failures. The tests need updating to install required components. Until those updates are made, some time after M1, we need to disable the minimal eSDK generation on the autobuilder. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-12CreateAutoConf: include a toolchain in minimal eSDKJoshua Lock
In order to ensure the generated extensible SDK's can still be used to succesfully run the sanity tests we need to include a usable toolchain. This makes the minimal eSDK larger but ensures that the eSDK is usable from an IDE, or other tools, without having to perform additional steps. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-10CreateAutoConf: fix exception when doing a non-release buildJoshua Lock
The custom_yocto_number property can be None, handle that in get_release_number() by returning early when the property isn't set. Add further safety by only calling the method for a release build. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-07CreateAutoConf: fix trailing . in get_release_number()Joshua Lock
The return value of get_release_number() is used to name a per major release directory for sstate artefacts, a trailing . looks like an error and doesn't make sense. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-07CreateAutoConf: only build minimal eSDK if SSTATE_MIRROR_BASE is setJoshua Lock
If SSTATE_MIRROR_BASE isn't set we can't set an appropriate SSTATE_MIRRORS value for use in the minimal eSDK installer, so don't build a minimal eSDK in that case. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-07CreateAutoConf: set a property when this is a release buildJoshua Lock
We want some build steps (CreateAutoConf and PublishArtifacts) which run on a triggered build to behave differently for a release build. Ideally we'd just propage the custom_release_me property to the triggered builds using copy_properties, however as several buildsteps are already using this property in conjunction with a series of other properties on the triggering build we don't want to propagate too much unrelated (for our needs) state into triggered builds and thus take the option to set a new property. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-07CreateAutoConf: only setup SSTATE_MIRRORS for Morty or newerJoshua Lock
We don't want to try and publish shared state mirrors for point releases of older builds, so just set up this change for releases from morty on. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-07CreateAutoConf: fix formatting of SSTATE_MIRRORS entriesJoshua Lock
SSTATE_MIRROR entries with unexpected formatting were causing parse errors during fetch and creation of the extensible SDK. Fix up the formatting to correctly escape sequences and include appropriate whitespace. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-05CreateAutoConf: support publishing sstate for a releaseJoshua Lock
We want to easily support publishing the sstate objects required to build a release (for use with the eSDK) without publishing the entire sstate-cache we share on the Yocto Project AB. - Set up SSTATE_MIRRORS to point to the URL in the autobuilder's SSTATE_HTTP_MIRROR variable - point SSTATE_DIR at a subdirectory of SSTATE_RELEASE_DIR - fail if a release build is triggered with no release number set [YOCTO #9727] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-12-05CreateAutoConf: build minimal extensible SDK installersJoshua Lock
For morty or newer build a minimal eSDK with a preconfigured SSTATE_MIRRORS pointing to the autobuilder's sstate mirror. [YOCTO #9596] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-11-25CreateAutoConf: fix layer version check to force uninativeJoshua Lock
Fix b9875662cc7da3c672e11bbd78f7da6755c7117b which incorrectly checked the yocto-bsp layer version, instead of the OE-Core layer version. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-11-16CreateAutoConf: force oe-core to use uninativeJoshua Lock
oe-core b59eee7bebd413c7abe5626f69508e1fe47dd0ac means that building the eSDK requires uninative to be enabled, therefore add uninative to auto.conf when building oe-core. [YOCTO #10645] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-09-29CreateAutoConf: fix deleting remote throwaway buildhistory branchJoshua Lock
83c609eddbc88f07cbdb0d29813132873266d476 moved the deletion of remote throwaway branches until after the presence of the branch had been tested for, however it erroneously changed the command so that the remote branch is deleted *after* an empty one is pushed, breaking the intended behaviour. This change makes an extra git ls-remote call for throwaway branches so that an existing remote branch is deleted *before* the empty branch is pushed. We also redirect the output of git ls-remote to /dev/null so that we don't pollute the stdio logs on the builders. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-09-28CreateAutoConf: only delete a remote branch once we know it existsJoshua Lock
For throwaway buildhistory we were trying to delete the branch on the remote before we knew whether the branch existed, resulting in errors in the CreateAutoConf output like: Initialized empty Git repository in /srv/www/vhosts/autobuilder.yoctoproject.org/buildhistory/poky/master-next/nightly-x86-64/.git/ error: unable to delete 'poky/master-next/nightly-x86-64': remote ref does not exist error: failed to push some refs to 'ssh://git@git.yoctoproject.org/poky-buildhistory' program finished with exit code 0 Move this check inside the if statement which checks whether the branch exists on the remote. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-09-28CreateAutoConf: finish fix of check for remote buildhistory branchJoshua Lock
The fix in 61b4bf4b463b7859ab025755c9c232688503a70f was incomplete because the exit code was still masked by piping the output of git ls-remote into a cut. The manipulated output of the git ls-remote doesn't appear to be used anywhere else during this buildstep so this change removes the cut and sed. [YOCTO #10171] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-09-27CreateAutoConf: fix check for remote buildhistory branchJoshua Lock
The [--exit-code] option to git ls-remote must precede the <repository> and <refs> arguments, otherwise it isn't recognised and git ls-remote always returns 0 regardless of whether the specified ref is found in the repository. $ git ls-remote git://git.yoctoproject.org/poky-buildhistory refs/heads/master-next --exit-code $ echo $? 0 $ git ls-remote --exit-code git://git.yoctoproject.org/poky-buildhistory refs/heads/master-next $ echo $? 2 Failing to correctly determine whether a branch exists at the remote results in the local branch not being created and ultimately in failures to push buildhistory to the remote. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-08-22enable use of kvm with qemux86*Bill Randle
When used with corresponding oe-core patch, this will enable the use of kvm when running qemux86* images on a x86* host that supports kvm. On the same build machine, for an x86_64 testimage run, the with and without times are: without kvm: core-image-sato-1.0-r0 do_testimage: Ran 43 tests in 728.726s core-image-sato-sdk-1.0-r0 do_testimage: Ran 52 tests in 1090.838s with kvm: core-image-sato-1.0-r0 do_testimage: Ran 43 tests in 60.255s core-image-sato-sdk-1.0-r0 do_testimage: Ran 52 tests in 71.719s [YOCTO #9298] Signed-off-by: Bill Randle <william.c.randle@intel.com>
2016-06-29CreateAutoConf.py: fix default path for auto.confBill Randle
Commit 1d67af87fafe89f75041824bfcf00e92163b949f made the destination path configurable, with the default supposed to be "./build/conf/auto.conf". A typo in the patch instead set the default to "./build/auto.conf". In addition, replace hard coded path with configurable value when removing a previous auto.conf file. Signed-off-by: Bill Randle <william.c.randle@intel.com>
2016-06-27CreateAutoConf.py: check for empty env history variables before usingBill Randle
I saw this error on a new AB setup: File "/home/pokybuild/yocto-autobuilder/lib/python2.7/site-packages/autobuilder/buildsteps/CreateAutoConf.py", line 181, in start ta_history_repos=ast.literal_eval(os.environ.get('BUILD_HISTORY_THROWAWAY_WHITELIST').encode('utf-8')) exceptions.AttributeError: 'NoneType' object has no attribute 'encode' Since the code above line 181 checks for either BUILD_HISTORY_THROWAWAY_WHITELIST or BUILD_HISTORY_WHITELIST being set, it's possible one of them could be empty. Signed-off-by: Bill Randle <william.c.randle@intel.com>
2016-06-22CreateAutoConf.py: Add optional path and rm of auto.confBeth 'pidge' Flanagan
Normally, we assume auto.conf is in ./build/conf/auto.conf But some people have different layer setups. This allows us to set the path of the auto.conf with a default to it's normal path. This commit also allows us to not remove the auto.conf. This was requested from end users because sometimes they're using a script generated auto.conf that CreateAutoConf ends up stomping. Signed-off-by: Beth 'pidge' Flanagan <pidge@toganlabs.com>
2016-06-01Switch maintainer emails.Beth 'pidge' Flanagan
With this email soon going dead, let's switch the email address. Signed-off-by: Beth 'pidge' Flanagan <pidge@toganlabs.com>
2016-05-26CreateAutoConf.py: Fix if bash statements for buildhistoryElizabeth Flanagan
The bash statements for buildhistory were returning unary operator expected errors. This should fix it for both dash/bash Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>