Re: [GENERAL] How to install patch.
| От | Leon |
|---|---|
| Тема | Re: [GENERAL] How to install patch. |
| Дата | |
| Msg-id | 37E2B1C0.1B9F83F6@udmnet.ru обсуждение исходный текст |
| Ответ на | How to install patch. (Daniel Stolk <stolkd@email.com>) |
| Список | pgsql-general |
Daniel Stolk wrote: > > Hi, > > I have experience with Linux, but I've never installed a patch. Do I > just go 'patch postgresql-6.5.1-6.5.2.patch'? Do I need any parameters > or do I need to be in a special directory? Basically, how do I do it? > > Thanks, Daniel Stolk As soon as there exist patches for Postgres (as for all serious systems :) probably instructions to apply the patch should go in some kind of README. Probably in the gzipped form together with the patch itself. In Linux kernel it goes in kernel README. For Postgres it is something like this: When you want to upgrade your Postgres system to the next minor version, and your version is called Postgres-X.Y.Z, you should get a patch with a name like this: postgresql-X.Y.Z-X.Y.Z+1.patch. If it is somehow packed, unpack it and move to the directory containing your root Postgres directory (not into the Postgres root directory itself). By Postgres root directory I mean a directory containing Postgres distribution. If you change into it, you can see files like README, INSTALL etc., as well as directory named src which contains sources themselves. If your root Postgres directory is called postgresql-X.Y.Z then you can do a patch with a command: patch -p0 < postgresql-X.Y.Z-X.Y.Z+1.patch If it immediately complains about missing file (make sure the 'missing' file really exists), then press Ctrl-C, and say: patch -p1 -d your-Postgres-root-dir < postgresql-X.Y.Z-X.Y.Z+1.patch If you want just to test things beforehand (like I always do), use option --dry-run. Then everything will be done except changing files. If you see warnings about 'failed hunks' it should worry you - something went wrong. In that case it is advisable to check everything twice and make sure distribution sources are intact. The full command to make a test looks like this: patch -p0 --dry-run < postgresql-X.Y.Z-X.Y.Z+1.patch > presult Then make sure file 'presult' doesn't contain 'hunk failed' warnings. If everything went Ok, change into sources dir, issue 'make clean' (though that thing should be made even before patching), then ./configure , then make, and then you have a new and shining Postgres binaries! (don't forget to install 'em :) -- Leon. ------- He knows he'll never have to answer for any of his theories actually being put to test. If they were, they would be contaminated by reality.
В списке pgsql-general по дате отправления: