[Kimchi-devel] [PATCH v2 4/4] Github #329: config.py.in, spec, readme and makefile changes

Daniel Barboza danielhb at linux.vnet.ibm.com
Tue Apr 8 20:50:30 UTC 2014


From: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>

Makefile now generates the kimchid_server script.

Added this new generated binary to .gitignore.

config.py.in was edited to include a new cherrypy tool.

Spec files were edited to include the new files.

README file updated to include nginx dependency.

Signed-off-by: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>

patch 4 - spec file

Signed-off-by: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>

Readme changes
---
 .gitignore                    | 2 ++
 contrib/kimchi.spec.fedora.in | 5 ++++-
 contrib/kimchi.spec.suse.in   | 3 +++
 docs/README.md                | 4 ++--
 src/Makefile.am               | 9 ++++++++-
 src/kimchi/config.py.in       | 9 ++++++---
 6 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
index 67878e2..ad6f51d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,9 +23,11 @@ contrib/make-deb.sh
 *.min.css
 *.min.js
 *.gmo
+nginx_kimchi.conf
 stamp-po
 kimchi-*.tar.gz
 src/kimchid
+src/kimchid_server
 src/kimchi.conf
 src/kimchi/config.py
 tests/run_tests.sh
diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
index bf80104..aa55491 100644
--- a/contrib/kimchi.spec.fedora.in
+++ b/contrib/kimchi.spec.fedora.in
@@ -28,6 +28,7 @@ Requires:	sos
 Requires:	python-ipaddr
 Requires:	python-lxml
 Requires:	nfs-utils
+Requires:	nginx
 Requires:	iscsi-initiator-utils
 BuildRequires:	libxslt
 BuildRequires:	libxml2-python
@@ -136,6 +137,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %attr(-,root,root)
 %{_bindir}/kimchid
+%{_bindir}/kimchid_server
 %{python_sitelib}/kimchi/*.py*
 %{python_sitelib}/kimchi/control/*.py*
 %{python_sitelib}/kimchi/control/vm/*.py*
@@ -162,7 +164,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/kimchi/ui/js/novnc/*.js
 %{_datadir}/kimchi/ui/js/spice/*.js
 %{_datadir}/kimchi/ui/js/novnc/web-socket-js/WebSocketMain.swf
-%{_datadir}/kimchi/ui/js/novnc/web-socket-js/swfobject.js
+%{_datadir}/kimchi/ui/js/novnc/web-socket-js/swfobject.j
 %{_datadir}/kimchi/ui/js/novnc/web-socket-js/web_socket.js
 %{_datadir}/kimchi/ui/libs/jquery-ui-i18n.min.js
 %{_datadir}/kimchi/ui/libs/jquery-ui.min.js
@@ -175,6 +177,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/kimchi/ui/pages/help/*.html
 %{_datadir}/kimchi/ui/pages/tabs/*.html.tmpl
 %{_sysconfdir}/kimchi/kimchi.conf
+%{_sysconfdir}/kimchi/nginx.conf.in
 %{_sysconfdir}/kimchi/distros.d/debian.json
 %{_sysconfdir}/kimchi/distros.d/fedora.json
 %{_sysconfdir}/kimchi/distros.d/opensuse.json
diff --git a/contrib/kimchi.spec.suse.in b/contrib/kimchi.spec.suse.in
index cba0899..debddad 100644
--- a/contrib/kimchi.spec.suse.in
+++ b/contrib/kimchi.spec.suse.in
@@ -24,6 +24,7 @@ Requires:	python-ipaddr
 Requires:	python-lxml
 Requires:	python-xml
 Requires:	nfs-client
+Requires:	nginx
 Requires:	open-iscsi
 BuildRequires:	libxslt-tools
 BuildRequires:	python-libxml2
@@ -62,6 +63,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %attr(-,root,root)
 %{_bindir}/kimchid
+%{_bindir}/kimchid_server
 %{python_sitelib}/kimchi/*.py*
 %{python_sitelib}/kimchi/control/*.py*
 %{python_sitelib}/kimchi/control/vm/*.py*
@@ -101,6 +103,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/kimchi/ui/pages/help/*.html
 %{_datadir}/kimchi/ui/pages/tabs/*.html.tmpl
 %{_sysconfdir}/kimchi/kimchi.conf
+%{_sysconfdir}/kimchi/nginx.conf.in
 %{_sysconfdir}/kimchi/distros.d/debian.json
 %{_sysconfdir}/kimchi/distros.d/fedora.json
 %{_sysconfdir}/kimchi/distros.d/opensuse.json
diff --git a/docs/README.md b/docs/README.md
index 8b8b181..63ac760 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -53,7 +53,7 @@ Install Dependencies
                         PyPAM m2crypto python-jsonschema rpm-build \
                         qemu-kvm python-psutil python-ethtool sos \
                         python-ipaddr python-lxml nfs-utils \
-                        iscsi-initiator-utils libxslt pyparted
+                        iscsi-initiator-utils libxslt pyparted nginx
      # If using RHEL6, install the following additional packages:
      $ sudo yum install python-unittest2 python-ordereddict
      # Restart libvirt to allow configuration changes to take effect
@@ -75,7 +75,7 @@ for more information on how to configure your system to access this repository.
                            python-pam python-m2crypto python-jsonschema \
                            qemu-kvm libtool python-psutil python-ethtool \
                            sosreport python-ipaddr python-lxml nfs-common \
-                           open-iscsi lvm2 xsltproc python-parted
+                           open-iscsi lvm2 xsltproc python-parted nginx
 
     Packages version requirement:
         python-jsonschema >= 1.3.0
diff --git a/src/Makefile.am b/src/Makefile.am
index 2005f7c..7306558 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,11 +20,14 @@
 SUBDIRS = kimchi distros.d
 
 EXTRA_DIST = kimchid.in \
+        kimchid_server.in \
 	kimchi.conf.in \
 	firewalld.xml \
 	$(NULL)
 
-bin_SCRIPTS = kimchid
+bin_SCRIPTS = kimchid \
+	kimchid_server \
+	$(NULL)
 
 confdir = $(sysconfdir)/kimchi
 dist_conf_DATA = kimchi.conf
@@ -42,6 +45,10 @@ kimchid: kimchid.in Makefile
 	$(do_substitution) < $(srcdir)/kimchid.in > kimchid
 	chmod +x kimchid
 
+kimchid_server: kimchid_server.in Makefile
+	$(do_substitution) < $(srcdir)/kimchid_server.in > kimchid_server
+	chmod +x kimchid_server
+
 kimchi.conf: kimchi.conf.in Makefile
 	$(do_substitution) < kimchi.conf.in > kimchi.conf
 
diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in
index d15a6b5..f90b2f3 100644
--- a/src/kimchi/config.py.in
+++ b/src/kimchi/config.py.in
@@ -187,16 +187,19 @@ class KimchiConfig(dict):
             'tools.staticfile.on': True,
             'tools.staticfile.filename': '%s/config/ui/tabs.xml' %
                                          paths.prefix,
-            'tools.nocache.on': True
+            'tools.nocache.on': True,
+            'tools.ignorecookie.on': True
         },
         '/favicon.ico': {
             'tools.staticfile.on': True,
-            'tools.staticfile.filename': '%s/images/logo.ico' % paths.ui_dir
+            'tools.staticfile.filename': '%s/images/logo.ico' % paths.ui_dir,
+            'tools.ignorecookie.on': True
         },
         '/help': {
             'tools.staticdir.on': True,
             'tools.staticdir.dir': '%s/ui/pages/help' % paths.prefix,
-            'tools.nocache.on': False
+            'tools.nocache.on': False,
+            'tools.ignorecookie.on': True
         }
     }
 
-- 
1.8.3.1




More information about the Kimchi-devel mailing list