Bugzilla – Attachment 46744 Details for
Bug 15587
Unstable letsencrypt_x.x.x-x_all.deb testing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15587 Unstable letsencrypt_x.x.x-x_all.deb testing
Bug-15587-Unstable-letsencryptxxx-xalldeb-testing.patch (text/plain), 8.65 KB, created by
Mirko Tietgen
on 2016-01-16 22:00:39 UTC
(
hide
)
Description:
Bug 15587 Unstable letsencrypt_x.x.x-x_all.deb testing
Filename:
MIME Type:
Creator:
Mirko Tietgen
Created:
2016-01-16 22:00:39 UTC
Size:
8.65 KB
patch
obsolete
>From c0220106f9e4b8cfe3a5c803b621fb4db74cac6f Mon Sep 17 00:00:00 2001 >From: Mirko Tietgen <mirko@abunchofthings.net> >Date: Sat, 16 Jan 2016 10:27:15 +0100 >Subject: [PATCH] Bug 15587 Unstable letsencrypt_x.x.x-x_all.deb testing > >Apply on top of bug 15303! > >* only one commandline parameter left: >** --letsencrypt replaces --force-https: use LE >** old --letsencrypt (folder path) obsolete >* dependency: letsencrypt debian package > >Test plan: > >- apply bug 15303 >- apply this patch >- build a package >- test in disposable vm, we're mixing releases >- install koha-common unstable and dependencies >- enable debian unstable repository >- install package letsencrypt and dependencies >- remove debian unstable repository >- create koha instance > koha-create --create-db --letsencrypt <instancename> >- follow test plan on bug 15303 where applicable >--- > C4/Auth_cas_servers.yaml.orig | 12 ------------ > debian/control.in | 3 ++- > debian/docs/koha-create.xml | 13 ++----------- > debian/scripts/koha-create | 37 ++++++++++++++++++++++--------------- > install_misc/debian.packages | 1 + > 5 files changed, 27 insertions(+), 39 deletions(-) > delete mode 100644 C4/Auth_cas_servers.yaml.orig > >diff --git a/C4/Auth_cas_servers.yaml.orig b/C4/Auth_cas_servers.yaml.orig >deleted file mode 100644 >index 8ad171e..0000000 >--- a/C4/Auth_cas_servers.yaml.orig >+++ /dev/null >@@ -1,12 +0,0 @@ >-# This file is used for authenticating against multiple CAS servers >-# If the file Auth_cas_servers.yaml exists, then the casServerUrl syspref will be ignored >- >-# If you have to authenticate against only one CAS server, which is usually the case, >-# don't use this file, but the casServerUrl syspref instead >- >-default: ServerName >---- >- ServerName: "https://example.com/cas" >- OtherServerName: "https://example.org/cas" >- ThirdServerName: "https://example.edu/cas" >- >diff --git a/debian/control.in b/debian/control.in >index ad9b891..ab61736 100644 >--- a/debian/control.in >+++ b/debian/control.in >@@ -35,7 +35,8 @@ Depends: ${misc:Depends}, ${koha:Depends}, > xmlstarlet, > yaz > Suggests: mysql-server | virtual-mysql-server, >- memcached >+ memcached, >+letsencrypt > Homepage: http://koha-community.org/ > Description: integrated (physical) library management system > Koha is an Integrated Library Management system for real-world libraries >diff --git a/debian/docs/koha-create.xml b/debian/docs/koha-create.xml >index 3f3b4d8..ad78f87 100644 >--- a/debian/docs/koha-create.xml >+++ b/debian/docs/koha-create.xml >@@ -40,8 +40,7 @@ > <arg><option>--enable-sru</option></arg> > <arg><option>--sru-port</option> port</arg> > <arg><option>--upload-path</option> directory</arg> >- <arg><option>--force-https</option></arg> >- <arg><option>--letsencrypt</option> directory</arg> >+ <arg><option>--letsencrypt</option></arg> > <arg><option>--help</option>|<option>-h</option></arg> > > <arg choice="req" rep="norepeat"><replaceable>instancename</replaceable></arg> >@@ -179,17 +178,9 @@ > </varlistentry> > > <varlistentry> >- <term><option>--force-https</option></term> >- <listitem> >- <para>Set up a https-only website</para> >- </listitem> >- </varlistentry> >- >- <varlistentry> > <term><option>--letsencrypt</option></term> > <listitem> >- <para>Specify the <option>directory</option> where letsencrypt-auto lives >- It defaults to <filename>/usr/bin</filename>.</para> >+ <para>Set up a https-only website with letsencrypt cerificates</para> > </listitem> > </varlistentry> > >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index a5f0c04..5604792 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -71,8 +71,7 @@ Options: > conjunction with --defaultsql and --populate-db. > --upload-path dir Set a user defined upload_path. It defaults to > /var/lib/koha/<instance>/uploads >- --force-https Set up a https-only site with letsencrypt certificates >- --letsencrypt Path to the letsencrypt folder >+ --letsencrypt Set up a https-only site with letsencrypt certificates > --help,-h Show this help. > > Note: the instance name cannot be longer that 11 chars. >@@ -195,11 +194,11 @@ EOM > fi > > # Check that mod_ssl is installed and enabled. >- if [ "$USE_HTTPS" = "yes" ]; then >+ if [ "$CLO_LETSENCRYPT" = "yes" ]; then > if ! /usr/sbin/apachectl -M 2> /dev/null | grep -q 'ssl_module'; then > cat 1>&2 <<EOM > >-Koha requires mod_ssl to be enabled within Apache in order to run with --force-https. >+Koha requires mod_ssl to be enabled within Apache in order to run with --letsencrypt. > Typically this can be enabled with: > > sudo a2enmod ssl >@@ -330,7 +329,7 @@ enable_sru_server() > letsencrypt_instance() > { > # Get letsencrypt certificates >- $LETSENCRYPT_PATH/letsencrypt-auto --agree-tos --renew-by-default --webroot --staging certonly \ >+ letsencrypt --agree-tos --renew-by-default --webroot --staging certonly \ > -w /usr/share/koha/opac/htdocs/ -d $opacdomain -w /usr/share/koha/intranet/htdocs/ -d $intradomain > # enable all ssl settings (apache won't start with these before certs are present) > sed -i "s:^\s*#\(\s*SSL.*\)$:\1:" "/etc/apache2/sites-available/$name.conf" >@@ -388,7 +387,6 @@ START_AUTHORITIES_RETRIEVAL_INFO="" > END_AUTHORITIES_RETRIEVAL_INFO="" > > APACHE_CONFIGFILE="" >-LETSENCRYPT_PATH="/usr/bin/" > > if [ -e /etc/koha/koha-sites.conf ] > then >@@ -397,7 +395,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:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:,force-https,letsencrypt:, \ >+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:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:,letsencrypt, \ > -n "$0" -- "$@"` > > # Note the quotes around `$TEMP': they are essential! >@@ -413,6 +411,7 @@ CLO_AUTHORITIES_INDEXING_MODE="" > CLO_MEMCACHED_SERVERS="" > CLO_MEMCACHED_PREFIX="" > CLO_UPLOAD_PATH="" >+CLO_LETSENCRYPT="" > > while true ; do > case "$1" in >@@ -454,10 +453,8 @@ while true ; do > SRU_SERVER_PORT="$2" ; shift 2 ;; > --upload-path) > CLO_UPLOAD_PATH="$2" ; shift 2 ;; >- --force-https) >- USE_HTTPS="yes" ; shift ;; > --letsencrypt) >- LETSENCRYPT_PATH="$2" ; shift 2 ;; >+ CLO_LETSENCRYPT="yes" ; shift ;; > -h|--help) > usage ; exit 0 ;; > --) >@@ -553,9 +550,19 @@ check_apache_config > opacdomain="$OPACPREFIX$name$OPACSUFFIX$DOMAIN" > intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN" > >-# Check if letsencrypt path is valid, die otherwise >-if [ ! -e "$LETSENCRYPT_PATH/letsencrypt-auto" ]; then >- die "Cannot find letsencrypt-auto in $LETSENCRYPT_PATH" >+# Check if letsencryptis installed, die otherwise >+if [ $(dpkg-query -W -f='${Status}' letsencrypt 2>/dev/null | grep -c "ok installed") -eq 0 ]; then >+ apt-cache show letsencrypt &>/dev/null >+ if [ $? -eq 0 ]; then >+ read -r -p "The letsencrypt package is not installed. Do it now? [y/N] " response >+ if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then >+ apt-get install -y letsencrypt >+ else >+ die "You have to install letsencrypt to use the --letsencrypt parameter." >+ fi >+ else >+ die "No installation candidate available for package letsencrypt." >+ fi > fi > > if [ -f $PASSWDFILE ] && [ `cat $PASSWDFILE | grep "^$name:"` ] >@@ -641,7 +648,7 @@ FLUSH PRIVILEGES; > eof > fi #` > >- if [ "$USE_HTTPS" = "yes" ]; then >+ if [ "$CLO_LETSENCRYPT" = "yes" ]; then > APACHE_CONFIGFILE="apache-site-https.conf.in" > else > APACHE_CONFIGFILE="apache-site.conf.in" >@@ -757,7 +764,7 @@ then > koha-indexer --start "$name" > fi > >- if [ "$USE_HTTPS" = "yes" ]; then >+ if [ "$CLO_LETSENCRYPT" = "yes" ]; then > # Get letsencrypt certificates > letsencrypt_instance > fi >diff --git a/install_misc/debian.packages b/install_misc/debian.packages >index c4bcb93..23d3b27 100644 >--- a/install_misc/debian.packages >+++ b/install_misc/debian.packages >@@ -8,6 +8,7 @@ idzebra-2.0 install > idzebra-2.0-common install > idzebra-2.0-doc install > idzebra-2.0-utils install >+letsencrypt install > libalgorithm-checkdigits-perl install > libanyevent-http-perl install > libanyevent-perl install >-- >2.1.4
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 15587
:
46743
| 46744