cgmanager-vl.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. #
  2. # cgmanager: cgroup manager daemon
  3. #
  4. # Copyright (C) 2013 Oracle
  5. #
  6. # Authors:
  7. # Dwight Engen <dwight.engen@oracle.com>
  8. #
  9. # This library is free software; you can redistribute it and/or
  10. # modify it under the terms of the GNU Lesser General Public
  11. # License as published by the Free Software Foundation; either
  12. # version 2.1 of the License, or (at your option) any later version.
  13. #
  14. # This library is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. # Lesser General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU Lesser General Public
  20. # License along with this library; if not, write to the Free Software
  21. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. Name: cgmanager
  23. Version: 0.41
  24. Release: 1%{?_dist_release}
  25. URL: http://cgmanager.linuxcontainers.org
  26. Source: http://cgmanager.linuxcontainers.org/downloads/%{name}-%{version}.tar.gz
  27. Summary: Linux cgroup manager
  28. Group: Applications/System
  29. License: LGPLv2+
  30. BuildRoot: %{_tmppath}/%{name}-%{version}-build
  31. Requires: dbus libnih
  32. BuildRequires: libnih-devel dbus-devel pam-devel help2man
  33. %description
  34. CGManager is a central privileged daemon that manages all your cgroups for
  35. you through a simple DBus API. It's designed to work with nested LXC
  36. containers as well as accepting unprivileged requests including resolving
  37. user namespaces UIDs/GIDs.
  38. %package libs
  39. Summary: Shared library files for %{name}
  40. Group: System Environment/Libraries
  41. %description libs
  42. The %{name}-libs package contains libraries for running %{name} applications.
  43. %package devel
  44. Summary: Development library for %{name}
  45. Group: Development/Libraries
  46. Requires: %{name} = %{version}-%{release}, pkgconfig
  47. %description devel
  48. The %{name}-devel package contains header files and library needed for
  49. development with %{name}.
  50. %prep
  51. %setup -q -n %{name}-%{version}
  52. %build
  53. %configure --with-init-script=upstart
  54. make %{?_smp_mflags}
  55. perl -pi -e 's|/sbin/cgmanager|/usr/sbin/cgmanager|' config/init/upstart/cgmanager.conf
  56. perl -pi -e 's|^start on.*$|start on runlevel [345]|' config/init/upstart/cgmanager.conf
  57. perl -pi -e 's|/sbin/cgproxy|/usr/sbin/cgproxy|' config/init/upstart/cgproxy.conf
  58. %install
  59. rm -rf %{buildroot}
  60. make install DESTDIR=%{buildroot}
  61. find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
  62. rm -f %{buildroot}/%{_libdir}/*.a
  63. #mkdir -p %{buildroot}/%{_sysconfdir}/init
  64. #mkdir -p %{buildroot}/%{_datadir}/upstart/sessions
  65. #install -m 644 config/init/upstart/cgmanager.conf %{buildroot}/%{_sysconfdir}/init/cgmanager.conf
  66. #install -m 644 config/init/upstart/cgproxy.conf %{buildroot}/%{_sysconfdir}/init/cgproxy.conf
  67. #install -m 644 config/init/upstart/sessions/cgmanager.conf %{buildroot}/%{_datadir}/upstart/sessions/cgmanager.conf
  68. %check
  69. make check
  70. %clean
  71. rm -rf %{buildroot}
  72. %preun
  73. if [ $1 -eq 0 ]; then
  74. /sbin/stop cgproxy >/dev/null 2>&1 ||:
  75. /sbin/stop cgmanager >/dev/null 2>&1 ||:
  76. else
  77. /sbin/restart cgproxy >/dev/null 2>&1 ||:
  78. /sbin/restart cgmanager >/dev/null 2>&1 ||:
  79. fi
  80. %post libs -p /sbin/ldconfig
  81. %postun libs -p /sbin/ldconfig
  82. %files
  83. %defattr(-,root,root)
  84. %doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO
  85. %config(noreplace) %{_sysconfdir}/init/*.conf
  86. %config(noreplace) %{_datadir}/upstart/sessions/*.conf
  87. %{_mandir}/man1/cgm.1*
  88. %{_bindir}/*
  89. %{_sbindir}/*
  90. %{_libexecdir}/%{name}
  91. /%{_lib}/security/pam_cgm.so
  92. %{_mandir}/man8/*
  93. %{_datadir}/%{name}
  94. %files libs
  95. %defattr(-,root,root)
  96. %{_libdir}/*.so.*
  97. %files devel
  98. %defattr(-,root,root)
  99. %{_includedir}/%{name}/*
  100. %{_libdir}/*.so
  101. %{_libdir}/pkgconfig/*
  102. %changelog
  103. * Mon Sep 04 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.41-1
  104. - initial build for Vine Linux.
  105. * Mon Mar 24 2014 Dwight Engen <dwight.engen@oracle.com> - 0.23
  106. remove libnih-dbus Requires since there is no such package, libnih is sufficient
  107. * Mon Mar 24 2014 Dwight Engen <dwight.engen@oracle.com> - 0.22
  108. add cgm script
  109. * Tue Feb 04 2014 Dwight Engen <dwight.engen@oracle.com> - 0.19
  110. - created