mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
A PostgreSQL release tarball contains a number of prebuilt files, in particular files produced by bison, flex, perl, and well as html and man documentation. We have done this consistent with established practice at the time to not require these tools for building from a tarball. Some of these tools were hard to get, or get the right version of, from time to time, and shipping the prebuilt output was a convenience to users. Now this has at least two problems: One, we have to make the build system(s) work in two modes: Building from a git checkout and building from a tarball. This is pretty complicated, but it works so far for autoconf/make. It does not currently work for meson; you can currently only build with meson from a git checkout. Making meson builds work from a tarball seems very difficult or impossible. One particular problem is that since meson requires a separate build directory, we cannot make the build update files like gram.h in the source tree. So if you were to build from a tarball and update gram.y, you will have a gram.h in the source tree and one in the build tree, but the way things work is that the compiler will always use the one in the source tree. So you cannot, for example, make any gram.y changes when building from a tarball. This seems impossible to fix in a non-horrible way. Second, there is increased interest nowadays in precisely tracking the origin of software. We can reasonably track contributions into the git tree, and users can reasonably track the path from a tarball to packages and downloads and installs. But what happens between the git tree and the tarball is obscure and in some cases non-reproducible. The solution for both of these issues is to get rid of the step that adds prebuilt files to the tarball. The tarball now only contains what is in the git tree (*). Getting the additional build dependencies is no longer a problem nowadays, and the complications to keep these dual build modes working are significant. And of course we want to get the meson build system working universally. This commit removes the make distprep target altogether. The make dist target continues to do its job, it just doesn't call distprep anymore. (*) - The tarball also contains the INSTALL file that is built at make dist time, but not by distprep. This is unchanged for now. The make maintainer-clean target, whose job it is to remove the prebuilt files in addition to what make distclean does, is now just an alias to make distprep. (In practice, it is probably obsolete given that git clean is available.) The following programs are now hard build requirements in configure (they were already required by meson.build): - bison - flex - perl Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/flat/e07408d9-e5f2-d9fd-5672-f53354e9305e@eisentraut.org
86 lines
2.5 KiB
Plaintext
86 lines
2.5 KiB
Plaintext
<!-- doc/src/sgml/sourcerepo.sgml -->
|
|
|
|
<appendix id="sourcerepo">
|
|
<title>The Source Code Repository</title>
|
|
|
|
<para>
|
|
The <productname>PostgreSQL</productname> source code is stored and managed
|
|
using the <productname>Git</productname> version control system. A public
|
|
mirror of the master repository is available; it is updated within a minute
|
|
of any change to the master repository.
|
|
</para>
|
|
|
|
<para>
|
|
Our wiki, <ulink
|
|
url="https://wiki.postgresql.org/wiki/Working_with_Git"></ulink>,
|
|
has some discussion on working with Git.
|
|
</para>
|
|
|
|
<sect1 id="git">
|
|
<title>Getting the Source via <productname>Git</productname></title>
|
|
|
|
<para>
|
|
With <productname>Git</productname> you will make a copy of the entire code repository
|
|
on your local machine, so you will have access to all history and branches
|
|
offline. This is the fastest and most flexible way to develop or test
|
|
patches.
|
|
</para>
|
|
|
|
<procedure>
|
|
<title>Git</title>
|
|
|
|
<step>
|
|
<para>
|
|
You will need an installed version of <productname>Git</productname>, which you can
|
|
get from <ulink url="https://git-scm.com"></ulink>. Many systems already
|
|
have a recent version of <application>Git</application> installed by default, or
|
|
available in their package distribution system.
|
|
</para>
|
|
</step>
|
|
|
|
<step>
|
|
<para>
|
|
To begin using the Git repository, make a clone of the official mirror:
|
|
|
|
<programlisting>
|
|
git clone https://git.postgresql.org/git/postgresql.git
|
|
</programlisting>
|
|
|
|
This will copy the full repository to your local machine, so it may take
|
|
a while to complete, especially if you have a slow Internet connection.
|
|
The files will be placed in a new subdirectory <filename>postgresql</filename> of
|
|
your current directory.
|
|
</para>
|
|
|
|
<para>
|
|
The Git mirror can also be reached via the Git protocol. Just change the URL
|
|
prefix to <literal>git</literal>, as in:
|
|
|
|
<programlisting>
|
|
git clone git://git.postgresql.org/git/postgresql.git
|
|
</programlisting>
|
|
|
|
</para>
|
|
</step>
|
|
|
|
<step>
|
|
<para>
|
|
Whenever you want to get the latest updates in the system, <command>cd</command>
|
|
into the repository, and run:
|
|
|
|
<programlisting>
|
|
git fetch
|
|
</programlisting>
|
|
</para>
|
|
</step>
|
|
</procedure>
|
|
|
|
<para>
|
|
<productname>Git</productname> can do a lot more things than just fetch the source. For
|
|
more information, consult the <productname>Git</productname> man pages, or see the
|
|
website at <ulink url="https://git-scm.com"></ulink>.
|
|
</para>
|
|
</sect1>
|
|
|
|
</appendix>
|