Re: Building PostgreSQL 7.0.1 documentation

Started by Thomas Lockhartover 25 years ago11 messages
#1Thomas Lockhart
lockhart@alumni.caltech.edu

These (docbook) tools produced a lot of warnings, is this default?

afaik, no. I've got a Mandrake 7.0.x machine at home, and a 7.0 laptop
which is apparently not quite the same thing since one was upgraded from
6.1 and the other was a clean install. But my laptop produces *no*
warnings or errors when building the Postgres 7.0.0 docs. Not sure about
the current state (e.g. pg-7.0.2) but it may be slightly broken. Will
check -- actually, I've just checked and you are right, the current tree
produces fatal errors from three files, though they will be easy to fix
up.

I think I could test Mandrake RPMS from time to time.

Do you work with the cooker folks? If so, then perhaps you could
test and post Mandrake-specific RPMs which I've built? That would be
a big help...

I'm not actually running the cooker distro, but I often commit
RPMS to the cooker. I will upgrade to 7.1 next week, so that I'm
not that far from the cooker. I had some contact with Lenny Cartier
(Mandrakesoft) and think he would accept me as a maintainer for
postgresql.
I would post your RPMS if you want.

Great! I'm cc'ing Lamar Owens, who is the primary Redhat RPM maintainer.
My last try at building pg-7.0 RPMs for Mandrake from Lamar's RH
.src.rpm was a complete success with no additional patches required,
though I have not had a chance to try the pg-7.0.2 RPM build and have
not posted the results.

For the Mandrake stuff, perhaps we can do it as a team; the first
important step is for someone to start "babysitting" it, just building
and posting the RPMs from Lamar's sources, then posting the results at
Mandrake's web site.

btw, Lamar, can we put the .ps.gz doc files into the RPM distro, if you
haven't already done so? Or should we break them out into separate RPMs,
say for hardcopy and hardcopy-A4 or something like that?

- Thomas

#2Lamar Owen
lamar.owen@wgcr.org
In reply to: Thomas Lockhart (#1)

Thomas Lockhart wrote:

I think I could test Mandrake RPMS from time to time.

Do you work with the cooker folks? If so, then perhaps you could
test and post Mandrake-specific RPMs which I've built? That would be
a big help...

I'm not actually running the cooker distro, but I often commit
RPMS to the cooker. I will upgrade to 7.1 next week, so that I'm
not that far from the cooker. I had some contact with Lenny Cartier
(Mandrakesoft) and think he would accept me as a maintainer for
postgresql.
I would post your RPMS if you want.

Great! I'm cc'ing Lamar Owens, who is the primary Redhat RPM maintainer.
My last try at building pg-7.0 RPMs for Mandrake from Lamar's RH
.src.rpm was a complete success with no additional patches required,
though I have not had a chance to try the pg-7.0.2 RPM build and have
not posted the results.

Interesting to see any differences, as the spec file itself has changed
some since the 7.0 series. I am trying to make this spec file buildable
on more than just RedHat -- so, testers are more than welcome. I
already am getting contributions for at least one non-RedHat
distribution for PowerPC from Murray Todd Williams (which RPM's I am
putting on ftp.postgresql.org). The more the merrier! The goal, of
course, is a single source RPM that everybody simply rebuilds, which
spec file simply Does The Right Thing (TM) for each distribution. I am
very grateful to the fine folks at RedHat for their help in making the
portability goal a little closer.

For the Mandrake stuff, perhaps we can do it as a team; the first
important step is for someone to start "babysitting" it, just building
and posting the RPMs from Lamar's sources, then posting the results at
Mandrake's web site.

Yes! Try a simple --rebuild of my SRPM first -- then, send me a diff of
what it takes to get it to build right (including policy-type things,
such as bzip instead of gzip, or pgcc instead of egcs, or different
initscripts directory structure, etc.). Be sure to include any other
patches that may need to be included, and I'll try to get things
incorporated right away. As I only have RedHat 6.2+ boxen at the moment
(soon to get access to a SPARC, hopefully), I can only build and test on
them.

I was at one point going to get and install SuSE, Mandrake, Caldera, AND
RedHat all on one box, but that plan proved unweildy at best. Better to
get a SuSE person, a Mandrake (since Mandrake is diverging more and more
from its RedHat roots) person, and a Caldera person to be that
distribution's 'expert', who then helps me take the RedHat SRPM and
massage it to rebuild smoothly on each distribution. Plus, we can then
get people with Alphas, SPARCs, PPC's, or even IA-64's to do builds and
suggest changes. As well as getting reports from other RPM-based
distributions....

Also, when submitting patches to the spec file, include a copy of the
output of 'rpm --showrc', so I can see what kind of RPM environment you
have.

btw, Lamar, can we put the .ps.gz doc files into the RPM distro, if you
haven't already done so? Or should we break them out into separate RPMs,
say for hardcopy and hardcopy-A4 or something like that?

I can, if that's what's wanted. I don't have a preference as to whether
it's still in the main package, or in a separate docs package, as, prior
to 7.0.1 the postscript stuff was in the main package. Just let me know
where the source .ps.gz files need to come from, so I don't get the
wrong ones. :-)

It would be preferable to have a versioned tarball of them available, as
there are already a larger number of source files in the RPM than I
would like.

Let me know....

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

#3Jan Dittberner
jan@jan-dittberner.de
In reply to: Thomas Lockhart (#1)
1 attachment(s)
Mandrake RPMS, was "Building PostgreSQL 7.0.1 documentation"

Lamar Owen wrote:

For the Mandrake stuff, perhaps we can do it as a team; the first
important step is for someone to start "babysitting" it, just building
and posting the RPMs from Lamar's sources, then posting the results at
Mandrake's web site.

Yes! Try a simple --rebuild of my SRPM first -- then, send me a diff of
what it takes to get it to build right (including policy-type things,
such as bzip instead of gzip, or pgcc instead of egcs, or different
initscripts directory structure, etc.). Be sure to include any other
patches that may need to be included, and I'll try to get things
incorporated right away. As I only have RedHat 6.2+ boxen at the moment
(soon to get access to a SPARC, hopefully), I can only build and test on
them.

I did so, I build packages for Mandrake. Your SPEC file is great and
I had only to do some little changes for full Mandrake compliance.

- pack all source files with bzip2, even those you left uncompressed
- extract the .jar files and the init/logrotate scripts at their destination
- bzip2 all man pages

That's all, I will upload the SRPM to the Mandrake incoming directory
in the later evening and will notify Lenny Cartier (MandrakeSoft).

I've attached my spec file.

Jan

Attachments:

postgresql.spectext/plain; charset=iso-8859-1; name=postgresql.specDownload
#4Thomas Lockhart
lockhart@alumni.caltech.edu
In reply to: Thomas Lockhart (#1)
Re: Mandrake RPMS, was "Building PostgreSQL 7.0.1 documentation"

I did so, I build packages for Mandrake. Your SPEC file is great and
I had only to do some little changes for full Mandrake compliance.

Great!

- pack all source files with bzip2, even those you left uncompressed

Ooh. That would seem to be at odds with the "pristine source" philosophy
of RPM, but I'll guess that this topic has been covered extensively
elsewhere? Are we sure that this is not just a suggestion from Mandrake
that the sources *should* be available with bzip2 compression?

- extract the .jar files and the init/logrotate scripts at their
destination

Is this related to the previous point? I haven't looked at the details,
but I'm not sure why Mandrake and RH would need to be different here.

- bzip2 all man pages

Hmm. This is for the man pages after installation from the RPM, right?

All in all these are pretty small changes for two independent distros,
though it is a shame that even these diffs need to exist. The ".bz2 on
input files" is particularly annoying, since those compression formats
are *not* available in the original tarball distros.

That's all, I will upload the SRPM to the Mandrake incoming directory
in the later evening and will notify Lenny Cartier (MandrakeSoft).

Lamar, would it be possible to carry (some of) these differences in the
same spec file? *So much* is in common that it would be nice to have the
info together. But in either case, this is great progress. Thanks Jan!

- Thomas

#5Lamar Owen
lamar.owen@wgcr.org
In reply to: Thomas Lockhart (#1)
Re: Mandrake RPMS, was "Building PostgreSQL 7.0.1 documentation"

Jan Dittberner wrote:

Lamar Owen wrote:

For the Mandrake stuff, perhaps we can do it as a team; the first
important step is for someone to start "babysitting" it, just building
and posting the RPMs from Lamar's sources, then posting the results at
Mandrake's web site.

Yes! Try a simple --rebuild of my SRPM first -- then, send me a diff of

I did so, I build packages for Mandrake. Your SPEC file is great and
I had only to do some little changes for full Mandrake compliance.

- pack all source files with bzip2, even those you left uncompressed
- extract the .jar files and the init/logrotate scripts at their destination
- bzip2 all man pages

That's all, I will upload the SRPM to the Mandrake incoming directory
in the later evening and will notify Lenny Cartier (MandrakeSoft).

Can you send me the result of 'rpm --showrc'? I'm curious if Mandrake
is using the macro package to determine the use of gzip versus bzip2....
Otherwise, if the _vendor macro is set to 'mandrake', I can use that in
a conditional.

Thanks for the rebuild and the spec!

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

#6Jan Dittberner
jan@jan-dittberner.de
In reply to: Thomas Lockhart (#1)
Re: Mandrake RPMS, was "Building PostgreSQL 7.0.1 documentation"

Lamar Owen wrote:

Can you send me the result of 'rpm --showrc'? I'm curious if Mandrake
is using the macro package to determine the use of gzip versus bzip2....
Otherwise, if the _vendor macro is set to 'mandrake', I can use that in
a conditional.

Here it is:

--8<---------------------------------------------------------------------

ARCHITECTURE AND OS:
build arch : i586
compatible build archs: i586 k6 i486 i386 noarch
build os : Linux
compatible build os's : Linux
install arch : i586
install os : Linux
compatible archs : i586 k6 i486 i386 noarch
compatible os's : Linux

RPMRC VALUES:
macrofiles : /usr/lib/rpm/macros:/usr/lib/rpm/i586-linux/macros:/etc/rpm/macros:/etc/rpm/i586-linux/macros:~/.rpmmacros
optflags : -O3 -fomit-frame-pointer -fno-exceptions -fno-rtti -pipe -s -mpentium -mcpu=pentium -march=pentium -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -mpreferred-stack-boundary=2
========================
-14: GNUconfigure(MC:)
%{__libtoolize} --copy --force
%{__aclocal}
%{__autoheader}
%{__automake}
%{__autoconf}
%{-C:_mydir="`pwd`"; %{-M:%{__mkdir} -p %{-C*};} cd %{-C*};}
CFLAGS="%{optflags}" %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix} %* %{-C:cd ${_mydir}; unset _mydir}
-14: __aclocal aclocal
-14: __autoconf autoconf
-14: __autoheader autoheader
-14: __automake automake
-14: __bzip2 %{_bzip2bin}
-14: __cat /bin/cat
-14: __chgrp /bin/chgrp
-14: __chmod /bin/chmod
-14: __chown /bin/chown
-14: __cp /bin/cp
-14: __cpio /bin/cpio
-14: __find_provides /usr/lib/rpm/find-provides
-14: __find_requires /usr/lib/rpm/find-requires
-14: __gzip %{_gzipbin}
-14: __id /usr/bin/id
-14: __install %(which install)
-14: __libtoolize libtoolize
-14: __make /usr/bin/make
-14: __mkdir /bin/mkdir
-14: __mv /bin/mv
-14: __patch /usr/bin/patch
-14: __ranlib %(which ranlib)
-14: __rm /bin/rm
-14: __strip %(which strip)
-14: __tar /bin/tar
-14: _arch i386
-14: _bindir %{_exec_prefix}/bin
-14: _build %{_host}
-14: _build_alias %{_host_alias}
-14: _build_cpu %{_host_cpu}
-14: _build_os %{_host_os}
-14: _build_vendor %{_host_vendor}
-14: _builddir %{_topdir}/BUILD
-14: _buildshell /bin/sh
-14: _bzip2bin /usr/bin/bzip2
-14: _datadir %{_prefix}/share
-14: _dbpath %{_var}/lib/rpm
-14: _defaultdocdir %{_usr}/doc
-14: _exec_prefix %{_prefix}
-14: _fixgroup [ `%{__id} -u` = '0' ] && %{__chgrp} -Rhf root
-14: _fixowner [ `%{__id} -u` = '0' ] && %{__chown} -Rhf root
-14: _fixperms %{__chmod} -Rf a+rX,g-w,o-w
-14: _gzipbin /bin/gzip
-14: _host i686-pc-linux-gnu
-14: _host_alias i686-pc-linux-gnu
-14: _host_cpu i686
-14: _host_os linux-gnu
-14: _host_vendor pc
-14: _includedir %{_prefix}/include
-14: _infodir %{_prefix}/info
-14: _instchangelog 5
-14: _libdir %{_exec_prefix}/lib
-14: _libexecdir %{_exec_prefix}/libexec
-14: _localstatedir %{_prefix}/var
-14: _mandir %{_prefix}/man
-14: _oldincludedir /usr/include
-14: _os linux
-14: _packager Jan Dittberner <jan@jan-dittberner.de>
-14: _pgpbin /usr/bin/pgp
-14: _preScriptEnvironment
RPM_SOURCE_DIR="%{_sourcedir}"
RPM_BUILD_DIR="%{_builddir}"
RPM_OPT_FLAGS="%{optflags}"
RPM_ARCH="%{_arch}"
RPM_OS="%{_os}"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="%{_docdir}"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="%{name}"
RPM_PACKAGE_VERSION="%{version}"
RPM_PACKAGE_RELEASE="%{release}"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
%{?buildroot:RPM_BUILD_ROOT="%{buildroot}"
export RPM_BUILD_ROOT
}
-14: _prefix /usr
-14: _rpmdir %{_topdir}/RPMS
-14: _rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
-14: _sbindir %{_exec_prefix}/sbin
-14: _sharedstatedir %{_prefix}/com
-14: _signature none
-14: _sourcedir %{_topdir}/SOURCES
-14: _specdir %{_topdir}/SPECS
-14: _srcrpmdir %{_topdir}/SRPMS
-14: _sysconfdir %{_prefix}/etc
-11: _target i586-linux
-14: _target_alias %{_host_alias}
-11= _target_cpu i586
-11= _target_os linux
-14: _target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
-14: _target_vendor %{_host_vendor}
-14: _tmppath %{_var}/tmp
-14: _topdir /home/jd9/RPM
-14: _usr /usr
-14: _usrsrc %{_usr}/src
-14: _var /var
-14: _vendor mandrake
-14: configure
%{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force}
CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix}
-14: nil %{!?nil}
-11: optflags -O3 -fomit-frame-pointer -fno-exceptions -fno-rtti -pipe -s -mpentium -mcpu=pentium -march=pentium -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -mpreferred-stack-boundary=2
-14: perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib)
-14: perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
-14: requires_eq %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| grep -v "is not")
-15: sigtype none
======================== active 90 empty 0

--8<---------------------------------------------------------------------

#7Lamar Owen
lamar.owen@wgcr.org
In reply to: Thomas Lockhart (#1)
Re: Mandrake RPMS, was "Building PostgreSQL 7.0.1 documentation"

Jan Dittberner wrote:

Lamar Owen wrote:

Can you send me the result of 'rpm --showrc'? I'm curious if Mandrake
is using the macro package to determine the use of gzip versus bzip2....
Otherwise, if the _vendor macro is set to 'mandrake', I can use that in
a conditional.

Here it is:
-14: __bzip2 %{_bzip2bin}
-14: __gzip %{_gzipbin}
-14: _bzip2bin /usr/bin/bzip2
-14: _gzipbin /bin/gzip

Can't use them... :-(

-14: _vendor mandrake

But I _can_ use this. RedHat sets this, predictably, to redhat. Most
other things are easy -- there are macros for nearly everything you need
that hide all details (such as the /usr/src/redhat versus /usr/src/RPM
and others deal).

Thus, Thomas, to answer your question -- YES, we can have a single spec
file do both systems. Just some conditionals, and judicious use of the
defined macros and envvars.

And this is why I need the rpm --showrc results with spec file diffs (or
examples)... :-).

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

#8Noname
teg@redhat.com
In reply to: Thomas Lockhart (#1)
Re: Re: Mandrake RPMS, was "Building PostgreSQL 7.0.1 documentation"

I can't find the original message, so I'll have to do some indirect answering.

Lamar Owen <lamar.owen@wgcr.org> writes:

Jan Dittberner wrote:

Lamar Owen wrote:

For the Mandrake stuff, perhaps we can do it as a team; the first
important step is for someone to start "babysitting" it, just building
and posting the RPMs from Lamar's sources, then posting the results at
Mandrake's web site.

Yes! Try a simple --rebuild of my SRPM first -- then, send me a diff of

I did so, I build packages for Mandrake. Your SPEC file is great and
I had only to do some little changes for full Mandrake compliance.

- pack all source files with bzip2, even those you left
uncompressed

If the postgresql team releases bz2 - good. If there is no file

ftp://foo.bar.com/xyzzy.tar.bz2

but just

ftp://foo.bar.com/xyzzy.tar.gz

then using that URL is just lying. Don't do that. Surely Mandrake
doesn't do that?

- extract the .jar files and the init/logrotate scripts at their destination
- bzip2 all man pages

Don't. This should be handled automatically with the "--buildpolicy"
flag[1]Like this: "rpm -ba --buildpolicy redhat postgresql.spec". like we do. Besides, bzipping man pages is in the "use bzip2,
even though there is no point in it" category.

[1]: Like this: "rpm -ba --buildpolicy redhat postgresql.spec"

No need to strip or compress explicitly.
--
Trond Eivind Glomsr�d
Red Hat, Inc.

#9Lamar Owen
lamar.owen@wgcr.org
In reply to: Thomas Lockhart (#1)
Re: Re: Mandrake RPMS, was "Building PostgreSQL 7.0.1 documentation"

Trond Eivind Glomsr�d wrote:

I can't find the original message, so I'll have to do some indirect answering.

[If you wish, I'll pipe you the original]

Lamar Owen <lamar.owen@wgcr.org> writes:

Jan Dittberner wrote:

I did so, I build packages for Mandrake. Your SPEC file is great and
I had only to do some little changes for full Mandrake compliance.

- pack all source files with bzip2, even those you left
uncompressed

If the postgresql team releases bz2 - good. If there is no file

ftp://foo.bar.com/xyzzy.tar.bz2

but just

ftp://foo.bar.com/xyzzy.tar.gz

then using that URL is just lying. Don't do that. Surely Mandrake
doesn't do that?

This source re-compress is not needed, really. After all, the whole
source RPM is compressed.... And, yes, as Thomas already commented,
this violates the pristine source issue. No, ftp.postgresql.org doesn't
do bzip2, yet (Marc??)

- bzip2 all man pages

Don't. This should be handled automatically with the "--buildpolicy"
flag[1]. like we do. Besides, bzipping man pages is in the "use bzip2,
even though there is no point in it" category.

[1] Like this: "rpm -ba --buildpolicy redhat postgresql.spec"

No need to strip or compress explicitly.

Which is why you had pulled the stripping stuff out of the spec... also
explains a portion of why the insistence on %{_mandir}, as that may be a
clue to rpm to apply 'policy' ??

Ok, now just _where_ is this '--buildpolicy' deal documented -- it sure
isn't in the man page on my 6.2 box. What sort of config file is used,
etc. I certainly like the sound of it, but have never heard of it
before.

If it is a new version of RPM thingy, well.... ;-)

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

#10Lamar Owen
lamar.owen@wgcr.org
In reply to: Thomas Lockhart (#1)
Re: Mandrake RPMS, was "Building PostgreSQL 7.0.1 documentation"

Jan Dittberner wrote:

- pack all source files with bzip2, even those you left uncompressed
- extract the .jar files and the init/logrotate scripts at their destination
- bzip2 all man pages

You know, I wonder why Mandrake is insisting on bzip2'ing everything.
Can you point me to Mandrake's packaging policy statement, please?

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

#11Lamar Owen
lamar.owen@wgcr.org
In reply to: Thomas Lockhart (#1)
Re: Mandrake RPMS, was "Building PostgreSQL 7.0.1 documentation"

Thomas Lockhart wrote:

Lamar, would it be possible to carry (some of) these differences in the
same spec file? *So much* is in common that it would be nice to have the
info together. But in either case, this is great progress. Thanks Jan!

Thomas, could you or Jan (Dittberner) send me a tarball of the mandrake
/usr/lib/rpm directory, in particular, any files that start with 'brp-'?

This will help things.

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11