SHA256
1
0
forked from pool/ethtool

9 Commits

Author SHA256 Message Date
2cfc0ddf41 Sync changes to SLFO-1.2 branch 2025-08-20 09:14:16 +02:00
3160efe7ee Accepting request 1288343 from network:utilities
- update to upstream release 6.15

OBS-URL: https://build.opensuse.org/request/show/1288343
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ethtool?expand=0&rev=88
2025-06-26 12:05:23 +00:00
55064015f3 - update to upstream release 6.15
OBS-URL: https://build.opensuse.org/package/show/network:utilities/ethtool?expand=0&rev=148
2025-06-23 18:56:49 +00:00
3b0e61e266 Accepting request 1272154 from network:utilities
fix AppStream metainfo XML file

OBS-URL: https://build.opensuse.org/request/show/1272154
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ethtool?expand=0&rev=87
2025-04-24 15:25:03 +00:00
23ab215c0f - fix AppStream metainfo XML file
OBS-URL: https://build.opensuse.org/package/show/network:utilities/ethtool?expand=0&rev=146
2025-04-23 09:56:38 +00:00
c537f39e08 Accepting request 1268375 from network:utilities
- update to upstream release 6.14

OBS-URL: https://build.opensuse.org/request/show/1268375
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ethtool?expand=0&rev=86
2025-04-11 14:44:19 +00:00
d1f72f375c - update to upstream release 6.14
OBS-URL: https://build.opensuse.org/package/show/network:utilities/ethtool?expand=0&rev=144
2025-04-07 21:00:19 +00:00
549411622c Accepting request 1207245 from network:utilities
- update to upstream release 6.11

OBS-URL: https://build.opensuse.org/request/show/1207245
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ethtool?expand=0&rev=85
2024-10-12 11:24:50 +00:00
eafe99af0e - update to upstream release 6.11
OBS-URL: https://build.opensuse.org/package/show/network:utilities/ethtool?expand=0&rev=142
2024-10-08 21:20:06 +00:00
10 changed files with 381 additions and 23 deletions

12
apply-patches Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
echo "Applying patches:"
while read p; do
if patch -p1 -s --no-backup-if-mismatch --fuzz=0 <patches/"$p"; then
echo -e "\t$p"
else
echo "*** Patch $p failed" >&2
exit 1
fi
done

View File

@@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEyBAABCAAdFiEEWN3j3bieVmp26mKO538sG/LRdpUFAma2GCoACgkQ538sG/LR
dpXgegf3doZtybUz7TMlIQYg3bOof1lqEvdzcN92AvVsTqCbE2evBG28BU8U1Hy9
WbBl7c6OYoZ8Kt0+xct/lz9K/MPfZgKd2R0wkEuBF+34+QaSfcS+7UwKS9rL22NH
qBGQXXy326d5TFvM/WjB46mMt6MwtyxrdPOKmaXriOJn2HA5tDOSHFp96ypIvpi4
ZTnhkNyanmIIEx9ZVg94IqWCeSBFh1txcAIdZr/kGGzM+4CkL8XBLGX/rgxYlKxz
91pYXXJLOpU+1Rm/Z2z0U3XlqMYHyjkSB1iFV1MLgXyYdBVyMOc01se/1KgWMEv/
/ADD3PYuSJyfT9JJCw3kqIcdXFJ6
=TTG4
-----END PGP SIGNATURE-----

Binary file not shown.

11
ethtool-6.14.tar.sign Normal file
View File

@@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEEWN3j3bieVmp26mKO538sG/LRdpUFAmf0NZIACgkQ538sG/LR
dpW+6Qf8CF2OWQGtxZYCn2cTaO4bichYcqTKeBmVFXvQzjOnHguSz6s7Z9ieuq27
yXtHM4odUw1kEbERt0t12cKLPn0UsSn4IDub1UAVCJq2X0qFnzVh8D9vqF2gFuxS
ZCWU8H/MzcFzlIyuKutK3XV7PsnEjLdMdsY5Q+HxqCCefsQSJ4gm1D+07znssE3x
pkQfReXCUz3BIDxzcg9Xkr18SePzvkg6UPyOMADtwsWsiHVLsEwMOkRnesFWPNdX
uyzaJ9Koa8laTSZbWdogV5czIvAqBwf+7IMmeHBPFjLXH9fabwy/PKA6eTYUzUtJ
0W3BylVCujdwJiTYf3bG57SWJRKQfQ==
=dwt6
-----END PGP SIGNATURE-----

BIN
ethtool-6.14.tar.xz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,24 @@
-------------------------------------------------------------------
Wed Apr 16 20:16:18 UTC 2025 - Michal Kubecek <mkubecek@suse.cz>
- fix AppStream metainfo XML file
* misc-fix-AppStream-metainfo-XML.patch
-------------------------------------------------------------------
Wed Apr 16 14:02:12 UTC 2025 - Michal Kubecek <mkubecek@suse.cz>
- update to upstream release 6.14 (jsc#PED-11353)
Normally we want the ethtool package version to match kernel
version but upstream skipped 6.12 and 6.13 versions so that
version 6.14 is going to be used instead. For list of features
and fixes between versions 6.10 and 6.14 see the NEWS file in the
package.
-------------------------------------------------------------------
Wed Apr 16 13:22:43 UTC 2025 - Michal Kubecek <mkubecek@suse.cz>
- adapt package to git based patch tracking
-------------------------------------------------------------------
Fri Aug 9 13:27:19 UTC 2024 - Michal Kubecek <mkubecek@suse.cz>

View File

@@ -15,9 +15,14 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# ---------------------------------------------------------------------------
# Contents of this package is exported from git repository; please submit
# your changes via https://gitlab.suse.de/mkubecek/ethtool-source or
# gitlab@gitlab.suse.de:mkubecek/ethtool-source.git rather than to IBS.
# ---------------------------------------------------------------------------
Name: ethtool
Version: 6.10
Version: 6.14
Release: 0
Summary: Utility for examining and tuning Ethernet-based network interfaces
License: GPL-2.0-only
@@ -28,9 +33,10 @@ URL: https://www.kernel.org/pub/software/network/ethtool/
Source: https://www.kernel.org/pub/software/network/ethtool/%{name}-%{version}.tar.xz
Source2: https://www.kernel.org/pub/software/network/ethtool/%{name}-%{version}.tar.sign
Source3: %{name}.keyring
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkgconfig
BuildRequires: xz
Source11: patches.tar.xz
Source12: series.conf
Source13: guards
Source14: apply-patches
BuildRequires: pkgconfig(libmnl)
%description
@@ -53,7 +59,9 @@ BuildArch: noarch
bash command line completion support for ethtool.
%prep
%setup -q
%setup -q -a 11
chmod a+rx %{SOURCE13} %{SOURCE14}
%{SOURCE13} <%{SOURCE12} | %{SOURCE14} && rm -rf patches
%build
export CFLAGS="%optflags -Wall -Wextra -Wstrict-prototypes -Wformat-security -Wpointer-arith"
@@ -67,11 +75,8 @@ make install DESTDIR="%buildroot"
%defattr(-,root,root)
%{_sbindir}/ethtool
%{_mandir}/man8/ethtool.8*
%if (0%{?suse_version} >= 1500) || (0%{?sle_version} >= 120300)
%{_datadir}/metainfo/org.kernel.software.network.ethtool.metainfo.xml
%license COPYING
%else
%doc COPYING
%endif
%doc AUTHORS NEWS
%files bash-completion

313
guards Normal file
View File

@@ -0,0 +1,313 @@
#!/usr/bin/perl -w
#############################################################################
# Copyright (c) 2003-2007,2009 Novell, Inc.
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, contact Novell, Inc.
#
# To contact Novell about this file by physical or electronic mail,
# you may find current contact information at www.novell.com
#############################################################################
#
# Guards:
#
# +xxx include if xxx is defined
# -xxx exclude if xxx is defined
# +!xxx include if xxx is not defined
# -!xxx exclude if xxx is not defined
#
use FileHandle;
use Getopt::Long;
use strict;
# Prototypes
sub files_in($$);
sub parse($$);
sub help();
sub slashme($) {
my ($dir) = @_;
$dir =~ s#([^/])$#$&/#; # append a slash if necessary
if ($dir eq './') {
return '';
} else {
return $dir;
}
}
# Generate a list of files in a directory
#
sub files_in($$) {
my ($dir, $path) = @_;
my $dh = new FileHandle;
my (@files, $file);
# @<file> syntax
if ($path =~ s/^@//) {
my $fh;
open($fh, '<', $path) or die "$path: $!\n";
@files = <$fh>;
close($fh);
chomp(@files);
s:^$dir:: for @files;
return @files;
}
$path = slashme($path);
opendir $dh, length("$dir$path") ? "$dir$path" : '.'
or die "$dir$path: $!\n";
while ($file = readdir($dh)) {
next if $file =~ /^(\.|\.\.|\.#.*|CVS|.*~)$/;
if (-d "$dir$path$file") {
@files = (@files, files_in($dir, "$path$file/"));
} else {
#print "[$path$file]\n";
push @files, "$path$file";
}
}
closedir $dh;
return @files;
}
# Parse a configuration file
# Callback called with ($patch, @guards) arguments
#
sub parse($$) {
my ($fh, $callback) = @_;
my $line = "";
while (<$fh>) {
chomp;
s/(^|\s+)#.*//;
if (s/\\$/ /) {
$line .= $_;
next;
}
$line .= $_;
my @guards = ();
foreach my $token (split /[\s\t\n]+/, $line) {
next if $token eq "";
if ($token =~ /^[-+]/) {
push @guards, $token;
} else {
#print "[" . join(",", @guards) . "] $token\n";
&$callback($token, @guards);
}
}
$line = "";
}
}
# Command line options
#
my ($dir, $config, $default, $check, $list, $invert_match, $with_guards) =
( '', '-', 1, 0, 0, 0, 0);
my @path;
# Help text
#
sub help() {
print "$0 - select from a list of files guarded by conditions\n";
print "SYNOPSIS: $0 [--prefix=dir] [--path=dir1:dir2:...]\n" .
" [--default=0|1] [--check|--list] [--invert-match]\n" .
" [--with-guards] [--config=file] symbol ...\n\n" .
" Defaults: --default=$default\n" .
" Use --path=\@<file> to read the list of entries from <file>\n";
exit 0;
}
# Parse command line options
#
Getopt::Long::Configure ("bundling");
eval {
unless (GetOptions (
'd|prefix=s' => \$dir,
'c|config=s' => \$config,
'C|check' => \$check,
'l|list' => \$list,
'w|with-guards' => \$with_guards,
'p|path=s' => \@path,
'D|default=i' => \$default,
'v|invert-match' => \$invert_match,
'h|help' => sub { help(); exit 0; })) {
help();
exit 1;
}
};
if ($@) {
print "$@";
help();
exit 1;
}
@path = ('.')
unless (@path);
@path = split(/:/, join(':', @path));
my $fh = ($config eq '-') ? \*STDIN : new FileHandle($config)
or die "$config: $!\n";
$dir = slashme($dir);
if ($check) {
# Check for duplicate files, or for files that are not referenced by
# the specification.
my $problems = 0;
my @files;
foreach (@path) {
@files = (@files, files_in($dir, $_));
}
my %files = map { $_ => 0 } @files;
parse($fh, sub {
my ($patch, @guards) = @_;
if (exists $files{$patch}) {
$files{$patch}++;
} else {
if ($config eq '-') {
print "Not found: $dir$patch\n";
} else {
print "In $config but not found: $dir$patch\n";
}
$problems++;
}});
$fh->close();
my ($file, $ref);
while (($file, $ref) = each %files) {
next if $ref == 1;
if ($ref == 0) {
if ($config eq '-') {
print "Unused: $file\n";
} else {
print "Not in $config: $file\n";
}
$problems++;
}
if ($ref > 1) {
print "Warning: multiple uses";
print " in $config" if $config ne '-';
print ": $file\n";
# This is not an error if the entries are mutually exclusive...
}
}
exit $problems ? 1 : 0;
} elsif ($list) {
parse($fh, sub {
my ($patch, @guards) = @_;
print join(' ', @guards), ' '
if (@guards && $with_guards);
print "$dir$patch\n";
});
} else {
# Generate a list of patches to apply.
my %symbols = map { $_ => 1 } @ARGV;
parse($fh, sub {
my ($patch, @guards) = @_;
my $selected;
if (@guards) {
# If the first guard is -xxx, the patch is included by default;
# if it is +xxx, the patch is excluded by default.
$selected = ($guards[0] =~ /^-/);
foreach (@guards) {
/^([-+])(!?)(.*)?/
or die "Bad guard '$_'\n";
# Check if the guard matches
if (($2 eq '!' && !exists $symbols{$3}) ||
($2 eq '' && ( $3 eq '' || exists $symbols{$3}))) {
# Include or exclude
$selected = ($1 eq '+');
}
}
} else {
# If there are no guards, use the specified default result.
$selected = $default;
}
print "$dir$patch\n"
if $selected ^ $invert_match;
});
$fh->close();
exit 0;
}
__END__
=head1 NAME
guards - select from a list of files guarded by conditions
=head1 SYNOPSIS
F<guards> [--prefix=F<dir>] [--path=F<dir1:dir2:...>] [--default=<0|1>]
[--check|--list] [--invert-match] [--with-guards] [--config=<file>]
I<symbol> ...
=head1 DESCRIPTION
The script reads a configuration file that may contain so-called guards, file
names, and comments, and writes those file names that satisfy all guards to
standard output. The script takes a list of symbols as its arguments. Each line
in the configuration file is processed separately. Lines may start with a
number of guards. The following guards are defined:
=over
+I<xxx> Include the file(s) on this line if the symbol I<xxx> is defined.
-I<xxx> Exclude the file(s) on this line if the symbol I<xxx> is defined.
+!I<xxx> Include the file(s) on this line if the symbol I<xxx> is not defined.
-!I<xxx> Exclude the file(s) on this line if the symbol I<xxx> is not defined.
- Exclude this file. Used to avoid spurious I<--check> messages.
=back
The guards are processed left to right. The last guard that matches determines
if the file is included. If no guard is specified, the I<--default>
setting determines if the file is included.
If no configuration file is specified, the script reads from standard input.
The I<--check> option is used to compare the specification file against the
file system. If files are referenced in the specification that do not exist, or
if files are not enlisted in the specification file warnings are printed. The
I<--path> option can be used to specify which directory or directories to scan.
Multiple directories are separated by a colon (C<:>) character. The
I<--prefix> option specifies the location of the files. Alternatively, the
I<--path=@E<lt>fileE<gt>> syntax can be used to specify a file from which the
file names will be read.
Use I<--list> to list all files independent of any rules. Use I<--invert-match>
to list only the excluded patches. Use I<--with-guards> to also include all
inclusion and exclusion rules.
=head1 AUTHOR
Andreas Gruenbacher <agruen@suse.de>, SUSE Labs

BIN
patches.tar.xz LFS Normal file

Binary file not shown.

4
series.conf Normal file
View File

@@ -0,0 +1,4 @@
# generated by scripts/import-patches
# out of tree patches
misc-fix-AppStream-metainfo-XML.patch