[Osaas-commits] r50 - in trunk: . packaging packaging/rpm
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Nov 24 08:57:50 CET 2008
Author: sholl
Date: 2008-11-24 08:57:50 +0100 (Mon, 24 Nov 2008)
New Revision: 50
Added:
trunk/packaging/
trunk/packaging/rpm/
trunk/packaging/rpm/osaas-server-path-correction.patch
trunk/packaging/rpm/osaas-suse10.3-gp.spec
Modified:
trunk/ChangeLog
Log:
* packaging/rpm/osaas-10.3-gp.spec, packaging/rpm/osaas-server-path-correction.patch:
New. RPM-SPEC-file for OpenSuSE 10.3 building an
osaas-server package. It brings a patch to adopt the pathes in
the config-file to fullfill the needs of a GISpatcher-package
because OSAAS-server runs as a dedicated user (not as root).
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-11-24 07:46:13 UTC (rev 49)
+++ trunk/ChangeLog 2008-11-24 07:57:50 UTC (rev 50)
@@ -1,5 +1,13 @@
2008-11-24 Stephan Holl <stephan.holl at intevation.de>
+ * packaging/rpm/osaas-10.3-gp.spec, packaging/rpm/osaas-server-path-correction.patch:
+ New. RPM-SPEC-file for OpenSuSE 10.3 building an
+ osaas-server package. It brings a patch to adopt the pathes in
+ the config-file to fullfill the needs of a GISpatcher-package
+ because OSAAS-server runs as a dedicated user (not as root).
+
+2008-11-24 Stephan Holl <stephan.holl at intevation.de>
+
* contrib/osaas: added PID-parameter to reflect the PID-file of
osaas
Added: trunk/packaging/rpm/osaas-server-path-correction.patch
===================================================================
--- trunk/packaging/rpm/osaas-server-path-correction.patch 2008-11-24 07:46:13 UTC (rev 49)
+++ trunk/packaging/rpm/osaas-server-path-correction.patch 2008-11-24 07:57:50 UTC (rev 50)
@@ -0,0 +1,17 @@
+--- server/demo-config.xml 2008-10-21 15:32:18.000000000 +0200
++++ server/demo-config.xml.new 2008-10-22 11:42:39.000000000 +0200
+@@ -7,11 +7,11 @@
+ HTTP server access log information. The error log is used to log
+ errors and debug information.
+ -->
+- <AccessLog>/var/log/osaas-access.log</AccessLog>
+- <ErrorLog>/var/log/osaas-error.log</ErrorLog>
++ <AccessLog>/var/log/osaas/osaas-access.log</AccessLog>
++ <ErrorLog>/var/log/osaas/osaas-error.log</ErrorLog>
+
+ <!-- The users database file. -->
+- <UserDB>/etc/osaas-users</UserDB>
++ <UserDB>/etc/osaas/osaas-users</UserDB>
+
+ <!-- The database connection parameters -->
+ <DBConnection>
Added: trunk/packaging/rpm/osaas-suse10.3-gp.spec
===================================================================
--- trunk/packaging/rpm/osaas-suse10.3-gp.spec 2008-11-24 07:46:13 UTC (rev 49)
+++ trunk/packaging/rpm/osaas-suse10.3-gp.spec 2008-11-24 07:57:50 UTC (rev 50)
@@ -0,0 +1,131 @@
+%define PACKAGE_NAME osaas-server
+%define PACKAGE_VERSION 1.0.0
+%define release 2+gp
+%define DIST opensuse-10.3
+%define _prefix /opt/gispatcher
+%define osaasdir %{_prefix}/osaas-server
+%define TARGET_DIR $RPM_BUILD_ROOT%{osaasdir}
+
+Summary: OSAAS is an OGC Statistics And Accounting System. It gathers data about requests made to WMS/WFS servers to support billing and statistic.
+Name: %{PACKAGE_NAME}
+Version: %{PACKAGE_VERSION}
+Release: %{release}
+Distribution: %{DIST}
+Source: %{PACKAGE_NAME}-%{PACKAGE_VERSION}.tar.gz
+Patch0: osaas-server-path-correction.patch
+License: See GPL.txt
+Group: FILLMEIN
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+Prefix: %{_prefix}
+Requires: postgresql-server
+Requires: python-psycopg2
+Requires: postgresql
+Requires: python >= 2.3
+Vendor: Intevation GmbH <info at intevation.de>
+Packager: Stephan Holl <stephan.holl at intevation.de>
+Url: http://osaas.wald.intevation.org
+
+%description
+OSAAS is an OGC Statistics And Accounting System. It gathers data
+about requests made to WMS/WFS servers to support billing and statistic.
+
+%prep
+%setup -q
+%patch0
+
+%build
+
+%install
+
+install -d %{TARGET_DIR}
+
+# copy whole lotta stuff to install
+cp -r server %{TARGET_DIR}
+cp ChangeLog %{TARGET_DIR}
+cp README.txt %{TARGET_DIR}
+
+
+# do some linking
+install -d $RPM_BUILD_ROOT/etc/osaas
+ln -s %{osaasdir}/server/demo-config.xml $RPM_BUILD_ROOT/etc/osaas/osaas-config.xml
+
+# create osaas-users file
+touch $RPM_BUILD_ROOT/etc/osaas/osaas-users
+
+# install startup-script
+install -d $RPM_BUILD_ROOT/etc/init.d
+install -d $RPM_BUILD_ROOT/sbin
+cp contrib/osaas $RPM_BUILD_ROOT/etc/init.d/osaas
+ln -s /etc/init.d/osaas $RPM_BUILD_ROOT/sbin/rcosaas
+
+# test the stuff
+python server/test/runtests.py
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+# build the user, if not exists
+%pre
+groupadd -o -r osaas >/dev/null 2>&1 || :
+useradd -M -g osaas -o -r -d %{osaasdir} -s /bin/bash \
+ -c "OSAAS-Server " osaas >/dev/null 2>&1 || :
+install -d /var/log/osaas
+install -d %{osaasdir}
+chown osaas:osaas /var/log/osaas
+chown -R osaas:osaas %{osaasdir}
+chmod 0700 /var/log/osaas
+
+%post
+if [ $1 = 1 ] ; then # initial intall
+ chkconfig --add osaas
+
+mail -s 'Configuring your OSAAS-Server' root << EOF
+Dear administrators,
+
+in order to run your OSAAS-Server, you need to configure your database and
+create an OSAAS-user.
+The needed steps are described in the following document:
+
+%{osaasdir}/server/README.txt
+
+Please follow the steps using 'initosaasdb.py' and 'adduser.py'.
+
+Best regards
+
+ The GISpatcher-team
+
+EOF
+
+fi
+
+%preun
+if [ $1 = 0 ] ; then # removal
+ /sbin/service osaas condstop >/dev/null 2>&1
+ chkconfig --del osaas
+
+ # also remove the *.pyc-files
+ find %{osaasdir} -name *.pyc |xargs rm -rf
+fi
+
+
+%files
+%defattr(-,root,root)
+%doc %{osaasdir}/README.txt
+%doc %{osaasdir}/ChangeLog
+%config /etc/osaas/osaas-config.xml
+%config /etc/osaas/osaas-users
+/etc/init.d/osaas
+/sbin/rcosaas
+%{osaasdir}/server
+%exclude %{osaasdir}/server/test
+
+%changelog
+* Fri Nov 21 2008 Stephan Holl <stephan.holl at intevation.de>
+- added dependency to python-psycopg2 (this is included in our repository,
+ since it is not found in the base-repo for OpenSuSE 10.3
+- tweacking some %post, %preun, %postun blocks.
+- added a mail to the administrator, that he needs to read the README.txt
+- removed user-deletion after uninstall
+* Tue Oct 21 2008 Stephan Holl <stephan.holl at intevation.de>
+- initial creation of this spec-file
+
More information about the Osaas-commits
mailing list