<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/verify-bashisms, branch 3.3_M2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=3.3_M2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=3.3_M2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2019-05-09T15:31:55+00:00</updated>
<entry>
<title>meta/lib+scripts: Convert to SPDX license headers</title>
<updated>2019-05-09T15:31:55+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2019-05-08T17:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ffae400179fd0b64f8882cf79d78e1c0f2d74bee'/>
<id>urn:sha1:ffae400179fd0b64f8882cf79d78e1c0f2d74bee</id>
<content type='text'>
This adds SPDX license headers in place of the wide assortment of things
currently in our script headers. We default to GPL-2.0-only except for the
oeqa code where it was clearly submitted and marked as MIT on the most part
or some scripts which had the "or later" GPL versioning.

The patch also drops other obsolete bits of file headers where they were
encoountered such as editor modelines, obsolete maintainer information or
the phrase "All rights reserved" which is now obsolete and not required in
copyright headers (in this case its actually confusing for licensing as all
rights were not reserved).

More work is needed for OE-Core but this takes care of the bulk of the scripts
and meta/lib directories.

The top level LICENSE files are tweaked to match the new structure and the
SPDX naming.

(From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>verify-bashisms: use argparse, add verbose option</title>
<updated>2017-11-30T10:49:20+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2017-11-09T12:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a67c4f3f6f7df4080f665904fc9ab1e000041992'/>
<id>urn:sha1:a67c4f3f6f7df4080f665904fc9ab1e000041992</id>
<content type='text'>
(From OE-Core rev: 5168ecf6545ddde03bb801e4200d8a6563789be3)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>verify-bashisms: support warnings with more than one line of source code</title>
<updated>2017-01-31T15:28:41+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2017-01-31T12:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d99b29838dd72394803a279fc26ee3201dd2c557'/>
<id>urn:sha1:d99b29838dd72394803a279fc26ee3201dd2c557</id>
<content type='text'>
All warnings start with "possible bashism in", followed by one or more
(in the case of line continuation) lines of source code. To support
more than one line, we now split by matching against the known intro
text.

Example:

 $ verify-bashisms guile
 ...
 /.../openembedded-core/meta/recipes-devtools/guile/guile_2.0.13.bb
  possible bashism in guile_cross_config line 94 ($'...' should be "$(printf '...')"):
         	echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
 			&gt; ${B}/guile-config.cross

(From OE-Core rev: e2dd3621c45e854b4eb054b4d4537487462cdd39)

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>verify-bashisms: check scripts only once, include original file and line</title>
<updated>2017-01-31T15:28:41+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2017-01-31T12:50:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0b95e47180588306ad72f6ee0a6a65937a2c74b0'/>
<id>urn:sha1:0b95e47180588306ad72f6ee0a6a65937a2c74b0</id>
<content type='text'>
Several scripts that are defined in .bbclass files end up in multiple
different recipes. It's better (faster, less repetitive error reports)
to check them only once.

In addition, the real information for the developer is where he can
find the script, not which recipe file uses it. verify-bashisms now
prints the original file instead of the recipe whenever possible
(i.e. 'filename' is set) and also bumps the line number so that it is
relative to the file and not the script.

Example with one real error and one added just for testing:

  $ verify-bashisms core-image-minimal core-image-sato
  Loading cache: 100% |#################################################################################| Time: 0:00:00
  Loaded 2935 entries from dependency cache.
  Parsing recipes: 100% |###############################################################################| Time: 0:00:01
  Parsing of 2137 .bb files complete (2101 cached, 36 parsed). 2935 targets, 412 skipped, 0 masked, 0 errors.
  Generating scripts...
  Scanning scripts...

  /.../openembedded-core/meta/classes/populate_sdk_ext.bbclass
   possible bashism in install_tools line 515 (should be 'b = a'):
  	if [ "${SDK_INCLUDE_TOOLCHAIN}" == "1" -a ! -e $unfsd_path ] ; then
   possible bashism in install_tools line 521 (type):
            type fixme

(From OE-Core rev: ca4932b60f464430266cc43e34122b2973e8a200)

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>verify-bashisms: revise update-rc.d whitelist entry</title>
<updated>2017-01-31T15:28:41+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2017-01-31T12:50:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3108bff175850914c71e02c47bac467f59661296'/>
<id>urn:sha1:3108bff175850914c71e02c47bac467f59661296</id>
<content type='text'>
The actual code recently changed to:
   if ${@use_updatercd(d)} &amp;&amp; type update-rc.d &gt;/dev/null 2&gt;/dev/null; then

(From OE-Core rev: 32ae3e686db067a2a63932782970db79eb1703e8)

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>verify-bashisms: fix problems with tinfoil2</title>
<updated>2017-01-31T15:28:41+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2017-01-31T12:50:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=010f9fa86a993554e2b9134e6baf96899649a2ef'/>
<id>urn:sha1:010f9fa86a993554e2b9134e6baf96899649a2ef</id>
<content type='text'>
tinfoil2 is based on a client/server architecture, which broke the
verify-bashisms script:

- The tinfoil instance and its data proxies can't be pickled, so
  all interaction with the bitbake server has to run in the main
  script process and only processing of the plain scripts can
  be done with multiprocessing:

  _pickle.PicklingError: Can't pickle &lt;class 'bb.tinfoil.TinfoilCookerAdapter.TinfoilRecipeCacheAdapter'&gt;: attribute lookup TinfoilRecipeCacheAdapter on bb.tinfoil failed

- The multiprocessing pool has to be created before initializing
  tinfoil, otherwise the pool workers end up trying to communicate
  with the bitbake server during shutdown:

  ERROR: UI received SIGTERM
  Process ForkPoolWorker-2:
  Traceback (most recent call last):
    File "/usr/lib/python3.4/multiprocessing/process.py", line 257, in _bootstrap
      util._exit_function()
    File "/usr/lib/python3.4/multiprocessing/util.py", line 286, in _exit_function
      _run_finalizers(0)
    ...
    File "/usr/lib/python3.4/multiprocessing/process.py", line 131, in is_alive
      assert self._parent_pid == os.getpid(), 'can only test a child process'
   AssertionError: can only test a child process

- func() needs to defined before creating the pool to avoid:

  AttributeError: Can't get attribute 'func' on &lt;module '__main__' from '/work/openembedded-core/scripts/verify-bashisms'&gt;

(From OE-Core rev: aa439f11c7f414774843720d68ebe0a6d3375ea6)

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>verify-bashisms: explicitly shut down server</title>
<updated>2017-01-31T15:28:41+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2017-01-31T12:50:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=48c65ddaa4d224848a96dff9a459ee715495a5eb'/>
<id>urn:sha1:48c65ddaa4d224848a96dff9a459ee715495a5eb</id>
<content type='text'>
Current tinfoil2 requires manually shutting down the server.
Without that, the script hangs during exit. This might change
in the future.

(From OE-Core rev: 62f42ce063115f4a02c219e323252223818a150f)

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>verify-bashisms: point out where to get checkbashisms.pl</title>
<updated>2017-01-31T15:28:40+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2017-01-31T12:50:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=83469f229dc30af53e593713ab2229a288ace662'/>
<id>urn:sha1:83469f229dc30af53e593713ab2229a288ace662</id>
<content type='text'>
The current SourceForge project seems to be unmaintained (last release
2.0.0.2 from 2015) while the copy used by Debian is quite active (last
commit 2016-09-30).

Ideally, checkbashisms.pl should get installed automatically via a
recipe, but for now at least provide the link for manual installation.

(From OE-Core rev: 65e74348b4ed40b24671776410d2a579dcc7abab)

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>verify-bashisms: fix typo</title>
<updated>2017-01-31T15:28:40+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2017-01-31T12:50:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=15a97dea65778e38b77a8787004cf30da716fb59'/>
<id>urn:sha1:15a97dea65778e38b77a8787004cf30da716fb59</id>
<content type='text'>
Variable was renamed, it's now called "output".

(From OE-Core rev: c3d125b4132e5a706f6265a5bcaedafbe8e5355f)

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts: remove True option to getVarFlag calls</title>
<updated>2016-12-16T10:23:23+00:00</updated>
<author>
<name>Joshua Lock</name>
<email>joshua.g.lock@intel.com</email>
</author>
<published>2016-12-14T21:13:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6bba41832b465fa8c13243a5ad5f07309c2371b4'/>
<id>urn:sha1:6bba41832b465fa8c13243a5ad5f07309c2371b4</id>
<content type='text'>
getVarFlag() now defaults to expanding by default, thus remove the
True option from getVarFlag() calls with a regex search and
replace.

Search made with the following regex:
getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\)

(From OE-Core rev: 3e4806063fe11092b2307f113a6c0b0f04104091)

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
