From 04df400e55faaf3903235e75b25fc3e3e11319d9 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 5 Mar 2024 07:09:15 +0100 Subject: [PATCH 1/3] chore(build): reformat %meson call Wrap each argument in its own line, adding a %nil marker at the end. There are no behaviour changes; this simplifies adding conditional options later on. Signed-off-by: Pino Toscano --- insights-client.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/insights-client.spec b/insights-client.spec index 21ebe407..76dab2b1 100644 --- a/insights-client.spec +++ b/insights-client.spec @@ -63,7 +63,9 @@ Resource Optimization service upon modifying ros_collect parameter to True. %build -%{meson} -Dpython=%{__python3} +%{meson} \ + -Dpython=%{__python3} \ + %{nil} %{meson_build} From 81b7699f0666fd864f92b2aa65c87f1140006948 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 12 Jun 2024 16:40:50 +0200 Subject: [PATCH 2/3] feat(build): add redhat_access_insights meson option Add a meson option to control whether the deprecated 'redhat-access-insights' executable is created. The default is false to not build a deprecated bit by default; to preserve the existing behaviour, the packaging unconditionally enables it. Signed-off-by: Pino Toscano --- insights-client.spec | 1 + meson_options.txt | 1 + src/meson.build | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/insights-client.spec b/insights-client.spec index 76dab2b1..8ee6c1a1 100644 --- a/insights-client.spec +++ b/insights-client.spec @@ -65,6 +65,7 @@ Resource Optimization service upon modifying ros_collect parameter to True. %build %{meson} \ -Dpython=%{__python3} \ + -Dredhat_access_insights=true \ %{nil} %{meson_build} diff --git a/meson_options.txt b/meson_options.txt index 15c3c4c6..8b4a3a00 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ option('python', type: 'string', value: 'python3', description: 'python interpreter to use when finding python installation') option('auto_registration', type: 'feature', value: 'disabled', description: 'enable automatic registration') option('checkin', type: 'feature', value: 'disabled', description: 'enable hourly check-in') +option('redhat_access_insights', type: 'boolean', value: false, description: 'enable deprecated redhat-access-insights executable') diff --git a/src/meson.build b/src/meson.build index 9e0bc246..dd0ffd13 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,8 +1,11 @@ insights_client_sources = [ 'insights-client.in', - 'redhat-access-insights.in' ] +if get_option('redhat_access_insights') + insights_client_sources += 'redhat-access-insights.in' +endif + foreach source : insights_client_sources configure_file( input: source, From 3920b32fb4768039559f67ebab3d8983ca4d8e71 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 12 Jun 2024 16:43:18 +0200 Subject: [PATCH 3/3] feat(build): enable redhat-access-insights only in RHEL < 10 There is no need for it anymore, so keep it only for existing enterprise distributions. Card ID: CCT-419 Signed-off-by: Pino Toscano --- insights-client.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/insights-client.spec b/insights-client.spec index 8ee6c1a1..d3736549 100644 --- a/insights-client.spec +++ b/insights-client.spec @@ -65,7 +65,9 @@ Resource Optimization service upon modifying ros_collect parameter to True. %build %{meson} \ -Dpython=%{__python3} \ +%if (0%{?rhel} && 0%{?rhel} < 10) -Dredhat_access_insights=true \ +%endif %{nil} %{meson_build}