]>
Commit | Line | Data |
---|---|---|
6ad698d6 ER |
1 | # TODO: |
2 | # - solve conflict (obsoletes?): | |
3 | # file /usr/bin/iostat from install of sysstat-10.1.6-3.i686 conflicts with file from package iostat-2.2-1.i686 | |
24e10cb4 | 4 | Summary: The sar and iostat system monitoring commands |
2408247e ER |
5 | Summary(pl.UTF-8): Polecenia sar i iostat dla systemu Linux |
6 | Summary(ru.UTF-8): Содержит программы системного мониторинга sar и iostat | |
7 | Summary(uk.UTF-8): Містить команди системного моніторингу sar та iostat | |
8 | Summary(zh_CN.UTF-8): sar, iostat 等系统监视工具 | |
ae943c3e | 9 | Name: sysstat |
2746affb | 10 | Version: 10.1.6 |
46adc211 | 11 | Release: 5 |
ba4d6e89 | 12 | License: GPL v2 |
7b0005ef | 13 | Group: Applications/System |
c01e3dd5 | 14 | Source0: http://perso.wanadoo.fr/sebastien.godard/%{name}-%{version}.tar.bz2 |
2746affb | 15 | # Source0-md5: 61792b2591e4b3adcb7b979af2330fba |
9ff3620d | 16 | Source2: %{name}.init |
7b0005ef | 17 | Patch0: %{name}-opt.patch |
ae943c3e | 18 | URL: http://perso.wanadoo.fr/sebastien.godard/ |
e16590db | 19 | BuildRequires: autoconf >= 2.53 |
a966432f | 20 | BuildRequires: automake |
c61b12a9 | 21 | BuildRequires: gettext-tools |
e16590db | 22 | BuildRequires: lm_sensors-devel |
2746affb | 23 | BuildRequires: rpmbuild(macros) >= 1.671 |
d13c5b10 JB |
24 | Requires(post,preun): /sbin/chkconfig |
25 | Requires: crondaemon | |
41f5c5ff | 26 | Requires: rc-scripts |
2746affb | 27 | Requires: systemd-units >= 38 |
ae943c3e AM |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
24e10cb4 | 31 | This package provides the sar and iostat commands for the Linux |
32 | operating system, similar to their traditional UNIX counterparts. They | |
33 | enable system monitoring of disk, network, and other IO activity. | |
ae943c3e | 34 | |
e769df85 JR |
35 | %description -l pl.UTF-8 |
36 | Pakiet ten udostępnia polecenia sar i iostat dla systemu Linux podobne | |
37 | w działaniu do tradycyjnych narzędzi systemu Unix. Polecenia te | |
38 | umożliwiają monitorowanie obciążenia zasobów dyskowych, interfejsów | |
39 | sieciowych i innych operacji wejścia/wyjścia. | |
24e10cb4 | 40 | |
e769df85 JR |
41 | %description -l ru.UTF-8 |
42 | Этот пакет содержит программы sar и iostat для Linux, похожие на | |
43 | традиционные одноименные программы UNIX. Они позволяют осуществлять | |
44 | мониторинг дисковой, сетевой и прочей активности системы. | |
24e10cb4 | 45 | |
e769df85 JR |
46 | %description -l uk.UTF-8 |
47 | Цей пакет містить програми sar та iostat для Linux, схожі на | |
48 | традиційні відповідні програми UNIX. Вони дозволяють здійснювати | |
49 | моніторинг дискової, мережевої та іншої активності системи. | |
ae943c3e | 50 | |
e769df85 | 51 | %description -l zh_CN.UTF-8 |
8487f232 | 52 | 本软件提供了用于Linux的系统监视工具, 可以监视磁盘, 网络以及 其他 IO 的活动情况. |
c9202779 | 53 | |
ae943c3e AM |
54 | %prep |
55 | %setup -q | |
56 | %patch0 -p1 | |
57 | ||
58 | %build | |
f14dd4de | 59 | %{__aclocal} |
60 | %{__autoconf} | |
2746affb JR |
61 | %configure \ |
62 | history=28 \ | |
63 | compressafter=31 \ | |
b9d80979 JR |
64 | cron_owner=root \ |
65 | cron_interval=10 \ | |
99db8c84 | 66 | sa_lib_dir=%{_libdir}/sa \ |
b9d80979 | 67 | --enable-install-cron \ |
2746affb JR |
68 | --disable-stripping \ |
69 | --with-systemdsystemunitdir=%{systemdunitdir} | |
ae943c3e | 70 | |
2746affb JR |
71 | %{__sed} -i 's/SADC_OPTIONS=""/SADC_OPTIONS="-L"/' sysstat.sysconfig |
72 | ||
73 | %{__make} -j1 \ | |
6a0a6121 | 74 | CC="%{__cc}" \ |
4428587d | 75 | CFLAGS="%{rpmcflags}" |
ae943c3e AM |
76 | |
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
2746affb JR |
79 | install -d $RPM_BUILD_ROOT{/etc/{cron.d,rc.d/init.d,sysconfig},/var/log/sa,%{systemdunitdir}} |
80 | ||
81 | %{__make} install \ | |
b9d80979 JR |
82 | CHOWN=/bin/true \ |
83 | SYSTEMCTL=/bin/true \ | |
84 | SYSTEMD_UNIT_DIR=$RPM_BUILD_ROOT%{systemdunitdir} \ | |
2746affb | 85 | DESTDIR=$RPM_BUILD_ROOT |
ae943c3e | 86 | |
2746affb | 87 | install -p sysstat.service $RPM_BUILD_ROOT%{systemdunitdir} |
c01e3dd5 | 88 | |
03ec5a9f | 89 | %{__sed} -e 's|/usr/lib/sa|%{_libdir}/sa|g' %{SOURCE2} >$RPM_BUILD_ROOT/etc/rc.d/init.d/sysstat |
2746affb JR |
90 | |
91 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir} | |
ae943c3e | 92 | |
ae943c3e AM |
93 | %find_lang %{name} |
94 | ||
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
da6f1e31 | 98 | %post |
bfead14d | 99 | /sbin/chkconfig --add sysstat |
41f5c5ff | 100 | %service sysstat restart |
2746affb | 101 | %systemd_post sysstat.service |
da6f1e31 JB |
102 | |
103 | %preun | |
104 | if [ "$1" = "0" ]; then | |
41f5c5ff | 105 | %service sysstat stop |
da6f1e31 JB |
106 | /sbin/chkconfig --del sysstat |
107 | fi | |
2746affb JR |
108 | %systemd_preun sysstat.service |
109 | ||
110 | %postun | |
111 | %systemd_reload | |
112 | ||
113 | %triggerpostun -- %{name} < 10.1.6-1 | |
114 | %systemd_trigger sysstat.service | |
da6f1e31 | 115 | |
ae943c3e AM |
116 | %files -f %{name}.lang |
117 | %defattr(644,root,root,755) | |
2746affb | 118 | %doc CHANGES CREDITS README FAQ |
e16590db JB |
119 | %attr(755,root,root) %{_bindir}/cifsiostat |
120 | %attr(755,root,root) %{_bindir}/iostat | |
121 | %attr(755,root,root) %{_bindir}/mpstat | |
122 | %attr(755,root,root) %{_bindir}/nfsiostat | |
123 | %attr(755,root,root) %{_bindir}/pidstat | |
124 | %attr(755,root,root) %{_bindir}/sadf | |
125 | %attr(755,root,root) %{_bindir}/sar | |
2746affb | 126 | %dir %{_libdir}/sa |
e16590db | 127 | %attr(755,root,root) %{_libdir}/sa/sa* |
aa77e4d0 | 128 | %attr(750,root,root) %dir /var/log/sa |
e16590db JB |
129 | %attr(754,root,root) /etc/rc.d/init.d/sysstat |
130 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/sysstat | |
131 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sysstat | |
132 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sysstat.ioconf | |
2746affb | 133 | %{systemdunitdir}/sysstat.service |
e16590db JB |
134 | %{_mandir}/man1/cifsiostat.1* |
135 | %{_mandir}/man1/iostat.1* | |
136 | %{_mandir}/man1/mpstat.1* | |
137 | %{_mandir}/man1/nfsiostat.1* | |
138 | %{_mandir}/man1/pidstat.1* | |
139 | %{_mandir}/man1/sadf.1* | |
140 | %{_mandir}/man1/sar.1* | |
141 | %{_mandir}/man5/sysstat.5* | |
142 | %{_mandir}/man8/sa1.8* | |
143 | %{_mandir}/man8/sa2.8* | |
144 | %{_mandir}/man8/sadc.8* |