From 62fd5e186d82fe46829adaf5a7aaa4600fe3e02f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 27 Sep 2017 16:19:07 -0300 Subject: [PATCH] Bug 18342: Enable memcached by default for new installs Note that there is no way to create an install without memcached. As it is now considered as stable, there is no point to not use it. Test plan: Create a new Koha install and make sure memcached is enabled by default --- Makefile.PL | 2 +- debian/docs/koha-create.xml | 15 --------------- debian/scripts/koha-create | 27 +++------------------------ debian/templates/koha-sites.conf | 4 ++-- rewrite-config.PL | 2 +- 5 files changed, 7 insertions(+), 43 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index af6ea2d..51e1119 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -481,7 +481,7 @@ my %config_defaults = ( 'PAZPAR2_PORT' => '11002', 'RUN_DATABASE_TESTS' => 'no', 'PATH_TO_ZEBRA' => '', - 'USE_MEMCACHED' => 'no', + 'USE_MEMCACHED' => 'yes', 'MEMCACHED_SERVERS' => '127.0.0.1:11211', 'MEMCACHED_NAMESPACE' => 'KOHA', 'FONT_DIR' => '/usr/share/fonts/truetype/ttf-dejavu' diff --git a/debian/docs/koha-create.xml b/debian/docs/koha-create.xml index 47b4a00..5df1893 100644 --- a/debian/docs/koha-create.xml +++ b/debian/docs/koha-create.xml @@ -29,7 +29,6 @@ en|es|fr|gr|nb|ru|uk dom|grs1 dom|grs1 - server:port namespace_prefix /path/to/some.sql @@ -150,13 +149,6 @@ - - - Make the Koha instance use memcached. . - - - - Specify a comma-separated list of host:port memcached servers for using with the created Koha instance. Defaults to , the needed configuration for a locally installed memcached server. @@ -278,13 +270,6 @@ - - - Valid values are and . If not present koha-create will default to . Also, this will be overriden by the switch. - - - - A comma-separated list of valid memcached servers. Usually in the form of . If not present koha-create will default to . Also, this will be overriden by the arguments of the switch. diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 74888bc..55157bb 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -57,7 +57,6 @@ Options: values are dom (default) and grs1. --biblio-idx idx_mode Set the indexing mode for bibliographic records. Valid values are dom (default) and grs1. - --use-memcached Set the instance to make use of memcache. --memcached-servers str Set a comma-separated list of host:port memcached servers. --memcached-prefix str Set the desired prefix for the instance memcached namespace. --enable-sru Enable the Z39.50/SRU server (default: disabled). @@ -395,7 +394,7 @@ ADMINUSER="1" PASSWDFILE="/etc/koha/passwd" # memcached variables -USE_MEMCACHED="no" +USE_MEMCACHED="yes" MEMCACHED_SERVERS="" MEMCACHED_PREFIX="" # hardcoded memcached defaults @@ -433,7 +432,7 @@ fi [ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) -TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:,letsencrypt, \ +TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:,letsencrypt, \ -n "$0" -- "$@"` # Note the quotes around `$TEMP': they are essential! @@ -461,8 +460,6 @@ while true ; do op=populate ; shift ;; -u|--use-db) op=use ; shift ;; - --use-memcached) - USE_MEMCACHED="yes" ; shift ;; --memcached-servers) CLO_MEMCACHED_SERVERS="$2" ; shift 2 ;; --memcached-prefix) @@ -572,25 +569,7 @@ NO_DB die; fi -if [ "$USE_MEMCACHED" = "yes" ]; then - set_memcached $name -elif [ "$CLO_MEMCACHED_SERVERS" != "" ] || \ - [ "$CLO_MEMCACHED_PREFIX" != "" ]; then - - MSG=`cat < 'grs1', "__RUN_DATABASE_TESTS__" => 'no', "__PATH_TO_ZEBRA__" => "", - "__USE_MEMCACHED__" => 'no', + "__USE_MEMCACHED__" => 'yes', "__MEMCACHED_SERVERS__" => "", "__MEMCACHED_NAMESPACE__" => "", "__FONT_DIR__" => "/usr/share/fonts/truetype/ttf-dejavu", -- 2.1.4