9d4a31
Name:		biosdevname
9d4a31
Version:	0.7.3
9d4a31
Release:	2%{?dist}
9d4a31
Summary:	Udev helper for naming devices per BIOS names
9d4a31
9d4a31
Group:		System Environment/Base
9d4a31
License:	GPLv2
9d4a31
URL:		https://github.com/dell/biosdevname
9d4a31
# SMBIOS only exists on these arches.  It's also likely that other
9d4a31
# arches don't expect the PCI bus to be sorted breadth-first, or of
9d4a31
# so, there haven't been any comments about that on LKML.
9d4a31
ExclusiveArch:	%{ix86} x86_64 ia64
9d4a31
Source0:        https://github.com/dell/%{name}/archive/v%{version}.tar.gz
9d4a31
9d4a31
BuildRequires:	pciutils-devel, zlib-devel
9d4a31
# to figure out how to name the rules file
9d4a31
BuildRequires:	udev
9d4a31
#To generate the configure script
9d4a31
BuildRequires:	autoconf
9d4a31
BuildRequires:	automake
9d4a31
# for ownership of /etc/udev/rules.d
9d4a31
Requires: udev
9d4a31
9d4a31
Patch0: biosdevname-0.6.1-rules.patch
9d4a31
Patch1: 0001-Place-udev-rules-to-usr-lib.patch
9d4a31
Patch2: 0001-Add-support-for-ExaNIC-network-cards-5.patch
9d4a31
Patch3: 0001-Prevent-infinite-recursion-in-dmidecode.c-smbios_set.patch
9d4a31
Patch4: 0001-man-fix-all_ethN-indentation.patch
9d4a31
9d4a31
%description
9d4a31
biosdevname in its simplest form takes a kernel device name as an
9d4a31
argument, and returns the BIOS-given name it "should" be.  This is necessary
9d4a31
on systems where the BIOS name for a given device (e.g. the label on
9d4a31
the chassis is "Gb1") doesn't map directly and obviously to the kernel
9d4a31
name (e.g. eth0).
9d4a31
9d4a31
%prep
9d4a31
%setup -q
9d4a31
%patch0 -p1
9d4a31
%patch1 -p1
9d4a31
%patch2 -p1
9d4a31
%patch3 -p1
9d4a31
%patch4 -p1
9d4a31
9d4a31
%build
9d4a31
autoreconf -iv
9d4a31
#If configure script doesn't exist generate it with autogen script
9d4a31
[ -e ./configure ] || ./autogen.sh --no-configure
9d4a31
9d4a31
%configure --disable-rpath --prefix=%{_prefix} --sbindir=%{_prefix}/sbin
9d4a31
make %{?_smp_mflags}
9d4a31
9d4a31
9d4a31
%install
9d4a31
make install install-data DESTDIR=%{buildroot}
9d4a31
9d4a31
%files
9d4a31
%defattr(-,root,root,-)
9d4a31
%doc COPYING README
9d4a31
%{_prefix}/sbin/%{name}
9d4a31
# hack for either /etc or /lib rules location
9d4a31
%{_prefix}/lib/udev/rules.d/*.rules
9d4a31
%{_mandir}/man1/%{name}.1*
9d4a31
9d4a31
9d4a31
%changelog
9d4a31
* Wed Mar 27 2019 Michal Sekletár <msekleta@redhat.com> - 0.7.3-2
9d4a31
- prevent infinite recursion in dmidecode.c::smbios_setslot (#1642706)
9d4a31
- fix indentation in the man page (#1642706)
9d4a31
9d4a31
* Wed Oct 25 2017 Michal Sekletar <msekleta@redhat.com> - 0.7.3-1
9d4a31
- rebase to 0.7.3 (#1467144)
9d4a31
9d4a31
* Fri Mar 31 2017 Michal Sekletar <msekleta@redhat.com> - 0.7.2-2
9d4a31
- backport fixes from upstream (#1385889)
9d4a31
9d4a31
* Thu May 26 2016 Michal Sekletar <msekleta@redhat.com> - 0.7.2-1
9d4a31
- rebase to 0.7.2 (#1269524)
9d4a31
9d4a31
* Fri Dec 18 2015 Michal Sekletar <msekleta@redhat.com> - 0.7.0-1
9d4a31
- rebase to 0.7.0 (#1269524)
9d4a31
9d4a31
* Fri Jun 12 2015 Michal Sekletar <msekleta@redhat.com> - 0.6.2-1
9d4a31
- rebase to 0.6.2 (#1182849)
9d4a31
9d4a31
* Thu Jan 08 2015 Michal Sekletar <msekleta@redhat.com> - 0.6.1-2
9d4a31
- fix up incorrectly generated patch
9d4a31
9d4a31
* Fri Dec 05 2014 Michal Sekletar <msekleta@redhat.com> - 0.6.1-1
9d4a31
- rebase to 0.6.1 (#1145572)
9d4a31
9d4a31
* Tue Mar 18 2014 Michal Sekletar <msekleta@redhat.com> - 0.5.0-10
9d4a31
- rename Mellanox card correctly (#1067135)
9d4a31
9d4a31
* Thu Mar 06 2014 Lukáš Nykrýn <lnykryn@redhat.com> - 0.5.0-9
9d4a31
- stop reading VPD data once VPD-R section has been read (#1054414)
9d4a31
9d4a31
* Fri Feb 28 2014 Lukáš Nykrýn <lnykryn@redhat.com> - 0.5.0-8
9d4a31
- remove KERNEL!="eth*", GOTO="netdevicename_end" (#1069817)
9d4a31
9d4a31
* Mon Feb 10 2014 Lukáš Nykrýn <lnykryn@redhat.com> - 0.5.0-7
9d4a31
- Change 71-biosdevname.rules to match rhel6 setup (#1054170)
9d4a31
9d4a31
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.5.0-6
9d4a31
- Mass rebuild 2013-12-27
9d4a31
9d4a31
* Fri Sep 20 2013 Václav Pavlín <vpavlin@redhat.com> - 0.5.0-5
9d4a31
- Fix regression introduced by the addslot function
9d4a31
- CoverityScan fixes
9d4a31
- Place udev rules to /usr/lib rather than /lib
9d4a31
Resolves: rhbz#1008899
9d4a31
9d4a31
* Mon Sep 02 2013 Harald Hoyer <harald@redhat.com> 0.5.0-3
9d4a31
- not only NAME KERNEL=="eth*", but every ethernet device
9d4a31
9d4a31
* Tue Jul 30 2013 Václav Pavlín <vpavlin@redhat.com> - 0.5.0-2
9d4a31
- Update help and man pages to cover all possible arguments
9d4a31
Resolves: rhbz#949021
9d4a31
9d4a31
* Tue Jul 30 2013 Václav Pavlín <vpavlin@redhat.com> - 0.5.0-1
9d4a31
- Updating the sources to 0.5.0 version. Following are the changes:
9d4a31
- Change scan of SMBIOS slot <-> PCI methods, recurse to set SMBIOS slot field
9d4a31
- Save off secondary bus of PCI device for PCI tree traversal
9d4a31
- Add version number to biosdevname
9d4a31
9d4a31
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-4
9d4a31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9d4a31
9d4a31
* Wed Nov 14 2012 Václav Pavlín <vpavlin@redhat.com> - 0.4.1-3
9d4a31
- Source link update
9d4a31
9d4a31
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-2
9d4a31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9d4a31
9d4a31
* Wed Jul 18 2012 Praveen K Paladugu <praveen_paladugu@dell.com> - 0.4.1-1
9d4a31
- Fix autoconfig for Fedora systems
9d4a31
- Make sure that vpd scan only runs on Dell systems, also blacklist Atheros
9d4a31
  wireless cards which hang when vpd is read.
9d4a31
- Add fixes to biosdevname to support cards that export multiple network
9d4a31
  ports per PCI device (chelsio/mellanox).
9d4a31
9d4a31
9d4a31
9d4a31
* Thu May 3 2012 Praveen K Paladugu <praveen_paladugu@dell.com> - 0.4.0-1
9d4a31
- Create detached signature
9d4a31
- Fix man page to use new naming convention
9d4a31
- Remove unused variables from Stephen Hemminger [shemminger@vyatta.com]
9d4a31
- Use Physical device for slot numbering for embedded SR-IOV cards
9d4a31
- Add tracking of ifindex to eths structure
9d4a31
- Fix naming for add-in network adapters when SMBIOS version is invalid
9d4a31
- Read VPD-R on Dell systems only
9d4a31
9d4a31
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.11-6
9d4a31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
9d4a31
9d4a31
* Tue Oct  4 2011 Praveen K Paladugu <praveen_paladugu@dell.com> - 0.3.11-5
9d4a31
- Added automake as a build dependency
9d4a31
9d4a31
* Tue Oct  4 2011 Praveen K Paladugu <praveen_paladugu@dell.com> - 0.3.11-4
9d4a31
- Added autoconf as a build dependency
9d4a31
9d4a31
* Tue Oct  4 2011 Praveen K Paladugu <praveen_paladugu@dell.com> - 0.3.11-3
9d4a31
- Generating the configure script if it doesn't exist
9d4a31
9d4a31
* Tue Oct  4 2011 Praveen K Paladugu <praveen_paladugu@dell.com> - 0.3.11-2
9d4a31
- Fixed the dir structure inside the archive
9d4a31
9d4a31
* Tue Oct  4 2011 Praveen K Paladugu <praveen_paladugu@dell.com> - 0.3.11-1
9d4a31
- Updating the sources to 0.3.11 version. Following are the changes:
9d4a31
- Fix man page for PCI slot naming
9d4a31
- Fix clearing of buffer for NPAR/SRIOV naming
9d4a31
- Add --nopirq and --smbios options to manpage.
9d4a31
- Verify length of VPD on network device
9d4a31
- Close file handle on sysfs read
9d4a31
- Fix naming policy for NPAR devices.
9d4a31
  Match each PCI device to its VPD 'physical' device to get correct index
9d4a31
- Exclude  building on ia64 arch
9d4a31
- Add support functions for determining PCIE slot
9d4a31
- Scan full path to parent when getting PCIE slot
9d4a31
- Fix NPAR naming for add-in cards
9d4a31
- Don't display _vf suffix on NPAR devices with single function
9d4a31
- Fix PCIe/PIRQ slot mapping
9d4a31
9d4a31
* Thu Apr 21 2011 Praveen K Paladugu <praveen_paladugu@dell.com> - 0.3.8-1
9d4a31
- Add changes to parse VPD structure for device mapping on NPAR devices
9d4a31
- Fix pathname
9d4a31
- Cleanup and comment NPAR code
9d4a31
- Fix debian packaging rules to regenerate configure script
9d4a31
- Change pciX to pX for shortened names for PCI add-on devices
9d4a31
- Fix manpage typo
9d4a31
- Delete CR-LF in script
9d4a31
- Change default signing key
9d4a31
- Add command line arguments for checking SMBIOS version and ignore $PIRQ.
9d4a31
9d4a31
* Thu Feb 17 2011 Matt Domsch <Matt_Domsch@dell.com> - 0.3.7-1
9d4a31
- drop dump_pirq, suggest use biosdecode instead
9d4a31
- don't use '#' in names, use 'p' instead, by popular demand
9d4a31
- properly look for SMBIOS, then $PIR, then recurse
9d4a31
- Add kernel command line parameter "biosdevname={0|1}" to turn off/on biosdevname
9d4a31
- Fix segfault when BIOS advertises zero sized PIRQ Routing Table
9d4a31
- Add 'bonding' and 'openvswitch' to the virtual devices list
9d4a31
- fail PIRQ lookups if device domain is not 0
9d4a31
- Don't suggest names if running in a virtual machine (Xen, KVM,
9d4a31
  VMware tested, but should work on others)
9d4a31
- Typo fixes
9d4a31
9d4a31
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-2
9d4a31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
9d4a31
9d4a31
* Tue Jan 25 2011 Matt Domsch <Matt_Domsch@dell.com> - 0.3.6-1
9d4a31
- drop biosdevnameS, it's unused and fails to build on F15
9d4a31
9d4a31
* Tue Jan 25 2011 Matt Domsch <Matt_Domsch@dell.com> - 0.3.5-1
9d4a31
- install dump_pirq into /usr/sbin
9d4a31
- fix udev rule, skip running if NAME is already set
9d4a31
- move udev rule to /lib/udev/rules.d by default
9d4a31
9d4a31
* Thu Dec 16 2010 Matt Domsch <mdomsch@fedoraproject.org> - 0.3.4-1
9d4a31
- drop unnecessary explicit version requirement on udev
9d4a31
- bugfix: start indices at 1 not 0, to match Dell and HP server port designations
9d4a31
- bugfix: don't assign names to unknown devices
9d4a31
- bugfix: don't assign duplicate names
9d4a31
9d4a31
* Thu Dec  9 2010 Matt Domsch <Matt_Domsch@dell.com> - 0.3.3-1
9d4a31
- add back in use of PCI IRQ Routing Table, if info is not provided by
9d4a31
  sysfs or SMBIOS
9d4a31
9d4a31
* Thu Dec  2 2010 Matt Domsch <Matt_Domsch@dell.com> - 0.3.2-1
9d4a31
- fix for multi-port cards with bridges
9d4a31
- removal of code for seriously obsolete systems
9d4a31
9d4a31
* Sun Nov 28 2010 Matt Domsch <Matt_Domsch@dell.com> 0.3.1-1
9d4a31
- remove all policies except 'physical' and 'all_ethN'
9d4a31
- handle SR-IOV devices properly
9d4a31
9d4a31
* Wed Nov 10 2010 Matt Domsch <Matt_Domsch@dell.com> 0.3.0-1
9d4a31
- add --policy=loms, make it default
9d4a31
- read index and labels from sysfs if available
9d4a31
9d4a31
* Mon Jul 27 2009 Jordan Hargrave <Jordan_Hargrave@dell.com> 0.2.5-1
9d4a31
- fix mmap error checking
9d4a31
9d4a31
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-7
9d4a31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
9d4a31
9d4a31
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-6
9d4a31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9d4a31
9d4a31
* Tue May 06 2008 Matt Domsch <Matt_Domsch@dell.com> 0.2.4-5
9d4a31
- use policy=all_names to find breakage
9d4a31
9d4a31
* Sun Feb 10 2008 Matt Domsch <Matt_Domsch@dell.com> 0.2.4-4
9d4a31
- rebuild for gcc43
9d4a31
9d4a31
* Fri Sep 21 2007 Matt Domsch <Matt_Domsch@dell.com> 0.2.4-3
9d4a31
- fix manpage entry in files
9d4a31
 
9d4a31
* Fri Sep 21 2007 Matt Domsch <Matt_Domsch@dell.com> 0.2.4-2
9d4a31
- rebuild with Requires: udev > 115-3.20070920git
9d4a31
9d4a31
* Fri Sep 21 2007 Matt Domsch <Matt_Domsch@dell.com> 0.2.4-1
9d4a31
- coordinate udev rules usage with udev maintainer
9d4a31
- fix crashes in pcmcia search, in_ethernet(), and incorrect command
9d4a31
  line parsing.
9d4a31
9d4a31
* Mon Aug 27 2007 Matt Domsch <Matt_Domsch@dell.com> 0.2.3-1
9d4a31
- eliminate libbiosdevname.*, pre and post scripts
9d4a31
9d4a31
* Fri Aug 24 2007 Matt Domsch <Matt_Domsch@dell.com> 0.2.2-1
9d4a31
- ExclusiveArch those arches with SMBIOS and PCI IRQ Routing tables
9d4a31
- eliminate libsysfs dependency, move app to / for use before /usr is mounted.
9d4a31
- build static
9d4a31
9d4a31
* Mon Aug 20 2007 Matt Domsch <Matt_Domsch@dell.com> 0.2.1-1
9d4a31
- initial release