2431 Commits
Author SHA1 Message Date
Yanase Yuki 9f2635e4b7 tools/expat: update to 2.9.0
Includes fixes for:
- CVE-2026-93990
- CVE-2026-102633
- CVE-2026-77214

Full changelog:
https://github.com/libexpat/libexpat/blob/R_2_9_0/expat/Changes

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/25752
Signed-off-by: Nick Hainke <vincent@systemli.org>
2026-10-11 09:45:53 +02:00
Shiji Yang 24de657e0f tools/mkimage: update to version 2026.10
Update to the latest release. Adjust the `HOST_BUILD_DIR` directory
pattern to align with upstream changes. Out-of-sync server URLs have
also been removed[1].

[1] https://lore.kernel.org/u-boot/20261010142922.GI769217@bill-the-cat/

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/25783
Signed-off-by: Nick Hainke <vincent@systemli.org>
2026-10-11 09:40:27 +02:00
Felix Fietkau f3c75e3562 tools/elfutils: fix the build on macOS
The DEFAULT_INCLUDES override adds -I. to the src directory. There,
upstream deliberately clears DEFAULT_INCLUDES: with libc++, <format>
includes <stack>, which then resolves to the stack binary in src.

Leave out -I. for the src directory.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-10-08 09:50:39 +02:00
Ryan Leung 79bc56cb74 u-boot: add project's new download source
Das U-Boot project is transitioning their infrastructure [1],[2] and now publishes releases on their
GitLab [3]. Add it as the first download source and keep the existing sources which are currently
still available for historical releases.

Also update the U-Boot project web page [1] for the package URL and bump PKG_RELEASE for uboot-tools

[1]: https://lore.kernel.org/u-boot/20260511174116.GJ1858239@bill-the-cat/
[2]: https://lore.kernel.org/u-boot/20260727224922.GB1188@bill-the-cat/
[3]: https://git.u-boot-project.org/u-boot/u-boot/-/releases/

Signed-off-by: Ryan Leung <untilscour@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/25343
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-10-07 14:29:03 +02:00
Tianling Shen be0af59be9 tools/7z: update to 26.03
This version contains fixes for following CVEs:
- CVE-2026-48092
- CVE-2026-48095
- CVE-2026-48101
- CVE-2026-48102
- CVE-2026-48103
- CVE-2026-48104
- CVE-2026-48111
- CVE-2026-48112
- CVE-2026-14266
- CVE-2026-58052

Changelog: https://www.7-zip.org/history.txt

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/25597
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-10-05 00:45:33 +02:00
Paul Spooren 1eaea67aef tools/mtd-utils: make mkfs.ubifs images reproducible
UBIFS root file systems differ between builds, e.g. the one of the
Microchip SAMA7G5-EK: the superblock gets a random UUID, the inodes get
the ctime of the build host, which can't be reset with touch, and the
entries of each directory are added in readdir() order, which depends on
the host file system and decides inode numbers and layout.

Add a patch that, when SOURCE_DATE_EPOCH is set, uses a time-based
(version 1) UUID with that time and clamps all inode times to it. The
node ID of the UUID is taken from the new --uuid-node option, which the
image build sets from IMG_PART_DISKGUID, itself derived from
SOURCE_DATE_EPOCH and the kernel vermagic.
Directory entries are added sorted by name. Two trees with the same
contents but different ctimes and readdir() order now give identical
images; without SOURCE_DATE_EPOCH the UUID stays random.

Link: https://github.com/openwrt/openwrt/pull/25430
Signed-off-by: Paul Spooren <mail@aparcar.org>
2026-10-03 22:45:10 +02:00
Paul Spooren 3746b9b307 tools: firmware-utils: update to Git HEAD (2026-09-30)
fac587ee67d5 mkzynfw: add board profiles for Zyxel XGS2220 series
a0177f9b3bba mkzynfw: align RTL_OTTO_BOARD definitions
ceaf0f9c1e22 mksenaofw: warn instead of erroring on plain type-0 images
71f8d9a9a22a asusuimage: fix fs_offset extraction in show_info
9cf0f6e00e39 zyimage: make output byte order explicit
a1d9589f1ea1 dlink-sge-image: initialize the signature length

Link: https://github.com/openwrt/openwrt/pull/25517
Signed-off-by: Paul Spooren <mail@aparcar.org>
2026-10-01 20:29:41 +02:00
Josef Schlehofer 43ec1e56b4 tools/b43-tools: update to latest git HEAD
Update b43-tools to latest git commit 36284a5 (release b43-fwcutter-021).

Includes upstream commit 61105cc ("Makefiles: Declare source
prerequisites for object rules"), which fixes build failures on macOS
and systems where $< resolved to generated dependency prerequisites
rather than the source file.

Changes:
36284a5 fwcutter: Update release script
8690498 ci: Reduce flags
e23a1bb Align all CFLAGS
8440ca7 Add build CI
672a056 Use true instead of hardcoding /bin/true
7fd711a fwcutter: Bump version
61105cc Makefiles: Declare source prerequisites for object rules

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/25500
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-10-01 01:07:23 +02:00
Ivan Pavlov a5bc79c39b tools/elfutils: update to 0.196
To reduce the size of the downloaded source files, the version of tools library
has been aligned with the version used in the packages.

Release notes: https://inbox.sourceware.org/elfutils-devel/CAJDtP-QXj15OOpBxLdU+V1PZKM8YmnsE1eVy-R2R5xbE7Shk5A@mail.gmail.com/T/#u

Manually rebased patches:
 - 012-backport-mips-support-readelf.patch
 - 100-portability.patch

Removed patches:
 - 001-fix-backport-iquote-include.patch - fixed in [1]
 - 110-objects-manifest.patch - upstreamed

Include new submodule 'libdwfl_stacktrace' in makefile.
Changes from 8f920d2 are rolled back after fix [1]

1. https://sourceware.org/bugzilla/show_bug.cgi?id=33103

Fixes: https://github.com/openwrt/openwrt/commit/8f920d2f94b0878e9b4291ffa18cfc9e02828f77
Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/25388
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-29 09:27:40 +02:00
Robert Marko cec4e5acae tools: mkimage: refresh patches
Refresh mkimage patches, so that CI is happy.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-28 14:12:42 +02:00
Massimo Mazzariol 6f684052de tools/mkimage: reject empty custom magic
Reject custom magic values when strtoull() does not parse any
digits, in addition to values outside the 32-bit uImage magic range.

Signed-off-by: Massimo Mazzariol <mazzariol.massimo@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/25288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-25 10:05:04 +02:00
Massimo Mazzariol 36efe835fd tools/mkimage: validate custom magic range
strtoull() can parse values wider than the 32-bit uImage magic field.
Reject values above UINT32_MAX before assigning the parsed value to
params.magic.

Signed-off-by: Massimo Mazzariol <mazzariol.massimo@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/25288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-25 10:05:04 +02:00
Massimo Mazzariol f9a75af743 tools/mkimage: support custom magic in dumpimage
OpenWrt's custom uImage magic patch makes legacy image verification use
params.magic instead of IH_MAGIC.

mkimage initializes this field, while dumpimage leaves it zeroed. This
causes dumpimage to reject valid legacy uImages using the standard
IH_MAGIC with FDT_ERR_BADMAGIC.

Initialize dumpimage's magic to IH_MAGIC so the normal verification path
works by default. Also add -M handling matching mkimage, allowing
dumpimage to verify and extract uImages built with a custom magic.

Tested with the patched U-Boot 2026.07 host tools. Standard-magic images
list and extract correctly, custom-magic images are accepted with the
matching -M value, and are rejected without it or with an incorrect
magic. Extracted payloads were verified byte-for-byte.

Fixes: #25287
Signed-off-by: Massimo Mazzariol <mazzariol.massimo@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/25288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-25 10:05:04 +02:00
Robert Marko e4f2ae3b8d tools/cmake: pass testing option after bootstrap separator
Host/Configure/Default supplies the bootstrap "--" separator before
CMAKE_HOST_OPTIONS. Keep BUILD_TESTING with the CMake cache options so
it is passed after that separator, without introducing a second one.

Fixes: ddb23f3a02 ("tools/cmake: pass -DBUILD_TESTING=OFF to bootstrap")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-23 16:57:43 +02:00
Josef Schlehofer ddb23f3a02 tools/cmake: pass -DBUILD_TESTING=OFF to bootstrap
Instead of carrying 100-no-testing.patch, pass -DBUILD_TESTING=OFF
directly to CMake's bootstrap script. This avoids refreshing the patch
on every CMake update.

The patch also changed the default in the installed CTest.cmake module.
Preserve that behavior by passing -DBUILD_TESTING=OFF by default in
cmake.mk for target and host builds. Packages can override it via
CMAKE_OPTIONS or CMAKE_HOST_OPTIONS.

OpenWrt never runs CMake tests, so building them only wastes build time.

This replaces the patch introduced in 8af80e79bd ("tools/cmake:
update to 3.17.0").

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24403
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-23 16:29:25 +02:00
Josef Schlehofer ad71bfef7e tools/cmake: pass zstd paths to bootstrap
Instead of carrying a patch (150-zstd-libarchive.patch) that modifies
Utilities/cmlibarchive/CMakeLists.txt to enable pkg-config search for
zstd, pass explicit staging library and include paths (-DZSTD_INCLUDE_DIR
and -DZSTD_LIBRARY) directly to CMake's bootstrap script.

ZSTD_INCLUDE_DIR and ZSTD_LIBRARY are the cache variables CMake itself
sets when --system-zstd is not used, so pre-seeding them guarantees that
CMake always links against OpenWrt's staging libzstd without requiring
a patch.

Fixes: 0e3d51ccae ("tools/cmake: fix compilation with host libzstd-dev")
Suggested-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24407
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-23 15:17:59 +02:00
Felix Fietkau d5c26afe33 tools/yafut: refresh patch
Refresh 100-honour-SOURCE_DATE_EPOCH.patch

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-09-23 11:58:39 +02:00
John Crispin 6eae1d6b77 tools: cache the configure results of eleven more autotools tools
Configure stage without a cache against a warm cache:

  mtools      3.34 s -> 0.28 s
  gengetopt   4.39 s -> 2.13 s
  fakeroot   10.97 s -> 8.73 s
  xz          4.32 s -> 2.17 s
  libressl    3.07 s -> 1.46 s
  flex       12.32 s -> 10.98 s
  expat       2.74 s -> 1.52 s
  bc          1.34 s -> 0.38 s
  dosfstools  3.13 s -> 2.54 s
  libtool     2.86 s -> 2.29 s
  mtd-utils   4.06 s -> 3.56 s

flex, fakeroot, dosfstools and mtd-utils run autoreconf in the same
stage, and the cache does not reach that part.

Each of the eleven configures the same way with a warm cache as it does
without one: the check configures three times, without a cache, with a
cold cache and with a warm cache, and every generated file of the first
and the last run is identical. A static scan of each configure script
found no cache check that changes CFLAGS, CPPFLAGS, LDFLAGS or LIBS
without restoring it.

patchelf, mklibs and automake pass the same check but gain less than
half a second, so they stay out.

make world after make tools/clean now takes 121 s against 177 s with
cold caches.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 20:29:59 +02:00
John Crispin 37f7186e75 tools/sparse: build in parallel
sparse set PKG_BUILD_PARALLEL, which a host build does not read, so it
built with one job. Use HOST_BUILD_PARALLEL: 6.6 s -> 1.3 s.

It builds five times out of five with the job server, and each build
installs files that are identical to those of a serial build.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 20:29:59 +02:00
John Crispin c3447b76fe tools: build autoconf, automake, libtool, dosfstools and make-ext4fs in parallel
libtool      22.5 s -> 20.0 s
  dosfstools    6.0 s ->  4.8 s
  make-ext4fs   2.1 s ->  1.2 s
  automake      3.9 s ->  3.4 s
  autoconf      3.1 s ->  2.6 s

Each one builds five times out of five with the job server, and each
build installs files that are identical to those of a serial build.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 20:29:59 +02:00
John Crispin 0f05c481fd tools: pass the job server to the compile step of mtools, mkimage and lzma
host-build.mk clears MAKEFLAGS, so a custom Host/Compile that runs a bare
$(MAKE) builds with one job, whatever HOST_BUILD_PARALLEL says. mtools
sets the flag, but its compile step never used it.

Each of the three now passes $(HOST_JOBS), and mkimage and lzma set
HOST_BUILD_PARALLEL:

  mkimage  11.7 s -> 7.2 s
  mtools    8.3 s -> 4.8 s
  lzma      4.0 s -> 1.8 s

Each one builds five times out of five with the job server, and each
build installs files that are identical to those of a serial build.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 20:29:59 +02:00
John Crispin ec4768fbed yafut: use a reproducible timestamp
yaffsfs_CurrentTime() returns the wall clock, and Yaffs writes that value
to the access, modification and change time of every object header. The
RouterBOARD images of ipq40xx/mikrotik therefore differ on every build,
and so does the sysupgrade metadata checksum that follows them.

Add a patch that reads SOURCE_DATE_EPOCH, which the build already exports.

Tested with two images written one second apart. They are identical with
SOURCE_DATE_EPOCH set and differ without it.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:46:30 +02:00
John Crispin cd322612cc tools: cache the configure results of ten autotools tools
These ten hold up the wall clock on their own. Their configure stages
run while nothing else does, because the tools build in dependency
order. Measured over a full build, cold cache against warm:

  sed        21.68 s -> 1.22 s
  m4         21.48 s -> 1.22 s
  findutils  19.47 s -> 1.56 s
  tar        17.75 s -> 1.47 s
  cpio       14.28 s -> 1.26 s
  bison      12.81 s -> 1.29 s
  patch      12.16 s -> 1.31 s
  elfutils   26.58 s -> 15.47 s

Each of the ten configures the same way with a warm cache as it does
without one. The check runs configure three times, without a cache, with
a cold cache and with a warm cache, and compares every file that
configure generates between the first and the last. ncurses fails that
check; these do not.

The only difference left is ac_ct_AR and ac_ct_RANLIB, which a cold run
fills through the fallback path of AC_CHECK_TOOL and a warm run leaves
empty. AR and RANLIB are correct in both, and no generated Makefile
reads the ac_ct_ form.

tools/cmake keeps its 33 s, the longest configure stage in the build. It
bootstraps with its own script rather than autoconf, so this does not
reach it.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
John Crispin 3d597977b6 tools: build erofs-utils, mtd-utils and cpio in parallel
A tool builds with -j1 unless it sets HOST_BUILD_PARALLEL, and 45 of the
73 tools do not set it. These three gain the most from the job server on
a cold build of this tree:

  erofs-utils  23.11 s -> 15.73 s
  mtd-utils    11.70 s ->  6.42 s
  cpio          8.46 s ->  3.56 s

Each one builds three times out of three with the job server, and each
build writes a tree that is identical to the one a serial build writes.

Signed-off-by: John Crispin <john@phrozen.org>
2026-09-22 18:18:58 +02:00
Shiji Yang cce54a1d82 tools/xz: update to version 5.8.4
Release Notes:
https://github.com/tukaani-project/xz/releases/tag/v5.8.4

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/25295
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-21 13:28:13 +02:00
Wei-Ting Yang d0d8c40b67 tools/expat: update to 2.8.4
This version bump includes fixes for the following CVEs:
- CVE-2026-66046
- CVE-2026-72522
- CVE-2026-76641
- CVE-2026-76956
- CVE-2026-76957

Full release notes:
https://github.com/libexpat/libexpat/blob/master/expat/Changes

Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/25134
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-12 16:49:17 +02:00
Andy Chiang f3f427048a tools: erofs-utils: update to 1.9.4
ChangeLog:
  https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/tree/ChangeLog?h=v1.9.4

Build system: x86/64
Tested on: x86/64

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24991
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-08 10:09:34 +02:00
Hannu Nyman 50258d2078 tools/cmake: update to version 4.4.3
Update cmake to version 4.4.3.
(No need for patch changes)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/25043
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-06 20:08:49 +02:00
Josef Schlehofer c0262ed5af tools: gnulib: remove stale gl_-prefixed macros from staging
Commit c820f097e0 ("tools: gnulib: install .m4 file with gl_ prefix")
installed gnulib autoconf macros under gl_-prefixed file names. The
scheme was later reverted in commit cda598a595, but the previously
installed files were never removed from share/aclocal.

As aclocal reads the whole directory, stale gl_*.m4 files can override
the current unprefixed macros. This breaks elfutils builds on macOS
after the gnulib stable-202507 update, resulting in empty #if
expressions in the generated ctype.h.

Remove the stale files in Host/Uninstall. Host/Install calls it first,
so affected build trees are cleaned up automatically on the next
gnulib reinstall.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24759
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-08-19 19:46:46 +02:00
Luiz Angelo Daros de Luca 36946e2993 tools: firmware-utils: update to Git HEAD (2026-07-30)
df23826047c9 uimage_padhdr: improve error handling and cleanup
c9da48613b5d uimage_padhdr: add options to insert data into padding area

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24773
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-08-19 01:19:54 +02:00
Peter Polonec 56c6654957 tools: zip: fix command injection in -T
[backport from Debian zip 3.0-16]
https://sources.debian.org/data/main/z/zip/3.0-16/debian/patches/fix-command-injection.patch

Info-ZIP 3.0 builds a shell command with the archive name when -T tests
an archive. A crafted archive name can inject additional shell commands.

Backport Debian's fix. Quote the archive name before it is added to the
test command.

Link: https://sintonen.fi/advisories/infozip-test-option-command-injection.txt
Signed-off-by: Peter Polonec <polonec.devel@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24730
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-08-17 10:36:17 +02:00
Rosen Penev fc636dac86 tools/meson: update to 1.11.2
Remove upstreamed patch and refresh others.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24560
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-08-14 12:11:19 +02:00
Carsten Schuette dfa0a92172 mold: bump to 2.42.0
Update mold to 2.42.0

Changelog:
https://github.com/rui314/mold/releases/tag/v2.42.0

Signed-off-by: Carsten Schuette <schuettecarsten@googlemail.com>
Link: https://github.com/openwrt/openwrt/pull/24672
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-08-14 11:00:45 +02:00
Rosen Penev 5f144a7513 tools/sed: update to 4.10
Remove upstreamed patch.

Remove HOST_CONFIGURE_VARS. These are not needed any more.
ac_cv_search_setfilecon was removed completely and the others are guarded
by if test "$with_selinux" != no; then now.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24572
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-08-13 23:39:03 +02:00
Rosen Penev d70761c2e5 tools/isl: update to 0.28
Basic update. No patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24573
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-08-06 23:11:50 +02:00
Jack Sun ac61bc0a9c tools/cmake: update to 4.4.0
Release notes:https://cmake.org/cmake/help/latest/release/4.4.html

Refresh patches:
- 100-no-testing.patch
- 130-bootstrap_parallel_make_flag.patch
- 150-zstd-libarchive.patch
- 160-disable_xcode_generator.patch

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24324
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-08-04 21:40:38 +02:00
Paweł Owoc 9452d96721 tools: elfutils: fix uio header inclusion
Fixes arm64 build failures by replacing <linux/uio.h> with POSIX <sys/uio.h>
to avoid header redefinition conflicts.

gnulib's fcntl.h ends up including glibc's fcntl.h and fcntl-linux.h
which includes glibc's types/struct_iovec.h,
thats where the redefinition happens.

the lines that use <linux/uio.h> are antiquated and were never necessary.
it can be traced back to the original 2014 change that added the file with aarch64 support
in upstream commit 66637fa21044ac0058b25522f473669e73de328b

it was never necessary to use the linux header over the glibc headers,
as elfutils only needs the iovec struct and that struct was present since glibc 2.0 in the 1990s

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24539
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-08-04 09:17:53 +02:00
Michael Pratt a3830a1589 tools: gnulib: fix build with latest glibc C23 changes
Backport a patch that covers a build problem with latest glibc
being used as the host standard C library during tools build.

The C23 standard changes some functions that used to drop qualifiers
like "const" or "volatile" and are now forced to preserve them
in the return type based on the input type at all times.
Developers of glibc have responded by making these functions
into macros after they are declared with prototypes.
This is not compatible with the way gnulib is written,
so when the functions are redeclared in gnulib,
the preprocessor expands the _function name_ itself
as if it is a macro name, but not fully,
which results in unusual looking build errors,
e.g. the failed processing of keywords that were never written
and have no business being in a prototype, or,
as a keyword that is expected to be there and nearly guarenteed
to work but mysteriously is not working, displayed as:
"error: expected identifier or '(' before _____".

The backport patch introduces and implements a new macro
in order to prevent function names from being interpreted as macros,
by wrapping it in parentheses for C, or simply placing it back for C++
in the first stage of macro expansion which satisfies the goal
of no further expansion taking place during preprocessing.

Add an additional patch for the functions declared
in the fts header, as this bug also applies to them,
however, this was overlooked by upstream gnulib,
likely because the bug is not presenting as an error.

Yet another patch corrects the order between
specifiers and attributes in GCC syntax for header
lib/fts.in.h which can be blamed on an upstream commit.

Specifically, the throw() or noexcept() keywords
must be before attributes at the end of a declaration.
There are two headers, lib/cdefs.h and lib/getopt-ext.h
that already demonstrate the correct order which is very
strictly necessary in the latest version of GCC
when compiling C++ code, and acceptable for C code,
as the "__THROW" macro is simply another attribute in that case.

Added backport patch:
 - 400-c23-qualifier-generic.patch

Added pending patch:
 - 410-unmacro-fts-functions.patch
 - 450-attribute-specifier-order.patch

Ref: 80e5de158316 ("fts: Improve GCC 11 allocation-deallocation checking.") # gnulib.git
Reported-by: Aditya Nugraha <vortexilation@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24247
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-30 19:40:44 +02:00
Michael Pratt 837f5eaae2 tools: gnulib: update to branch stable-202507
Move to the July 2026 update of the last 2025 stable branch.

This branch includes many new modules and changes to modules
that were previously patched, so many patches are dropped.

Newer gnulib now also has a proper fts header
in the form of a template file for variable definitions
that are set during configuration,
however, it still ends up named with an underscore,
so the patch 120-unmangle-darwin-fts-h.patch
in order to resolve differences between macOS and standard
fts headers is rewritten to patch the new header include guard
and the fts module file in order to name it without an underscore.

Manually Adjusted Patch:
 - 120-unmangle-darwin-fts-h.patch

All other patches are automatically refreshed.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24247
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-30 19:40:44 +02:00
Michael Pratt baeee77917 tools: automake: do not error on missing conditional
Now that cond.m4 is not being overwritten and is actively used,
make it less aggressive on encountering an undefined conditional
not set by a macro which is itself conditionally called,
where the condition is set to intentionally not trigger the macro.

This prevents the need to further patch a configure.ac file
to edit the improper usage of or remove a disabled macro
which triggers the error "conditional ___ is not defined..."
in the cases where autoreconf is still necessary for another reason,
or, if this is the only build issue,
autoreconf can now be used to avoid this.

Instead of erroring, align the behavior of AM_CONDITIONAL
closer to the gnulib variant gl_CONDITIONAL
which ignores and disables the conditional in this case.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24362
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-30 19:34:40 +02:00
Jonas Jelonek 3ec398f0c3 tools: firmware-utils: update to Git HEAD (2026-07-19)
1ab209233682 mkzynfw: rename macros from RTL93XX to RTL_OTTO
606f25ef3ca2 mkzynfw: add board definitions for Zyxel GS1920 v2 series
162fa533b309 mkzynfw: add board definitions for GS2210 series
b2d46a825a53 mkzynfw: add board definitions for Zyxel GS1920 v1 series
5c5df244b8a1 Revert "mkzynfw: add board definitions for Zyxel GS1920 v1 series"
7f28bfbc4b5a Revert "mkzynfw: add board definitions for GS2210 series"
5e1b83d1fc2b mkzynfw: add board definitions for GS2210 series
3e6b426938e8 mkzynfw: add board definitions for Zyxel GS1920 v1 series

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-19 21:45:08 +00:00
Michael Pratt a54eb7297f tools: gnulib: rename macro file for cond module
It was reported that cond.m4 in gnulib is a name clash with
cond.m4 provided by Automake, where they are for completely
different purposes instead of different versions of the same macros.

A quick survey of all the macro files in the build directory reveals that
this is the only case where the gnulib copy is signficantly smaller
than the rest of the copies of the same macro name
distributed in the rest of the build system,
and the only one that name clashes with Automake.

A previous fix added a prefix to all macros from gnulib,
but the name must match how it is described in the respective modules files
as a functional requirement to build certain tools for certain (older) hosts,
so patch the problematic module instead of renaming all macros from gnulib.

Ref: c820f097e0 ("tools: gnulib: install .m4 file with gl_ prefix")
Ref: 78a8cfb577 ("tools: gnulib: fix broken install of .m4 files")
Reported-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24136
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-12 11:26:53 +02:00
Michael Pratt cda598a595 Revert "tools: gnulib: install .m4 file with gl_ prefix"
A more proper fix follows this revert.

This reverts commit c820f097e0.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24136
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-12 11:26:53 +02:00
Michael Pratt 773a46cc7e Revert "tools: gnulib: fix broken install of .m4 files"
A more proper fix follows these reverts.

This reverts commit 78a8cfb577.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24136
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-12 11:26:52 +02:00
Shiji Yang 8b5702e328 tools/fakeroot: update to 2.1.3
Changelog:
https://salsa.debian.org/clint/fakeroot/-/blob/debian/2.1.3-1/debian/changelog?ref_type=tags

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24140
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-11 23:44:48 +02:00
Shiji Yang f381d86d91 tools/mkimage: update to v2026.07
Update to the latest version. There are no new changes here, just
to align with uboot-tools.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24124
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-07-09 13:00:18 +02:00
Wei-Ting Yang 62e7565f0e tools/expat: update to 2.8.2
This version bump includes fixes for the following CVEs:
- CVE-2026-41080
- CVE-2026-45186
- CVE-2026-50219
- CVE-2026-56131
- CVE-2026-56132
- CVE-2026-56403
- CVE-2026-56404
- CVE-2026-56405
- CVE-2026-56406
- CVE-2026-56407
- CVE-2026-56408
- CVE-2026-56409
- CVE-2026-56410
- CVE-2026-56411
- CVE-2026-56412

Full release notes:
https://github.com/libexpat/libexpat/blob/master/expat/Changes

Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24016
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-07-02 16:36:16 +02:00
Jack Sun 219798083c tools/cmake: update to 4.3.4
Release notes:https://cmake.org/cmake/help/latest/release/4.3.html

No need refresh patches.

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23938
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-25 23:13:25 +02:00
Thomas Weißschuh 4ffea56388 tools: util-linux: update to 2.42.2
Release notes:
https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42.2-ReleaseNotes

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Link: https://github.com/openwrt/openwrt/pull/23844
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-24 02:14:33 +02:00
Jonas Jelonek 47d1bf564f tools: bc: update to 1.08.2
Changelog included in source tar.

Removed patches:
- 000-getopt-prototype.patch
- 001-getopt-declaration.patch

Both patch changes are included upstream in this version.

Link: https://github.com/openwrt/openwrt/pull/23911
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-22 13:01:20 +02:00