libcgroup-vl.spec 9.4 KB

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