From: Dietmar Maurer Date: Mon, 6 Apr 2015 06:45:27 +0000 (+0200) Subject: initial commit X-Git-Url: https://git.proxmox.com/?p=cgmanager.git;a=commitdiff_plain;h=e8b26e6cf39419ab1100871b72feb80cbdce257f initial commit --- e8b26e6cf39419ab1100871b72feb80cbdce257f diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b95293c --- /dev/null +++ b/Makefile @@ -0,0 +1,60 @@ +RELEASE=4.0 + +# simple backport from debian sid + +PACKAGE=cgmanager +PKGVER=0.36 +DEBREL=pve1 + +# also update changelog + +PKGSRC=${PACKAGE}.tgz +PKGDIR=${PACKAGE} + +ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) +GITVERSION:=$(shell cat .git/refs/heads/master) +SOURCETXT="git clone git://git.proxmox.com/git/pve/cgmanager.git\\ngit checkout ${GITVERSION}" + +DEBS= \ +lib${PACKAGE}-dev_${PKGVER}-${DEBREL}_${ARCH}.deb \ +lib${PACKAGE}0_${PKGVER}-${DEBREL}_${ARCH}.deb \ +${PACKAGE}_${PKGVER}-${DEBREL}_${ARCH}.deb + +all: ${DEBS} + +.PHONY: dinstall +dinstall: ${DEBS} + dpkg -i ${DEBS} + +.PHONY: deb +deb ${DEBS}: ${PKGSRC} + rm -rf ${PKGDIR} + tar xf ${PKGSRC} + cp -a debian ${PKGDIR}/debian + echo "${SOURCETXT}" > ${PKGDIR}/debian/SOURCE + echo "debian/SOURCE" >>${PKGDIR}/debian/docs + cd ${PKGDIR}; dpkg-buildpackage -b -uc -us + lintian ${DEBS} + +.PHONY: download +download ${PKGSRC}: + rm -rf ${PKGDIR} ${PKGSRC} + git clone git://github.com/lxc/cgmanager + tar czf ${PKGSRC}.tmp ${PKGDIR} + mv ${PKGSRC}.tmp ${PKGSRC} + +.PHONY: upload +upload: ${DEBS} + umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw + mkdir -p /pve/${RELEASE}/extra + rm -rf /pve/${RELEASE}/extra/lib${PACKAGE}-dev_*.deb + rm -rf /pve/${RELEASE}/extra/lib${PACKAGE}0_*.deb + rm -rf /pve/${RELEASE}/extra/${PACKAGE}_*.deb + rm -rf /pve/${RELEASE}/extra/Packages* + cp ${DEBS} /pve/${RELEASE}/extra + cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz + umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro + +.PHONY: clean +clean: + rm -rf *~ *_${ARCH}.deb *_all.deb *_${ARCH}.udeb *.changes *.dsc ${PKGDIR} diff --git a/README b/README new file mode 100644 index 0000000..5a64b3d --- /dev/null +++ b/README @@ -0,0 +1,2 @@ +This package is derived from the original debian package. But we use +latest souces from git, and only support systemd. diff --git a/cgmanager.tgz b/cgmanager.tgz new file mode 100644 index 0000000..12b0584 Binary files /dev/null and b/cgmanager.tgz differ diff --git a/debian/cgmanager-tests.install b/debian/cgmanager-tests.install new file mode 100644 index 0000000..f6df1d7 --- /dev/null +++ b/debian/cgmanager-tests.install @@ -0,0 +1 @@ +usr/share/cgmanager/tests diff --git a/debian/cgmanager.install b/debian/cgmanager.install new file mode 100644 index 0000000..5a7e276 --- /dev/null +++ b/debian/cgmanager.install @@ -0,0 +1,5 @@ +sbin +bin/* usr/bin/ +usr/share/man +lib/systemd/system/cgmanager.service +lib/systemd/system/cgproxy.service \ No newline at end of file diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..094155f --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +cgmanager (0.36-pve1) unstable; urgency=low + + * new package for Proxmox VE + + -- Proxmox Support Team Mon, 06 Apr 2015 08:40:41 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..b36fde6 --- /dev/null +++ b/debian/control @@ -0,0 +1,70 @@ +Source: cgmanager +Section: admin +Priority: optional +Maintainer: Proxmox Support Team +Build-Depends: + autotools-dev, + debhelper (>= 9), + dh-autoreconf, + dh-systemd, + help2man, + libdbus-1-dev, + libnih-dbus-dev, + libnih-dev, + libtool, + nih-dbus-tool, + pkg-config +Standards-Version: 3.9.6 +Homepage: http://cgmanager.linuxcontainers.org/ + +Package: cgmanager +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: cgmanager-utils +Conflicts: cgmanager-utils (<< 0.30-1) +Replaces: cgmanager-utils (<< 0.30-1) +Description: Central cgroup manager daemon + cgmanager provides a central cgroup manager daemon and a + per-namespace manager proxy, allowing users and programs + to administrate cgroups through D-Bus requests. + . + This package contains the cgroup management daemon and + proxy. + +Package: cgmanager-tests +Architecture: all +Depends: cgmanager, ${misc:Depends} +Description: Central cgroup manager daemon (tests) + cgmanager provides a central cgroup manager daemon and a + per-namespace manager proxy, allowing users and programs + to administrate cgroups through D-Bus requests. + . + This package contains the test scripts. + +Package: libcgmanager0 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Description: Central cgroup manager daemon (client library) + cgmanager provides a central cgroup manager daemon and a + per-namespace manager proxy, allowing users and programs + to administrate cgroups through D-Bus requests. + . + This package contains the shared library. + +Package: libcgmanager-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, + libcgmanager0 (= ${binary:Version}), + libdbus-1-dev, + libnih-dbus-dev +Description: Central cgroup manager daemon (dev) + cgmanager provides a central cgroup manager daemon and a + per-namespace manager proxy, allowing users and programs + to administrate cgroups through D-Bus requests. + . + This package contains the static library and C header files + needed for developing software using libcgmanager. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..def5c60 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,50 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: cgmanager +Upstream-Contact: cgmanager-devel@lists.linuxcontainers.org +Source: http://cgmanager.linuxcontainers.org/downloads + +Files: * +Copyright: 2013-2014 Stéphane Graber + 2013-2014 Canonical Ltd. + 2013 S.Çağlar Onur +License: GPL-2 + +Files: access_checks.c access_checks.h fs.c fs.h +Copyright: 2013-2014 Serge Hallyn + 2007-2008 IBM Corp. +License: LGPL-2.1+ + +License: GPL-2 + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2, as + published by the Free Software Foundation. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +License: LGPL-2.1+ + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + . + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU Lesser General Public + License version 2.1 can be found in the file + `/usr/share/common-licenses/LGPL-2.1'. diff --git a/debian/libcgmanager-dev.install b/debian/libcgmanager-dev.install new file mode 100644 index 0000000..e5b6324 --- /dev/null +++ b/debian/libcgmanager-dev.install @@ -0,0 +1,4 @@ +usr/lib/*/pkgconfig/libcgmanager.pc +usr/include/cgmanager +usr/lib/*/libcgmanager.so +usr/lib/*/libcgmanager.a diff --git a/debian/libcgmanager0.install b/debian/libcgmanager0.install new file mode 100644 index 0000000..da69eaa --- /dev/null +++ b/debian/libcgmanager0.install @@ -0,0 +1 @@ +lib/*/libcgmanager.so.* diff --git a/debian/libcgmanager0.symbols b/debian/libcgmanager0.symbols new file mode 100644 index 0000000..c126088 --- /dev/null +++ b/debian/libcgmanager0.symbols @@ -0,0 +1,75 @@ +libcgmanager.so.0 libcgmanager0 #MINVER# + cgmanager_chmod@Base 0.28 + cgmanager_chmod_scm@Base 0.28 + cgmanager_chmod_scm_sync@Base 0.28 + cgmanager_chmod_sync@Base 0.28 + cgmanager_chown@Base 0.28 + cgmanager_chown_scm@Base 0.28 + cgmanager_chown_scm_sync@Base 0.28 + cgmanager_chown_sync@Base 0.28 + cgmanager_create@Base 0.28 + cgmanager_create_scm@Base 0.28 + cgmanager_create_scm_sync@Base 0.28 + cgmanager_create_sync@Base 0.28 + cgmanager_get_all@Base 0.28 + cgmanager_get_all_sync@Base 0.28 + cgmanager_get_api_version@Base 0.28 + cgmanager_get_api_version_sync@Base 0.28 + cgmanager_get_pid_cgroup@Base 0.28 + cgmanager_get_pid_cgroup_abs@Base 0.28 + cgmanager_get_pid_cgroup_abs_scm@Base 0.28 + cgmanager_get_pid_cgroup_abs_scm_sync@Base 0.28 + cgmanager_get_pid_cgroup_abs_sync@Base 0.28 + cgmanager_get_pid_cgroup_scm@Base 0.28 + cgmanager_get_pid_cgroup_scm_sync@Base 0.28 + cgmanager_get_pid_cgroup_sync@Base 0.28 + cgmanager_get_tasks@Base 0.28 + cgmanager_get_tasks_scm@Base 0.28 + cgmanager_get_tasks_scm_sync@Base 0.28 + cgmanager_get_tasks_sync@Base 0.28 + cgmanager_get_value@Base 0.28 + cgmanager_get_value_scm@Base 0.28 + cgmanager_get_value_scm_sync@Base 0.28 + cgmanager_get_value_sync@Base 0.28 + cgmanager_interfaces@Base 0.28 + cgmanager_list_children@Base 0.28 + cgmanager_list_children_scm@Base 0.28 + cgmanager_list_children_scm_sync@Base 0.28 + cgmanager_list_children_sync@Base 0.28 + cgmanager_list_keys@Base 0.33 + cgmanager_list_keys_scm@Base 0.33 + cgmanager_list_keys_scm_sync@Base 0.33 + cgmanager_list_keys_sync@Base 0.33 + cgmanager_move_pid@Base 0.28 + cgmanager_move_pid_abs@Base 0.28 + cgmanager_move_pid_abs_scm@Base 0.28 + cgmanager_move_pid_abs_scm_sync@Base 0.28 + cgmanager_move_pid_abs_sync@Base 0.28 + cgmanager_move_pid_scm@Base 0.28 + cgmanager_move_pid_scm_sync@Base 0.28 + cgmanager_move_pid_sync@Base 0.28 + cgmanager_org_linuxcontainers_cgmanager0_0@Base 0.28 + cgmanager_ping@Base 0.28 + cgmanager_ping_sync@Base 0.28 + cgmanager_remove@Base 0.28 + cgmanager_remove_on_empty@Base 0.28 + cgmanager_remove_on_empty_scm@Base 0.28 + cgmanager_remove_on_empty_scm_sync@Base 0.28 + cgmanager_remove_on_empty_sync@Base 0.28 + cgmanager_remove_scm@Base 0.28 + cgmanager_remove_scm_sync@Base 0.28 + cgmanager_remove_sync@Base 0.28 + cgmanager_set_value@Base 0.28 + cgmanager_set_value_scm@Base 0.28 + cgmanager_set_value_scm_sync@Base 0.28 + cgmanager_set_value_sync@Base 0.28 + cgmanager_get_tasks_recursive@Base 0.32 + cgmanager_get_tasks_recursive_scm@Base 0.32 + cgmanager_get_tasks_recursive_scm_sync@Base 0.32 + cgmanager_get_tasks_recursive_sync@Base 0.32 + cgmanager_list_controllers@Base 0.32 + cgmanager_list_controllers_sync@Base 0.32 + cgmanager_prune@Base 0.32 + cgmanager_prune_scm@Base 0.32 + cgmanager_prune_scm_sync@Base 0.32 + cgmanager_prune_sync@Base 0.32 diff --git a/debian/patches/fix-systemd-unit-dir.patch b/debian/patches/fix-systemd-unit-dir.patch new file mode 100644 index 0000000..977bca2 --- /dev/null +++ b/debian/patches/fix-systemd-unit-dir.patch @@ -0,0 +1,13 @@ +Index: new/config/init/systemd/Makefile.am +=================================================================== +--- new.orig/config/init/systemd/Makefile.am ++++ new/config/init/systemd/Makefile.am +@@ -1,7 +1,7 @@ + EXTRA_DIST = cgmanager.service cgproxy.service + + if INIT_SCRIPT_SYSTEMD +-SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system ++SYSTEMD_UNIT_DIR = /lib/systemd/system + + install-systemd: cgmanager.service cgproxy.service + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..c00da0a --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +fix-systemd-unit-dir.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..e3b60b0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,44 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --with quilt,autotools_dev,autoreconf,systemd + +override_dh_auto_configure: + dh_auto_configure -- \ + --exec-prefix= \ + --with-distro=debian \ + --with-init-script=systemd + +override_dh_makeshlibs: + dh_makeshlibs -- -c4 + +override_dh_install: + # remove .la file + rm $(CURDIR)/debian/tmp/usr/lib/*/libcgmanager.la + + mkdir -p $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH) + mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libcgmanager.so.* \ + $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/ + for i in $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libcgmanager.so ; do \ + dest=$$(readlink $$i) ; \ + rm -f $$i ; \ + ln -s /lib/$(DEB_HOST_MULTIARCH)/$$dest $$i ; \ + done + dh_install --fail-missing + +override_dh_systemd_enable: + dh_systemd_enable -pcgmanager --name=cgmanager + dh_systemd_enable -pcgmanager --name=cgproxy + +override_dh_systemd_start: + dh_systemd_start -pcgmanager --name=cgmanager + dh_systemd_start -pcgmanager --name=cgproxy +