packages: lm_sensors/lm_sensors.spec, lm_sensors/sensord.service (NEW)=?UTF-8?Q?=20?=- re...
baggins
baggins at pld-linux.org
Wed Apr 18 14:03:21 CEST 2012
Author: baggins Date: Wed Apr 18 12:03:21 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 2
- added systemd services for lm_sensors and sensord
---- Files affected:
packages/lm_sensors:
lm_sensors.spec (1.204 -> 1.205) , sensord.service (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/lm_sensors/lm_sensors.spec
diff -u packages/lm_sensors/lm_sensors.spec:1.204 packages/lm_sensors/lm_sensors.spec:1.205
--- packages/lm_sensors/lm_sensors.spec:1.204 Wed Apr 18 13:46:53 2012
+++ packages/lm_sensors/lm_sensors.spec Wed Apr 18 14:03:16 2012
@@ -10,7 +10,7 @@
Summary(uk.UTF-8): Утиліти для моніторингу апаратури
Name: lm_sensors
Version: 3.3.2
-Release: 1.1
+Release: 2
License: GPL v2+
Group: Applications/System
Source0: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
@@ -22,6 +22,7 @@
Source5: sensors.sh
Source6: lm_sensors.init
Source7: lm_sensors.sysconfig
+Source8: sensord.service
Patch0: %{name}-ppc.patch
Patch1: %{name}-iconv-in-libc.patch
Patch2: %{name}-sensors-detect-PATH.patch
@@ -30,10 +31,14 @@
BuildRequires: bison
BuildRequires: flex >= 2.5.1
BuildRequires: rpm-perlprov >= 3.0.3-16
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.647
BuildRequires: rrdtool-devel >= 1.2.10
+Requires(post,preun): /sbin/chkconfig
+Requires(post,preun,postun): systemd-units >= 38
Requires: %{name}-libs = %{version}-%{release}
Requires: dev >= 2.9.0-13
+Requires: rc-scripts
+Requires: systemd-units >= 38
Requires: uname(release) >= 2.6.5
Obsoletes: lm_sensors-config-default
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -133,8 +138,10 @@
Summary(pl.UTF-8): Demon sensord
Group: Daemons
Requires(post,preun): /sbin/chkconfig
+#Requires(post,preun,postun): systemd-units >= 38
Requires: %{name} = %{version}-%{release}
Requires: rc-scripts
+#Requires: systemd-units >= 38
%description sensord
Sensord daemon.
@@ -184,7 +191,7 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{systemdunitdir}} \
$RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
%{__make} user_install \
@@ -205,6 +212,9 @@
install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/lm_sensors
install -d $RPM_BUILD_ROOT/%{_sysconfdir}/sensors.d
+install -p prog/init/lm_sensors.service $RPM_BUILD_ROOT%{systemdunitdir}
+install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/sensord.service
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -240,12 +250,21 @@
EOF
fi
/sbin/chkconfig --add lm_sensors
+NORESTART=1
+%systemd_post lm_sensors.service
%preun
if [ "$1" = "0" ]; then
%service lm_sensors stop
/sbin/chkconfig --del lm_sensors
fi
+%systemd_preun lm_sensors.service
+
+%postun
+%systemd_reload
+
+%triggerpostun -- %{name} < 3.3.2-2
+%systemd_trigger lm_sensors.service
%pre sensord
if [ -f /var/lock/subsys/sensors ]; then
@@ -261,12 +280,20 @@
%post sensord
/sbin/chkconfig --add sensord
%service sensord restart "sensors daemon"
+%systemd_post sensord.service
%preun sensord
if [ "$1" = "0" ]; then
%service sensord stop
/sbin/chkconfig --del sensord
fi
+%systemd_preun sensord.service
+
+%postun sensord
+%systemd_reload
+
+%triggerpostun sensord -- %{name}-sensord < 3.3.2-2
+%systemd_trigger sensord.service
%post fancontrol
if [ "$1" = 1 ]; then
@@ -304,6 +331,7 @@
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf
%dir %{_sysconfdir}/sensors.d
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lm_sensors
+%{systemdunitdir}/lm_sensors.service
%files libs
%defattr(644,root,root,755)
@@ -327,6 +355,7 @@
%attr(754,root,root) /etc/rc.d/init.d/sensord
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensord
%{_mandir}/man8/sensord.8*
+%{systemdunitdir}/sensord.service
%files fancontrol
%defattr(644,root,root,755)
@@ -343,6 +372,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.205 2012/04/18 12:03:16 baggins
+- rel 2
+- added systemd services for lm_sensors and sensord
+
Revision 1.204 2012/04/18 11:46:53 baggins
- cleaned up the package from our crappy invetions
- kill config-default package
================================================================
Index: packages/lm_sensors/sensord.service
diff -u /dev/null packages/lm_sensors/sensord.service:1.1
--- /dev/null Wed Apr 18 14:03:21 2012
+++ packages/lm_sensors/sensord.service Wed Apr 18 14:03:16 2012
@@ -0,0 +1,11 @@
+[Unit]
+Description=Sensor Information Logging
+
+[Service]
+Type=forking
+EnvironmentFile=-/etc/sysconfig/sensord
+PIDFile=/var/run/sensord.pid
+ExecStart=/usr/sbin/sensord -i $INTERVAL -l $LOG_INTERVAL -f daemon
+
+[Install]
+WantedBy=multi-user.target
================================================================
---- CVS-web:
http://cvs.pld-linux.org/packages/lm_sensors/lm_sensors.spec?r1=1.204&r2=1.205
More information about the pld-cvs-commit
mailing list