summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Hill2015-08-17 07:59:40 +0000
committerZachary Hill2015-08-17 07:59:40 +0000
commit682491ff80866cace79a6e19dba6f210828298ed (patch)
treed475be883ad8cd0c0b9e82bd9672e6f93057a11b
downloadaur-682491ff80866cace79a6e19dba6f210828298ed.tar.gz
Initial commit from aur3 copy. I have no clue what I'm doing
-rw-r--r--.SRCINFO29
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD38
-rw-r--r--webvirtmgr-git.install33
-rw-r--r--webvirtmgr-novnc.service15
-rw-r--r--webvirtmgr.ini8
6 files changed, 127 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..497c3634f2a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = webvirtmgr-git
+ pkgdesc = Web front-end for KVM virtual machines
+ pkgver = 4.8.7.r0.g05ff41c
+ pkgrel = 2
+ url = https://www.webvirtmgr.net/
+ install = webvirtmgr-git.install
+ arch = i686
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ makedepends = python2-pip
+ depends = libvirt
+ depends = libvirt-python
+ depends = qemu
+ depends = dnsmasq
+ depends = bridge-utils
+ depends = ebtables
+ depends = dmidecode
+ depends = python2
+ depends = supervisor
+ depends = websockify
+ source = git+https://github.com/retspen/webvirtmgr.git
+ source = webvirtmgr.ini
+ source = webvirtmgr-novnc.service
+ options = !strip
+ options = !emptydirs
+
+pkgname = webvirtmgr-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..4cba3bc52cc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.pkg.tar.gz
+webvirtmgr/
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2f37b96c29d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Zachary Hill <zer0t3ch97@gmail.com>
+
+pkgname='webvirtmgr-git'
+pkgdesc='Web front-end for KVM virtual machines'
+pkgver=v4.8.8.r147.g64528fa
+pkgrel=1
+arch=('i686' 'x86_64')
+url='https://www.webvirtmgr.net/'
+license=('Apache')
+depends=('libvirt' 'libvirt-python' 'qemu' 'dnsmasq' 'bridge-utils' 'ebtables' 'dmidecode' 'python2' 'supervisor'
+ 'websockify')
+makedepends=('git' 'python2-pip')
+options=('!strip' '!emptydirs')
+install="${pkgname}.install"
+source=('git+https://github.com/retspen/webvirtmgr.git'
+ 'webvirtmgr.ini'
+ 'webvirtmgr-novnc.service')
+sha512sums=('SKIP'
+ 'a8a64325750a1a6815c1ff9222373682f2300d0d636bb88675ae113b027a0e6d058e949344ae22357ff1258025ec0d32ca32a4383a37cadb88c9e5d180d2d147'
+ '78ae3aef65e4c362a7d70ff3a44d1c3ccd489ed7b77311d0ecb4d795aa587dc75e43356f56e4afbb180e0558859b64cbe78ca45bb234920ff3302b01e59716db')
+PKGEXT='.pkg.tar.gz'
+
+pkgver() {
+ cd 'webvirtmgr'
+ git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
+}
+
+package() {
+ outputdir="${pkgdir}/usr/lib/webvirtmgr"
+ install -Dm0644 'webvirtmgr.ini' "${pkgdir}/etc/supervisor.d/webvirtmgr.ini"
+ install -Dm0644 'webvirtmgr-novnc.service' "${pkgdir}/usr/lib/systemd/system/webvirtmgr-novnc.service"
+ install -dm0755 "${outputdir}" "${pkgdir}/var/lib/webvirtmgr"
+ cp -r "${srcdir}/webvirtmgr" "${pkgdir}/usr/lib"
+ rm -rf "${outputdir}/.git"
+
+ cd "${outputdir}"
+ pip2 install -r 'requirements.txt' -t "${outputdir}/lib"
+}
diff --git a/webvirtmgr-git.install b/webvirtmgr-git.install
new file mode 100644
index 00000000000..7ec7ac62753
--- /dev/null
+++ b/webvirtmgr-git.install
@@ -0,0 +1,33 @@
+post_install() {
+ login='webvirtmgr'
+
+ getent group "${login}" > /dev/null || groupadd -r "${login}" > /dev/null
+ getent passwd "${login}" > /dev/null || useradd -r -g "${login}" -d "/var/lib/${login}" "${login}" -m > /dev/null
+
+ cat <<- EOF
+ To finalize the installation you need to run:
+
+ # sudo python2 /usr/lib/webvirtmgr/manage.py syncdb
+ # chown webvirtmgr:webvirtmgr /usr/lib/webvirtmgr/webvirtmgr/local/.secret_key_store /usr/lib/webvirtmgr/webvirtmgr.sqlite3 /usr/lib/webvirtmgr # temporary, see https://github.com/retspen/webvirtmgr/issues/391
+ # sudo python2 /usr/lib/webvirtmgr/manage.py collectstatic
+
+ WebVirtMgr daemon is managed by Supervisord.
+ # systemctl enable supervisord
+ # systemctl start supervisord
+
+ To access VNC console you need to enable the NoVNC proxy.
+ # systemctl enable webvirtmgr-novnc
+ # systemctl start webvirtmgr-novnc
+
+ See the wiki for more details:
+ https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr
+
+ You also need to configure libvirt if you haven't yet done it:
+ https://wiki.archlinux.org/index.php/libvirt#Server_configuration
+ https://wiki.archlinux.org/index.php/libvirt#Remote_access_to_libvirt
+EOF
+}
+
+post_upgrade() {
+ echo
+}
diff --git a/webvirtmgr-novnc.service b/webvirtmgr-novnc.service
new file mode 100644
index 00000000000..64c9e90b665
--- /dev/null
+++ b/webvirtmgr-novnc.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=WebVirtMgr NoVNC proxy
+
+[Service]
+Environment=WEBVIRTMGR_DAEMON=/usr/lib/webvirtmgr/console/webvirtmgr-novnc
+Environment=WEBVIRTMGR_LOCK_DIR=/var/lock/webvirtmgr
+Environment=WEBVIRTMGR_USER=webvirtmgr
+Environment=WEBVIRTMGR_GROUP=webvirtmgr
+User=webvirtmgr
+Group=webvirtmgr
+ExecStart=/usr/bin/python2 /usr/lib/webvirtmgr/console/webvirtmgr-novnc
+Type=simple
+
+[Install]
+WantedBy=multi-user.target
diff --git a/webvirtmgr.ini b/webvirtmgr.ini
new file mode 100644
index 00000000000..413e074a1eb
--- /dev/null
+++ b/webvirtmgr.ini
@@ -0,0 +1,8 @@
+[program:webvirtmgr]
+command=/usr/bin/python2 /usr/lib/webvirtmgr/manage.py run_gunicorn -c /usr/lib/webvirtmgr/conf/gunicorn.conf.py
+directory=/usr/lib/webvirtmgr
+autostart=true
+autorestart=true
+stdout_logfile=/var/log/supervisor/webvirtmgr.log
+redirect_stderr=true
+user=webvirtmgr