forked from pool/biosdevname
Accepting request 232272 from Base:System
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/232272 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/biosdevname?expand=0&rev=25
This commit is contained in:
commit
c30b9182bf
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 22 13:41:21 UTC 2014 - trenn@suse.de
|
||||||
|
|
||||||
|
- Take mainline patch to fix (bnc#869614)
|
||||||
|
Modified: biosdevname_udevrule_rename_all_network_devices.patch
|
||||||
|
- Remove %config from etc rule to please obs checker
|
||||||
|
- Remove mkinitrd setup script
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Apr 10 17:14:24 UTC 2014 - trenn@suse.de
|
Thu Apr 10 17:14:24 UTC 2014 - trenn@suse.de
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ Url: http://linux.dell.com/files/biosdevname/
|
|||||||
# on LKML.
|
# on LKML.
|
||||||
ExclusiveArch: %{ix86} x86_64
|
ExclusiveArch: %{ix86} x86_64
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Source1: setup-biosdevname.sh
|
|
||||||
Patch1: biosdevname_v0.5.0_to_git_c140ce659a204d67e4cc.patch
|
Patch1: biosdevname_v0.5.0_to_git_c140ce659a204d67e4cc.patch
|
||||||
Patch2: ignore-broken-BIOSes
|
Patch2: ignore-broken-BIOSes
|
||||||
Patch3: whitelist-dell
|
Patch3: whitelist-dell
|
||||||
@ -43,8 +42,7 @@ BuildRequires: pkgconfig
|
|||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
# to figure out how to name/location of the rules file
|
# to figure out how to name/location of the rules file
|
||||||
BuildRequires: libudev-devel
|
BuildRequires: libudev-devel
|
||||||
# because of mkinitrd_setup in %post and %postun
|
BuildRequires: suse-module-tools
|
||||||
PreReq: mkinitrd
|
|
||||||
# for ownership of /lib/udev/rules.d
|
# for ownership of /lib/udev/rules.d
|
||||||
Requires: udev
|
Requires: udev
|
||||||
|
|
||||||
@ -73,15 +71,10 @@ You can enable/disable usage of biosdevname with boot option
|
|||||||
./autogen.sh --no-configure
|
./autogen.sh --no-configure
|
||||||
%configure --disable-rpath --prefix=/ --bindir=/bin --sbindir=/sbin
|
%configure --disable-rpath --prefix=/ --bindir=/bin --sbindir=/sbin
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
cp %{S:1} .
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
rm %{buildroot}/sbin/%{name}S || :
|
rm %{buildroot}/sbin/%{name}S || :
|
||||||
mkdir -p $RPM_BUILD_ROOT/lib/mkinitrd/scripts
|
|
||||||
install -m 0755 setup-biosdevname.sh \
|
|
||||||
$RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-biosdevname.sh
|
|
||||||
|
|
||||||
# remain disabled by default
|
# remain disabled by default
|
||||||
perl -pi -e 's,^# GOTO,GOTO,g;' \
|
perl -pi -e 's,^# GOTO,GOTO,g;' \
|
||||||
$RPM_BUILD_ROOT/%{_udevrulesdir}/*-biosdevname.rules
|
$RPM_BUILD_ROOT/%{_udevrulesdir}/*-biosdevname.rules
|
||||||
@ -90,9 +83,8 @@ perl -pi -e 's,^# GOTO,GOTO,g;' \
|
|||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYING README
|
%doc COPYING README
|
||||||
/sbin/%{name}
|
/sbin/%{name}
|
||||||
%config(noreplace) %{_udevrulesdir}/*%{name}.rules
|
%{_udevrulesdir}/*%{name}.rules
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
/lib/mkinitrd/scripts/setup-biosdevname.sh
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
@ -1,17 +1,47 @@
|
|||||||
biosdevname: Rename all network devices, not only eth* ones
|
From: Tom Gundersen <tgunders@redhat.com>
|
||||||
|
Subject: Fix double renaming of network interfaces on systems with systemd
|
||||||
There are other rules which might have renamed the device already.
|
References: bnc#869614
|
||||||
bnc#869614
|
Patch-Mainline: yes
|
||||||
|
Git-commit: 6f7fbcc352aeae08b5cf2a8e608f92abf98529f8
|
||||||
|
Git-repo: linux.dell.com/biosdevname.git
|
||||||
|
|
||||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||||||
|
|
||||||
|
On systems with systemd, the network interfaces which are renamed by
|
||||||
|
biosdevname, could get renamed again by systemd. This happens because,
|
||||||
|
two ADD events get generated for every network interface and on the
|
||||||
|
second ADD event, the KERNEL!="eth*" check in 71-biosdevname.rules
|
||||||
|
matches as the interfaces will have em names. As a result, the NAME
|
||||||
|
gets unset and the interface will get renamed again by
|
||||||
|
80-net-name-slot.rules again to systemd naming scheme.
|
||||||
|
|
||||||
|
This patch addresses the issue by removing the KERNEL!="eth*" check.
|
||||||
|
|
||||||
|
Also, this patch enhances the 71-biosdevname.rules to
|
||||||
|
|
||||||
|
1. Check the interface type and run biosdevname if it matches ARPHRD_ETHER
|
||||||
|
2. Skip running biosdevname if the interface is a virtual device such
|
||||||
|
as vlan etc.
|
||||||
|
|
||||||
Index: biosdevname-0.5.0/biosdevname.rules.in
|
Index: biosdevname-0.5.0/biosdevname.rules.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- biosdevname-0.5.0.orig/biosdevname.rules.in
|
--- biosdevname-0.5.0.orig/biosdevname.rules.in
|
||||||
+++ biosdevname-0.5.0/biosdevname.rules.in
|
+++ biosdevname-0.5.0/biosdevname.rules.in
|
||||||
@@ -1,5 +1,4 @@
|
@@ -1,7 +1,8 @@
|
||||||
SUBSYSTEM!="net", GOTO="netdevicename_end"
|
SUBSYSTEM!="net", GOTO="netdevicename_end"
|
||||||
-KERNEL!="eth*", GOTO="netdevicename_end"
|
-KERNEL!="eth*", GOTO="netdevicename_end"
|
||||||
ACTION!="add", GOTO="netdevicename_end"
|
ACTION!="add", GOTO="netdevicename_end"
|
||||||
NAME=="?*", GOTO="netdevicename_end"
|
NAME=="?*", GOTO="netdevicename_end"
|
||||||
|
+ATTR{type}!="1", GOTO="netdevicename_end"
|
||||||
|
+ENV{DEVTYPE}=="?*", GOTO="netdevicename_end"
|
||||||
|
|
||||||
|
# whitelist all Dell systems
|
||||||
|
ATTR{[dmi/id]sys_vendor}=="Dell*", ENV{UDEV_BIOSDEVNAME}="1"
|
||||||
|
@@ -21,6 +22,6 @@ LABEL="netdevicename_start"
|
||||||
|
|
||||||
|
# using NAME= instead of setting INTERFACE_NAME, so that persistent
|
||||||
|
# names aren't generated for these devices, they are "named" on each boot.
|
||||||
|
-PROGRAM="/sbin/biosdevname --policy physical --smbios 2.6 --nopirq -i %k", NAME="%c", OPTIONS+="string_escape=replace"
|
||||||
|
+SUBSYSTEMS=="pci", PROGRAM="/sbin/biosdevname --policy physical -i %k", NAME="%c", OPTIONS+="string_escape=replace"
|
||||||
|
|
||||||
|
LABEL="netdevicename_end"
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU General Public License
|
|
||||||
# as published by the Free Software Foundation; either version 2
|
|
||||||
# of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# 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, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
# 02110-1301, USA.
|
|
||||||
#
|
|
||||||
#%stage: crypto
|
|
||||||
#%provides: biosdevname
|
|
||||||
|
|
||||||
#
|
|
||||||
# the binary location must match location used in udev rule
|
|
||||||
cp_bin /sbin/biosdevname "${tmp_mnt}/sbin/biosdevname"
|
|
||||||
|
|
||||||
mkdir -p "${tmp_mnt}/etc/udev/rules.d"
|
|
||||||
for i in \
|
|
||||||
/usr/lib/udev/rules.d/*-biosdevname.rules \
|
|
||||||
/lib/udev/rules.d/*-biosdevname.rules
|
|
||||||
do
|
|
||||||
if test -f "$i"
|
|
||||||
then
|
|
||||||
cp --remove-destination "$i" "${tmp_mnt}/etc/udev/rules.d"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
# vim: set sw=4 ts=4 et:
|
|
Loading…
Reference in New Issue
Block a user