diff --git a/net-tools-bluetooth.patch b/net-tools-bluetooth.patch new file mode 100644 index 0000000..12bc64d --- /dev/null +++ b/net-tools-bluetooth.patch @@ -0,0 +1,138 @@ +From 15dea010bca0d7110843e5b5518dbcc81d847b1d Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Fri, 3 Oct 2014 10:46:18 +0200 +Subject: [PATCH 1/3] pathnames: Bluetooth stuff is now in debugfs + +Yay for the ABI breakage. +--- + lib/pathnames.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/pathnames.h b/lib/pathnames.h +index 14b051c..045b04a 100644 +--- a/lib/pathnames.h ++++ b/lib/pathnames.h +@@ -53,8 +53,8 @@ + #define _PATH_PROCNET_X25_ROUTE "/proc/net/x25/route" + #define _PATH_PROCNET_DEV_MCAST "/proc/net/dev_mcast" + #define _PATH_PROCNET_ATALK_ROUTE "/proc/net/atalk_route" +-#define _PATH_SYS_BLUETOOTH_L2CAP "/sys/class/bluetooth/l2cap" +-#define _PATH_SYS_BLUETOOTH_RFCOMM "/sys/class/bluetooth/rfcomm" ++#define _PATH_SYS_BLUETOOTH_L2CAP "/sys/kernel/debug/bluetooth/l2cap" ++#define _PATH_SYS_BLUETOOTH_RFCOMM "/sys/kernel/debug/bluetooth/rfcomm" + + /* pathname for the netlink device */ + #define _PATH_DEV_ROUTE "/dev/route" +-- +1.9.3 + +From a6341e8204a6a7b57fd3cb392b185800e5829769 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Fri, 3 Oct 2014 10:46:41 +0200 +Subject: [PATCH 2/3] netstat: Fix short options for --l2cap and --rfcomm + +--- + netstat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/netstat.c b/netstat.c +index d0c364f..b9a91f5 100644 +--- a/netstat.c ++++ b/netstat.c +@@ -1909,7 +1909,7 @@ int main + getroute_init(); /* Set up AF routing support */ + + afname[0] = '\0'; +- while ((i = getopt_long(argc, argv, "A:CFMacdeghilnNoprsStuUvVWwx64?Z", longopts, &lop)) != EOF) ++ while ((i = getopt_long(argc, argv, "A:CFMacdeghilnNoprsStuUvVWw2fx64?Z", longopts, &lop)) != EOF) + switch (i) { + case -1: + break; +-- +1.9.3 + +From 854432e7f2468cab9685fce98e95d720c7cae5cc Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Fri, 3 Oct 2014 10:46:56 +0200 +Subject: [PATCH 3/3] man: Document Bluetooth options + +--- + man/en_US/netstat.8 | 21 ++++++++++++++++++--- + 1 file changed, 18 insertions(+), 3 deletions(-) + +diff --git a/man/en_US/netstat.8 b/man/en_US/netstat.8 +index 3157dc4..055ac5e 100644 +--- a/man/en_US/netstat.8 ++++ b/man/en_US/netstat.8 +@@ -23,6 +23,8 @@ netstat \- Print network connections, routing tables, interface statistics, masq + .RB [ \-\-udplite | \-U ] + .RB [ \-\-sctp | \-S ] + .RB [ \-\-raw | \-w ] ++.RB [ \-\-l2cap | \-2 ] ++.RB [ \-\-rfcomm | \-f ] + .RB [ \-\-listening | \-l ] + .RB [ \-\-all | \-a ] + .RB [ \-\-numeric | \-n ] +@@ -85,13 +87,14 @@ netstat \- Print network connections, routing tables, interface statistics, masq + .PP + .RB [ -4 | \-\-inet ] + .RB [ -6 | \-\-inet6 ] +-.RB [ \-\-protocol= { inet , inet6 , unix , ipx , ax25 , netrom , ddp ", ... } ]" ++.RB [ \-\-protocol= { inet , inet6 , unix , ipx , ax25 , netrom , ddp , bluetooth ", ... } ]" + .RB [ \-\-unix | \-x ] + .RB [ \-\-inet | \-\-ip | \-\-tcpip ] + .RB [ \-\-ax25 ] + .RB [ \-\-x25 ] + .RB [ \-\-rose ] + .RB [ \-\-ash ] ++.RB [ \-\-bluetooth ] + .RB [ \-\-ipx ] + .RB [ \-\-netrom ] + .RB [ \-\-ddp | \-\-appletalk ] +@@ -163,8 +166,9 @@ is a comma (',') separated list of address family keywords like + .BR ax25 , + .BR netrom , + .BR econet , ++.BR ddp , + and +-.BR ddp . ++.BR bluetooth . + This has the same effect as using the + .BR \-\-inet | -4 , + .BR \-\-inet6 | -6 , +@@ -172,13 +176,18 @@ This has the same effect as using the + .BR \-\-ipx , + .BR \-\-ax25 , + .BR \-\-netrom , ++.B \-\-ddp , + and +-.B \-\-ddp ++.B \-\-bluetooth + options. + .P + The address family + .B inet + (Iv4) includes raw, udp, udplite and tcp protocol sockets. ++.P ++The address family ++.B bluetooth ++(Iv4) includes l2cap and rfcomm protocol sockets. + .SS "\-c, \-\-continuous" + This will cause + .B netstat +@@ -447,6 +456,12 @@ status information via the following files. + .I /proc/net/ip_masquerade + -- masqueraded connections + ++.I /sys/kernel/debug/bluetooth/l2cap ++-- Bluetooth L2CAP information ++ ++.I /sys/kernel/debug/bluetooth/rfcomm ++-- Bluetooth serial connections ++ + .I /proc/net/snmp + -- statistics + .fi +-- +1.9.3 + diff --git a/net-tools-config.h b/net-tools-config.h index 56e5367..024f730 100644 --- a/net-tools-config.h +++ b/net-tools-config.h @@ -38,7 +38,7 @@ #define HAVE_AFECONET 1 #define HAVE_AFDECnet 0 #define HAVE_AFASH 1 -#define HAVE_AFBLUETOOTH 0 +#define HAVE_AFBLUETOOTH 1 /* * diff --git a/net-tools-config.make b/net-tools-config.make index 11a0246..cb4070a 100644 --- a/net-tools-config.make +++ b/net-tools-config.make @@ -11,7 +11,7 @@ HAVE_AFX25=1 HAVE_AFECONET=1 # HAVE_AFDECnet=0 HAVE_AFASH=1 -# HAVE_AFBLUETOOTH=0 +HAVE_AFBLUETOOTH=1 HAVE_HWETHER=1 HAVE_HWARC=1 HAVE_HWSLIP=1 diff --git a/net-tools.spec b/net-tools.spec index 436d915..e562b1b 100644 --- a/net-tools.spec +++ b/net-tools.spec @@ -3,7 +3,7 @@ Summary: Basic networking tools Name: net-tools Version: 2.0 -Release: 0.27.%{checkout}%{?dist} +Release: 0.28.%{checkout}%{?dist} License: GPLv2+ Group: System Environment/Base URL: http://sourceforge.net/projects/net-tools/ @@ -56,6 +56,10 @@ Patch20: ether-wake-interfaces.patch # make sctp quiet on systems without sctp (#1063906) Patch21: net-tools-sctp-quiet.patch +# Fix bluetooth bitrot. Set to net-tools-devel@ on 2013/10/03 +Patch22: net-tools-bluetooth.patch + +BuildRequires: bluez-libs-devel BuildRequires: gettext, libselinux BuildRequires: libselinux-devel BuildRequires: systemd-units @@ -90,6 +94,7 @@ cp %SOURCE8 ./man/en_US %patch20 -p1 -b .interfaces %patch21 -p1 -b .sctp-quiet +%patch22 -p1 -b .bluetooth touch ./config.h @@ -167,6 +172,9 @@ install -m 644 %{SOURCE9} %{buildroot}%{_unitdir} %attr(0644,root,root) %{_unitdir}/arp-ethers.service %changelog +* Fri Oct 03 2014 Lubomir Rintel - 2.0-0.28.20140707git +- Enable bluetooth + * Sun Aug 17 2014 Fedora Release Engineering - 2.0-0.27.20140707git - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild