[Bug 527488] Review Request: drbd - drbd tools

bugzilla at redhat.com bugzilla at redhat.com
Wed Oct 14 06:45:40 UTC 2009


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=527488





--- Comment #17 from Fabio Massimo Di Nitto <fdinitto at redhat.com>  2009-10-14 02:45:38 EDT ---
[fabbione at daitarn-fedora rpmbuild]$ rpmlint SPECS/drbd.spec
SRPMS/drbd-8.3.4-5.fc12.src.rpm RPMS/*/*
SPECS/drbd.spec:82: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/outdate-peer.sh
SPECS/drbd.spec:83: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/snapshot-resync-target-lvm.sh
SPECS/drbd.spec:84: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/unsnapshot-resync-target-lvm.sh
SPECS/drbd.spec:85: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-out-of-sync.sh
SPECS/drbd.spec:86: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-split-brain.sh
SPECS/drbd.spec:87: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-emergency-reboot.sh
SPECS/drbd.spec:88: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-emergency-shutdown.sh
SPECS/drbd.spec:89: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-io-error.sh
SPECS/drbd.spec:90: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-pri-lost-after-sb.sh
SPECS/drbd.spec:91: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-pri-lost.sh
SPECS/drbd.spec:92: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-pri-on-incon-degr.sh
SPECS/drbd.spec:93: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify.sh
SPECS/drbd.spec:181: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/crm-fence-peer.sh
SPECS/drbd.spec:182: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/crm-unfence-peer.sh
SPECS/drbd.spec:183: E: hardcoded-library-path in
%{_prefix}/lib/ocf/resource.d/linbit/drbd
drbd.src: W: name-repeated-in-summary DRBD
drbd.src: W: no-version-in-last-changelog
drbd.src: W: invalid-license GPL
drbd.src: W: strange-permission drbd.spec 0600
drbd.src:82: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/outdate-peer.sh
drbd.src:83: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/snapshot-resync-target-lvm.sh
drbd.src:84: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/unsnapshot-resync-target-lvm.sh
drbd.src:85: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-out-of-sync.sh
drbd.src:86: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-split-brain.sh
drbd.src:87: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-emergency-reboot.sh
drbd.src:88: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-emergency-shutdown.sh
drbd.src:89: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-io-error.sh
drbd.src:90: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-pri-lost-after-sb.sh
drbd.src:91: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-pri-lost.sh
drbd.src:92: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/notify-pri-on-incon-degr.sh
drbd.src:93: E: hardcoded-library-path in %{_prefix}/lib/%{name}/notify.sh
drbd.src:181: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/crm-fence-peer.sh
drbd.src:182: E: hardcoded-library-path in
%{_prefix}/lib/%{name}/crm-unfence-peer.sh
drbd.src:183: E: hardcoded-library-path in
%{_prefix}/lib/ocf/resource.d/linbit/drbd
drbd.x86_64: W: name-repeated-in-summary DRBD
drbd.x86_64: W: no-version-in-last-changelog
drbd.x86_64: W: invalid-license GPL
drbd.x86_64: E: no-binary
drbd-bash-completion.x86_64: W: no-version-in-last-changelog
drbd-bash-completion.x86_64: W: invalid-license GPL
drbd-bash-completion.x86_64: W: no-documentation
drbd-bash-completion.x86_64: W: non-conffile-in-etc
/etc/bash_completion.d/drbdadm
drbd-debuginfo.x86_64: W: no-version-in-last-changelog
drbd-debuginfo.x86_64: W: invalid-license GPL
drbd-heartbeat.x86_64: W: no-version-in-last-changelog
drbd-heartbeat.x86_64: W: invalid-license GPL
drbd-heartbeat.x86_64: W: spurious-executable-perm
/usr/share/man/man8/drbddisk.8.gz
drbd-pacemaker.x86_64: W: no-version-in-last-changelog
drbd-pacemaker.x86_64: W: invalid-license GPL
drbd-pacemaker.x86_64: W: only-non-binary-in-usr-lib
drbd-pacemaker.x86_64: W: no-documentation
drbd-rgmanager.x86_64: W: no-version-in-last-changelog
drbd-rgmanager.x86_64: W: invalid-license GPL
drbd-rgmanager.x86_64: W: no-documentation
drbd-udev.x86_64: W: summary-not-capitalized udev integration scripts for DRBD
drbd-udev.x86_64: W: no-version-in-last-changelog
drbd-udev.x86_64: W: invalid-license GPL
drbd-udev.x86_64: W: no-documentation
drbd-udev.x86_64: E: script-without-shebang /etc/udev/rules.d/65-drbd.rules
drbd-utils.x86_64: W: no-version-in-last-changelog
drbd-utils.x86_64: W: invalid-license GPL
drbd-utils.x86_64: W: unstripped-binary-or-object /sbin/drbdsetup
drbd-utils.x86_64: W: unstripped-binary-or-object /sbin/drbdmeta
drbd-utils.x86_64: W: only-non-binary-in-usr-lib
drbd-utils.x86_64: E: non-standard-dir-perm /var/lib/drbd 0644
drbd-utils.x86_64: W: service-default-enabled /etc/rc.d/init.d/drbd
drbd-utils.x86_64: W: service-default-enabled /etc/rc.d/init.d/drbd
drbd-utils.x86_64: W: incoherent-init-script-name drbd ('drbd-utils',
'drbd-utilsd')
drbd-xen.x86_64: W: no-version-in-last-changelog
drbd-xen.x86_64: W: invalid-license GPL
drbd-xen.x86_64: W: no-documentation
10 packages and 1 specfiles checked; 33 errors, 38 warnings.

Most of those errors/warnings need to be fixed.

Regarding the hardcoded-library-path I understand the issue and it's ok to have
exceptions. This is required for several other cluster packages in order to
respect OCF and other RAs standards.

MUST items:
- The package must be named according to the  Package Naming Guidelines: OK
- The spec file name must match the base package: OK
- The package must meet the  Packaging Guidelines:
  * Licence tag needs fixing (as reported by rpmlint too)
  * It contains unnecessary BuildRequires
  * Changelog format doesn't comply with standards
  * Vendor tag should not be used
  * Source tag should contain full URL to the source
  * Requiring Base Package should use a fully versioned dependency
- The package must be licensed..: as above.
- The License field in the package spec file must match the actual license:
NOK. Source contains GPL2 and spec file GPL.
- 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: NOK: all subpackages should contain the
COPYING file too.
- The spec file must be written in American English: OK
- The spec file for the package MUST be legible: OK, see my notes below for
minor improvements.
- The sources used to build the package must match the upstream source, as
provided in the spec URL: NOK, cannot verify. URL doesn't match.
- The package MUST successfully compile and build into binary rpms on at least
one primary architecture: OK, tested in koji.
- All build dependencies must be listed in BuildRequires: OK. As noted above,
some buildrequired don't need to be there.
- The spec file MUST handle locales properly: does not apply.
- Every binary RPM package (or subpackage) which stores shared library files:
does not apply
- Packages must NOT bundle copies of system libraries: OK
- If the package is designed to be relocatable..: does not apply
- A package must own all directories that it creates...: %{_prefix}/lib/%{name}
seems to be un-owned.
- A Fedora package must not list a file more than once in the spec file's
%files listing: OK
- Permissions on files must be set properly...: OK, see minor note below.
- Each package must have a %clean section, which contains rm -rf %{buildroot}:
OK
- Each package must consistently use macros: OK
- The package must contain code, or permissable content: OK
- Large documentation files must go in a -doc subpackage: does not apply
- If a package includes something as %doc..: OK
- Header files must be in a -devel package..: does not apply.
- Static libraries must be in a -static package..: does not apply.
- Packages containing pkgconfig(.pc) files must..: does not apply.
- If a package contains library...: does not apply
- In the vast majority of cases, devel packages...: does not apply.
- Packages must NOT contain any .la libtool archives..: does not apply.
- Packages containing GUI applications must include a %{name}.desktop file..:
does not apply.
- Packages must not own files or directories already owned by other packages..:
OK
- At the beginning of %install, each package MUST run rm -rf %{buildroot}.. :
OK
- All filenames in rpm packages must be valid UTF-8: OK

SHOULD items:
- If the source package does not include license text(s) as..: source contains
COPYING file with licence. OK
- The description and summary sections in the package spec file should contain
translations..: does not apply
- The reviewer should test that the package builds in mock: OK. Tested with:
 koji build --scratch dist-f13 drbd-8.3.4-5.fc12.src.rpm
 http://koji.fedoraproject.org/koji/taskinfo?taskID=1745665
1745665 build (dist-f13, drbd-8.3.4-5.fc12.src.rpm) completed successfully
- The package should compile and build into binary rpms on all supported
architectures: OK
- The reviewer should test that the package functions as described: will be
done once we address the packaging issues.
- If scriptlets are used, those scriptlets must be sane..: see notes below.
- Usually, subpackages other than devel should require the base package using a
fully versioned dependency: NOK, already noted above.
- The placement of pkgconfig(.pc) files depends..: does not apply
- If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin,
or /usr/sbin..: does not apply

Notes:

- drdb placeholder package is uninstallable if the default feature set is
reduced.

- BuildRoot entry, while valid, is not in the preferred format. Packaging guide
lines recommend: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

- spec file readability: need a bit of sorting. I personally prefer to sort
entries in the spec file with build/setup/install bits at the top, and then all
packages afterwards. All the different sub packages are splitted across 2
sections that's not really required and adds a lot of conditionals, while
others are all packed in one (easier to read).

- macros need to be used more consistently. (/etc/rc.d/init.d -> %{_initrddir})

- %build doesn't respect smpflags

- udev rule is installed 755 ? 644 should be enough.

- scriptlets:
  %post utils package performs mknod operations. When udev is available, is
that operation required at all?
  %preun utils attempts to invoke rcdrbd stop. I don't think that's required in
Fedora and a safer way to write the %preun is:
if [ "$1" = 0 ]; then
        /sbin/service foo stop >/dev/null 2>&1
        /sbin/chkconfig --del foo
fi


About the general packaing:

- most of the packages could be architecture generic. drdb placeholder, the
several scripts integration stuff too.

- the -rgmanager variant conflicts with resource-agents. We will discuss this
specific detail between upstreams tho. It's only partially relevant for this
review as the package itself is and we will address it in cooperation with
cluster/resource-agents people.

Let's start addressing those problems, then we will do another full review to
see if I missed something.

Fabio

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.




More information about the package-review mailing list