Bug 442371 - Review Request: collectd - Statistics collection daemon for filling RRD files
Review Request: collectd - Statistics collection daemon for filling RRD files
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Berrange
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-14 12:00 EDT by Richard W.M. Jones
Modified: 2008-10-03 01:52 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-23 05:52:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
berrange: fedora‑review+
huzaifas: fedora‑cvs+


Attachments (Terms of Use)
collectd.spec for RHEL/CentOS 5 (14.09 KB, text/plain)
2008-04-15 15:27 EDT, Richard W.M. Jones
no flags Details

  None (edit)
Description Richard W.M. Jones 2008-04-14 12:00:38 EDT
Spec URL: http://www.annexia.org/tmp/collectd.spec
SRPM URL: http://www.annexia.org/tmp/collectd-4.2.3.100.g79b0797-2.src.rpm
Description: Statistics collection daemon for filling RRD files

collectd is a small daemon written in C for performance.  It reads various
system  statistics  and updates  RRD files,  creating  them if neccessary.
Since the daemon doesn't need to startup every time it wants to update the
files it's very fast and easy on the system. Also, the statistics are very
fine grained since the files are updated every 10 seconds.
Comment 1 Richard W.M. Jones 2008-04-14 12:01:55 EDT
rpmlint is clean except for these errors which I don't really understand:

collectd.x86_64: E: executable-marked-as-config-file /etc/rc.d/init.d/collectd
collectd.x86_64: W: incoherent-subsys /etc/rc.d/init.d/collectd $prog
collectd.x86_64: W: incoherent-subsys /etc/rc.d/init.d/collectd $prog
collectd.x86_64: W: incoherent-subsys /etc/rc.d/init.d/collectd $prog

rpmlint -i says:

E: executable-marked-as-config-file /etc/rc.d/init.d/collectd
Executables must not be marked as config files because that may
prevent upgrades from working correctly. If you need to be able to
customize an executable, make it for example read a config file in
/etc/sysconfig.

W: incoherent-subsys /etc/rc.d/init.d/collectd $prog
The filename of your lock file in /var/lock/subsys/ is incoherent
with your actual init script name. For example, if your script name
is httpd, you have to use 'httpd' as the filename in your subsys directory.
It is also possible that rpmlint gets this wrong, especially if the init
script contains nontrivial shell variables and/or assignments.  These
cases usually manifest themselves when rpmlint reports that the subsys name
starts a with '$'; in these cases a warning instead of an error is reported
and you should check the script manually.
Comment 2 Daniel Berrange 2008-04-14 19:57:59 EDT
The 'incoherent-subsys'  warning is bogus. It is complaining that it wants the
lockfile in /var/lock/subsys to be called  'collectd', instead of '$prog'. It is
too dumb to realize that $prog is a shell env var initialized to 'collectd' earlier.

The other error about /etc/rc.d/init.d/collectd can be fixed by changing

%config(noreplace) %{_initrddir}/collectd

to just

%{_initrddir}/collectd

so the initscript isn't marked as a config file.

Comment 3 Daniel Berrange 2008-04-14 20:04:00 EDT
Looking at the spec file there's a couple of suggestions/questions I'd have

 - Don't blow away the Perl bindings. These should be packaged in a sub-RPM -
probably with the name   perl-Collectd

 - Why are the following plugins disabled in the build with configure flags ?

    --disable-mysql \
    --disable-sensors \
    --disable-email \
    --disable-apache \
    --disable-perl \
    --disable-unixsock

  I'd be inclined to compile everything and if a particular plugin has too many
deps, then put it in a sub-RPM
Comment 4 Richard W.M. Jones 2008-04-15 03:38:48 EDT
The answer is simply 'because that's how the RPM / specfile was when I
found it.'

I'm just doing an upgraded version, back in a bit ...
Comment 5 Richard W.M. Jones 2008-04-15 05:03:00 EDT
Spec URL: http://www.annexia.org/tmp/collectd.spec
SRPM URL: http://www.annexia.org/tmp/collectd-4.3.2-1.src.rpm

* Tue Apr 15 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-1
- New upstream version 4.3.2.
- Create a -devel subpackage for development stuff, examples, etc.
- Use .bz2 package instead of .gz.
- Remove fix-hostname patch, now upstream.
- Don't mark collectd init script as config.
- Enable MySQL, sensors, email, apache, Perl, unixsock support.
- Don't remove example Perl scripts.
- Package types.db(5) manpage.
- Fix defattr.
- Build in koji to find the full build-requires list.

Koji build is here:

http://koji.fedoraproject.org/koji/taskinfo?taskID=566445

The only problem I can see with this one is that the Perl packages
get installed in site_perl instead of vendor_perl.  I looked at the
Makefiles and couldn't see a way to change this.  rpmlint complains
but the Fedora Perl guidelines don't mention anything.
Comment 6 Richard W.M. Jones 2008-04-15 09:53:09 EDT
Apparently we need:

  --with-perl-bindings=INSTALLDIRS=vendor
Comment 7 Richard W.M. Jones 2008-04-15 09:58:50 EDT
Spec URL: http://www.annexia.org/tmp/collectd.spec
SRPM URL: http://www.annexia.org/tmp/collectd-4.3.2-2.src.rpm

* Tue Apr 15 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-2
- Install Perl bindings in vendor dir not site dir.
Comment 8 Richard W.M. Jones 2008-04-15 15:27:14 EDT
Created attachment 302508 [details]
collectd.spec for RHEL/CentOS 5

This is an alternate collectd.spec supplied by Richard Shade at Rightscale,
with suggestions
that the two be merged.
Comment 9 Richard W.M. Jones 2008-04-16 04:31:01 EDT
Spec URL: http://www.annexia.org/tmp/collectd.spec
SRPM URL: http://www.annexia.org/tmp/collectd-4.3.2-4.src.rpm

%changelog
* Wed Apr 16 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-4
- Remove -devel subpackage.
- Add subpackages for apache, email, mysql, nginx, sensors,
  snmp (thanks Richard Shade).
- Add subpackages for perl, libvirt.

Koji build:

http://koji.fedoraproject.org/koji/taskinfo?taskID=568436
Comment 10 Alan Pevec 2008-04-16 05:20:14 EDT
As per comment 3 and
http://fedoraproject.org/wiki/Packaging/NamingGuidelines#head-a516d9372a70e1acdfcda374de3886175435aba7
for perl subpkg add:
%package -n perl-Collectd

perl(Collectd) is already autogenerated
Comment 11 Richard W.M. Jones 2008-04-16 12:54:47 EDT
Another bug:  perl.so ends up in the main package, should be in the
perl subpackage (whatever it is called).
Comment 12 Richard W.M. Jones 2008-04-17 09:04:46 EDT
Spec URL: http://www.annexia.org/tmp/collectd.spec
SRPM URL: http://www.annexia.org/tmp/collectd-4.3.2-5.src.rpm

* Thu Apr 17 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-5              
- Put the perl bindings and plugin into a separate perl-Collectd                
  package.  Note AFAICT from the manpage, the plugin and Collectd::*            
  perl modules must all be packaged together.                                   

----

AFAICT all the Perl code must go into a single package because the
perl.so (plugin) and the Perl bindings are used together.  This
is what ends up in the perl-Collectd module now:

$ rpm -qlp /home/rjones/rpmbuild/RPMS/x86_64/perl-Collectd-4.3.2-5.x86_64.rpm
/usr/lib/perl5/vendor_perl/5.8.8/Collectd
/usr/lib/perl5/vendor_perl/5.8.8/Collectd.pm
/usr/lib/perl5/vendor_perl/5.8.8/Collectd/Unixsock.pm
/usr/lib64/collectd/perl.so
/usr/share/doc/perl-Collectd-4.3.2
/usr/share/doc/perl-Collectd-4.3.2/COPYING
/usr/share/doc/perl-Collectd-4.3.2/MyPlugin.pm
/usr/share/doc/perl-Collectd-4.3.2/collectd2html.pl
/usr/share/doc/perl-Collectd-4.3.2/cussh.pl
/usr/share/man/man3/Collectd::Unixsock.3pm.gz
/usr/share/man/man5/collectd-perl.5.gz
Comment 13 Richard W.M. Jones 2008-04-17 09:08:17 EDT
Ooops, forgot to exclude perl.so from the main package ...

Spec URL: http://www.annexia.org/tmp/collectd.spec
SRPM URL: http://www.annexia.org/tmp/collectd-4.3.2-6.src.rpm

* Thu Apr 17 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-6
- Exclude perl.so from the main package.
Comment 14 Daniel Berrange 2008-04-21 10:12:25 EDT
MUST: rpmlint must be run on every package.

$ rpmlint /home/berrange/rpm/RPMS/i386/collectd-4.3.2-6.i386.rpm
collectd.i386: W: incoherent-subsys /etc/rc.d/init.d/collectd $prog
collectd.i386: W: incoherent-subsys /etc/rc.d/init.d/collectd $prog
collectd.i386: W: incoherent-subsys /etc/rc.d/init.d/collectd $prog
$ rpmlint /home/berrange/rpm/RPMS/i386/collectd-apache-4.3.2-6.i386.rpm
$ rpmlint /home/berrange/rpm/RPMS/i386/collectd-email-4.3.2-6.i386.rpm
$ rpmlint /home/berrange/rpm/RPMS/i386/collectd-mysql-4.3.2-6.i386.rpm
$ rpmlint /home/berrange/rpm/RPMS/i386/collectd-nginx-4.3.2-6.i386.rpm
$ rpmlint /home/berrange/rpm/RPMS/i386/perl-Collectd-4.3.2-6.i386.rpm
$ rpmlint /home/berrange/rpm/RPMS/i386/collectd-sensors-4.3.2-6.i386.rpm
$ rpmlint /home/berrange/rpm/RPMS/i386/collectd-snmp-4.3.2-6.i386.rpm
$ rpmlint /home/berrange/rpm/RPMS/i386/collectd-virt-4.3.2-6.i386.rpm
$ rpmlint collectd-4.3.2-6.src.rpm 

The warnings are rpmlint bugs, not being able to understand/interpret shell
variable substitutions

=> PASS

MUST: The package must be named according to the Package Naming Guidelines.

PASS

MUST: The spec file name must match the base package %{name}

PASS

MUST: The package must meet the Packaging Guidelines.

PASS

MUST: The package must be licensed with a Fedora approved license and meet the
Licensing Guidelines.

PASS

MUST: The License field in the package spec file must match the actual license.

PASS

MUST: If (and only if) the source package includes the text of the license(s) in
its own file, then that file, containing the text of the license(s) for the
package must be included in %doc.

PASS

MUST: The spec file must be written in American English.

PASS

MUST: The spec file for the package MUST be legible.

PASS

MUST: The sources used to build the package must match the upstream source

PASS

MUST: The package must successfully compile and build into binary rpms on at
least one supported architecture.

PASS

MUST: If the package does not successfully compile, build or work on an
architecture, then those architectures should be listed in the spec in ExcludeArch.

PASS

MUST: All build dependencies must be listed in BuildRequires

PASS

MUST: The spec file MUST handle locales properly

N/A - no locales

MUST: Every binary RPM package which stores shared library files (not just
symlinks) in any of the dynamic linker's default paths, must call ldconfig in
%post and %postun.

N/A - no public libs, only plugins

MUST: If the package is designed to be relocatable, the packager must state this
fact in the request for review

N/A

MUST: A package must own all directories that it creates.

PASS

MUST: A package must not contain any duplicate files in the %files listing.

PASS

MUST: Permissions on files must be set properly.

PASS

MUST: Each package must have a %clean section

PASS

MUST: Each package must consistently use macros

PASS

MUST: The package must contain code, or permissable content

PASS

MUST: Large documentation files should go in a -doc subpackage

N/A

MUST: If a package includes something as %doc, it must not affect the runtime of
the application

PASS

MUST: Header files must be in a -devel package.

N/A

MUST: Static libraries must be in a -static package.

N/A

MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig'

N/A

MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1),
then library files that end in .so (without suffix) must go in a -devel package.

N/A

MUST: In the vast majority of cases, devel packages must require the base
package using a fully versioned dependency

N/A

MUST: Packages must NOT contain any .la libtool archives

PASS

MUST: Packages containing GUI applications must include a %{name}.desktop file

N/A

MUST: Packages must not own files or directories already owned by other packages

PASS

MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot}

PASS

MUST: All filenames in rpm packages must be valid UTF-8.

PASS

SHOULD: If the source package does not include license text(s) as a separate
file from upstream, the packager SHOULD query upstream to include it.

N/A

SHOULD: The description and summary sections in the package spec file should
contain translations for supported Non-English languages, if available.

N/A

SHOULD: The reviewer should test that the package builds in mock.

PASS

SHOULD: The package should compile and build into binary rpms on all supported
architectures.

PASS

SHOULD: The reviewer should test that the package functions as described.

PASS

SHOULD: If scriptlets are used, those scriptlets must be sane.

PASS

SHOULD: Usually, subpackages other than devel should require the base package
using a fully versioned dependency.

PASS, though recommend

Requires:      collectd = %{version}

be changed to more specific:

Requires:      collectd = %{version}-%{release}

SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this
is usually for development purposes, so should be placed in a -devel pkg.

N/A

SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin,
/usr/bin, or /usr/sbin consider requiring the package which provides the file
instead of the file itself.

N/A


=> APPROVED
Comment 15 Richard W.M. Jones 2008-04-21 10:18:43 EDT
New Package CVS Request
=======================
Package Name: collectd
Short Description: Statistics collection daemon for filling RRD files
Owners: rjones,berrange
Branches: F-8 F-9
InitialCC: rjones,berrange
Cvsextras Commits: yes
Comment 16 Alan Pevec 2008-04-21 17:01:04 EDT
I guess it makes sense to send the new .spec upstream:
http://git.verplant.org/?p=collectd.git;a=tree;f=contrib/fedora
Comment 17 Kevin Fenzi 2008-04-22 13:31:25 EDT
cvs done.
Comment 19 Richard Shade 2008-04-23 17:42:53 EDT
On line 126 you use the collectd.conf in src/,  at present I don't think this
will work, there is no "Include "/etc/collectd.d"" in that file so all
subpackages will not work. Also I think the collectd.conf will have the problem
of every config option having /usr/ in front of it. The config in
contrib/redhat/ addresses the problem, but we may want to create a patch for
src/collectd.conf.in. 
Comment 20 Richard W.M. Jones 2008-04-24 04:48:10 EDT
Re comment 19

I hadn't forgotten about your email, I was just waiting for the
collectd Bugzilla component to be created so I could file a bug.

Please now see: bug 443942.
Comment 21 Alan Pevec 2008-10-02 04:31:11 EDT
Package Change Request
======================
Package Name: collectd
New Branches: F-10
Owners: rjones,berrange,apevec
Comment 22 Huzaifa S. Sidhpurwala 2008-10-03 01:52:23 EDT
cvs done

Note You need to log in before you can comment on or make changes to this bug.