Porting PostgreSQL to DragonFly BSD

Started by Rumkoabout 15 years ago10 messageshackers
Jump to latest
#1Rumko
rumcic@gmail.com

From what I have checked, all work on making postgresql compile on new
platforms should be posted to this list, so here it goes.

The attached patch (also available at
http://www.rumko.net/0001-DragonFly-BSD-support.patch ) applies cleanly to the
master branch and can be cherry-picked to REL9_0_STABLE branch without
conflicts.

It's based on postgres' FreeBSD support with minimal changes (a few
freebsd->dragonfly renames, removed mips support since dragonfly does not
support it and it also includes a patch to properly define the linker on dfly
as per PR pkg/44617 in http://www.netbsd.org/support/query-pr.html gnats
database).
--
Regards,
Rumko

Attachments:

0001-DragonFly-BSD-support.patchapplication/mbox; name=0001-DragonFly-BSD-support.patchDownload+194-1
#2Peter Eisentraut
peter_e@gmx.net
In reply to: Rumko (#1)
Re: Porting PostgreSQL to DragonFly BSD

On sön, 2011-02-27 at 21:19 +0100, Rumko wrote:

The attached patch (also available at
http://www.rumko.net/0001-DragonFly-BSD-support.patch ) applies cleanly to the
master branch and can be cherry-picked to REL9_0_STABLE branch without
conflicts.

It seems to me that it would be easier to just map dragonfly to the
freebsd template.

#3Rumko
rumcic@gmail.com
In reply to: Peter Eisentraut (#2)
Re: Porting PostgreSQL to DragonFly BSD

On Sunday 27. of February 2011 23:50:17 Peter Eisentraut wrote:

On sön, 2011-02-27 at 21:19 +0100, Rumko wrote:

The attached patch (also available at
http://www.rumko.net/0001-DragonFly-BSD-support.patch ) applies cleanly
to the master branch and can be cherry-picked to REL9_0_STABLE branch
without conflicts.

It seems to me that it would be easier to just map dragonfly to the
freebsd template.

I didn't see a precedence for that kind of introduction of a new platform (all
others seem to have their own templates), so thought it would've had less
chance of being accepted.

Is it preferable to have it linked instead of having it separate like in the
current patch?
--
Regards,
Rumko

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rumko (#3)
Re: Porting PostgreSQL to DragonFly BSD

Rumko <rumcic@gmail.com> writes:

On Sunday 27. of February 2011 23:50:17 Peter Eisentraut wrote:

It seems to me that it would be easier to just map dragonfly to the
freebsd template.

I didn't see a precedence for that kind of introduction of a new platform (all
others seem to have their own templates), so thought it would've had less
chance of being accepted.

When I looked at that patch, I actually couldn't see anything different
at all from freebsd. We aren't interested in maintaining 99% duplicate
code --- it seems much easier from a maintenance standpoint to introduce
an ifdef or two into the freebsd code, rather than deal with a large cut
and paste job. Please try it that way and see what you come up with.
(It's possible that it'll be so ugly that we agree your original patch
is better, but we need to see the results of the experiment.)

regards, tom lane

#5Rumko
rumcic@gmail.com
In reply to: Tom Lane (#4)
Re: Porting PostgreSQL to DragonFly BSD

On Tuesday 1. of March 2011 16:07:47 Tom Lane wrote:

Rumko <rumcic@gmail.com> writes:

On Sunday 27. of February 2011 23:50:17 Peter Eisentraut wrote:

It seems to me that it would be easier to just map dragonfly to the
freebsd template.

I didn't see a precedence for that kind of introduction of a new platform
(all others seem to have their own templates), so thought it would've had
less chance of being accepted.

When I looked at that patch, I actually couldn't see anything different
at all from freebsd. We aren't interested in maintaining 99% duplicate
code --- it seems much easier from a maintenance standpoint to introduce
an ifdef or two into the freebsd code, rather than deal with a large cut
and paste job. Please try it that way and see what you come up with.
(It's possible that it'll be so ugly that we agree your original patch
is better, but we need to see the results of the experiment.)

regards, tom lane

Well, wouldn't consider it ugly, but the patch (attached and available at
http://www.rumko.net/0001-DragonFly-BSD-support-linked.patch ) is a lot
shorter.

Uses freebsd's template and defines the linker in Makefile.shlib.
--
Regards,
Rumko

Attachments:

0001-DragonFly-BSD-support-linked.patchtext/plain; charset="iso 8859-15"; name=0001-DragonFly-BSD-support-linked.patchDownload+13-1
#6Peter Eisentraut
peter_e@gmx.net
In reply to: Rumko (#5)
Re: Porting PostgreSQL to DragonFly BSD

On tis, 2011-03-01 at 22:22 +0100, Rumko wrote:

Well, wouldn't consider it ugly, but the patch (attached and available at
http://www.rumko.net/0001-DragonFly-BSD-support-linked.patch ) is a lot
shorter.

Uses freebsd's template and defines the linker in Makefile.shlib.

The piece in Makefile.shlib you add is dead code because PORTNAME will
never be "dragonfly" (it would be "freebsd"). I see there is a
difference between the existing freebsd code and what you propose to add
in that freebsd doesn't use shared object minor versions. Is that also
or not the case on DragonFly BSD?

#7Rumko
rumcic@gmail.com
In reply to: Peter Eisentraut (#6)
Re: Porting PostgreSQL to DragonFly BSD

On Tuesday 1. of March 2011 22:44:16 Peter Eisentraut wrote:

On tis, 2011-03-01 at 22:22 +0100, Rumko wrote:

Well, wouldn't consider it ugly, but the patch (attached and available at
http://www.rumko.net/0001-DragonFly-BSD-support-linked.patch ) is a lot
shorter.

Uses freebsd's template and defines the linker in Makefile.shlib.

The piece in Makefile.shlib you add is dead code because PORTNAME will
never be "dragonfly" (it would be "freebsd").

Ah, good to know.

I see there is a
difference between the existing freebsd code and what you propose to add
in that freebsd doesn't use shared object minor versions. Is that also
or not the case on DragonFly BSD?

Due to pkgsrc being the default on NetBSD and DragonFly BSD, it should create
the libs in the same way ... maybe instead of using PORTNAME, we could use
host_os to differentiate?
--
Regards,
Rumko

#8Rumko
rumcic@gmail.com
In reply to: Rumko (#7)
Re: Porting PostgreSQL to DragonFly BSD

On Tuesday 1. of March 2011 23:05:17 Rumko wrote:

On Tuesday 1. of March 2011 22:44:16 Peter Eisentraut wrote:

On tis, 2011-03-01 at 22:22 +0100, Rumko wrote:

Well, wouldn't consider it ugly, but the patch (attached and available
at http://www.rumko.net/0001-DragonFly-BSD-support-linked.patch ) is a
lot shorter.

Uses freebsd's template and defines the linker in Makefile.shlib.

The piece in Makefile.shlib you add is dead code because PORTNAME will
never be "dragonfly" (it would be "freebsd").

Ah, good to know.

I see there is a
difference between the existing freebsd code and what you propose to add
in that freebsd doesn't use shared object minor versions. Is that also
or not the case on DragonFly BSD?

Due to pkgsrc being the default on NetBSD and DragonFly BSD, it should
create the libs in the same way ... maybe instead of using PORTNAME, we
could use host_os to differentiate?

What about this patch (
http://www.rumko.net/0001-DragonFly-BSD-support-linked-nbsd.patch )? instead
of linking to freebsd, it's linked to netbsd and It still compiles due to the
two templates being similar enough.
--
Regards,
Rumko

Attachments:

0001-DragonFly-BSD-support-linked-nbsd.patchtext/plain; charset="iso 8859-15"; name=0001-DragonFly-BSD-support-linked-nbsd.patchDownload+2-1
#9Peter Eisentraut
peter_e@gmx.net
In reply to: Rumko (#8)
Re: Porting PostgreSQL to DragonFly BSD

On ons, 2011-03-02 at 09:10 +0100, Rumko wrote:

What about this patch (
http://www.rumko.net/0001-DragonFly-BSD-support-linked-nbsd.patch )?
instead of linking to freebsd, it's linked to netbsd and It still
compiles due to the two templates being similar enough.

Looks good. Committed.

#10Rumko
rumcic@gmail.com
In reply to: Peter Eisentraut (#9)
Re: Porting PostgreSQL to DragonFly BSD

On Wednesday 2. of March 2011 20:18:08 Peter Eisentraut wrote:

On ons, 2011-03-02 at 09:10 +0100, Rumko wrote:

What about this patch (
http://www.rumko.net/0001-DragonFly-BSD-support-linked-nbsd.patch )?
instead of linking to freebsd, it's linked to netbsd and It still
compiles due to the two templates being similar enough.

Looks good. Committed.

Thank you.
--
Regards,
Rumko