libcgroup-vl.spec 9.1 KB

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