Commit Graph

61209 Commits

Author SHA1 Message Date
Jakub Skrzypnik
0378e2e5d9 package/libglvnd: new package
libglvnd is the GL Vendor-Neutral Dispatch library, used to dispatch
GL calls across multiple GL implementations at runtime.

Full GL support, as usual, requires (parts of) the X11 stack: libX11,
libXext, and xorgproto (for glproto). However, with just libX11, it is
possible to do EGL on X11. EGL and GLES have no dependencies.

Note: x11 and glx are 'features', so need to be 'enabled' or 'disabled'
(or 'auto', but we don't care in Buildroot), while egl and gles1/2 are
'booleans', so need to be 'true' or 'false'.

When an actual provider for GL, EGL, or GLES is enabled, so must the
corresponding flavour be enabled in libglvnd. Conversely, when there is
no actual provider, the corresponding support must be disabled in
libglvnd. So we make each flavour selectable with hidden options, which
actual providers will have to select.

The license for libglvnd itself is a custom license by NVidia. It is
pretty close to MIT, but it's different (although Debian does classify
it as MIT); SPDX has no identifier for that license either. As such, we
choose to just identify it as 'libglvnd license', and let users deal
that with their legal department. Additionally, libglvnd bundles some
code from other projects, so we list them explicitly as well.

Signed-off-by: Jakub Skrzypnik <jskrzypnik@novomatic-tech.com>
[yann.morin.1998@free.fr:
  - provide help text
  - don't force X11 libraries, split them between X11 and full GL
  - make each flavour selectable
  - fix make check-package issues
  - fix and complete licensing information
  - bump to 1.3.2
  - expand commit log
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 17:47:05 +01:00
Thomas Petazzoni
b102352b62 support/scripts/pkg-stats: add --disable option
When debugging pkg-stats, it's quite useful to be able to disable some
features that are quite long (checking upstream URL, checking latest
version, checking CVE). This commit adds a --disable option, which can
take a comma-separated list of features to disable, such as:

     ./support/scripts/pkg-stats --disable url,upstream

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 17:31:55 +01:00
Gregory CLEMENT
a206bbc5fe support/scripts/pkg-stats: account for unsure CVEs
The .affects() method of the CVE class in support/scripts/cve.py can
return 3 values: CVE_AFFECTS, CVE_DOESNT_AFFECT and CVE_UNKNOWN.

We of course properly account for CVEs where .affects() return
CVE_AFFECTS, but the ones for which CVE_UNKNOWN is returned are
currently ignored, and therefore treated as if they did not affect the
package.

However CVE_UNKNOWN in fact indicates that the v_start/v_end fields of
the CPE entry could not be parsed by
distutils.version.LooseVersion(). Instead of ignoring such cases, this
commit adds support for the concept of "unsure CVEs", which will be
listed next to CVEs known to affect the package, so that we are aware
of them and can investigate the version issue.

Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 17:31:55 +01:00
Fabrice Fontaine
5ad7eb6c61 package/nodejs: force host-python3
Build of nodejs fails if python 3.10 is installed on host.
As suggested by Arnout in
https://bugs.buildroot.org/show_bug.cgi?id=14451, use the same
workaround than in qt5webkit to force host-python3 (which is in version
3.9)

It should be noted that python 3.10 support has been added in version
14.18.2: https://github.com/nodejs/node/releases/tag/v14.18.2

Fixes:
 - https://bugs.buildroot.org/show_bug.cgi?id=14451

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 17:24:08 +01:00
Fabrice Fontaine
a2e1a39a20 package/gvfs: bump to version 1.48.1
Drop patch (not needed since
eee4bb8460)

https://gitlab.gnome.org/GNOME/gvfs/-/blob/1.48.1/NEWS

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 16:48:54 +01:00
Arnout Vandecappelle (Essensium/Mind)
6a51177af1 package/mesa3d: always enable glx-direct if glx is enabled
Many applications that use GLX want to combine it with DRI3 to bypass
the X server and send GL commands directly to the graphics driver. This
is only available in mesa3d if glx-direct=true.

Up to now, we only enabled glx-direct when a DRI driver was enabled.
Historically, this is either because only DRI drivers had DRI3, or
because we didn't know better at the time. However, glx-direct is not
related to DRI drivers at all. Setting it for a DRI driver when there is
no GLX is effectively a NOP. Conversely, we also want to set it for
Gallium drivers when GLX is enabled, otherwise GLX-direct applications
don't work.

Note that glx-direct is only functional if glx=dri. If glx=xlib or
glx=gallium-xlib, GLX always goes through the X server so direct is not
possible (as far as we understand).

Set glx-direct=true unconditionally when GLX is selected. Remove it from
DRI drivers.

Reported-by: Howard Mitchell <hm@hmbedded.co.uk>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 16:46:20 +01:00
Howard Mitchell
bcf114234b package/mesa3d: select vc4 driver for gallium v3d
Although the Gallium V3D driver for RPi4 can be built independently, in
practice the accelaration doesn't work unless the VC4 driver is also
enabled.

Select VC4 automatically when V3D is selected.

Signed-off-by: Howard Mitchell <hm@hmbedded.co.uk>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 16:46:20 +01:00
Fabrice Fontaine
4e36e8f208 package/hiawatha: disable system mbedtls
hiawatha needs mbedtls3 since bump to version 11.1 in commit
24e4c888c3:

/home/giuliobenetti/autobuild/run/instance-3/output-1/build/hiawatha-11.1/src/wigwam.c:39:10: fatal error: mbedtls/psa_util.h: No such file or directory
   39 | #include "mbedtls/psa_util.h"
      |          ^~~~~~~~~~~~~~~~~~~~

As mbedtls 3.x is not backward compatible with mbedtls 2.x, disable
system mbedtls to let hiawatha uses its own copy (which will be
installed in $(TARGET_DIR)/usr/lib/hiawatha)

Fixes:
 - http://autobuild.buildroot.org/results/064af90aa95c28781d96d7eca0f14841fce0687a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 16:35:50 +01:00
Norbert Lange
c669bd5115 package/busybox: explicitly state binutils paths
We are not passing TARGET_CONFIGURE_OPTS when building busybox; instead
we are passing variables explicitly. As thus, it is missing the ar, nm,
and ranlib that we are using.

We add explicit AR, NM, and RANLIB, so that the ones we want to use
(i.e. the gcc-wrapped ones) are actually used.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
[yann.morin.1998@free.fr:
  - reword the commit log to explain why we need that
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-09 16:03:38 +01:00
Norbert Lange
c08fa13d36 package/Makefile.in: use gcc wrappers for binutils tools
This will use gcc-ar, gcc-nm and gcc-ranlib instead of the normal
binutils tools. The difference is that with the wrappers, gcc plugins
will be automatically picked up.

gcc 4.7 introduced these wrappers, to detect the prefix and keep gcc
specifics out of Makefile.in, a new variable BR2_TOOLCHAIN_BUTILS_PREFIX
will be used to carry the prefix on supported versions.

Note that binutils added some automatic loading with the 'bfd-plugins'
directory (somewhere around 2.28), but the first implementation had
issues, and generally depends on correctly setup symlinks (often broken,
may point to some other gcc's library). The wrappers always work
painless.

The original motivation (now ~2 years in use) was to add "-flto
-ffat-lto-objects" to both BR2_TARGET_OPTIMIZATION and
BR2_TARGET_LDFLAGS, and have target binaries lto optimized.

Not all packages will compile with this option, further work could
white/blacklist packages (adding -fno-lto to the options).

Signed-off-by: Norbert Lange <nolange79@gmail.com>
[yann.morin.1998@free.fr: don't introduce a Config.in blind option]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-09 16:03:23 +01:00
Fabrice Fontaine
353483b1e7 package/atop: bump to version 2.7.1
https://www.atoptool.nl/downloadatop.php

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 16:01:18 +01:00
Fabrice Fontaine
f4353279ce package/libbytesize: bump to version 2.6
https://github.com/storaged-project/libbytesize/releases/tag/2.6
https://github.com/storaged-project/libbytesize/blob/2.6/NEWS.rst

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 15:59:45 +01:00
Fabrice Fontaine
490d8b13b1 package/gupnp-av: bump to version 0.14.0
https://gitlab.gnome.org/GNOME/gupnp-av/-/blob/gupnp-av-0.14.0/NEWS

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 15:59:26 +01:00
Fabrice Fontaine
e89b555a4d package/gupnp: bump to version 1.4.2
https://gitlab.gnome.org/GNOME/gupnp/-/blob/gupnp-1.4.2/NEWS

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 15:59:08 +01:00
Gilles Talis
df3f0c226f package/tesseract-ocr: bump to version 5.0.1
- Updated language training data version to 4.1.0
- Removed current patch as not required anymore
- Added patch to fix uclibc failures
- Supported C++ version has moved from C++11 to C++17

Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 15:58:45 +01:00
Gilles Talis
6050df28b2 package/libolm: bump to version 3.2.9
Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 15:57:58 +01:00
Gilles Talis
1ed3288e44 package/xapian: bump to version 1.4.19
Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 15:57:30 +01:00
Norbert Lange
99dabffc09 package/systemd: fix pre-creation of directories for coredump
Fix a copy-paste bug in commit be25669078.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 15:30:12 +01:00
Norbert Lange
8b94dab2ee package/systemd: add systemd-oomd user
add the missing user if oomd is enabled.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 15:29:28 +01:00
Norbert Lange
0d9b84b7a8 package/systemd: invoke systemd-tmpfilesd on final image
Especially for read-only filesystems it is helpful to
pre-create all folders for non-volatile paths.

This needs to run under fakeroot to allow setting
uids/gids/perms for the target fs.

systemd-tmpfilesd supports specifiers and target rootfs,
but some specifiers resolve to information from the host,
it is necessary to specially handle (skip) entries that
contain problematic specifiers.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 15:09:39 +01:00
Peter Korsgaard
65054d1a19 package/pkg-python.mk: fix typos
s/interperter/interpreter/ and drop 'use use' / 'depend on use'.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 14:19:00 +01:00
Fabrice Fontaine
31848ba595 package/python-setuptools-scm: needs python3
python-setuptools-scm dropped python 2 support since
f0be71fbcf
resulting in the following build failure since bump to version 6.3.2 in
commit 12e3527fd9:

/buildroot/autobuild/instance-2/output-1/host/lib" INTLTOOL_PERL=/usr/bin/perl  /home/buildroot/autobuild/instance-2/output-1/host/bin/python setup.py build  )
  File "setup.py", line 22
    f"{type(self).__name__} is forbidden, "
                                          ^

Fixes:
 - http://autobuild.buildroot.org/results/2f6125993de364b4a44d259f16806e6dfd792402

With python 2 support dropped, python-backports-functools-lru-cache can no
longer be built, so drop it.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 14:09:08 +01:00
Norbert Lange
92297637d7 package/openrc: add patch to create /run/lock/subsys
Together with changes to sysv/busybox init, this directory
will already exist on all init systems before any service
scripts are run.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 14:04:48 +01:00
Norbert Lange
97eb7d0c13 package/skeleton-init-systemd: support /var/lock again
systemd's own configuration file is not installed anymore,
as side effect of disabling sysv support in commit
96f0d9969e.

Add the legacy.conf functionality back in skeleton-init-systemd,
since this is a buildroot feature to support software expecting
these directories to exist, as well as trying to be similar to
other init systems.

Create our own legacy.conf instead of using the one from upstream,
because:

- upstream has legacy.conf.in which has to be preprocessed;
- we don't want to enable upstream's full sysv support as explained in
  commit 96f0d9969e6220154b39d9d80cda97998d41f670;
- we would probably need to post-process upstream's legacy.conf anyway
  since it doesn't fully match with buildroot expectations.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 14:04:21 +01:00
Fabrice Fontaine
85aab41ef9 package/gnuchess: security bump to version 6.2.9
Fixed potential buffer overflow in pgnload and pgnreplay
(CVE-2021-30184)

https://lists.gnu.org/archive/html/info-gnu-chess/2021-07/msg00000.html
https://git.savannah.gnu.org/cgit/chess.git/tree/NEWS?h=v6.2.9

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 14:01:17 +01:00
Arnout Vandecappelle (Essensium/Mind)
83319384fd package/systemd: remove BR2_PACKAGE_SYSTEMD_TMPFILES completely
Since tmpfiles is no longer optional, the Config.in symbol serves no
purpose. It was only used in cryptsetup.mk, where we replace it with
BR2_PACKAGE_SYSTEMD.

Advise to do the same in Config.in.legacy.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 13:48:26 +01:00
Norbert Lange
f7a928f883 package/systemd: always enable systemd-tmpfilesd
this tool and service is pretty much expected to be enabled,
making this a certainty will enable future improvements.

The config variable BR2_PACKAGE_SYSTEMD_TMPFILES is still
availabe and always set.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 13:48:26 +01:00
Norbert Lange
0f9828e5cf package/systemd: adopt odering in nsswitch to newer versions
This modifies the order of the nss modules, reflecting the current
state of the documentation.

nss-mymachines lost support for resolution of users and groups,
and now only does resolution of hostnames. Changed in v246.

Multiple changes in regards to nss-myhostname now recommend placement
after nss-files and before nss-dns. See commits ce266330, f918c67.

nss-resolve handles the nss-files logic itself, and its suggested to
move in front of nss-files. Changed in v249.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 13:48:26 +01:00
Norbert Lange
eb49354eb3 package/systemd: Update description and kernel options
realign the configuration to the README.

enable CONFIG_AUTOFS_FS (kernel >= 4.18) as well as the someday
to be removed CONFIG_AUTOFS4_FS option.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 13:48:26 +01:00
Norbert Lange
f90d23112d package/systemd: set cgroups default-hierarchy to unified
Use the unified hierarchy, which is systemds default since v243.
The biggest holdover was docker which now supports the unified
layout.

Note that systemd will automatically fallback to hybrid if the
kernel is too old or the unified hierarchy fails for other reasons.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 13:48:26 +01:00
Peter Korsgaard
c39e0abba9 package/poppler: use HTTPS for upstream URL
Fixes:
http://autobuild.buildroot.net/results/145/1456f9512371ecb5a0a374943178e4bd7b0967e8/

The HTTP URL returns a 308 redirect to HTTPS, which confuses old wget
versions (E.G.  s.b.o):

wget -d http://poppler.freedesktop.org/poppler-21.12.0.tar.xz
DEBUG output created by Wget 1.14 on linux-gnu.

URI encoding = ‘UTF-8’
Converted file name 'poppler-21.12.0.tar.xz' (UTF-8) -> 'poppler-21.12.0.tar.xz' (UTF-8)
Converted file name 'poppler-21.12.0.tar.xz' (UTF-8) -> 'poppler-21.12.0.tar.xz' (UTF-8)
--2022-01-09 09:28:02--  http://poppler.freedesktop.org/poppler-21.12.0.tar.xz
Resolving poppler.freedesktop.org (poppler.freedesktop.org)... 147.75.198.156
Caching poppler.freedesktop.org => 147.75.198.156
Connecting to poppler.freedesktop.org (poppler.freedesktop.org)|147.75.198.156|:80... connected.
Created socket 3.
Releasing 0x0000000001ceda80 (new refcount 1).

---request begin---
GET /poppler-21.12.0.tar.xz HTTP/1.1
User-Agent: Wget/1.14 (linux-gnu)
Accept: */*
Host: poppler.freedesktop.org
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 308 Permanent Redirect
Date: Sun, 09 Jan 2022 09:28:02 GMT
Content-Type: text/html
Content-Length: 164
Connection: keep-alive
Location: https://poppler.freedesktop.org/poppler-21.12.0.tar.xz

---response end---
308 Permanent Redirect
Registered socket 3 for persistent reuse.
Skipping 164 bytes of body: [<html>
<head><title>308 Permanent Redirect</title></head>
<body>
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx</center>
</body>
</html>
] done.
2022-01-09 09:28:02 ERROR 308: Permanent Redirect.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 12:21:50 +01:00
Thomas Petazzoni
01764876e3 package/python-cryptography: bump version to 36.0.1
This version bump requires significant changes because
python-cryptography is now partially implemented in Rust.

This means that:

 - The C++ dependency is no longer needed.

 - We need to ensure we are on an architecture where Rust is
   available (BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS)

 - Almost all Python dependencies are no longer relevant, except for
   the python-cffi.

 - A number of environment variables are needed to make the Rust part
   build correctly.

 - We need to invoke the "cargo" download post-process hook to vendor
   the Cargo dependencies at download time.

 - We need to propagate to relatively significant reverse dependency
   tree the changes of dependencies on python-cryptography.

Co-developed-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 12:13:49 +01:00
Thomas Petazzoni
b6378631c2 package/pkg-cargo.mk: use CARGO_TARGET_<target>_LINKER instead of cargo config file
package/rustc/rustc.mk produces a config file in $(CARGO_HOME) that
points to the linker. We can simplify that by using the
CARGO_TARGET_<target>_LINKER environment variable.

This will also fix problems when host == target, where the target
linker gets picked up incorrectly.

Fixes:

  http://autobuild.buildroot.net/results/2183f1835f2ef553e45e83959910205127b2b259/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 12:13:49 +01:00
Thomas Petazzoni
91a5a2d317 package/pkg-cargo.mk: use CARGO_BUILD_TARGET instead of --target
This will allow PKG_CARGO_ENV to be used in other contexts, such as
the upcoming python-cryptography version bump.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 12:13:49 +01:00
James Hilliard
98c7ea3ddf package/pkg-cargo.mk: enable -Z target-applies-to-host via env
This should be more reliable and fix the host == target bug when
doing indirect invocations using the cargo env.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 12:13:49 +01:00
Thomas Petazzoni
0894937f7f package/pkg-cargo.mk: split PKG_CARGO_ENV into target/host variables
Some variables should only be passed for target packages, such as the
target-applies-to-host variable. Additional target-specific variables
will also be added.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 12:13:49 +01:00
Thomas Petazzoni
e5ead094e1 support/testing/tests: switch python-cryptography related tests to glibc
In a follow-up commit, we are about to bump python-cryptography to a
new version, which has the interesting charateristic of using Rust
code. This means python-cryptography will now only be available on
platforms supported by Rust, which for now excludes uclibc-based
configurations (none of the Rust Tier1/Tier2 platforms use uClibc,
there is some uClibc support in Tier3 platforms but they have not been
added to Buildroot for now).

So in preparation for this bump, we switch the few test cases of
Python packages that directly or indirectly use python-cryptography to
use a glibc toolchain. Another impacted test case is the
docker-compose test case, but it already uses a glibc toolchain;

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 12:13:49 +01:00
Thomas Petazzoni
36e8743da1 support/download/cargo-post-process: make manifest path configurable
In most pure Rust packages, the Cargo.toml manifest is at the root
directory, which is why we could call "cargo vendor" without
specifying the path of the manifest.

However, other packages, such as python-cryptography, which have parts
implemented in Rust, have their Cargo.toml located in a specific
subdirectory.

This commit extends the cargo-post-process download script to
understand a BR_CARGO_MANIFEST_PATH environment variable, which allows
a package to pass the location of the Cargo.toml file. If not passed,
"Cargo.toml" is used, preserving the existing behavior for other
packages.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 12:13:48 +01:00
Fabrice Fontaine
b0a7bffad9 package/mongrel2: bump to version 1.13.0
- Drop third patch (already in version)
- Drop fourth patch (not needed since
  8a6db3beb3)

https://github.com/mongrel2/mongrel2/blob/v1.13.0/changelog.txt

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 12:02:03 +01:00
Thomas Petazzoni
eeace1cc13 arch/Config.in.x86: add support for x86-64-v2, x86-64-v3, x86-64-v4
In the face of the vast amount of x86-64 CPU architecture variants,
Linux distributions have worked together to define "micro-architecture
levels" in the x86-64 psABI, called x86-64-v2, x86-64-v3 and
x86-64-v4. They standardize a set of CPU features, and GCC since its
version 11.x has support for these micro-architecture levels as
-march= options.

It makes sense to support them in Buildroot, especially for those who
want to build toolchains that aim at targeting a reasonably broad
family of x86-64 processors.

It only really makes sense to use as 64-bit CPUs, and not as 32-bit
ones, so we guard them behind BR2_x86_64.

More details:

 https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/low-level-sys-info.tex
 https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level
 https://www.phoronix.com/scan.php?page=news_item&px=GCC-11-x86-64-Feature-Levels
 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=59482fa1e7243bd905c7e27c92ae2b89c79fff87

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr:
  - they are x86-64-only CPUs
  - add gcc commit URL
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-09 11:30:26 +01:00
Thomas Petazzoni
d6ce2a1681 arch/Config.in.x86: add option for -march=x86-64
We already have support for a wide range of x86-64 CPUs, but we don't
have any option to build for the most generic possible x86-64 CPU, as
made available by the -march=x86-64 GCC option.

This commit makes this option available in Buildroot.

It only really makes sense to use as a 64-bit CPU, and not as a 32-bit
one, so we guard it behind BR2_x86_64.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: it's an x86-64-only CPU]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-09 11:30:26 +01:00
Norbert Lange
bf01e51f3c skeleton + init: prepare /run/lock and adjust compat symlinks
Linux distros changed /var/run and /var/lock to reside on an tmpfs in
/run a long time ago, and buildroot seems to agree by providing this
tmpfs on all supported init systems.

Packages on the other hand are currently free to either use /var/run
or /run, and similarly using /var/lock should be identical to the
replacement /run/lock.

This series aims to ensure that *if* /var/lock is needed, then
it will be a symlink to /run/lock. Allowing packages to continue
working and allowing them to migrate to using /run/lock.

If all relevant packages are fixed,
the compatibility symlinks in /var can be dropped.

Status before this patch:

*   Systemd

    /run will be mounted by PID1, /var/run will be recreated by
    /usr/lib/tmpfiles.d/var.conf.

    Creating /run/lock/subsys and the compatibility symlink is handled
    in /usr/lib/tmpfiles.d/legacy.conf.
    But this is *currently not installed* by Buildroot, see [1].

*   OpenRC

    Seems to check for existence of a /run directory and does all
    necessary setup.

*   SysV

    /var/lock is currently a symlink to /tmp.

*   Busybox

    Same as sysv (Buildroot uses the sysv skeleton)

Note that we create /run/lock/subsys, so sysv scrips could expect this
directory to exist. Apart from simplifying scripts, creating the dir
early as root adds some security.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 11:28:56 +01:00
Thomas Petazzoni
bfd1a31d0e support/download/go-post-process: drop -o pipefail
This breaks the post_process_unpack() function in
support/download/helpers, which had a sequence of pipe, with "head"
that can abort early and cause the pipe to fail.

Fixes intermitent:

make[1]: *** [package/pkg-generic.mk:190: /builds/tpetazzoni/buildroot/test-output/TestDockerCompose/build/containerd-1.5.8/.stamp_downloaded] Error 141

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 11:07:37 +01:00
Norbert Lange
5e78e7e97d fs: clean the volatile /run and /tmp directories
At run time, /run and /tmp get overmounted with a tmpfs, so anything
that is there becomes inaccessible.

Scripts in the fakeroot environment could call tools preparing the early
environment, leaving traces in /run or /tmp. For example, mkusers might
create home directories in /run: openssh sets the sshd home directory to
/run/sshd, so mkusers creates it. But since a tmpfs is mounted over it,
it doesn't exist at runtime, so the openssh service creates it at
startup (and deletes it when the service is stopped).

In addition, packages or rootfs overlay may leave things there as well.
Those may actually pose a runtime problem because the created file or
directory is missing - or it may not be a problem because the package
creates the missing files/directories on startup. In this situation,
it's better not to have them in the rootfs image (because they're not
functional anyway), but it's good to leave them in TARGET_DIR to make it
easier to debug the situation.

Therefore, remove the contents of /run and /tmp in the fakeroot
environment after ROOTFS_PRE_GEN_HOOKS, so they are still left in
TARGET_DIR.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 10:04:34 +01:00
Zoltan Gyarmati
32ecd0242d package/simple-mail: new package
Signed-off-by: Zoltan Gyarmati <zgyarmati@zgyarmati.de>
[Thomas:
- bump to 2.3.0
- don't build demos, they need QtWidgets]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-09 09:58:48 +01:00
Joachim Wiberg
787f7b58a7 package/inadyn: refactor start script
This patch is a complete rewrite of the Inadyn start script, based on
the BusyBox S01syslogd template.  Additional features, compared to the
template, are limited to the ability to:

 - Check if enabled, using an ENABLED="yes" from /etc/default/inadyn,
   this for compatibility with the previous version of the script
 - Override INADYN_ARGS from /etc/default/inadyn
 - A reload command that sends SIGHUP, since that works and is both
   quicker and a less resource intensive operation

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 09:56:13 +01:00
Norbert Lange
01a7e1a9f8 package/systemd: add support for creating journal catalog DB
journald supports catalog files, or rather a binary database of
those.
Functionality added includes:

-   A config option allows enabling the binary database.

-   If BR2_ENABLE_LOCALE_PURGE is enabled, the catalogs not in the
    language whitelist are deleted first. This is done independently
    of the new option, since the catalogs are removed later anyway.

-   If the option is enabled, the database is built and moved to
    /usr/share/factory. This makes sure that /usr contains the entire
    system. A symlink is created in /var pointing to that file.

-   The catalog source files are deleted. They serve no purpose on the
    target once the database exists.

-   All of the above is done in a ROOTFS_PRE_CMD_HOOK rather than in the
    build/install step, because other packages than systemd itself may
    also install catalogs. This also makes sure that it is possible to
    do a re-build, because the catalog files are not removed in
    $(TARGET_DIR) itself, only in the temporary copy for rootfs creation.

-   The service normally used for creating the DB during boot is
    deleted. If the DB is not enabled, we also don't want to waste time
    and space on re-generating every boot. Conversely, if the DB is
    enabled, it is already there so doesn't need to be re-done on every
    boot either.

The new option depends on !BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW because
if the rootfs is not RW, /var is overmounted with a tmpfs. The factory
should handle this, but this only half-works [1].

[1] http://lists.busybox.net/pipermail/buildroot/2020-July/287016.html

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Reviewed-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Reviewed-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 09:43:28 +01:00
James Hilliard
8c12a6bf51 package/iwd: enable required kernel dependencies
Required kernel options are listed in check_crypto() in srv/main.c:
https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/src/main.c?h=1.20#n268

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-01-09 08:42:47 +01:00
James Hilliard
e27a700f3e core/pkg-utils: add missing bracket/sep
This appears to have been incorrectly removed in:
03aa3e6ac7

Fixes:
package/pkg-utils.mk:212: *** unterminated call to function 'foreach': missing ')'.  Stop.
make: *** [Makefile:84: _all] Error 2

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-01-09 08:26:51 +01:00
Fabrice Fontaine
bcaed85304 package/libbsd: bump to version 0.11.3
- Update indentation in hash file (two spaces)
- Update hash of COPYING:
  - files added and year updated with
    01f0d1ea1e
    37a9b56c05
    d54ceb37ce
  - files removed with
    847e682f8d
- libmmd is a mandatory dependency since version 0.11 and
  847e682f8d

https://lists.freedesktop.org/archives/libbsd/2021-February/000298.html
https://lists.freedesktop.org/archives/libbsd/2021-February/000302.html
https://lists.freedesktop.org/archives/libbsd/2021-February/000305.html

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-01-09 00:17:09 +01:00