Hey Martins,
Martins Innus <minnus@xxxxxxxxxxx> writes:
> Hi,
> Any thoughts on providing something like this in the rpm build
> process:
>
> diff --git a/build/rpm/pcp.spec.in b/build/rpm/pcp.spec.in
> index dcb13a2..8cc0501 100644
> --- a/build/rpm/pcp.spec.in
> +++ b/build/rpm/pcp.spec.in
> @@ -11,7 +11,7 @@ Distribution: @package_distribution@
> %if 0%{?fedora} > 22 || 0%{?rhel} > 7
> %global with_compat 0
> %else
> -%global with_compat 1
> +%global with_compat 0%{!?_without_compat:1}
> %endif
> BuildRequires: procps bison flex
> BuildRequires: ncurses-devel
>
> Because without something like this, I can't find a way to build pcp
> without compat packages on RHEL7. So for instance, without the ability
> to override this, the following occurs on a RHEL 7 system with no pcp
> previously installed:
I think this would be an acceptable approach, especially that it keeps
the currect default (aka the macro would have to override the setting).
How about a variable name that doesn't dip into the compat double
negatives? Such as _enable_minimal_install, or something similar?
My only thought would be, can external rpm's set this macro? I can't
seem to find the answer in the rpm docs anywhere, but it isn't a blocker
to me, just a nice-to-have.
A quick test of the above patch on a fedora 21 machine works.
[...]
> That is, I can't figure out a way to do a minimal install. With that
> patch, and the appropriate setting in the pmmacros file, all works
> well:
You could use the --no-deps option if you really wanted. Otherwise, the
idea behind the pcp-compat package was that no system that already
possibly had a full pcp-install (pre-pmda breakout, etc) should break
due to the change in packages, with the pcp-compat a temporary
transition piece. The Fedora packaging guidelines recommended this
compat style packaging change.
Anyways, pending my bikeshedding or any other objections, this patch
looks good to me.
Thanks,
Lukas
|