libcgroup-vl.spec 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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. Version: 0.37.1
  7. Release: 2%{?_dist_release}
  8. License: LGPLv2+
  9. Group: System Environment/Libraries
  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. * Sun Oct 12 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.37.1-2
  127. - moved libcgroup to System Environment/Libraries
  128. * Wed Mar 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.37.1-1
  129. - initial build for Vine Linux
  130. * Thu Mar 3 2011 Jan Safranek <jsafrane@redhat.com> 0.37.1-1
  131. - Update to 0.37.1
  132. * Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.37-3
  133. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  134. * Mon Jan 17 2011 Jan Safranek <jsafrane@redhat.com> 0.37-2
  135. - Create the 'cgred' group as system group, not as user
  136. - Fix cgclassify exit code
  137. * Mon Dec 13 2010 Jan Safranek <jsafrane@redhat.com> 0.37-1
  138. - Update to 0.37
  139. - use /sys/fs/cgroup as default directory to mount control groups (and rely on
  140. systemd mounting tmpfs there)
  141. * Fri Nov 12 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-3
  142. - Ignore systemd hierarchy - it's now invisible to libcgroup (#627378)
  143. * Mon Aug 2 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-2
  144. - Fix initscripts to report stopped cgconfig service as not running
  145. (#619091)
  146. * Tue Jun 22 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-1
  147. - Update to 0.36.2, fixing packaging the libraries (#605434)
  148. - Remove the dependency on redhat-lsb (#603578)
  149. * Fri May 21 2010 Jan Safranek <jsafrane@redhat.com> 0.36-1
  150. - Update to 0.36.1
  151. * Tue Mar 9 2010 Jan Safranek <jsafrane@redhat.com> 0.35-1
  152. - Update to 0.35.1
  153. - Separate pam module to its own subpackage
  154. * Mon Jan 18 2010 Jan Safranek <jsafrane@redhat.com> 0.34-4
  155. - Added README.Fedora to describe initscript integration
  156. * Mon Oct 19 2009 Jan Safranek <jsafrane@redhat.com> 0.34-3
  157. - Change the default configuration to mount everything to /cgroup
  158. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.34-2
  159. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  160. * Tue Jul 7 2009 Jan Safranek <jsafrane@redhat.com> 0.34-1
  161. - Update to 0.34
  162. * Mon Mar 09 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-3
  163. - Add a workaround for rt cgroup controller.
  164. * Mon Mar 09 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-2
  165. - Change the cgconfig script to start earlier
  166. - Move the binaries to /bin and /sbin
  167. * Mon Mar 02 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.33-1
  168. - Update to latest upstream
  169. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.32.2-4
  170. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  171. * Mon Jan 05 2009 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-3
  172. - Fix redhat-lsb dependency
  173. * Mon Dec 29 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-2
  174. - Fix build dependencies
  175. * Mon Dec 29 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.2-1
  176. - Update to latest upstream
  177. * Thu Oct 23 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32.1-1
  178. * Tue Feb 24 2009 Balbir Singh <balbir@linux.vnet.ibm.com> 0.33-1
  179. - Update to 0.33, spec file changes to add Makefiles and pam_cgroup module
  180. * Fri Oct 10 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.32-1
  181. - Update to latest upstream
  182. * Thu Sep 11 2008 Dhaval Giani <dhaval@linux-vnet.ibm.com> 0.31-1
  183. - Update to latest upstream
  184. * Sat Aug 2 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-3
  185. - Change release to fix broken upgrade path
  186. * Wed Jun 11 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.1c-1
  187. - Update to latest upstream version
  188. * Tue Jun 3 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-3
  189. - Add post and postun. Also fix Requires for devel to depend on base n-v-r
  190. * Sat May 31 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-2
  191. - Fix makeinstall, Source0 and URL (review comments from Tom)
  192. * Mon May 26 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1b-1
  193. - Add a generatable spec file
  194. * Tue May 20 2008 Balbir Singh <balbir@linux.vnet.ibm.com> 0.1-1
  195. - Get the spec file to work
  196. * Tue May 20 2008 Dhaval Giani <dhaval@linux.vnet.ibm.com> 0.01-1
  197. - The first version of libcg