- Change /dev/i2c-# creation from /lib/udev/devices to /etc/udev/makedev.d

usage
- Add an /etc/modprobe.d/i2c-dev file to work around bug 380971
This commit is contained in:
Hans de Goede 2008-03-05 21:23:11 +00:00
parent 838716d7d3
commit 5663fe11de

View File

@ -6,15 +6,15 @@
Name: i2c-tools
Version: 3.0.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A heterogeneous set of I2C tools for Linux
Group: Applications/System
License: GPLv2+
URL: http://www.lm-sensors.org/wiki/I2CTools
Source0: http://dl.lm-sensors.org/i2c-tools/releases/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# for /lib/udev/devices ownership
Requires: udev
# for /etc/udev/makedev.d resp /etc/modprobe.d ownership
Requires: udev module-init-tools
ExcludeArch: s390 s390x
%description
@ -56,6 +56,15 @@ install -m 755 eepromer/{eepromer,eeprom,eeprog} \
rm $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl
# Remove userland kernel headers, belong in glibc-kernheaders.
rm -rf $RPM_BUILD_ROOT%{_includedir}/linux
# for i2c-dev ondemand loading through kmod
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d
echo "alias char-major-89-* i2c-dev" > \
$RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/i2c-dev
# for /dev/i2c-# creation (which are needed for kmod i2c-dev autoloading)
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d
for (( i = 0 ; i < 8 ; i++ )) do
echo "i2c-$i" >> $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
done
%clean
@ -65,12 +74,8 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc CHANGES COPYING README
# Not created automatically as i2c-dev does not get autoloaded, once created
# manually, i2c-dev will get loaded by kmod as needed once bz 380971 is fixed
%attr(660, root, root) %dev(c, 89, 0) /lib/udev/devices/i2c-0
%attr(660, root, root) %dev(c, 89, 0) /lib/udev/devices/i2c-1
%attr(660, root, root) %dev(c, 89, 0) /lib/udev/devices/i2c-2
%attr(660, root, root) %dev(c, 89, 0) /lib/udev/devices/i2c-3
%config(noreplace) %{_sysconfdir}/modprobe.d/i2c-dev
%config(noreplace) %{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
%{_bindir}/*
%{_sbindir}/*
%exclude %{_sbindir}/eepro*
@ -83,6 +88,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Mar 5 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0.0-3
- Change /dev/i2c-# creation from /lib/udev/devices to /etc/udev/makedev.d
usage
- Add an /etc/modprobe.d/i2c-dev file to work around bug 380971
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.0.0-2
- Autorebuild for GCC 4.3