|
28 | 28 | 12) How do I add a new port?
|
29 | 29 | 13) What is CommandCounterIncrement()?
|
30 | 30 | 14) Why don't we use threads in the backend?
|
| 31 | + 15) How are RPM's packaged? |
31 | 32 | _________________________________________________________________
|
32 | 33 |
|
33 | 34 | 1) What tools are available for developers?
|
|
41 | 42 | ccsym find standard defines made by your compiler
|
42 | 43 | entab converts tabs to spaces, used by pgindent
|
43 | 44 | 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 |
45 | 47 | make_ctags make vi 'tags' file in each directory
|
46 | 48 | make_diff make *.orig and diffs of source
|
47 | 49 | make_etags make emacs 'etags' files
|
48 | 50 | make_keywords.README make comparison of our keywords and SQL'92
|
49 | 51 | make_mkid make mkid ID files
|
50 | 52 | mkldexport create AIX exports file
|
51 | 53 | pgindent indents C source files
|
| 54 | + pgjindent indents Java source files |
52 | 55 | pginclude scripts for adding/removing include files
|
53 | 56 | unused_oids in pgsql/src/include/catalog
|
54 | 57 |
|
|
127 | 130 | It auto-formats all source files to make them consistent. Comment
|
128 | 131 | blocks that need specific line breaks should be formatted as block
|
129 | 132 | 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 | + |
132 | 138 | When adding system types, you will need to assign oids to them. There
|
133 | 139 | is also a script called unused_oids in pgsql/src/include/catalog that
|
134 | 140 | shows the unused oids.
|
@@ -434,3 +440,93 @@ typedef struct nameData
|
434 | 440 | * Speed improvements using threads are small compared to the
|
435 | 441 | remaining backend startup time.
|
436 | 442 | * 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). |
0 commit comments