Commit Graph

60879 Commits

Author SHA1 Message Date
Joachim Wiberg
8fddaf36ed .clang-format: initial import from Linux 5.15.6
Intended as an aid when working with in-tree C files, like makdevs.c.

Unlike for the kernel, which still has an 80-char limit line (but they
decided not to enforce it [0]), we set the limit to 132-char for us,
like we do for the python code (see ./.flake8).

[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bdc48fa11e46f867ea4d75fa59ee87a7f48be144

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
[yann.morin.1998@free.fr: use and explain the 132-char limit)
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 15:01:13 +01:00
Joachim Wiberg
e745c0b92d package/makedevs: allow recursive on directory with dangling symlinks
When using BR2_ROOTFS_DEVICE_TABLE to change ownership of /etc, like so:

  /etc        r  -1 root     wheel     - - - - -

makedevs fails due to trying to chown() a dangling symlink:

  makedevs: chown failed for /src/myLinux/output/build/buildroot-fs/ext2/target/etc/mtab: No such file or directory
  makedevs: line 25: recursive failed for /src/myLinux/output/build/buildroot-fs/ext2/target/etc: No such file or directory
  make[2]: *** [fs/ext2/ext2.mk:63: /src/myLinux/output/images/rootfs.ext2] Error 1
  make[1]: *** [Makefile:84: _all] Error 2
  make[1]: Leaving directory '/src/myLinux/buildroot'

This patch changes chown() to lchown() in two cases in makedevs.c when
the argument can be a symlink, dangling or not.

In case the recursive operation includes a chmod() as well, explicitly
exclude symlinks that are dangling, because chmod() always operates on
the link target.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 14:27:17 +01:00
Fabrice Fontaine
e644e5df39 package/rsyslog: enable options when libcurl is enabled
Following the bump to 8.1910.0, items requiring libcurl were
disabled by default. This patch selectively enables options
which depend on libcurl when that package is enabled in the
build.

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
[Fabrice: Disable mmkubernetes which also depends on lognorm and while
at it also disable mmnormalize which is available since version 6.1.2
(from 2010) and
b9d3cdceab]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 14:06:14 +01:00
Fabrice Fontaine
20dd9453f3 package/dhcpcd: add BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP
Add BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP following Arnout feedback:
https://patchwork.ozlabs.org/project/buildroot/patch/20210303091904.467706-1-fontaine.fabrice@gmail.com

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 14:02:41 +01:00
Fabrice Fontaine
5b9c58531e package/sslh: bump to version 1.22c
- pcre2 is mandatory since version 1.22b and
  37d2756703
- Drop patch (not needed anymore)

https://github.com/yrutschle/sslh/blob/v1.22c/ChangeLog

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 12:02:54 +01:00
Fabrice Fontaine
663f39c88c package/freeipmi: new package
FreeIPMI provides in-band and out-of-band IPMI software based on the
IPMI v1.5/2.0 specification.

The IPMI specification defines a set of interfaces for platform
management and is implemented by a number vendors for system management.
The features of IPMI that most users will be interested in are sensor
monitoring, system event monitoring, power control, and serial-over-LAN
(SOL).

https://www.gnu.org/software/freeipmi/

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 12:00:31 +01:00
Peter Seiderer
d6dfb23a40 package/assimp: fix namespace related compile failure
Fixes:

  - http://autobuild.buildroot.net/results/0861c66ec02a55e984577094e28b65c78b95a330

  .../build/assimp-5.1.4/code/AssetLib/Blender/BlenderScene.cpp:101:33: error: specialization of 'template<class T> void Assimp::Blender::Structure::Convert(T&, const Assimp::Blender::FileDatabase&) const' in different namespace [-fpermissive]
           const FileDatabase &db) const {
                                   ^
 In file included from .../build/assimp-5.1.4/code/AssetLib/Blender/BlenderScene.h:49:0,
                   from .../build/assimp-5.1.4/code/AssetLib/Blender/BlenderScene.cpp:47:
  .../build/assimp-5.1.4/code/AssetLib/Blender/BlenderDNA.h:266:10: error:   from definition of 'template<class T> void Assimp::Blender::Structure::Convert(T&, const Assimp::Blender::FileDatabase&) const' [-fpermissive]
       void Convert(T &dest, const FileDatabase &db) const;
            ^
  .../build/assimp-5.1.4/code/AssetLib/Blender/BlenderScene.cpp:121:33: error: specialization of 'template<class T> void Assimp::Blender::Structure::Convert(T&, const Assimp::Blender::FileDatabase&) const' in different namespace [-fpermissive]
           const FileDatabase &db) const {
                                   ^
  In file included from .../build/assimp-5.1.4/code/AssetLib/Blender/BlenderScene.h:49:0,
                   from .../build/assimp-5.1.4/code/AssetLib/Blender/BlenderScene.cpp:47:
  .../build/assimp-5.1.4/code/AssetLib/Blender/BlenderDNA.h:266:10: error:   from definition of 'template<class T> void Assimp::Blender::Structure::Convert(T&, const Assimp::Blender::FileDatabase&) const' [-fpermissive]
       void Convert(T &dest, const FileDatabase &db) const;
            ^

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[yann.morin.1998@free.fr: update upstream status]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:39:55 +01:00
Fabrice Fontaine
06735b085f package/nodejs: bump to version 14.18.2
This bump will fix the following build failure raised since bump of
python3 to version 3.10.1 in commit
25b1fc2898:

Please use python3.9 or python3.8 or python3.7 or python3.6 or python3.5 or python2.7.
	/usr/bin/python3.7 ./configure
	/usr/bin/python3.5 ./configure
	/home/peko/autobuild/instance-1/output-1/host/bin/python2.7 ./configure
Node.js configure: Found Python 3.10.1...

https://github.com/nodejs/node/releases/tag/v14.18.2

Fixes:
 - http://autobuild.buildroot.org/results/9e2ebb9c3681ec0485eaa042fa838c8ee62f649b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Tested-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:26:49 +01:00
Fabrice Fontaine
c87659ec80 package/libexecinfo: needs dynamic library
Fix the following build failure raised since the addition of the package
in commit eea8ba446c:

execinfo.c:32:10: fatal error: dlfcn.h: No such file or directory
   32 | #include <dlfcn.h>
      |          ^~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/ea33c8c6aa5091983837609eec5d129902183ef1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:26:16 +01:00
Alexey Brodkin
ef7ace1017 package/openjdk: Make sure for ARC only Zero is selectable
Commit a5d2c379eb (package/openjdk: add ARC HS3x/4x support via "Zero
Assembly Project") forgot to limit the scope of the ARC support.

As of now for ARC we only have fully-interpreted mode AKA "Project Zero"
and so all the JIT'ed modes must be explicitly disabled for ARC.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:17:52 +01:00
Fabrice Fontaine
6990000654 package/libzip: bump to version 1.8.0
- Drop patches (already in version)
- Add zstd optional dependency

https://libzip.org/news/release-1.8.0.html

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:09:18 +01:00
Fabrice Fontaine
d38b72bcd7 package/file: bump to version 5.41
- Drop patch (already in version) and so autoreconf
- Update hash of vasprintf.c (changes not related to license:
  8081665158
  43f7989076)

https://github.com/file/file/blob/FILE5_41/ChangeLog

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:09:15 +01:00
Fabrice Fontaine
a252a2852d package/shairport-sync: bump to version 3.3.9
Drop second patch (already in version)

https://github.com/mikebrady/shairport-sync/releases/tag/3.3.9

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:09:12 +01:00
Fabrice Fontaine
9865dc01dd package/gawk: bump to version 5.1.1
https://git.savannah.gnu.org/cgit/gawk.git/tree/NEWS?h=gawk-5.1.1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:09:10 +01:00
Fabrice Fontaine
d18582d941 package/ogre: disable csharp
Disable csharp to avoid the following build failure with python since
bump to version 1.12.12 in commit
4e814227ca and
3fd839c76a:

/bin/sh: 1: mcs: not found

Fixes:
 - http://autobuild.buildroot.org/results/5f384dbed8e5241f91072bfffa54ba6b9c509751

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Acked-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:07:52 +01:00
Fabrice Fontaine
ae54331db3 package/python3: requires blake2 support in openssl
Fix the following build failure raised since bump to version 3.10.1 in
commit 25b1fc2898:

/home/buildroot/autobuild/instance-3/output-1/build/python3-3.10.1/Modules/_hashopenssl.c:244:22: error: implicit declaration of function 'EVP_blake2s256'; did you mean 'LN_blake2s256'? [-Werror=implicit-function-declaration]
  244 |             digest = EVP_blake2s256();
      |                      ^~~~~~~~~~~~~~
      |                      LN_blake2s256

Fixes:
 - http://autobuild.buildroot.org/results/9112571b75aebb0ba5032ef1b16226d9848f5184

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:06:56 +01:00
Adam Duskett
57edd417c5 package/libimxvpuapi: switch to using host-python3
This package builds just fine with python3.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 11:02:54 +01:00
James Hilliard
d943a4ede0 package/python-aiofiles: bump to version 0.8.0
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:50:47 +01:00
James Hilliard
d25064b907 package/python-aioconsole: bump to version 0.3.3
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:50:45 +01:00
James Hilliard
b9dbed1ca6 package/python-aiohttp-session: bump to version 2.10.0
License hash changed due to full text removal:
6a1c7f0efe

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:50:42 +01:00
James Hilliard
f72c1355f0 package/python-aiorwlock: bump to version 1.2.0
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:50:40 +01:00
James Hilliard
a27ad5ca24 package/python-async-timeout: bump to version 4.0.2
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:50:38 +01:00
James Hilliard
fd3550f179 package/python-aiosignal: bump to version 1.2.0
License file renamed in:
98b25a33d0

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:50:35 +01:00
James Hilliard
bfb1265750 package/python-aiohttp-remotes: bump to version 1.1.0
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:50:33 +01:00
James Hilliard
f6d2ad9b35 package/python-aiohttp: bump to version 3.8.1
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:50:31 +01:00
James Hilliard
cc5b783b19 package/python-aiohttp-sse: bump to version 2.1.0
License hash change due to full text removal:
307fd35a84

Fixes(python 3.10 compatibility):
  File "/usr/lib/python3.10/site-packages/aiohttp_sse/__init__.py", line 107, in wait
  File "/usr/lib/python3.10/site-packages/aiohttp_sse/__init__.py", line 144, in _ping
TypeError: sleep() got an unexpected keyword argument 'loop'

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:50:29 +01:00
James Hilliard
393614da50 package/python-aiohttp: add aiosignal runtime dependency
Fixes:
  File "/usr/lib/python3.10/site-packages/aiohttp/__init__.py", line 6, in <module>
  File "/usr/lib/python3.10/site-packages/aiohttp/client.py", line 88, in <module>
  File "/usr/lib/python3.10/site-packages/aiohttp/tracing.py", line 5, in <module>
ModuleNotFoundError: No module named 'aiosignal'

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:49:57 +01:00
Adam Duskett
ee21467863 package/libdnet: bump to version 1.14, drop python2 support.
Change the url to the github ofalk repository (SF's repo is MIA; now
everyone and their distros switched over to the Github-hosted fork).

Depend on python3 and host-python3-cython for python bindings.

Remove upstream patches; rework python-makefile.patch to adhere to
git formatting and refresh for 1.14.

Update License hash due to year changes.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
[yann.morin.1998@free.fr: rework commit log, explain switch to Github]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 10:46:24 +01:00
Waldemar Brodkorb
b4efd17526 package/ruby: update to 3.1.0
All patches are upstream. Tested with qemu-system-arm/qemu-system-sparc.

LEGAL license hash changed:
  - drop aclocal.m4, no longer provided
  - add MIT-covered works

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
[yann.morin.1998@free.fr: update license hash]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 09:50:47 +01:00
Romain Naour
bc0edf6e69 flare-{engine,game}: bump to version 1.12
See:
https://flarerpg.org/2021/08/02/flare-1-12/

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 09:40:00 +01:00
Romain Naour
7684604188 package/flare-game: really use LICENSE.txt as license file
The previous version bump [1] added the hash of LICENSE.txt but
forgot to update FLARE_GAME_LICENSE_FILES.

[1] 4d09d1b476

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 09:35:49 +01:00
Romain Naour
1f66c3557a package/flare-engine: enable ogg support in SDL2-mixer via Tremor
Flare games use OGG audio file format througt SDL2-mixer.

Without OGG support, flare-engine trigger a lot of errors in its
log and fail to start the game.

ERROR: SoundManager: ItemManager: Loading sound /usr/share/flare/mods/fantasycore/soundfx/inventory/inventory_gem.ogg (soundfx/inventory/inventory_gem.ogg) failed: Unrecognized audio format

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-01 09:35:47 +01:00
Fabrice Fontaine
9849fa0101 package/libtasn1: fix typo
Fix typo added by commit 30ac432b41

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[yann.morin.1998@free.fr: also fix the variable expansion]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-12-31 18:39:11 +01:00
Fabrice Fontaine
cd5191efd9 package/tcpreplay: security bump to version 4.3.4
- heap buffer overflow in tcpreplay fast_edit_packet
- heap buffer overflow in tcpreplay get_next_packet
- CVE-2020-24266 heap buffer overflow in tcpprep get_l2len
- CVE-2020-24265 heap buffer overflow in tcpprep
- Drop patch (already in version) and so autoreconf
- Update hash of license file (http -> https with
  ad8a180053)

https://github.com/appneta/tcpreplay/releases/tag/v4.3.4

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 23:42:16 +01:00
Bernd Kuhls
eea8ba446c package/libexecinfo: new package
Provides execinfo.h for non-glibc toolchains.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 23:38:57 +01:00
Bernd Kuhls
52bba69dc9 package/vdr: bump version to 2.6.0
Changelog: http://www.tvdr.de/changelog.htm

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 23:37:07 +01:00
James Hilliard
bb77dc0917 package/python-aiohttp: bump to version 3.8.0
License hash change due to removal of license full text:
aca2c99f82

Drop upstream patch.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 23:35:05 +01:00
Thomas Petazzoni
b328a6a852 package/python-setuptools: drop duplicate variable definition
As part of commit
4d2ca2be49 ("package/python-setuptools:
bump to version 59.8.0 and split python2 version"), the
HOST_PYTHON_SETUPTOOLS_NEEDS_HOST_PYTHON was moved next to the other
HOST_* variables, but it was also re-added at the original location
during an (incorrect) review process. Fix that up by dropping the
duplicate definition.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 23:28:56 +01:00
Adam Duskett
25b1fc2898 package/python3: bump to version 3.10.1
- Remove 0013-Add-an-option-to-disable-installation-of-test-module.patch as
  it is now upstreamed.

- Refactor and rename all other patches as necessary.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 22:52:06 +01:00
Adam Duskett
4d2ca2be49 package/python-setuptools: bump to version 59.8.0 and split python2 version
Python setuptools 44.0 is not compatible with python 3.10. Unfortunately,
python-setuptools 59.8.0 is not compatible with python2. As Buildroot is not
ready to end python2 support, the python-setuptools package must accommodate
both the old version for python2 and the new version for python3.10.

Changes include:
 - Add two new directories: package/python-setuptools/44.0.0 and
   package/python-setuptools/59.8.0
 - Add the appropriate patch and hash files to each directory.
 - Modify python-setuptools.mk to support both setuptools 44.0 and 59.8.0
   (setuptools 59.8.0 does not have a .zip on pypi anymore, only a tar.gz)
 - Point the symlinks in package/python3-setuptools to the files in
   package/python-setuptools/59.8.0/

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 22:35:55 +01:00
Yann E. MORIN
da4cb17aa1 Makefile: introduce show-vars, a json-formatted equivalent to printvars
The current printvars output suffers from a serious design flaw:
variables are not delimited, which makes it impossible to reliably
retrieve the value of variables; only variables that are known to
not contain a \n can be relatively safely extracted.

However, in some cases, it is important to be able to retrieve the
multi-line value of a variable, notably the CMDS or the hooks. One
such use-case (to follow in an unscheduled future) would be to hash
the variables that make up a package "configuration", and cache or
extract the files for that package to speed up the build.

Modeled after printvars and show-info, we introduce show-vars (what a
lack of imagination here) that outputs a json dictionary which keys are
the variable names, and for each variable, provides the raw and expanded
values.

Unlike printvars, we do not provide a way to get either the raw or
expanded value; both are systematically printed; a user will get just
the one is needs. Additionally, strings in JSON are quoted, so there is
no need to provide a way to quote variables; that would not make sense.

Note: for printvars, we require that the user provides an explicit
pattern to filter variables on. This is historical (see fd5bd12379,
Makefile: printvars: don't print anything when VARS is not set). The
underlying reasoning was that printvars is too "raw", and variables are
not well delimited, so printvars was mostly used to extract a few values
here and there, from scripts, or to quickly inspect a specific package's
variables during debugging.

But show-vars, although technically plain-text, being JSON, is not very
human-readable, and is mostly aimed at tools that will parse it with a
real JSON parser, and which will want to have a complete view of a lot
of variables at once. As such, and contrary to printvars, it makes sense
to report on all variables by default, unless the user explicitly
requested a subset.

As a final note: a lot of our variables only make sense in the context
of an actual make target. For example, a variable of package foo, that
contains $(@D)/bar, would expand to .../build/FOO-VERSION/bar. This is
because our CMDS and hooks are expanded as the recipe of a stamp file
that lies in the package build directory.

But for show-info, this falls flat on its face: it is not the stamp file
of a package, so there is no package directory, and show-info itself has
not directory part, so $(@D) expands to '.' (dot).

Additionally, some variables may contain calls to $(shell) (e.g. to call
pkg-config), and this also does not work with show-info.

These two issues make it impossible to emit the correct expanded value
of variables. To be noted: printvars has the exact same limitations for
the exact same reasons.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 21:37:02 +01:00
Yann E. MORIN
eb342619e1 core/show-info: also export source and stamp directories in show-info
External tools may need to peek into the source tree (to check what the
list of patches that were applied), or in the stamp directory (to check
and report on the progress of a build)

Currently, both locations are identical, but semantically different
and an internal implementation detail. Exposing both separately will
allow us to change either without breaking users' scripts. Hopefully.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 21:36:01 +01:00
Yann E. MORIN
78afad17bf package/pkg-utils: generate proper JSON strings where they are emitted
Currently, our clean-json macro does two things:
  - remove excessive commas before a closing list or dictionary;
  - escape the backslash.

We are going to need the comma-drop feature of clean-json, but on a
JSON blurb where all the characters, backslash included, are already
all properly escaped, so that we do not need further escape.

So, we drop the backslash escaping from clean-json, and use the newly
introduced mk-json-str helper in every locations where we turn a
Makefile variable into a JSON string.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 21:33:09 +01:00
Yann E. MORIN
467917e2da package/pkg-utils: introduce helper to properly json-escape a string
In quite a few places, we need to generate string that are proper JSON
values or keys.

However, JSON is very strict on what constitute a string, and most JSON
parsers (like jq or python3's json module) are very picky when parsing a
string; any deviation from the spec is immediately sanctioned by a hard
error (jq aborts, python3's json module raise an exception).

Introduce a macro that properly prepares a Makefile value into a valid
JSON string:

  - backslash '\' must be escaped;

  - double-quotes need to be escaped of course, as they are the string
    delimiter in JSON;

  - anything in the range [0x00..0x1F] must be escaped; in practice, we
    only ever need to escape \n, \t, and ESC (we could add more in the
    future if need be);

  - finally, we also escape the space, \x20, so that we can call
    $(strip) on a JSON blurb (like we do for example do build a
    comma-separated list, or when we sanitise the JSON) without losing
    multiple spaces where they make sense.

It would have been nice if we had been able to split the macro on
multiple lines, but spaces creep in from everywhere in that case, and
getting rid of them is getting quite nasty... We could introduce
intermediate macros, but meh...

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 21:32:33 +01:00
Yann E. MORIN
be9ffe3a4e support/misc/utils: introduce $(tab)=\t and $(escape)=\x1b
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 21:31:27 +01:00
Yann E. MORIN
5b00c382fc support/utils: make-comma-list does just that, not quoting
Currently, we have two functions that build a comma-separated list
of items; one is double-quoting the items, while the other is
single-quoting them. Their naming is not very consistent.

Besides, in a followup change, we will need to build a comma-separated
list of items that are already double-quoted.

Introduce a macro that does just build a comma-separated list, and
use that in the two other macros; rename the existing macro so the
naming is consistent.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 21:31:16 +01:00
Yann E. MORIN
f796ac3fed package/pkg-python.mk: do not set empty variables
Similarly to what we just did for conditionally-set-empty variables,
unconditionally setting empty variables serves no purpose in Makefiles,
as unset variables are just expanded as empty...

Even though we have numerous python packages, the speed gain was not
measurable, with delta much less than the noise.

Still, for consistency, we just do not set those variables.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 21:30:23 +01:00
Yann E. MORIN
1f6b283dd9 package/pkg-*.mk: do not conditionally set empty variables
Setting an unset variable to an empty value is useless in make; an unset
variable just expands to an empty string anyway. So what we do currently
has no side effect:

    variable set and not empty   -> variable not modified
    variable set and empty       -> variable not modified
    variable unset               -> set to an empty string

However, additional variables do have an impact on the parsing time of
the Makefiles, and the more variables, the more collisions in the hash
table used internally by make, which slows down the parsing.

By dropping those conditionally-set-empty variables, we gain about 3%:

    Run     Before  After
    1       5.572   5.325
    2       5.434   5.354
    3       5.490   5.320
    4       5.525   5.330
    5       5.476   5.330
    6       5.511   5.434
    7       5.498   5.388
    8       5.524   5.371
    9       5.479   5.346
    10      5.637   5.324
    Mean:   5.515   5.352

Yeah, 0.163s does not look like much, and this does not make
autocompletion any more usable. Still, that 3% gain is not to be
ashamed of either.

Note that there are 3 others case where we do set empty variables, but
those are unconditional and serve other purposes:

  - pkg-virtual: this is done on purpose to avoid a bug when the
    environment may have TOOLCHAIN_VERSION or _SOURCE set, and we really
    want those to be empty, so the assignment is not conditional;

  - pkg-python: the reason for setting those to empty is dubious at
    best; it's been there since the inception of the python infra, back
    in 2013; still, the case is different than this patch addresses;

  - pkg-toolchain-external: this is the case for a toolchain already
    installed, so indeed we want to set _SOURCE and _VERSION to empty.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 21:30:08 +01:00
Giulio Benetti
1b7017c62c package/protobuf: drop dependency on binutils bug 21464
This package build failure has been fixed by using -mcmodel=large that is
now available in external toolchains as well as buildroot toolchains. So
we can drop its dependency on binutils 21464.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 21:15:58 +01:00
Bartosz Bilas
f2ff09f5f9 boot/barebox: bump version to 2021.12.0
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-30 21:15:57 +01:00