diff --git a/.cvsignore b/.cvsignore index e633370..0c24f50 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ ethtool-6.tar.gz +gpl-2.0.txt diff --git a/ethtool-6-help_usage.patch b/ethtool-6-help_usage.patch new file mode 100644 index 0000000..45d9c81 --- /dev/null +++ b/ethtool-6-help_usage.patch @@ -0,0 +1,17 @@ +Patch by Robert Scheck for ethtool >= 6, which removes +the bogus -h/--help usage stating, that DEVNAME is required for help. For further +information, please have a look to Red Hat Bugzilla ID #472038. + +--- ethtool-6/ethtool.c 2009-01-15 23:14:44.000000000 +0100 ++++ ethtool-6/ethtool.c.help_usage 2009-01-15 23:59:20.000000000 +0100 +@@ -201,8 +201,9 @@ + "Usage:\n" + "ethtool DEVNAME\tDisplay standard information about device\n"); + for (i = 0; args[i].srt; i++) { +- fprintf(stderr, " ethtool %s|%s DEVNAME\t%s\n%s", ++ fprintf(stderr, " ethtool %s|%s %s\t%s\n%s", + args[i].srt, args[i].lng, ++ strstr(args[i].srt, "-h") ? "\t" : "DEVNAME", + args[i].help, + args[i].opthelp ? args[i].opthelp : ""); + } diff --git a/ethtool-6-man_pages.patch b/ethtool-6-man_pages.patch new file mode 100644 index 0000000..eca3204 --- /dev/null +++ b/ethtool-6-man_pages.patch @@ -0,0 +1,28 @@ +Patch by Ben Hutchings for ethtool >= 6, which fixes the +wrong long name for the -p option in the man page (correct --identify rather the +wrong --blink). And it removes some typos in man page. For further information, +please have a look to Debian bug IDs #488067 and #506225). + +--- ethtool-6/ethtool.8 2008-09-14 04:12:31.000000000 +0200 ++++ ethtool-6/ethtool.8.man_pages 2009-01-15 23:44:38.000000000 +0100 +@@ -158,7 +158,7 @@ + .B ethtool \-k|\-\-show\-offload + .I ethX + +-.B ethtool \-K\-\-offload ++.B ethtool \-K|\-\-offload + .I ethX + .B2 rx on off + .B2 tx on off +@@ -167,9 +167,9 @@ + .B2 ufo on off + .B2 gso on off + +-.B ethtool \-p|\-\-blink ++.B ethtool \-p|\-\-identify + .I ethX +-.IR [ N ] ++.RI [ N ] + + .B ethtool \-r|\-\-negotiate + .I ethX diff --git a/ethtool.spec b/ethtool.spec index 1103601..011a5fa 100644 --- a/ethtool.spec +++ b/ethtool.spec @@ -1,44 +1,74 @@ -Summary: Ethernet settings tool for PCI ethernet cards -Name: ethtool -Version: 6 -Release: 1%{?dist} -License: GPL+ -Group: Applications/System -URL: http://sourceforge.net/projects/gkernel/ -Source0: http://download.sourceforge.net/gkernel/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -%define _sbindir /sbin +Summary: Ethernet settings tool for PCI ethernet cards +Name: ethtool +Version: 6 +Release: 2.20090115git%{?dist} +License: GPLv2 +Group: Applications/System +URL: http://sourceforge.net/projects/gkernel/ +# When using tarball from released upstream version: +# - http://downloads.sourceforge.net/gkernel/%{name}-%{version}.tar.gz +# +# When generating tarball package from upstream git: +# - git clone git://git.kernel.org/pub/scm/network/ethtool/ethtool.git ethtool-6 +# - cd ethtool-6; git checkout 2c4bd1c0c4d8112c16f9143da69c03d02ac3b1ae +# - cp -f ChangeLog ChangeLog.old; git log > ChangeLog.git +# - rm -rf .git; cd ..; tar cvfz ethtool-6.tar.gz ethtool-6 +# - Use the visible date of latest git log entry for %{release} in spec file +Source0: %{name}-%{version}.tar.gz +Source1: http://www.gnu.org/licenses/gpl-2.0.txt +Patch0: ethtool-6-man_pages.patch +Patch1: ethtool-6-help_usage.patch +BuildRequires: automake, autoconf +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description -This utility allows querying and changing of ethernet -card settings, such as speed, port, autonegotiation, -and PCI locations. +This utility allows querying and changing settings such as speed, +port, autonegotiation, PCI locations and checksum offload on many +network devices, especially of ethernet devices. %prep %setup -q +%patch0 -p1 -b .man_pages +%patch1 -p1 -b .help_usage + +# Only needed when using upstream git +aclocal +autoheader +automake --gnu --add-missing --copy +autoconf + +# Replace GPLvX from automake by GPLv2 +cp -f %{SOURCE1} COPYING %build -%configure -make +%configure --sbindir=/sbin +make %{?_smp_mflags} %install -rm -rf %{buildroot} -%makeinstall -mkdir -p %{buildroot}/usr/sbin -ln -s /sbin/ethtool %{buildroot}/usr/sbin +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' install + +# Some legacy support for scripts etc. out there +mkdir -p $RPM_BUILD_ROOT%{_sbindir} +ln -sf ../../sbin/%{name} $RPM_BUILD_ROOT%{_sbindir}/%{name} %clean -rm -rf %{buildroot} +rm -rf $RPM_BUILD_ROOT %files -%defattr(-,root,root) -%doc AUTHORS ChangeLog COPYING INSTALL NEWS README -/sbin/ethtool -/usr/sbin/ethtool -%{_mandir}/man8/ethtool.* +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog.* COPYING LICENSE NEWS README +/sbin/%{name} +%{_sbindir}/%{name} +%{_mandir}/man8/%{name}.8* %changelog +* Sat Jan 17 2009 Robert Scheck 6-2.20090115git +- Changes to match with Fedora Packaging Guidelines (#225735) +- Upgrade to GIT 20090115 (#225735, #477498) +- Removed bogus stated need of DEVNAME in -h/--help (#472038) +- Removed completely needless INSTALL file from %%doc (#472034) + * Wed Mar 12 2008 Tom "spot" Callaway 6-1 - Upgrade to ethtool version 6 diff --git a/sources b/sources index 6190315..5f2e859 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -3b721ec27f17ebf320ba8c505cf66d9c ethtool-6.tar.gz +462e8eb1a18a05007e183ebeed65bfd5 ethtool-6.tar.gz +751419260aa954499f7abaabaa882bbe gpl-2.0.txt