Bug 442371
Summary: | Review Request: collectd - Statistics collection daemon for filling RRD files | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Richard W.M. Jones <rjones> | ||||
Component: | Package Review | Assignee: | Daniel Berrangé <berrange> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | CC: | apevec, berrange, fedora-package-review, mmahut, notting | ||||
Target Milestone: | --- | Flags: | berrange:
fedora-review+
huzaifas: fedora-cvs+ |
||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2008-04-23 09:52:31 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Richard W.M. Jones
2008-04-14 16:00:38 UTC
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. 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. 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 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 ... 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> - 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. Apparently we need: --with-perl-bindings=INSTALLDIRS=vendor 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> - 4.3.2-2 - Install Perl bindings in vendor dir not site dir. 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.
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> - 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 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 Another bug: perl.so ends up in the main package, should be in the perl subpackage (whatever it is called). 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> - 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 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> - 4.3.2-6 - Exclude perl.so from the main package. 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 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 I guess it makes sense to send the new .spec upstream: http://git.verplant.org/?p=collectd.git;a=tree;f=contrib/fedora cvs done. F-8: http://koji.fedoraproject.org/koji/taskinfo?taskID=577716 F-9: http://koji.fedoraproject.org/koji/taskinfo?taskID=577728 Rawhide: http://koji.fedoraproject.org/koji/taskinfo?taskID=577730 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. 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. Package Change Request ====================== Package Name: collectd New Branches: F-10 Owners: rjones,berrange,apevec cvs done |