Bug 307901 - Review Request: lsvpd - A utility to list device Vital Product Data (VPD) information.
Summary: Review Request: lsvpd - A utility to list device Vital Product Data (VPD) inf...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: manuel wolfshant
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 307891
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-26 19:43 UTC by Eric Munson
Modified: 2008-04-01 08:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-01 08:27:54 UTC
Type: ---
Embargoed:
manuel.wolfshant: fedora-review+
kevin: fedora-cvs+


Attachments (Terms of Use)

Description Eric Munson 2007-09-26 19:43:16 UTC
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 17:03:14 UTC
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
SRPM URL:
http://easynews.dl.sourceforge.net/sourceforge/linux-diag/lsvpd-1.3.5-1.src.rpm

Comment 2 manuel wolfshant 2007-11-15 21:44:55 UTC
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
http://fedoraproject.org/wiki/Packaging/SourceURL?highlight=%20downloads.sourceforge%20#head-e27982f18a3bfd26b5b6ecbee113d2d8f3f006f2
(For packages hosted on sourceforge, use Source0:
http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz)
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 21:43:44 UTC
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
SRPM:
http://easynews.dl.sourceforge.net/sourceforge/linux-diag/lsvpd-1.4.0-1.src.rpm

Comment 4 manuel wolfshant 2007-11-17 13:07:36 UTC
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 13:37:02 UTC
MUSTFIX:

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

%install
%{__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
fi

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

* 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:
* 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-18 00:10:23 UTC
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 19:25:50 UTC
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 16:47:06 UTC
I have been sponsored on another package, do I still need to get sponsorship here?

Comment 9 Jason Tibbitts 2008-01-25 18:39:32 UTC
Sponsorship is for the person, not the package.

Comment 10 Eric Munson 2008-01-25 21:09:37 UTC
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
InitialCC: 
Cvsextras Commits: yes

Comment 11 Dennis Gilmore 2008-01-26 13:54:19 UTC
Package has not been approved.  please re-request cvs when its approved

Comment 12 Jason Tibbitts 2008-01-26 15:32:25 UTC
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 22:09:03 UTC
Sorry, my mistake.

Comment 14 manuel wolfshant 2008-01-26 23:50:59 UTC
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 15:03:03 UTC
I just tried to rebuild this on koji but it failed.
http://koji.fedoraproject.org/koji/taskinfo?taskID=375989

Note:
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:
http://koji.fedoraproject.org/scratch/<your_FAS_name>/task_<taskid>/

Comment 16 Eric Munson 2008-02-06 21:45:35 UTC
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 16:20:04 UTC
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 20:02:58 UTC
I just had a successful lsvpd scratch build on koji:
http://koji.fedoraproject.org/koji/taskinfo?taskID=513497

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 20:07:59 UTC
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 10:32:21 UTC
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
%endif
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 23:06:24 UTC
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 04:31:06 UTC
> 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 }
%endif
%ifarch ppc64
%{?_with_librtas:BuildRequires: librtas-devell }
%endif

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
%endif
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 18:27:19 UTC
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 05:09:02 UTC
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 05:25:09 UTC
I just tried koji scratch build for 1.6.2-3 and it was successful.
http://koji.fedoraproject.org/koji/taskinfo?taskID=517551

(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 14:13:06 UTC
Package Review
==============

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

=== REQUIRED ITEMS ===
 [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
src.rpm)
 [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
$RPM_BUILD_ROOT).
 [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
application.
 [x] Package does not own files or directories owned by other packages.

=== SUGGESTED ITEMS ===
 [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
architectures.
     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 16:44:18 UTC
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 19:04:41 UTC
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 19:26:01 UTC
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
InitialCC: 
Cvsextras Commits: yes

Comment 30 Kevin Fenzi 2008-03-24 23:53:19 UTC
cvs done.

Comment 31 Eric Munson 2008-04-01 08:27:54 UTC
The import and build for FC9 was successful, I am closing this bug with
next-release.


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