Bug 459 - No uninstall script
Summary: No uninstall script
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: master
Hardware: All All
: P4 enhancement (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-15 02:58 UTC by Chris Cormack
Modified: 2020-02-13 16:36 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:


Attachments
Untested uninstall script edited in Windows (8.36 KB, text/plain)
2012-09-21 14:52 UTC, Mark Tompsett
Details
Revised partially tested, but still a bit buggy non-patch file (11.17 KB, text/plain)
2012-09-22 12:27 UTC, Mark Tompsett
Details
Revised untested non-patch file - Prevent package uninstalls now (20.05 KB, text/plain)
2012-09-29 12:58 UTC, Mark Tompsett
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-20 23:31:27 UTC


---- Reported by mjr@ttllp.co.uk 2003-05-15 02:58:40 ----

A companion to installer.pl should be written to uninstall a koha instance. With
multiple install support, this will only become more useful.



---- Additional Comments From mjr@ttllp.co.uk 2004-04-14 11:00:47 ----

Steps given on the list by Frank Weis:

> *) Drop the Koha database
> *) remove the web sites (rm -rf /usr/local/koha if you installed in the 
> standard location)
> *) rm /etc/koha.conf
> *) rm /etc/koha-httpd.conf
> *) delete the koha related entries in the mysql users table




---- Additional Comments From jmf@liblime.com 2007-10-04 13:26:31 ----

MJ, is there an uninstall script now?



---- Additional Comments From mjr@ttllp.co.uk 2007-10-05 01:49:37 ----

There is a partial uninstall in 3.0, but the database drop still needs doing manually - that require permissions no longer given to koha.  Steps 2-4 of the above list are given by make uninstall.




---- Additional Comments From jmf@liblime.com 2008-03-17 16:42:47 ----

Re-assigning to Galen ... low priority, but on the list somewhere :-)



---- Additional Comments From koha-devel@litarena.com 2009-07-01 09:26:14 ----

(In reply to comment #0)
> A companion to installer.pl should be written to uninstall a koha instance.
> With
> multiple install support, this will only become more useful.
> 

I've been giving this utility some consideration and I believe that there's a little more to it than at first meets the eye.



---- Additional Comments From koha-devel@litarena.com 2009-07-01 13:18:29 ----

I've been giving http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=459 (No unistall script) some thought. And I've come up with what might well be a solution. I'd be interested to hear thoughts on the matter.




---- Additional Comments From chris@bigballofwax.co.nz 2009-12-10 09:41:11 ----

Can you post your thoughts here?



--- Bug imported by chris@bigballofwax.co.nz 2010-05-20 23:31 UTC  ---

This bug was previously known as _bug_ 459 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=459

Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was mjr@ttllp.co.uk.
The original assignee of this bug does not have
   an account here. Reassigning to the default assignee
   for the component, gmcharlt@gmail.com.
   Previous assignee was koha-devel@litarena.com.
CC member koha-devel@litarena.com does not have an account here

Comment 1 MJ Ray (software.coop) 2010-07-07 19:27:06 UTC
Restoring where "Previous assignee was mjr@ttllp.co.uk"
Comment 2 Mark Tompsett 2012-09-21 14:52:15 UTC Comment hidden (obsolete)
Comment 3 Mark Tompsett 2012-09-22 12:27:25 UTC Comment hidden (obsolete)
Comment 4 Mark Tompsett 2012-09-29 12:58:18 UTC
Created attachment 12606 [details]
Revised untested non-patch file - Prevent package uninstalls now

I was told that anything that even attempted a packages uninstall would not pass QA, so no packages processing (except detection) is done.

MJ Ray's security rant made me revisit sections of this to remove as many sudo's as possible. Not all have been removed.

The Ubuntu instructions create an /etc/cron.d/koha cronjob using sudo. Should all git and tarball installs use user crontab files and not /etc/cron.d /etc/cron.hourly or /etc/cron.daily? Feedback needed.
Comment 5 Liz Rea 2020-02-12 03:15:33 UTC
Why would we not use koha-remove <instance> and then apt uninstall koha-common then apt autoremove?

I'm not sure this bug needs a fix anymore? A developer is going to be using either a devbox or a koha-testing-docker; an average user hopefully will be using Debian packages as advised in our documentation, and certainly, support vendors will be using the packages as well.
Comment 6 Kyle M Hall 2020-02-13 16:36:19 UTC
(In reply to Liz Rea from comment #5)
> Why would we not use koha-remove <instance> and then apt uninstall
> koha-common then apt autoremove?
> 
> I'm not sure this bug needs a fix anymore? A developer is going to be using
> either a devbox or a koha-testing-docker; an average user hopefully will be
> using Debian packages as advised in our documentation, and certainly,
> support vendors will be using the packages as well.

I tend to agree, but isn't installation from tarball still supported?