]>
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 |
03ec5a9f | 11 | Release: 3 |
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 |
ae943c3e | 21 | BuildRequires: gettext-devel |
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 \ | |
66 | --enable-install-cron \ | |
2746affb JR |
67 | --disable-stripping \ |
68 | --with-systemdsystemunitdir=%{systemdunitdir} | |
ae943c3e | 69 | |
2746affb JR |
70 | %{__sed} -i 's/SADC_OPTIONS=""/SADC_OPTIONS="-L"/' sysstat.sysconfig |
71 | ||
72 | %{__make} -j1 \ | |
6a0a6121 | 73 | CC="%{__cc}" \ |
4428587d | 74 | CFLAGS="%{rpmcflags}" |
ae943c3e AM |
75 | |
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
2746affb JR |
78 | install -d $RPM_BUILD_ROOT{/etc/{cron.d,rc.d/init.d,sysconfig},/var/log/sa,%{systemdunitdir}} |
79 | ||
80 | %{__make} install \ | |
b9d80979 JR |
81 | CHOWN=/bin/true \ |
82 | SYSTEMCTL=/bin/true \ | |
83 | SYSTEMD_UNIT_DIR=$RPM_BUILD_ROOT%{systemdunitdir} \ | |
2746affb | 84 | DESTDIR=$RPM_BUILD_ROOT |
ae943c3e | 85 | |
2746affb | 86 | install -p sysstat.service $RPM_BUILD_ROOT%{systemdunitdir} |
c01e3dd5 | 87 | |
03ec5a9f | 88 | %{__sed} -e 's|/usr/lib/sa|%{_libdir}/sa|g' %{SOURCE2} >$RPM_BUILD_ROOT/etc/rc.d/init.d/sysstat |
2746affb JR |
89 | |
90 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir} | |
ae943c3e | 91 | |
ae943c3e AM |
92 | %find_lang %{name} |
93 | ||
94 | %clean | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
da6f1e31 | 97 | %post |
bfead14d | 98 | /sbin/chkconfig --add sysstat |
41f5c5ff | 99 | %service sysstat restart |
2746affb | 100 | %systemd_post sysstat.service |
da6f1e31 JB |
101 | |
102 | %preun | |
103 | if [ "$1" = "0" ]; then | |
41f5c5ff | 104 | %service sysstat stop |
da6f1e31 JB |
105 | /sbin/chkconfig --del sysstat |
106 | fi | |
2746affb JR |
107 | %systemd_preun sysstat.service |
108 | ||
109 | %postun | |
110 | %systemd_reload | |
111 | ||
112 | %triggerpostun -- %{name} < 10.1.6-1 | |
113 | %systemd_trigger sysstat.service | |
da6f1e31 | 114 | |
ae943c3e AM |
115 | %files -f %{name}.lang |
116 | %defattr(644,root,root,755) | |
2746affb | 117 | %doc CHANGES CREDITS README FAQ |
e16590db JB |
118 | %attr(755,root,root) %{_bindir}/cifsiostat |
119 | %attr(755,root,root) %{_bindir}/iostat | |
120 | %attr(755,root,root) %{_bindir}/mpstat | |
121 | %attr(755,root,root) %{_bindir}/nfsiostat | |
122 | %attr(755,root,root) %{_bindir}/pidstat | |
123 | %attr(755,root,root) %{_bindir}/sadf | |
124 | %attr(755,root,root) %{_bindir}/sar | |
2746affb | 125 | %dir %{_libdir}/sa |
e16590db | 126 | %attr(755,root,root) %{_libdir}/sa/sa* |
aa77e4d0 | 127 | %attr(750,root,root) %dir /var/log/sa |
e16590db JB |
128 | %attr(754,root,root) /etc/rc.d/init.d/sysstat |
129 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/sysstat | |
130 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sysstat | |
131 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sysstat.ioconf | |
2746affb | 132 | %{systemdunitdir}/sysstat.service |
e16590db JB |
133 | %{_mandir}/man1/cifsiostat.1* |
134 | %{_mandir}/man1/iostat.1* | |
135 | %{_mandir}/man1/mpstat.1* | |
136 | %{_mandir}/man1/nfsiostat.1* | |
137 | %{_mandir}/man1/pidstat.1* | |
138 | %{_mandir}/man1/sadf.1* | |
139 | %{_mandir}/man1/sar.1* | |
140 | %{_mandir}/man5/sysstat.5* | |
141 | %{_mandir}/man8/sa1.8* | |
142 | %{_mandir}/man8/sa2.8* | |
143 | %{_mandir}/man8/sadc.8* |