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