Go to file
Yann E. MORIN 5f253e3e04 support/scripts/cve: fix running on older ijson versions
Commit 22b6945552 (support/scripts/cve.py: switch from NVD to FKIE for
the JSON files) had to change the decompressor from gz to xz, as the new
location is using xz compression.

That commit mentioned that it was spawning an external xz process to do
the decompression, on the pretence that "there is no xz decompressor in
Python stdlib."

Before version 3.1, ijson.items() only accepted a file-like object as
input (that file-like object could yield bytes() or str(), both were
supported). Starting with version 3.1, ijson.items() also accepts that
it be directly passed bytes() or str() directly. subprocess.check_output()
means we are now passing bytes() to ijson.items(), so it fails on ijson
versions before 3.1, with failures such as:

    [...]
      File "/usr/lib/python3/dist-packages/ijson/backends/python.py", line 25, in Lexer
        if type(f.read(0)) == bytetype:
    AttributeError: 'bytes' object has no attribute 'read'

Ubuntu 20.04, on which the pkg-stats run to generate the daily report,
only has ijson 2.3. More recent distros have more recent versions of
ijson, like Fedora 39 that has 3.2.3, recent enough to support being fed
bytes(). Commit 22b6945552 was tested on Fedora 39, so did not catch
the issue.

However, the reasoning in 22b6945552 is wrong: there *is* the lzma
module, at least since python 3.3 (that is, aeons ago), which is able to
read xz-compressed files; it also has an API similar to the gzip module,
and can provide a file-like object that exposes the decompressed data.

So, do just that: provide an lzma-wrapped file-like object to ijson, so
that we can eventually recover our daily reports that everything is
broken! :-]

Note that this construct still works on recent versions!

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-02-29 18:47:16 +01:00
arch arch: add support 16k page size on ARM64 2024-01-19 21:19:33 +01:00
board board/freescale: imx9-bootloader-prepare.sh: fix script 2024-02-14 10:03:55 +01:00
boot boot/barebox: install all barebox images if none were specified 2024-02-25 08:47:21 +01:00
configs configs/wandboard: update U-Boot and kernel 2024-02-12 23:00:13 +01:00
docs Update for 2024.02-rc1 2024-02-25 12:43:07 +01:00
fs fs/cpio: allow users to provide their own dracut modules 2023-02-06 22:46:35 +01:00
linux {linux, linux-headers}: bump 4.19.x / 5.{4, 10, 15}.x / 6.{1, 6}.x series 2024-02-24 11:12:27 +01:00
package package/libheif: fix libjpeg build 2024-02-29 17:07:16 +01:00
support support/scripts/cve: fix running on older ijson versions 2024-02-29 18:47:16 +01:00
system package/openrc: fix uclibc handling 2023-11-29 10:00:43 +01:00
toolchain toolchain/toolchain-bare-metal-buildroot: wire up newlib-bare-metal 2024-02-06 17:57:20 +01:00
utils utils/checkpackagelib: add check for CPE variables set to default values 2024-02-11 16:30:59 +01:00
.checkpackageignore Revert "package/python3: bump version to 3.12.1" 2024-02-24 11:34:40 +01:00
.clang-format .clang-format: initial import from Linux 5.15.6 2022-01-01 15:01:13 +01:00
.defconfig
.editorconfig editorconfig: fix wildcard expansion 2023-12-20 21:32:06 +01:00
.flake8 Revert ".flake8: fix check for 80/132 columns" 2021-01-02 17:38:20 +01:00
.gitignore
.gitlab-ci.yml support/misc/gitlab-ci.yml.in: retry a job only if it failed due to a runner issue 2023-08-27 10:09:37 +02:00
.shellcheckrc utils/check-package: improve shellcheck reproducibility 2022-07-25 23:52:47 +02:00
CHANGES Update for 2024.02-rc1 2024-02-25 12:43:07 +01:00
Config.in Config.in: change default optimization level from -Os to -O2 2024-01-07 17:59:48 +01:00
Config.in.legacy package/tinymembench: drop package 2024-02-11 22:41:24 +01:00
COPYING
DEVELOPERS support/testing: add sox runtime test 2024-02-25 08:44:22 +01:00
Makefile Update for 2024.02-rc1 2024-02-25 12:43:07 +01:00
Makefile.legacy
README docs: move the IRC channel away from Freenode 2021-05-29 22:16:23 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches