Skip to content

Commit

Permalink
Introduce Wok (Webserver Originated from Kimchi)
Browse files Browse the repository at this point in the history
- Create kimchi plugin
- Rename src/kimchi to src/wok
- Rename kimchi-named files to wok
- Duplicate UI files from kimchi to wok
- Add i18n files to wok
- Add packaging specs to wok
- Add back necessary __init__.py and Makefile.am files to wok
- Copy autogen, configure, build-aux, m4 files to plugins/kimchi
- Copy documentation files to plugins/kimchi
- Add .gitignore to plugins/kimchi for further separation from
wok.
- Update wok docs
- Add API and README docs to reflect new changes introduced
by wok.
- Update kimchi plugin docs
- Add kimchi dependency on wok
- Replace gettext-devel dependency by gettext
- Rename kimchi_log to wok_log
- It now uses wok.min.js for server JS API.
- Use plugin relative URLs
- Use InternalRedirect for all plugin redirects
- Dynamically add authed URLs to plugin conf
- Do not use tabs dir for kimchi plugin html templates
- Do not generate help index
- Fix import_module
- Make render_cheetah_file() plugin-aware
- Make cachebust's href() plugin-aware
- Correctly join help pathes for plugins case
- Install plugin .mo files to default locale dir
- Adapt automated tests to the new plugin structure
- Add specific state_dir values to plugins

Signed-off-by: Lucio Correia <[email protected]>
Signed-off-by: Gustavo Y. Ribeiro <[email protected]>
  • Loading branch information
Lucio Correia committed Sep 28, 2015
1 parent 01de1e0 commit 5a79d13
Show file tree
Hide file tree
Showing 515 changed files with 49,672 additions and 24,401 deletions.
18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@ configure
config.log
config.status
contrib/DEBIAN/control
contrib/kimchi.spec.fedora
contrib/kimchi.spec.suse
contrib/wok.spec.fedora
contrib/wok.spec.suse
contrib/make-deb.sh
docs/kimchid.8
docs/wokd.8
*.min.css
*.min.js
*.gmo
stamp-po
kimchi-*.tar.gz
src/kimchid
src/kimchi.conf
src/nginx/kimchi.conf
src/kimchi/config.py
wok-*.tar.gz
wok.spec
src/wokd
src/wok.conf
src/nginx/wok.conf
src/wok/config.py
tests/run_tests.sh
tests/test_config.py
plugins/sample/po/POTFILES
Expand All @@ -41,4 +42,3 @@ po/gen-pot
*.orig
*.rej
*.pem
ui/pages/help/*/*.html
6 changes: 3 additions & 3 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Kimchi is distributed pursuant to the terms of two different licenses.
The user interface (located in ui/ in this distribution) is governed by
the Apache License version 2.0.
Wok/Kimchi are distributed pursuant to the terms of two different licenses.
The user interface (located in ui/ and plugins/kimchi/ui in this distribution)
is governed by the Apache License version 2.0.

Kimchi makes use of different projects and they are placed as below:
- the code under ui/spice-html5 is imported from spice-html5 project
Expand Down
91 changes: 44 additions & 47 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
# 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
SUBDIRS = src ui docs contrib tests po config plugins
SUBDIRS = src ui docs contrib po plugins

man_MANS = docs/kimchid.8
man_MANS = docs/wokd.8

AUTOMAKE_OPTIONS = foreign

Expand All @@ -35,12 +35,12 @@ EXTRA_DIST = \
$(NULL)


PEP8_BLACKLIST = *src/kimchi/config.py,*src/kimchi/i18n.py,*tests/test_config.py
PEP8_BLACKLIST = *src/wok/config.py,*src/wok/i18n.py,*plugins/kimchi

SKIP_PYFLAKES_ERR = "\./src/kimchi/websocket\.py"
SKIP_PYFLAKES_ERR = "\./src/wok/websocket\.py"

I18N_FILES = plugins/*/i18n.py \
src/kimchi/i18n.py \
src/wok/i18n.py \
$(NULL)

check-local:
Expand All @@ -60,7 +60,7 @@ all-local:
while read L && test -n "$$L"; do \
dir=mo/$$L/LC_MESSAGES ; \
$(MKDIR_P) $$dir ; \
ln -sf ../../../po/$$L.gmo $$dir/kimchi.mo ; \
ln -sf ../../../po/$$L.gmo $$dir/wok.mo ; \
done < po/LINGUAS

#
Expand All @@ -69,44 +69,41 @@ all-local:

install-deb: install
cp -R $(top_srcdir)/contrib/DEBIAN $(DESTDIR)/
mkdir -p $(DESTDIR)/var/lib/kimchi/debugreports
mkdir -p $(DESTDIR)/var/lib/kimchi/screenshots
mkdir -p $(DESTDIR)/var/lib/kimchi/vnc-tokens
mkdir -p $(DESTDIR)/var/lib/kimchi/isos
touch $(DESTDIR)/var/lib/kimchi/objectstore
mkdir -p $(DESTDIR)/var/lib/wok/vnc-tokens
touch $(DESTDIR)/var/lib/wok/objectstore
$(MKDIR_P) $(DESTDIR)/etc/init
$(MKDIR_P) $(DESTDIR)/usr/lib/firewalld/services
cp -R $(top_srcdir)/contrib/kimchid-upstart.conf.debian \
$(DESTDIR)/etc/init/kimchid.conf
cp -R $(top_srcdir)/contrib/wokd-upstart.conf.debian \
$(DESTDIR)/etc/init/wokd.conf
cp -R $(top_srcdir)/src/firewalld.xml \
$(DESTDIR)/usr/lib/firewalld/services/kimchid.xml
$(DESTDIR)/usr/lib/firewalld/services/wokd.xml


deb: contrib/make-deb.sh
$(top_srcdir)/contrib/make-deb.sh

kimchi.spec: contrib/kimchi.spec.fedora contrib/kimchi.spec.suse
wok.spec: contrib/wok.spec.fedora contrib/wok.spec.suse
@if test -e /etc/redhat-release; then \
ln -sf contrib/kimchi.spec.fedora $@ ; \
ln -sf contrib/wok.spec.fedora $@ ; \
elif test -e /etc/SuSE-release; then \
ln -sf contrib/kimchi.spec.suse $@ ; \
ln -sf contrib/wok.spec.suse $@ ; \
else \
echo "Unable to select a spec file for RPM build" ; \
/bin/false ; \
fi

rpm: dist kimchi.spec
rpm: dist wok.spec
$(MKDIR_P) rpm/BUILD rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS
cp $(top_srcdir)/kimchi.spec rpm/SPECS/kimchi.spec
cp $(top_srcdir)/wok.spec rpm/SPECS/wok.spec
cp $(DIST_ARCHIVES) rpm/SOURCES
rpmbuild -ba --define "_topdir `pwd`/rpm" rpm/SPECS/kimchi.spec
rpmbuild -ba --define "_topdir `pwd`/rpm" rpm/SPECS/wok.spec

fedora-rpm: contrib/kimchi.spec.fedora
ln -sf contrib/kimchi.spec.fedora kimchi.spec
fedora-rpm: contrib/wok.spec.fedora
ln -sf contrib/wok.spec.fedora wok.spec
$(MAKE) rpm

suse-rpm: contrib/kimchi.spec.suse
ln -sf contrib/kimchi.spec.suse kimchi.spec
suse-rpm: contrib/wok.spec.suse
ln -sf contrib/wok.spec.suse wok.spec
$(MAKE) rpm

ChangeLog:
Expand All @@ -117,39 +114,39 @@ ChangeLog:
install-data-local:
@if test -d "$(systemdsystemunitdir)" ; then \
mkdir -p $(DESTDIR)/$(systemdsystemunitdir); \
$(INSTALL_DATA) contrib/kimchid.service.fedora $(DESTDIR)/$(systemdsystemunitdir)/kimchid.service; \
$(INSTALL_DATA) contrib/wokd.service.fedora $(DESTDIR)/$(systemdsystemunitdir)/wokd.service; \
else \
mkdir -p $(DESTDIR)/etc/init.d/; \
$(INSTALL_DATA) contrib/kimchid.sysvinit $(DESTDIR)/etc/init.d/kimchid; \
chmod +x $(DESTDIR)/etc/init.d/kimchid; \
$(INSTALL_DATA) contrib/wokd.sysvinit $(DESTDIR)/etc/init.d/wokd; \
chmod +x $(DESTDIR)/etc/init.d/wokd; \
fi; \
if test -d /usr/lib/firewalld/services/; then \
mkdir -p $(DESTDIR)/usr/lib/firewalld/services/; \
$(INSTALL_DATA) src/firewalld.xml $(DESTDIR)/usr/lib/firewalld/services/kimchid.xml; \
$(INSTALL_DATA) src/firewalld.xml $(DESTDIR)/usr/lib/firewalld/services/wokd.xml; \
fi; \
mkdir -p $(DESTDIR)/var/lib/kimchi/{debugreports,screenshots,vnc-tokens,isos}
touch $(DESTDIR)/var/lib/kimchi/objectstore
mkdir -p $(DESTDIR)/var/log/kimchi/
touch $(DESTDIR)/var/log/kimchi/kimchi-access.log
touch $(DESTDIR)/var/log/kimchi/kimchi-error.log
mkdir -p $(DESTDIR)/etc/kimchi/
$(INSTALL_DATA) src/dhparams.pem $(DESTDIR)/etc/kimchi/dhparams.pem
touch $(DESTDIR)/etc/nginx/conf.d/kimchi.conf
mkdir -p $(DESTDIR)/var/lib/wok/vnc-tokens
touch $(DESTDIR)/var/lib/wok/objectstore
mkdir -p $(DESTDIR)/var/log/wok/
touch $(DESTDIR)/var/log/wok/wok-access.log
touch $(DESTDIR)/var/log/wok/wok-error.log
mkdir -p $(DESTDIR)/etc/wok/
$(INSTALL_DATA) src/dhparams.pem $(DESTDIR)/etc/wok/dhparams.pem
touch $(DESTDIR)/etc/nginx/conf.d/wok.conf

uninstall-local:
@if test -f $(systemdsystemunitdir)/kimchid.service; then \
$(RM) $(DESTDIR)/$(systemdsystemunitdir)/kimchid.service; \
elif test -f /etc/init.d/kimchid; then \
$(RM) $(DESTDIR)/etc/init.d/kimchid; \
$(RM) $(DESTDIR)/etc/init/kimchi.conf; \
@if test -f $(systemdsystemunitdir)/wokd.service; then \
$(RM) $(DESTDIR)/$(systemdsystemunitdir)/wokd.service; \
elif test -f /etc/init.d/wokd; then \
$(RM) $(DESTDIR)/etc/init.d/wokd; \
$(RM) $(DESTDIR)/etc/init/wok.conf; \
fi; \
if test -d /usr/lib/firewalld/services/; then \
$(RM) $(DESTDIR)/usr/lib/firewalld/services/kimchid.xml; \
$(RM) $(DESTDIR)/usr/lib/firewalld/services/wokd.xml; \
fi; \
$(RM) -rf $(DESTDIR)/var/lib/kimchi
$(RM) -rf $(DESTDIR)/var/log/kimchi
$(RM) -rf $(DESTDIR)/etc/kimchi
$(RM) $(DESTDIR)/etc/nginx/conf.d/kimchi.conf
$(RM) -rf $(DESTDIR)/var/lib/wok
$(RM) -rf $(DESTDIR)/var/log/wok
$(RM) -rf $(DESTDIR)/etc/wok
$(RM) $(DESTDIR)/etc/nginx/conf.d/wok.conf

VERSION:
@if test -d .git; then \
Expand All @@ -162,4 +159,4 @@ VERSION:
clean-local:
rm -rf mo rpm

CLEANFILES = kimchi.spec `find "$(top_srcdir)" -type f -name "*.pyc" -print`
CLEANFILES = wok.spec `find "$(top_srcdir)" -type f -name "*.pyc" -print`
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.1
1.5.0
38 changes: 8 additions & 30 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

AC_INIT([kimchi], [m4_esyscmd([./build-aux/pkg-version --version])])
AC_INIT([wok], [m4_esyscmd([./build-aux/pkg-version --version])])

AC_SUBST([PACKAGE_VERSION],
[m4_esyscmd([./build-aux/pkg-version --version])])
Expand Down Expand Up @@ -87,15 +87,13 @@ AC_CONFIG_FILES([
po/gen-pot
Makefile
docs/Makefile
docs/kimchid.8
docs/wokd.8
src/Makefile
src/distros.d/Makefile
src/nginx/Makefile
src/kimchi/Makefile
src/kimchi/control/Makefile
src/kimchi/control/vm/Makefile
src/kimchi/model/Makefile
src/kimchi/xmlutils/Makefile
src/wok/Makefile
src/wok/control/Makefile
src/wok/model/Makefile
src/wok/xmlutils/Makefile
plugins/Makefile
plugins/sample/Makefile
plugins/sample/po/Makefile.in
Expand All @@ -113,37 +111,17 @@ AC_CONFIG_FILES([
ui/images/Makefile
ui/images/theme-default/Makefile
ui/js/Makefile
ui/spice-html5/Makefile
ui/spice-html5/css/Makefile
ui/spice-html5/pages/Makefile
ui/spice-html5/thirdparty/Makefile
ui/libs/Makefile
ui/libs/themes/Makefile
ui/libs/themes/base/Makefile
ui/libs/themes/base/images/Makefile
ui/pages/Makefile
ui/pages/help/Makefile
ui/pages/help/en_US/Makefile
ui/pages/help/de_DE/Makefile
ui/pages/help/es_ES/Makefile
ui/pages/help/fr_FR/Makefile
ui/pages/help/it_IT/Makefile
ui/pages/help/ja_JP/Makefile
ui/pages/help/ko_KR/Makefile
ui/pages/help/pt_BR/Makefile
ui/pages/help/ru_RU/Makefile
ui/pages/help/zh_CN/Makefile
ui/pages/help/zh_TW/Makefile
ui/pages/tabs/Makefile
ui/pages/websockify/Makefile
contrib/Makefile
contrib/DEBIAN/Makefile
contrib/DEBIAN/control
contrib/kimchi.spec.fedora
contrib/kimchi.spec.suse
tests/Makefile
config/Makefile
config/ui/Makefile
contrib/wok.spec.fedora
contrib/wok.spec.suse
],[
chmod +x po/gen-pot
])
Expand Down
18 changes: 2 additions & 16 deletions contrib/DEBIAN/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +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,
python-magic
spice-html5
Build-Depends: libxslt,
openssl,
python-lxml
Maintainer: Aline Manera <[email protected]>
Description: Kimchi web server
Description: Wok - Webserver Originated from Kimchi
4 changes: 2 additions & 2 deletions contrib/DEBIAN/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 6 additions & 6 deletions contrib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ SUBDIRS = DEBIAN

EXTRA_DIST = \
check_i18n.py \
kimchid.sysvinit \
kimchid.service.fedora \
kimchi.spec.fedora.in \
kimchid-upstart.conf.debian \
kimchid-upstart.conf.fedora \
wokd.sysvinit \
wokd.service.fedora \
wok.spec.fedora.in \
wokd-upstart.conf.debian \
wokd-upstart.conf.fedora \
make-deb.sh.in \
$(NULL)

Expand All @@ -35,4 +35,4 @@ make-deb.sh: make-deb.sh.in $(top_builddir)/config.status
mv $@-t $@
BUILT_SOURCES = make-deb.sh

CLEANFILES = kimchi.spec.fedora kimchi.spec.suse kimchi.spec make-deb.sh
CLEANFILES = wok.spec.fedora wok.spec.suse wok.spec make-deb.sh
2 changes: 1 addition & 1 deletion contrib/make-deb.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading

0 comments on commit 5a79d13

Please sign in to comment.