Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file

Lists: pgsql-committerspgsql-hackers
From: scrappy(at)postgresql(dot)org (Marc G(dot) Fournier)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 02:34:48
Message-ID: 20071030023448.762D2754229@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------

simple script to pull together a very small (<500k) tar file that builds
*just* libpq ... its not perfect, as it pulls in more files then is
necessarily required to build, but as it is, it requires one simple patch
to configure.in in order to work ...

Tested on FreeBSD ... patch for configure.in hasn't been applied, but
putting the script in place so that it doesn't get lost ...

Added Files:
-----------
pgsql/src/tools:
make_libpq.sh (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/tools/make_libpq.sh?rev=1.1&content-type=text/x-cvsweb-markup)


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 14:44:12
Message-ID: 20071030144412.GE3352@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Marc G. Fournier wrote:
> Log Message:
> -----------
>
> simple script to pull together a very small (<500k) tar file that builds
> *just* libpq ... its not perfect, as it pulls in more files then is
> necessarily required to build, but as it is, it requires one simple patch
> to configure.in in order to work ...

Interesting ... may I inquire what is this for? And why was it applied
so late in the cycle, without any previous proposal or discussion?

--
Alvaro Herrera http://www.flickr.com/photos/alvherre/
"The problem with the facetime model is not just that it's demoralizing, but
that the people pretending to work interrupt the ones actually working."
(Paul Graham)


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 16:35:21
Message-ID: 13A210335A438F083881F2B4@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --On Tuesday, October 30, 2007 11:44:12 -0300 Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:

> Marc G. Fournier wrote:
>> Log Message:
>> -----------
>>
>> simple script to pull together a very small (<500k) tar file that builds
>> *just* libpq ... its not perfect, as it pulls in more files then is
>> necessarily required to build, but as it is, it requires one simple patch
>> to configure.in in order to work ...
>
> Interesting ... may I inquire what is this for? And why was it applied
> so late in the cycle, without any previous proposal or discussion?

Its in tools, and affects absolutely zilch and, since it is in tools, never
gets run, configured, touched or installed ... its a script that will pull out
a <500k tarball that builds just libpq ... *when* its finished ...

Unfortunately, it isn't usable right now, as it does require a modification to
configure.in, which I haven't applied, to avoid a link step in ecpg,
specifically:

*** configure.in Mon Oct 29 23:35:25 2007
- --- /tmp/libpq/configure.in Mon Oct 29 23:27:39 2007
***************
*** 454,459 ****
- --- 454,467 ----
AC_SUBST(with_perl)

#
+ # build libpq only
+ #
+ AC_MSG_CHECKING([only build libpq])
+ PGAC_ARG_BOOL(with, libpq_only, no, [ --with-libpq-only only build
libpq])
+ AC_MSG_RESULT([$with_libpq_only])
+ AC_SUBST(with_libpq_only)
+
+ #
# Optionally build Python modules (PL/Python)
#
AC_MSG_CHECKING([whether to build Python modules])
***************
*** 1566,1572 ****
- --- 1574,1582 ----
echo >src/include/stamp-h
])

+ if test "$with_libpq_only" != yes; then
AC_CONFIG_HEADERS([src/interfaces/ecpg/include/ecpg_config.h])
+ fi

AC_OUTPUT

If you apply that after a checkout, and do:

src/tools/make_libpq.sh
cd /tmp/libpq
./configure --with-libpq-only
cd src/interfaces/libpq
gmake
gmake install

it should build and install ... I've only tested on FreeBSD so far, and have
asked Tom to test it on his Redhat, to make sure I haven't missed anything ...
its still a bit bigger then what it has to be, as I tried to make it as least
invasive as possible ...

The idea is to get rid of the whole 'split distribution' that we're doing now,
and replace it with something alot more useful ... basically, right now, to
build pgsql with PHP, you have to download a 13M file (as well as the 7M PHP
distribution) to do it ... with this, you would only have a small file to get
the one library that is required ...

- ----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email . scrappy(at)hub(dot)org MSN . scrappy(at)hub(dot)org
Yahoo . yscrappy Skype: hub.org ICQ . 7615664
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHJ11J4QvfyHIvDvMRAuCmAKDDgmqDdL6I29hhTls9sbm3CJsiVwCg08Qg
gBp65Mn/vy5weg0DScIvqQ0=
=0CmE
-----END PGP SIGNATURE-----


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 17:36:45
Message-ID: 25264.1193765805@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

"Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:
> Unfortunately, it isn't usable right now, as it does require a modification to
> configure.in, which I haven't applied, to avoid a link step in ecpg,
> specifically:

Rather than modifying configure (and having to use a nonstandard
configure command), seems it would be better just to not remove
src/interfaces/ecpg/include/ecpg_config.h.in from the cut-down tarball.
That file is only 500 bytes ... the additions to configure to add
a switch would be more than that.

regards, tom lane


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 17:50:16
Message-ID: 25464.1193766616@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Interesting ... may I inquire what is this for? And why was it applied
> so late in the cycle, without any previous proposal or discussion?

This is an outgrowth of a core discussion that really should've been
taken public before anything was done about it. Tut tut Marc --- after
watching Jan get raked over the coals for adding a contrib module
without public discussion, did you really think this would be considered
OK?

Anyway, before any more complaints ensue: the discussion was about
whether it's still worth creating the "split tarballs" version
of Postgres releases. You can't really get away without downloading
all the sections, but we've seen more than one newbie try to do that
and get confused. The tentative conclusion among core was that we
should abandon the current split setup, but that it'd be worth seeing
if a cut-down tarball good only for building libpq could be provided.
So Marc went off to experiment with that. But we need to have a
public discussion before implementing the plan ...

regards, tom lane


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 18:07:47
Message-ID: B22FC1F5A1372EAB2C8BA366@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --On Tuesday, October 30, 2007 13:50:16 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>> Interesting ... may I inquire what is this for? And why was it applied
>> so late in the cycle, without any previous proposal or discussion?
>
> This is an outgrowth of a core discussion that really should've been
> taken public before anything was done about it. Tut tut Marc --- after
> watching Jan get raked over the coals for adding a contrib module
> without public discussion, did you really think this would be considered
> OK?

Actually, that's why I only put the script in tools, and didn't modify anything
else ... I didn't figure anyone would object to it being added in there, since,
unlike the contrib stuff, it isn't actually tied anywhere in the build
infrastructure :(

I won't object if ppl would rather I remove it ...

- ----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email . scrappy(at)hub(dot)org MSN . scrappy(at)hub(dot)org
Yahoo . yscrappy Skype: hub.org ICQ . 7615664
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHJ3Lz4QvfyHIvDvMRAgpTAJ9QBTPEJF15ZeWxUGr3snrUzWabKACeLd46
fg590FCwTK1ZIjgdFY3h2zE=
=sBN+
-----END PGP SIGNATURE-----


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 18:13:46
Message-ID: F4BF7075ECC06F16BCDCB2E4@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --On Tuesday, October 30, 2007 13:36:45 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> "Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:
>> Unfortunately, it isn't usable right now, as it does require a modification
>> to configure.in, which I haven't applied, to avoid a link step in ecpg,
>> specifically:
>
> Rather than modifying configure (and having to use a nonstandard
> configure command), seems it would be better just to not remove
> src/interfaces/ecpg/include/ecpg_config.h.in from the cut-down tarball.
> That file is only 500 bytes ... the additions to configure to add
> a switch would be more than that.

Good point ... change made to the script ...

- ----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email . scrappy(at)hub(dot)org MSN . scrappy(at)hub(dot)org
Yahoo . yscrappy Skype: hub.org ICQ . 7615664
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHJ3Ra4QvfyHIvDvMRAiowAJ40voXX/slaxKEb3Q0kQUEjgoHIYgCgnxbm
n51GVhMzFFHCNep+cNLQAOA=
=T/Oc
-----END PGP SIGNATURE-----


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 23:05:42
Message-ID: 200710310005.43060.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Marc G. Fournier wrote:
> simple script to pull together a very small (<500k) tar file that
> builds *just* libpq ... its not perfect, as it pulls in more files
> then is necessarily required to build, but as it is, it requires one
> simple patch to configure.in in order to work ...

This script is wildly insecure, unportable, random, and undocumented.
Whatever happened to the development process?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 23:10:27
Message-ID: 200710310010.28161.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Marc G. Fournier wrote:
> Actually, that's why I only put the script in tools, and didn't
> modify anything else ... I didn't figure anyone would object to it
> being added in there, since, unlike the contrib stuff, it isn't
> actually tied anywhere in the build infrastructure :(

Sure, but people who run security scanners over source archives, for
example, will notice it and will not know how it is tied in.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 23:20:16
Message-ID: 20071030162016.3c7b93c2@scratch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Wed, 31 Oct 2007 00:10:27 +0100
Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:

> Marc G. Fournier wrote:
> > Actually, that's why I only put the script in tools, and didn't
> > modify anything else ... I didn't figure anyone would object to it
> > being added in there, since, unlike the contrib stuff, it isn't
> > actually tied anywhere in the build infrastructure :(
>
> Sure, but people who run security scanners over source archives, for
> example, will notice it and will not know how it is tied in.
>

Marc has already stated that he is o.k. with removing the offending
code. Instead of flogging him, how about we just remove the code and
mark it up for over zealousness.

Sincerely,

Joshua D. Drake

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 23:39:16
Message-ID: E81CABBF90701EBE48D4363E@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --On Tuesday, October 30, 2007 16:20:16 -0700 "Joshua D. Drake"
<jd(at)commandprompt(dot)com> wrote:

> On Wed, 31 Oct 2007 00:10:27 +0100
> Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>
>> Marc G. Fournier wrote:
>> > Actually, that's why I only put the script in tools, and didn't
>> > modify anything else ... I didn't figure anyone would object to it
>> > being added in there, since, unlike the contrib stuff, it isn't
>> > actually tied anywhere in the build infrastructure :(
>>
>> Sure, but people who run security scanners over source archives, for
>> example, will notice it and will not know how it is tied in.
>>
>
> Marc has already stated that he is o.k. with removing the offending
> code. Instead of flogging him, how about we just remove the code and
> mark it up for over zealousness.

Gone from CVS ...

- ----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email . scrappy(at)hub(dot)org MSN . scrappy(at)hub(dot)org
Yahoo . yscrappy Skype: hub.org ICQ . 7615664
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHJ8Ck4QvfyHIvDvMRAvYeAJ44rMvqee2vltpkFcg2k9oCgA2kqgCfcj7p
qhGGrhAZpmvNOWbQmFsvYJo=
=d9lY
-----END PGP SIGNATURE-----


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Re: [COMMITTERS] pgsql: simple script to pull together a very small (<500k) tar file
Date: 2007-10-30 23:44:07
Message-ID: 20071030234407.GC2723@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Joshua D. Drake wrote:
> On Wed, 31 Oct 2007 00:10:27 +0100
> Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>
> > Marc G. Fournier wrote:
> > > Actually, that's why I only put the script in tools, and didn't
> > > modify anything else ... I didn't figure anyone would object to it
> > > being added in there, since, unlike the contrib stuff, it isn't
> > > actually tied anywhere in the build infrastructure :(
> >
> > Sure, but people who run security scanners over source archives, for
> > example, will notice it and will not know how it is tied in.
>
> Marc has already stated that he is o.k. with removing the offending
> code. Instead of flogging him, how about we just remove the code and
> mark it up for over zealousness.

I totally agree with the goal of removing split-dist. My vote goes for
taking the solution of removing the script, and introducing, in the
proper timing (i.e. during development, not late beta), a proper
solution (probably one involving a Make rule, similar to "make dist").

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.