pcp
[Top] [All Lists]

Re: [pcp] rhel compat package disable

To: Martins Innus <minnus@xxxxxxxxxxx>
Subject: Re: [pcp] rhel compat package disable
From: Lukas Berk <lberk@xxxxxxxxxx>
Date: Mon, 14 Sep 2015 15:30:12 -0400
Cc: pcp developers <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <55F2F6D8.4000800@xxxxxxxxxxx> (Martins Innus's message of "Fri, 11 Sep 2015 11:44:24 -0400")
References: <55F2F6D8.4000800@xxxxxxxxxxx>
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
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

<Prev in Thread] Current Thread [Next in Thread>