Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 276125 - dev-db/postgresql 8.4 version bump
Summary: dev-db/postgresql 8.4 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal enhancement with 2 votes (vote)
Assignee: PgSQL Bugs
URL: http://www.postgresql.org/about/news....
Whiteboard:
Keywords:
: 282210 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-01 21:41 UTC by Wojciech Porczyk
Modified: 2010-02-09 23:07 UTC (History)
20 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
PostgreSQL-base-8.4 and PostgreSQL-server-8-4 overlay (postgresql84.tgz,17.04 KB, application/octet-stream)
2009-07-09 21:49 UTC, nobezprzesady
Details
docs ebuild (postgresql-docs-8.4.0.ebuild,1.10 KB, text/plain)
2009-07-10 21:21 UTC, Михаил
Details
removed PGXS, fix configure params (pg-8.4.tar.bz2,12.52 KB, application/octet-stream)
2009-07-18 17:36 UTC, Михаил
Details
Overlay archive update (postgresql.tar.bz2,13.25 KB, application/octet-stream)
2009-07-25 15:41 UTC, Emeric Verschuur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wojciech Porczyk 2009-07-01 21:41:40 UTC
Postgresql 8.4 was just released. Please consider bumping :)

Release notes: http://www.postgresql.org/docs/8.4/static/release-8-4.html
New features: http://www.postgresql.org/about/press/features84.html
Comment 1 nobezprzesady 2009-07-09 21:49:31 UTC
Created attachment 197417 [details]
PostgreSQL-base-8.4 and PostgreSQL-server-8-4 overlay
Comment 2 nobezprzesady 2009-07-09 21:52:37 UTC
Comment on attachment 197417 [details]
PostgreSQL-base-8.4 and PostgreSQL-server-8-4 overlay

This is my very first ebuild mostly based on 8.3.7 version.
Comment 3 Михаил 2009-07-10 21:21:43 UTC
Created attachment 197487 [details]
docs ebuild
Comment 4 Johan Bergström 2009-07-13 14:05:20 UTC
Nice job! Minor notes:
* Manifests contain files that doesn't exist.
* both ebuilds tell me: configure: WARNING: unrecognized options: --with-locale-dir, --without-docdir
* PG_INITDB_OPTS doesn't seem to work (same probably applies to older versions)
Comment 5 Михаил 2009-07-18 16:40:43 UTC
postgresql-server install html docs into / ))

Defining PGXS variable wipe configure parameters !!
Comment 6 Михаил 2009-07-18 17:36:05 UTC
Created attachment 198428 [details]
removed PGXS, fix configure params
Comment 7 Graham Murray 2009-07-20 07:23:45 UTC
(In reply to comment #6)
> Created an attachment (id=198428) [edit]
> removed PGXS, fix configure params
> 

Using pg-8.4.tar.bz2, postgresql-server-8.4.0 does not install
!!! newconfd: /usr/portage/local/dev-db/postgresql-server/files/postgresql.conf-8.4 does not exist
 * 
 * ERROR: dev-db/postgresql-server-8.4.0 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_install
 *             environment, line 3044:  Called die
 * The specific snippet of code:
 *       newconfd "${FILESDIR}/postgresql.conf-${SLOT}" postgresql-${SLOT} || die "Inserting conf.d-file failed";
 *  The die message:
 *   Inserting conf.d-file failed
Comment 8 Johan Bergström 2009-07-22 20:58:13 UTC
dev-db/postgresql-server/files/postgresql-conf-8.4 from the first tgz works nicely. Shall I whip up a new tarball? 

One additional error is that --config fails (below). This is most likely due to ${SLOT} still being 8.3 in the below case. Should we switch this on successful 8.4 emerge?

test # PG_INITDB_OPTS="foo" emerge --config =dev-db/postgresql-server-8.4.0

Configuring pkg...

 * You can pass options to initdb by setting the PG_INITDB_OPTS variable.
 * More information can be found here:
 *     http://www.postgresql.org/docs/8.4/static/creating-cluster.html
 *     http://www.postgresql.org/docs/8.4/static/app-initdb.html
 * Simply add the options you would have added to initdb to the PG_INITDB_OPTS variable.
 * 
 * You can change the directory where the database cluster is being created by setting
 * the PGDATA variable.
 * 
 * PG_INITDB_OPTS is currently set to:
 *     ""
 * and the database cluster will be created in:
 *     "/var/lib/postgresql/8.4/data"
 * Are you ready to continue? (Y/n)
y
 * Checking system parameters...
 * Checking whether your system supports at least 128 connections...
 * Passed.
 * Creating the data directory ...
 * Initializing the database ...
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to "english".

fixing permissions on existing directory /var/lib/postgresql/8.4/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 24MB
creating configuration files ... ok
creating template1 database in /var/lib/postgresql/8.4/data/base/1 ... initdb: input file "/usr/share/postgresql-8.3/postgres.bki" does not belong to PostgreSQL 8.4.0
Check your installation or specify the correct path using the option -L.
initdb: removing contents of data directory "/var/lib/postgresql/8.4/data"
 * 
 * You can use the '//etc/init.d/postgresql-8.4' script to run PostgreSQL instead of 'pg_ctl'.
 * 

test # /etc/init.d/postgresql-8.4 start
 * Caching service dependencies ...                                                                                                                                   [ ok ]
 * Starting PostgreSQL ...
postgres cannot access the server configuration file "/var/lib/postgresql/8.4/data/postgresql.conf": No such file or directory
waiting for server to start... done
server started
 * The pid-file doesn't exist but pg_ctl reported a running server.
 * Please check whether there is another server running on the same port or read the log-file.    
Comment 9 Emeric Verschuur 2009-07-25 15:41:50 UTC
Created attachment 199146 [details]
Overlay archive update
Comment 10 Emeric Verschuur 2009-07-25 15:46:25 UTC
Comment on attachment 199146 [details]
Overlay archive update

i have included the dev-db/postgresql-server/files/postgresql.conf-8.4 file in the pg-8.4.tar.bz2 archive and now it works fine.
Comment 11 Emeric Verschuur 2009-07-25 15:54:49 UTC
(In reply to comment #10)
> (From update of attachment 199146 [details] [edit])
> i have included the dev-db/postgresql-server/files/postgresql.conf-8.4 file in
> the pg-8.4.tar.bz2 archive and now it works fine.
> 
Oops... i have the same error on postgresql start :
postgres cannot access the server configuration file
"/var/lib/postgresql/8.4/data/postgresql.conf": No such file or directory
Comment 12 Emeric Verschuur 2009-07-26 12:48:23 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > (From update of attachment 199146 [details] [edit] [edit])
> > i have included the dev-db/postgresql-server/files/postgresql.conf-8.4 file in
> > the pg-8.4.tar.bz2 archive and now it works fine.
> > 
> Oops... i have the same error on postgresql start :
> postgres cannot access the server configuration file
> "/var/lib/postgresql/8.4/data/postgresql.conf": No such file or directory
> 

The compilation & config works with this procedure :
emerge postgresql-base only
next, eselect postgresql set-all 8.4
finaly you can emerge postgresql-server

otherwise, the binaries as initdb are compiled with some wrong path (i.e. /usr/share/postgresql-8.3/...) however, i had not localized exactly the problem yet
Comment 13 Gibheer 2009-07-27 04:36:23 UTC
works good for me, thank you for the ebuild
Comment 14 yarma 2009-07-27 11:26:55 UTC
it works perfectly for me too!

is it possible to add the "eselect postgresql set-all 8.4" in the post_install section in the postgresql-base ebuild? so emerge will not fail in the case of an "emerge --update world" ...
Comment 15 Johan Bergström 2009-07-27 14:33:13 UTC
(In reply to comment #14)
> it works perfectly for me too!
> 
> is it possible to add the "eselect postgresql set-all 8.4" in the post_install
> section in the postgresql-base ebuild? so emerge will not fail in the case of
> an "emerge --update world" ...
> 

Yeah, that would solve my issues as well.
Comment 16 Graham Murray 2009-07-28 07:10:24 UTC
(In reply to comment #12)
> The compilation & config works with this procedure :
> emerge postgresql-base only
> next, eselect postgresql set-all 8.4
> finaly you can emerge postgresql-server
> 
> otherwise, the binaries as initdb are compiled with some wrong path (i.e.
> /usr/share/postgresql-8.3/...) however, i had not localized exactly the problem
> yet

Yet, this problem did not occur when emerging postgresql-[server|base]-8.3.x while 8.2.x was active. So something must be different with 8.4.0

Comment 17 Guenther Brunthaler 2009-08-01 18:15:44 UTC
nobezprzesady, Михаил and Emeric Verschuur: Thanks a lot for the fine ebuild!

In order to make installation even more comfortable, I have taken the liberty of creating a publicly accessible layman overlay for the ebuild.

That way, everyone can easily install the ebuild with layman without a need to manually set up a local overlay.

Here are the instructions how to do it:

$ emerge -u layman '>=bzr-1.14' # Make sure dependencies are installed.
$ layman -o http://rpo.xw.ath.cx/gentoo/portage/overlays/hosted.xml -fa \
            xworld_experimental

Now you have the overlay.

Before actually installing, you most likely want to add the following entries to /etc/portage/package.keywords (replace "~amd64" by "~x86" if running a 32 Bit x86 system) for unmasking:

~dev-db/postgresql-base-8.4.0 ~amd64
~dev-db/postgresql-docs-8.4.0 ~amd64
~dev-db/postgresql-server-8.4.0 ~amd64
~virtual/postgresql-base-8.4 ~amd64
~virtual/postgresql-server-8.4 ~amd64
~app-admin/eselect-postgresql-0.3 ~amd64

Optionally, you might also want to add specific entries to /etc/portage/package.use - for instance, I did add the following:

dev-db/postgresql-base doc pg-intdatetime
dev-db/postgresql-server doc tcl uuid

If you want to replace your old PostgreSQL version with the new one, you should back-up / export your existing databases from the old version now, so you can re-import them into the new version later.

You might also consider unmerging the old version:

$ emerge -C dev-db/postgresql dev-db/libpq

Now you are ready to install the new version:

$ GENTOO_MIRRORS="" emerge -1vf =virtual/postgresql-server-8.4 # Don't try the mirrors.
$ emerge -1v =virtual/postgresql-base-8.4
$ eselect postgresql set-all 8.4
$ emerge -v =virtual/postgresql-server-8.4

That installation sequence worked well at least for me!
Comment 18 Johan Bergström 2009-08-10 14:50:06 UTC
So, how do we get this into the postgresql-experimental overlay so more people than us can try it out?
Comment 19 Guenther Brunthaler 2009-08-10 19:16:55 UTC
(In reply to comment #18)
> So, how do we get this into the postgresql-experimental overlay so more people
> than us can try it out?

Copying over the files is easy of course. But I do see a problem for people using the correct installation sequence, with emerging -base first, eselect next, and finally installing the actual server.

People really should read the instructions from this thread somehow before trying to install.

Perhaps add some prompt to the ebuild? But that would make the ebuild somewhat interactive, which I strongly despise.

The only clean solution seems to be that every step of the intended installation sequence checks for its prerequisites, and bails out with an error message if not met.

That is, the -server must check for the previous "eselect", and "eselect" must only succeed to set 8.4 if -base was installed before successfully.

However, that would require some in-depth changes to the ebuilds for sure.

Alternatively, an "eselect news" item perhaps might do as well? But that would somehow feel like a misuse of the eselect news system at least for me.
Comment 20 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-21 16:05:55 UTC
*** Bug 282210 has been marked as a duplicate of this bug. ***
Comment 21 pepone 2009-08-22 14:51:26 UTC
I have installed postgresql from the overlay ebuilds bur now i cannot install libpq, is there any ebuild to install libpq with 8.4?
Comment 22 Guenther Brunthaler 2009-08-22 16:33:39 UTC
(In reply to comment #21)
> I have installed postgresql from the overlay ebuilds bur now i cannot install
> libpq, is there any ebuild to install libpq with 8.4?

There is no need to. libpq is now part of 
>=dev-db/postgresql-base-8.4.0 - so if you managed to install the overlay ebuilds as described above, you already have it.

Feel free to unmerge the old libpq - unless you are also using an older pg version in parallel, of course.
Comment 23 Csaba Tóth 2009-09-09 11:48:12 UTC
When will this go into portage (with mask, it doesn't matter)?
Comment 24 Patrick Lauer gentoo-dev 2009-09-09 21:43:43 UTC
So I've committed the 8.4.0 ebuilds. I had a strange test failure with pg-server, so I disabled tests for now. There's a few crufty things in the current ebuilds, would be nice to make them more shiny.

Please test them and report any failures you can find!
Comment 25 Holger Hoffstätte 2009-09-09 23:21:03 UTC
(In reply to comment #24)

Hooray, a committer ;) while you're here could you bump them to 8.4.1, please? It came out today and has security fixes. Simply renaming the ebuilds works fine.
Comment 26 Guenther Brunthaler 2009-09-10 15:37:11 UTC
(In reply to comment #25)

> Hooray, a committer ;) while you're here could you bump them to 8.4.1, please?

Thanks for pointing that out.

> It came out today and has security fixes. Simply renaming the ebuilds works
> fine.

Well, almost. The patches had to updated also, resulting in the following changeset:

 postgresql-base/Manifest                            |    8 +-
 postgresql-base/files/postgresql-8.4-base.patch     |   30 +++----
 postgresql-base/files/postgresql-8.4-common.patch   |    2
 postgresql-docs/Manifest                            |    4 -
 postgresql-server/Manifest                          |    8 +-
 postgresql-server/files/postgresql-8.4-common.patch |    2
 postgresql-server/files/postgresql-8.4-server.patch |   78 ++++++++++----------
 7 files changed, 66 insertions(+), 66 deletions(-)

Anyway, I updated my overlay accordingly, and thus everything is in place now for installing 8.4.1 from there.

Here are the updated full instructions how to do it:

$ emerge -u layman '>=bzr-1.14' # Make sure dependencies are installed.
$ layman -o http://rpo.xw.ath.cx/gentoo/portage/overlays/hosted.xml -fa \
            xworld_experimental

Now you have the overlay.

Before actually installing, you most likely want to add the following entries
to /etc/portage/package.keywords (replace "~amd64" by "~x86" if running a 32
Bit x86 system) for unmasking:

~dev-db/postgresql-base-8.4.1 ~amd64
~dev-db/postgresql-docs-8.4.1 ~amd64
~dev-db/postgresql-server-8.4.1 ~amd64
~virtual/postgresql-base-8.4 ~amd64
~virtual/postgresql-server-8.4 ~amd64
~app-admin/eselect-postgresql-0.3 ~amd64

Optionally, you might also want to add specific entries to
/etc/portage/package.use - for instance, I did add the following:

dev-db/postgresql-base doc pg-intdatetime
dev-db/postgresql-server doc tcl uuid

If you want to replace your old PostgreSQL version with the new one, you should
back-up / export your existing databases from the old version now, so you can
re-import them into the new version later.

You might also consider unmerging the old version:

$ emerge -C dev-db/postgresql dev-db/libpq

Now you are ready to install the new version:

$ GENTOO_MIRRORS="" emerge -1vf =virtual/postgresql-server-8.4 # Don't try the
mirrors.
$ emerge -1v =virtual/postgresql-base-8.4
$ eselect postgresql set-all 8.4
$ emerge -v =virtual/postgresql-server-8.4

That installation sequence worked well at least for me!
Comment 27 Holger Hoffstätte 2009-09-10 16:03:10 UTC
(In reply to comment #26)
> Well, almost. The patches had to updated also, resulting in the following
> changeset:

Could you please either attach a revised snapshot or post instructions for a plain bzr clone? I don't want to use layman and just spent almost 30 minutes trying in vain to find and clone the right repository :(
Comment 28 Patrick Lauer gentoo-dev 2009-09-10 16:22:45 UTC
(In reply to comment #26)
> (In reply to comment #25)
> 
> > Hooray, a committer ;) while you're here could you bump them to 8.4.1,  please?
> 
> Thanks for pointing that out.

In-tree has been bumped to 8.4.1 too

> > It came out today and has security fixes. Simply renaming the ebuilds works
> > fine.
> 
> Well, almost. The patches had to updated also, resulting in the following
> changeset:

Uhm, that doesn't really change anything. Patches still apply, and like that you'd break 8.4.0 (if they didn't apply)... that's a no-op :)

> Anyway, I updated my overlay accordingly, and thus everything is in place now
> for installing 8.4.1 from there.
No need for it unless you offer some functional fixes (which I'd apply to the in-tree ebuilds if they are sane)
 
> If you want to replace your old PostgreSQL version with the new one, you should
> back-up / export your existing databases from the old version now, so you can
> re-import them into the new version later.
Luckily for us postgres is now slotted, so that can be done "whenever you need it"
 
Comment 29 Guenther Brunthaler 2009-09-10 16:27:34 UTC
(In reply to comment #27)

> Could you please either attach a revised snapshot or post instructions for a
> plain bzr clone? I don't want to use layman and just spent almost 30 minutes
> trying in vain to find and clone the right repository :(

Sure. In order to obtain a copy of the overlay tree, execute

$ bzr branch
http://rpo.xw.ath.cx/bzr/adm/portage/overlays/xworld_experimental_540tn7vd8i21ic827szb7zxe2
xworld_experimental

(enter this command as a single line in case the output in the posting has been
broken down into multiple lines)

This will create a subdirectory "xworld_experimental" in your current
direcectory which contains the files from the overlay.

As a side note for future situations like this, it is always easy to find out
the required bzr source repository URL even without using layman:

Just open the .xml file specified in the instructions for the layman command
directly using a web browser.

It will show an XML text file and you can find all the source URLs in the
"src"-attribute of the <overlay> element for all the overlays listed in that
file.

You then just do a

$ bzr branch <url> <localname>

and you will be getting the files from the overlay.
Comment 30 Guenther Brunthaler 2009-09-10 16:41:06 UTC
(In reply to comment #28)
> In-tree has been bumped to 8.4.1 too

That's great! :-)

> Uhm, that doesn't really change anything. Patches still apply, and like that
> you'd break 8.4.0 (if they didn't apply)... that's a no-op :)

Well, I guess most of the changes just referred to the base directory names which will be stripped by patch -p1 anyway.

But I remember at least one change to some of the Autotools files where a version number "8.4.0" was present literally; in my updated patches this has been changed to 8.4.1 also.

I have no idea whether that version number is being used anywhere at all, but I just wanted to play safe.

> No need for it unless you offer some functional fixes (which I'd apply to the
> in-tree ebuilds if they are sane)

No I didn't change anything important; I just wanted to bump the version as there was no 8.4.1 in the official tree at that time... if I had known you were about to update so quickly too, I certainly would not have done it in my overlay also.

So, cheers and keep up the good work!