Bug 307901 - Review Request: lsvpd - A utility to list device Vital Product Data (VPD) information.
Review Request: lsvpd - A utility to list device Vital Product Data (VPD) inf...
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: manuel wolfshant
Fedora Extras Quality Assurance
Depends On: 307891
  Show dependency treegraph
Reported: 2007-09-26 15:43 EDT by Eric Munson
Modified: 2008-04-01 04:27 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-01 04:27:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
wolfy: fedora‑review+
kevin: fedora‑cvs+

Attachments (Terms of Use)

  None (edit)
Description Eric Munson 2007-09-26 15:43:16 EDT
Spec URL: http://superb-west.dl.sourceforge.net/sourceforge/linux-diag/lsvpd.spec
SRPM URL: http://superb-west.dl.sourceforge.net/sourceforge/linux-diag/lsvpd-1.3.4-1.src.rpm
Description: This utility lists device Vital Product Data (VPD), which includes the following information and more: vendor, version, revision level, serial number. This utility has been tested on ppc64, ppc, and i386 platforms.
Comment 1 Eric Munson 2007-10-10 13:03:14 EDT
We have released a new version of lsvpd.  The new files are available here:
Spec URL: http://internap.dl.sourceforge.net/sourceforge/linux-diag/lsvpd.spec
Comment 2 manuel wolfshant 2007-11-15 16:44:55 EST
I am not a sponsor, so I cannot do an official review.
However, I will try to push this a bit.
Comments about your spec:
- rpm is not meant to be used as a shell, therefore the first line of the spec
(#! /usr/bin/rpm) should not be there
- the preferred way to reference files hosted at sourceforge is described at
(For packages hosted on sourceforge, use Source0:
In your case, the source is called %{name}-%{version}.src.tar.gz so adapt as needed.

rpmlint has several complains:
lsvpd.src: W: mixed-use-of-spaces-and-tabs (spaces: line 17, tab: line 5)
-> easy one, cosmetic fix
lsvpd.src: W: non-standard-group System Environment
-> try to pick a better group description
lsvpd.src: E: no-changelogname-tag
-> add ad least one proper entry to %changelog
lsvpd.src: W: invalid-license GPL
-> license should probably be GPLv2 or even GPLv2+
Comment 3 Eric Munson 2007-11-16 16:43:44 EST
Thanks for your feedback, I have made the changes that you requested.  Here are
the new files:
SPEC: http://easynews.dl.sourceforge.net/sourceforge/linux-diag/lsvpd.spec
Comment 4 manuel wolfshant 2007-11-17 08:07:36 EST
The shape is much better now. The only suggestion I have is to ditch the INSTALL
file from %doc because it brings no value to Fedora users. Just keep this in
mind and implement whenever you happen to modify the spec, it's not at all
critical. Make sure it occurs before the commit phase, once a sponsor approves
the package.

Comment 5 Ralf Corsepius 2007-11-17 08:37:02 EST

* You must not touch the running system when building a package, like you do here:

%{__rm} -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT

if [ -e /etc/udev/rules.d/99-lsvpd.rules ] ; then
	%{__rm} /etc/udev/rules.d/99-lsvpd.rules

if [ -e /etc/udev/rules.d/99-lsvpd.disabled ] ; then
	%{__rm} /etc/udev/rules.d/99-lsvpd.disabled

* Missing: 
Requires(post): /usr/sbin/vpdupdate

* Replace all /etc/lsvpd with %{_sysconfdir}/lsvpd
It this package which installs it there through %configure

* Requires: /sbin/chkconfig is wrong
You want Requires(post) and Requires(preun).

* Remove stray/unused %postun

* Consider to remove inserv etc. I an not sure if we want Fedora's rpms'
scriptlets to be cluttered with insserv.

* Would you please explain:
Requires: libvpd_cxx

AFAIS, this is superflous and should be removed.

Comment 6 Eric Munson 2007-12-17 19:10:23 EST
I have fixed your requests and they will go out at the next release.

Calls to insserv and chkconfig have been removed

On my build system, libvpd_cxx was not being added to the Requires section by
the build process but it is required (and not provided by this package).  So I
added it by hand.  It is provided by the libvpd package from bug #307891
Comment 7 Eric Munson 2008-01-03 14:25:50 EST
Here is the latest release of lsvpd:

SPEC: http://downloads.sourceforge.net/linux-diag/lsvpd.spec
SRPM: http://downloads.sourceforge.net/linux-diag/lsvpd-1.5.0-0.src.rpm
Comment 8 Eric Munson 2008-01-25 11:47:06 EST
I have been sponsored on another package, do I still need to get sponsorship here?
Comment 9 Jason Tibbitts 2008-01-25 13:39:32 EST
Sponsorship is for the person, not the package.
Comment 10 Eric Munson 2008-01-25 16:09:37 EST
New Package CVS Request
Package Name: lsvpd
Short Description: Set of programs to collect and display system VPD
Owners: emunson
Branches: F-8 EL-4 EL-5
Cvsextras Commits: yes
Comment 11 Dennis Gilmore 2008-01-26 08:54:19 EST
Package has not been approved.  please re-request cvs when its approved
Comment 12 Jason Tibbitts 2008-01-26 10:32:25 EST
Perhaps I only confused the issue.  Even after you've been sponsored, your
packages must still be reviewed and approved by a reviewer.  The difference is
that the pool of reviewers is significantly larger than the pool of sponsors.
Comment 13 Eric Munson 2008-01-26 17:09:03 EST
Sorry, my mistake.
Comment 14 manuel wolfshant 2008-01-26 18:50:59 EST
I've taken a quick glimpse and there are a couple of problems:
MUSTFIX: The bundled tar.gz and the one available on sf.net do not match.
Minor: the changelog has some typos

Obs: not a problem but usually the first release is marked "1" not "0" (see your
release tag)
Comment 15 Mamoru TASAKA 2008-01-27 10:03:03 EST
I just tried to rebuild this on koji but it failed.

As you are now cvs-extras member, you can try to rebuild a arbitrary
srpm on koji by:
$ koji build --scratch <target> <srpm_you_want_to_try>
Currently target can be either: dist-f9, dist-f8-updates-candidate,
dist-fc7-updates-candidate (and some special targets).

If the scratch build is successful, the rebuilt rpms and some logs are
put under:
Comment 16 Eric Munson 2008-02-06 16:45:35 EST
We are currently working on the next version of this package, I will post a new
spec file when it is finished and I am sure it builds on koji.
Comment 17 Eric Munson 2008-03-12 12:20:04 EDT
I am trying to start a scratch build on a new srpm.  The build fails, but I
never get any logs in my email or online.
Comment 18 Eric Munson 2008-03-12 16:02:58 EDT
I just had a successful lsvpd scratch build on koji:

Here are the SRPM and spec links:
SPEC: http://downloads.sourceforge.net/linux-diag/lsvpd.spec
SRPM: http://downloads.sourceforge.net/linux-diag/lsvpd-1.6.2-1.src.rpm
Comment 19 Eric Munson 2008-03-12 16:07:59 EDT
Sorry for the spam, but in the ppc and ppc64 builds there is optional behavior
if librtas (a IBM P-series library for reading system config and vpd) is
present.  How can I articulate that in the spec file?  I would like lsvpd to use
librtas if it is available.
Comment 20 manuel wolfshant 2008-03-13 06:32:21 EDT
Unfortunately rpm (and yum) do not yet provide a "hint" or "suggest" flag. So
what you can do is
- a) give up using that lib
- b) impose using that lib, by adding a conditional Requires / BuildRequires
(something along:
%ifarch ppc
stuff specific to PPC
do not forget to take care of both ppc and ppc64

If you go with option b (which I would recommend), rpm will check for the
existence of those libs when installing (and install them if they are missing).
Due to the missing "suggest" option of current rpm, there is no clean way of
building with a Requires for librtas but installing without.
Comment 21 Eric Munson 2008-03-13 19:06:24 EDT
I added the dependency, but I don't think that the library is in Fedora Core so
I am working with the library maintainers on a spec file and will post it here
(and update the dependency list for this bug) when it gets into bugzilla. 
Meanwhile, here is the new lsvpd, nothing has changed for x86 or x86_64.

SPEC: http://downloads.sourceforge.net/linux-diag/lsvpd.spec
SRPM: http://downloads.sourceforge.net/linux-diag/lsvpd-1.6.2-2.src.rpm
Comment 22 manuel wolfshant 2008-03-14 00:31:06 EDT
> I added the dependency, but I don't think that the library is in Fedora 
> Core so I am working with the library maintainers on a spec file and 
> will post it here (and update the dependency list for this bug) when 
> it gets into bugzilla. 

In this case we have a problem, because due to the missing libs, mock build is
guaranteed to fail for ppc archs. IOTW, mock will try to build, try to pull in
librtas-devel, fail (because it does not exist) and bail out.
For the moment ( until those libs land in Fedora ) I think that the option is to
wrap the %ifarch part that you have just added in a conditional variable which
is by default not set (hence the %arch part will not be executed by mock).

For instance (the syntax is not correct, but it will illustrate the purpose)
%define #define _with_librtas --with-librtas

%define name lsvpd
%define version 1.6.2

# By default, build without librtas because it does not yet exist in Fedora
%{!?_with_librtas: %{!?_without_librtas: %define _without_librtas
--without-librtas }}

%ifarch ppc
%{?_with_librtas:BuildRequires: librtas-devell }
%ifarch ppc64
%{?_with_librtas:BuildRequires: librtas-devell }

Doing it this way allows you to
- build on all archs, without this libs. This with happily pass fedora review
- allow rebuilding with support for / from this libs if one does a mock --define
with_librtas lsvpd.src.rpm (for those who have the libs from a 3rd party repo)

There is also an alternate way: add a file check, something along
%define have_librtas %(test the existence of the librtas file in the filesystem )
%if %{have_librtas}
BuildRequires: librtas-devel
However I'd say this approach is ugly as hell and should be avoided (among other
problems, it will definitely fail if used in a mock chroot)
Comment 23 Eric Munson 2008-03-14 14:27:19 EDT
I have added the conditional in front of the Build dep using your first
suggestion.  I have tested the build on koji and ppc/ppc64 succeeded.  Here are
the new files:

SPEC: http://downloads.sourceforge.net/linux-diag/lsvpd.spec
SRPM: http://downloads.sourceforge.net/linux-diag/lsvpd-1.6.2-3.src.rpm
Comment 24 manuel wolfshant 2008-03-15 01:09:02 EDT
Could you please post the link to your scratch build ? I've tried several times,
8 hours apart , to do a ppc scratch build but koji doesn't place nice with me, I
keep getting errors similar to

  517534 buildArch (lsvpd-1.6.2-3.src.rpm, ppc): open (ppc2.fedora.redhat.com)
-> FAILED: BuildrootError: could not init mock buildroot, mock exited with status 20
Comment 25 Mamoru TASAKA 2008-03-15 01:25:09 EDT
I just tried koji scratch build for 1.6.2-3 and it was successful.

(In reply to comment #24)
> Could you please post the link to your scratch build ? I've tried several times,
> 8 hours apart , to do a ppc scratch build but koji doesn't place nice with me, I
> keep getting errors similar to

"dist-rawhide" is not a valid target for koji build.
Comment 26 manuel wolfshant 2008-03-19 10:13:06 EDT
Package Review

 - = N/A
 x = Check
 ! = Problem
 ? = Not evaluated

 [x] Package is named according to the Package Naming Guidelines.
 [x] Spec file name must match the base package %{name}, in the format %{name}.spec.
 [x] Package meets the Packaging Guidelines.
 [x] Package successfully compiles and builds into binary rpms on at least one
supported architecture.
     Tested on: devel/x86_64
 [x] Rpmlint output:
source RPM: empty
binary RPM:
lsvpd.x86_64: W: non-conffile-in-etc /etc/lsvpd/scsi_templates.conf
-> you should mark as %config each of the config files
lsvpd.x86_64: W: spurious-executable-perm /usr/share/doc/lsvpd-1.6.2/COPYING
lsvpd.x86_64: W: spurious-executable-perm /usr/share/doc/lsvpd-1.6.2/TODO
lsvpd.x86_64: W: spurious-executable-perm /usr/share/doc/lsvpd-1.6.2/INSTALL
lsvpd.x86_64: W: spurious-executable-perm /usr/share/doc/lsvpd-1.6.2/README
lsvpd.x86_64: W: spurious-executable-perm /usr/share/doc/lsvpd-1.6.2/NEWS
-> either an %attr or a chmod -x would fix this
lsvpd.x86_64: W: non-conffile-in-etc /etc/lsvpd/cpu_mod_conv.conf
-> same as above
lsvpd.x86_64: W: incoherent-version-in-changelog -1.6.2-3 1.6.2-3.fc9
-> ignorable
lsvpd.x86_64: W: one-line-command-in-%post /usr/sbin/vpdupdate
-> ignorable, although joining %post and the vpupdate line will make rpmlint happier
 [x] Package is not relocatable.
 [x] Buildroot is correct
(%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n))
 [x] Package is licensed with an open-source compatible license and meets other
legal requirements as defined in the legal section of Packaging Guidelines.
 [x] License field in the package spec file matches the actual license.
     License type: GPLv2+
 [x] 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 is included in %doc.
 [x] Spec file is legible and written in American English.
 [!] Sources used to build the package matches the upstream source, as provided
in the spec URL.
     SHA1SUM of package:
32596c0297884c42937380d06139c5ea2bf0e436  lsvpd-1.6.2.tar.gz (upstream)
bdd61e818c2fbf71315168db95716393f2dc07e0  lsvpd-1.6.2.tar.gz.1 (included in the
 [x] Package is not known to require ExcludeArchd$
 [x] All build dependencies are listed in BuildRequires, except for any that are
listed in the exceptions section of Packaging Guidelines.
 [-] The spec file handles locales properly.
 [-] ldconfig called in %post and %postun if required.
 [x] Package must own all directories that it creates.
 [-] Package requires other packages for directories it uses.
 [!] Package does not contain duplicates in %files.
warning: File listed twice: /etc/lsvpd/cpu_mod_conv.conf
warning: File listed twice: /etc/lsvpd/scsi_templates.conf
-> Please either include the whole dir, or the files below it
 [!] Permissions on files are set properly.
-> see above the issue with doc files
 [x] Package has a %clean section, which contains rm -rf %{buildroot} (or
 [x] Package consistently uses macros.
 [x] Package contains code, or permissable content.
 [-] Large documentation files are in a -doc subpackage, if required.
 [x] Package uses nothing in %doc for runtime.
 [-] Header files in -devel subpackage, if present.
 [-] Static libraries in -devel subpackage, if present.
 [-] Package requires pkgconfig, if .pc files are present.
 [-] Development .so files in -devel subpackage, if present.
 [-] Fully versioned dependency in subpackages, if present.
 [x] Package does not contain any libtool archives (.la).
 [-] Package contains a properly installed %{name}.desktop file if it is a GUI
 [x] Package does not own files or directories owned by other packages.

 [x] Latest version is packaged.
 [x] Package does not include license text files separate from upstream.
 [-] Description and summary sections in the package spec file contains
translations for supported Non-English languages, if available.
 [x] Reviewer should test that the package builds in mock.
     Tested on: all archs supported by rawhide
 [x] Package should compile and build into binary rpms on all supported
     Tested on: all archs supported by rawhide
 [-] Package functions as described.
I could not test, the package does not build in F-7/F-8 due to missing libvpd-devel.
 [-] Scriptlets must be sane, if used.
 [-] The placement of pkgconfig(.pc) files is correct.
 [-] File based requires are sane.

=== Issues ===
1. the bundled sources and the upstream ones do not coincide
2. some of the included files have unrecommended permissions
3. two files are included twice

Please fix the above and we are good to go.
Comment 27 Eric Munson 2008-03-24 12:44:18 EDT
I have fixed the three issues presented, here are the completed files.

SPEC: http://downloads.sourceforge.net/linux-diag/lsvpd.spec
SRPM: http://downloads.sourceforge.net/linux-diag/lsvpd-1.6.3-1.src.rpm
Comment 28 manuel wolfshant 2008-03-24 15:04:41 EDT
Your current spec misses ownership of /etc/lsvpd/. What you need over there is
an additional
  %dir %{_sysconfdir}/lsvpd
in the %files section.

Otherwise, everything seems fine, sha1sum now matches upstream
(73ea96d8a031572d25f99d437cbc0b97443fce9b  lsvpd-1.6.3.tar.gz )

The package is APPROVED but please do nor forget to add the missing %dir before
uploading to cvs.
Comment 29 Eric Munson 2008-03-24 15:26:01 EDT
New Package CVS Request
Package Name: lsvpd
Short Description: Set of programs to collect and display system VPD
Owners: emunson
Branches: F-8 EL-5
Cvsextras Commits: yes
Comment 30 Kevin Fenzi 2008-03-24 19:53:19 EDT
cvs done.
Comment 31 Eric Munson 2008-04-01 04:27:54 EDT
The import and build for FC9 was successful, I am closing this bug with

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