source: projects/specs/branches/6/lib/libc/libcgroup/libcgroup-vl.spec @ 3076

Revision 3076, 8.2 KB checked in by daisuke, 13 years ago (diff)

libcgroup: new package

Line 
1%define soversion 1.0.37
2%define soversion_major 1
3
4Name: libcgroup
5Summary: Tools and libraries to control and monitor control groups
6Summary(ja): CGROUPS を管理・監視するためのツールおよびライブラリ
7Group: Development/Libraries
8Version: 0.37.1
9Release: 1%{?_dist_release}
10License: LGPLv2+
11URL: http://libcg.sourceforge.net/
12Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
13Patch1: fedora-config.patch
14Patch2: fedora-fix-initscripts.patch
15BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
16BuildRequires: pam-devel
17BuildRequires: byacc
18BuildRequires: flex
19BuildRequires: coreutils
20Requires(pre): shadow-utils
21Requires(post): chkconfig, /sbin/service
22Requires(preun): /sbin/chkconfig
23
24%description
25Control groups infrastructure. The tools and library help manipulate, control,
26administrate and monitor control groups and the associated controllers.
27
28%package pam
29Summary: A Pluggable Authentication Module for libcgroup
30Summary(ja): libcgroup の PAM モジュール
31Group: System Environment/Base
32Requires: libcgroup = %{version}-%{release}
33
34%description pam
35Linux-PAM module, which allows administrators to classify the user's login
36processes to pre-configured control group.
37
38%package devel
39Summary: Development files for libcgroup
40Summary(ja): libcgroup の開発用ファイル
41Group: Development/Libraries
42Requires: libcgroup = %{version}-%{release}
43
44%description devel
45It provides API to create/delete and modify cgroup nodes. It will also in the
46future allow creation of persistent configuration for control groups and
47provide scripts to manage that configuration.
48
49%prep
50%setup -q
51%patch1 -p1 -b .config
52%patch2 -p1 -b .lsb
53
54%build
55%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security
56
57make %{?_smp_mflags}
58
59
60%install
61rm -rf $RPM_BUILD_ROOT
62make DESTDIR=$RPM_BUILD_ROOT install
63
64# install config files
65mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
66cp samples/cgred.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgred.conf
67cp samples/cgconfig.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgconfig
68cp samples/cgconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf
69cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf
70cp samples/cgsnapshot_blacklist.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgsnapshot_blacklist.conf
71
72# sanitize pam module, we need only pam_cgroup.so
73mv -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*.*.* $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so
74rm -f $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.la $RPM_BUILD_ROOT/%{_lib}/security/pam_cgroup.so.*
75
76# move the libraries  to /
77mkdir -p $RPM_BUILD_ROOT/%{_lib}
78mv -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}
79rm -f $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so.%{soversion_major}
80ln -sf libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_lib}/libcgroup.so.%{soversion_major}
81ln -sf ../../%{_lib}/libcgroup.so.%{soversion} $RPM_BUILD_ROOT/%{_libdir}/libcgroup.so
82rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
83
84# pre-create /cgroup directory
85mkdir $RPM_BUILD_ROOT/cgroup
86
87%clean
88rm -rf $RPM_BUILD_ROOT
89
90%pre
91getent group cgred >/dev/null || groupadd -r cgred
92
93%post
94/sbin/ldconfig
95/sbin/chkconfig --add cgred
96/sbin/chkconfig --add cgconfig
97
98%preun
99if [ $1 = 0 ]; then
100    /sbin/service cgred stop > /dev/null 2>&1 || :
101    /sbin/service cgconfig stop > /dev/null 2>&1 || :
102    /sbin/chkconfig --del cgconfig
103    /sbin/chkconfig --del cgred
104fi
105
106%postun -p /sbin/ldconfig
107
108%files
109%defattr(-,root,root,-)
110%config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf
111%config(noreplace) %{_sysconfdir}/sysconfig/cgconfig
112%config(noreplace) %{_sysconfdir}/cgconfig.conf
113%config(noreplace) %{_sysconfdir}/cgrules.conf
114%config(noreplace) %{_sysconfdir}/cgsnapshot_blacklist.conf
115/%{_lib}/libcgroup.so.*
116%attr(2755, root, cgred) /bin/cgexec
117/bin/cgclassify
118/bin/cgcreate
119/bin/cgget
120/bin/cgset
121/bin/cgdelete
122/bin/lscgroup
123/bin/lssubsys
124/sbin/cgconfigparser
125/sbin/cgrulesengd
126/sbin/cgclear
127/bin/cgsnapshot
128%attr(0644, root, root) %{_mandir}/man1/*
129%attr(0644, root, root) %{_mandir}/man5/*
130%attr(0644, root, root) %{_mandir}/man8/*
131%attr(0755,root,root) %{_initrddir}/cgconfig
132%attr(0755,root,root) %{_initrddir}/cgred
133%doc COPYING INSTALL README_daemon
134%attr(0755,root,root) %dir /cgroup
135
136%files pam
137%defattr(-,root,root,-)
138%attr(0755,root,root) /%{_lib}/security/pam_cgroup.so
139%doc COPYING INSTALL
140
141%files devel
142%defattr(-,root,root,-)
143%{_includedir}/libcgroup.h
144%{_includedir}/libcgroup/*.h
145%{_libdir}/libcgroup.*
146/%{_libdir}/pkgconfig/libcgroup.pc
147%doc COPYING INSTALL
148
149%changelog
150* Wed Mar 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.37.1-1
151- initial build for Vine Linux
152
153* Thu Mar  3 2011 Jan Safranek <jsafrane@redhat.com> 0.37.1-1
154- Update to 0.37.1
155
156* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-3
157- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
158
159* Mon Jan 17 2011 Jan Safranek <jsafrane@redhat.com> 0.37-2
160- Create the 'cgred' group as system group, not as user
161- Fix cgclassify exit code
162
163* Mon Dec 13 2010 Jan Safranek <jsafrane@redhat.com> 0.37-1
164- Update to 0.37
165- use /sys/fs/cgroup as default directory to mount control groups (and rely on
166  systemd mounting tmpfs there)
167
168* Fri Nov 12 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-3
169- Ignore systemd hierarchy - it's now invisible to libcgroup (#627378)
170
171* Mon Aug  2 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-2
172- Fix initscripts to report stopped cgconfig service as not running
173  (#619091)
174
175* Tue Jun 22 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-1
176- Update to 0.36.2, fixing packaging the libraries (#605434)
177- Remove the dependency on redhat-lsb (#603578)
178
179* Fri May 21 2010 Jan Safranek <jsafrane@redhat.com> 0.36-1
180- Update to 0.36.1
181
182* Tue Mar  9 2010 Jan Safranek <jsafrane@redhat.com> 0.35-1
183- Update to 0.35.1
184- Separate pam module to its own subpackage
185
186* Mon Jan 18 2010 Jan Safranek <jsafrane@redhat.com> 0.34-4
187- Added README.Fedora to describe initscript integration
188
189* Mon Oct 19 2009 Jan Safranek <jsafrane@redhat.com> 0.34-3
190- Change the default configuration to mount everything to /cgroup
191
192* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.34-2
193- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
194
195* Tue Jul  7 2009 Jan Safranek <jsafrane@redhat.com> 0.34-1
196- Update to 0.34
197* Mon Mar 09 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-3
198- Add a workaround for rt cgroup controller.
199* Mon Mar 09 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-2
200- Change the cgconfig script to start earlier
201- Move the binaries to /bin and /sbin
202* Mon Mar 02 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-1
203- Update to latest upstream
204* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.32.2-4
205- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
206
207* Mon Jan 05 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-3
208- Fix redhat-lsb dependency
209* Mon Dec 29 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-2
210- Fix build dependencies
211* Mon Dec 29 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-1
212- Update to latest upstream
213* Thu Oct 23 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.1-1
214* Tue Feb 24 2009 Balbir Singh <balbir@linux.vnet.ibm.com> 0.33-1
215- Update to 0.33, spec file changes to add Makefiles and pam_cgroup module
216* Fri Oct 10 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32-1
217- Update to latest upstream
218* Thu Sep 11 2008 Dhaval Giani <dhaval@linux-vnet.ibm.com> 0.31-1
219- Update to latest upstream
220* Sat Aug 2 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-3
221- Change release to fix broken upgrade path
222* Wed Jun 11 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-1
223- Update to latest upstream version
224* Tue Jun 3 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-3
225- Add post and postun. Also fix Requires for devel to depend on base n-v-r
226* Sat May 31 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-2
227- Fix makeinstall, Source0 and URL (review comments from Tom)
228* Mon May 26 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-1
229- Add a generatable spec file
230* Tue May 20 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1-1
231- Get the spec file to work
232* Tue May 20 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.01-1
233- The first version of libcg
Note: See TracBrowser for help on using the repository browser.