libcgroup-vl.spec 8.2 KB

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