From 7f4ba5a4e6ef99e1c97682fdfacb7e65c168bd25 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Thu, 19 May 2011 20:57:23 +1200 Subject: [PATCH] Bug 6361 - make the packages work with koha 3.4 This commit does the following: * Merge the changelog from the releases of 3.2 * Adds a command 'koha-upgrade-to-3.4' that does the MARC item splitting stuff. * Adds a debconf note to make sure people know that they need to run the above command. * Fixes the inclusion of jQuery in the packages. * Makes build-git-snapshot build packages with a 3.5 version. Signed-off-by: Chris Cormack --- debian/build-git-snapshot | 2 +- debian/changelog | 40 +++++++++++++++++++++++++++++ debian/control | 4 ++- debian/control.in | 1 + debian/koha-common.config | 26 +++++++++++++++++++ debian/koha-common.install | 1 + debian/koha-common.postinst | 6 ++++ debian/koha-common.templates | 10 +++++++ debian/rules | 12 ++++---- debian/scripts/koha-upgrade-to-3.4 | 49 ++++++++++++++++++++++++++++++++++++ 10 files changed, 143 insertions(+), 8 deletions(-) create mode 100755 debian/koha-common.config create mode 100644 debian/koha-common.templates create mode 100755 debian/scripts/koha-upgrade-to-3.4 diff --git a/debian/build-git-snapshot b/debian/build-git-snapshot index 4768719..3847024 100755 --- a/debian/build-git-snapshot +++ b/debian/build-git-snapshot @@ -30,7 +30,7 @@ latest_sha1() { } newversion() { - printf '3.3-1~git%s.%s' $(date +%Y%m%d%H%M%S) $(latest_sha1) + printf '3.5-1~git%s.%s' $(date +%Y%m%d%H%M%S) $(latest_sha1) } adjust_debian_changelog() { diff --git a/debian/changelog b/debian/changelog index f710ca5..7a01bb1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,43 @@ +koha (3.2.9-1) squeeze; urgency=high + + * New upstream release (3.02.09) + * This is a security release, see + http://lists.katipo.co.nz/pipermail/koha/2011-May/029046.html + + -- Robin Sheat Tue, 17 May 2011 16:09:09 +1200 + +koha (3.2.7-1) squeeze; urgency=low + + * New upstream release (3.02.07) + + -- Robin Sheat Tue, 19 Apr 2011 14:35:49 +1200 + +koha (3.2.6-1) squeeze; urgency=low + + * New upstream release (3.02.06) + + -- Robin Sheat Tue, 29 Mar 2011 14:38:28 +1300 + +koha (3.2.5-1) squeeze; urgency=high + + * New upstream release (3.02.05) + * This is a security release, see + http://lists.katipo.co.nz/pipermail/koha/2011-February/027771.html + + -- Robin Sheat Fri, 25 Feb 2011 11:39:21 +1300 + +koha (3.2.3-1) squeeze; urgency=low + + * New upstream release (3.02.03) + + -- Robin Sheat Tue, 08 Feb 2011 10:50:10 +1300 + +koha (3.2.2-1) squeeze; urgency=low + + * New upstream release (3.02.02) + + -- Robin Sheat Sun, 09 Jan 2011 19:42:04 +1300 + koha (3.2.1-1) squeeze; urgency=low * New upstream release. diff --git a/debian/control b/debian/control index add095f..19f1edc 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,8 @@ Standards-Version: 3.8.4 # NOTA BENE: Build dependencies end up as runtime dependencies as well. # See debian/rules, the override_dh_gencontrol rules. # There are some exceptions. -Build-Depends: libalgorithm-checkdigits-perl, +Build-Depends: libcgi-session-driver-memcached-perl, + libalgorithm-checkdigits-perl, libauthen-cas-client-perl, libbiblio-endnotestyle-perl, libbusiness-isbn-perl, @@ -86,6 +87,7 @@ Depends: ${misc:Depends}, ${koha:Depends}, apache2-mpm-itk, at, daemon, + debconf, idzebra-2.0, libjs-jquery, libjs-yui, diff --git a/debian/control.in b/debian/control.in index 090b7b3..2c14de9 100644 --- a/debian/control.in +++ b/debian/control.in @@ -16,6 +16,7 @@ Depends: ${misc:Depends}, ${koha:Depends}, apache2-mpm-itk, at, daemon, + debconf, idzebra-2.0, libjs-jquery, libjs-yui, diff --git a/debian/koha-common.config b/debian/koha-common.config new file mode 100755 index 0000000..8d480ff --- /dev/null +++ b/debian/koha-common.config @@ -0,0 +1,26 @@ +#!/bin/sh + +# koha-common.config - ensures that debconf stuff is all handled properly +# +# Copyright 2011 Catalyst IT, Ltd +# +# This program 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 3 of the License, or +# (at your option) any later version. +# +# This program 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 program. If not, see . + +set -e + +. /usr/share/debconf/confmodule + +db_input high koha-common/3.2-3.4-upgrade-notice || true +db_go + diff --git a/debian/koha-common.install b/debian/koha-common.install index 6ed2587..a970719 100644 --- a/debian/koha-common.install +++ b/debian/koha-common.install @@ -25,4 +25,5 @@ debian/scripts/koha-restore usr/sbin debian/scripts/koha-start-zebra usr/sbin debian/scripts/koha-stop-zebra usr/sbin debian/scripts/koha-upgrade-schema usr/sbin +debian/scripts/koha-upgrade-to-3.4 usr/sbin debian/scripts/*.8 usr/share/man/man8 diff --git a/debian/koha-common.postinst b/debian/koha-common.postinst index 64a7980..7fa4513 100644 --- a/debian/koha-common.postinst +++ b/debian/koha-common.postinst @@ -2,6 +2,8 @@ set -e +. /usr/share/debconf/confmodule + conf=/etc/mysql/koha-common.cnf if [ ! -e "$conf" ] && [ ! -L "$conf" ] then @@ -11,3 +13,7 @@ fi #DEBHELPER# koha-upgrade-schema $(koha-list) + +db_stop + +exit 0 diff --git a/debian/koha-common.templates b/debian/koha-common.templates new file mode 100644 index 0000000..f88449e --- /dev/null +++ b/debian/koha-common.templates @@ -0,0 +1,10 @@ +Template: koha-common/3.2-3.4-upgrade-notice +Type: note +Description: koha-common upgrade actions required + If you are upgrading from a Koha 3.2 to 3.4 release, you must run: + sudo /usr/sbin/koha-upgrade-to-3.4 + . + For large catalogues, running this may take a while. Your Koha installation + should be largely operational during the process, but some things, + particularly to do with items, may appear strange until the upgrade and + re-index is complete. diff --git a/debian/rules b/debian/rules index 25f111a..1b20293 100755 --- a/debian/rules +++ b/debian/rules @@ -19,12 +19,12 @@ override_dh_auto_install: rm -r $(TMP)/var/run rm -r $(TMP)/var/lock rm $(TMP)/var/log/koha/README - rm $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js - ln -s /usr/share/javascript/jquery/jquery.js \ - $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js - rm $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js - ln -s /usr/share/javascript/jquery/jquery.js \ - $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js +# rm $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js +# ln -s /usr/share/javascript/jquery/jquery.js \ +# $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js +# rm $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js +# ln -s /usr/share/javascript/jquery/jquery.js \ +# $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js rm -r \ $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce ln -s /usr/share/tinymce2/www \ diff --git a/debian/scripts/koha-upgrade-to-3.4 b/debian/scripts/koha-upgrade-to-3.4 new file mode 100755 index 0000000..45650c1 --- /dev/null +++ b/debian/scripts/koha-upgrade-to-3.4 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# koha-upgrade-to-3.4 - performs the necessary changes to upgrade a Koha +# system from 3.2 to 3.4 +# +# Copyright 2011 Catalyst IT, Ltd +# +# This program 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 3 of the License, or +# (at your option) any later version. +# +# This program 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 program. If not, see . + +TO_UPGRADE=$@ + +if [ -z "$TO_UPGRADE" ] ; +then + TO_UPGRADE=`koha-list` +fi + +if [ -z "$TO_UPGRADE" ] ; +then + echo "No Koha instances were found to upgrade." + exit +fi + +cat <