forked from pool/biosdevname
Accepting request 172869 from Base:System
- Use correct directory for udev rules (forwarded request 172844 from namtrac) OBS-URL: https://build.opensuse.org/request/show/172869 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/biosdevname?expand=0&rev=19
This commit is contained in:
commit
2873ef1448
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 22 12:08:57 UTC 2013 - idonmez@suse.com
|
||||||
|
|
||||||
|
- Use correct directory for udev rules
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Dec 3 13:51:01 UTC 2012 - p.drouand@gmail.com
|
Mon Dec 3 13:51:01 UTC 2012 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package biosdevname
|
# spec file for package biosdevname
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -32,16 +32,20 @@ Source0: http://linux.dell.com/files/%{name}/%{name}-%{version}/%{name}-%
|
|||||||
Source1: setup-biosdevname.sh
|
Source1: setup-biosdevname.sh
|
||||||
Patch2: ignore-broken-BIOSes
|
Patch2: ignore-broken-BIOSes
|
||||||
Patch3: whitelist-dell
|
Patch3: whitelist-dell
|
||||||
|
Patch4: udev-rule-path.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: pciutils-devel
|
BuildRequires: pciutils-devel
|
||||||
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
# to figure out how to name the rules file
|
# to figure out how to name/location of the rules file
|
||||||
BuildRequires: udev
|
BuildRequires: libudev-devel
|
||||||
# because of mkinitrd_setup in %post and %postun
|
# because of mkinitrd_setup in %post and %postun
|
||||||
PreReq: mkinitrd
|
PreReq: mkinitrd
|
||||||
# for ownership of /lib/udev/rules.d
|
# for ownership of /lib/udev/rules.d
|
||||||
Requires: udev
|
Requires: udev
|
||||||
|
|
||||||
|
%define _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d
|
||||||
|
|
||||||
%description
|
%description
|
||||||
biosdevname in its simplest form takes an kernel name name as an
|
biosdevname in its simplest form takes an kernel name name as an
|
||||||
argument, and returns the BIOS-given name it "should" be. This is
|
argument, and returns the BIOS-given name it "should" be. This is
|
||||||
@ -56,10 +60,11 @@ You can enable/disable usage of biosdevname with boot option
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# this is a udev rule, so it needs to live in / rather than /usr
|
# this is a udev rule, so it needs to live in / rather than /usr
|
||||||
%configure --disable-rpath --libdir=/%{_lib} --prefix=/ --bindir=/bin --sbindir=/sbin
|
%configure --disable-rpath --prefix=/ --bindir=/bin --sbindir=/sbin
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
cp %{S:1} .
|
cp %{S:1} .
|
||||||
|
|
||||||
@ -69,15 +74,16 @@ rm %{buildroot}/sbin/%{name}S || :
|
|||||||
mkdir -p $RPM_BUILD_ROOT/lib/mkinitrd/scripts
|
mkdir -p $RPM_BUILD_ROOT/lib/mkinitrd/scripts
|
||||||
install -m 0755 setup-biosdevname.sh \
|
install -m 0755 setup-biosdevname.sh \
|
||||||
$RPM_BUILD_ROOT/lib/mkinitrd/scripts/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/lib/udev/rules.d/*-biosdevname.rules
|
$RPM_BUILD_ROOT/%{_udevrulesdir}/*-biosdevname.rules
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYING README
|
%doc COPYING README
|
||||||
/sbin/%{name}
|
/sbin/%{name}
|
||||||
%config(noreplace) /lib/udev/rules.d/*%{name}.rules
|
%config(noreplace) %{_udevrulesdir}/*%{name}.rules
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
/lib/mkinitrd/scripts/setup-biosdevname.sh
|
/lib/mkinitrd/scripts/setup-biosdevname.sh
|
||||||
|
|
||||||
|
32
udev-rule-path.patch
Normal file
32
udev-rule-path.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
Index: biosdevname-0.4.1/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- biosdevname-0.4.1.orig/configure.ac
|
||||||
|
+++ biosdevname-0.4.1/configure.ac
|
||||||
|
@@ -70,7 +70,10 @@ AC_CHECK_FUNCS([dup2 gettimeofday memset
|
||||||
|
# handles default udev rules as of udev 114 or thereabouts
|
||||||
|
RULEDEST=/lib/udev/rules.d/71-biosdevname.rules
|
||||||
|
|
||||||
|
-if [[ -e /etc/udev/rules.d/60-net.rules ]]; then
|
||||||
|
+if [[ -e /usr/lib/udev/rules.d/99-systemd.rules ]]; then
|
||||||
|
+ # openSUSE 12.3+
|
||||||
|
+ RULESDEST=/usr/lib/udev/rules.d/71-biosdevname.rules
|
||||||
|
+elif [[ -e /etc/udev/rules.d/60-net.rules ]]; then
|
||||||
|
# RHEL 5 / Fedora
|
||||||
|
RULEDEST=/etc/udev/rules.d/60-biosdevname.rules
|
||||||
|
elif [[ -e /etc/udev/rules.d/31-network.rules ]]; then
|
||||||
|
Index: biosdevname-0.4.1/configure
|
||||||
|
===================================================================
|
||||||
|
--- biosdevname-0.4.1.orig/configure
|
||||||
|
+++ biosdevname-0.4.1/configure
|
||||||
|
@@ -10473,7 +10473,10 @@ done
|
||||||
|
# handles default udev rules as of udev 114 or thereabouts
|
||||||
|
RULEDEST=/lib/udev/rules.d/71-biosdevname.rules
|
||||||
|
|
||||||
|
-if [ -e /etc/udev/rules.d/60-net.rules ]; then
|
||||||
|
+if [ -e /usr/lib/udev ]; then
|
||||||
|
+ # openSUSE 12.3+
|
||||||
|
+ RULEDEST=/usr/lib/udev/rules.d/71-biosdevname.rules
|
||||||
|
+elif [ -e /etc/udev/rules.d/60-net.rules ]; then
|
||||||
|
# RHEL 5 / Fedora
|
||||||
|
RULEDEST=/etc/udev/rules.d/60-biosdevname.rules
|
||||||
|
elif [ -e /etc/udev/rules.d/31-network.rules ]; then
|
Loading…
Reference in New Issue
Block a user