Distribution making - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Distribution making
Date
Msg-id Pine.LNX.4.21.0007101837490.28566-100000@localhost.localdomain
Whole thread Raw
Responses Re: Distribution making  (Karel Zak <zakkr@zf.jcu.cz>)
Re: Distribution making  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Distribution making  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
I've been collecting a few ideas for integrating the distribution making
process into the build system. (I did take a look at the mk-release and
mk-snapshot scripts on hub.org as well.) I have a trial implementation
which works well, except that it doesn't build the documentation.

1. Instead of the release_prep script we have a new target `distprep'.
Those makefiles that want to build something for the distribution can
simply implement this target. This is nice because you have the distprep
and the correspondng distclean target in the same file. To make a
distribution-ready tree, you do

./configure
make distprep
make distclean

2. In order to get rid of the CVS directories (and anything else you don't
want to ship, like _deadcode) and get the directory name straight,
*without* clobbering your checked out tree, I create a directory
"postgresql-$(VERSION)" and copy the files I want to distribute in there.
The conceptual procedure is

# use your already configured tree
make distprep
mkdir postgresql-$(VERSION)
copy all files from . into postgresql-$(VERSION), expect those you don't want
make -C postgresql-$(VERSION) distclean

This is done by `make distdir'.

3. `make dist' depends on distdir, tars up the prepared tree, and leaves a
file postgresql-$(VERSION).tar.gz, which you can give to your friends.

4. If you got an extra half hour you can run `make distcheck', which:

* makes a distribution, using make dist
* unpacks the distribution
* runs configure
* runs make -q distprep, to check whether the files you just prepared for distribution are really still up to date
* builds and installs everything
* runs make uninstall and checks whether it really uninstalled everything
* makes another distribution from this test tree
* checks whether this distribution is sufficiently similar to the previous one (i.e., same files, same size)

This approach should guard against the common tarball making problems:
misnamed top-level directory, missing files, funky timestamps, etc.


If there's any interest in this I can commit it so you can take a look. It
doesn't affect anything else (including release_prep).

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: "Mark Hollomon"
Date:
Subject: Re: Re: postgres TODO
Next
From: Peter Eisentraut
Date:
Subject: Re: libpq work