]>
Commit | Line | Data |
---|---|---|
3d200c45 JB |
1 | Summary: Tools and library to control and monitor control groups |
2 | Summary(pl.UTF-8): Narzędzia i biblioteka do kontrolowania i monitorowania grup kontroli | |
ada0366c | 3 | Name: libcgroup |
193da7bd | 4 | Version: 0.37.1 |
82d2168f | 5 | Release: 4 |
b9cd8aa6 | 6 | License: LGPL v2+ |
f6ad0e0b | 7 | Group: Libraries |
a89c8411 | 8 | Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2 |
193da7bd | 9 | # Source0-md5: 24a41b18de112e8d085bb1f7d9e82af7 |
49919ec9 JR |
10 | Source1: cgconfig.init |
11 | Source2: cgred.init | |
a2a104fd | 12 | Patch0: %{name}-pam.patch |
643b509a | 13 | Patch1: %{name}-group-write.patch |
077903da | 14 | Patch2: %{name}-conf.patch |
25379cc3 AM |
15 | Patch3: libcgroup-0.36.2-systemd.patch |
16 | Patch4: libcgroup-0.37.1-systemd.patch | |
ada0366c | 17 | URL: http://libcg.sourceforge.net/ |
e8db3431 | 18 | BuildRequires: autoconf |
19 | BuildRequires: automake | |
afdac001 | 20 | BuildRequires: bison |
ada0366c | 21 | BuildRequires: flex |
afdac001 | 22 | BuildRequires: libstdc++-devel |
e8db3431 | 23 | BuildRequires: libtool |
ada0366c | 24 | BuildRequires: pam-devel |
b9cd8aa6 | 25 | Requires(post): /sbin/ldconfig |
7e9e387f | 26 | Requires(post,preun): /sbin/chkconfig |
077903da JR |
27 | Requires(postun): /usr/sbin/groupdel |
28 | Requires(pre): /usr/bin/getgid | |
29 | Requires(pre): /usr/sbin/groupadd | |
7e9e387f | 30 | Requires: procps |
b9cd8aa6 | 31 | Requires: rc-scripts |
077903da | 32 | Provides: group(cgred) |
ada0366c | 33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23fdf35f | 34 | |
f6ad0e0b | 35 | %define _exec_prefix %{nil} |
0779ceb5 | 36 | %define _libdir %{_prefix}/%{_lib} |
080074c8 | 37 | |
23fdf35f | 38 | %description |
ada0366c PG |
39 | Control groups infrastructure. The tools and library help manipulate, |
40 | control, administrate and monitor control groups and the associated | |
41 | controllers. | |
23fdf35f | 42 | |
3d200c45 JB |
43 | %description -l pl.UTF-8 |
44 | Ten pakiet stanowi infrastrukturę grup kontroli (cgroups). Narzędzia i | |
e8db3431 | 45 | biblioteka pomagają modyfikować, sterować, administrować i modyfikować |
46 | grupy kontroli i powiązane z nimi kontrolery. | |
3d200c45 | 47 | |
23fdf35f | 48 | %package devel |
3d200c45 JB |
49 | Summary: Header files for cgroup library |
50 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cgroup | |
ada0366c | 51 | Group: Development/Libraries |
b9cd8aa6 | 52 | Requires: %{name} = %{version}-%{release} |
23fdf35f PG |
53 | |
54 | %description devel | |
ada0366c PG |
55 | It provides API to create/delete and modify cgroup nodes. It will also |
56 | in the future allow creation of persistent configuration for control | |
57 | groups and provide scripts to manage that configuration. | |
23fdf35f | 58 | |
3d200c45 JB |
59 | %description devel -l pl.UTF-8 |
60 | Ten pakiet udostępnia API do tworzenia, usuwania i modyfikowania | |
61 | węzłów cgroup. W przyszłości pozwoli także na tworzenie trwałej | |
62 | konfiguracji grup kontroli i udostępni skrypty do zarządzania taką | |
63 | konfiguracją. | |
64 | ||
c2b28c24 ER |
65 | %package -n pam-pam_cgroup |
66 | Summary: PAM module for libcgroup | |
3d200c45 | 67 | Summary(pl.UTF-8): Moduł PAM dla libcgroup |
ea035f2c BZ |
68 | Group: Libraries |
69 | Requires: %{name} = %{version}-%{release} | |
c2b28c24 | 70 | Obsoletes: libcgroup-pam |
ea035f2c | 71 | |
c2b28c24 ER |
72 | %description -n pam-pam_cgroup |
73 | PAM module for libcgroup. | |
ea035f2c | 74 | |
3d200c45 JB |
75 | %description -n pam-pam_cgroup -l pl.UTF-8 |
76 | Moduł PAM dla libcgroup. | |
77 | ||
23fdf35f PG |
78 | %prep |
79 | %setup -q | |
a2a104fd | 80 | %patch0 -p1 |
643b509a | 81 | %patch1 -p1 |
077903da | 82 | %patch2 -p1 |
25379cc3 AM |
83 | %patch3 -p1 |
84 | %patch4 -p1 | |
23fdf35f PG |
85 | |
86 | %build | |
e8db3431 | 87 | %{__libtoolize} |
88 | %{__aclocal} | |
89 | %{__autoconf} | |
90 | %{__automake} | |
0779ceb5 | 91 | %configure \ |
f6ad0e0b | 92 | --disable-silent-rules \ |
0779ceb5 TP |
93 | --enable-initscript-install \ |
94 | --enable-pam-module-dir=/%{_lib}/security | |
95 | ||
ada0366c | 96 | %{__make} |
23fdf35f PG |
97 | |
98 | %install | |
99 | rm -rf $RPM_BUILD_ROOT | |
0779ceb5 TP |
100 | install -d $RPM_BUILD_ROOT/etc/sysconfig |
101 | ||
ada0366c PG |
102 | %{__make} install \ |
103 | DESTDIR=$RPM_BUILD_ROOT | |
23fdf35f | 104 | |
49919ec9 JR |
105 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/cgconfig |
106 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cgred | |
107 | ||
0779ceb5 TP |
108 | cp -a samples/cgred.conf $RPM_BUILD_ROOT/etc/sysconfig/cgred.conf |
109 | cp -a samples/cgconfig.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/cgconfig | |
110 | cp -a samples/cg{config,rules,snapshot_blacklist}.conf $RPM_BUILD_ROOT%{_sysconfdir} | |
23fdf35f | 111 | |
080074c8 | 112 | mv $RPM_BUILD_ROOT%{_libdir}/libcgroup.so.* $RPM_BUILD_ROOT/%{_lib} |
b9cd8aa6 | 113 | ln -snf ../../%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcgroup.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libcgroup.so |
23fdf35f | 114 | |
a2a104fd JB |
115 | %{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.la |
116 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
0779ceb5 | 117 | |
23fdf35f PG |
118 | %clean |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
077903da JR |
121 | %pre |
122 | %groupadd -g 261 -r -f cgred | |
0779ceb5 | 123 | |
ada0366c | 124 | %post |
23fdf35f PG |
125 | /sbin/ldconfig |
126 | /sbin/chkconfig --add cgred | |
127 | /sbin/chkconfig --add cgconfig | |
4592fecd JR |
128 | if [ ! -f /var/lock/subsys/cgconfig ]; then |
129 | echo 'Run "/sbin/service cgconfig start" to setup cgroup rules.' | |
130 | fi | |
131 | if [ ! -f /var/lock/subsys/cgred ]; then | |
132 | echo 'Run "/sbin/service cgred start" to start control group rules daemon.' | |
133 | fi | |
23fdf35f PG |
134 | |
135 | %preun | |
136 | if [ $1 = 0 ]; then | |
b9cd8aa6 ER |
137 | %service cgred stop |
138 | %service cgconfig stop | |
139 | /sbin/chkconfig --del cgconfig | |
140 | /sbin/chkconfig --del cgred | |
23fdf35f PG |
141 | fi |
142 | ||
077903da JR |
143 | %postun |
144 | /sbin/ldconfig | |
145 | if [ "$1" = "0" ]; then | |
146 | %groupremove cgred | |
147 | fi | |
23fdf35f | 148 | |
ada0366c PG |
149 | %files |
150 | %defattr(644,root,root,755) | |
0779ceb5 | 151 | %doc README README_daemon |
077903da JR |
152 | %attr(754,root,root) /etc/rc.d/init.d/cgconfig |
153 | %attr(754,root,root) /etc/rc.d/init.d/cgred | |
154 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cgconfig | |
155 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cgred.conf | |
0779ceb5 | 156 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cg*.conf |
b9cd8aa6 | 157 | %attr(755,root,root) /%{_lib}/libcgroup.so.*.*.* |
eabb9c00 | 158 | %attr(755,root,root) %ghost /%{_lib}/libcgroup.so.1 |
077903da JR |
159 | %attr(755,root,root) /bin/cgclassify |
160 | %attr(755,root,root) /bin/cgcreate | |
161 | %attr(755,root,root) /bin/cgdelete | |
731bb598 | 162 | %attr(755,root,root) /bin/cgexec |
077903da JR |
163 | %attr(755,root,root) /bin/cgget |
164 | %attr(755,root,root) /bin/cgset | |
165 | %attr(755,root,root) /bin/cgsnapshot | |
166 | %attr(755,root,root) /bin/lscgroup | |
167 | %attr(755,root,root) /bin/lssubsys | |
168 | %attr(755,root,root) /sbin/cgclear | |
169 | %attr(755,root,root) /sbin/cgconfigparser | |
170 | %attr(755,root,root) /sbin/cgrulesengd | |
0779ceb5 TP |
171 | %{_mandir}/man1/ls*.1* |
172 | %{_mandir}/man1/cg*.1* | |
173 | %{_mandir}/man5/cg*.5* | |
174 | %{_mandir}/man8/cg*.8* | |
23fdf35f | 175 | |
c2b28c24 | 176 | %files -n pam-pam_cgroup |
ea035f2c BZ |
177 | %defattr(644,root,root,755) |
178 | %attr(755,root,root) /%{_lib}/security/pam_cgroup.so | |
179 | ||
23fdf35f | 180 | %files devel |
ada0366c | 181 | %defattr(644,root,root,755) |
a89c8411 | 182 | %attr(755,root,root) %{_libdir}/libcgroup.so |
a89c8411 | 183 | %{_includedir}/libcgroup |
0779ceb5 | 184 | %{_includedir}/libcgroup.h |
a89c8411 | 185 | %{_pkgconfigdir}/libcgroup.pc |