Bug 17468 - Remove koha-*-zebra scripts in favor of koha-zebra
Summary: Remove koha-*-zebra scripts in favor of koha-zebra
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact:
URL:
Keywords:
Depends on: 4880 17467 19610 20234
Blocks: 18114
  Show dependency treegraph
 
Reported: 2016-10-19 13:29 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2019-10-14 19:57 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
The new koha-zebra maintenance script replaces the old koha-start-zebra, koha-stop-zebra and koha-restart-zebra scripts. This patch removes them, while keeping backwards compatibility (i.e. you can still run them until you get used to the new syntax).
Version(s) released in:
Circulation function:


Attachments
Bug 17468: Remove koha-*-zebra scripts and its traces (21.61 KB, patch)
2016-10-19 19:22 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 17468: Create koha-*-zebra as symlinks to koha-zebra for backwards compatibility (700 bytes, patch)
2016-10-19 19:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 17468: Remove koha-*-zebra scripts and its traces (21.54 KB, patch)
2016-10-20 15:11 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 17468: Create koha-*-zebra as symlinks to koha-zebra for backwards compatibility (700 bytes, patch)
2016-10-20 15:12 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
[Backwards compatible] Bug 17468: Remove koha-*-zebra scripts and its traces (18.56 KB, patch)
2018-02-17 15:33 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 17468: Remove koha-*-zebra scripts and its traces (18.58 KB, patch)
2018-02-17 15:37 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 17468: Remove koha-*-zebra scripts and its traces (18.58 KB, patch)
2018-03-06 18:12 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2016-10-19 13:29:03 UTC

    
Comment 1 Tomás Cohen Arazi (tcohen) 2016-10-19 19:22:54 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi (tcohen) 2016-10-19 19:23:37 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi (tcohen) 2016-10-20 15:11:47 UTC Comment hidden (obsolete)
Comment 4 Tomás Cohen Arazi (tcohen) 2016-10-20 15:12:00 UTC Comment hidden (obsolete)
Comment 5 Tomás Cohen Arazi (tcohen) 2016-10-20 15:14:08 UTC
I rebased this patches on top of bug 4880, as the latter is more important for the stable branches.
Comment 6 Mark Tompsett 2016-12-30 15:54:54 UTC
Comment on attachment 56702 [details] [review]
Bug 17468: Remove koha-*-zebra scripts and its traces

Review of attachment 56702 [details] [review]:
-----------------------------------------------------------------

Where is koha-zebra?

::: debian/koha-common.bash-completion
@@ -132,5 @@
>  
> -# koha-*-zebra autocomplete with enabled instances
> -complete -F _koha_enabled_instances koha-start-zebra
> -complete -F _koha_enabled_instances koha-restart-zebra
> -complete -F _koha_enabled_instances koha-stop-zebra

Shouldn't this be:
complete -F _koha_enabled_instances koha-zebra
?

::: debian/koha-common.install
@@ -30,5 @@
>  debian/scripts/koha-run-backups             usr/sbin
>  debian/scripts/koha-shell                   usr/sbin
>  debian/scripts/koha-sitemap                 usr/sbin
> -debian/scripts/koha-start-zebra             usr/sbin
> -debian/scripts/koha-stop-zebra              usr/sbin

Shouldn't there be a:
debian/scripts/koha-zebra              usr/sbin
?
Comment 7 Tomás Cohen Arazi (tcohen) 2016-12-30 16:12:55 UTC
(In reply to M. Tompsett from comment #6)
> Comment on attachment 56702 [details] [review] [review]
> Bug 17468: Remove koha-*-zebra scripts and its traces
> 
> Review of attachment 56702 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> Where is koha-zebra?
> 
> ::: debian/koha-common.bash-completion
> @@ -132,5 @@
> >  
> > -# koha-*-zebra autocomplete with enabled instances
> > -complete -F _koha_enabled_instances koha-start-zebra
> > -complete -F _koha_enabled_instances koha-restart-zebra
> > -complete -F _koha_enabled_instances koha-stop-zebra
> 
> Shouldn't this be:
> complete -F _koha_enabled_instances koha-zebra
> ?
> 
> ::: debian/koha-common.install
> @@ -30,5 @@
> >  debian/scripts/koha-run-backups             usr/sbin
> >  debian/scripts/koha-shell                   usr/sbin
> >  debian/scripts/koha-sitemap                 usr/sbin
> > -debian/scripts/koha-start-zebra             usr/sbin
> > -debian/scripts/koha-stop-zebra              usr/sbin
> 
> Shouldn't there be a:
> debian/scripts/koha-zebra              usr/sbin
> ?

Look at the dependencies for this bug.
Comment 8 Katrin Fischer 2017-10-15 12:48:08 UTC
Hi Tomas, can you pleas add a test plan and instructions on how to test with kohadevbox? I seem to remember I need to copy the files somewhere.
Comment 9 Tomás Cohen Arazi (tcohen) 2017-10-15 23:29:27 UTC
(In reply to Katrin Fischer from comment #8)
> Hi Tomas, can you pleas add a test plan and instructions on how to test with
> kohadevbox? I seem to remember I need to copy the files somewhere.

You need to have the dependency bug, run reset _all, delete the koha-*-zebra (excluding rebuild) scripts, and create links to koha-zebra, named as the deleted commands.

Then test the 'legacy' commands still work. The dep bug, implementing koha-zebra is the juicy one. He
Comment 10 Katrin Fischer 2017-11-16 07:30:49 UTC
(In reply to Tomás Cohen Arazi from comment #9)
> (In reply to Katrin Fischer from comment #8)
> > Hi Tomas, can you pleas add a test plan and instructions on how to test with
> > kohadevbox? I seem to remember I need to copy the files somewhere.
> 
> You need to have the dependency bug, run reset _all, delete the koha-*-zebra
> (excluding rebuild) scripts, and create links to koha-zebra, named as the
> deleted commands.

That's the problem - I don't remember what to copy from where to where. Can you add a bit more detailed instructions or an example? I can try to find a place on the wiki for it.

> Then test the 'legacy' commands still work. The dep bug, implementing
> koha-zebra is the juicy one. 

That one is in now :)
Comment 11 Mark Tompsett 2018-01-19 16:09:45 UTC
Bug 20048 was added as a see also, because the --status flag was uncheckable while testing this. This, however, does seem to work just fine as a replacement for the koha-stop-zebra, koha-start-zebra, and koha-restart-zebra scripts.
Comment 12 Tomás Cohen Arazi (tcohen) 2018-02-17 15:33:16 UTC
Created attachment 71885 [details] [review]
[Backwards compatible] Bug 17468: Remove koha-*-zebra scripts and its traces

This patch removes traces from the (deprecated) koha-*-zebra scripts.

To test:
- Apply the patch
- Verify no traces of koha-*-zebra remain on the codebase (besides
  Release Notes and the koha-zebra script):
  $ cd kohaclone
  $ git grep koha-start-zebra
  $ git grep koha-stop-zebra
  $ git grep koha-restart-zebra
=> SUCCESS: No traces!
- Create the following symlinks:
  $ sudo ln -s /usr/sbin/koha-zebra  /usr/sbin/koha-start-zebra
  $ sudo ln -s /usr/sbin/koha-zebra  /usr/sbin/koha-stop-zebra
  $ sudo ln -s /usr/sbin/koha-zebra  /usr/sbin/koha-restart-zebra
- Try the koha-*-zebra commands:
  $ sudo koha-stop-zebra kohadev
  $ sudo koha-start-zebra kohadev
  $ sudo koha-restart-zebra kohadev
=> SUCCESS: They all work as expected!

- Sign off :-D!

Sponsored-by: Orex Digital
Comment 13 Tomás Cohen Arazi (tcohen) 2018-02-17 15:37:44 UTC
Created attachment 71886 [details] [review]
Bug 17468: Remove koha-*-zebra scripts and its traces

This patch removes traces from the (deprecated) koha-*-zebra scripts.

To test:
- Apply the patch
- Verify no traces of koha-*-zebra remain on the codebase (besides
  Release Notes):
  $ cd kohaclone
  $ git grep koha-start-zebra
  $ git grep koha-stop-zebra
  $ git grep koha-restart-zebra
=> SUCCESS: No traces!
- Sign off :-D!

Sponsored-by: Orex Digital
Comment 14 Tomás Cohen Arazi (tcohen) 2018-02-17 15:43:24 UTC
I consolidated this work on a single patch. But added two optional in¡mplementations:
- [Backwards compatible]: This one removes all the koha-*-zebra things, and makes use of the backward-compatibility baked inside koha-zebra so people can still use the old scripts, but will receive a gentle warning suggesting the use of koha-zebra instead.
- The second option removes everything, including the koha-zebra backwards compatibility option.

I'm more in favour of the backwards compatible version. I wished it was included in 17.11 so we had at least one release for people to see the warnings and get used to the change. koha-*-sip will have the same future.

My only problem with backwards compatibility is that I would like Mirko's opinion on the way I handled it. We can move forward anyway (it works, follows Debian's instructions, etc).

Katrin: I amended the test steps so it is easy to try the backwards compatibility.
Comment 15 Mirko Tietgen 2018-02-19 12:24:46 UTC
(In reply to Tomás Cohen Arazi from comment #14)

> My only problem with backwards compatibility is that I would like Mirko's
> opinion on the way I handled it. We can move forward anyway (it works,
> follows Debian's instructions, etc).

+1 for backwards compatibility.

I have not tested the patch yet, but the implementation makes sense to me.
Comment 16 Kyle M Hall (khall) 2018-03-06 18:12:36 UTC
Created attachment 72492 [details] [review]
Bug 17468: Remove koha-*-zebra scripts and its traces

This patch removes traces from the (deprecated) koha-*-zebra scripts.

To test:
- Apply the patch
- Verify no traces of koha-*-zebra remain on the codebase (besides
  Release Notes and the koha-zebra script):
  $ cd kohaclone
  $ git grep koha-start-zebra
  $ git grep koha-stop-zebra
  $ git grep koha-restart-zebra
=> SUCCESS: No traces!
- Create the following symlinks:
  $ sudo ln -s /usr/sbin/koha-zebra  /usr/sbin/koha-start-zebra
  $ sudo ln -s /usr/sbin/koha-zebra  /usr/sbin/koha-stop-zebra
  $ sudo ln -s /usr/sbin/koha-zebra  /usr/sbin/koha-restart-zebra
- Try the koha-*-zebra commands:
  $ sudo koha-stop-zebra kohadev
  $ sudo koha-start-zebra kohadev
  $ sudo koha-restart-zebra kohadev
=> SUCCESS: They all work as expected!

- Sign off :-D!

Sponsored-by: Orex Digital

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 17 Jonathan Druart 2018-03-26 20:34:46 UTC
Pushed to master for 18.05, thanks to everybody involved!