[11165] | 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 | |
---|
| 23 | Name: cgmanager |
---|
| 24 | Version: 0.41 |
---|
| 25 | Release: 1%{?_dist_release} |
---|
| 26 | URL: http://cgmanager.linuxcontainers.org |
---|
| 27 | Source: http://cgmanager.linuxcontainers.org/downloads/%{name}-%{version}.tar.gz |
---|
| 28 | Summary: Linux cgroup manager |
---|
| 29 | Group: Applications/System |
---|
| 30 | License: LGPLv2+ |
---|
| 31 | BuildRoot: %{_tmppath}/%{name}-%{version}-build |
---|
| 32 | Requires: dbus libnih |
---|
| 33 | BuildRequires: libnih-devel dbus-devel pam-devel help2man |
---|
| 34 | |
---|
| 35 | %description |
---|
| 36 | CGManager is a central privileged daemon that manages all your cgroups for |
---|
| 37 | you through a simple DBus API. It's designed to work with nested LXC |
---|
| 38 | containers as well as accepting unprivileged requests including resolving |
---|
| 39 | user namespaces UIDs/GIDs. |
---|
| 40 | |
---|
| 41 | %package libs |
---|
| 42 | Summary: Shared library files for %{name} |
---|
| 43 | Group: System Environment/Libraries |
---|
| 44 | %description libs |
---|
| 45 | The %{name}-libs package contains libraries for running %{name} applications. |
---|
| 46 | |
---|
| 47 | %package devel |
---|
| 48 | Summary: Development library for %{name} |
---|
| 49 | Group: Development/Libraries |
---|
| 50 | Requires: %{name} = %{version}-%{release}, pkgconfig |
---|
| 51 | %description devel |
---|
| 52 | The %{name}-devel package contains header files and library needed for |
---|
| 53 | development with %{name}. |
---|
| 54 | |
---|
| 55 | %prep |
---|
| 56 | %setup -q -n %{name}-%{version} |
---|
| 57 | |
---|
| 58 | %build |
---|
| 59 | %configure --with-init-script=upstart |
---|
| 60 | |
---|
| 61 | make %{?_smp_mflags} |
---|
| 62 | |
---|
| 63 | perl -pi -e 's|/sbin/cgmanager|/usr/sbin/cgmanager|' config/init/upstart/cgmanager.conf |
---|
| 64 | perl -pi -e 's|^start on.*$|start on runlevel [345]|' config/init/upstart/cgmanager.conf |
---|
| 65 | |
---|
| 66 | perl -pi -e 's|/sbin/cgproxy|/usr/sbin/cgproxy|' config/init/upstart/cgproxy.conf |
---|
| 67 | |
---|
| 68 | %install |
---|
| 69 | rm -rf %{buildroot} |
---|
| 70 | make install DESTDIR=%{buildroot} |
---|
| 71 | find %{buildroot} -type f -name '*.la' -exec rm -f {} ';' |
---|
| 72 | |
---|
| 73 | rm -f %{buildroot}/%{_libdir}/*.a |
---|
| 74 | |
---|
| 75 | #mkdir -p %{buildroot}/%{_sysconfdir}/init |
---|
| 76 | #mkdir -p %{buildroot}/%{_datadir}/upstart/sessions |
---|
| 77 | |
---|
| 78 | #install -m 644 config/init/upstart/cgmanager.conf %{buildroot}/%{_sysconfdir}/init/cgmanager.conf |
---|
| 79 | #install -m 644 config/init/upstart/cgproxy.conf %{buildroot}/%{_sysconfdir}/init/cgproxy.conf |
---|
| 80 | #install -m 644 config/init/upstart/sessions/cgmanager.conf %{buildroot}/%{_datadir}/upstart/sessions/cgmanager.conf |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | %check |
---|
| 84 | make check |
---|
| 85 | |
---|
| 86 | %clean |
---|
| 87 | rm -rf %{buildroot} |
---|
| 88 | |
---|
| 89 | %preun |
---|
| 90 | if [ $1 -eq 0 ]; then |
---|
| 91 | /sbin/stop cgproxy >/dev/null 2>&1 ||: |
---|
| 92 | /sbin/stop cgmanager >/dev/null 2>&1 ||: |
---|
| 93 | else |
---|
| 94 | /sbin/restart cgproxy >/dev/null 2>&1 ||: |
---|
| 95 | /sbin/restart cgmanager >/dev/null 2>&1 ||: |
---|
| 96 | fi |
---|
| 97 | |
---|
| 98 | %post libs -p /sbin/ldconfig |
---|
| 99 | %postun libs -p /sbin/ldconfig |
---|
| 100 | |
---|
| 101 | %files |
---|
| 102 | %defattr(-,root,root) |
---|
| 103 | %doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO |
---|
| 104 | %config(noreplace) %{_sysconfdir}/init/*.conf |
---|
| 105 | %config(noreplace) %{_datadir}/upstart/sessions/*.conf |
---|
| 106 | %{_mandir}/man1/cgm.1* |
---|
| 107 | %{_bindir}/* |
---|
| 108 | %{_sbindir}/* |
---|
| 109 | %{_libexecdir}/%{name} |
---|
| 110 | /%{_lib}/security/pam_cgm.so |
---|
| 111 | %{_mandir}/man8/* |
---|
| 112 | %{_datadir}/%{name} |
---|
| 113 | |
---|
| 114 | %files libs |
---|
| 115 | %defattr(-,root,root) |
---|
| 116 | %{_libdir}/*.so.* |
---|
| 117 | |
---|
| 118 | %files devel |
---|
| 119 | %defattr(-,root,root) |
---|
| 120 | %{_includedir}/%{name}/* |
---|
| 121 | %{_libdir}/*.so |
---|
| 122 | %{_libdir}/pkgconfig/* |
---|
| 123 | |
---|
| 124 | %changelog |
---|
| 125 | * Mon Sep 04 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.41-1 |
---|
| 126 | - initial build for Vine Linux. |
---|
| 127 | |
---|
| 128 | * Mon Mar 24 2014 Dwight Engen <dwight.engen@oracle.com> - 0.23 |
---|
| 129 | remove libnih-dbus Requires since there is no such package, libnih is sufficient |
---|
| 130 | |
---|
| 131 | * Mon Mar 24 2014 Dwight Engen <dwight.engen@oracle.com> - 0.22 |
---|
| 132 | add cgm script |
---|
| 133 | |
---|
| 134 | * Tue Feb 04 2014 Dwight Engen <dwight.engen@oracle.com> - 0.19 |
---|
| 135 | - created |
---|