Thread: OS/X startup scripts
Folks, The attached tarball should be unpacked in contrib/startup-scripts, and supplants PostgreSQL.darwin and StartupParameters.plist.darwin. Thanks to Mark Cotner of Reflectr <http://pgfoundry.org/projects/reflectr/> fame for this update :) I haven't included the customary diffs. This points me to some of the many deficiencies of CVS, namely that I would need write access in order to have it create a diff, and write access is boolean, which means that I can't get write access only to the parts of the tree that make sense for me to have write access to. What say we consider using Git, which includes a CVS interface, starting after 8.3 gets out the door? Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
Attachment
David Fetter <david@fetter.org> writes: > I haven't included the customary diffs. This points me to some of the > many deficiencies of CVS, namely that I would need write access in > order to have it create a diff, Strange, it works fine for everyone else. regards, tom lane
Tom Lane wrote: > David Fetter <david@fetter.org> writes: > >> I haven't included the customary diffs. This points me to some of the >> many deficiencies of CVS, namely that I would need write access in >> order to have it create a diff, >> > > Strange, it works fine for everyone else. > > > Especially if you have cvsutils installed (can be found in many places including fedora extras). cheers andrew
On Sun, May 13, 2007 at 07:04:44PM -0400, Andrew Dunstan wrote: > > > Tom Lane wrote: > >David Fetter <david@fetter.org> writes: > > > >>I haven't included the customary diffs. This points me to some of > >>the many deficiencies of CVS, namely that I would need write > >>access in order to have it create a diff, > > > >Strange, it works fine for everyone else. > > Especially if you have cvsutils installed (can be found in many > places including fedora extras). I didn't know about those, so I'll prepare a patch to the developer and documenter docs that mentions this utility :) Cheers, D -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
David Fetter <david@fetter.org> writes: > On Sun, May 13, 2007 at 07:04:44PM -0400, Andrew Dunstan wrote: >> Tom Lane wrote: >>> Strange, it works fine for everyone else. >> >> Especially if you have cvsutils installed (can be found in many >> places including fedora extras). > I didn't know about those, so I'll prepare a patch to the developer > and documenter docs that mentions this utility :) I dunno what cvsutils is, but I do know that plain old "cvs diff" works fine whether you have commit privs or not. Rather than preparing a patch to our docs, perhaps you should spend some time reading the CVS docs. regards, tom lane
On Sun, May 13, 2007 at 09:51:53PM -0400, Tom Lane wrote: > David Fetter <david@fetter.org> writes: > > On Sun, May 13, 2007 at 07:04:44PM -0400, Andrew Dunstan wrote: > >> Tom Lane wrote: > >>> Strange, it works fine for everyone else. > >> > >> Especially if you have cvsutils installed (can be found in many > >> places including fedora extras). > > > I didn't know about those, so I'll prepare a patch to the > > developer and documenter docs that mentions this utility :) > > I dunno what cvsutils is, but I do know that plain old "cvs diff" > works fine whether you have commit privs or not. Rather than > preparing a patch to our docs, perhaps you should spend some time > reading the CVS docs. cvs diff works just great until you want to add or remove a file without write permissions to the CVS repository, i.e. when you've checked out as anonymous. Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
David Fetter wrote: > cvs diff works just great until you want to add or remove a file > without write permissions to the CVS repository, i.e. when you've > checked out as anonymous. > I usually saved an untouched version of the tree to compare against, so something like: $ cvs diff -Nacr pgsql.orig pgsql gives a complete patch including added/deleted files. It is a bit primitive, but is pretty easy to do! Cheers Mark
On Sun, 2007-13-05 at 18:58 -0700, David Fetter wrote: > cvs diff works just great until you want to add or remove a file > without write permissions to the CVS repository, i.e. when you've > checked out as anonymous. Personally, I usually work against a checkout from a local mirror of the CVS repository (which you can create via cvsup or rsync). With that setup, "cvs add" and "cvs diff -N" work fine, since you can arrange for write access to the local mirror. (I'm always surprised to hear that anyone does a non-trivial amount of work on Postgres without setting up a CVS mirror...) -Neil
Heikki Linnakangas wrote: > > You need write-access to add files, even on anonymouse server. We > often get patches with new files as separate attachments because of that. > > This is the part that cvsutils fakes for you (by hacking the local cvs metadata files) so you don't need write access. cheers andrew
On Mon, May 14, 2007 at 03:31:40PM +1200, Mark Kirkwood wrote: > David Fetter wrote: > >cvs diff works just great until you want to add or remove a file > >without write permissions to the CVS repository, i.e. when you've > >checked out as anonymous. > > > > I usually saved an untouched version of the tree to compare against, > so something like: > > $ cvs diff -Nacr pgsql.orig pgsql > > gives a complete patch including added/deleted files. It is a bit > primitive, but is pretty easy to do! It's great that we have all this knowledge of how to deal with CVS's deficiencies, but at the moment, it amounts to magical lore. Until we get something better to replace it, they should be part of the docs. :) Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
David Fetter wrote: > On Mon, May 14, 2007 at 03:31:40PM +1200, Mark Kirkwood wrote: > > David Fetter wrote: > > >cvs diff works just great until you want to add or remove a file > > >without write permissions to the CVS repository, i.e. when you've > > >checked out as anonymous. > > > > > > > I usually saved an untouched version of the tree to compare against, > > so something like: > > > > $ cvs diff -Nacr pgsql.orig pgsql > > > > gives a complete patch including added/deleted files. It is a bit > > primitive, but is pretty easy to do! Except that it also includes diffs for generated files, which tend to be huge. To work around that you need to create a list of files to exclude, and the whole thing (which was cumbersome already) starts to get unmanageable. I do use the cvsup mirror myself which makes things so much easier and faster. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Alvaro Herrera wrote: > David Fetter wrote: >> On Mon, May 14, 2007 at 03:31:40PM +1200, Mark Kirkwood wrote: >>> David Fetter wrote: >>>> cvs diff works just great until you want to add or remove a file >>>> without write permissions to the CVS repository, i.e. when you've >>>> checked out as anonymous. >>>> >>> I usually saved an untouched version of the tree to compare against, >>> so something like: >>> >>> $ cvs diff -Nacr pgsql.orig pgsql >>> >>> gives a complete patch including added/deleted files. It is a bit >>> primitive, but is pretty easy to do! > > Except that it also includes diffs for generated files, which tend to be > huge. To work around that you need to create a list of files to > exclude, and the whole thing (which was cumbersome already) starts to > get unmanageable. > > I do use the cvsup mirror myself which makes things so much easier and > faster. > Not so, you just do a $ make maintainer-clean before the diff, which clears all those out. While maintaining a cvs mirror is also good, for a small piece of work (or a work on a well defined area of the code) this requires no fooling around with repositories at all (which is nice). Cheers Mark
Mark Kirkwood wrote: > Alvaro Herrera wrote: > >Except that it also includes diffs for generated files, which tend to be > >huge. To work around that you need to create a list of files to > >exclude, and the whole thing (which was cumbersome already) starts to > >get unmanageable. > > $ make maintainer-clean > > before the diff, which clears all those out. Yeah, but then if you make a mistake with the patch and have to build again to retest, you have to wait the whole thing to compile, which can be annoying. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Alvaro Herrera wrote: > Mark Kirkwood wrote: >> Alvaro Herrera wrote: > >>> Except that it also includes diffs for generated files, which tend to be >>> huge. To work around that you need to create a list of files to >>> exclude, and the whole thing (which was cumbersome already) starts to >>> get unmanageable. >> $ make maintainer-clean >> >> before the diff, which clears all those out. > > Yeah, but then if you make a mistake with the patch and have to build > again to retest, you have to wait the whole thing to compile, which can > be annoying. > True - depends on the speed of your machine as to how annoying this really is... (I'm using a PIII 1.26 GHz... takes 5 min with -O2 - good excuse for a coffee etc). However, as David brought up previously it is probably worth mentioning several of the various CVS work-arounds in the docs, so people at least get a good survey of the options - they can then choose whichever suits their needs best. Cheers Mark
On Tue, May 15, 2007 at 03:35:45PM +1200, Mark Kirkwood wrote: > Alvaro Herrera wrote: > >Mark Kirkwood wrote: > >>Alvaro Herrera wrote: > > > >>>Except that it also includes diffs for generated files, which tend to be > >>>huge. To work around that you need to create a list of files to > >>>exclude, and the whole thing (which was cumbersome already) starts to > >>>get unmanageable. > >>$ make maintainer-clean > >> > >>before the diff, which clears all those out. > > > >Yeah, but then if you make a mistake with the patch and have to build > >again to retest, you have to wait the whole thing to compile, which can > >be annoying. > > > > True - depends on the speed of your machine as to how annoying this > really is... (I'm using a PIII 1.26 GHz... takes 5 min with -O2 - good > excuse for a coffee etc). > > However, as David brought up previously it is probably worth mentioning > several of the various CVS work-arounds in the docs, so people at least > get a good survey of the options - they can then choose whichever suits > their needs best. +1... BTW, is there some trick to getting cvs diff to ignore files that aren't in the repo? -- Jim Nasby decibel@decibel.org EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
On Wed, May 16, 2007 at 09:12:23AM +0100, Heikki Linnakangas wrote: > Jim C. Nasby wrote: > >BTW, is there some trick to getting cvs diff to ignore files that > >aren't in the repo? > > Trick? That's what it does by default. I suspect he's talking about all the lines starting with '?' that diff produces. Lacking sophistication, I've been known to do: cvs diff [list of files here] |grep -v '^?' > the_file.diff Cheers, D -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
On Wed, May 16, 2007 at 09:12:23AM +0100, Heikki Linnakangas wrote: > Jim C. Nasby wrote: > >BTW, is there some trick to getting cvs diff to ignore files that aren't > >in the repo? > > Trick? That's what it does by default. Well, it throws a notice that they're there... decibel@platter.1[20:34]~/pgsql/HEAD/src:22%cvs diff ? Makefile.global ? backend/postgres ? backend/access/common/.deps ? backend/access/gin/.deps ... Granted, I could run that through grep, but I'm not sure that's 100% safe. -- Jim Nasby decibel@decibel.org EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Jim C. Nasby wrote: > On Wed, May 16, 2007 at 09:12:23AM +0100, Heikki Linnakangas wrote: > > Jim C. Nasby wrote: > > >BTW, is there some trick to getting cvs diff to ignore files that aren't > > >in the repo? > > > > Trick? That's what it does by default. > > Well, it throws a notice that they're there... > > decibel@platter.1[20:34]~/pgsql/HEAD/src:22%cvs diff > ? Makefile.global What I do is build somewhere else. Thus the only files present in the source dir and not in the repo are those generated by bison/flex, which are in .cvsignore and are thus not displayed. That said, check this out: http://www.ubiobio.cl/~gpoo/pgsql/settings/ Sadly, usage instructions are in spanish only currently, but I claim that this script is extremely useful for Pg development (sure, I wrote it and tailored to my needs). If there is interest I can translate the docs, but I have posted the script in these lists before and got no much of an interest. Michael Glaesemann did find it useful when I showed it to him in the summit, though. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
On Wed, May 16, 2007 at 03:53:22PM +0100, Gregory Stark wrote: > "David Fetter" <david@fetter.org> writes: > > > On Wed, May 16, 2007 at 09:12:23AM +0100, Heikki Linnakangas wrote: > >> Jim C. Nasby wrote: > >> >BTW, is there some trick to getting cvs diff to ignore files > >> >that aren't in the repo? > >> > >> Trick? That's what it does by default. > > > > I suspect he's talking about all the lines starting with '?' that > > diff produces. > > > > Lacking sophistication, I've been known to do: > > > > cvs diff [list of files here] |grep -v '^?' > the_file.diff > > Those lines go to stderr. Not when I do "cvs diff." Is there something I should (un)set in my .cvsrc? > If you do "cvs diff > file" it spits out all the cvs file statuses > to the terminal but dumps the diff to the file. > > It doesn't matter, diffs can contain arbitrary junk between the file > diffs. patch only looks at the things it recognizes. IMHO, the diffs also need to be human-readable, and 500 useless lines starting with "?" don't help with that. Cheers, D -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
David Fetter wrote: >>> >>> cvs diff [list of files here] |grep -v '^?' > the_file.diff >>> >> Those lines go to stderr. >> > > Not when I do "cvs diff." Is there something I should (un)set in my > .cvsrc? > > No. (The lines that go to stderr are the directory names). But I don't see why there's a problem with using the command above. Or if you prefer, use something like this to postprocess the file: perl -ni -e 'print unless /^\?/;' diff-file Bottom line - TIMTOWTDI cheers andrew
On May 16, 2007, at 9:38 , Alvaro Herrera wrote: > That said, check this out: > > http://www.ubiobio.cl/~gpoo/pgsql/settings/ > > Sadly, usage instructions are in spanish only currently, but I claim > that this script is extremely useful for Pg development (sure, I wrote > it and tailored to my needs). If there is interest I can translate > the > docs, but I have posted the script in these lists before and got no > much > of an interest. Michael Glaesemann did find it useful when I > showed it > to him in the summit, though. Ooo! Nifty! I'll have to check out what's changed. I still use this script. I find it very helpful. I can post my tweaks as well, if there's interest. Michael Glaesemann grzm seespotcode net
Michael Glaesemann wrote: > > On May 16, 2007, at 9:38 , Alvaro Herrera wrote: > > >That said, check this out: > > > >http://www.ubiobio.cl/~gpoo/pgsql/settings/ > > > >Sadly, usage instructions are in spanish only currently, but I claim > >that this script is extremely useful for Pg development (sure, I wrote > >it and tailored to my needs). If there is interest I can translate > >the > >docs, but I have posted the script in these lists before and got no > >much > >of an interest. Michael Glaesemann did find it useful when I > >showed it > >to him in the summit, though. > > Ooo! Nifty! I'll have to check out what's changed. I still use this > script. I find it very helpful. I can post my tweaks as well, if > there's interest. Yes, there is. The one thing I did not keep was the stuff about the env vars, because it didn't suit me to be copying and pasting them with the mouse. To solve the autocompletion problem you had that prompted you to tweak it, what I do is runpg 00<tab> ` Ctrl-A ` <enter> so the autocompletion works because the first work is "runpg" and not the single quote, and I enter the initial quote when the command has been completed (Ctrl-A moves to the start of the line). I can't remember if I dropped something else. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
On May 16, 2007, at 11:08 , Alvaro Herrera wrote: > I can't remember if I dropped something else. Thanks, Alvaro. I've installed Hg and pulled from the site you posted. When I get a few spare cycles I'll take a look. Btw, we should look at localization for this in the not too distant future. Or maybe I should learn Spanish :) Michael Glaesemann grzm seespotcode net
"Tom Lane" <tgl@sss.pgh.pa.us> writes: > David Fetter <david@fetter.org> writes: >> I haven't included the customary diffs. This points me to some of the >> many deficiencies of CVS, namely that I would need write access in >> order to have it create a diff, > > Strange, it works fine for everyone else. If you have rsh/ssh access to a CVS repository then you do in fact need write access just to generate diffs. It is one of the annoyances of CVS but it doesn't really matter for Postgres where we use pserver anonymous access. Personally I find CVS so terribly slow for large trees like Postgres that it's essential to use rsync to maintain a local CVS repository. That makes 'cvs diff' remarkably fast. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
Gregory Stark wrote: > "Tom Lane" <tgl@sss.pgh.pa.us> writes: > >> David Fetter <david@fetter.org> writes: >>> I haven't included the customary diffs. This points me to some of the >>> many deficiencies of CVS, namely that I would need write access in >>> order to have it create a diff, >> Strange, it works fine for everyone else. > > If you have rsh/ssh access to a CVS repository then you do in fact need write > access just to generate diffs. It is one of the annoyances of CVS but it > doesn't really matter for Postgres where we use pserver anonymous access. You need write-access to add files, even on anonymouse server. We often get patches with new files as separate attachments because of that. > Personally I find CVS so terribly slow for large trees like Postgres that it's > essential to use rsync to maintain a local CVS repository. That makes 'cvs > diff' remarkably fast. Yeah, I've done that for a long time. It's by far the best way to work with CVS, "cvs add" works, and you can do diffs, checkouts etc. offline. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
"Heikki Linnakangas" <heikki@enterprisedb.com> writes: > You need write-access to add files, even on anonymouse server. We often get > patches with new files as separate attachments because of that. Oh quite right. I had forgotten but that was the original reason I switched to using rsync. The alternative is to manually edit the Entries files to list the new files. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
On Mon, 14 May 2007, Gregory Stark wrote: > Personally I find CVS so terribly slow for large trees like Postgres that it's > essential to use rsync to maintain a local CVS repository. That makes 'cvs > diff' remarkably fast. Having recently tried to get this to work right and not quite nailed it down yet, I know it would be a help to new developers if someone using this technique would write out a suggested setup/workflow for generating patches this way. Right now the best instructions out there are those that go with the buildfarm http://pgfoundry.org/docman/view.php/1000040/4/PGBuildFarm-HOWTO.txt and those aren't quite focused right if the goal is to work on new patches while keeping in sync with the repository. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD
Jim C. Nasby wrote: > BTW, is there some trick to getting cvs diff to ignore files that aren't > in the repo? Trick? That's what it does by default. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
"David Fetter" <david@fetter.org> writes: > On Wed, May 16, 2007 at 09:12:23AM +0100, Heikki Linnakangas wrote: >> Jim C. Nasby wrote: >> >BTW, is there some trick to getting cvs diff to ignore files that >> >aren't in the repo? >> >> Trick? That's what it does by default. > > I suspect he's talking about all the lines starting with '?' that diff > produces. > > Lacking sophistication, I've been known to do: > > cvs diff [list of files here] |grep -v '^?' > the_file.diff Those lines go to stderr. If you do "cvs diff > file" it spits out all the cvs file statuses to the terminal but dumps the diff to the file. It doesn't matter, diffs can contain arbitrary junk between the file diffs. patch only looks at the things it recognizes. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
Patch applied and moved to a separate osx directory. Thanks. --------------------------------------------------------------------------- David Fetter wrote: > Folks, > > The attached tarball should be unpacked in contrib/startup-scripts, > and supplants PostgreSQL.darwin and StartupParameters.plist.darwin. > Thanks to Mark Cotner of Reflectr > <http://pgfoundry.org/projects/reflectr/> fame for this update :) > > I haven't included the customary diffs. This points me to some of the > many deficiencies of CVS, namely that I would need write access in > order to have it create a diff, and write access is boolean, which > means that I can't get write access only to the parts of the tree that > make sense for me to have write access to. > > What say we consider using Git, which includes a CVS interface, > starting after 8.3 gets out the door? > > Cheers, > David. > -- > David Fetter <david@fetter.org> http://fetter.org/ > phone: +1 415 235 3778 AIM: dfetter666 > Skype: davidfetter > > Remember to vote! > Consider donating to PostgreSQL: http://www.postgresql.org/about/donate [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +