From 5a8588e36055cddf042b7224eb3beb611b7ee93f Mon Sep 17 00:00:00 2001 From: Sarah Maedel Date: Wed, 28 Aug 2024 11:27:05 +0200 Subject: [PATCH 1/4] hostapd: fix anqp_3gpp_cell_net list delimiter This patch fixes the list delimiter between 3GPP networks passed to hostapd. > list iw_anqp_3gpp_cell_net '262,001' > list iw_anqp_3gpp_cell_net '262,002' When passing a list of "iw_anqp_3gpp_cell_net" parameters via UCI, hostapd would crash at startup: > daemon.err hostapd: Line 73: Invalid anqp_3gpp_cell_net: 262,001:262,002 Using a semicolon as a delimiter, hostapd will start as expected. Signed-off-by: Sarah Maedel (cherry picked from commit 8de185a176079e738984ab0fc89841bc2e613fb1) --- package/network/services/hostapd/files/hostapd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 8e0cf4f091..6b4371960b 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -434,7 +434,7 @@ append_iw_anqp_3gpp_cell_net() { if [ -z "$iw_anqp_3gpp_cell_net_conf" ]; then iw_anqp_3gpp_cell_net_conf="$1" else - iw_anqp_3gpp_cell_net_conf="$iw_anqp_3gpp_cell_net_conf:$1" + iw_anqp_3gpp_cell_net_conf="$iw_anqp_3gpp_cell_net_conf;$1" fi } From d811a09524118451d14a0ae8abce21fc123a3bf0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 29 Aug 2024 20:04:02 +0200 Subject: [PATCH 2/4] include: autotools: do not symlink files in autoreconf In Gluon's Github Actions CI, we were occasionally seeing bizarre build errors that looked like a config.sub file had been corrupted, or changed while it was being executed. The cause turned out to be an interaction of the symlinks created by autoreconf (pointing from individual tools' build dirs into `staging_dir/host/share/automake-1.16`) and OpenWrt's host-build.mk, which replaced config.guess and config.sub *after* autoreconf. The result was that the replacement of these files ended up following the symlinks and writing the files in `staging_dir/host/share/automake-1.16` instead of a package's build dir. This could cause other packages' builds to fail if they were currently executing the scripts while they were being written. To fix this, disable autoreconf's symlinking feature, so that modifying these files in a package's build directory can't accidentally affect the staged versions. Link: https://github.com/openwrt/openwrt/pull/15825 Signed-off-by: Matthias Schiffer (cherry picked from commit c364cb8e469f9a7de1ed8960163c90e26b2df1ad) --- include/autotools.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/autotools.mk b/include/autotools.mk index d0e4b3642f..7fc6f37175 100644 --- a/include/autotools.mk +++ b/include/autotools.mk @@ -44,7 +44,7 @@ define autoreconf touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; \ $(AM_TOOL_PATHS) \ LIBTOOLIZE='$(STAGING_DIR_HOST)/bin/libtoolize --install' \ - $(STAGING_DIR_HOST)/bin/autoreconf -v -f -i -s \ + $(STAGING_DIR_HOST)/bin/autoreconf -v -f -i \ $(if $(word 2,$(3)),--no-recursive) \ -B $(STAGING_DIR_HOST)/share/aclocal \ $(patsubst %,-I %,$(5)) \ From c4c43c64aa6c5ba44322ddefa106b9e707b64781 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 29 Aug 2024 20:04:02 +0200 Subject: [PATCH 3/4] tools: libtool: do not symlink files in bootstrap Another instance of files in build_dir symlinking to staging_dir. While the symlinks do not currently cause any bugs in the libtool package, such symlinks were found to make the build more fragile, as writing to the symlink may accidentally modify the shared file in staging_dir. Pass --copy to bootstrap to disable the symlinking. Link: https://github.com/openwrt/openwrt/pull/15825 Signed-off-by: Matthias Schiffer (cherry picked from commit d6e54593198851235906c6ab77c20c6209ab19f5) --- tools/libtool/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libtool/Makefile b/tools/libtool/Makefile index 1187191478..e76aed8ced 100644 --- a/tools/libtool/Makefile +++ b/tools/libtool/Makefile @@ -28,6 +28,7 @@ define Host/Bootstrap cd $(HOST_BUILD_DIR); \ $(AM_TOOL_PATHS) \ ./bootstrap \ + --copy \ --force \ --skip-git \ --skip-po \ From 5773538c907610ebfd1ea13701383e511b7fd00b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 29 Aug 2024 20:24:02 +0200 Subject: [PATCH 4/4] base-files: fix merge of passwd/shadow/group lines with trailing colons Empty trailing fields get lost when the lines are split and merged again at colons, resulting in unparsable entries. Only use the split fields for matching against the other file, but emit the original line unchanged to fix the issue. Fixes: de7ca7dafadf ("base-files: merge /etc/passwd et al at sysupgrade config restore") Signed-off-by: Matthias Schiffer (cherry picked from commit 9bbaa6f2c0419739fb85d48d0f527cb1622946ee) --- package/base-files/files/lib/preinit/80_mount_root | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/lib/preinit/80_mount_root b/package/base-files/files/lib/preinit/80_mount_root index c3816c2cbf..ccfc481285 100644 --- a/package/base-files/files/lib/preinit/80_mount_root +++ b/package/base-files/files/lib/preinit/80_mount_root @@ -9,7 +9,7 @@ missing_lines() { IFS=":" while read line; do set -- $line - grep -q "^$1:" "$file2" || echo "$*" + grep -q "^$1:" "$file2" || echo "$line" done < "$file1" IFS="$oIFS" }