Thread: Some patches to enhance the contrib build

Some patches to enhance the contrib build

From
Martin Pitt
Date:
Hi PostgreSQL developers!

The current Debian package has some patches that tweak the building of
contrib modules. I think they would be interesting for other
distributions, too. Most of this stuff was contributed by users who
actually use these modules.

25contrib-dbmirror:=20
 - additionally install some useful scripts and data files

25contrib-enablemysql:
 - enable mysql module build
 - add Makefile
 - fix hashbang of mysql2pgsql

25contrib-enableoracle:
 - enable oracle module build
 - add Makefile
 - patch ora2pg.pl to look for Ora2Pg.pm additionally in the path
   where ora2pg.pl is installed

25contrib-enablexml:
 - enable xml module build
 - Makefile: add CFLAGS for "-I/usr/include/libxml2" to allow building

26dbf2pg-errorcheck:
 - add better error checking to dbf2pg

27dbf2pg-textfield:
 - add dbf2pg support for the dbase field 'M' which corresponds to
   PostgreSQL's TEXT field

Do you consider adopting them in the official version?

Thanks a lot and have a nice day!

Martin
--=20
Martin Pitt                       http://www.piware.de
Ubuntu Developer            http://www.ubuntulinux.org
Debian GNU/Linux Developer       http://www.debian.org

Re: Some patches to enhance the contrib build

From
Neil Conway
Date:
On Mon, 2004-11-01 at 10:49, Martin Pitt wrote:
> The current Debian package has some patches that tweak the building of
> contrib modules. I think they would be interesting for other
> distributions, too. Most of this stuff was contributed by users who
> actually use these modules.

Thanks for letting us know.

BTW, the information in postgresql-7.4.6/debian/copyright is out of date
(old download URL, old PostgreSQL copyright dates & the regex copyright
should be updated per the license in src/backend/regex/COPYRIGHT).

20pg_dump_datestyle seems redundant (we already set DateStyle to ISO in
pg_dump).

> 25contrib-dbmirror:
>  - additionally install some useful scripts and data files

Makes sense to me, although I won't claim to be a dbmirror user. I'll
apply this to HEAD unless anyone objects.

> 25contrib-enablexml:
>  - enable xml module build
>  - Makefile: add CFLAGS for "-I/usr/include/libxml2" to allow building

ISTM the right fix is to use xml2-config.

> 25contrib-enablemysql:
>  - enable mysql module build
>  - add Makefile
>  - fix hashbang of mysql2pgsql
>
> 25contrib-enableoracle:
>  - enable oracle module build
>  - add Makefile
>  - patch ora2pg.pl to look for Ora2Pg.pm additionally in the path
>    where ora2pg.pl is installed
>
> 26dbf2pg-errorcheck:
>  - add better error checking to dbf2pg
>
> 27dbf2pg-textfield:
>  - add dbf2pg support for the dbase field 'M' which corresponds to
>    PostgreSQL's TEXT field

I can't find these patches in this diff:

http://ftp.debian.org/debian/pool/main/p/postgresql/postgresql_7.4.6-2.diff.gz

could you tell me where to find them?

-Neil

Re: Some patches to enhance the contrib build

From
Tom Lane
Date:
Neil Conway <neilc@samurai.com> writes:
> On Mon, 2004-11-01 at 10:49, Martin Pitt wrote:
>> 25contrib-dbmirror:
>> - additionally install some useful scripts and data files

> Makes sense to me, although I won't claim to be a dbmirror user. I'll
> apply this to HEAD unless anyone objects.

Steve Singer, the author and maintainer of dbmirror, is still around...
so it would be polite to get his concurrence first.

            regards, tom lane

Re: Some patches to enhance the contrib build

From
Martin Pitt
Date:
Hi again!

Martin Pitt [2004-11-01  9:04 +0100]:
> Neil Conway [2004-11-01 14:06 +1100]:
> > 20pg_dump_datestyle seems redundant (we already set DateStyle to ISO in
> > pg_dump).

I will look at this and remove it if appropriate. Thanks for the hint.

> > ISTM the right fix is to use xml2-config.
>=20
> Right, replacing the -I option with `xml2-config --cflags` works fine
> and seems to be more portable. Fixed in arch head.

BTW, I actually used

  CFLAGS +=3D $(shell xml2-config --cflags)

in the current patch. I do not really know which is more portable,
using backticks to call xml2-config at compiler invocation time, or
using the $(shell ) syntax which seems GNU make specific. Both wors,
your choice :-)

Martin
--=20
Martin Pitt                       http://www.piware.de
Ubuntu Developer            http://www.ubuntulinux.org
Debian GNU/Linux Developer       http://www.debian.org

Re: Some patches to enhance the contrib build

From
Martin Pitt
Date:
(Sorry if you get thise message twice; the first time I accidentially
used my @debian.org address, which is not subscribed).

Hi Neil!

Neil Conway [2004-11-01 14:06 +1100]:
> BTW, the information in postgresql-7.4.6/debian/copyright is out of date
> (old download URL, old PostgreSQL copyright dates & the regex copyright
> should be updated per the license in src/backend/regex/COPYRIGHT).

Oh, thanks for that hint. Fixed in arch head.

> 20pg_dump_datestyle seems redundant (we already set DateStyle to ISO in
> pg_dump).
>=20
> > 25contrib-dbmirror:=20
> >  - additionally install some useful scripts and data files
>=20
> Makes sense to me, although I won't claim to be a dbmirror user. I'll
> apply this to HEAD unless anyone objects.

I do not use it myself, but adding a few scripts to the installation
does not break anything and it was found useful by an user.

> > 25contrib-enablexml:
> >  - enable xml module build
> >  - Makefile: add CFLAGS for "-I/usr/include/libxml2" to allow building
>=20
> ISTM the right fix is to use xml2-config.

Right, replacing the -I option with `xml2-config --cflags` works fine
and seems to be more portable. Fixed in arch head.

> > 25contrib-enablemysql:
> >  - enable mysql module build
> >  - add Makefile
> >  - fix hashbang of mysql2pgsql
> >=20
> > 25contrib-enableoracle:
> >  - enable oracle module build
> >  - add Makefile
> >  - patch ora2pg.pl to look for Ora2Pg.pm additionally in the path
> >    where ora2pg.pl is installed
> >=20
> > 26dbf2pg-errorcheck:
> >  - add better error checking to dbf2pg
> >=20
> > 27dbf2pg-textfield:
> >  - add dbf2pg support for the dbase field 'M' which corresponds to
> >    PostgreSQL's TEXT field
>=20
> I can't find these patches in this diff:>=20
> http://ftp.debian.org/debian/pool/main/p/postgresql/postgresql_7.4.6-2.di=
ff.gz
>=20
> could you tell me where to find them?

Right now only in arch head:
http://arch.debian.org/arch/pkg-postgresql/postgresql/

The three 25contrib* were split out of the 25contrib patch currently
in 7.4.6-2. The dbf2pg patches were added by me yesterday. I will
probably make a new upload soon, though.

Thanks for considering and have a nice day!

Martin

--=20
Martin Pitt                       http://www.piware.de
Ubuntu Developer            http://www.ubuntulinux.org
Debian GNU/Linux Developer       http://www.debian.org

Re Some patches to enhance the contrib build

From
ssinger@navtechinc.com
Date:
On Sun, 31 Oct 2004, Tom Lane wrote:

I don't have a problem with the make file changes.

> Neil Conway <neilc@samurai.com> writes:
> > On Mon, 2004-11-01 at 10:49, Martin Pitt wrote:
> >> 25contrib-dbmirror:
> >> - additionally install some useful scripts and data files
>
> > Makes sense to me, although I won't claim to be a dbmirror user. I'll
> > apply this to HEAD unless anyone objects.
>
> Steve Singer, the author and maintainer of dbmirror, is still around...
> so it would be polite to get his concurrence first.
>
>             regards, tom lane
>

--
Steven Singer                                       ssinger@navtechinc.com
Dispatch Systems                            Phone:  519-747-1170 ext 282
Navtech Systems Support Inc.                AFTN:   CYYZXNSX SITA: YYZNSCR
Waterloo, Ontario                           ARINC:  YKFNSCR