Commit Graph

67128 Commits

Author SHA1 Message Date
Peter Korsgaard
e8c4b360fd Update for 2023.02-rc1
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 21:13:02 +01:00
Thomas Devoogdt
4c7fcbbe75 package/webkitgtk: security bump to version 2.38.5
Bugfix release, with many security fixes, including (but not limited to)
a patch for CVE-2023-23529.

Release notes:

  https://webkitgtk.org/2023/02/15/webkitgtk2.38.5-released.html

Accompanying security advisory:

  https://webkitgtk.org/security/WSA-2023-0002.html

Also raise the minimal GCC version to 8.3, which was already required since webkitgtk-2.36.4.
Similar to commit ec1ff802df,
we do check on >= GCC 8, because we can't check on >= GCC 8.3.

  f812c5db1f

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@gmail.com>
Acked-by: Adrian Perez de Castro <aperez@igalia.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 18:22:29 +01:00
Thomas Devoogdt
b21cd8be3f Revert "xorg-server: not available with musl on ARM"
This reverts commit 9daafbcb75.

Fixed since https://gitlab.freedesktop.org/xorg/xserver/-/issues/840
(xserver 1.20.6).

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 18:17:14 +01:00
Fabrice Fontaine
5f1858e859 package/rockchip-mali: needs C++
rockchip-mali pre-built libraries needs C++ since the addition of the
package in commit 97c74a73e5:

readelf -a output/build/rockchip-mali-721653b5b3b525a4f80d15aa7e2f9df7b7e60427/lib/aarch64-linux-gnu/libmali-bifrost-g31-rxp0-gbm.so|grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libdrm.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

While at it, add a comment when dependencies are not met

Fixes:
 - No autobuilder failures (yet), found when debugging an issue with
   rockchip-mali and glslsandbox-player

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 18:13:07 +01:00
Fabrice Fontaine
ee13e3fb41 package/glslsandbox-player: add wayland-protocols optional dependency
wayland-protocols is an optional dependency which is enabled by default
resulting in the following wayland build failure since the addition of
the package in commit f201ca9d0d:

checking for wayland_client... yes
checking for wayland_egl... yes
configure: Wayland EGL support enabled
checking for wayland_protocols... no
configure: error: Package requirements (wayland-protocols >= 1.12) were not met:

Package 'wayland-protocols', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables wayland_protocols_CFLAGS
and wayland_protocols_LIBS to avoid the need to call pkg-config.

Fixes:
 - http://autobuild.buildroot.org/results/865af860f9e52fe5311bb0c6a246ff871ae5a989

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 18:12:11 +01:00
Fabrice Fontaine
67c967c2d1 package/python-cryptography: security bump to version 39.0.1
Fix CVE-2023-23931: cryptography is a package designed to expose
cryptographic primitives and recipes to Python developers. In affected
versions `Cipher.update_into` would accept Python objects which
implement the buffer protocol, but provide only immutable buffers. This
would allow immutable objects (such as `bytes`) to be mutated, thus
violating fundamental rules of Python and resulting in corrupted output.
This now correctly raises an exception. This issue has been present
since `update_into` was originally introduced in cryptography 1.8.

https://github.com/pyca/cryptography/security/advisories/GHSA-w7pp-m8wf-vj6r
https://cryptography.io/en/latest/changelog/#v39-0-1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 18:11:07 +01:00
Fabrice Fontaine
a85ed5d21c package/python-django: security bump to version 4.1.7
Fix CVE-2023-23969 and CVE-2023-24580

https://docs.djangoproject.com/en/dev/releases/4.1.6
https://docs.djangoproject.com/en/dev/releases/4.1.7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 18:10:37 +01:00
Marcus Folkesson
d37b3916a1 package/libostree: bump to version 2023.1
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 18:07:55 +01:00
Adrian Perez de Castro
7852618c23 package/wpewebkit: security bump to version 2.38.5
Bugfix release, fixes zero-day CVE-2023-23529 and includes a few build
and behaviour patches as well.

Release notes:

  https://wpewebkit.org/release/wpewebkit-2.38.5.html

Accompanying security advisory:

  https://wpewebkit.org/security/WSA-2023-0002.html

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 18:06:49 +01:00
Bernd Kuhls
14ca6b5fdb package/libcurl: bump version to 7.88.0
Changelog: https://curl.se/changes.html#7_88_0

Updated license hash due to copyright year bump:
2bc1d775f5 (diff-400d38e5cfee181230373a8b02d38f50271a5bf62c62410382efddb8e8b19e22)

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 18:05:58 +01:00
Fabrice Fontaine
924ca9414f package/less: fix CVE-2022-46663
In GNU Less before 609, crafted data can result in "less -R" not
filtering ANSI escape sequences sent to the terminal.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-20 18:05:06 +01:00
Thomas Petazzoni
bd351c4e93 DEVELOPERS: remove Shyam Saini
Shyam's email address at Savoir Faire Linux is bouncing, so drop they
from the DEVELOPERS file.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-20 09:23:53 +01:00
Fabrice Fontaine
7b4937a170 package/ipmiutil: fix uclibc build without wchar
For an unknown reason, wchar_t is incorrectly detected with uclibc
resulting in the following build failure:

In file included from igetevent.c:136:
imb_api.h:150:5: error: unknown type name 'wchar_t'
  150 |     wchar_t *Buffer;
      |     ^~~~~~~

The build failure can be reproduced even when reverting bump to version
3.1.8.

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-19 23:04:04 +01:00
Romain Naour
2ecaf26b5e package/poke: bump to version 3.0
See:
http://www.jemarch.net/poke-3.0-relnotes.html

Build tested:
https://gitlab.com/kubu93/buildroot/-/pipelines/782116399

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-19 22:10:00 +01:00
Alexander Egorenkov
d782c0682f package/s390-tools: bump to version 2.26.0
Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-19 22:09:25 +01:00
Michael Nosthoff
b3a462e85a package/catch2: bump to version 3.3.1
raise the minimum gcc to 5 as stated in release notes for 3.1.0 [0].

[0] https://github.com/catchorg/Catch2/releases/tag/v3.1.0

Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-19 21:57:47 +01:00
Julien Olivain
d7f2d8403e package/gnupg2: fix build failure when host provides an old gpgrt-config
gnupg2 uses the libgpg-error library. The libgpg-error library has a
long plan to be renamed to "gpgrt" (see [1]). For the transition, it
provides two configuration scripts "gpg-error-config" (the old,
original one, kept for compatibility) and "gpgrt-config" (which is
meant to be the replacement). When both are detected, "gpgrt-config"
should be preferred.

gnupg2 configure script searches for "gpg-error-config" in the path
provided to --with-libgpg-error-prefix=PFX (more specifically, in
"PFX/bin").

The logic to find "gpgrt-config" is different: it is searched in
paths "$prefix/bin:$PATH". See [2]. On Buildroot, autotools target
packages are configured with "--prefix=/usr", which makes the
configure script to search in the host "/usr/bin".

In some host environment providing such a "/usr/bin/gpgrt-config"
script of an older version, host compilation flags are incorrectly
added for the target, which leads to compilation failures.

The issue can be reproduced in a Buildroot Docker image from [3] in
which the libgpg-error-dev package is added. When tested, the
libgpg-error-dev package was at version 1.38.

In that configuration, gnupg2 configure will output the message:

    checking for gpgrt-config... /usr/bin/gpgrt-config

and the compilation fails with a message:

    aarch64-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'

Note: it was observed that in some other configurations in which the
host /usr/bin/gpgrt-config was from libgpg-error version 1.46, the
host script was redirecting correctly in the buildroot sysroot.

Since gnupg2 searches for "gpgrt-config" with a
"AC_PATH_PROG(GPGRT_CONFIG, ...)" macro, this patch fixes this
issue by simply forcing the script path in the GPGRT_CONFIG
environment variable.

See also [4] which discussed the "gpgrt-config" search logic.

Fixes:
- http://autobuild.buildroot.net/results/423c3ce7317c181e9f2e4a49b76ee9d26167375c/
(and many others)

[1] https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob;f=README;h=e0b9f16445a96942af0839bcdb9a0b0f8cf31380;hb=885a287a57cf060b4c5b441822c09d23b8dee2bd#l29
[2] https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=m4/gpg-error.m4;h=a975e53d07d1b743f51d8aa1767cd8e0d71b4071;hb=c0556edb80518720b0d884251685fe008c8f0429#l68
[3] https://git.buildroot.org/buildroot/tree/support/docker/Dockerfile?id=b6085c00d0feece6f3ba635e7847ea653bc5fac3
[4] https://dev.gnupg.org/T5365

Reported-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-19 21:55:53 +01:00
Fabrice Fontaine
99d5f1f7d3 package/speechd: fix build without makeinfo
Fix the following build failure without makeinfo raised since the
addition of the package in commit
9f4f8c5f89:

/home/buildroot/autobuild/instance-2/output-1/build/speechd-0.11.4/missing: line 81: makeinfo: command not found

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-19 21:55:23 +01:00
Fabrice Fontaine
8797f3fb27 package/speechd: disable kali support
Disable kali support as it is not needed and raises the following build
failure without C++ since the addition of the package in commit
9f4f8c5f89:

  CXX      sd_kali-kali.o
/bin/sh: line 1: no: command not found

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-19 21:54:39 +01:00
Giulio Benetti
273bec97fc package/libfuse3: bump to version 3.14.0
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-19 21:53:36 +01:00
Bagas Sanjaya
5085b61121 package/git: security bump to version 2.39.2
Fix two CVEs (CVE-2023-22490 and CVE-2023-23946). For the full release
note, see [1].

While at it, also refresh two Buildroot patches introduced when the
package was bumped to 2.39.0.

[1]: https://lore.kernel.org/git/xmqqr0us5dio.fsf@gitster.g/

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 19:44:33 +01:00
Thomas Devoogdt
1c9622ae50 package/lighttpd: bump to version 1.4.69
Changelog:
 - https://www.lighttpd.net/2023/1/3/1.4.68/
 - https://www.lighttpd.net/2023/2/10/1.4.69/

In this commit:
- rebased patch & dropped server.use-ipv6 option [1]
- fix changed meson options [2]

[1]: 376d20f161
[2]: 6b31f76cd9

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 18:11:02 +01:00
Raphael Pavlidis
5945a71d87 package/wlroots: add XWayland support
The new option enables the XWayland support, so X11 application can be
running on a wlroots based compositor. Also, do not enable the XWayland
support if the X11 backend is active, as it is unrelated to it.

Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 18:10:18 +01:00
Raphael Pavlidis
df4f7f8e85 package/weston: add xwayland dependency
If the XWayland support is enabled then build the corresponding XServer.

Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 18:00:13 +01:00
Raphael Pavlidis
05c3177493 package/x11r7/xwayland: new package
XServer to run X clients under wayland

This XServer is required to run the X clients under Wayland compositor,
for example weston or wlroots based compositors.

Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 17:57:32 +01:00
Fabrice Fontaine
3645119338 package/fluent-bit: fix build with libexecinfo
Fix the following build failure with libexecinfo raised since commit
d649bcd380:

/home/autobuild/autobuild/instance-9/output-1/host/lib/gcc/mips-buildroot-linux-musl/10.4.0/../../../../mips-buildroot-linux-musl/bin/ld: ../lib/monkey/library/libmonkey.a(mk_utils.c.o): in function `mk_utils_stacktrace':
mk_utils.c:(.text+0x1578): undefined reference to `backtrace'

Fixes:
 - http://autobuild.buildroot.org/results/63a6ba9104dfddbd7f6a7debadc0c6ef6e3a21f5

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 17:55:03 +01:00
Fabrice Fontaine
03bab7117d package/freerdp: bump to version 2.10.0
https://github.com/FreeRDP/FreeRDP/releases/tag/2.10.0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 17:54:46 +01:00
Bernd Kuhls
71c51f1920 package/xutil_util-macros: bump version to 1.20.0
Release notes:
https://lists.x.org/archives/xorg-announce/2023-February/003324.html

Updated license hash due to copyright year bump:
cb147377e9

Switched tarball to xz, updated _SITE.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 17:54:02 +01:00
Bernd Kuhls
05de8e14ce package/x11r7/xdriver_xf86-video-trident: bump version to 1.4.0
Release notes:
https://lists.x.org/archives/xorg-announce/2023-February/003326.html

Removed patch which was applied upstream.
Switched tarball to xz, updated _SITE.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 17:53:44 +01:00
Bernd Kuhls
9fc69996bc package/clamav: security bump version to 0.103.8
Release notes:
https://blog.clamav.net/2023/02/clamav-01038-01052-and-101-patch.html

Fixes CVE-2023-20032 & CVE-2023-20052.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 17:52:46 +01:00
Bernd Kuhls
66b1926764 package/php: security bump version to 8.2.3
Changelog: https://www.php.net/ChangeLog-8.php#8.2.3

Fixes CVE-2023-0567, CVE-2023-0568 & CVE-2023-0662.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 17:52:32 +01:00
Bernd Kuhls
be235c048f package/python3: bump version to 3.11.2
Changelog:
https://docs.python.org/release/3.11.2/whatsnew/changelog.html#python-3-11-2

Updated license hash due to copyright year bump:
07d1f99e8f

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-02-19 17:52:09 +01:00
Thomas Petazzoni
b6085c00d0 package/python-webargs: fix formatting in hash file
Fixes:

package/python-webargs/python-webargs.hash:2: separation does not match expectation (http://nightly.buildroot.org/#adding-packages-hash)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-18 12:15:05 +01:00
Thomas Petazzoni
41cca5274a package/python-flask-smorest: fix formatting in hash file
Fixes:

package/python-flask-smorest/python-flask-smorest.hash:5: separation does not match expectation (http://nightly.buildroot.org/#adding-packages-hash)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-18 12:14:21 +01:00
Thomas Petazzoni
4336a86a0c package/python-apispec: fix formatting in hash file
Fixes:

package/python-apispec/python-apispec.hash:2: separation does not match expectation (http://nightly.buildroot.org/#adding-packages-hash)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-17 16:25:01 +01:00
Fabrice Fontaine
c674014c17 package/openipmi: bump to version 2.0.33
Drop patch (already in version) and so also drop autoreconf

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-17 16:02:38 +01:00
Fabrice Fontaine
c5357f650d package/openipmi: add libexecinfo optional dependency
Add libexecinfo optional dependency as upstream rejected the patch to
add --with-execinfo=no

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-17 16:02:28 +01:00
Michael Nosthoff
c5b597d5d8 package/catch2: new package
Catch2 is a modern C++ unit testing framework which is increasing in
popularity.

This package is staging only and allows to build tests to be run on
the target.

- https://github.com/catchorg/Catch2

Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-17 15:57:08 +01:00
Nasser Afshin
a850f632b9 package/python-pycrate: new package
Signed-off-by: Nasser Afshin <Afshin.Nasser@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-17 15:08:49 +01:00
Peter Seiderer
4ced0a528d package/qt5/qt5speech: new package
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-17 14:47:44 +01:00
Peter Seiderer
9f4f8c5f89 package/speechd: new package
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-17 14:45:57 +01:00
Peter Seiderer
5336566668 package/dotconf: new package
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-17 14:28:47 +01:00
Martin Hundebøll
d00e437922 package/python-flask-smorest: new package
Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-15 23:22:26 +01:00
Martin Hundebøll
3e9f0dc59a package/python-marshmallow-sqlalchemy: new package
Signed-off-by: Martin Hundeboll <martin@geanix.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-15 23:21:19 +01:00
Martin Hundebøll
9c3e701410 package/python-marshmallow: new package
marshmallow is a dependency of to-be-added python-flask-smorest.

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-15 23:17:52 +01:00
Martin Hundebøll
8c41d48369 package/python-webargs: new package
webargs is a dependency of to-be-added python-flask-smorest.

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-15 23:16:55 +01:00
Martin Hundebøll
8984b7581a package/python-apispec: new package
apispec is a dependency of to-be-added python-flask-smorest.

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-15 23:16:09 +01:00
Yann E. MORIN
3481674ee3 package/dmalloc: don't use SSP
dmalloc directly calls into $(LD) to generate a shared library our of
the static one.

To detect what command it should run, ./configure tries various
incantations of ld with various command line options until one does not
fail. One of those is (basically):
    $(LD) --whole-archive -o contest.o.t contest.a

This makes ./configure conclude what the command to link a shared
library in the Makefile should be, and thus stores that in a variable:
    shlinkargs='$(LD) --whole-archive -o $@'

... which is then AC_SUBST()ed into Makefile.in with a rule like:

    $(SHLIB): $(LIBRARY)
        @shlinkargs@ $(LIRARY)

which once substiuted, gives:

    $(SHLIB): $(LIBRARY)
        $(LD) --whole-archive -o $@ $(LIRARY)

However, when SSP is enabled, the __stack_chk_fail_local and co symbols
are provided by additional libraries or object files, and that is the
responsibility of gcc to pass those when linking. But as dmalloc
directly calls ld, it misses those.

Changing dmalloc to use $(CC) is not trivial, however.

First, we can't pass LD=$(TARGET_CC), otherwise the whole package
explodes [0]: indeed --whole-archive is unknown to gcc, so it must be
passed as -Wl,--whole archive instead. So we'd need to add a new test
that uses $(CC), like so:
    $(CC) -Wl,--whole-archive -o contest.o.t contest.a

However, in that case, gcc does pass additional libs/objs (like, for
eample, the SSP ones) to the linker. But then those are also included
in the whole-archive section. This causes the linker to add all the
symbols form those libs/objs, even those not needed for SSP; on some
archs, like PPC, that may require floating point symbols (__muldiv3 et
al.) which are in another library, and thus the linker can't find them.

The proper solution wouild be to add -Wl,--no-whole-archive, but that
would have to be added _after_ the library we want to link, i.e.e we
should be able to evntually run:

    $(CC) -Wl,--whole-archive -o $@ $(LIRARY) -Wl,--no-whole-archive

That would require that we introduce a new variable that is added
_after_ the $(LIBRARY), e.g. @shlinkargs_post@ or so...

This is a bigger endeavour than we want to pursue...

Since dmalloc is a debugging utility, it is not supposed to go into
production builds, and during debugging, it would not be surprising that
it needs to poke around arrays to debug them.

So, we go the easier route: disable SSP altogether.

[0] with lots of nice colors, but that's not the point, is it?

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-15 22:46:35 +01:00
Yann E. MORIN
b259dac22a package/dmalloc: use actual patches rather than sed-ing
Our dmalloc packaging is very old and carries historical baggage and
idiosyncracies that we have long stopped doing in the rest ofthe code
base.

Drop our post-patch hooks that seds the configure and Makefile.in files,
and add patches (that could be upstreamed one day).

We provide the results in the environment, like would be done with
actual autoconf cache variables (ac_cv_*).

Note: those are the result of cleaning up for further patches that did
not manifest because it was too complex to add proper SSP support to
dmalloc (instead, we're going to forcibly disable it in the following
commit).

Note-2: those patches have not been submitted upstream, as it's mostly
dead: even though there's been some commit activities recently-ish, there
has been no review or comments or the many PR pending for many years
now.

Note-3: we patch both configure and configure.ac, rather than
autoreconf, for two reasons: 1. the both are in the upstream git tree,
so submitting these patches would require patching both, and 2. dmalloc
does not autoreconf nicely out of the box, and it was deemed too much
hassle to fix that in addition.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-15 22:45:44 +01:00
Yann E. MORIN
a7bd0fdb88 package/dmalloc: convert existing patch to git format
We're going to add more patches, so let's cleanup our historical
baggage...

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-15 22:45:26 +01:00