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