diff options
author | PÁLI Gábor János <pali.gabor@gmail.com> | 2023-08-03 10:10:44 +0200 |
---|---|---|
committer | PÁLI Gábor János <pali.gabor@gmail.com> | 2023-09-16 17:58:03 +0200 |
commit | 89279d87c5d3e0ea330be1f927e3f3bc59dbc2a7 (patch) | |
tree | 353bc9a026d0140151e760efbc4f6a6a6b24a020 /aports/busybox/0003-ash-add-built-in-BB_ASH_VERSION-variable.patch | |
parent | 084335e136581edc28137b152cc559778224570e (diff) | |
download | freebsd-wifibox-alpine-89279d87c5d3e0ea330be1f927e3f3bc59dbc2a7.zip |
Update to Linux 6.1 and Alpine 3.18
- Update base-layout to 3.4.3
- Update busybox to 1.36.1
- Update iptables to 1.8.9
- Update linux-lts to 6.1.53
- Update to openrc to 0.48
- Update rtl8821ce to snapshot of 20230915
- Replace rtwB88 with a third-party driver
- Update rtw89 to snapshot of 20230913
- Import wpa_supplicant fixes from Arch Linux
Diffstat (limited to 'aports/busybox/0003-ash-add-built-in-BB_ASH_VERSION-variable.patch')
-rw-r--r-- | aports/busybox/0003-ash-add-built-in-BB_ASH_VERSION-variable.patch | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/aports/busybox/0003-ash-add-built-in-BB_ASH_VERSION-variable.patch b/aports/busybox/0003-ash-add-built-in-BB_ASH_VERSION-variable.patch new file mode 100644 index 0000000..1803194 --- /dev/null +++ b/aports/busybox/0003-ash-add-built-in-BB_ASH_VERSION-variable.patch @@ -0,0 +1,85 @@ +From 53b13dbc8312dfa4326751f063437894c5e5a43d Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Wed, 10 Mar 2021 23:38:57 -0700 +Subject: [PATCH] ash: add built-in $BB_ASH_VERSION variable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is helpful for detecting if the shell is busybox ash or not, +which is necessary for enabling ash-specific features in /etc/profile +and Alpine's default $ENV. + +https://gitlab.alpinelinux.org/alpine/aports/-/issues/12398 outlines +the rationale for detecting what shell is running in /etc/profile and +similar. + +function old new delta +.rodata 77899 77925 +26 +varinit_data 360 384 +24 +------------------------------------------------------------------------------ +(add/remove: 0/0 grow/shrink: 2/0 up/down: 50/0) Total: 50 bytes + +Signed-off-by: Ariadne Conill <ariadne@dereferenced.org> +--- + shell/ash.c | 28 ++++++++++++++++++++-------- + 1 file changed, 20 insertions(+), 8 deletions(-) + +diff --git a/shell/ash.c b/shell/ash.c +index 18ccc1329..cb38582fc 100644 +--- a/shell/ash.c ++++ b/shell/ash.c +@@ -158,6 +158,14 @@ + //config: you to run the specified command or builtin, + //config: even when there is a function with the same name. + //config: ++//config:config ASH_VERSION_VAR ++//config: bool "declare $BB_ASH_VERSION variable" ++//config: default y ++//config: depends on SHELL_ASH ++//config: help ++//config: Enable support for declaring the $BB_ASH_VERSION variable, ++//config: which is set as the busybox version. ++//config: + //config:endif # ash options + + //applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP)) +@@ -2142,6 +2150,9 @@ static const struct { + { VSTRFIXED|VTEXTFIXED , "PS1=$ " , NULL }, + { VSTRFIXED|VTEXTFIXED , "PS2=> " , NULL }, + { VSTRFIXED|VTEXTFIXED , "PS4=+ " , NULL }, ++#if ENABLE_ASH_VERSION_VAR ++ { VSTRFIXED|VTEXTFIXED , "BB_ASH_VERSION=" BB_VER, NULL }, ++#endif + #if ENABLE_ASH_GETOPTS + { VSTRFIXED|VTEXTFIXED , defoptindvar, getoptsreset }, + #endif +@@ -2201,19 +2212,20 @@ extern struct globals_var *BB_GLOBAL_CONST ash_ptr_to_globals_var; + #define vps1 varinit[VAR_OFFSET1 + 2] + #define vps2 varinit[VAR_OFFSET1 + 3] + #define vps4 varinit[VAR_OFFSET1 + 4] ++#define VAR_OFFSET2 (VAR_OFFSET1 + ENABLE_ASH_VERSION_VAR) + #if ENABLE_ASH_GETOPTS +-# define voptind varinit[VAR_OFFSET1 + 5] ++# define voptind varinit[VAR_OFFSET2 + 5] + #endif +-#define VAR_OFFSET2 (VAR_OFFSET1 + ENABLE_ASH_GETOPTS) +-#define vlineno varinit[VAR_OFFSET2 + 5] +-#define vfuncname varinit[VAR_OFFSET2 + 6] ++#define VAR_OFFSET3 (VAR_OFFSET2 + ENABLE_ASH_GETOPTS) ++#define vlineno varinit[VAR_OFFSET3 + 5] ++#define vfuncname varinit[VAR_OFFSET3 + 6] + #if ENABLE_ASH_RANDOM_SUPPORT +-# define vrandom varinit[VAR_OFFSET2 + 7] ++# define vrandom varinit[VAR_OFFSET3 + 7] + #endif +-#define VAR_OFFSET3 (VAR_OFFSET2 + ENABLE_ASH_RANDOM_SUPPORT) ++#define VAR_OFFSET4 (VAR_OFFSET2 + ENABLE_ASH_RANDOM_SUPPORT) + #if BASH_EPOCH_VARS +-# define vepochs varinit[VAR_OFFSET3 + 7] +-# define vepochr varinit[VAR_OFFSET3 + 8] ++# define vepochs varinit[VAR_OFFSET4 + 7] ++# define vepochr varinit[VAR_OFFSET4 + 8] + #endif + #define INIT_G_var() do { \ + unsigned i; \ |