[Kimchi-devel] [PATCH 07/38] Add specs for wok package

Lucio Correia luciojhc at linux.vnet.ibm.com
Thu May 21 21:33:20 UTC 2015


This patch only copies respective plugins/kimchi/contrib
counterparts. No code changes.
---
 contrib/DEBIAN/Makefile.am |   17 ++++
 contrib/DEBIAN/control.in  |   35 ++++++++
 contrib/make-deb.sh.in     |   15 +++
 contrib/wok.spec.fedora.in |  204 ++++++++++++++++++++++++++++++++++++++++++++
 contrib/wok.spec.suse.in   |  137 +++++++++++++++++++++++++++++
 5 files changed, 408 insertions(+), 0 deletions(-)
 create mode 100644 contrib/DEBIAN/Makefile.am
 create mode 100644 contrib/DEBIAN/control.in
 create mode 100644 contrib/make-deb.sh.in
 create mode 100644 contrib/wok.spec.fedora.in
 create mode 100644 contrib/wok.spec.suse.in

diff --git a/contrib/DEBIAN/Makefile.am b/contrib/DEBIAN/Makefile.am
new file mode 100644
index 0000000..ca89552
--- /dev/null
+++ b/contrib/DEBIAN/Makefile.am
@@ -0,0 +1,17 @@
+# Copyright IBM Corp, 2013
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# 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
+
+CLEANFILES = control
diff --git a/contrib/DEBIAN/control.in b/contrib/DEBIAN/control.in
new file mode 100644
index 0000000..0747d0f
--- /dev/null
+++ b/contrib/DEBIAN/control.in
@@ -0,0 +1,35 @@
+Package: @PACKAGE_NAME@
+Version: @PACKAGE_VERSION@
+Section: base
+Priority: optional
+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,
+               python-lxml
+Maintainer: Aline Manera <alinefm at br.ibm.com>
+Description: Kimchi web server
diff --git a/contrib/make-deb.sh.in b/contrib/make-deb.sh.in
new file mode 100644
index 0000000..5a6e56a
--- /dev/null
+++ b/contrib/make-deb.sh.in
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+VERSION="@PACKAGE_VERSION@"
+RELEASE="@PACKAGE_RELEASE@"
+
+if [ ! -f configure ]; then
+    echo "Please run this script from the top of the package tree"
+    exit 1
+fi
+
+TMPDIR=`mktemp -d`
+
+make DESTDIR=$TMPDIR install-deb
+dpkg-deb -b $TMPDIR kimchi-${VERSION}-${RELEASE}.noarch.deb
+rm -rf $TMPDIR
diff --git a/contrib/wok.spec.fedora.in b/contrib/wok.spec.fedora.in
new file mode 100644
index 0000000..30f8417
--- /dev/null
+++ b/contrib/wok.spec.fedora.in
@@ -0,0 +1,204 @@
+Name:		kimchi
+Version:	@PACKAGE_VERSION@
+Release:	@PACKAGE_RELEASE@%{?dist}
+Summary:	Kimchi server application
+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:	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:	python-lxml
+
+%if 0%{?rhel} >= 6 || 0%{?fedora} >= 19
+Requires:	spice-html5
+%endif
+
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
+%global with_systemd 1
+%endif
+
+%if 0%{?rhel} == 6
+Requires:	python-ordereddict
+Requires:	python-imaging
+BuildRequires:    python-unittest2
+%endif
+
+%if 0%{?with_systemd}
+Requires:	systemd
+Requires:	firewalld
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+%endif
+
+%if 0%{?with_systemd}
+BuildRequires: systemd-units
+%endif
+
+%description
+Web server application to manage KVM/Qemu virtual machines
+
+
+%prep
+%setup
+
+
+%build
+%if 0%{?rhel} >= 6 || 0%{?fedora} >= 19
+%configure
+%else
+%configure --with-spice-html5
+%endif
+make
+
+
+%install
+rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install
+
+%if 0%{?with_systemd}
+
+# create /var/lib/kimchi structure
+mkdir -p %{buildroot}/%{_sharedstatedir}/kimchi/{debugreports,screenshots,vnc-tokens,isos}
+touch %{buildroot}/%{_sharedstatedir}/kimchi/objectstore
+
+# create /var/log/kimchi structure
+mkdir -p %{buildroot}/%{_localstatedir}/log/kimchi/
+touch %{buildroot}/%{_localstatedir}/log/kimchi/kimchi-access.log
+touch %{buildroot}/%{_localstatedir}/log/kimchi/kimchi-error.log
+
+# create /etc/kimchi structure
+mkdir -p %{buildroot}/%{_sysconfdir}/kimchi/
+touch %{buildroot}/%{_sysconfdir}/nginx/conf.d/kimchi.conf
+
+# Install the systemd scripts
+install -Dm 0644 contrib/kimchid.service.fedora %{buildroot}%{_unitdir}/kimchid.service
+install -Dm 0640 src/firewalld.xml %{buildroot}%{_prefix}/lib/firewalld/services/kimchid.xml
+%endif
+
+%if 0%{?rhel} == 6
+# Install the upstart script
+install -Dm 0755 contrib/kimchid-upstart.conf.fedora %{buildroot}/etc/init/kimchid.conf
+%endif
+%if 0%{?rhel} == 5
+# Install the SysV init scripts
+install -Dm 0755 contrib/kimchid.sysvinit %{buildroot}%{_initrddir}/kimchid
+%endif
+
+%post
+if [ $1 -eq 1 ] ; then
+    /bin/systemctl enable kimchid.service >/dev/null 2>&1 || :
+    # Initial installation
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+
+
+%preun
+
+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 || :
+fi
+
+exit 0
+
+
+%postun
+if [ "$1" -ge 1 ] ; then
+    /bin/systemctl try-restart kimchid.service >/dev/null 2>&1 || :
+fi
+exit 0
+
+%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/
+%{_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
+
+%if 0%{?with_systemd}
+%{_unitdir}/kimchid.service
+%{_prefix}/lib/firewalld/services/kimchid.xml
+%endif
+%if 0%{?rhel} == 6
+/etc/init/kimchid.conf
+%endif
+%if 0%{?rhel} == 5
+%{_initrddir}/kimchid
+%endif
+
+%changelog
+* Thu Feb 26 2015 Frédéric Bonnard <frediz at linux.vnet.ibm.com> 1.4.0
+- Add man page for kimchid
+
+* Tue Feb 11 2014 Crístian Viana <vianac at linux.vnet.ibm.com> 1.1.0
+- Add help pages and XSLT dependency
+
+* Tue Jul 16 2013 Adam Litke <agl at us.ibm.com> 0.1.0-1
+- Adapted for autotools build
+
+* Thu Apr 04 2013 Aline Manera <alinefm at br.ibm.com> 0.0-1
+- First build
diff --git a/contrib/wok.spec.suse.in b/contrib/wok.spec.suse.in
new file mode 100644
index 0000000..bf85661
--- /dev/null
+++ b/contrib/wok.spec.suse.in
@@ -0,0 +1,137 @@
+Name:		kimchi
+Version:	@PACKAGE_VERSION@
+Release:	@PACKAGE_RELEASE@%{?dist}
+Summary:	Kimchi server application
+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:	python-lxml
+
+%if 0%{?sles_version} == 11
+Requires:       python-ordereddict
+%endif
+
+%description
+Web server application to manage KVM/Qemu virtual machines
+
+%prep
+%setup
+
+%build
+%configure --with-spice-html5
+make
+
+%install
+rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install
+
+# create /var/lib/kimchi structure
+mkdir -p %{buildroot}/%{_var}/lib/kimchi/{debugreports,screenshots,vnc-tokens,isos}
+touch %{buildroot}/%{_var}/lib/kimchi/objectstore
+
+# create /var/log/kimchi structure
+mkdir -p %{buildroot}/%{_localstatedir}/log/kimchi/
+touch %{buildroot}/%{_localstatedir}/log/kimchi/kimchi-access.log
+touch %{buildroot}/%{_localstatedir}/log/kimchi/kimchi-error.log
+
+# create /etc/kimchi structure
+mkdir -p %{buildroot}/%{_sysconfdir}/kimchi/
+
+# create nginx configuration
+touch %{buildroot}/%{_sysconfdir}/nginx/conf.d/kimchi.conf
+
+# Install the SysV init scripts
+install -Dm 0755 contrib/kimchid.sysvinit %{buildroot}%{_initrddir}/kimchid
+
+%post
+chkconfig kimchid on
+
+%preun
+service kimchid 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
+
+%changelog
+* Thu Feb 26 2015 Frédéric Bonnard <frediz at linux.vnet.ibm.com> 1.4.0
+- Add man page for kimchid
+
+* Tue Feb 11 2014 Crístian Viana <vianac at linux.vnet.ibm.com> 1.1.0
+- Add help pages and XSLT dependency
+
+* Thu Jul 18 2013 Adam Litke <agl at us.ibm.com> 0.1.0-1
+- Adapted for autotools build
+- Split Suse and Fedora spec files
+
+* Thu Apr 04 2013 Aline Manera <alinefm at br.ibm.com> 0.0-1
+- First build
-- 
1.7.1




More information about the Kimchi-devel mailing list