Uninstall scripts for contrib

Started by David Fetterover 20 years ago17 messagespatches
Jump to latest
#1David Fetter
david@fetter.org

Folks,

Please find attached a patch against CVS TIP which adds an uninstall
script in SQL for each of the things where it would be appropriate.
Contrib modules that already have an uninstall script are left as-is,
as are ones which create stand-alone executeables, as I believe that
we need to discuss what an uninstall script (if any) would look like
for those.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

Attachments:

contrib_uninstall.difftext/plain; charset=us-asciiDownload+45-28
#2Neil Conway
neilc@samurai.com
In reply to: David Fetter (#1)
Re: Uninstall scripts for contrib

On Sun, 2006-01-15 at 20:08 -0800, David Fetter wrote:

*** contrib/chkpass/Makefile    27 Sep 2005 17:13:00 -0000      1.7
--- contrib/chkpass/Makefile    14 Jan 2006 23:16:03 -0000
***************
*** 1,9 ****
! # $PostgreSQL: pgsql/contrib/chkpass/Makefile,v 1.6 2004/08/20
20:13:02 momjian Exp $

MODULE_big = chkpass
OBJS = chkpass.o
SHLIB_LINK = $(filter -lcrypt, $(LIBS))
DATA_built = chkpass.sql
DOCS = README.chkpass

ifdef USE_PGXS
--- 1,10 ----
! # $PostgreSQL: pgsql/contrib/chkpass/Makefile,v 1.7 2005/09/27
17:13:00 tgl Exp $

MODULE_big = chkpass
OBJS = chkpass.o
SHLIB_LINK = $(filter -lcrypt, $(LIBS))
DATA_built = chkpass.sql
+ DATA = uninstall.sql
DOCS = README.chkpass

ifdef USE_PGXS

The change to $PostgreSQL$ is bogus (perhaps due to the way you setup
cvsup?), as are all the other $PostgreSQL$ changes in the patch. Also,
the patch doesn't actually add any files called "uninstall.sql".

-Neil

#3David Fetter
david@fetter.org
In reply to: Neil Conway (#2)
Re: Uninstall scripts for contrib

On Mon, Jan 16, 2006 at 12:13:11AM -0500, Neil Conway wrote:

On Sun, 2006-01-15 at 20:08 -0800, David Fetter wrote:

ifdef USE_PGXS

The change to $PostgreSQL$ is bogus (perhaps due to the way you
setup cvsup?), as are all the other $PostgreSQL$ changes in the
patch. Also, the patch doesn't actually add any files called
"uninstall.sql".

Oops. My FM R'ing skills need some work. This patch includes the
files.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

Attachments:

contrib_uninstall.difftext/plain; charset=us-asciiDownload+1238-28
#4Bruce Momjian
bruce@momjian.us
In reply to: David Fetter (#3)
Re: Uninstall scripts for contrib

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------

David Fetter wrote:

On Mon, Jan 16, 2006 at 12:13:11AM -0500, Neil Conway wrote:

On Sun, 2006-01-15 at 20:08 -0800, David Fetter wrote:

ifdef USE_PGXS

The change to $PostgreSQL$ is bogus (perhaps due to the way you
setup cvsup?), as are all the other $PostgreSQL$ changes in the
patch. Also, the patch doesn't actually add any files called
"uninstall.sql".

Oops. My FM R'ing skills need some work. This patch includes the
files.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#5Peter Eisentraut
peter_e@gmx.net
In reply to: David Fetter (#3)
Re: Uninstall scripts for contrib

Am Montag, 16. Januar 2006 06:55 schrieb David Fetter:

Oops. My FM R'ing skills need some work. This patch includes the
files.

This patch is rather useless because all the uninstall.sql files install on
top of each other. I suggest naming them cube_uninstall.sql
dblink_uninstall.sql etc.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#6David Fetter
david@fetter.org
In reply to: Peter Eisentraut (#5)
Re: Uninstall scripts for contrib

On Thu, Jan 19, 2006 at 02:22:17PM +0100, Peter Eisentraut wrote:

Am Montag, 16. Januar 2006 06:55 schrieb David Fetter:

Oops. My FM R'ing skills need some work. This patch includes the
files.

This patch is rather useless because all the uninstall.sql files
install on top of each other. I suggest naming them
cube_uninstall.sql dblink_uninstall.sql etc.

It's paper bag time for me. How about a new patch which gives each
contrib project its own directory and places them there?

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

#7Peter Eisentraut
peter_e@gmx.net
In reply to: David Fetter (#6)
Re: Uninstall scripts for contrib

David Fetter wrote:

It's paper bag time for me. How about a new patch which gives each
contrib project its own directory and places them there?

This would presumably imply that the installation scripts would be
renamed to install.sql. On a green field this might make sense but as
it is maybe it would break too much without much benefit?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#8David Fetter
david@fetter.org
In reply to: Peter Eisentraut (#7)
Re: Uninstall scripts for contrib

On Thu, Jan 19, 2006 at 07:08:28PM +0100, Peter Eisentraut wrote:

David Fetter wrote:

It's paper bag time for me. How about a new patch which gives
each contrib project its own directory and places them there?

This would presumably imply that the installation scripts would be
renamed to install.sql. On a green field this might make sense but
as it is maybe it would break too much without much benefit?

You're right. I'll send a patch this evening my time that renames
each to [module_name]_uninstall.sql.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

#9Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#7)
Re: Uninstall scripts for contrib

Peter Eisentraut <peter_e@gmx.net> writes:

David Fetter wrote:

It's paper bag time for me. How about a new patch which gives each
contrib project its own directory and places them there?

This would presumably imply that the installation scripts would be
renamed to install.sql. On a green field this might make sense but as
it is maybe it would break too much without much benefit?

I agree, the current setup is not broken and doesn't need to be fixed.

What *is* broken is the contrib documentation install layout, though,
because of the modules that have additional documentation in
sub-directories. Any thoughts what to do about that?

regards, tom lane

#10Bruce Momjian
bruce@momjian.us
In reply to: David Fetter (#3)
Re: Uninstall scripts for contrib

Removed at submitter request.

---------------------------------------------------------------------------

David Fetter wrote:

On Mon, Jan 16, 2006 at 12:13:11AM -0500, Neil Conway wrote:

On Sun, 2006-01-15 at 20:08 -0800, David Fetter wrote:

ifdef USE_PGXS

The change to $PostgreSQL$ is bogus (perhaps due to the way you
setup cvsup?), as are all the other $PostgreSQL$ changes in the
patch. Also, the patch doesn't actually add any files called
"uninstall.sql".

Oops. My FM R'ing skills need some work. This patch includes the
files.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#11Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: David Fetter (#8)
Re: Uninstall scripts for contrib

On Thu, Jan 19, 2006 at 11:48:54AM -0800, David Fetter wrote:

On Thu, Jan 19, 2006 at 07:08:28PM +0100, Peter Eisentraut wrote:

David Fetter wrote:

It's paper bag time for me. How about a new patch which gives
each contrib project its own directory and places them there?

This would presumably imply that the installation scripts would be
renamed to install.sql. On a green field this might make sense but
as it is maybe it would break too much without much benefit?

You're right. I'll send a patch this evening my time that renames
each to [module_name]_uninstall.sql.

ISTM there's a pretty good usecase for going per-directory down the
road. IIRC we already decided to do that for doc directories, and now
that we'd have 2 scripts (_install and _uninstall) it seems a good idea
for that as well.

For backwards compatability maybe an install option that also installed
the old-style _install.sql script would be adequate? Perhaps this could
default to on for 8.2, off for 8.3 and gone for 8.4...
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

#12David Fetter
david@fetter.org
In reply to: David Fetter (#3)
Re: Uninstall scripts for contrib

On Sun, Jan 15, 2006 at 09:55:39PM -0800, David Fetter wrote:

On Mon, Jan 16, 2006 at 12:13:11AM -0500, Neil Conway wrote:

On Sun, 2006-01-15 at 20:08 -0800, David Fetter wrote:

ifdef USE_PGXS

The change to $PostgreSQL$ is bogus (perhaps due to the way you
setup cvsup?), as are all the other $PostgreSQL$ changes in the
patch. Also, the patch doesn't actually add any files called
"uninstall.sql".

Oops. My FM R'ing skills need some work. This patch includes the
files.

Next: naming files so they don't clobber each other.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

Attachments:

contrib_uninstall.difftext/plain; charset=us-asciiDownload+45-28
#13Bruce Momjian
bruce@momjian.us
In reply to: David Fetter (#12)
Re: Uninstall scripts for contrib

David Fetter wrote:

On Sun, Jan 15, 2006 at 09:55:39PM -0800, David Fetter wrote:

On Mon, Jan 16, 2006 at 12:13:11AM -0500, Neil Conway wrote:

On Sun, 2006-01-15 at 20:08 -0800, David Fetter wrote:

ifdef USE_PGXS

The change to $PostgreSQL$ is bogus (perhaps due to the way you
setup cvsup?), as are all the other $PostgreSQL$ changes in the
patch. Also, the patch doesn't actually add any files called
"uninstall.sql".

Oops. My FM R'ing skills need some work. This patch includes the
files.

Next: naming files so they don't clobber each other.

I have updated your patch to remove the $PostgreSQL$ tags, but I still
do not see the uninstall files in the patch.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/pgpatches/contribtext/plainDownload+17-0
#14David Fetter
david@fetter.org
In reply to: Bruce Momjian (#13)
Re: Uninstall scripts for contrib

On Sat, Feb 11, 2006 at 11:37:49PM -0500, Bruce Momjian wrote:

David Fetter wrote:

On Sun, Jan 15, 2006 at 09:55:39PM -0800, David Fetter wrote:

On Mon, Jan 16, 2006 at 12:13:11AM -0500, Neil Conway wrote:

On Sun, 2006-01-15 at 20:08 -0800, David Fetter wrote:

ifdef USE_PGXS

The change to $PostgreSQL$ is bogus (perhaps due to the way you
setup cvsup?), as are all the other $PostgreSQL$ changes in the
patch. Also, the patch doesn't actually add any files called
"uninstall.sql".

Oops. My FM R'ing skills need some work. This patch includes the
files.

Next: naming files so they don't clobber each other.

I have updated your patch to remove the $PostgreSQL$ tags, but I still
do not see the uninstall files in the patch.

This one should do it.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

Attachments:

contrib_uninstall.difftext/plain; charset=us-asciiDownload+1238-28
#15Peter Eisentraut
peter_e@gmx.net
In reply to: David Fetter (#14)
Re: Uninstall scripts for contrib

David Fetter wrote:

This one should do it.

This patch fails to apply all over the place. Please fix it so we don't
have to sort out the chunks manually.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#16David Fetter
david@fetter.org
In reply to: Peter Eisentraut (#15)
Re: Uninstall scripts for contrib

On Sat, Feb 18, 2006 at 07:08:15PM +0100, Peter Eisentraut wrote:

David Fetter wrote:

This one should do it.

This patch fails to apply all over the place.

It applied just fine against the CVSup version. This one should apply
against CVS TIP.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

Attachments:

contrib_uninstall.difftext/plain; charset=us-asciiDownload+1210-0
#17Peter Eisentraut
peter_e@gmx.net
In reply to: David Fetter (#16)
Re: Uninstall scripts for contrib

Am Mittwoch, 22. Februar 2006 08:31 schrieb David Fetter:

It applied just fine against the CVSup version. This one should apply
against CVS TIP.

Done.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/