summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/busybox/files')
-rw-r--r--sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch21
-rw-r--r--sys-apps/busybox/files/busybox-1.36.0-fortify-source-3-fixdep.patch32
-rw-r--r--sys-apps/busybox/files/busybox-1.36.1-kernel-6.8.patch53
-rw-r--r--sys-apps/busybox/files/crond.confd2
-rw-r--r--sys-apps/busybox/files/crond.initd12
-rw-r--r--sys-apps/busybox/files/mdev/dvbdev8
-rw-r--r--sys-apps/busybox/files/mdev/ide_links20
-rw-r--r--sys-apps/busybox/files/mdev/usbdev42
-rw-r--r--sys-apps/busybox/files/mdev/usbdisk_link36
9 files changed, 175 insertions, 51 deletions
diff --git a/sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch b/sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch
new file mode 100644
index 000000000000..6fe043bf39e4
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch
@@ -0,0 +1,21 @@
+Setting SKIP_SELINUX skips searching for selinux. The current ebuild calls
+make 3 times. The first 2 times we don't need to search for selinux packages
+because we might end up not needing them and we get useless warnings.
+
+--- a/Makefile.flags
++++ b/Makefile.flags
+@@ -176,12 +176,14 @@
+ LDLIBS += pam pam_misc
+ endif
+
++ifneq ($(SKIP_SELINUX),y)
+ ifeq ($(CONFIG_SELINUX),y)
+ SELINUX_PC_MODULES = libselinux libsepol
+ $(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES)))
+ CPPFLAGS += $(SELINUX_CFLAGS)
+ LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%))
+ endif
++endif
+
+ ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y)
+ ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine)))
diff --git a/sys-apps/busybox/files/busybox-1.36.0-fortify-source-3-fixdep.patch b/sys-apps/busybox/files/busybox-1.36.0-fortify-source-3-fixdep.patch
new file mode 100644
index 000000000000..659c81180fb5
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.36.0-fortify-source-3-fixdep.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/893776
+https://bugs.busybox.net/show_bug.cgi?id=15326
+http://lists.busybox.net/pipermail/busybox/2023-February/090173.html
+
+From 2d4a3d9e6c1493a9520b907e07a41aca90cdfd94 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@gentoo.org>
+Date: Tue, 21 Feb 2023 20:20:31 +0100
+Subject: fixdep: avoid underflow when end of entry doesn't coincide with EOF
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Bug: https://bugs.gentoo.org/893776
+Closes: https://bugs.busybox.net/show_bug.cgi?id=15326
+Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+--- a/scripts/basic/fixdep.c
++++ b/scripts/basic/fixdep.c
+@@ -338,6 +338,11 @@ void parse_dep_file(void *map, size_t len)
+ do p--; while (!isalnum((unsigned char)*p));
+ p++;
+ }
++ if (p < m) {
++ /* we've consumed the last filename of this list
++ already. */
++ break;
++ }
+ memcpy(s, m, p-m); s[p-m] = 0;
+ if (strrcmp(s, "include/autoconf.h") &&
+ strrcmp(s, "arch/um/include/uml-config.h") &&
+--
+cgit v1.2.3
diff --git a/sys-apps/busybox/files/busybox-1.36.1-kernel-6.8.patch b/sys-apps/busybox/files/busybox-1.36.1-kernel-6.8.patch
new file mode 100644
index 000000000000..4f74d51bdcaf
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.36.1-kernel-6.8.patch
@@ -0,0 +1,53 @@
+http://lists.busybox.net/pipermail/busybox/2024-March/090678.html
+https://bugs.gentoo.org/926872
+
+Linux v6.8-rc1 removed the definitions related to CBQ making tc fail to
+build. Add some #ifdefs to handle this missing support.
+--- a/networking/tc.c
++++ b/networking/tc.c
+@@ -231,6 +231,13 @@ static int cbq_parse_opt(int argc, char **argv, struct nlmsghdr *n)
+ return 0;
+ }
+ #endif
++
++#ifndef TCA_CBQ_MAX
++/*
++ * Linux v6.8-rc1~131^2~60^2^2 removed the uapi definitions for CBQ.
++ * See <A HREF="https://git.kernel.org/linus/33241dca48626">https://git.kernel.org/linus/33241dca48626</A>
++ */
++#else
+ static int cbq_print_opt(struct rtattr *opt)
+ {
+ struct rtattr *tb[TCA_CBQ_MAX+1];
+@@ -322,6 +329,7 @@ static int cbq_print_opt(struct rtattr *opt)
+ done:
+ return 0;
+ }
++#endif
+
+ static FAST_FUNC int print_qdisc(
+ const struct sockaddr_nl *who UNUSED_PARAM,
+@@ -372,8 +380,10 @@ static FAST_FUNC int print_qdisc(
+ int qqq = index_in_strings(_q_, name);
+ if (qqq == 0) { /* pfifo_fast aka prio */
+ prio_print_opt(tb[TCA_OPTIONS]);
++#ifdef TCA_CBQ_MAX
+ } else if (qqq == 1) { /* class based queuing */
+ cbq_print_opt(tb[TCA_OPTIONS]);
++#endif
+ } else {
+ /* don't know how to print options for this qdisc */
+ printf(&quot;(options for %s)&quot;, name);
+@@ -442,9 +452,11 @@ static FAST_FUNC int print_class(
+ int qqq = index_in_strings(_q_, name);
+ if (qqq == 0) { /* pfifo_fast aka prio */
+ /* nothing. */ /*prio_print_opt(tb[TCA_OPTIONS]);*/
++#ifdef TCA_CBQ_MAX
+ } else if (qqq == 1) { /* class based queuing */
+ /* cbq_print_copt() is identical to cbq_print_opt(). */
+ cbq_print_opt(tb[TCA_OPTIONS]);
++#endif
+ } else {
+ /* don't know how to print options for this class */
+ printf(&quot;(options for %s)&quot;, name);
+
diff --git a/sys-apps/busybox/files/crond.confd b/sys-apps/busybox/files/crond.confd
new file mode 100644
index 000000000000..707366252913
--- /dev/null
+++ b/sys-apps/busybox/files/crond.confd
@@ -0,0 +1,2 @@
+# Config file for /etc/init.d/busybox-crond
+CRONDARGS=
diff --git a/sys-apps/busybox/files/crond.initd b/sys-apps/busybox/files/crond.initd
new file mode 100644
index 000000000000..9d81e7a4c9f7
--- /dev/null
+++ b/sys-apps/busybox/files/crond.initd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="/bin/busybox crond"
+command_args="${CRONDARGS}"
+pidfile="/run/crond.pid"
+
+depend() {
+ need clock logger
+ provide cron
+}
diff --git a/sys-apps/busybox/files/mdev/dvbdev b/sys-apps/busybox/files/mdev/dvbdev
index f0186c176cd8..971b0efc9096 100644
--- a/sys-apps/busybox/files/mdev/dvbdev
+++ b/sys-apps/busybox/files/mdev/dvbdev
@@ -8,11 +8,11 @@ DVB_DEV=${MDEV#*.}
case "$ACTION" in
add|"")
- mkdir -p dvb/adapter${N}
- mv ${MDEV} dvb/adapter${N}/${DVB_DEV}
+ mkdir -p "dvb/adapter${N}"
+ mv "${MDEV}" "dvb/adapter${N}/${DVB_DEV}"
;;
remove)
- rm -f dvb/adapter${N}/${DVB_DEV}
- rmdir dvb/adapter${N} 2>/dev/null
+ rm -f "dvb/adapter${N}/${DVB_DEV}"
+ rmdir "dvb/adapter${N}" 2>/dev/null
rmdir dvb/ 2>/dev/null
esac
diff --git a/sys-apps/busybox/files/mdev/ide_links b/sys-apps/busybox/files/mdev/ide_links
index be0c95aa9c0e..dfb7c9cb46d5 100644
--- a/sys-apps/busybox/files/mdev/ide_links
+++ b/sys-apps/busybox/files/mdev/ide_links
@@ -1,23 +1,23 @@
#!/bin/sh
-[ -f /proc/ide/$MDEV/media ] || exit
+[ -f /proc/ide/"${MDEV}"/media ] || exit
-media=`cat /proc/ide/$MDEV/media`
-for i in $media $media[0-9]* ; do
- if [ "`readlink $i 2>/dev/null`" = $MDEV ] ; then
- LINK=$i
+media=$(cat /proc/ide/"${MDEV}"/media)
+for i in "${media}" "${media}"[0-9]* ; do
+ if [ "$(readlink "$i" 2>/dev/null)" = "${MDEV}" ] ; then
+ LINK="$i"
break
fi
done
# link exist, remove if necessary and exit
-if [ "$LINK" ] ; then
- [ "$ACTION" = remove ] && rm $LINK
+if [ "${LINK}" ] ; then
+ [ "${ACTION}" = remove ] && rm "${LINK}"
exit
fi
# create a link
-num=`ls $media[0-9]* 2>/dev/null | wc -l`
-ln -sf $MDEV "$media`echo $num`"
-[ -e "$media" ] || ln -sf $MDEV "$media"
+num=$(ls "${media}"[0-9]* 2>/dev/null | wc -l)
+ln -sf "${MDEV}" "${media}${num}"
+[ -e "${media}" ] || ln -sf "${MDEV}" "${media}"
diff --git a/sys-apps/busybox/files/mdev/usbdev b/sys-apps/busybox/files/mdev/usbdev
index ea5b9155736c..eda3825df287 100644
--- a/sys-apps/busybox/files/mdev/usbdev
+++ b/sys-apps/busybox/files/mdev/usbdev
@@ -5,7 +5,7 @@
# add zeros to device or bus
add_zeros () {
- case "$(echo $1 | wc -L)" in
+ case "$(echo "$1" | wc -L)" in
1) echo "00$1" ;;
2) echo "0$1" ;;
*) echo "$1"
@@ -15,48 +15,48 @@ add_zeros () {
# bus and device dirs in /sys
-USB_PATH=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/')
-USB_PATH=$(find /sys/devices -type d -name "$USB_PATH")
-USB_DEV_DIR=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).\([0-9]\)/\1-\2/')
+USB_PATH=$(echo "${MDEV}" | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/')
+USB_PATH=$(find /sys/devices -type d -name "${USB_PATH}")
+USB_DEV_DIR=$(echo "${MDEV}" | sed -e 's/usbdev\([0-9]\).\([0-9]\)/\1-\2/')
# dir names in /dev
-BUS=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/'))
-USB_DEV=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/'))
+BUS=$(add_zeros "$(echo "${MDEV}" | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/')")
+USB_DEV=$(add_zeros "$(echo "${MDEV}" | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/')")
# try to load the proper driver for usb devices
-case "$ACTION" in
+case "${ACTION}" in
add|"")
# load usb bus driver
- for i in $USB_PATH/*/modalias ; do
- modprobe `cat $i` 2>/dev/null
+ for i in "${USB_PATH}"/*/modalias ; do
+ modprobe "$(cat "$i")" 2>/dev/null
done
# load usb device driver if existent
- if [ -d $USB_PATH/$USB_DEV_DIR ]; then
- for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do
- modprobe `cat $i` 2>/dev/null
+ if [ -d "${USB_PATH}/${USB_DEV_DIR}" ]; then
+ for i in "${USB_PATH}/${USB_DEV_DIR}"/*/modalias ; do
+ modprobe "$(cat "$i")" 2>/dev/null
done
fi
# move usb device file
- mkdir -p bus/usb/$BUS
- mv $MDEV bus/usb/$BUS/$USB_DEV
+ mkdir -p "bus/usb/${BUS}"
+ mv "${MDEV}" "bus/usb/${BUS}/${USB_DEV}"
;;
remove)
# unload device driver, if device dir is existent
- if [ -d $USB_PATH/$USB_DEV_DIR ]; then
- for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do
- modprobe -r `cat $i` 2>/dev/null
+ if [ -d "${USB_PATH}/${USB_DEV_DIR}" ]; then
+ for i in "${USB_PATH}/${USB_DEV_DIR}"/*/modalias ; do
+ modprobe -r "$(cat "$i")" 2>/dev/null
done
fi
# unload usb bus driver. Does this make sense?
# what happens, if two usb devices are plugged in
# and one is removed?
- for i in $USB_PATH/*/modalias ; do
- modprobe -r `cat $i` 2>/dev/null
+ for i in "${USB_PATH}"/*/modalias ; do
+ modprobe -r "$(cat "$i")" 2>/dev/null
done
# remove device file and possible empty dirs
- rm -f bus/usb/$BUS/$USB_DEV
- rmdir bus/usb/$BUS/ 2>/dev/null
+ rm -f "bus/usb/${BUS}/${USB_DEV}"
+ rmdir "bus/usb/${BUS}/" 2>/dev/null
rmdir bus/usb/ 2>/dev/null
rmdir bus/ 2>/dev/null
esac
diff --git a/sys-apps/busybox/files/mdev/usbdisk_link b/sys-apps/busybox/files/mdev/usbdisk_link
index 6bb069243f4c..e42cc8bc9085 100644
--- a/sys-apps/busybox/files/mdev/usbdisk_link
+++ b/sys-apps/busybox/files/mdev/usbdisk_link
@@ -4,31 +4,35 @@
current=$(readlink usbdisk)
-if [ "$current" = "$MDEV" ] && [ "$ACTION" = "remove" ]; then
+if [ "${current}" = "${MDEV}" ] && [ "${ACTION}" = "remove" ]; then
rm -f usbdisk usba1
fi
-[ -n "$current" ] && exit
+[ -n "${current}" ] && exit
-if [ -e /sys/block/$MDEV ]; then
- SYSDEV=$(readlink -f /sys/block/$MDEV/device)
+if [ -e /sys/block/"${MDEV}" ]; then
+ SYSDEV=$(readlink -f /sys/block/"${MDEV}"/device)
# if /sys device path contains '/usb[0-9]' then we assume its usb
# also, if it's a usb without partitions we require FAT
- if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
+ if [ "${SYSDEV##*/usb[0-9]}" != "${SYSDEV}" ]; then
# do not create link if there is not FAT
- dd if=/dev/$MDEV bs=512 count=1 2>/dev/null | strings | grep FAT >/dev/null || exit 0
+ dd if=/dev/"${MDEV}" bs=512 count=1 2>/dev/null | strings | grep FAT >/dev/null || exit 0
- ln -sf $MDEV usbdisk
+ ln -sf "${MDEV}" usbdisk
# keep this for compat. people have it in fstab
- ln -sf $MDEV usba1
+ ln -sf "${MDEV}" usba1
fi
-elif [ -e /sys/block/*/$MDEV ] ; then
- PARENT=$(dirname /sys/block/*/$MDEV)
- SYSDEV=$(readlink -f $PARENT/device)
- if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
- ln -sf $MDEV usbdisk
- # keep this for compat. people have it in fstab
- ln -sf $MDEV usba1
- fi
+else
+ for i in /sys/block/*/"${MDEV}"; do
+ if [ -e "$i" ]; then
+ PARENT=$(dirname "$i")
+ SYSDEV=$(readlink -f "${PARENT}"/device)
+ if [ "${SYSDEV##*/usb[0-9]}" != "${SYSDEV}" ]; then
+ ln -sf "${MDEV}" usbdisk
+ # keep this for compat. people have it in fstab
+ ln -sf "${MDEV}" usba1
+ fi
+ fi
+ done
fi