summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2015-04-08wic: rawcopy: ensure comparison is done on intAlexandre Belloni
The size comparison may fail because it is done on strings rather than integers. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-08wic: code cleanup: unused importsEd Bartosh
Fixed pylint warning 'Unused import' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-08wic: code cleanup: bad indentationEd Bartosh
Fixed pylint warning 'Bad indentation' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-29combo-layer: fix file_exclude for empty commitsPatrick Ohly
The code detecting empty patches after removing files with file_exclude failed for commits which were already empty before (like the initial commit in some repos): such patches are completely empty files, without a From line. Detect that case and just let the normal empty patch detection deal with it. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-29combo-layer: fix file_exclude for dest_dir = .Patrick Ohly
"filterdiff -x ./some/file" does not remove changes for some/file. We must be more careful about constructing the path name and only add the prefix when it really means a directory. While at it, also better normalize the path in copy_selected_files() early on, to handle double slashes. Useful should the function ever gets used for something other that dest_dir (which gets normalized in sanity_check()). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-29combo-layer: clean up dest_dir checkingPatrick Ohly
Empty dest_dir is basically undocumented behavior. The sample conf only mentions using just a dot for the current directory. In practice, the empty string does not work because of code like this: def action_splitpatch(conf, args): ... if dest_dir != ".": filerange_root = '%s -x "%s/*"' % (filerange_root, dest_dir) However, the empty string was not explicitly checked for, leading to strange errors when trying to apply patches: [12:50:23] Applying: foobar: xyz fatal: unable to stat newly created file '/foobar': No such file or directory This patch turns the empty string into an alias for the dot. This seems more user-friendly than throwing an error. This alias is intentionally not document in the sample conf, because the dot is clearer and works also with older copies of combo-layer. Instead of checking for both all the time and normalizing the path when needed (as done in some places), rewrite the value in sanity_check() and then only check for '.'. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-29oe-git-proxy: Redirect error messages to STDERRJuro Bystricky
oe-git-proxy script needs socat. If socat is not found, an error message is issued on STDOUT. This leads to a misleading git message: fatal: protocol error: bad line length character: ERRO instead of the intended message: ERROR: socat binary not in PATH Redirecting the error message to STDERR fixes this issue. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-22postinst_intercept script: drop pipeMatthieu Crapet
Avoid useless subshell. There's no word splitting in variable assignment. Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20scripts/combo-layer: Handle update with no repo/revision specifiedRichard Purdie
Running an update operation with no repo/revision specified was failing. This fixes that code path which worked until the change from: http://git.yoctoproject.org/cgit.cgi/poky/commit/scripts/combo-layer?id=3592507a149b668c0a925e176535f7f2002fa543 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20recipetool: fix duplicate licenses being picked upPaul Eggleton
If a license file matched more than one of the specifications (e.g. COPYING.GPL) then it was being added to LIC_FILES_CHKSUM more than once. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: deploy-target: add dry-run optionPaul Eggleton
Add a dry-run option to the deploy-target and undeploy-target subcommands so you can see the list of files to be deployed or un-deployed before actually carrying out the operation. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: deploy-target: add an option to disable quiet modePaul Eggleton
The -q option to scp does stop the progress being shown, which is mostly superfluous, however it also stops errors from ssh being shown - if there's a problem, you'll just get "lost connection" which really isn't that helpful. As a compromise, add a -s/--show-status option and advertise this when the command fails. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: deploy-target: detect and error if D is emptyPaul Eggleton
If you haven't built the recipe yet or if the output directory (${D}) is empty, then we should tell the user rather than have scp error out. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: deploy-target: allow disabling host key checkingPaul Eggleton
If you're testing with multiple images/devices that have the same IP address / hostname then it can be annoying to deal with host key mismatches all of the time. As a MITM attack is unlikely in the local test environment, provide a command line option to pass the appropriate options to scp/ssh to disable the host key checking. Note: if you wish to apply this permanently, the best way is to do it through your ssh configuration e.g. by adding the following to your ~/.ssh/config: Host 192.168.7.2 UserKnownHostsFile=/dev/null StrictHostKeyChecking no Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: modify/extract: prevent usage with incompatible recipesPaul Eggleton
Consolidate code for checking compatible recipes and consider meta and packagegroup recipes as well as package-index and gcc-source to be incompatible. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: modify: get correct initial revision from previously extracted ↵Paul Eggleton
source tree If you point devtool modify to a source tree previously created by devtool modify or devtool extract, then we need to try to pick up the correct initial revision so that devtool update-recipe knows where to start looking for commits that match up with patches in the recipe. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: reset: add ability to reset entire workspacePaul Eggleton
Add a -a/--all option to allow you to quickly reset all recipes in your workspace. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: name command line parsers appropriatelyPaul Eggleton
No functional changes, just use a unique name for each parser. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: deploy-target: fix deploying to previously deployed machinePaul Eggleton
* Pass correct arguments to undeploy() function * If an error occurs during undeploy(), exit instead of continuing Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer-hook-default.sh: handle patches without Signed-off-byPatrick Ohly
Inserting the "From rev" comment depended on having at least one Signed-off-by line in the patch header. Some old repository commits in openembedded-core and bitbake do not have those. When inporting those, just insert at the end of the patch header. While doing so, ensure that there's exactly one blank line since the last non-blank line. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer-hook-default.sh: beware of embedded patchesPatrick Ohly
Patching the subject line must be limited to the subject of the main patch itself. In particular, git formatted patches embedded in the patch must not be changed. Achieved by limiting the replacement to the lines until the first subject in the patch, just as it is done for modifying the first Signed-off-by. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer-hook-default.sh: avoid duplicating prefixPatrick Ohly
The existing patch might already have the desired prefix, perhaps even multiple times (due to some previous import error). Ensure that after the replace, the prefix is present exactly once. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer: partial import for '--history init'Patrick Ohly
The new "since_revision" property can be used to cut off the imported history at some point. This is useful to keep the resulting repository smaller while still preserving enough history that "git annotate" reports the right author and commit for most lines. The initial, squashed import commit shows up with "unknown" as author in the "git annotate" output. It has the repository name as prefix in the subject line; importing that commit works best with a layer hook which does not add the repository name again when it is already present. Adding it here is useful for hooks which do not extend the subject line. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer: combine trees via replacement objectsPatrick Ohly
Instead of local graft entries rooting the imported branches in the shared root commit, use replacement objects. The advantage is that they get moved around by "git push" and "git fetch", so everyone has the same, nicer view with everything starting at the beginning of the combined repository. If undesired, these objects can be removed with "git replace". Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer: init with full historyPatrick Ohly
The new --history parameter enables a new mode in "combo-layer init" where it copies the entire history of the components into the new combined repository. This also imports merge commits. Moving into a destination directory and applying commit hooks is done via "git filter-branch" of the upstream branch. File filtering uses the same code as before and just applies it to that filtered branch to create the final commit which then gets merged into the master branch of the new repository. When multiple components are involved, they all get merged into a single commit with an octopus merge. This depends on a common ancestor, which is grafted onto the filtered branches via .git/info/grafts. These grafts are currently left in place. However, they do not get pushed, so the local view on the entire history (all branches rooted in the initial, empty commit, temporarily diverging and then converging) is not the same as what others will see (branches starting independently and converging). Perhaps "git replace" should be used instead. The final commit needs to be done manually, as before. A commit message with some tracking information is ready for use as-is. This information should be sufficient to implement also "combo-layer update" using this approach, if desired. The advantage would be that merge commits with conflict resolution would not longer break the update. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer: update() also instance propertyPatrick Ohly
The Configuration class mirrors all properties in local hashes. When updating the configuration, also update these properties to remain consistent. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer: exclude filesPatrick Ohly
Some combined repos intentionally do not include certain files. For example, Poky does not include bitbake's setup files and OE-core's sample files under meta/conf. When these files get modified in the upstream repository, applying the patches fails and requires manual intervention. That is merely a nuisance for someone familiar with the problem, but a real show stopper when having the import run automatically or by someone less experienced. Therefore this change introduces "file_exclude", a new per-repo list of file patterns which removes all matching files when initializing or updating a combined repository. Because fnmatch is used under the hood to match full path strings, removing entire directories must be done with a pattern ending in a '/*' (in contrast to file_filter). For Poky, the additional configuration looks like this: [bitbake] ... file_exclude = classes/base.bbclass conf/bitbake.conf .gitignore MANIFEST.in setup.py TODO [openembedded-core] ... file_exclude = meta/conf/bblayers.conf.sample meta/conf/local.conf.sample meta/conf/local.conf.sample.extended meta/conf/site.conf.sample Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer: runcmd() with separate outputPatrick Ohly
Allow the caller to specify a separate output stream. stderr is always a temporary file opened by runcmd(), so read from that to capture output for error reporting *and* the return value. The reasoning for the latter is a) that this preserves the traditional behavior when out=None and b) if the caller wants the content of stdout, it can read from the stream itself, which is not possible for the temporary stderr. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer: make Signed-off-by optionalPatrick Ohly
It depends on the diligence of the person running the combo-layer tool whether the Signed-off-by line added to each commit actually indicates that the person was involved in validating the change. When the import is purely automatic, it is better to not add the line, because the history is more useful without it (searching for the person really only lists changes he or she was involved with) and it would be a false statement. The 'signoff' property can be set per repository, like every other property. But setting it in the special [DEFAULT] section is more useful, so that is what the example shows. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20combo-layer: let user choose where properties get updatedPatrick Ohly
When updating a property (at the moment, only 'last_revision'), first check whether the user already added it to the main config. If so, update there even if there is a local config. This way, 'last_revision' can be shared between developers as part of the repository while still configuring per-developer repo paths outside of the git repository in a local config. An example of a repository which is set up like that is tizen-distro, with instructions for such a collaborative maintenance found here: https://review.tizen.org/git/?p=scm/bb/tizen-distro.git;a=blob;f=README;hb=refs/heads/tizen-ivi Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20runqemu-internal: Add cpio support for qemux86 so that we can boot poky-tiny ↵Richard Purdie
images poky-tiny generates cpio.gz images, add support for these so we can boot them using runqemu. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20scripts/runqemu: Allow FSTYPE to be changed from the environmentRichard Purdie
Currently its not possible to change FSTYPE from the environment but it would be useful to do so where multiple image types have been generated. This adds that possibility. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20wic: Consider PSEUDO_* environment variablesEd Bartosh
Used default values of PSEUDO_* environment variables only if variables are not set. This allows to set custom PSEUDO_PREFIX and other pseudo variables in order to use pseudo database from non-standard locations. Change-Id: I0bc1af5e521121d1f96d590cb6edb23cf0cb0b83 Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-16postinst-intercepts/update_font_cache: fix ownership of fontconfig cacheJonathan Liu
The file ownership of the cache files in /var/cache/fontconfig needs to be set to root:root otherwise it inherits the user and group id of the build user. [YOCTO #7411] Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-16test-dependencies.sh: strip only .bb suffixMartin Jansa
* we were stripping too much when stripping recipe name from line like this: ERROR: Task 12016 (/some/patch/something.dot.bar.bb, do_fetch) failed with exit code '1' where the recipe name contains dots and doesn't end with _<version>.bb * apply the same fix as 8c9a25ae70d249b823ab2b0385d539eb8bbc1374 while building individual recipes Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-16oe-setup-builddir: output message cleanupBenjamin Esquivel
Moved a Yoctoproject documentation banner to the end of the first-time run messages section [YOCTO #7368] Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-09create-pull-request: fix git GIT_VERSIONRobert Yang
If the git version is 1.7.9.5, then 1795 is bigger than 210 which causes errors like: fatal: No such ref: :rbt/bash fatal: Needed a single revision ERROR: git request-pull reported an error Use the first 3 numbers to fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-09wic: rawcopy: support skippingAlexandre Belloni
Add support for skipping the beginning of a file with the rawcopy plugin. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-09wic: add fsimage pluginAlexandre Belloni
The fsimage plugin allows to add an already existing filesystem image in the partition layout. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-09wic: fix fstab generationAlexandre Belloni
Commit 0a6668f6e60b4195ff4163c00fc972bacdb27b4b still included some debug and is not working properly as the new fstab is generated too late. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-09scripts/send-error-report: Rework script to support new featuresMichael Wood
- Add arguments to allow for non-prompted sending, json encoded response and link backs. - Add feature to check the server's max_log_size - Add feature to allow reviewing of the final data - Be a bit more helpful if the expected fields aren't filled in instead of exiting. - Remove the redundant urlencode - Add a user-agent so that the server can identify the encoding method. - Remove custom proxy handling - urllib should 'just work' [YOCTO #6736] [YOCTO #7245] [YOCTO #7105] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-05scripts/runqemu: clarify help textBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23scripts/oe-buildenv-internal: add means of skipping SDK check during setupRandy Witt
The oe-buildenv-internal script checks if the user is already in an sdk environment and errors if true. Add a way to skip this check. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23gen-lockedsig-cache: Allow cross-filesystem copies.Randy Witt
Since this previously always tried to use hardlinks you couldn't have the source and destination be on different devices. This change allows for that and also prevents failure in situations where the files already existed. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23Python: Upgrade from 2.7.3 to 2.7.9:Alejandro Hernandez
- Based on Paul Eggletons work to partially upgrade to Python 2.7.6 Modified: default-versions.inc: switched to python 2.7.9 generate-manifest-2.7.py: fixed _sysconfigdata python-2.7-manifest.inc: fixed _sysconfigdata python.inc: Updated checksums and source, no LICENSE change just updated some dates python-native_2.7.3 -> python-native_2.7.9 and updated patches python_2.7.3 -> python_2.7.9, and added ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no in EXTRA_OECONF to solve python issue #3754, only needed when cross compiling, also updated patches use_sysroot_ncurses_instead_of_host.patch: New patch to use ncursesw from sysroot instead of hosts, introduced by fix for python issue #15268 Rebased: 01-use-proper-tools-for-cross-build.patch 03-fix-tkinter-detection.patch 05-enable-ctypes-cross-build.patch 06-avoid_usr_lib_termcap_path_in_linking.patch avoid_warning_about_tkinter.patch builddir.patch fix_for_using_different_libdir.patch host_include_contamination.patch multilib.patch nohostlibs.patch search_db_h_in_inc_dirs_and_avoid_warning.patch Deleted (fixed on upstream): 06-ctypes-libffi-fix-configure.patch CVE-2013-4073_py27.patch gcc-4.8-fix-configure-Wformat.patch json-flaw-fix.patch posix_close.patch pypirc-secure.patch python-2.7.3-CVE-2012-2135.patch python-2.7.3-CVE-2013-1752-smtplib-fix.patch python-2.7.3-CVE-2014-1912.patch python-2.7.3-CVE-2014-7185.patch python-2.7.3-berkeley-db-5.3.patch python-fix-build-error-with-Readline-6.3.patch remove-BOM-insection-code.patch remove_sqlite_rpath.patch python2.7.3-nossl3.patch [YOCTO #7059] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
2015-02-23devtool: fix broken clones of git recipesPaul Eggleton
Because we move the workdir when extracting source, then move the source and delete the temporary workdir, you lose the indirection symlink pointed to by the alternates file (which is created when the fetcher clones it from DL_DIR with -s) and the resulting repository is broken. In any case, for a source repo that the user may put their own changes into, we can't really rely on a clone made with -s in case the original goes away - because of cleanall, DL_DIR disappearing, etc. So repack the repository so that it is a complete, non-shared clone after unpacking. (While I'm at it, add a test for devtool modify with a git recipe which verifies that this works.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: support source extraction for recipes that use a shared workdirPaul Eggleton
Enable source extraction used by devtool extract / devtool modify -x for recipes that use a shared workdir (e.g. the kernel and gcc). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: modify: handle recipes that use a shared workdirPaul Eggleton
If S is outside of WORKDIR then we shouldn't try to get the relative path in order to work out where the source subdirectory is as we do by default. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: prevent extract/modify use with image recipesPaul Eggleton
There wouldn't be any point to using these with an image recipe, so disallow it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: update-recipe: add handling for git recipesPaul Eggleton
When updating git-based recipes, in a lot of cases what you want is to push the changes to the repository and update SRCREV rather than to apply patches within the recipe. Updating SRCREV is now the default behaviour for recipes that fetch from git, but this can be overridden in both directions using a new -m/--mode option. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>