[Kimchi-devel] [RFC PATCH V2 09/31] Update wok daemon and specs

Lucio Correia luciojhc at linux.vnet.ibm.com
Mon Jun 22 22:59:23 UTC 2015


- Rename from kimchi(d) to wok(d)
- Remove all kimchi specifics (including deps)
- Do not check for libvirt status
- Reflect new file names/structure
- Replace gettext-devel dependency by gettext

Signed-off-by: Lucio Correia <luciojhc at linux.vnet.ibm.com>
Signed-off-by: Gustavo Y. Ribeiro <gyr at linux.vnet.ibm.com>
---
 contrib/DEBIAN/control.in        |   15 +-----
 contrib/DEBIAN/postrm            |    4 +-
 contrib/make-deb.sh.in           |    2 +-
 contrib/wok.spec.fedora.in       |  106 ++++++++++++++------------------------
 contrib/wok.spec.suse.in         |   86 +++++++++++--------------------
 contrib/wokd-upstart.conf.debian |   14 ++----
 contrib/wokd-upstart.conf.fedora |   11 +---
 contrib/wokd.service.fedora      |    6 +-
 contrib/wokd.sysvinit            |   18 +++---
 src/firewalld.xml                |    4 +-
 10 files changed, 93 insertions(+), 173 deletions(-)

diff --git a/contrib/DEBIAN/control.in b/contrib/DEBIAN/control.in
index a288e9b..ef4e0c2 100644
--- a/contrib/DEBIAN/control.in
+++ b/contrib/DEBIAN/control.in
@@ -6,31 +6,18 @@ Architecture: all
 Depends: python-cherrypy3 (>= 3.2.0),
          python-cheetah,
          python-imaging,
-         python-configobj,
          websockify,
          novnc,
          python-jsonschema (>= 1.3.0),
-         python-libvirt,
          gettext,
-         libvirt-bin,
-         nfs-common,
          python-m2crypto,
-         qemu-kvm,
          python-pam,
-         python-parted,
-         python-psutil (>= 0.6.0),
-         python-ethtool,
-         sosreport,
-         python-ipaddr,
          python-lxml,
-         open-iscsi,
          nginx,
-         python-guestfs,
          python-ldap,
-         libguestfs-tools,
          spice-html5
 Build-Depends: libxslt,
                openssl,
                python-lxml
 Maintainer: Aline Manera <alinefm at br.ibm.com>
-Description: Kimchi web server
+Description: Wok - Webserver Originated from Kimchi
diff --git a/contrib/DEBIAN/postrm b/contrib/DEBIAN/postrm
index ef90b49..256a234 100755
--- a/contrib/DEBIAN/postrm
+++ b/contrib/DEBIAN/postrm
@@ -20,9 +20,9 @@
 
 case "$1" in
     remove)
-        rm -rf /var/log/kimchi /var/run/kimchi.pid
+        rm -rf /var/log/wok /var/run/wok.pid
     ;;
     purge)
-        rm -rf /var/log/kimchi /var/run/kimchi.pid /usr/share/kimchi/
+        rm -rf /var/log/wok /var/run/wok.pid /usr/share/wok/
     ;;
 esac
diff --git a/contrib/make-deb.sh.in b/contrib/make-deb.sh.in
index 5a6e56a..6c42072 100644
--- a/contrib/make-deb.sh.in
+++ b/contrib/make-deb.sh.in
@@ -11,5 +11,5 @@ fi
 TMPDIR=`mktemp -d`
 
 make DESTDIR=$TMPDIR install-deb
-dpkg-deb -b $TMPDIR kimchi-${VERSION}-${RELEASE}.noarch.deb
+dpkg-deb -b $TMPDIR wok-${VERSION}-${RELEASE}.noarch.deb
 rm -rf $TMPDIR
diff --git a/contrib/wok.spec.fedora.in b/contrib/wok.spec.fedora.in
index 183fd43..edbe385 100644
--- a/contrib/wok.spec.fedora.in
+++ b/contrib/wok.spec.fedora.in
@@ -1,38 +1,24 @@
-Name:		kimchi
+Name:		wok
 Version:	@PACKAGE_VERSION@
 Release:	@PACKAGE_RELEASE@%{?dist}
-Summary:	Kimchi server application
+Summary:	Wok - Webserver Originated from Kimchi
 BuildRoot:	%{_topdir}/BUILD/%{name}-%{version}-%{release}
 BuildArch:	noarch
 Group:		System Environment/Base
 License:	LGPL/ASL2
 Source0:	%{name}-%{version}.tar.gz
-Requires:	qemu-kvm
-Requires:	gettext-devel
-Requires:	libvirt
-Requires:	libvirt-python
-Requires:	libvirt-daemon-config-network
+Requires:	gettext
 Requires:	python-cherrypy >= 3.2.0
 Requires:	python-cheetah
 Requires:	python-websockify
-Requires:	python-configobj
 Requires:	novnc
 Requires:	m2crypto
 Requires:	python-imaging
 Requires:	PyPAM
-Requires:	pyparted
-Requires:	python-psutil >= 0.6.0
 Requires:	python-jsonschema >= 1.3.0
-Requires:	python-ethtool
-Requires:	sos
-Requires:	python-ipaddr
 Requires:	python-lxml
-Requires:	nfs-utils
 Requires:	nginx
-Requires:	iscsi-initiator-utils
 Requires:	python-ldap
-Requires:	python-libguestfs
-Requires:	libguestfs-tools
 BuildRequires:	libxslt
 BuildRequires:	openssl
 BuildRequires:	python-lxml
@@ -64,7 +50,7 @@ BuildRequires: systemd-units
 %endif
 
 %description
-Web server application to manage KVM/Qemu virtual machines
+Wok is Webserver Originated from Kimchi.
 
 
 %prep
@@ -84,22 +70,18 @@ make
 rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
 
-%if 0%{?with_systemd}
-
-%endif
-
 %if 0%{?rhel} == 6
 # Install the upstart script
-install -Dm 0755 contrib/kimchid-upstart.conf.fedora %{buildroot}/etc/init/kimchid.conf
+install -Dm 0755 contrib/wokd-upstart.conf.fedora %{buildroot}/etc/init/wokd.conf
 %endif
 %if 0%{?rhel} == 5
 # Install the SysV init scripts
-install -Dm 0755 contrib/kimchid.sysvinit %{buildroot}%{_initrddir}/kimchid
+install -Dm 0755 contrib/wokd.sysvinit %{buildroot}%{_initrddir}/wokd
 %endif
 
 %post
 if [ $1 -eq 1 ] ; then
-    /bin/systemctl enable kimchid.service >/dev/null 2>&1 || :
+    /bin/systemctl enable wokd.service >/dev/null 2>&1 || :
     # Initial installation
     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 fi
@@ -109,8 +91,8 @@ fi
 
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
-    /bin/systemctl --no-reload disable kimchid.service > /dev/null 2>&1 || :
-    /bin/systemctl stop kimchid.service > /dev/null 2>&1 || :
+    /bin/systemctl --no-reload disable wokd.service > /dev/null 2>&1 || :
+    /bin/systemctl stop wokd.service > /dev/null 2>&1 || :
 fi
 
 exit 0
@@ -118,7 +100,7 @@ exit 0
 
 %postun
 if [ "$1" -ge 1 ] ; then
-    /bin/systemctl try-restart kimchid.service >/dev/null 2>&1 || :
+    /bin/systemctl try-restart wokd.service >/dev/null 2>&1 || :
 fi
 exit 0
 
@@ -127,55 +109,43 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %attr(-,root,root)
-%{_bindir}/kimchid
-%{python_sitelib}/kimchi/*.py*
-%{python_sitelib}/kimchi/control/*.py*
-%{python_sitelib}/kimchi/control/vm/*.py*
-%{python_sitelib}/kimchi/model/*.py*
-%{python_sitelib}/kimchi/xmlutils/*.py*
-%{python_sitelib}/kimchi/API.json
-%{python_sitelib}/kimchi/plugins/*.py*
-%{python_sitelib}/kimchi/
-%{_datadir}/kimchi/doc/API.md
-%{_datadir}/kimchi/doc/README.md
-%{_datadir}/kimchi/doc/README-federation.md
-%{_datadir}/kimchi/doc/kimchi-guest.png
-%{_datadir}/kimchi/doc/kimchi-templates.png
-%{_prefix}/share/locale/*/LC_MESSAGES/kimchi.mo
-%{_datadir}/kimchi/config/ui/*.xml
-%{_datadir}/kimchi/ui/
-%{_datadir}/kimchi
-%{_sysconfdir}/nginx/conf.d/kimchi.conf.in
-%{_sysconfdir}/nginx/conf.d/kimchi.conf
-%{_sysconfdir}/kimchi/kimchi.conf
-%{_sysconfdir}/kimchi/template.conf
-%{_sysconfdir}/kimchi/distros.d/debian.json
-%{_sysconfdir}/kimchi/distros.d/fedora.json
-%{_sysconfdir}/kimchi/distros.d/opensuse.json
-%{_sysconfdir}/kimchi/distros.d/ubuntu.json
-%{_sysconfdir}/kimchi/distros.d/gentoo.json
-%{_sysconfdir}/kimchi/
-%{_sharedstatedir}/kimchi/debugreports/
-%{_sharedstatedir}/kimchi/screenshots/
-%{_sharedstatedir}/kimchi/vnc-tokens/
-%{_sharedstatedir}/kimchi/isos/
-%{_sharedstatedir}/kimchi/
-%{_localstatedir}/log/kimchi/*
-%{_localstatedir}/log/kimchi/
-%{_mandir}/man8/kimchid.8.gz
+%{_bindir}/wokd
+%{python_sitelib}/wok/*.py*
+%{python_sitelib}/wok/control/*.py*
+%{python_sitelib}/wok/model/*.py*
+%{python_sitelib}/wok/xmlutils/*.py*
+%{python_sitelib}/wok/API.json
+%{python_sitelib}/wok/plugins/*.py*
+%{python_sitelib}/wok/
+%{_prefix}/share/locale/*/LC_MESSAGES/wok.mo
+%{_datadir}/wok/ui/
+%{_datadir}/wok
+%{_sysconfdir}/nginx/conf.d/wok.conf.in
+%{_sysconfdir}/nginx/conf.d/wok.conf
+%{_sysconfdir}/wok/wok.conf
+%{_sysconfdir}/wok/
+%{_sharedstatedir}/wok/vnc-tokens/
+%{_sharedstatedir}/wok/
+%{_localstatedir}/log/wok/*
+%{_localstatedir}/log/wok/
+%{_mandir}/man8/wokd.8.gz
 
 %if 0%{?with_systemd}
-%{_unitdir}/kimchid.service
-%{_prefix}/lib/firewalld/services/kimchid.xml
+%{_unitdir}/wokd.service
+%{_prefix}/lib/firewalld/services/wokd.xml
 %endif
 %if 0%{?rhel} == 6
-/etc/init/kimchid.conf
+/etc/init/wokd.conf
 %endif
 %if 0%{?rhel} == 5
-%{_initrddir}/kimchid
+%{_initrddir}/wokd
 %endif
 
 %changelog
+* Fri Jun 19 2015 Lucio Correia <luciojhc at linux.vnet.ibm.com> 1.6
+- Rename to wokd
+- Remove kimchi specifics
+
 * Thu Feb 26 2015 Frédéric Bonnard <frediz at linux.vnet.ibm.com> 1.4.0
 - Add man page for kimchid
 
diff --git a/contrib/wok.spec.suse.in b/contrib/wok.spec.suse.in
index fa55cc5..27a2992 100644
--- a/contrib/wok.spec.suse.in
+++ b/contrib/wok.spec.suse.in
@@ -1,38 +1,25 @@
-Name:		kimchi
+Name:		wok
 Version:	@PACKAGE_VERSION@
 Release:	@PACKAGE_RELEASE@%{?dist}
-Summary:	Kimchi server application
+Summary:	Wok - Webserver Originated from Kimchi
 BuildRoot:	%{_topdir}/BUILD/%{name}-%{version}-%{release}
 BuildArch:	noarch
 Group:		System Environment/Base
 License:	LGPL/ASL2
 Source0:	%{name}-%{version}.tar.gz
-Requires:	kvm
 Requires:	gettext-tools
-Requires:	libvirt
-Requires:	libvirt-python
-Requires:	libvirt-daemon-config-network
 Requires:	python-CherryPy >= 3.2.0
 Requires:	python-Cheetah
 Requires:	python-websockify
-Requires:	python-configobj
 Requires:	novnc
 Requires:	python-imaging
 Requires:	python-M2Crypto
 Requires:	python-pam
-Requires:	python-parted
-Requires:	python-psutil >= 0.6.0
 Requires:	python-jsonschema >= 1.3.0
-Requires:	python-ethtool
-Requires:	python-ipaddr
 Requires:	python-ldap
 Requires:	python-lxml
 Requires:	python-xml
-Requires:	nfs-client
 Requires:	nginx
-Requires:	open-iscsi
-Requires:	python-libguestfs
-Requires:	guestfs-tools
 BuildRequires:	libxslt-tools
 BuildRequires:	openssl
 BuildRequires:	python-lxml
@@ -42,7 +29,7 @@ Requires:       python-ordereddict
 %endif
 
 %description
-Web server application to manage KVM/Qemu virtual machines
+Wok is Webserver Originated from Kimchi.
 
 %prep
 %setup
@@ -56,56 +43,43 @@ rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
 
 %post
-chkconfig kimchid on
+chkconfig wokd on
 
 %preun
-service kimchid stop
+service wokd stop
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %attr(-,root,root)
-%{_bindir}/kimchid
-%{python_sitelib}/kimchi/*.py*
-%{python_sitelib}/kimchi/control/*.py*
-%{python_sitelib}/kimchi/control/vm/*.py*
-%{python_sitelib}/kimchi/model/*.py*
-%{python_sitelib}/kimchi/xmlutils/*.py*
-%{python_sitelib}/kimchi/API.json
-%{python_sitelib}/kimchi/plugins/*.py*
-%{python_sitelib}/kimchi/
-%{_datadir}/kimchi/doc/API.md
-%{_datadir}/kimchi/doc/README.md
-%{_datadir}/kimchi/doc/README-federation.md
-%{_datadir}/kimchi/doc/kimchi-guest.png
-%{_datadir}/kimchi/doc/kimchi-templates.png
-%{_prefix}/share/locale/*/LC_MESSAGES/kimchi.mo
-%{_datadir}/kimchi/config/ui/*.xml
-%{_datadir}/kimchi/ui/
-%{_datadir}/kimchi
-%{_sysconfdir}/nginx/conf.d/kimchi.conf.in
-%{_sysconfdir}/nginx/conf.d/kimchi.conf
-%{_sysconfdir}/kimchi/kimchi.conf
-%{_sysconfdir}/kimchi/template.conf
-%{_sysconfdir}/kimchi/distros.d/debian.json
-%{_sysconfdir}/kimchi/distros.d/fedora.json
-%{_sysconfdir}/kimchi/distros.d/opensuse.json
-%{_sysconfdir}/kimchi/distros.d/ubuntu.json
-%{_sysconfdir}/kimchi/distros.d/gentoo.json
-%{_sysconfdir}/kimchi
-%{_initrddir}/kimchid
-%{_sysconfdir}/kimchi/
-%{_var}/lib/kimchi/debugreports/
-%{_var}/lib/kimchi/screenshots/
-%{_var}/lib/kimchi/vnc-tokens/
-%{_var}/lib/kimchi/isos/
-%{_var}/lib/kimchi/
-%{_localstatedir}/log/kimchi/*
-%{_localstatedir}/log/kimchi/
-%{_mandir}/man8/kimchid.8.gz
+%{_bindir}/wokd
+%{python_sitelib}/wok/*.py*
+%{python_sitelib}/wok/control/*.py*
+%{python_sitelib}/wok/model/*.py*
+%{python_sitelib}/wok/xmlutils/*.py*
+%{python_sitelib}/wok/API.json
+%{python_sitelib}/wok/plugins/*.py*
+%{python_sitelib}/wok/
+%{_prefix}/share/locale/*/LC_MESSAGES/wok.mo
+%{_datadir}/wok/ui/
+%{_datadir}/wok
+%{_sysconfdir}/wok/wok.conf
+%{_sysconfdir}/wok/
+%{_initrddir}/wokd
+%{_sysconfdir}/nginx/conf.d/wok.conf.in
+%{_sysconfdir}/nginx/conf.d/wok.conf
+%{_var}/lib/wok/vnc-tokens/
+%{_var}/lib/wok/
+%{_localstatedir}/log/wok/*
+%{_localstatedir}/log/wok/
+%{_mandir}/man8/wokd.8.gz
 
 %changelog
+* Fri Jun 19 2015 Lucio Correia <luciojhc at linux.vnet.ibm.com> 1.6
+- Rename to wokd
+- Remove kimchi specifics
+
 * Thu Feb 26 2015 Frédéric Bonnard <frediz at linux.vnet.ibm.com> 1.4.0
 - Add man page for kimchid
 
diff --git a/contrib/wokd-upstart.conf.debian b/contrib/wokd-upstart.conf.debian
index a58d3c3..82e9156 100644
--- a/contrib/wokd-upstart.conf.debian
+++ b/contrib/wokd-upstart.conf.debian
@@ -1,5 +1,5 @@
 #
-# kimchid - Kimchi Web Server
+# wokd - Wok Web Server
 #
 # Copyright IBM, Corp. 2013
 #
@@ -18,17 +18,11 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #
 
-description	"Kimchi Web Server"
+description	"Wok - Webserver Originated from Kimchi"
 
-start on started libvirt-bin
-stop on stopped libvirt-bin
+start on stopped rc RUNLEVEL=[2345]
 
 respawn
 respawn limit 5 30
 
-pre-start script
-    status libvirt-bin | grep -q "start/running" && exit 0
-    start libvirt-bin || exit 1
-end script
-
-exec /usr/bin/kimchid
+exec /usr/bin/wokd
diff --git a/contrib/wokd-upstart.conf.fedora b/contrib/wokd-upstart.conf.fedora
index 53e8a39..f02ce34 100644
--- a/contrib/wokd-upstart.conf.fedora
+++ b/contrib/wokd-upstart.conf.fedora
@@ -1,5 +1,5 @@
 #
-# kimchid - Kimchi Web Server
+# wokd - Wok Web Server
 #
 # Copyright IBM, Corp. 2013
 #
@@ -18,16 +18,11 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #
 
-description "Kimchi Web Server"
+description "Wok - Webserver Originated from Kimchi"
 
 start on stopped rc RUNLEVEL=[2345]
 
 respawn
 respawn limit 5 30
 
-pre-start script
-    service libvirtd status | grep -q "start/running" && exit 0
-    service libvirtd start || exit 1
-end script
-
-exec /usr/bin/kimchid
+exec /usr/bin/wokd
diff --git a/contrib/wokd.service.fedora b/contrib/wokd.service.fedora
index 7abe49b..17414d3 100644
--- a/contrib/wokd.service.fedora
+++ b/contrib/wokd.service.fedora
@@ -1,13 +1,13 @@
 [Unit]
-Description=Kimchi server
+Description=Wok - Webserver Originated from Kimchi
 Requires=libvirtd.service
 After=libvirtd.service
 
 [Service]
 Type=simple
-ExecStart=/usr/bin/kimchid
+ExecStart=/usr/bin/wokd
 ExecStop=/bin/kill -TERM $MAINPID
-EnvironmentFile=/etc/kimchi/kimchi.conf
+EnvironmentFile=/etc/wok/wok.conf
 
 [Install]
 WantedBy=multi-user.target
diff --git a/contrib/wokd.sysvinit b/contrib/wokd.sysvinit
index 023b34c..10680ee 100644
--- a/contrib/wokd.sysvinit
+++ b/contrib/wokd.sysvinit
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# kimchid		Kimchi Web Server
+# wokd		Wok Web Server
 #
 # Copyright IBM, Corp. 2013
 #
@@ -21,12 +21,12 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #
 ### BEGIN INIT INFO
-# Provides: kimchid
+# Provides: wokd
 # Required-Start: libvirtd
 # Required-Stop:
 # Default-Start: 3 5
 # Default-Stop: 0 1 2 6
-# Description: Start the kimchid daemon
+# Description: Start the wokd daemon
 ### END INIT INFO
 
 . /etc/rc.status
@@ -45,21 +45,21 @@ rc_reset
 
 case "$1" in
     start)
-	echo -n "Starting kimchid daemon"
+	echo -n "Starting wokd daemon"
 	## Start daemon with startproc(8). If this fails
 	## the echo return value is set appropriate.
 
-	startproc -f /usr/bin/kimchid > /dev/null 2>&1
+	startproc -f /usr/bin/wokd > /dev/null 2>&1
 
 	# Remember status and be verbose
 	rc_status -v
 	;;
     stop)
-	echo -n "Shutting down kimchid daemon"
+	echo -n "Shutting down wokd daemon"
 	## Stop daemon with killproc(8) and if this fails
 	## set echo the echo return value.
 
-	killproc -TERM /usr/bin/kimchid
+	killproc -TERM /usr/bin/wokd
 
 	# Remember status and be verbose
 	rc_status -v
@@ -82,7 +82,7 @@ case "$1" in
         rc_status
         ;;
     status)
-	echo -n "Checking for service kimchid "
+	echo -n "Checking for service wokd "
         ## Check status with checkproc(8), if process is running
         ## checkproc will return with exit status 0.
 
@@ -92,7 +92,7 @@ case "$1" in
         # 2 - service dead, but /var/lock/ lock file exists
         # 3 - service not running
 
-	checkproc /usr/bin/kimchid
+	checkproc /usr/bin/wokd
 
 	rc_status -v
 	;;
diff --git a/src/firewalld.xml b/src/firewalld.xml
index 03e1510..ff9fafe 100644
--- a/src/firewalld.xml
+++ b/src/firewalld.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <service>
-  <short>kimchid</short>
-  <description>Kimchid is a daemon service for kimchi which is a HTML5 based management tool for KVM. It is designed to make it as easy as possible to get started with KVM and create your first guest.</description>
+  <short>wokd</short>
+  <description>wokd is a daemon service for wok which is a web framework.</description>
   <port protocol="tcp" port="8000"/>
   <port protocol="tcp" port="8001"/>
   <port protocol="tcp" port="64667"/>
-- 
1.7.1




More information about the Kimchi-devel mailing list