diff options
author | PÁLI Gábor János <pali.gabor@gmail.com> | 2022-10-11 18:22:02 +0200 |
---|---|---|
committer | PÁLI Gábor János <pali.gabor@gmail.com> | 2022-10-11 18:22:02 +0200 |
commit | 960171cbfa5cb596d6e537f79288deea67a539a2 (patch) | |
tree | 646efa7d7dbec1a447f89a869d808501f9d221f4 /aports/busybox | |
parent | fd09e88160c1e1bf42e54fa0488bcf34e0be106d (diff) | |
download | freebsd-wifibox-alpine-960171cbfa5cb596d6e537f79288deea67a539a2.zip |
busybox: import changes from upstream
References:
- https://git.alpinelinux.org/aports/commit/main/busybox?h=3.16-stable&id=b14c075d8b0d0a05db8e630455126d533c8a5d00
- https://git.alpinelinux.org/aports/commit/main/busybox?h=3.16-stable&id=2bf6ec48e526113f87216683cd341a78af5f0b3f
Diffstat (limited to 'aports/busybox')
-rw-r--r-- | aports/busybox/0001-avoid-redefined-warnings-when-building-with-utmps.patch | 93 | ||||
-rw-r--r-- | aports/busybox/APKBUILD | 4 |
2 files changed, 87 insertions, 10 deletions
diff --git a/aports/busybox/0001-avoid-redefined-warnings-when-building-with-utmps.patch b/aports/busybox/0001-avoid-redefined-warnings-when-building-with-utmps.patch index 246e9b0..083b8a8 100644 --- a/aports/busybox/0001-avoid-redefined-warnings-when-building-with-utmps.patch +++ b/aports/busybox/0001-avoid-redefined-warnings-when-building-with-utmps.patch @@ -1,16 +1,93 @@ -From: Jakub Jirutka <jakub@jirutka.cz> -Date: Mon, 06 Sep 2021 23:13:05 +0200 -Subject: [PATCH] Avoid redefined warnings when building with utmps +From 770825e4730fadc0b7fc5a0f154eb368a37564a0 Mon Sep 17 00:00:00 2001 +From: Laurent Bercot <ska-devel@skarnet.org> +Date: Wed, 20 Jul 2022 10:39:22 +0200 +Subject: [PATCH] Avoid redefined warnings when buiding with utmps +Do not use _PATH_UTMP or _PATH_WTMP, and do not touch +the files directly. +--- + include/libbb.h | 8 +++----- + libbb/messages.c | 4 ++-- + libbb/utmp.c | 8 ++++---- + util-linux/last_fancy.c | 2 +- + 4 files changed, 10 insertions(+), 12 deletions(-) + +diff --git a/include/libbb.h b/include/libbb.h +index abbc9ac59..9710e804c 100644 --- a/include/libbb.h +++ b/include/libbb.h -@@ -107,6 +107,9 @@ +@@ -107,14 +107,12 @@ # define _PATH_UTMPX _PATH_UTMP # else # if !defined(__FreeBSD__) -+/* _PATH_UTMP and _PATH_WTMP are defined both in paths.h and utmps/utmp.h. */ -+# undef _PATH_UTMP -+# undef _PATH_WTMP - # include <utmp.h> +-# include <utmp.h> ++# include <utmps/utmps.h> ++# define _CORRECT_PATH_UTMPX "/run/utmps/utmp" ++# define _CORRECT_PATH_WTMP "/var/log/wtmp" # else # define _PATH_UTMPX "/var/run/utx.active" + # endif +-# include <utmpx.h> +-# if defined _PATH_UTMP && !defined _PATH_UTMPX +-# define _PATH_UTMPX _PATH_UTMP +-# endif + # endif + #endif + #if ENABLE_LOCALE_SUPPORT +diff --git a/libbb/messages.c b/libbb/messages.c +index 6914d5701..689dd0c6d 100644 +--- a/libbb/messages.c ++++ b/libbb/messages.c +@@ -42,8 +42,8 @@ const int const_int_0 = 0; + #if ENABLE_FEATURE_WTMP + /* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */ + const char bb_path_wtmp_file[] ALIGN1 = +-# if defined _PATH_WTMP +- _PATH_WTMP; ++# if defined _CORRECT_PATH_WTMP ++ _CORRECT_PATH_WTMP; + # elif defined WTMP_FILE + WTMP_FILE; + # else +diff --git a/libbb/utmp.c b/libbb/utmp.c +index bd07670db..463ee1317 100644 +--- a/libbb/utmp.c ++++ b/libbb/utmp.c +@@ -45,8 +45,8 @@ void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, con + tty_name += 3; + strncpy(id, tty_name, width); + +- touch(_PATH_UTMPX); +- //utmpxname(_PATH_UTMPX); ++ //touch(_CORRECT_PATH_UTMPX); ++ //utmpxname(_CORRECT_PATH_UTMPX); + setutxent(); + /* Append new one (hopefully, unless we collide on ut_id) */ + pututxline(&utent); +@@ -67,8 +67,8 @@ void FAST_FUNC update_utmp(pid_t pid, int new_type, const char *tty_name, const + struct utmpx utent; + struct utmpx *utp; + +- touch(_PATH_UTMPX); +- //utmpxname(_PATH_UTMPX); ++ //touch(_CORRECT_PATH_UTMPX); ++ //utmpxname(_CORRECT_PATH_UTMPX); + setutxent(); + + /* Did init/getty/telnetd/sshd/... create an entry for us? +diff --git a/util-linux/last_fancy.c b/util-linux/last_fancy.c +index 648236229..aa7a62bbe 100644 +--- a/util-linux/last_fancy.c ++++ b/util-linux/last_fancy.c +@@ -159,7 +159,7 @@ int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; + int last_main(int argc UNUSED_PARAM, char **argv) + { + struct utmpx ut; +- const char *filename = _PATH_WTMP; ++ const char *filename = _CORRECT_PATH_WTMP; + llist_t *zlist; + off_t pos; + time_t start_time; +-- +2.37.1 + diff --git a/aports/busybox/APKBUILD b/aports/busybox/APKBUILD index 146defc..18e2308 100644 --- a/aports/busybox/APKBUILD +++ b/aports/busybox/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Gabor Pali <pali.gabor@gmail.com> pkgname=busybox pkgver=1.35.0 -pkgrel=2 # base: 15, -initscripts: 4.2-r0 +pkgrel=2 # base: 17, -initscripts: 4.2-r0 pkgdesc="Size optimized toolbox of many common UNIX utilities" url="https://busybox.net/" arch="all" @@ -208,7 +208,7 @@ ecbe5c890d966f09280c7eb534109f785c68e292765f17ed7ff62fcc61d20f61443c4155add0a1eb ccdf098fb15eaa316708181469a1193d6eec7067131e7b7645e0219bf03cfd07f4f79e8f62c1e560f6146dcc38186a29bdee08aaa39f290e11d020b8f07d2f65 0017-ash-Fix-use-after-free-on-idx-variable.patch 6d100fe44da2b97c2cbdda253d0504b487212d195144d9315cddbe8c51d18fae3745701923b170b40e35f54b592f94f02cadbffd9cb716661c12a7f1da022763 0001-ash-add-built-in-BB_ASH_VERSION-variable.patch e33dbc27d77c4636f4852d5d5216ef60a9a4343484e4559e391c13c813bf65c782b889914eff2e1f038d74cf02cb0d23824ebbb1044b5f8c86260d5a1bbc4e4d 0001-pgrep-add-support-for-matching-against-UID-and-RUID.patch -2640698e5108434991a8491fcc508bd991d2111b14bb6957385393a36603e1d81fdf826ad7b150d487d2a924630ee54c0fc4f979214e90feca9ba7d2fd96a865 0001-avoid-redefined-warnings-when-building-with-utmps.patch +b4b8195390da70c96503e66e18420b8aea5754f64300082632fcaccd4ebe86cb771d6d4b912f5162e0538e6f756a9377689ad9a138f683cd729c3f54770304bf 0001-avoid-redefined-warnings-when-building-with-utmps.patch b52050678e79e4da856956906d07fcb620cbf35f2ef6b5a8ee3b8d244ea63b4b98eef505451184d5b4937740d91eef154ed748c30d329ac485be51b37626f251 0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch ead4ad65d270d8659e1898fa16f76b6cbcf567d8aba238eacccda3764edb4362240d9359d6389873bedc126d405f805fc6dfce653a7181618ebcc67c94bd08d2 0002-nslookup-sanitize-all-printed-strings-with-printable.patch 4f6ddd59d6096943f617b0938fca428114190b8b37732d6783faab291451a2c30c452ed39299db22d1d9679d007022f87d43e93b38a4f6ced64a8659e9233773 0001-modinfo-add-k-option-for-kernel-version.patch |