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