[xfce4-netload-plugin] Add patch to increase network interface name length to 20.

Kevin Fenzi kevin at fedoraproject.org
Tue Oct 28 13:42:57 UTC 2014


commit 4da665bd1c6c55d7f6dcd0fd764106ca694bdf45
Author: Kevin Fenzi <kevin at scrye.com>
Date:   Tue Oct 28 07:42:56 2014 -0600

    Add patch to increase network interface name length to 20.
    
    - Fixes bug #1002329

 xfce4-netload-plugin-1.2.0-infterface-length.patch |   36 ++++++++++++++++++++
 xfce4-netload-plugin.spec                          |   12 ++++++-
 2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/xfce4-netload-plugin-1.2.0-infterface-length.patch b/xfce4-netload-plugin-1.2.0-infterface-length.patch
new file mode 100644
index 0000000..6f10f73
--- /dev/null
+++ b/xfce4-netload-plugin-1.2.0-infterface-length.patch
@@ -0,0 +1,36 @@
+diff -Nur xfce4-netload-plugin-1.2.0.orig/panel-plugin/net.h xfce4-netload-plugin-1.2.0/panel-plugin/net.h
+--- xfce4-netload-plugin-1.2.0.orig/panel-plugin/net.h	2012-07-10 04:03:59.000000000 -0600
++++ xfce4-netload-plugin-1.2.0/panel-plugin/net.h	2014-10-28 07:18:42.783328109 -0600
+@@ -29,7 +29,7 @@
+ #define UP_UPDATE_INTERVAL 20
+ #define IP_UPDATE_INTERVAL 20
+ #define IP_ADDRESS_LENGTH 64
+-#define INTERFACE_NAME_LENGTH 9
++#define INTERFACE_NAME_LENGTH 19
+ 
+ #ifndef gettext_noop
+ #define gettext_noop(String) String
+diff -Nur xfce4-netload-plugin-1.2.0.orig/panel-plugin/netload.c xfce4-netload-plugin-1.2.0/panel-plugin/netload.c
+--- xfce4-netload-plugin-1.2.0.orig/panel-plugin/netload.c	2012-07-15 09:16:37.000000000 -0600
++++ xfce4-netload-plugin-1.2.0/panel-plugin/netload.c	2014-10-28 07:18:42.784328091 -0600
+@@ -51,7 +51,7 @@
+ static gchar* DEFAULT_COLOR[] = { "#FF4F00", "#FFE500" };
+ 
+ #define UPDATE_TIMEOUT 250
+-#define MAX_LENGTH 10
++#define MAX_LENGTH 20
+ 
+ #define IN 0
+ #define OUT 1
+diff -Nur xfce4-netload-plugin-1.2.0.orig/panel-plugin/slurm.h xfce4-netload-plugin-1.2.0/panel-plugin/slurm.h
+--- xfce4-netload-plugin-1.2.0.orig/panel-plugin/slurm.h	2012-07-10 04:03:59.000000000 -0600
++++ xfce4-netload-plugin-1.2.0/panel-plugin/slurm.h	2014-10-28 07:18:42.784328091 -0600
+@@ -10,7 +10,7 @@
+ #define _SLURM_H_
+ 
+ typedef struct IfData{
+-    char if_name[10];       /* The device name given as start parameter*/
++    char if_name[20];       /* The device name given as start parameter*/
+     int  if_speed;          /* The Interface speed */
+     char if_speedstring[12]; /* the measuring unit like Mbit, kbit */
+     int  if_id;             /* The ID which the interface inside the OS has */
diff --git a/xfce4-netload-plugin.spec b/xfce4-netload-plugin.spec
index 39186e6..d0c7334 100644
--- a/xfce4-netload-plugin.spec
+++ b/xfce4-netload-plugin.spec
@@ -2,13 +2,18 @@
 
 Name:           xfce4-netload-plugin
 Version:        1.2.0
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Network-load monitor for the Xfce panel
 
 Group:          User Interface/Desktops
 License:        GPLv2+
 URL:            http://goodies.xfce.org/projects/panel-plugins/%{name}
 Source0:        http://archive.xfce.org/src/panel-plugins/%{name}/%{minor_version}/%{name}-%{version}.tar.bz2
+# Increase interface name limit to 20 chars
+# https://bugzilla.xfce.org/show_bug.cgi?id=9807
+# https://bugzilla.xfce.org/show_bug.cgi?id=9869
+# https://bugzilla.redhat.com/show_bug.cgi?id=1002329
+Patch0:         xfce4-netload-plugin-1.2.0-infterface-length.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  pkgconfig(libxfce4panel-1.0) >= 4.7.0
@@ -24,6 +29,7 @@ A network-load monitor plugin for the Xfce panel.
 %prep
 %setup -q
 
+%patch0 -p1
 
 %build
 %configure
@@ -64,6 +70,10 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Tue Oct 28 2014 Kevin Fenzi <kevin at scrye.com> 1.2.0-6
+- Add patch to increase network interface name length to 20.
+- Fixes bug #1002329
+
 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.0-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list