Bugzilla – Attachment 28474 Details for
Bug 12312
3.16 packages ask to change Apache configuration even if Apache version is < 2.4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12312 - correctly upgrade under apache 2.2
Bug-12312---correctly-upgrade-under-apache-22.patch (text/plain), 3.19 KB, created by
Robin Sheat
on 2014-05-26 02:00:35 UTC
(
hide
)
Description:
Bug 12312 - correctly upgrade under apache 2.2
Filename:
MIME Type:
Creator:
Robin Sheat
Created:
2014-05-26 02:00:35 UTC
Size:
3.19 KB
patch
obsolete
>From a8114c240752bcc0d60433e70d48ad2ddbce7d38 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Mon, 26 May 2014 13:28:00 +1200 >Subject: [PATCH] Bug 12312 - correctly upgrade under apache 2.2 > >As the way we need to reference apache instance names has now changed >between 2.2 and 2.4, we need to try it out both ways to make sure we get >it right. > >This also allows koha-create/koha-disable to try the .conf version of >the name if the first one doesn't work. > >To test: >* Create an instance on an apache 2.2 system with koha < 3.16 >* Upgrade to 3.16 with this patch, saying 'yes' to the renaming question >** Make sure you don't see the warning: Warning: problem enabling $site > in Apache >* Do a 'service apache2 restart' >* Make sure you can still access the instance >* Make sure that /etc/apache2/sites-enabled/instance.conf exists as a link > to /etc/apache2/sites-available/instance.conf >* Check that koha-create and koha-remove behave like you'd expect. > >Note: >* If you need to make debconf forget that it asked you the question > about renaming so that it'll do it again, then run: > echo "unregister koha-common/rename-apache-vhost-files" | sudo debconf-communicate koha-common >* 'debconf-show koha-common' will show you the current debconf > configuration. >--- > debian/koha-common.postinst | 5 ++++- > debian/scripts/koha-create | 7 ++++++- > debian/scripts/koha-remove | 2 +- > 3 files changed, 11 insertions(+), 3 deletions(-) > >diff --git a/debian/koha-common.postinst b/debian/koha-common.postinst >index 5b6967f..86c9404 100644 >--- a/debian/koha-common.postinst >+++ b/debian/koha-common.postinst >@@ -119,7 +119,10 @@ EOF > "/etc/apache2/sites-available/$site.conf" > > if [ "$ENABLE_VHOST" = "yes" ]; then >- if ! a2ensite $site > /dev/null 2>&1; then >+ if ! { >+ a2ensite "$site" > /dev/null 2>&1 || >+ a2ensite "${site}.conf" > /dev/null 2>&1 >+ }; then > echo "Warning: problem enabling $site in Apache" >&2 > fi > fi >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index 1556051..14a6a45 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -619,7 +619,12 @@ fi > if [ "$op" = create ] || [ "$op" = populate ] || [ "$op" = use ] > then > # Reconfigure Apache. >- a2ensite "$name" >+ if ! { >+ a2ensite "$name" > /dev/null 2>&1 || >+ a2ensite "${name}.conf" > /dev/null 2>&1 >+ }; then >+ echo "Warning: problem enabling $name in Apache" >&2 >+ fi > service apache2 restart > > # Start Zebra. >diff --git a/debian/scripts/koha-remove b/debian/scripts/koha-remove >index 38c6c85..528db75 100755 >--- a/debian/scripts/koha-remove >+++ b/debian/scripts/koha-remove >@@ -104,7 +104,7 @@ eof > rm -r "/var/run/koha/$name" > getent passwd "$name-koha" > /dev/null && deluser --quiet "$name-koha" > # in case the site has already been disabled, we don't want to break the loop now. >- a2dissite "$name" || /bin/true >+ a2dissite "$name" > /dev/null 2>&1 || a2dissite "${name}.conf" > /dev/null 2>&1 || /bin/true > done > > service apache2 restart >-- >1.8.3.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12312
: 28474