10.0.2, convert to systemd
This commit is contained in:
parent
eb0d12691a
commit
72d6eb491d
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
/sysstat-10.0.1.tar.bz2
|
/sysstat-10.0.1.tar.bz2
|
||||||
|
/sysstat-10.0.2.tar.gz
|
||||||
|
/sysstat-10.0.2.tar.bz2
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
b6744a28717dad6a5909fbb2e68b1dc6 sysstat-10.0.1.tar.bz2
|
0dc5c4baf4165658450dd60913aa75bc sysstat-10.0.2.tar.bz2
|
||||||
|
12
sysstat.service
Normal file
12
sysstat.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description= Resets System Activity Logs
|
||||||
|
After=syslog.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/lib64/sa/sa1 --boot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
64
sysstat.spec
64
sysstat.spec
@ -1,22 +1,24 @@
|
|||||||
Name: sysstat
|
Name: sysstat
|
||||||
Version: 10.0.1
|
Version: 10.0.2
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The sar and iostat system monitoring commands
|
Summary: The sar and iostat system monitoring commands
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
URL: http://perso.orange.fr/sebastien.godard/
|
URL: http://perso.orange.fr/sebastien.godard/
|
||||||
Source: http://perso.orange.fr/sebastien.godard/%{name}-%{version}.tar.bz2
|
Source0: http://perso.orange.fr/sebastien.godard/%{name}-%{version}.tar.bz2
|
||||||
|
Source1: sysstat.service
|
||||||
# fixes #643380
|
# fixes #643380
|
||||||
Patch11: sysstat-10.0.0-cpu.patch
|
Patch11: sysstat-10.0.0-cpu.patch
|
||||||
Patch12: sysstat-10.0.0-makefile.patch
|
Patch12: sysstat-10.0.0-makefile.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
|
|
||||||
Requires: /sbin/chkconfig
|
|
||||||
Requires: sh-utils textutils grep fileutils /etc/cron.d
|
Requires: sh-utils textutils grep fileutils /etc/cron.d
|
||||||
BuildRequires: lm_sensors-devel
|
BuildRequires: lm_sensors-devel
|
||||||
BuildRequires: perl %{_includedir}/linux/if.h gettext
|
BuildRequires: perl %{_includedir}/linux/if.h gettext
|
||||||
BuildRequires: autoconf automake
|
BuildRequires: autoconf automake
|
||||||
Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id
|
BuildRequires: systemd-units
|
||||||
|
Requires(post): systemd-sysv
|
||||||
|
Requires(post): systemd-units
|
||||||
|
Requires(preun): systemd-units
|
||||||
|
Requires(postun): systemd-units
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package provides the sar and iostat commands for Linux. Sar and
|
This package provides the sar and iostat commands for Linux. Sar and
|
||||||
@ -36,37 +38,53 @@ CFLAGS="$RPM_OPT_FLAGS -DSADC_PATH=\\\"%{_libdir}/sa/sadc\\\""
|
|||||||
make CFLAGS="$CFLAGS" LFLAGS=""
|
make CFLAGS="$CFLAGS" LFLAGS=""
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
mkdir -p %{buildroot}/%{_sysconfdir}/cron.d
|
mkdir -p %{buildroot}/%{_sysconfdir}/cron.d
|
||||||
install -m 0644 cron/sysstat.crond %{buildroot}/%{_sysconfdir}/cron.d/sysstat
|
install -m 0644 cron/sysstat.crond %{buildroot}/%{_sysconfdir}/cron.d/sysstat
|
||||||
mkdir -p %{buildroot}%{_initrddir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -m 0755 sysstat %{buildroot}%{_initrddir}/
|
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/
|
||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/chkconfig --add sysstat
|
if [ $1 -eq 1 ] ; then
|
||||||
|
# Initial installation
|
||||||
%preun
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
if [ "$1" = 0 ]; then
|
|
||||||
# Remove sa logs if removing sysstat completely
|
|
||||||
rm -f %{_localstatedir}/log/sa/*
|
|
||||||
# Remove service
|
|
||||||
/sbin/chkconfig --del sysstat
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%clean
|
%preun
|
||||||
rm -rf %{buildroot}
|
if [ $1 -eq 0 ]; then
|
||||||
|
/bin/systemctl --no-reload disable sysstat.service > /dev/null 2>&1 || :
|
||||||
|
/bin/systemctl stop sysstat.service > /dev/null 2>&1 || :
|
||||||
|
# Remove sa logs if removing sysstat completely
|
||||||
|
rm -f %{_localstatedir}/log/sa/*
|
||||||
|
fi
|
||||||
|
|
||||||
|
%postun
|
||||||
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
if [ $1 -ge 1 ] ; then
|
||||||
|
# Package upgrade, not uninstall
|
||||||
|
/bin/systemctl try-restart sysstat.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
%triggerun -- sysstat < 10.0.2-1
|
||||||
|
# Save the current service runlevel info
|
||||||
|
# User must manually run systemd-sysv-convert --apply sysstat
|
||||||
|
# to migrate them to systemd targets
|
||||||
|
/usr/bin/systemd-sysv-convert --save sysstat >/dev/null 2>&1 ||:
|
||||||
|
|
||||||
|
# Run these because the SysV package being removed won't do them
|
||||||
|
/sbin/chkconfig --del sysstat >/dev/null 2>&1 || :
|
||||||
|
/bin/systemctl try-restart sysstat.service >/dev/null 2>&1 || :
|
||||||
|
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc CHANGES COPYING CREDITS README TODO FAQ
|
%doc CHANGES COPYING CREDITS README TODO FAQ
|
||||||
%config(noreplace) %{_sysconfdir}/cron.d/sysstat
|
%config(noreplace) %{_sysconfdir}/cron.d/sysstat
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/sysstat
|
%config(noreplace) %{_sysconfdir}/sysconfig/sysstat
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/sysstat.ioconf
|
%config(noreplace) %{_sysconfdir}/sysconfig/sysstat.ioconf
|
||||||
%{_initrddir}/sysstat
|
%{_unitdir}/sysstat.service
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_libdir}/sa
|
%{_libdir}/sa
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
@ -75,6 +93,10 @@ rm -rf %{buildroot}
|
|||||||
%{_localstatedir}/log/sa
|
%{_localstatedir}/log/sa
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 12 2011 Tom Callaway <spot@fedoraproject.org> - 10.0.2-1
|
||||||
|
- update to 10.0.2
|
||||||
|
- convert to systemd
|
||||||
|
|
||||||
* Tue Jun 7 2011 Ivana Hutarova Varekova <varekova@redhat.com> - 10.0.1-1
|
* Tue Jun 7 2011 Ivana Hutarova Varekova <varekova@redhat.com> - 10.0.1-1
|
||||||
- update to 10.0.1
|
- update to 10.0.1
|
||||||
- remove useles patches
|
- remove useles patches
|
||||||
|
Loading…
Reference in New Issue
Block a user