|
|
@ -4,38 +4,24 @@
|
|
|
|
# This file and all modifications and additions to the pristine
|
|
|
|
# This file and all modifications and additions to the pristine
|
|
|
|
# package are under the same license as the package itself.
|
|
|
|
# package are under the same license as the package itself.
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} > 7 || 0%{?fedora} > 28
|
|
|
|
|
|
|
|
%bcond_with python2
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%bcond_without python2
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: i2c-tools
|
|
|
|
Name: i2c-tools
|
|
|
|
Version: 4.0
|
|
|
|
Version: 4.3
|
|
|
|
Release: 12%{?dist}
|
|
|
|
Release: 3%{?dist}
|
|
|
|
Summary: A heterogeneous set of I2C tools for Linux
|
|
|
|
Summary: A heterogeneous set of I2C tools for Linux
|
|
|
|
License: GPLv2+
|
|
|
|
License: GPLv2+
|
|
|
|
URL: https://i2c.wiki.kernel.org/index.php/I2C_Tools
|
|
|
|
URL: https://i2c.wiki.kernel.org/index.php/I2C_Tools
|
|
|
|
|
|
|
|
|
|
|
|
Source0: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.xz
|
|
|
|
Source0: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.xz
|
|
|
|
# Upstream patch
|
|
|
|
|
|
|
|
Patch0: 0001-i2c-tools-i2cbusses-Avoid-buffer-overflows-in-sysfs-.patch
|
|
|
|
|
|
|
|
# Upstream patch
|
|
|
|
|
|
|
|
Patch1: 0002-tools-i2cbusses-Check-the-return-value-of-snprintf.patch
|
|
|
|
|
|
|
|
# Upstream patch
|
|
|
|
|
|
|
|
Patch2: 0003-py-smbus-Fix-FSF-address-in-smbusmodule.c.patch
|
|
|
|
|
|
|
|
# Upstream patch fixing license headers of libi2c
|
|
|
|
|
|
|
|
Patch3: 0001-libi2c-Mention-the-correct-license-in-source-files.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# for /etc/udev/makedev.d resp /usr/lib/modprobe.d ownership
|
|
|
|
# for /etc/udev/makedev.d resp /usr/lib/modprobe.d ownership
|
|
|
|
Requires: udev module-init-tools
|
|
|
|
Requires: systemd-udev kmod
|
|
|
|
Requires: libi2c%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: libi2c%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
|
|
|
BuildRequires: make
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
%if %{with python2}
|
|
|
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
|
|
|
ExcludeArch: s390 s390x
|
|
|
|
ExcludeArch: s390 s390x
|
|
|
|
|
|
|
|
Obsoletes: i2c-tools-eepromer < 4.2-2
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
%description
|
|
|
|
This package contains a heterogeneous set of I2C tools for Linux: a bus
|
|
|
|
This package contains a heterogeneous set of I2C tools for Linux: a bus
|
|
|
@ -43,36 +29,9 @@ probing tool, a chip dumper, register-level access helpers, EEPROM
|
|
|
|
decoding scripts, and more.
|
|
|
|
decoding scripts, and more.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package eepromer
|
|
|
|
|
|
|
|
Summary: Programs for reading / writing i2c / smbus eeproms
|
|
|
|
|
|
|
|
Requires: libi2c%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
# For the device nodes
|
|
|
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
# /usr/sbin/eeprom is Public Domain, the rest is GPLv2+
|
|
|
|
|
|
|
|
License: GPLv2+ and Public Domain
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description eepromer
|
|
|
|
|
|
|
|
Programs for reading / writing i2c / smbus eeproms. Notice that writing the
|
|
|
|
|
|
|
|
eeproms in your system is very dangerous and is likely to render your system
|
|
|
|
|
|
|
|
unusable. Do not install, let alone use this, unless you really, _really_ know
|
|
|
|
|
|
|
|
what you are doing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
|
|
|
%package -n python2-i2c-tools
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python2-i2c-tools}
|
|
|
|
|
|
|
|
Requires: libi2c%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
# Remove before F30
|
|
|
|
|
|
|
|
Provides: %{name}-python = %{version}-%{release}
|
|
|
|
|
|
|
|
Provides: %{name}-python%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
Obsoletes: %{name}-python < 4.0-4
|
|
|
|
|
|
|
|
Summary: Python 2 bindings for Linux SMBus access through i2c-dev
|
|
|
|
|
|
|
|
License: GPLv2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python2-i2c-tools
|
|
|
|
|
|
|
|
Python 2 bindings for Linux SMBus access through i2c-dev
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-i2c-tools
|
|
|
|
%package -n python3-i2c-tools
|
|
|
|
|
|
|
|
Summary: Python 3 bindings for Linux SMBus access through i2c-dev
|
|
|
|
|
|
|
|
License: GPLv2
|
|
|
|
%{?python_provide:%python_provide python3-i2c-tools}
|
|
|
|
%{?python_provide:%python_provide python3-i2c-tools}
|
|
|
|
Requires: libi2c%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: libi2c%{?_isa} = %{version}-%{release}
|
|
|
|
%if %{without python2}
|
|
|
|
%if %{without python2}
|
|
|
@ -81,8 +40,6 @@ Obsoletes: %{name}-python < 4.0-4
|
|
|
|
# Remove before F31
|
|
|
|
# Remove before F31
|
|
|
|
Obsoletes: python2-i2c-tools < 4.0-5
|
|
|
|
Obsoletes: python2-i2c-tools < 4.0-5
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
Summary: Python 3 bindings for Linux SMBus access through i2c-dev
|
|
|
|
|
|
|
|
License: GPLv2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-i2c-tools
|
|
|
|
%description -n python3-i2c-tools
|
|
|
|
Python 3 bindings for Linux SMBus access through i2c-dev
|
|
|
|
Python 3 bindings for Linux SMBus access through i2c-dev
|
|
|
@ -114,47 +71,31 @@ Obsoletes: i2c-tools-devel < 4.0-1
|
|
|
|
%{summary}.
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%autosetup -p1
|
|
|
|
%patch0 -p1
|
|
|
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
|
|
|
%patch3 -p1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" BUILD_STATIC_LIB=0 EXTRA=eeprog
|
|
|
|
make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" BUILD_STATIC_LIB=0 EXTRA=eeprog
|
|
|
|
pushd eepromer
|
|
|
|
|
|
|
|
make CFLAGS="$RPM_OPT_FLAGS -I../include" LDFLAGS="$RPM_LD_FLAGS"
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd py-smbus
|
|
|
|
pushd py-smbus
|
|
|
|
%if %{with python2}
|
|
|
|
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS -I../include" LDFLAGS="$RPM_LD_FLAGS" \
|
|
|
|
|
|
|
|
%{__python2} setup.py build -b build-py2
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS -I../include" LDFLAGS="$RPM_LD_FLAGS" \
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS -I../include" LDFLAGS="$RPM_LD_FLAGS" \
|
|
|
|
%{__python3} setup.py build -b build-py3
|
|
|
|
%{__python3} setup.py build -b build-py3
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} BUILD_STATIC_LIB=0 \
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} BUILD_STATIC_LIB=0 \
|
|
|
|
EXTRA=eeprog libdir=%{_libdir}
|
|
|
|
EXTRA=eeprog libdir=%{_libdir}
|
|
|
|
install -m 755 eepromer/{eepromer,eeprom} \
|
|
|
|
|
|
|
|
$RPM_BUILD_ROOT%{_sbindir}
|
|
|
|
|
|
|
|
install -m 644 eepromer/{eepromer,eeprom}.8 \
|
|
|
|
|
|
|
|
$RPM_BUILD_ROOT%{_mandir}/man8
|
|
|
|
|
|
|
|
pushd py-smbus
|
|
|
|
pushd py-smbus
|
|
|
|
%if %{with python2}
|
|
|
|
|
|
|
|
%{__python2} setup.py build -b build-py2 install --skip-build --root=$RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%{__python3} setup.py build -b build-py3 install --skip-build --root=$RPM_BUILD_ROOT
|
|
|
|
%{__python3} setup.py build -b build-py3 install --skip-build --root=$RPM_BUILD_ROOT
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
# cleanup
|
|
|
|
# cleanup
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl
|
|
|
|
# Remove unpleasant DDC tools. KMS already exposes the EDID block in sysfs,
|
|
|
|
# Remove unpleasant DDC tools. KMS already exposes the EDID block in sysfs,
|
|
|
|
# and edid-decode is a more complete tool than decode-edid.
|
|
|
|
# and edid-decode is a more complete tool than decode-edid.
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_bindir}/{ddcmon,decode-edid}
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_bindir}/{ddcmon,decode-edid}
|
|
|
|
|
|
|
|
|
|
|
|
# for i2c-dev ondemand loading through kmod
|
|
|
|
# for i2c-dev ondemand loading through kmod
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d
|
|
|
|
echo "alias char-major-89-* i2c-dev" > \
|
|
|
|
echo "alias char-major-89-* i2c-dev" > \
|
|
|
|
$RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d/i2c-dev.conf
|
|
|
|
$RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d/i2c-dev.conf
|
|
|
|
# for /dev/i2c-# creation (which are needed for kmod i2c-dev autoloading)
|
|
|
|
# for /dev/i2c-# creation (which are needed for kmod i2c-dev autoloading)
|
|
|
@ -180,29 +121,18 @@ exit 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%files
|
|
|
|
%doc CHANGES COPYING README
|
|
|
|
%license COPYING
|
|
|
|
|
|
|
|
%doc CHANGES README
|
|
|
|
%config(noreplace) %{_prefix}/lib/modprobe.d/i2c-dev.conf
|
|
|
|
%config(noreplace) %{_prefix}/lib/modprobe.d/i2c-dev.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
|
|
|
|
%config(noreplace) %{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
|
|
|
|
%{_sbindir}/*
|
|
|
|
%{_sbindir}/i2c*
|
|
|
|
%exclude %{_sbindir}/eepro*
|
|
|
|
%{_sbindir}/eeprog
|
|
|
|
%exclude %{_sbindir}/i2c-stub*
|
|
|
|
%exclude %{_sbindir}/i2c-stub*
|
|
|
|
%{_mandir}/man8/*.8.gz
|
|
|
|
%{_mandir}/man8/i2c*.8.*
|
|
|
|
%exclude %{_mandir}/man8/eepro*
|
|
|
|
%{_mandir}/man8/eeprog.8.*
|
|
|
|
%exclude %{_mandir}/man8/i2c-stub-from-dump.8.gz
|
|
|
|
%exclude %{_mandir}/man8/i2c-stub-from-dump.8.*
|
|
|
|
%{_prefix}/lib/modules-load.d/%{name}.conf
|
|
|
|
%{_prefix}/lib/modules-load.d/%{name}.conf
|
|
|
|
|
|
|
|
|
|
|
|
%files eepromer
|
|
|
|
|
|
|
|
%doc eepromer/README*
|
|
|
|
|
|
|
|
%doc eeprog/README.eeprog
|
|
|
|
|
|
|
|
%{_sbindir}/eepro*
|
|
|
|
|
|
|
|
%{_mandir}/man8/eepro*.8.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
|
|
|
%files -n python2-i2c-tools
|
|
|
|
|
|
|
|
%doc py-smbus/README
|
|
|
|
|
|
|
|
%{python2_sitearch}/*
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-i2c-tools
|
|
|
|
%files -n python3-i2c-tools
|
|
|
|
%doc py-smbus/README
|
|
|
|
%doc py-smbus/README
|
|
|
|
%{python3_sitearch}/*
|
|
|
|
%{python3_sitearch}/*
|
|
|
@ -211,30 +141,74 @@ exit 0
|
|
|
|
%doc eeprom/README
|
|
|
|
%doc eeprom/README
|
|
|
|
%{_bindir}/decode-*
|
|
|
|
%{_bindir}/decode-*
|
|
|
|
%{_sbindir}/i2c-stub*
|
|
|
|
%{_sbindir}/i2c-stub*
|
|
|
|
%{_mandir}/man1/decode-*.1.gz
|
|
|
|
%{_mandir}/man1/decode-*.1.*
|
|
|
|
%{_mandir}/man8/i2c-stub-from-dump.8.gz
|
|
|
|
%{_mandir}/man8/i2c-stub-from-dump.8.*
|
|
|
|
|
|
|
|
|
|
|
|
%files -n libi2c
|
|
|
|
%files -n libi2c
|
|
|
|
%doc COPYING.LGPL
|
|
|
|
%license COPYING.LGPL
|
|
|
|
%{_libdir}/libi2c.so.*
|
|
|
|
%{_libdir}/libi2c.so.0*
|
|
|
|
|
|
|
|
|
|
|
|
%files -n libi2c-devel
|
|
|
|
%files -n libi2c-devel
|
|
|
|
%dir %{_includedir}/i2c
|
|
|
|
%dir %{_includedir}/i2c
|
|
|
|
%{_includedir}/i2c/smbus.h
|
|
|
|
%{_includedir}/i2c/smbus.h
|
|
|
|
%{_libdir}/libi2c.so
|
|
|
|
%{_libdir}/libi2c.so
|
|
|
|
|
|
|
|
%{_mandir}/man3/libi2c.3.*
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 4.0-12
|
|
|
|
* Thu Jun 30 2022 Jan Zerdik <jzerdik@redhat.com> - 4.3-3
|
|
|
|
- Rebuilt for MSVSphere 8.8
|
|
|
|
- Rebuilt
|
|
|
|
|
|
|
|
- Resolves: rhbz#2072719
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.3-2
|
|
|
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Aug 03 2021 Artem Egorenkov <aegorenk@redhat.com> - 4.3-1
|
|
|
|
|
|
|
|
- Version 4.3
|
|
|
|
|
|
|
|
- Resolves: rhbz#1989260
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.2-4
|
|
|
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-3
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jan 16 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 4.2-2
|
|
|
|
|
|
|
|
- Move eeprog to i2c-tools (shouldn't have been in eepromer sub package)
|
|
|
|
|
|
|
|
- Drop/obsolete eepromer subpackage, deprecated for 6 years
|
|
|
|
|
|
|
|
- Drop python2 conditionals
|
|
|
|
|
|
|
|
- Minor cleanups
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jan 07 2021 Artem Egorenkov <aegorenk@redhat.com> - 4.2-1
|
|
|
|
|
|
|
|
- Version 4.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-6
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.1-5
|
|
|
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-4
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1-3
|
|
|
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-2
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Feb 4 2019 Peter Robinson <pbrobinson@fedoraproject.org> 4.1-1
|
|
|
|
|
|
|
|
- Version 4.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-13
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Dec 05 2018 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-12
|
|
|
|
* Thu Nov 15 2018 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-12
|
|
|
|
- Use versioned dependency on libi2c in subpackages
|
|
|
|
- Ship modprobe.d files in /usr/lib/modprobe.d (rhbz#1195285)
|
|
|
|
- Resolves: rhbz#1650317
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Nov 15 2018 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-11
|
|
|
|
* Mon Aug 13 2018 Peter Robinson <pbrobinson@fedoraproject.org> 4.0-11
|
|
|
|
- Ship modprobe.d files in /usr/lib/modprobe.d
|
|
|
|
- Add requires on libi2c NVR
|
|
|
|
- Resolves: rhbz#1649735
|
|
|
|
- Minor spec cleanups, use %%license
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Aug 03 2018 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-10
|
|
|
|
* Fri Aug 03 2018 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-10
|
|
|
|
- Add upstream patch fixing libi2c license headers
|
|
|
|
- Add upstream patch fixing libi2c license headers
|
|
|
|