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