~ruther/guix-local

2c814874a765501a6b37106c1ea711ed7be37564 — Efraim Flashner 9 months ago 38e11fb
gnu: busybox: Fix build with newer kernel.

This fixes bug #1716.

* gnu/packages/busybox.scm (busybox)[source]: Add patch.
* gnu/packages/patches/busybox-no-cbq.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: Ia8cfdbb86a9ac2bca5b4c24ca91e5357ddf92539
3 files changed, 59 insertions(+), 1 deletions(-)

M gnu/local.mk
M gnu/packages/busybox.scm
A gnu/packages/patches/busybox-no-cbq.patch
M gnu/local.mk => gnu/local.mk +1 -0
@@ 1084,6 1084,7 @@ dist_patch_DATA =						\
  %D%/packages/patches/byobu-writable-status.patch		\
  %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch	\
  %D%/packages/patches/busybox-add-missing-sha-NI-guard.patch	\
  %D%/packages/patches/busybox-no-cbq.patch			\
  %D%/packages/patches/c2rust-ast-exporter-local-search.patch	\
  %D%/packages/patches/cadical-add-shared-library.patch		\
  %D%/packages/patches/calibre-no-updates-dialog.patch		\

M gnu/packages/busybox.scm => gnu/packages/busybox.scm +2 -1
@@ 47,7 47,8 @@
               (base32
                "1923f21rnlbv1qjvk2qhgqnki5mkgr6z0p8dvzs9jr3l5vrxy49k"))
              (patches
               (search-patches "busybox-add-missing-sha-NI-guard.patch"))))
               (search-patches "busybox-add-missing-sha-NI-guard.patch"
                               "busybox-no-cbq.patch"))))
    (build-system gnu-build-system)
    (arguments
     (list #:phases

A gnu/packages/patches/busybox-no-cbq.patch => gnu/packages/patches/busybox-no-cbq.patch +56 -0
@@ 0,0 1,56 @@
Downloaded from Debian
https://sources.debian.org/data/main/b/busybox/1%3A1.37.0-6/debian/patches/busybox-1.36.1-no-cbq.patch
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071648
Origin: fedora
Date: Tue, 16 Jul 2024 07:46:38 +0000
Forwarded: yes, https://bugs.busybox.net/show_bug.cgi?id=15931

diff -up busybox-1.36.1/networking/tc.c.no-cbq busybox-1.36.1/networking/tc.c
--- busybox-1.36.1/networking/tc.c.no-cbq	2024-01-29 10:24:09.135082923 -0500
+++ busybox-1.36.1/networking/tc.c	2024-01-29 10:28:12.009502552 -0500
@@ -31,7 +31,7 @@
 //usage:	"qdisc [handle QHANDLE] [root|"IF_FEATURE_TC_INGRESS("ingress|")"parent CLASSID]\n"
 /* //usage: "[estimator INTERVAL TIME_CONSTANT]\n" */
 //usage:	"	[[QDISC_KIND] [help|OPTIONS]]\n"
-//usage:	"	QDISC_KIND := [p|b]fifo|tbf|prio|cbq|red|etc.\n"
+//usage:	"	QDISC_KIND := [p|b]fifo|tbf|prio|red|etc.\n"
 //usage:	"qdisc show [dev STRING]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n"
 //usage:	"class [classid CLASSID] [root|parent CLASSID]\n"
 //usage:	"	[[QDISC_KIND] [help|OPTIONS] ]\n"
@@ -230,7 +230,7 @@ static int cbq_parse_opt(int argc, char
 {
 	return 0;
 }
-#endif
+
 static int cbq_print_opt(struct rtattr *opt)
 {
 	struct rtattr *tb[TCA_CBQ_MAX+1];
@@ -322,6 +322,7 @@ static int cbq_print_opt(struct rtattr *
  done:
 	return 0;
 }
+#endif
 
 static FAST_FUNC int print_qdisc(
 		const struct sockaddr_nl *who UNUSED_PARAM,
@@ -373,7 +374,8 @@ static FAST_FUNC int print_qdisc(
 		if (qqq == 0) { /* pfifo_fast aka prio */
 			prio_print_opt(tb[TCA_OPTIONS]);
 		} else if (qqq == 1) { /* class based queuing */
-			cbq_print_opt(tb[TCA_OPTIONS]);
+			/* cbq_print_opt(tb[TCA_OPTIONS]); */
+			printf("cbq not supported");
 		} else {
 			/* don't know how to print options for this qdisc */
 			printf("(options for %s)", name);
@@ -444,7 +446,8 @@ static FAST_FUNC int print_class(
 			/* nothing. */ /*prio_print_opt(tb[TCA_OPTIONS]);*/
 		} else if (qqq == 1) { /* class based queuing */
 			/* cbq_print_copt() is identical to cbq_print_opt(). */
-			cbq_print_opt(tb[TCA_OPTIONS]);
+			/* cbq_print_opt(tb[TCA_OPTIONS]); */
+			printf("cbq not supported");
 		} else {
 			/* don't know how to print options for this class */
 			printf("(options for %s)", name);