You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Alan Conway <ac...@redhat.com> on 2006/12/12 03:51:45 UTC

C++ RPM spec file.

Just comitted a draft. It's close but needs some work.

Makefile questions:
- How to install html docs in /usr/share/doc/qpid - pkgdatadir puts them
in /usr/share/qpid.
- How to install run script in  /etc/init.d/qpidd?

Snag: doxygen html filenames too long for tar.

General question: The docs are pretty scarce, anyone have any
contributions or willing to give some time to beefing them up? Right now
we have the READMEs and some scanty doxygen comments.

Cheers,
Alan.


Re: C++ RPM spec file.

Posted by Jim Meyering <ji...@meyering.net>.
Alan Conway <ac...@redhat.com> wrote:
> I have a strong suspicion that doxygen provides a config option for
> short file names. I'll try that first, and use the tar fix if that
> doesn't work.
>
> A general question: I think we need the tarball and RPM package names to
> be based on qpid-cpp to distinguish from java. However I feel like I
> want the install locations to be /var/lib/qpid, /usr/share/doc/qpid-0.1
> etc. the -cpp feels redundant and awkward there.

I much prefer that, too.

> I've fiddled with this in configure.ac and the .spec and it looks like
> I'm just asking for pain to make these things different. Should I just
> bite the bullet and use qpid-cpp everywhere, or is there a better way to
> name these things?
>
> E.g. how about qpid for CPP packages and qpidj for Java packages?

Sounds like a good way to go.
Then you don't have to worry about going against tradition
and autoconf/automake standards.

Re: C++ RPM spec file.

Posted by Alan Conway <ac...@redhat.com>.
On Tue, 2006-12-12 at 12:24 +0100, Jim Meyering wrote:
[snip - answers]
Thanks for those, will apply asap.
  
> > Snag: doxygen html filenames too long for tar.
> 
> GNU tar can work around that if you create the archive using its
> --format=ustar option, which makes it create a POSIX.1-1988-compatible
> archive.  ...assuming no doxygen-generated name is longer than the max
> of ~256.  If you need longer, use --format=posix, for which there is
> no maximum.  But ustar is better, since it's more portable.
I have a strong suspicion that doxygen provides a config option for
short file names. I'll try that first, and use the tar fix if that
doesn't work.

A general question: I think we need the tarball and RPM package names to
be based on qpid-cpp to distinguish from java. However I feel like I
want the install locations to be /var/lib/qpid, /usr/share/doc/qpid-0.1
etc. the -cpp feels redundant and awkward there.

I've fiddled with this in configure.ac and the .spec and it looks like
I'm just asking for pain to make these things different. Should I just
bite the bullet and use qpid-cpp everywhere, or is there a better way to
name these things? 

E.g. how about qpid for CPP packages and qpidj for Java packages? We can
keep python-qpid and qpid-ruby no problem.

Cheers,
Alan. 


Re: C++ RPM spec file.

Posted by David Lutterkort <dl...@redhat.com>.
On Tue, 2006-12-12 at 12:24 +0100, Jim Meyering wrote:
> If you put this in Makefile.am
> 
>     dist_doc_DATA = FILE
> 
> then FILE will be installed in $(docdir), which expands to
> ${datarootdir}/doc/${PACKAGE_TARNAME}, which is what you want.
> FYI, it is common to install README into /usr/share/doc/pkg_name/,
> so people often do this in Makefile.am:
> 
>     dist_doc_DATA = README

Though it's not strictly necessary for building rpm's; the %doc macro in
a specfile will take a file from the source tarball and stick it into
the right place without going through the build root.

David



Re: C++ RPM spec file.

Posted by Jim Meyering <ji...@meyering.net>.
Alan Conway <ac...@redhat.com> wrote:
> Just comitted a draft. It's close but needs some work.

Hi Alan,

A draft qpid.spec.in file?
I ran "find qpid/cpp |grep -i spec" and it produced no output.
Where should I be looking?

> Makefile questions:
> - How to install html docs in /usr/share/doc/qpid - pkgdatadir puts them
> in /usr/share/qpid.

Just see the doctor, er, docdir :-)

If you put this in Makefile.am

    dist_doc_DATA = FILE

then FILE will be installed in $(docdir), which expands to
${datarootdir}/doc/${PACKAGE_TARNAME}, which is what you want.
FYI, it is common to install README into /usr/share/doc/pkg_name/,
so people often do this in Makefile.am:

    dist_doc_DATA = README

> - How to install run script in  /etc/init.d/qpidd?

Autoconf's name for that directory is $(sysconfdir)/init.d,
so just install it using that name.

> Snag: doxygen html filenames too long for tar.

GNU tar can work around that if you create the archive using its
--format=ustar option, which makes it create a POSIX.1-1988-compatible
archive.  ...assuming no doxygen-generated name is longer than the max
of ~256.  If you need longer, use --format=posix, for which there is
no maximum.  But ustar is better, since it's more portable.

Re: C++ RPM spec file.

Posted by Jim Meyering <ji...@meyering.net>.
David Lutterkort <dl...@redhat.com> wrote:
> On Tue, 2006-12-12 at 19:19 +0100, Jim Meyering wrote:
>> >>   # FIXME: For libuuid. aconway: Why do we depend on libuuid?
>> >>   BuildRequires: e2fsprogs-devel
>> >>
>> >> I don't know, either.  David, did you add this?
>> >
>> > Yes, I did .. I had a link failure when I tried to build qpid without it
>> > installed. Is that just something screwy with my machine ?
>>
>> Odd... do you have a copy of the link error still?
>
> It appears that's pulled in by apr-devel. On my rawhide machine:
>
>         > rpm -q apr-devel
>         apr-devel-1.2.7-10
>         > pkg-config --libs apr-1
>         -lapr-1 -luuid -lcrypt -lpthread -ldl

Humph.  Another reason to look askance at APR.

> Actually, the exact same holds true on FC6 .. so, how do you guys link
> against libuuid w/o e2fsprogs-devel there ? ;)

I had it installed already.
I need it for spectre's Xen support.

Re: C++ RPM spec file.

Posted by David Lutterkort <dl...@redhat.com>.
On Tue, 2006-12-12 at 19:19 +0100, Jim Meyering wrote:
> >>   # FIXME: For libuuid. aconway: Why do we depend on libuuid?
> >>   BuildRequires: e2fsprogs-devel
> >>
> >> I don't know, either.  David, did you add this?
> >
> > Yes, I did .. I had a link failure when I tried to build qpid without it
> > installed. Is that just something screwy with my machine ?
> 
> Odd... do you have a copy of the link error still?

It appears that's pulled in by apr-devel. On my rawhide machine:

        > rpm -q apr-devel
        apr-devel-1.2.7-10
        > pkg-config --libs apr-1
        -lapr-1 -luuid -lcrypt -lpthread -ldl

Actually, the exact same holds true on FC6 .. so, how do you guys link
against libuuid w/o e2fsprogs-devel there ? ;)

David



Re: C++ RPM spec file.

Posted by Jim Meyering <ji...@meyering.net>.
David Lutterkort <dl...@redhat.com> wrote:
> On Tue, 2006-12-12 at 18:21 +0100, Jim Meyering wrote:
>> Alan Conway <ac...@redhat.com> wrote:
>> > Just comitted a draft. It's close but needs some work.
>>
>> Re qpid-cpp.spec,
>>
>>   # FIXME: aconway don't think this is required, I don't have it installed.
>>   # BuildRequires: check-devel
>>
>> It's not necessary.  It's probably there as a holdover from
>> the project on which I based my first draft of the .spec.in file.
>
> How about the BR on pkgconfig ? Is that really needed ?

Yes, since configure uses PKG_CHECK_MODULES, which comes
from pkgconfig's pkg.m4 file -- pulled in via aclocal.

>>   # FIXME: For libuuid. aconway: Why do we depend on libuuid?
>>   BuildRequires: e2fsprogs-devel
>>
>> I don't know, either.  David, did you add this?
>
> Yes, I did .. I had a link failure when I tried to build qpid without it
> installed. Is that just something screwy with my machine ?

Odd... do you have a copy of the link error still?

Re: C++ RPM spec file.

Posted by David Lutterkort <dl...@redhat.com>.
On Tue, 2006-12-12 at 18:21 +0100, Jim Meyering wrote:
> Alan Conway <ac...@redhat.com> wrote:
> > Just comitted a draft. It's close but needs some work.
> 
> Re qpid-cpp.spec,
> 
>   # FIXME: aconway don't think this is required, I don't have it installed.
>   # BuildRequires: check-devel
> 
> It's not necessary.  It's probably there as a holdover from
> the project on which I based my first draft of the .spec.in file.

How about the BR on pkgconfig ? Is that really needed ?

>   # FIXME: For libuuid. aconway: Why do we depend on libuuid?
>   BuildRequires: e2fsprogs-devel
> 
> I don't know, either.  David, did you add this?

Yes, I did .. I had a link failure when I tried to build qpid without it
installed. Is that just something screwy with my machine ?

David


Re: C++ RPM spec file.

Posted by Jim Meyering <ji...@meyering.net>.
Alan Conway <ac...@redhat.com> wrote:
> Just comitted a draft. It's close but needs some work.

Re qpid-cpp.spec,

  # FIXME: aconway don't think this is required, I don't have it installed.
  # BuildRequires: check-devel

It's not necessary.  It's probably there as a holdover from
the project on which I based my first draft of the .spec.in file.

  # FIXME: For libuuid. aconway: Why do we depend on libuuid?
  BuildRequires: e2fsprogs-devel

I don't know, either.  David, did you add this?


If you settle on qpid or qpidc as the package name,
then you should change these uses of `qpid'  back to '%name':

    mkdir -p $RPM_BUILD_ROOT%_localstatedir/run/qpid
    mkdir -p $RPM_BUILD_ROOT%_localstatedir/lib/qpid

    %_libdir/libqpidcommon.so.0
    %_libdir/libqpidcommon.so.0.1.0
    %_libdir/libqpidclient.so.0
    %_libdir/libqpidclient.so.0.1.0
    ...

You want to put redhat.com here: :-)

    aconway@localhost.localdomain