[rrd-developers] spec file comments

Tobias Oetiker tobi at oetiker.ch
Wed Oct 8 22:47:15 CEST 2008


ok,

it is in
tobi
Today Bernard Li wrote:

> Hi Daniel:
>
> On Wed, Oct 8, 2008 at 3:38 AM,  <Daniel.Pocock at barclayscapital.com> wrote:
>
> > Bernard, are you already re-working the spec file, or should I go ahead
> > and do it?  Either way, I have some more comments on the subject:
>
> Here's the patch for split-out rrd-cached subpackage:
>
> http://therealms.org/oss/rrdtool/rrdtool.spec.rrdcached.patch
>
> > I notice this is in the spec file:
> >
> >   %define pre rc9
> >
> > Is that still needed?  There are various references to this %{pre}
> > variable, I just deleted them all to make it build without complaining.
>
> Actually, %pre is a special macro for RPM (much like %post, %postun)
> and should not be overloaded.  I have removed it in my patch.
>
> > The versions are hard coded:
> >
> >   Version: 1.3.99908093000
> >   Source0:
> > http://oss.oetiker.ch/rrdtool/pub/beta/%{name}-%{version}.tar.gz
> >
> > Is there any convenient way to auto-generate that field?  Ganglia
> > includes a script for trying to work out the version based on the SVN
> > revision, although that method is not perfect because of the way SVN
> > works.  It would be nice to set this value correctly in each of the
> > daily snapshots, so that people can just run rpmbuild -tb
> > rrdtool-trunk-snapshot.tar.gz.
>
> Yes it would be nice.  However, for Ganglia, I simply add the SVN
> revision manually since the svn binary is not guaranteed to be
> available on the build box...  There must be a better way to do
> this...
>
> > The rrdcached user and: rather than hardcoding the username, could we
> > have:
> >
> > %if %{!?_with_rrdcached_user}
> > %define _with_rrdcached_user rrdcached
> > %endif
> > ...
> > %configure \
> >   %{?_with_rrdcached_user} \
> > ...
> > %files
> > %attr(0775 %{?_with_rrdcached_user} %{?_with_rrdcached_group}) %dir
> > %{_localstatedir}/run/rrdcached
> >
> > /etc/default/rrdcached can be generated by configure as well (it needs
> > to contain the user name).
> >
> > It would be nice to specify usernames with a command like:
> >
> >   rpmbuild -tb --with-rrdcached-user testuser --with-rrdcached-group
> > testgroup rrdtool-XXX.tar.gz
>
> In my patch I just hardcode the user as rrdcached.  I don't see a real
> benefit to having this user-definable, however, as it currently stands
> we have a problem with the ownership of the .rrd files created by
> RRDtool via other programs (like Ganglia).  We need to come up with a
> solution where both these applications and rrdcached have read/write
> access to the rrd files.  For instance, rrd files generated by Ganglia
> can be owned by nobody or ganglia.  rrd files created by Cacti will be
> owned by cacti etc -- how to get rrdcached to play nice with this
> setup...?
>
> Cheers,
>
> Bernard
>
> _______________________________________________
> rrd-developers mailing list
> rrd-developers at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list