diff options
-rw-r--r-- | .SRCINFO | 35 | ||||
-rw-r--r-- | PKGBUILD | 50 | ||||
-rw-r--r-- | archipel-agent.install | 23 | ||||
-rw-r--r-- | initinstall.patch | 25 | ||||
-rw-r--r-- | systemd.fix728.patch | 15 |
5 files changed, 148 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c99b70c98818 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,35 @@ +pkgbase = archipel-agent + pkgdesc = A solution to manage and supervise virtual machines. (Agent) + pkgver = 0.6.0.beta + pkgrel = 4 + url = http://archipelproject.org/ + install = archipel-agent.install + arch = any + license = AGPL + makedepends = python2-distribute + depends = python2 + depends = python2-apscheduler + depends = python2-sqlalchemy + depends = python2-numpy + depends = python2-magic + depends = python2-ctypes + depends = python2-pubsub + depends = python2-imaging + depends = libvirt + depends = libvirt-python + depends = qemu + depends = xmpppy + depends = dnsmasq + optdepends = ejabberd: An XMPP Server used by archipel for communication with VMs + options = !strip + options = !emptydirs + backup = etc/archipel/archipel.conf + source = https://github.com/ArchipelProject/Archipel/zipball/@beta6 + source = systemd.fix728.patch + source = initinstall.patch + md5sums = 5e17b2f807ccfe6ed528587bbb28af6a + md5sums = 806b4169371ba03f36e0ac21b76bd944 + md5sums = 5be3048be2978421705b65f3e04e7768 + +pkgname = archipel-agent + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c2cb1be7cb92 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Sebastien Leduc <sebastien@sleduc.fr> +# Contributor: Shanto <shanto@hotmail.com> + +pkgname=archipel-agent +_pkgver=beta6 +pkgver=0.6.0.beta +pkgrel=4 +pkgdesc="A solution to manage and supervise virtual machines. (Agent)" +arch=(any) +url="http://archipelproject.org/" +license=('AGPL') +depends=( + python2 python2-apscheduler python2-sqlalchemy python2-numpy python2-magic + python2-ctypes python2-pubsub python2-imaging libvirt libvirt-python qemu + xmpppy dnsmasq +) +makedepends=('python2-distribute') +optdepends=('ejabberd: An XMPP Server used by archipel for communication with VMs') +options=(!strip !emptydirs) +backup=("etc/archipel/archipel.conf") +install=$pkgname.install +source=("https://github.com/ArchipelProject/Archipel/zipball/@$_pkgver" + "systemd.fix728.patch" + "initinstall.patch") +md5sums=('5e17b2f807ccfe6ed528587bbb28af6a' + '806b4169371ba03f36e0ac21b76bd944' + '5be3048be2978421705b65f3e04e7768') + +package() { + cd `find "$srcdir" -type d -name ArchipelAgent -print -quit` + # Backport of the fix for the bug + # https://github.com/ArchipelProject/Archipel/issues/729 + patch -p1 < "$srcdir"/systemd.fix728.patch + + for mod in archipel-core archipel-agent-* archipel-agent; do + pushd $mod 1>/dev/null + python2 setup.py install --root="$pkgdir/" --optimize=1 + popd 1>/dev/null + done; + + mkdir -p "$pkgdir/etc/systemd" + mkdir -p "$pkgdir/usr/lib/systemd/system" + + cd "$pkgdir" + patch -p1 < "$srcdir"/initinstall.patch + "$pkgdir"/usr/bin/archipel-initinstall -p "$pkgdir" > /dev/null 2>&1 + rm -rf "$pkgdir/usr/install" +} + +# vim:set ts=2 sw=2 et: diff --git a/archipel-agent.install b/archipel-agent.install new file mode 100644 index 000000000000..1eea7d18d265 --- /dev/null +++ b/archipel-agent.install @@ -0,0 +1,23 @@ +post_install() +{ + cat <<- EOF + ==> You now need to edit /etc/archipel/archipel.conf top match your informations + ==> To start archipel just run + # systemctl start archipel-agent + ==> To enable archipel on boot: + # systemctl enable archipel-agent + EOF +} + +post_upgrade() +{ + post_install $1 +} + +post_remove() +{ + cat <<- EOF + ==> You may safely delete Archipel Agent config and files: + # rm -rf /etc/archipel /var/lib/archipel + EOF +} diff --git a/initinstall.patch b/initinstall.patch new file mode 100644 index 000000000000..31433ccfbb5f --- /dev/null +++ b/initinstall.patch @@ -0,0 +1,25 @@ +diff -rupN a/usr/bin/archipel-initinstall b/usr/bin/archipel-initinstall +--- a/usr/bin/archipel-initinstall 2013-03-31 14:45:53.000000000 +0200 ++++ b/usr/bin/archipel-initinstall 2013-03-31 15:02:07.286479421 +0200 +@@ -245,16 +245,16 @@ def get_data_files(prefix): + @type prefix: string + @param prefix: the installation prefix + """ +- init_script = resource_filename(Requirement.parse("archipel-agent"),"install/etc/init.d/archipel") +- systemd_script = resource_filename(Requirement.parse("archipel-agent"),"install/usr/lib/systemd/system/archipel-agent.service") +- conf_folder = resource_filename(Requirement.parse("archipel-agent"),"install/etc/archipel") +- lib_folder = resource_filename(Requirement.parse("archipel-agent"),"install/var/lib/archipel") ++ init_script = "" ++ systemd_script = "" ++ conf_folder = "" ++ lib_folder = "" + + # we are in the case of RPM installation + if not os.path.exists(init_script): + init_script = "%s/usr/install/etc/init.d/archipel" % prefix + if not os.path.exists(systemd_script): +- systemd_script = "%s/usr/lib/systemd/system/archipel-agent.service" % prefix ++ systemd_script = "%s/usr/install/usr/lib/systemd/system/archipel-agent.service" % prefix + if not os.path.exists(conf_folder): + conf_folder = "%s/usr/install/etc/archipel" % prefix + if not os.path.exists(lib_folder): diff --git a/systemd.fix728.patch b/systemd.fix728.patch new file mode 100644 index 000000000000..a9bfbd4e413d --- /dev/null +++ b/systemd.fix728.patch @@ -0,0 +1,15 @@ +diff --git a/archipel-agent/setup.py b/archipel-agent/setup.py +index e202d65..d084f46 100644 +--- a/archipel-agent/setup.py ++++ b/archipel-agent/setup.py +@@ -117,7 +117,8 @@ setup(name='archipel-agent', + data_files=[ + ('install/var/lib/archipel/avatars', create_avatar_list("install/var/lib/archipel/avatars/")), + ('install/var/lib/archipel/' , ['install/var/lib/archipel/names.txt']), +- ('install/etc/init.d' , ['install/etc/init.d/archipel']), ++ ('install/etc/init.d/' , ['install/etc/init.d/archipel']), ++ ('install/usr/lib/systemd/system/' , ['install/usr/lib/systemd/system/archipel-agent.service']), + ('install/etc/archipel/' , ['install/etc/archipel/archipel.conf', 'install/etc/archipel/vnc.pem']) + ] + ) + |