From 7f3d2d392f2f70d45481910a7f181812403b2d723fb2688cd82a8db5970fc2e5 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Wed, 14 Mar 2018 14:15:23 +0000 Subject: [PATCH] Accepting request 586767 from home:adamm:branches:systemsmanagement:wbem - Adapt cmpi-provider-register to explicitly require only python3 for SLE15/Leap15 onward (bnc#1085089) - minor cleanup of the spec file and description update - drop all build requires - we are not building anything, just copying a single file into place. OBS-URL: https://build.opensuse.org/request/show/586767 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:wbem/cmpi-provider-register?expand=0&rev=25 --- cmpi-provider-register.changes | 9 +++++++++ cmpi-provider-register.py | 2 +- cmpi-provider-register.spec | 18 ++++++++++++------ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/cmpi-provider-register.changes b/cmpi-provider-register.changes index 4c00f89..c832393 100644 --- a/cmpi-provider-register.changes +++ b/cmpi-provider-register.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Mar 14 07:09:09 UTC 2018 - adam.majer@suse.de + +- Adapt cmpi-provider-register to explicitly require only python3 + for SLE15/Leap15 onward (bnc#1085089) +- minor cleanup of the spec file and description update +- drop all build requires - we are not building anything, just + copying a single file into place. + ------------------------------------------------------------------- Mon Jan 15 16:29:37 UTC 2018 - adam.majer@suse.de diff --git a/cmpi-provider-register.py b/cmpi-provider-register.py index b5b9d8a..7ab0284 100644 --- a/cmpi-provider-register.py +++ b/cmpi-provider-register.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 #******************************************************************************* # Copyright (C) 2008 Novell, Inc. All rights reserved. # diff --git a/cmpi-provider-register.spec b/cmpi-provider-register.spec index 226abea..97cb514 100644 --- a/cmpi-provider-register.spec +++ b/cmpi-provider-register.spec @@ -23,24 +23,30 @@ Summary: CIMOM neutral provider registration utility License: BSD-3-Clause Group: System/Management Requires: cim-schema +%if 0%{?suse_version} >= 1500 +Requires: python3-pywbem +%else Requires: python-pywbem -BuildRequires: cim-schema -BuildRequires: python-pywbem +%endif BuildArch: noarch Source0: cmpi-provider-register.py BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -A utility allowing CMPI provider packages to register with whatever -CIMOM(s) happens to be present on the system. +A utility allowing CMPI provider packages to register with various +CIMOM(s) present on the system. %prep %build +# For older SUSE distros and others, use whatever default python. +%if 0%{?suse_version} < 1500 +sed -i -e 's,^#!/usr/bin/python3,#!/usr/bin/python,' %{S:0} +%endif %install -%{__mkdir} -p $RPM_BUILD_ROOT/usr/sbin -install -m 755 %{S:0} $RPM_BUILD_ROOT/usr/sbin/cmpi-provider-register +mkdir -p %{buildroot}/usr/sbin +install -m 755 %{S:0} %{buildroot}/usr/sbin/cmpi-provider-register %files %defattr(-,root,root)