Browse code

lm-sensors pkg

-Added lm-sensors pkgg
-Enabled CONFIG_I2C_CHARDEV config for kernel

Change-Id: I1f14dcb8f303fc6e45ab7c4e8876e77f041bb18d
Signed-off-by: Tapas Kundu <tkundu@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/7467
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

Tapas Kundu authored on 2019/06/22 11:01:38
Showing 3 changed files
... ...
@@ -2861,7 +2861,7 @@ CONFIG_I2C=y
2861 2861
 CONFIG_ACPI_I2C_OPREGION=y
2862 2862
 CONFIG_I2C_BOARDINFO=y
2863 2863
 # CONFIG_I2C_COMPAT is not set
2864
-# CONFIG_I2C_CHARDEV is not set
2864
+CONFIG_I2C_CHARDEV=m
2865 2865
 # CONFIG_I2C_MUX is not set
2866 2866
 CONFIG_I2C_HELPER_AUTO=y
2867 2867
 CONFIG_I2C_SMBUS=m
... ...
@@ -2,7 +2,7 @@
2 2
 Summary:        Kernel
3 3
 Name:           linux
4 4
 Version:        4.19.52
5
-Release:        1%{?kat_build:.%kat_build}%{?dist}
5
+Release:        2%{?kat_build:.%kat_build}%{?dist}
6 6
 License:    	GPLv2
7 7
 URL:        	http://www.kernel.org/
8 8
 Group:        	System Environment/Kernel
... ...
@@ -463,6 +463,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
463 463
 %endif
464 464
 
465 465
 %changelog
466
+*   Thu Jun 20 2019 Tapas Kundu <tkundu@vmware.com> 4.19.52-2
467
+-   Enabled CONFIG_I2C_CHARDEV to support lm-sensors
466 468
 *   Mon Jun 17 2019 Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu> 4.19.52-1
467 469
 -   Update to version 4.19.52
468 470
 -   Fix CVE-2019-12456, CVE-2019-12379, CVE-2019-12380, CVE-2019-12381,
469 471
new file mode 100644
... ...
@@ -0,0 +1,91 @@
0
+Summary:        The lm_sensors package provides user-space support for the hardware monitoring drivers in the Linux kernel.
1
+Name:           lm-sensors
2
+Version:        3.5.0
3
+Release:        1%{?dist}
4
+License:        GPLv2
5
+URL:            https://github.com/lm-sensors/lm-sensors
6
+Group:          System Drivers
7
+Vendor:         VMware, Inc.
8
+Distribution:   Photon
9
+Source0:        https://ftp.gwdg.de/pub/linux/misc/lm-sensors/%{name}-%{version}.tar.gz
10
+%define sha1    lm-sensors=3d1b3b82d62daeec1f151eaf993c61dc3cf21a6b
11
+BuildRequires:  gcc
12
+BuildRequires:  bison
13
+BuildRequires:  flex
14
+BuildRequires:  make
15
+BuildRequires:  bison
16
+BuildRequires:  glibc-devel
17
+BuildRequires:  libgcc-devel
18
+BuildRequires:  which
19
+Requires:       perl
20
+Requires:       linux >= 4.19.52-2
21
+
22
+%description
23
+The lm_sensors package provides user-space support for the hardware monitoring drivers in the Linux kernel.
24
+This is useful for monitoring the temperature of the CPU and adjusting the performance of some hardware (such as cooling fans).
25
+
26
+%package   devel
27
+Summary:   lm-sensors devel
28
+Group:     Development/Libraries
29
+Requires:  lm-sensors = %{version}-%{release}
30
+
31
+%description devel
32
+lm-sensors devel
33
+
34
+%package   doc
35
+Summary:   lm-sensors docs
36
+Group:     Development/Libraries
37
+Requires:  lm-sensors = %{version}-%{release}
38
+
39
+%description doc
40
+Documentation for lm-sensors.
41
+
42
+%prep
43
+%setup -q -n %{name}-3-5-0
44
+
45
+%build
46
+
47
+make all %{?_smp_mflags}
48
+
49
+%install
50
+rm -rf %{buildroot}
51
+mkdir -p %{buildroot}/usr/lib
52
+mkdir -p %{buildroot}/usr/share
53
+make PREFIX=%{buildroot}/usr        \
54
+     BUILD_STATIC_LIB=0 \
55
+     MANDIR=%{buildroot}/usr/share/man install &&
56
+
57
+install -v -m755 -d %{buildroot}/usr/share/doc/%{name}-%{version} &&
58
+cp -rv              README INSTALL doc/* \
59
+                    %{buildroot}/usr/share/doc/%{name}-%{version}
60
+%check
61
+
62
+%post
63
+/sbin/modprobe i2c-dev
64
+
65
+%postun
66
+/sbin/modprobe -r i2c-dev
67
+
68
+%clean
69
+rm -rf %{buildroot}/*
70
+
71
+%files
72
+%defattr(-,root,root)
73
+%{_bindir}/*
74
+%{_libdir}/libsensors.so.5
75
+%{_libdir}/libsensors.so.5.0.0
76
+%{_sbindir}/*
77
+
78
+%files devel
79
+%defattr(-,root,root)
80
+%{_includedir}/*
81
+%{_libdir}/libsensors.so
82
+
83
+%files doc
84
+%defattr(-,root,root)
85
+%{_docdir}/*
86
+%{_mandir}/*
87
+
88
+%changelog
89
+* Thu Jun 20 2019 Tapas Kundu <tkundu@vmware.com> 3.5.0-1
90
+- Initial packaging with Photon OS.