]> git.pld-linux.org Git - packages/sysstat.git/blobdiff - sysstat.spec
requires xz due picked up zip program on builders
[packages/sysstat.git] / sysstat.spec
index 18f29154be753486ab4d400746b0b2c3830b7791..bcfaac22e236ba988701634b76848ae2e378dc93 100644 (file)
@@ -1,5 +1,3 @@
-# TODO:
-# - if running at systemd, cron job is not neccessary (it has the timers)
 #
 # Fix or remove  install.patch (seems systemd files are installed now)
 Summary:       The sar and iostat system monitoring commands
@@ -8,15 +6,16 @@ Summary(ru.UTF-8):    Содержит программы системного мо
 Summary(uk.UTF-8):     Містить команди системного моніторингу sar та iostat
 Summary(zh_CN.UTF-8):  sar, iostat 等系统监视工具
 # use stable versions
-# Sysstat 11.3.x (development version).
+# Sysstat 11.5.x (development version).
+# Sysstat 11.4.x (stable version).
 # Sysstat 11.2.x (stable version).
 Name:          sysstat
-Version:       11.2.0
-Release:       2
+Version:       11.4.3
+Release:       3
 License:       GPL v2
 Group:         Applications/System
 Source0:       http://pagesperso-orange.fr/sebastien.godard/%{name}-%{version}.tar.xz
-# Source0-md5: e8b615775ad98780e3f0675b91eddb19
+# Source0-md5: 76e449bb83a25d95355694338b5ace70
 Source2:       %{name}.init
 Source3:       crontab
 Patch1:                install.patch
@@ -29,9 +28,10 @@ BuildRequires:       rpmbuild(macros) >= 1.671
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
 Requires(post,preun):  /sbin/chkconfig
-Requires:      crondaemon
+Requires:      cronjobs
 Requires:      rc-scripts
 Requires:      systemd-units >= 38
+Requires:      xz
 Obsoletes:     iostat
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -74,6 +74,7 @@ sieciowych i innych operacji wejścia/wyjścia.
        cron_owner=root \
        cron_interval=10 \
        sa_lib_dir=%{_libexecdir} \
+       ZIP=%{_bindir}/xz \
        --enable-install-cron \
        --disable-stripping \
        --with-systemdsystemunitdir=%{systemdunitdir}
@@ -125,6 +126,7 @@ fi
 %systemd_trigger sysstat.service
 
 %triggerpostun -- %{name} < 11.2.0-2
+C=0
 for log in /var/log/sa/sa[0-9]*; do
        if (LC_ALL=C %{_bindir}/sadf -C "$log" 2>&1 | grep -q "Current sysstat version cannot read the format of this file"); then
                echo "Converting file $log to current format: "
@@ -132,15 +134,20 @@ for log in /var/log/sa/sa[0-9]*; do
                        chown --reference "$log" "$log.migrate"
                        chmod --reference "$log" "$log.migrate"
                        mv "$log.migrate" "$log"
+                       C=1
                else
                        echo "$log MIGRATION FAILED." >&2
                fi
        fi
 done
+if [ "$C" -eq 1 ]; then
+       %service sysstat restart
+       %systemd_post sysstat.service
+fi
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc CHANGES CREDITS README FAQ
+%doc CHANGES CREDITS README.md FAQ
 %attr(755,root,root) %{_bindir}/cifsiostat
 %attr(755,root,root) %{_bindir}/iostat
 %attr(755,root,root) %{_bindir}/mpstat
This page took 0.083773 seconds and 4 git commands to generate.