source: projects/specs/trunk/lib/libc/libcgroup/libcgroup-vl.spec @ 9006

Revision 9006, 8.3 KB checked in by inagaki, 10 years ago (diff)

2014-10-12 Ryoichi INAGAKI <ryo1@…>

  • libcgroup, libwebp, libyaml: fixed Group
  • syslinux: updated


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