[Bug 307901] Review Request: lsvpd - A utility to list device Vital Product Data (VPD) information.
bugzilla at redhat.com
bugzilla at redhat.com
Fri Mar 14 04:31:07 UTC 2008
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.
Summary: Review Request: lsvpd - A utility to list device Vital Product Data (VPD) information.
https://bugzilla.redhat.com/show_bug.cgi?id=307901
------- Additional Comments From wolfy at nobugconsulting.ro 2008-03-14 00:31 EST -------
> 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)
--
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, or are watching someone who is.
More information about the package-review
mailing list