Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ea4f08e

Browse files
committed
Rename make_keywords.README to make_keywords.
1 parent 8e75b36 commit ea4f08e

File tree

3 files changed

+209
-7
lines changed

3 files changed

+209
-7
lines changed

doc/FAQ_DEV

Lines changed: 99 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
12) How do I add a new port?
2929
13) What is CommandCounterIncrement()?
3030
14) Why don't we use threads in the backend?
31+
15) How are RPM's packaged?
3132
_________________________________________________________________
3233

3334
1) What tools are available for developers?
@@ -41,14 +42,16 @@
4142
ccsym find standard defines made by your compiler
4243
entab converts tabs to spaces, used by pgindent
4344
find_static finds functions that could be made static
44-
find_typedef get a list of typedefs in the source code
45+
find_typedef finds a list of typedefs in the source code
46+
find_badmacros finds macros that use braces incorrectly
4547
make_ctags make vi 'tags' file in each directory
4648
make_diff make *.orig and diffs of source
4749
make_etags make emacs 'etags' files
4850
make_keywords.README make comparison of our keywords and SQL'92
4951
make_mkid make mkid ID files
5052
mkldexport create AIX exports file
5153
pgindent indents C source files
54+
pgjindent indents Java source files
5255
pginclude scripts for adding/removing include files
5356
unused_oids in pgsql/src/include/catalog
5457

@@ -127,8 +130,11 @@
127130
It auto-formats all source files to make them consistent. Comment
128131
blocks that need specific line breaks should be formatted as block
129132
comments, where the comment starts as /*------. These comments will
130-
not be reformatted in any way. pginclude contains scripts used to add
131-
needed #include's to include files, and removed unneeded #include's.
133+
not be reformatted in any way.
134+
135+
pginclude contains scripts used to add needed #include's to include
136+
files, and removed unneeded #include's.
137+
132138
When adding system types, you will need to assign oids to them. There
133139
is also a script called unused_oids in pgsql/src/include/catalog that
134140
shows the unused oids.
@@ -434,3 +440,93 @@ typedef struct nameData
434440
* Speed improvements using threads are small compared to the
435441
remaining backend startup time.
436442
* The backend code would be more complex.
443+
444+
15) How are RPM's packaged?
445+
446+
This is from Lamar Owen:
447+
As to how the RPMs are built -- to answer that question sanely requires
448+
me to know how much experience you have with the whole RPM paradigm.
449+
'How is the RPM built?' is a multifaceted question. The obvious simple
450+
answer is that I maintain:
451+
1.) A set of patches to make certain portions of the source
452+
tree 'behave' in the different environment of the RPMset;
453+
2.) The initscript;
454+
3.) Any other ancilliary scripts and files;
455+
4.) A README.rpm-dist document that tries to adequately document
456+
both the differences between the RPM build and the WHY of the
457+
differences, as well as useful RPM environment operations
458+
(like, using syslog, upgrading, getting postmaster to
459+
start at OS boot, etc);
460+
5.) The spec file that throws it all together. This is not a
461+
trivial undertaking in a package of this size.
462+
463+
I then download and build on as many different canonical distributions
464+
as I can -- currently I am able to build on Red Hat 6.2, 7.0, and 7.1 on
465+
my personal hardware. Occasionally I receive opportunity from certain
466+
commercial enterprises such as Great Bridge and PostgreSQL Inc to build
467+
on other distributions.
468+
469+
I test the build by installing the resulting packages and running the
470+
regression tests. Once the build passes these tests, I upload to the
471+
postgresql.org ftp server and make a release announcement. I am also
472+
responsible for maintaining the RPM download area on the ftp site.
473+
474+
You'll notice I said 'canonical' distributions above. That simply means
475+
that the machine is as stock 'out of the box' as practical -- that is,
476+
everything (except select few programs) on these boxen are installed by
477+
RPM; only official Red Hat released RPMs are used (except in unusual
478+
circumstances involving software that will not alter the build -- for
479+
example, installing a newer non-RedHat version of the Dia diagramming
480+
package is OK -- installing Python 2.1 on the box that has Python 1.5.2
481+
installed is not, as that alters the PostgreSQL build). The RPM as
482+
uploaded is built to as close to out-of-the-box pristine as is
483+
possible. Only the standard released 'official to that release'
484+
compiler is used -- and only the standard official kernel is used as
485+
well.
486+
487+
For a time I built on Mandrake for RedHat consumption -- no more.
488+
Nonstandard RPM building systems are worse than useless. Which is not
489+
to say that Mandrake is useless! By no means is Mandrake useless --
490+
unless you are building Red Hat RPMs -- and Red Hat is useless if you're
491+
trying to build Mandrake or SuSE RPMs, for that matter. But I would be
492+
foolish to use 'Lamar Owen's Super Special RPM Blend Distro 0.1.2' to
493+
build for public consumption! :-)
494+
495+
I _do_ attempt to make the _source_ RPM compatible with as many
496+
distributions as possible -- however, since I have limited resources (as
497+
a volunteer RPM maintainer) I am limited as to the amount of testing
498+
said build will get on other distributions, architectures, or systems.
499+
500+
And, while I understand people's desire to immediately upgrade to the
501+
newest version, realize that I do this as a side interest -- I have a
502+
regular, full-time job as a broadcast
503+
engineer/webmaster/sysadmin/Technical Director which occasionally
504+
prevents me from making timely RPM releases. This happened during the
505+
early part of the 7.1 beta cycle -- but I believe I was pretty much on
506+
the ball for the Release Candidates and the final release.
507+
508+
I am working towards a more open RPM distribution -- I would dearly love
509+
to more fully document the process and put everything into CVS -- once I
510+
figure out how I want to represent things such as the spec file in a CVS
511+
form. It makes no sense to maintain a changelog, for instance, in the
512+
spec file in CVS when CVS does a better job of changelogs -- I will need
513+
to write a tool to generate a real spec file from a CVS spec-source file
514+
that would add version numbers, changelog entries, etc to the result
515+
before building the RPM. IOW, I need to rethink the process -- and then
516+
go through the motions of putting my long RPM history into CVS one
517+
version at a time so that version history information isn't lost.
518+
519+
As to why all these files aren't part of the source tree, well, unless
520+
there was a large cry for it to happen, I don't believe it should.
521+
PostgreSQL is very platform-agnostic -- and I like that. Including the
522+
RPM stuff as part of the Official Tarball (TM) would, IMHO, slant that
523+
agnostic stance in a negative way. But maybe I'm too sensitive to
524+
that. I'm not opposed to doing that if that is the consensus of the
525+
core group -- and that would be a sneaky way to get the stuff into CVS
526+
:-). But if the core group isn't thrilled with the idea (and my
527+
instinct says they're not likely to be), I am opposed to the idea -- not
528+
to keep the stuff to myself, but to not hinder the platform-neutral
529+
stance. IMHO, of course.
530+
531+
Of course, there are many projects that DO include all the files
532+
necessary to build RPMs from their Official Tarball (TM).

doc/src/FAQ/FAQ_DEV.html

Lines changed: 106 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ <H2>Questions</H2>
5252
<A href="#13">13</A>) What is CommandCounterIncrement()?<BR>
5353
<A href="#14">14</A>) Why don't we use threads in the backend?<BR>
5454
<A href="#15">15</A>) How are RPM's packaged?<BR>
55+
<A href="#16">16</A>) How are CVS branches handled?<BR>
5556
<BR>
5657

5758
<HR>
@@ -63,18 +64,18 @@ <H3><A name="1">1</A>) What tools are available for
6364
there are several development tools available. First, all the files
6465
in the <I>/tools</I> directory are designed for developers.</P>
6566
<PRE>
66-
RELEASE_CHANGES changes we have to make for each release
67-
SQL_keywords standard SQL'92 keywords
67+
RELEASE_CHANGES changes we have to make for each release
68+
SQL_keywords standard SQL'92 keywords
6869
backend description/flowchart of the backend directories
6970
ccsym find standard defines made by your compiler
7071
entab converts tabs to spaces, used by pgindent
7172
find_static finds functions that could be made static
72-
find_typedef finds a list of typedefs in the source code
73+
find_typedef finds typedefs in the source code
7374
find_badmacros finds macros that use braces incorrectly
7475
make_ctags make vi 'tags' file in each directory
7576
make_diff make *.orig and diffs of source
7677
make_etags make emacs 'etags' files
77-
make_keywords.README make comparison of our keywords and SQL'92
78+
make_keywords make comparison of our keywords and SQL'92
7879
make_mkid make mkid ID files
7980
mkldexport create AIX exports file
8081
pgindent indents C source files
@@ -634,6 +635,107 @@ <H3><A name="15">15</A>) How are RPM's packaged?</H3>
634635
necessary to build RPMs from their Official Tarball (TM).
635636
</PRE>
636637

638+
<H3><A name="16">16</A>) How are CVS branches managed?</H3>
639+
<P>This was written by Tom Lane:
640+
641+
<PRE>
642+
If you just do basic &quot;cvs checkout&quot;, &quot;cvs update&quot;, &quot;cvs commit&quot;, then
643+
you'll always be dealing with the HEAD version of the files in CVS.
644+
That's what you want for development, but if you need to patch past
645+
stable releases then you have to be able to access and update the
646+
&quot;branch&quot; portions of our CVS repository. We normally fork off a branch
647+
for a stable release just before starting the development cycle for the
648+
next release.
649+
650+
The first thing you have to know is the branch name for the branch you
651+
are interested in getting at. Unfortunately Marc has been less than
652+
100% consistent in naming the things. One way to check is to apply
653+
&quot;cvs log&quot; to any file that goes back a long time, for example HISTORY
654+
in the top directory:
655+
656+
$ cvs log HISTORY | more
657+
658+
RCS file: /home/projects/pgsql/cvsroot/pgsql/HISTORY,v
659+
Working file: HISTORY
660+
head: 1.106
661+
branch:
662+
locks: strict
663+
access list:
664+
symbolic names:
665+
REL7_1_STABLE: 1.106.0.2
666+
REL7_1_BETA: 1.79
667+
REL7_1_BETA3: 1.86
668+
REL7_1_BETA2: 1.86
669+
REL7_1: 1.102
670+
REL7_0_PATCHES: 1.70.0.2
671+
REL7_0: 1.70
672+
REL6_5_PATCHES: 1.52.0.2
673+
REL6_5: 1.52
674+
REL6_4: 1.44.0.2
675+
release-6-3: 1.33
676+
SUPPORT: 1.1.1.1
677+
PG95-DIST: 1.1.1
678+
keyword substitution: kv
679+
total revisions: 129; selected revisions: 129
680+
More---q
681+
682+
Unfortunately &quot;cvs log&quot; isn't all that great about distinguishing
683+
branches from tags --- it calls 'em all &quot;symbolic names&quot;. (A &quot;tag&quot; just
684+
marks a specific timepoint across all files --- it's essentially a
685+
snapshot whereas a branch is a changeable fileset.) Rule of thumb is
686+
that names attached to four-number versions where the third number is
687+
zero represent branches, the others are just tags. Here we can see that
688+
the extant branches are
689+
REL7_1_STABLE
690+
REL7_0_PATCHES
691+
REL6_5_PATCHES
692+
The next commit to the head will be revision 1.107, whereas any changes
693+
committed into the REL7_1_STABLE branch will have revision numbers like
694+
1.106.2.*, corresponding to the branch number 1.106.0.2 (don't ask where
695+
the zero went...).
696+
697+
OK, so how do you do work on a branch? By far the best way is to create
698+
a separate checkout tree for the branch and do your work in that. Not
699+
only is that the easiest way to deal with CVS, but you really need to
700+
have the whole past tree available anyway to test your work. (And you
701+
*better* test your work. Never forget that dot-releases tend to go out
702+
with very little beta testing --- so whenever you commit an update to a
703+
stable branch, you'd better be doubly sure that it's correct.)
704+
705+
Normally, to checkout the head branch, you just cd to the place you
706+
want to contain the toplevel &quot;pgsql&quot; directory and say
707+
708+
cvs ... checkout pgsql
709+
710+
To get a past branch, you cd to whereever you want it and say
711+
712+
cvs ... checkout -r BRANCHNAME pgsql
713+
714+
For example, just a couple days ago I did
715+
716+
mkdir ~postgres/REL7_1
717+
cd ~postgres/REL7_1
718+
cvs ... checkout -r REL7_1_STABLE pgsql
719+
720+
and now I have a maintenance copy of 7.1.*.
721+
722+
When you've done a checkout in this way, the branch name is &quot;sticky&quot;:
723+
CVS automatically knows that this directory tree is for the branch,
724+
and whenever you do &quot;cvs update&quot; or &quot;cvs commit&quot; in this tree, you'll
725+
fetch or store the latest version in the branch, not the head version.
726+
Easy as can be.
727+
728+
So, if you have a patch that needs to apply to both the head and a
729+
recent stable branch, you have to make the edits and do the commit
730+
twice, once in your development tree and once in your stable branch
731+
tree. This is kind of a pain, which is why we don't normally fork
732+
the tree right away after a major release --- we wait for a dot-release
733+
or two, so that we won't have to double-patch the first wave of fixes.
734+
</PRE>
735+
736+
<P>Also, Ian Lance Taylor points out that branches and tags can be
737+
distiguished by using &quot;cvs status -v&quot;.</P>
738+
637739
</BODY>
638740
</HTML>
639741

src/tools/make_keywords.README renamed to src/tools/make_keywords

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#!/bin/sh
2+
3+
cat <<END
14
To get a list of keywords compared to SQL'92, take the keywords out of
25
backend/parser/keywords.c and tools/SQL_keywords.
36
@@ -7,3 +10,4 @@ keywords. Here is what I used:
710
sdif /tmp/pgkeywords tools/SQL_keywords |\
811
sed 's/</ /' | sed 's/>/ /'|sed 's/|/\
912
/' | sort -b +0
13+
END

0 commit comments

Comments
 (0)