From 09cccf0ffba8483923843352f855cf30ea68b550 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Sun, 8 Jul 2018 01:31:11 +0000 Subject: [PATCH] moved main configs to kvmd package --- kvmd/Makefile | 5 ----- kvmd/PKGBUILD | 3 +++ os/platforms/v1/kvmd.yaml => kvmd/configs/kvmd/v1.yaml | 0 {os/platforms/v1 => kvmd/configs/nginx}/nginx.conf | 2 +- kvmd/kvmd.yaml | 1 - {os/platforms/v1 => kvmd/web}/index.html | 0 os/platforms/v1/Dockerfile.part | 6 +++--- 7 files changed, 7 insertions(+), 10 deletions(-) rename os/platforms/v1/kvmd.yaml => kvmd/configs/kvmd/v1.yaml (100%) rename {os/platforms/v1 => kvmd/configs/nginx}/nginx.conf (98%) delete mode 120000 kvmd/kvmd.yaml rename {os/platforms/v1 => kvmd/web}/index.html (100%) diff --git a/kvmd/Makefile b/kvmd/Makefile index fffa74af..5a9737ef 100644 --- a/kvmd/Makefile +++ b/kvmd/Makefile @@ -11,7 +11,6 @@ release: make push make bump make push - make pypi make clean tox: @@ -24,10 +23,6 @@ push: git push git push --tags -pypi: - python3 setup.py register - python3 setup.py sdist upload - clean: rm -rf build site dist pkg src *.egg-info kvmd-*.tar.gz find -name __pycache__ | xargs rm -rf diff --git a/kvmd/PKGBUILD b/kvmd/PKGBUILD index 8d4775fa..3756da57 100644 --- a/kvmd/PKGBUILD +++ b/kvmd/PKGBUILD @@ -39,4 +39,7 @@ package() { cd $srcdir/$pkgname-build python setup.py install --root=$pkgdir install -Dm644 kvmd.service "$pkgdir"/usr/lib/systemd/system/kvmd.service + mkdir -p "$pkgdir"/usr/share/kvmd + cp -r web "$pkgdir"/usr/share/kvmd + cp -r configs "$pkgdir"/usr/share/kvmd } diff --git a/os/platforms/v1/kvmd.yaml b/kvmd/configs/kvmd/v1.yaml similarity index 100% rename from os/platforms/v1/kvmd.yaml rename to kvmd/configs/kvmd/v1.yaml diff --git a/os/platforms/v1/nginx.conf b/kvmd/configs/nginx/nginx.conf similarity index 98% rename from os/platforms/v1/nginx.conf rename to kvmd/configs/nginx/nginx.conf index 0cb74801..05e07047 100644 --- a/os/platforms/v1/nginx.conf +++ b/kvmd/configs/nginx/nginx.conf @@ -40,7 +40,7 @@ http { uwsgi_temp_path /tmp/nginx.uwsgi_temp; location / { - root /srv/http; + root /usr/share/kvmd/web; index index.html; } diff --git a/kvmd/kvmd.yaml b/kvmd/kvmd.yaml deleted file mode 120000 index 19ece673..00000000 --- a/kvmd/kvmd.yaml +++ /dev/null @@ -1 +0,0 @@ -../os/platforms/v1/kvmd.yaml \ No newline at end of file diff --git a/os/platforms/v1/index.html b/kvmd/web/index.html similarity index 100% rename from os/platforms/v1/index.html rename to kvmd/web/index.html diff --git a/os/platforms/v1/Dockerfile.part b/os/platforms/v1/Dockerfile.part index 566f229c..16d08ee8 100644 --- a/os/platforms/v1/Dockerfile.part +++ b/os/platforms/v1/Dockerfile.part @@ -6,9 +6,9 @@ RUN pkg-install \ COPY stages/pikvm/config.txt /boot/ COPY stages/pikvm/sysctl.conf /etc/sysctl.d/99-pikvm.conf COPY stages/pikvm/udev.rules /etc/udev/rules.d/pikvm.rules -COPY stages/pikvm/index.html /srv/http/ -COPY stages/pikvm/kvmd.yaml /etc/ -COPY stages/pikvm/nginx.conf /etc/nginx/ + +RUN cp /usr/share/kvmd/configs/nginx/nginx.conf /etc/nginx/ +RUN cp /usr/share/kvmd/configs/kvmd/v1.yaml /etc/kvmd.yaml RUN systemctl enable kvmd RUN systemctl enable nginx