Re: Help to build courier-imap for OpenPKG

2003-12-15 Thread alexb
Cópia Michael Schloh von Bennewitz [EMAIL PROTECTED]:

 On Mon, Dec 15, 2003, [EMAIL PROTECTED] wrote:
  a) About the sysconfdir, I defined it in .spec relative to _prefix,
 that
 previosly I definet relative to l_prefix. Does the order of
 definitions
 in the .spec is taken in account ?
 
 When you build the courier-imap without OpenPKG, then how do you make
 it
 install its config files in your selected config file path (for
 example
 /tmp/test/)? Whatever your answer is to this question, do the same thing
 in
 the spec file.
 

I never build courier-imap by executing directly configure. Previously I build
it with rpm -bb just using the .spec acompaning the source.
In the last rpm -bb log I checked that --syconfdir=/opkg/lib/courier-imap/etc
where pased, so it may be in an other part of the .spec where I missed to
prepend the %l_prefix


  b) objdump
  I've never used objdump and don't know his purpose. Here are the
 outputs,
  if they are meaningfull to you:
 
  [EMAIL PROTECTED] alexb]$ type objdump
  objdump is hashed (/opkg/bin/objdump)
 
  [EMAIL PROTECTED] alexb]$ objdump -i
 
  [...]
 
  [EMAIL PROTECTED] authlib]$ pwd
  /opkg/RPM/TMP/courier-imap-2.2.1/authlib
  [EMAIL PROTECTED] authlib]$ objdump -p authdaemon
 
  [...]
 
 Well this time the error message you wrote did not appear. That is
 strange
 and nonconsistent. My first guess is that while building your
 courier-imap
 package (rpm -bb), the system native objdump was used (maybe inside
 /usr/bin/objdump). Because you have the OpenPKG binutils package
 installed,
 your courier-imap was linked however with the OpenPKG ld.
 
 So try both '/usr/bin/objdump -i' and '/cw/bin/objdump' and compare
 the
 results. Same thing with '/usr/bin/objdump -p authdaemond' and
 '/cw/bin/objdump -p authdaemond'.

Both {/usr/bin|/opkg/usr/bin}objdump -i/-p authdaemon seam to produce the same
result yet, so I suspect the there should by a working path error while building
the package, or something else ??


 
 Regards,
 Michael
 
 -- 
 [EMAIL PROTECTED]
 Development Team, Operations Northern Europe
 Cable  Wireless Telecommunications Services GmbH
 
__
The OpenPKG Projectwww.openpkg.org
User Communication List  [EMAIL PROTECTED]


Re: Help to build courier-imap for OpenPKG

2003-12-11 Thread Michael Schloh von Bennewitz
On Thu, Dec 11, 2003, [EMAIL PROTECTED] wrote:
 It expands to a tree under courier-imap-2.2.1, bup instaling source rpms
 normaly seams to install under a directory just for the main name, as also
 does courier-imap-1.5.3 from Bill Campbell. Is this done by the rpm tool
 or do I need to repackage or specify something in .spec ?

A tarball (like courier-imap-2.2.1.tar.bz2) is unpackad by RPM using the
%setup macros that you should put in the %prep section of the .spec file.
Something like:

%prep
%setup -q

should do the job, although you might need to use:

%setup -q -n courier-imap-%{version}

or some variation with '-c' to create a directory, etcetera. They are all
native RPM features that you can read about in the Maximum RPM book or some
other RPM documentation.

 Reading the developer on-line Install instructions I think that I should
 modify the .spec file and then issue rpm -bb courier-imap.spec

Yes that sounds reasonable. And 'rpm -bb' builds the package from just a
.spec file. It is very similar to 'rpm --rebuild', except your source is a
.spec file rather than a full source package. The command 'rpm -bs' will
create a source package (ending with .src.rpm), but does not compile or
build anything. That's what you'll use later to finally make your package.

 This .spec has no Prefix: entry, but has %define _prefix /usr/lib/courier-imap
 Should I change do %define _prefix %{l_prefix}/usr/lib/courier-imap or Just add
 Prefix: %{l_prefix} ?

 Also the .spec has
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot

 Should I prefix this definition or substitute it with the  %{l_buildroot} ?

Prefix, Buildroot and the other things that I put in the template sent to
you should remain exact. Don't change them or use other non-OpenPKG
constructs like the ones you found in the .spec file distributed with the
Courier sources.

In some cases those non-OpenPKG constructs are simply unconformant to style
or organization rules that we've chosen to enforce (at least in the official
package repository). In other cases, those non-OpenPKG constructs will cause
your build to completely fail.

 Also I think I should set the --with-shellpath configuration option to include
 OpenPKG path. For this I whant to confirm that %{l_prefix} represents the base
 directory where I installed OpenPKG.

Yes, %{l_prefix} will always expand to the path name you gave when
bootstrapping OpenPKG like this:

  $ sh openpkg...-src.sh --prefix=/myprefix

If you didn't give a prefix explicitly, then it will be '/cw' by default.

 And now what should I worry about or search in the .spec file to changes
 for use with OpenPKG ?

First build the software without even thinking about OpenPKG. Keep notes of
everything you do (./configure, make all, rm unwanted files, make
install...). Then put these steps exactly like that in the .spec file
template I sent you. Compare your final .spec file with the on distributed
with the Courier software. Change a few things that seem necessary. Lastly,
try building with 'rpm -bb courier.spec'.

 PS.: The rpm tree I used to see from RedHat has BUILD RPMS SOURCES SPECS 
 SRPMS, but in OpenPKG ther is only DB PKG SRC TMP. Should I put the
 courier-imap-2.2.1.tar.bz2 file just into SRC or does I need to mkdir
 courier-imap first ?

Probably easiest ist to use:

  $ rpm --fetch courier.spec

If you don't like that, then make the directory and copy the tarball:

  $ mkdir /cw/RPM/SRC/courier
  $ cp /someplace/courier-imap-2.2.1.tar.bz2 /cw/RPM/SRC/courier

This directory (which I assume is 'courier') must match exactly the name you
use for your package, as stated in the .spec file after 'Name:'.

Good luck,
Michael

-- 
[EMAIL PROTECTED]
Development Team, Operations Northern Europe
Cable  Wireless Telecommunications Services GmbH


pgp0.pgp
Description: PGP signature