From fa3969cd22ae767be4f37fe2a464ba0b751ae3f5 Mon Sep 17 00:00:00 2001 From: Kai Krueger Date: Sat, 15 Oct 2011 03:14:15 +0000 Subject: [PATCH] [mod_tile] Update debian build scripts --- debian/changelog | 11 ++++-- debian/control | 7 ++-- debian/copyright | 54 ++++++++++++++++++++++++++++ debian/libapache2-mod-tile.config | 15 ++++++++ debian/libapache2-mod-tile.dirs | 1 + debian/libapache2-mod-tile.install | 2 ++ debian/libapache2-mod-tile.postinst | 51 ++++++++++++++++---------- debian/libapache2-mod-tile.prerm | 4 ++- debian/libapache2-mod-tile.templates | 6 ++++ debian/renderd.postinst | 2 ++ debian/rules | 2 +- debian/tileserver_site | 38 ++++++++++++++++++-- 12 files changed, 165 insertions(+), 28 deletions(-) create mode 100644 debian/libapache2-mod-tile.config create mode 100644 debian/libapache2-mod-tile.dirs create mode 100644 debian/libapache2-mod-tile.templates diff --git a/debian/changelog b/debian/changelog index 57125a4..2fe4120 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,16 @@ -libapache2-mod-tile (0.4) natty; urgency=low +libapache2-mod-tile (0.4-9~oneiric1) oneiric; urgency=low + + * added a slippymap + * added scripts to update a tileserver + + -- Kai Krueger Sun, 09 Oct 2011 00:00:00 +0000 + +libapache2-mod-tile (0.4-8~natty1) natty; urgency=low * new upstream version * fixed debian package scripts - -- Kai Krueger Tue, 20 Sep 2011 00:00:00 +0000 + -- Kai Krueger Thu, 06 Oct 2011 00:00:00 +0000 libapache2-mod-tile (0.3) jaunty; urgency=low diff --git a/debian/control b/debian/control index e8bd2d1..739b09e 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: libapache2-mod-tile Section: utils Priority: optional Maintainer: Frederik Ramm -Build-Depends: debhelper (>= 7), apache2-prefork-dev (>= 2.2.3) | apache2-threaded-dev (>= 2.2.3), libmapnik-dev, dpatch +Build-Depends: debhelper (>= 7), apache2-prefork-dev (>= 2.2.3) | apache2-threaded-dev (>= 2.2.3), libmapnik-dev | libmanik2-dev, dpatch Standards-Version: 3.9.2 Package: libapache2-mod-tile @@ -15,9 +15,10 @@ Description: Apache module to deliver tiles created by renderd Package: renderd Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libmapnik0.7 +Depends: ${shlibs:Depends}, ${misc:Depends}, libmapnik0.7 | libmapnik2 Suggests: libapache2-mod-tile -Recommends: osm2pgsql +Recommends: osm2pgsql, openstreetmap-mapnik-stylesheet-data Description: Daemon that renders map tiles using mapnik This daemon creates "metatiles" for map tile requests issued by mod_tile using the mapnik library. + diff --git a/debian/copyright b/debian/copyright index 58dee1c..a10128f 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,58 @@ +Format: http://dep.debian.net/deps/dep5 +Source: http://svn.openstreetmap.org/applications/utils/mod_tile/ + +Copyright: © 2007 - 2011, Jon Burgess +Copyright: © 2009 - 2011, Kai Krueger +Copyright: © 2009 - 2011, Frederik Ramm +Copyright: © 2008 - 2010, Tom Hughes +Copyright: © 2011, Stephan Knauss +Copyright: © 2010, Lennard voor den Dag +Copyright: © 2010, Dane Springmeyer +Copyright: © 2010, Andreas Hubel +Copyright: © 2010, Brian Quinion +Copyright: © 2009, Ævar Arnfjörð Bjarmason +Copyright: © 2009, Jochen Topf + + + +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package 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 General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +Comments: + On Debian systems, the complete text of the GNU General Public License + version 2 or later can be found in `/usr/share/common-licenses/GPL-2'. + +License: other + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose, without fee, and without a written agreement + is hereby granted, provided that the above copyright notice and this + paragraph and the following two paragraphs appear in all copies. + . + IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR + DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS + DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + . + THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO + PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + Licensed under GPL v2 or later The full license text can be found at /usr/share/common-licenses/GPL-2 Copyright 2007-2001 various authors, as per http://svn.openstreetmap.org/applications/utils/mod_tile/ + diff --git a/debian/libapache2-mod-tile.config b/debian/libapache2-mod-tile.config new file mode 100644 index 0000000..36cff0a --- /dev/null +++ b/debian/libapache2-mod-tile.config @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_input high libapache2-mod-tile/enablesite || true +db_go || true + +cat < /etc/default/libapache2-mod-tile +# Default settings for openstreetmap-mapnik-data +INIT_DB="$INIT_DB" +GRANT_USER="$GRANT_USER" +EOF + diff --git a/debian/libapache2-mod-tile.dirs b/debian/libapache2-mod-tile.dirs new file mode 100644 index 0000000..322b69b --- /dev/null +++ b/debian/libapache2-mod-tile.dirs @@ -0,0 +1 @@ +/var/www/osm/ \ No newline at end of file diff --git a/debian/libapache2-mod-tile.install b/debian/libapache2-mod-tile.install index 7064f6c..f85a527 100644 --- a/debian/libapache2-mod-tile.install +++ b/debian/libapache2-mod-tile.install @@ -3,3 +3,5 @@ debian/tile.load /etc/apache2/mods-available debian/tileserver_site /etc/apache2/sites-available/ readme.txt /usr/share/doc/libapache2-mod-tile munin/mod_tile* /usr/share/munin/plugins +openstreetmap-tiles-update-expire.sh /usr/bin/ +slippymap.html /var/www/osm diff --git a/debian/libapache2-mod-tile.postinst b/debian/libapache2-mod-tile.postinst index b7a5b2b..ff68c29 100644 --- a/debian/libapache2-mod-tile.postinst +++ b/debian/libapache2-mod-tile.postinst @@ -1,31 +1,44 @@ #!/bin/sh set -e -mkdir -p /var/lib/mod_tile -chown www-data:www-data /var/lib/mod_tile - if [ "$1" = configure ] ; then + + . /usr/share/debconf/confmodule + + mkdir -p /var/lib/mod_tile + chown www-data:www-data /var/lib/mod_tile + # only enable on new installs, not on upgrades - if [ -z "$2" ] ; then - a2enmod tile - fi + if [ -z "$2" ] ; then + a2enmod tile + db_get libapache2-mod-tile/enablesite || true + ENABLE_SITE=$RET + db_stop + if [ "x$ENABLE_SITE" = "xtrue" ] ; then + a2ensite tileserver_site + a2dissite default + fi + fi + # only restart if mod_something is enabled if [ -e /etc/apache2/mods-enabled/tile.load ] ; then invoke-rc.d apache2 restart fi -fi - -# automatically install munin plugins if munin is present. -if [ -d /etc/munin/plugins ] -then - cd /etc/munin/plugins - for i in /usr/share/munin/plugins/mod_tile* - do - if [ ! -h `basename $i` ] - then - ln -s $i . - fi - done + + # automatically install munin plugins if munin is present. + if [ -d /etc/munin/plugins ] ; then + cd /etc/munin/plugins + for i in /usr/share/munin/plugins/mod_tile* + do + if [ ! -h `basename $i` ] + then + ln -s $i . + fi + done + fi + true fi #DEBHELPER# + +exit 0 \ No newline at end of file diff --git a/debian/libapache2-mod-tile.prerm b/debian/libapache2-mod-tile.prerm index 39826a7..52b94e9 100644 --- a/debian/libapache2-mod-tile.prerm +++ b/debian/libapache2-mod-tile.prerm @@ -2,8 +2,10 @@ set -e if [ "$1" = remove ] ; then + a2dissite tileserver_site || true + a2ensite default || true a2dismod -q -f tile || true - invoke-rc.d apache2 restart + invoke-rc.d apache2 restart || true fi # automatically remove munin plugins diff --git a/debian/libapache2-mod-tile.templates b/debian/libapache2-mod-tile.templates new file mode 100644 index 0000000..9e37b1d --- /dev/null +++ b/debian/libapache2-mod-tile.templates @@ -0,0 +1,6 @@ +Template: libapache2-mod-tile/enablesite +Type: boolean +Default: true +Description: Do you want to enable mod_tile in the apache config? + This will enable the apache config for mod_tile + WARNING: This will disable the currently active default site config diff --git a/debian/renderd.postinst b/debian/renderd.postinst index 3b91fce..efb1a57 100644 --- a/debian/renderd.postinst +++ b/debian/renderd.postinst @@ -3,6 +3,8 @@ set -e mkdir -p /var/lib/mod_tile chown www-data:www-data /var/lib/mod_tile +chown www-data:www-data /usr/bin/renderd +chmod u+s /usr/bin/renderd # automatically install munin plugins if munin is present. if [ -d /etc/munin/plugins ] diff --git a/debian/rules b/debian/rules index d5fce8a..948a4c5 100755 --- a/debian/rules +++ b/debian/rules @@ -70,7 +70,7 @@ binary-arch: build install dh_installexamples dh_install # dh_installmenu -# dh_installdebconf + dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam diff --git a/debian/tileserver_site b/debian/tileserver_site index 5fe37e5..dc62464 100644 --- a/debian/tileserver_site +++ b/debian/tileserver_site @@ -2,9 +2,11 @@ # through mod_tile + ServerAdmin webmaster@localhost + ServerName tile.mytileserver.org - ServerAlias a.tile.mytileserver.org btile.mytileserver.org c.tile.mytileserver.org - DocumentRoot /var/www/html + ServerAlias a.tile.mytileserver.org b.tile.mytileserver.org c.tile.mytileserver.org + DocumentRoot /var/www ### ### @@ -110,5 +112,37 @@ ModTileThrottlingTiles 10000 1 ## Parameters (poolsize in tiles and topup rate in tiles per second) for throttling render requests. ModTileThrottlingRenders 128 0.2 + + Options FollowSymLinks + AllowOverride None + + + Options Indexes FollowSymLinks MultiViews + AllowOverride None + Order allow,deny + allow from all + + + ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ + + AllowOverride None + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch + Order allow,deny + Allow from all + + + ErrorLog ${APACHE_LOG_DIR}/error.log + + CustomLog ${APACHE_LOG_DIR}/access.log combined + + Alias /doc/ "/usr/share/doc/" + + Options Indexes MultiViews FollowSymLinks + AllowOverride None + Order deny,allow + Deny from all + Allow from 127.0.0.0/255.0.0.0 ::1/128 + +