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