Bugzilla – Attachment 84795 Details for
Bug 22238
Remove koha-*-sip scripts in favor of koha-sip
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22238: Remove koha-*-sip scripts in favor of koha-sip
Bug-22238-Remove-koha--sip-scripts-in-favor-of-koh.patch (text/plain), 17.35 KB, created by
Kyle M Hall (khall)
on 2019-02-05 15:54:22 UTC
(
hide
)
Description:
Bug 22238: Remove koha-*-sip scripts in favor of koha-sip
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-02-05 15:54:22 UTC
Size:
17.35 KB
patch
obsolete
>From e1995e3e9cde14405fe72433955aca827a05567f Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 30 Jan 2019 15:31:43 -0300 >Subject: [PATCH] Bug 22238: Remove koha-*-sip scripts in favor of koha-sip > >This patch removes traces from the (deprecated) koha-*-sip scripts. > >To test: >- Apply the patch >- Verify no traces of koha-*-sip remain on the codebase (besides > Release Notes, koha-common.links and the koha-sip script): > $ cd kohaclone > $ git grep koha-start-sip > $ git grep koha-stop-sip > $ git grep koha-enable-sip >=> SUCCESS: No traces! >- Create the following symlinks: > $ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-start-sip > $ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-stop-sip > $ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-enable-sip >- Try the koha-*-zebra commands: > $ sudo koha-stop-sip kohadev > $ sudo koha-start-sip kohadev > $ sudo koha-restart-sip kohadev >=> SUCCESS: They all work as expected! > >- Sign off :-D! > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > debian/docs/koha-common.xml | 23 +--------- > debian/docs/koha-enable-sip.xml | 57 ------------------------- > debian/docs/koha-start-sip.xml | 53 ----------------------- > debian/docs/koha-stop-sip.xml | 52 ----------------------- > debian/koha-common.bash-completion | 8 ---- > debian/koha-common.install | 5 +-- > debian/koha-common.links | 5 ++- > debian/scripts/koha-enable-sip | 38 ----------------- > debian/scripts/koha-sip | 2 + > debian/scripts/koha-start-sip | 68 ------------------------------ > debian/scripts/koha-stop-sip | 45 -------------------- > 11 files changed, 8 insertions(+), 348 deletions(-) > delete mode 100644 debian/docs/koha-enable-sip.xml > delete mode 100644 debian/docs/koha-start-sip.xml > delete mode 100644 debian/docs/koha-stop-sip.xml > delete mode 100755 debian/scripts/koha-enable-sip > delete mode 100755 debian/scripts/koha-start-sip > delete mode 100755 debian/scripts/koha-stop-sip > >diff --git a/debian/docs/koha-common.xml b/debian/docs/koha-common.xml >index 492545b8e1..1bcf180396 100644 >--- a/debian/docs/koha-common.xml >+++ b/debian/docs/koha-common.xml >@@ -4,7 +4,7 @@ > <productname>Koha</productname> is the first free software library automation package. > <author> > <orgname>The Koha Community</orgname> >- <uri>http://koha-community.org/</uri> >+ <uri>https://koha-community.org/</uri> > </author> > </info> > >@@ -180,27 +180,6 @@ > <para>Manage the SIP server for named Koha instances.</para> > </listitem> > </varlistentry> >- >- <varlistentry> >- <term><option>koha-enable-sip</option></term> >- <listitem> >- <para>Copies the SIP configuration file to allow SIP to be controlled by init scripts.</para> >- </listitem> >- </varlistentry> >- >- <varlistentry> >- <term><option>koha-start-sip</option></term> >- <listitem> >- <para>Starts the SIP daemon for the specified Koha instances.</para> >- </listitem> >- </varlistentry> >- >- <varlistentry> >- <term><option>koha-stop-sip</option></term> >- <listitem> >- <para>Stops the SIP daemon for the specified Koha instances.</para> >- </listitem> >- </varlistentry> > </variablelist> > </refsect2> > >diff --git a/debian/docs/koha-enable-sip.xml b/debian/docs/koha-enable-sip.xml >deleted file mode 100644 >index 3ce3b09b30..0000000000 >--- a/debian/docs/koha-enable-sip.xml >+++ /dev/null >@@ -1,57 +0,0 @@ >-<article xmlns='http://docbook.org/ns/docbook'> >-<title>koha-enable-sip</title> >-<info> >- <productname>Koha</productname> is the first free software library automation package. >- <author> >- <personname> >- <firstname>Robin</firstname> >- <surname>Sheat</surname> >- </personname> >- <affiliation> >- <orgname>Catalyst IT</orgname> >- <uri>http://www.catalyst.net.nz</uri> >- </affiliation> >- <contrib>Author</contrib> >- </author> >-</info> >- >-<refentry xml:id="koha-enable-sip"> >- >- <refmeta> >- <refentrytitle>koha-enable-sip</refentrytitle> >- <manvolnum>8</manvolnum> >- </refmeta> >- >- <refnamediv> >- <refname>koha-enable-sip</refname> >- <refpurpose>Copies the SIP configuration file to allow SIP to be controlled by init scripts.</refpurpose> >- <refclass>UNIX/Linux</refclass> >- </refnamediv> >- >- <refsynopsisdiv> >- <cmdsynopsis> >- <command>koha-enable-sip</command> >- <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg> >- </cmdsynopsis> >- </refsynopsisdiv> >- >- <refsect1><title>Description</title> >- <para>This copies the default SIP configuration file /etc/koha/SIPconfig.xml to the >- /etc/koha/sites/instancename directory. This allows it to be started by >- <command>koha-start-sip(8)</command>, and <command>koha-stop-sip</command>. In turn, >- this means that it will be started on boot and stopped on shutdown.</para> >- <para>After running this, you will need to edit the newly created file to configure it >- for your site.</para> >- <para>To disable SIP again, delete or rename the configuration file.</para> >- </refsect1> >- >- <refsect1><title>See also</title> >- <simplelist type="inline"> >- <member><command>koha-start-sip(8)</command></member> >- <member><command>koha-stop-sip(8)</command></member> >- </simplelist> >- </refsect1> >- >-</refentry> >- >-</article> >diff --git a/debian/docs/koha-start-sip.xml b/debian/docs/koha-start-sip.xml >deleted file mode 100644 >index b6a18dd848..0000000000 >--- a/debian/docs/koha-start-sip.xml >+++ /dev/null >@@ -1,53 +0,0 @@ >-<article xmlns='http://docbook.org/ns/docbook'> >-<title>koha-start-sip</title> >-<info> >- <productname>Koha</productname> is the first free software library automation package. >- <author> >- <personname> >- <firstname>Robin</firstname> >- <surname>Sheat</surname> >- </personname> >- <affiliation> >- <orgname>Catalyst IT</orgname> >- <uri>http://www.catalyst.net.nz</uri> >- </affiliation> >- <contrib>Author</contrib> >- </author> >-</info> >- >-<refentry xml:id="koha-start-sip"> >- >- <refmeta> >- <refentrytitle>koha-start-sip</refentrytitle> >- <manvolnum>8</manvolnum> >- </refmeta> >- >- <refnamediv> >- <refname>koha-start-sip</refname> >- <refpurpose>Starts the SIP daemon for the specified Koha instances.</refpurpose> >- <refclass>UNIX/Linux</refclass> >- </refnamediv> >- >- <refsynopsisdiv> >- <cmdsynopsis> >- <command>koha-start-sip</command> >- <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg> >- </cmdsynopsis> >- </refsynopsisdiv> >- >- <refsect1><title>Description</title> >- <para>This will start the SIP daemon for the Koha instance specified by <arg>instancename</arg>.</para> >- <para>If the SIP configuration is not present for the supplied instance, it will be silently skipped.</para> >- <para>To enable SIP support for an instance, refer to <command>koha-enable-sip(8)</command>.</para> >- </refsect1> >- >- <refsect1><title>See also</title> >- <simplelist type="inline"> >- <member><command>koha-stop-sip(8)</command></member> >- <member><command>koha-enable-sip(8)</command></member> >- </simplelist> >- </refsect1> >- >-</refentry> >- >-</article> >diff --git a/debian/docs/koha-stop-sip.xml b/debian/docs/koha-stop-sip.xml >deleted file mode 100644 >index 3e5a1793fa..0000000000 >--- a/debian/docs/koha-stop-sip.xml >+++ /dev/null >@@ -1,52 +0,0 @@ >-<article xmlns='http://docbook.org/ns/docbook'> >-<title>koha-stop-sip</title> >-<info> >- <productname>Koha</productname> is the first free software library automation package. >- <author> >- <personname> >- <firstname>Robin</firstname> >- <surname>Sheat</surname> >- </personname> >- <affiliation> >- <orgname>Catalyst IT</orgname> >- <uri>http://www.catalyst.net.nz</uri> >- </affiliation> >- <contrib>Author</contrib> >- </author> >-</info> >- >-<refentry xml:id="koha-stop-sip"> >- >- <refmeta> >- <refentrytitle>koha-stop-sip</refentrytitle> >- <manvolnum>8</manvolnum> >- </refmeta> >- >- <refnamediv> >- <refname>koha-stop-sip</refname> >- <refpurpose>Stops the SIP daemon for the specified Koha instances.</refpurpose> >- <refclass>UNIX/Linux</refclass> >- </refnamediv> >- >- <refsynopsisdiv> >- <cmdsynopsis> >- <command>koha-stop-sip</command> >- <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg> >- </cmdsynopsis> >- </refsynopsisdiv> >- >- <refsect1><title>Description</title> >- <para>This will stop the SIP daemon for the Koha instance specified by <arg>instancename</arg>.</para> >- <para>If it's not running, an note will be displayed.</para> >- </refsect1> >- >- <refsect1><title>See also</title> >- <simplelist type="inline"> >- <member><command>koha-start-sip(8)</command></member> >- <member><command>koha-enable-sip(8)</command></member> >- </simplelist> >- </refsect1> >- >-</refentry> >- >-</article> >diff --git a/debian/koha-common.bash-completion b/debian/koha-common.bash-completion >index 56b428d447..b40ae47a3a 100644 >--- a/debian/koha-common.bash-completion >+++ b/debian/koha-common.bash-completion >@@ -98,20 +98,12 @@ _koha_sip_enabled_instances() > return 0 > } > >-# koha-*-sip autocomplete with sip-enabled instances >-complete -F _koha_sip_enabled_instances koha-start-sip >-complete -F _koha_sip_enabled_instances koha-restart-sip >-complete -F _koha_sip_enabled_instances koha-stop-sip >- > _koha_sip_disabled() > { > _koha_list_cmd "--nosip" > return 0 > } > >-# koha-enable-sip autocompletes with sip-disabled instances >-complete -F _koha_sip_disabled koha-enable-sip >- > _koha_disabled_instances() > { > _koha_list_cmd "--disabled" >diff --git a/debian/koha-common.install b/debian/koha-common.install >index 6c54fc28fa..f7068e0163 100644 >--- a/debian/koha-common.install >+++ b/debian/koha-common.install >@@ -29,13 +29,10 @@ debian/scripts/koha-reset-passwd usr/sbin > debian/scripts/koha-restore usr/sbin > debian/scripts/koha-run-backups usr/sbin > debian/scripts/koha-shell usr/sbin >+debian/scripts/koha-sip usr/sbin > debian/scripts/koha-sitemap usr/sbin > debian/scripts/koha-translate usr/sbin > debian/scripts/koha-upgrade-schema usr/sbin > debian/scripts/koha-upgrade-to-3.4 usr/sbin > debian/scripts/koha-zebra usr/sbin >-debian/scripts/koha-start-sip usr/sbin >-debian/scripts/koha-stop-sip usr/sbin >-debian/scripts/koha-enable-sip usr/sbin >-debian/scripts/koha-sip usr/sbin > debian/tmp_docbook/*.8 usr/share/man/man8 >diff --git a/debian/koha-common.links b/debian/koha-common.links >index ff81a8d748..f330f5b745 100644 >--- a/debian/koha-common.links >+++ b/debian/koha-common.links >@@ -1,3 +1,6 @@ > usr/sbin/koha-zebra usr/sbin/koha-start-zebra > usr/sbin/koha-zebra usr/sbin/koha-stop-zebra >-usr/sbin/koha-zebra usr/sbin/koha-restart-zebra >\ No newline at end of file >+usr/sbin/koha-zebra usr/sbin/koha-restart-zebra >+usr/sbin/koha-sip usr/sbin/koha-enable-sip >+usr/sbin/koha-sip usr/sbin/koha-start-sip >+usr/sbin/koha-sip usr/sbin/koha-stop-sip >diff --git a/debian/scripts/koha-enable-sip b/debian/scripts/koha-enable-sip >deleted file mode 100755 >index 1bcdd97571..0000000000 >--- a/debian/scripts/koha-enable-sip >+++ /dev/null >@@ -1,38 +0,0 @@ >-#!/bin/sh >-# >-# koha-enable-sip -- Set up the config files to allow SIP to run >-# Copyright 2012 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 <http://www.gnu.org/licenses/>. >- >-set -e >- >-for name in "$@" >-do >- if [ ! -e /etc/koha/sites/${name}/koha-conf.xml ] ; >- then >- echo "No such instance: ${name}" > /dev/stderr >- continue; >- fi >- sipfile=/etc/koha/sites/${name}/SIPconfig.xml >- if [ -e ${sipfile} ] >- then >- echo "SIP already enabled for $name" >- else >- echo "Enabling SIP for $name - edit ${sipfile} to configure" >- cp -v /etc/koha/SIPconfig.xml ${sipfile} >- chown ${name}-koha:${name}-koha ${sipfile} >- chmod 600 ${sipfile} >- fi >-done >diff --git a/debian/scripts/koha-sip b/debian/scripts/koha-sip >index da6909ba43..ef2611173d 100755 >--- a/debian/scripts/koha-sip >+++ b/debian/scripts/koha-sip >@@ -229,6 +229,8 @@ if [ "$used_script_name" != "koha-sip" ]; then > set_action "start" ;; > koha-stop-sip) > set_action "stop" ;; >+ koha-enable-sip) >+ set_action "enable" ;; > *) > break ;; > esac >diff --git a/debian/scripts/koha-start-sip b/debian/scripts/koha-start-sip >deleted file mode 100755 >index 7f4f8182bd..0000000000 >--- a/debian/scripts/koha-start-sip >+++ /dev/null >@@ -1,68 +0,0 @@ >-#!/bin/sh >-# >-# koha-start-sip -- Start SIP server for named Koha instance >-# Copyright 2012 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 <http://www.gnu.org/licenses/>. >- >-set -e >- >-# Read configuration variable file if it is present >-[ -r /etc/default/koha-common ] && . /etc/default/koha-common >- >-# include helper functions >-if [ -f "/usr/share/koha/bin/koha-functions.sh" ]; then >- . "/usr/share/koha/bin/koha-functions.sh" >-else >- echo "Error: /usr/share/koha/bin/koha-functions.sh not present." 1>&2 >- exit 1 >-fi >- >-for name in "$@" >-do >- if [ ! -e /etc/koha/sites/${name}/koha-conf.xml ] ; >- then >- echo "No such instance: ${name}" > /dev/stderr >- continue; >- fi >- [ -e /etc/koha/sites/${name}/SIPconfig.xml ] || continue >- echo "Starting SIP server for $name" >- mkdir -p /var/run/koha/${name} >- chown "${name}-koha:${name}-koha" /var/run/koha/${name} >- >- adjust_paths_dev_install $name >- export KOHA_CONF PERL5LIB >- KOHA_CONF=/etc/koha/sites/${name}/koha-conf.xml >- # PERL5LIB has been read already >- if [ "$DEV_INSTALL" = "" ]; then >- LIBDIR=$KOHA_HOME/lib >- else >- LIBDIR=$KOHA_HOME >- fi >- >- daemon \ >- --name="$name-koha-sip" \ >- --errlog="/var/log/koha/$name/sip-error.log" \ >- --stdout="/var/log/koha/$name/sip.log" \ >- --output="/var/log/koha/$name/sip-output.log" \ >- --verbose=1 \ >- --respawn \ >- --delay=30 \ >- --pidfiles="/var/run/koha/${name}" \ >- --user="$name-koha.$name-koha" \ >- -- \ >- perl \ >- "$LIBDIR/C4/SIP/SIPServer.pm" \ >- "/etc/koha/sites/${name}/SIPconfig.xml" >-done >diff --git a/debian/scripts/koha-stop-sip b/debian/scripts/koha-stop-sip >deleted file mode 100755 >index bfe7cd31c6..0000000000 >--- a/debian/scripts/koha-stop-sip >+++ /dev/null >@@ -1,45 +0,0 @@ >-#!/bin/sh >-# >-# koha-stop-sip -- Stop SIP server for named Koha instance >-# Copyright 2012 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 <http://www.gnu.org/licenses/>. >- >-set -e >- >-for name in "$@" >-do >- if [ ! -e /etc/koha/sites/${name}/koha-conf.xml ] ; >- then >- echo "No such instance: ${name}" > /dev/stderr >- continue; >- fi >- if [ ! -e /var/run/koha/${name}/${name}-koha-sip.pid ] ; >- then >- echo "SIP server for ${name} not running." >- continue; >- fi >- echo "Stopping SIP server for $name" >- daemon \ >- --name="$name-koha-sip" \ >- --errlog="/var/log/koha/$name/sip-error.log" \ >- --stdout="/var/log/koha/$name/sip.log" \ >- --output="/var/log/koha/$name/sip-output.log" \ >- --verbose=1 \ >- --respawn \ >- --delay=30 \ >- --pidfiles="/var/run/koha/${name}" \ >- --user="$name-koha.$name-koha" \ >- --stop >-done >-- >2.17.2 (Apple Git-113)
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 22238
:
84534
|
84795
|
84956