|
@@ -1,22 +1,29 @@
|
|
|
|
+%bcond_with systemd
|
|
|
|
+
|
|
Summary: Collection of performance monitoring tools for Linux
|
|
Summary: Collection of performance monitoring tools for Linux
|
|
Summary(ja): Linux 用パフォーマンス計測ツール集
|
|
Summary(ja): Linux 用パフォーマンス計測ツール集
|
|
Name: sysstat
|
|
Name: sysstat
|
|
-Version: 12.2.1
|
|
|
|
-Release: 1%{?_dist_release}
|
|
|
|
|
|
+Version: 12.7.1
|
|
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
|
+Group: system
|
|
|
|
+Vendor: Project Vine
|
|
|
|
+Distribution: Vine Linux
|
|
|
|
+Packager: shaolin
|
|
|
|
+
|
|
License: GPLv2+
|
|
License: GPLv2+
|
|
-Group: Applications/System
|
|
|
|
URL: http://sebastien.godard.pagesperso-orange.fr/
|
|
URL: http://sebastien.godard.pagesperso-orange.fr/
|
|
Source: http://pagesperso-orange.fr/sebastien.godard/%{name}-%{version}.tar.xz
|
|
Source: http://pagesperso-orange.fr/sebastien.godard/%{name}-%{version}.tar.xz
|
|
|
|
|
|
-BuildRoot:: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
-BuildRequires: gettext, lm-sensors-devel
|
|
|
|
-Requires: cronie, findutils, xz
|
|
|
|
|
|
+BuildRoot:: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
+BuildRequires: gettext, lm-sensors-devel
|
|
|
|
+Requires: findutils, xz
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{?systemd_requires}
|
|
|
|
+%else
|
|
|
|
+Requires: cronie
|
|
Requires(post): /sbin/chkconfig
|
|
Requires(post): /sbin/chkconfig
|
|
Requires(preun): /sbin/chkconfig
|
|
Requires(preun): /sbin/chkconfig
|
|
-
|
|
|
|
-Vendor: Project Vine
|
|
|
|
-Distribution: Vine Linux
|
|
|
|
-Packager: shaolin
|
|
|
|
|
|
+%endif
|
|
|
|
|
|
%description
|
|
%description
|
|
The sysstat package contains sar, sadf, mpstat, iostat, pidstat, nfsiostat,
|
|
The sysstat package contains sar, sadf, mpstat, iostat, pidstat, nfsiostat,
|
|
@@ -36,6 +43,9 @@ The nfsiostat command reports I/O statistics for network file systems.
|
|
The cifsiostat command reports I/O statistics for CIFS file systems.
|
|
The cifsiostat command reports I/O statistics for CIFS file systems.
|
|
|
|
|
|
|
|
|
|
|
|
+%debug_package
|
|
|
|
+
|
|
|
|
+
|
|
%prep
|
|
%prep
|
|
%setup -q
|
|
%setup -q
|
|
iconv -f windows-1252 -t utf8 CREDITS > CREDITS.aux
|
|
iconv -f windows-1252 -t utf8 CREDITS > CREDITS.aux
|
|
@@ -44,10 +54,14 @@ mv CREDITS.aux CREDITS
|
|
|
|
|
|
%build
|
|
%build
|
|
%configure \
|
|
%configure \
|
|
- --enable-install-cron --enable-copy-only --disable-file-attr \
|
|
|
|
- --disable-stripping --docdir=%{_docdir}/%{name}-%{version} \
|
|
|
|
|
|
+ --enable-install-cron \
|
|
|
|
+ --enable-copy-only \
|
|
|
|
+ --disable-file-attr \
|
|
|
|
+ --disable-stripping \
|
|
|
|
+ --docdir='%{_pkgdocdir}' \
|
|
sadc_options='-S DISK' \
|
|
sadc_options='-S DISK' \
|
|
- history=28 compressafter=31
|
|
|
|
|
|
+ history=28 \
|
|
|
|
+ compressafter=31
|
|
make %{?_smp_mflags}
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
@@ -55,39 +69,66 @@ make %{?_smp_mflags}
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
make install DESTDIR=%{buildroot}
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
|
|
-# Install cron file
|
|
|
|
-mkdir -p %{buildroot}%{_sysconfdir}/cron.d
|
|
|
|
-install -m 0644 cron/sysstat.crond %{buildroot}%{_sysconfdir}/cron.d/sysstat
|
|
|
|
|
|
+rm -f %{buildroot}%{_pkgdocdir}/COPYING
|
|
|
|
|
|
# Install service file
|
|
# Install service file
|
|
|
|
+%if %{with systemd}
|
|
|
|
+
|
|
|
|
+%else
|
|
mkdir -p %{buildroot}%{_initdir}
|
|
mkdir -p %{buildroot}%{_initdir}
|
|
install -m 0755 sysstat %{buildroot}%{_initdir}/
|
|
install -m 0755 sysstat %{buildroot}%{_initdir}/
|
|
|
|
|
|
|
|
+# Install cron file
|
|
|
|
+mkdir -p %{buildroot}%{_sysconfdir}/cron.d
|
|
|
|
+install -m 0644 cron/sysstat.crond %{buildroot}%{_sysconfdir}/cron.d/sysstat
|
|
|
|
+%endif
|
|
|
|
+
|
|
%find_lang %{name}
|
|
%find_lang %{name}
|
|
|
|
|
|
|
|
+
|
|
%clean
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
+
|
|
%post
|
|
%post
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_post sysstat.service sysstat-collect.timer sysstat-summary.timer
|
|
|
|
+%else
|
|
/sbin/chkconfig --add sysstat
|
|
/sbin/chkconfig --add sysstat
|
|
|
|
+%endif
|
|
|
|
|
|
%preun
|
|
%preun
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_preun sysstat.service sysstat-collect.timer sysstat-summary.timer%else
|
|
|
|
+%endif
|
|
if [[ $1 -eq 0 ]]; then
|
|
if [[ $1 -eq 0 ]]; then
|
|
# Remove sa logs if removing sysstat completely
|
|
# Remove sa logs if removing sysstat completely
|
|
rm -f %{_localstatedir}/log/sa/*
|
|
rm -f %{_localstatedir}/log/sa/*
|
|
# Remove service
|
|
# Remove service
|
|
|
|
+%if !%{with systemd}
|
|
/sbin/chkconfig --del sysstat
|
|
/sbin/chkconfig --del sysstat
|
|
|
|
+%endif
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%postun
|
|
|
|
+%systemd_postun sysstat.service sysstat-collect.timer sysstat-summary.timer
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
|
|
%files -f %{name}.lang
|
|
%files -f %{name}.lang
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
%license COPYING
|
|
%license COPYING
|
|
-%doc CHANGES CREDITS README.md FAQ.md
|
|
|
|
-%config(noreplace) %{_sysconfdir}/cron.d/sysstat
|
|
|
|
|
|
+%doc CHANGES CREDITS README.md FAQ.md %{name}-%{version}.lsm
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/sysstat
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/sysstat
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/sysstat.ioconf
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/sysstat.ioconf
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{_systemd_util_dir}/system-sleep/sysstat*
|
|
|
|
+%{_unitdir}/sysstat*
|
|
|
|
+%else
|
|
|
|
+%config(noreplace) %{_sysconfdir}/cron.d/sysstat
|
|
%{_initdir}/sysstat
|
|
%{_initdir}/sysstat
|
|
|
|
+%endif
|
|
%{_bindir}/*
|
|
%{_bindir}/*
|
|
%{_libdir}/sa
|
|
%{_libdir}/sa
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man1/*
|
|
@@ -95,7 +136,12 @@ fi
|
|
%{_mandir}/man8/*
|
|
%{_mandir}/man8/*
|
|
%{_localstatedir}/log/sa
|
|
%{_localstatedir}/log/sa
|
|
|
|
|
|
|
|
+
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Thu Nov 17 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 12.7.1-1
|
|
|
|
+- updated to 12.7.1.
|
|
|
|
+- added systemd support (disabled as default).
|
|
|
|
+
|
|
* Mon Mar 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 12.2.1-1
|
|
* Mon Mar 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 12.2.1-1
|
|
- updated to 12.2.1.
|
|
- updated to 12.2.1.
|
|
|
|
|