From 00253380c928842ce1894e607a99618355b3282e Mon Sep 17 00:00:00 2001 From: Alex Wood Date: Mon, 26 Feb 2018 16:43:05 -0500 Subject: [PATCH] Update subscription-manager to 1.21.2-2 Resolves: #1547354 - Add missing requires for python-kitchen (awood@redhat.com) Resolves: #1528625 - Prevent dmidecode failure from returning None (awood@redhat.com) Resolves: #1543639 - Properly encode package profile data (jturel@redhat.com) Resolves: #1527396 - Subman cockpit plugin - fix registration using act. keys Resolves: #1535974 - Close register dialog, when status is changed (jhnidek@redhat.com) Resolves: #1510024 - Handle rhel-alt product tags properly (khowell@redhat.com) Resolves: #1540204 - Raise RateLimitExceededException with headers (jhnidek@redhat.com) Resolves: #1533905 - Remove dependency on yum and chkconfig. (jhnidek@redhat.com) Resolves: #1479353 - Add --after option to list command (csnyder@redhat.com) Resolves: #1537473 - Subman rpm requires python-setuptools (jhnidek@redhat.com) Resolves: #1525238 - Do not protect rhel prod. cert with special case Resolves: #1526622 - Do not delete product certificates in protected directory Resolves: #1519512 - Handle non-UTF8 RPM vendors (khowell@redhat.com) Resolves: #1487600 - Fix registration success detection (khowell@redhat.com) Resolves: #1527813 - subman-gui use new URL of Online Documentation (jhnidek@redhat.com) Resolves: #1527392 - Clear credential data in register dialog (jhnidek@redhat.com) Resolves: #1507030 - RestlibExceptions should show they originate server-side --- .gitignore | 2 + sources | 4 +- subscription-manager.spec | 248 +++++++++++++++++++++++--------------- 3 files changed, 154 insertions(+), 100 deletions(-) diff --git a/.gitignore b/.gitignore index d31bb38..f076e68 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,5 @@ /subscription-manager-1.20.2.tar.gz /subscription-manager-1.21.1.tar.gz /subscription-manager-cockpit-1.21.1.tar.gz +/subscription-manager-1.21.2.tar.gz +/subscription-manager-cockpit-1.21.2.tar.gz diff --git a/sources b/sources index d9d2301..b856d17 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (subscription-manager-1.21.1.tar.gz) = 74be74b29686c2ef47abdd1471d9835e072f3e5ca585c26a3ac3555395f87bd7c54ed8ae96b4f977f6402243931e0dd073c20806e0ed91d348185356dbdbd704 -SHA512 (subscription-manager-cockpit-1.21.1.tar.gz) = 2157ec8f9e385407e9571ce7098ee9e1d1c2aceaa581e7e972958f86c5092be20aed871373708d10587a97dddfb255e04da7f58d93c9cab21e3af5b26eb2394c +SHA512 (subscription-manager-1.21.2.tar.gz) = 2f86d835637eaa5536779e38ae8d76fe4ebf96ca5834685a0bda60aca95f3b05f573e3b1c6c3d5253898076d4e894f160dd5556d7ab333335bedf44b65f58eb4 +SHA512 (subscription-manager-cockpit-1.21.2.tar.gz) = 3b420ec3f226039bf35a2fe3de350553575c013780b4a7b2f82eb97471680985b3cd1532e6b2c3b1f93bb3f3ea31374734aef165987b395ea1669dfb9f111aa6 diff --git a/subscription-manager.spec b/subscription-manager.spec index ad790fc..323f263 100644 --- a/subscription-manager.spec +++ b/subscription-manager.spec @@ -7,16 +7,18 @@ %global use_firstboot 0 %global use_kitchen 1 %global use_inotify 1 -%global use_python3 0%{?fedora} + +# borrowed from dnf spec file & tweaked +%if (0%{?rhel} && 0%{?rhel} <= 7) || 0%{?suse_version} +%bcond_with python3 +%else +%bcond_without python3 +%endif + %global rhsm_plugins_dir /usr/share/rhsm-plugins # on recent Fedora and RHEL 7, let's not use m2crypto %global use_m2crypto (0%{?fedora} < 23 && 0%{?rhel} < 7) -# SLES 11 and RHEL6 don't have macros defined for python2; just "python". Alias them. -%{!?__python2:%global __python2 %__python} -%{!?python2_sitearch:%global python2_sitearch %python_sitearch} -%{?python_provide:%python_provide python-rhsm} - %if %{use_systemd} # Note that %gtk3 will be undefined if it's not used %global gtk3 1 @@ -29,10 +31,20 @@ %global use_inotify 0 %endif -%global use_dnf 0%{?fedora} +%global use_dnf %{with python3} && (0%{?fedora} || (0%{?rhel})) %global use_yum (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?suse_version}) %global use_cockpit 0%{?fedora} || 0%{?rhel} >= 7 +%if %{with python3} +%global python_sitearch %python3_sitearch +%global __python %__python3 +%global py_package_prefix python%{python3_pkgversion} +%global rhsm_package_name %{py_package_prefix}-subscription-manager-rhsm +%else +%global py_package_prefix python +%global rhsm_package_name subscription-manager-rhsm +%endif + %global _hardened_build 1 %{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro -Wl,-z,now} @@ -82,8 +94,8 @@ %endif Name: subscription-manager -Version: 1.21.1 -Release: 2%{?dist} +Version: 1.21.2 +Release: 2 Summary: Tools and libraries for subscription and repository management Group: System Environment/Base License: GPLv2 @@ -112,34 +124,48 @@ Source2: subscription-manager-rpmlintrc # nesting is required since RPM requires the various preamble directives to be # at the start of a line making meaningful indentation impossible. -Requires: python-ethtool -Requires: python-iniparse -Requires: python-decorator +Requires: %{py_package_prefix}-ethtool +Requires: %{py_package_prefix}-iniparse +Requires: %{py_package_prefix}-decorator Requires: virt-what -Requires: subscription-manager-rhsm = %{version} -Requires: python-decorator -Requires: python-six -Requires: python-dateutil +Requires: %{rhsm_package_name} = %{version} +Requires: %{py_package_prefix}-six +Requires: %{py_package_prefix}-dateutil +Requires: %{py_package_prefix}-setuptools +%if %{with python3} +Requires: python3-dbus +%else Requires: %{?suse_version:dbus-1-python} %{!?suse_version:dbus-python} -Requires: %{?suse_version:aaa_base} %{!?suse_version:chkconfig} +%endif + +%if %{use_yum} Requires: %{?suse_version:yum} %{!?suse_version:yum >= 3.2.29-73} +%endif + +%if %{use_kitchen} +Requires: %{py_package_prefix}-kitchen +%endif # Support GTK2 and GTK3 on both SUSE and RHEL... %if 0%{?suse_version} Requires: %{?gtk3:python-gobject} %{!?gtk3:python-gobject2, libzypp, zypp-plugin-python, python-zypp} %else Requires: usermode +%if %{with python3} +Requires: python3-gobject +%else Requires: %{?gtk3:gobject-introspection, pygobject3-base} %{!?gtk3:pygobject2} +%endif # There's no dmi to read on these arches, so don't pull in this dep. # Additionally, dmidecode isn't packaged at all on SUSE %ifnarch ppc ppc64 s390 s390x -Requires: python-dmidecode +Requires: %{py_package_prefix}-dmidecode %endif %endif %if %use_inotify -Requires: python-inotify +Requires: %{py_package_prefix}-inotify %endif %if %use_systemd @@ -147,17 +173,20 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %else +Requires: %{?suse_version:aaa_base} %{!?suse_version:chkconfig} Requires(post): %{?suse_version:aaa_base} %{!?suse_version:chkconfig} Requires(preun): %{?suse_version:aaa_base} %{!?suse_version:chkconfig, initscripts} %endif -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: %{?suse_version:python-devel >= 2.6} %{!?suse_version:%{py_package_prefix}-devel} +BuildRequires: openssl-devel +BuildRequires: gcc +BuildRequires: %{py_package_prefix}-setuptools BuildRequires: gettext BuildRequires: intltool BuildRequires: libnotify-devel BuildRequires: desktop-file-utils -BuildRequires: python-six +BuildRequires: %{py_package_prefix}-six BuildRequires: %{?suse_version:dbus-1-glib-devel} %{!?suse_version:dbus-glib-devel} BuildRequires: %{?suse_version:lsb-release, distribution-release} %{!?suse_version:redhat-lsb} @@ -179,10 +208,6 @@ BuildRequires: systemd-rpm-macros BuildRequires: systemd %endif -# The %{?something:foo} expands to foo only when something is **defined**. Likewise the -# %{!?something:foo} expands only when something is **not defined**. -BuildRequires: %{?suse_version:python-devel >= 2.6} %{!?suse_version:python2-devel} -BuildRequires: openssl-devel %description The Subscription Manager package provides programs and libraries to allow users @@ -258,7 +283,11 @@ Summary: Subscription Manager plugins for DNF Group: System Environment/Base Requires: %{name} = %{version}-%{release} Requires: dnf >= 1.0.0 +%if %{with python3} +Requires: python3-dnf-plugins-core +%else Requires: python2-dnf-plugins-core +%endif %description -n dnf-plugin-subscription-manager This package provides plugins to interact with repositories and subscriptions @@ -302,7 +331,7 @@ Group: System Environment/Base Requires: pygobject3-base # plugin needs a slightly newer version of python-iniparse for 'tidy' -Requires: python-iniparse >= 0.4 +Requires: %{py_package_prefix}-iniparse >= 0.4 Requires: %{name} = %{version}-%{release} %description -n subscription-manager-plugin-ostree @@ -312,53 +341,36 @@ the remote in the currently deployed .origin file. %endif -%package -n subscription-manager-rhsm +%package -n %{rhsm_package_name} Summary: A Python library to communicate with a Red Hat Unified Entitlement Platform Group: Development/Libraries %if %use_m2crypto Requires: %{?suse_version:python-m2crypto} %{!?suse_version:m2crypto} %endif -Requires: python-dateutil -Requires: python-iniparse +Requires: %{py_package_prefix}-dateutil +Requires: %{py_package_prefix}-iniparse # rpm-python is an old name for python2-rpm but RHEL6 uses the old name -Requires: rpm-python -Requires: python-six +Requires: %{py_package_prefix}-six Requires: subscription-manager-rhsm-certificates = %{version}-%{release} -Provides: python-rhsm = %{version}-%{release} -Obsoletes: python-rhsm <= 1.20.3-1 - -%description -n subscription-manager-rhsm -A small library for communicating with the REST interface of a Red Hat Unified -Entitlement Platform. This interface is used for the management of system -entitlements, certificates, and access to content. - - -%if %{use_python3} -%package -n python3-subscription-manager-rhsm -Summary: A Python library to communicate with a Red Hat Unified Entitlement Platform -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-six - -Requires: python3-dateutil -Requires: python3-iniparse +# Required by Fedora packaging guidelines +%{?python_provide:%python_provide %{py_package_prefix}-rhsm} +%if %{with python3} Requires: python3-rpm -Requires: python3-six -# M2Crypto isn't even used in new Fedoras and RHEL 8 -Requires: subscription-manager-rhsm-certificates = %{version}-%{release} Provides: python3-python-rhsm = %{version}-%{release} Obsoletes: python3-python-rhsm <= 1.20.3-1 +%else +Requires: rpm-python +Provides: python-rhsm = %{version}-%{release} +Obsoletes: python-rhsm <= 1.20.3-1 +Provides: subscription-manager-rhsm = %{version}-%{release} +Obsoletes: subscription-manager-rhsm <= 1.21.0-1 +%endif -# Required by Fedora packaging guidelines -%{?python_provide:%python_provide python3-python-rhsm} - -%description -n python3-subscription-manager-rhsm +%description -n %{rhsm_package_name} A small library for communicating with the REST interface of a Red Hat Unified Entitlement Platform. This interface is used for the management of system entitlements, certificates, and access to content. -%endif - %package -n subscription-manager-rhsm-certificates Summary: Certificates required to communicate with a Red Hat Unified Entitlement Platform @@ -390,24 +402,12 @@ Subscription Manager Cockpit UI %build make -f Makefile VERSION=%{version}-%{release} CFLAGS="%{optflags}" \ - LDFLAGS="%{__global_ldflags}" OS_DIST="%{dist}" %{?gtk_version} + LDFLAGS="%{__global_ldflags}" OS_DIST="%{dist}" PYTHON="%{__python}" %{?gtk_version} %install rm -rf %{buildroot} -%if %{use_python3} make -f Makefile install VERSION=%{version}-%{release} \ - PYTHON=/usr/bin/python3 PREFIX=%{_prefix} \ - DESTDIR=%{buildroot} PYTHON_SITELIB=%{python3_sitearch} \ - OS_VERSION=%{?fedora}%{?rhel}%{?suse_version} OS_DIST=%{dist} \ - %{?install_ostree} %{?post_boot_tool} %{?gtk_version} \ - %{?install_yum_plugins} %{?install_dnf_plugins} \ - %{?install_zypper_plugins} \ - %{?with_systemd} -rm %{buildroot}/usr/bin/subscription-manager -rm %{buildroot}/usr/bin/subscription-manager-gui -%endif -make -f Makefile install VERSION=%{version}-%{release} \ - PYTHON=/usr/bin/python2 PREFIX=%{_prefix} \ + PYTHON=%{__python} PREFIX=%{_prefix} \ DESTDIR=%{buildroot} PYTHON_SITELIB=%{python_sitearch} \ OS_VERSION=%{?fedora}%{?rhel}%{?suse_version} OS_DIST=%{dist} \ %{?install_ostree} %{?post_boot_tool} %{?gtk_version} \ @@ -483,9 +483,6 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroo %dir %{python_sitearch}/subscription_manager/model %dir %{python_sitearch}/subscription_manager/plugin %dir %{python_sitearch}/subscription_manager/scripts -%if %{use_python3} -%exclude %{python3_sitearch}/rhsmlib -%endif %dir %{_var}/spool/rhsm %dir %{_prefix}/share/polkit-1 %dir %{_prefix}/share/polkit-1/actions @@ -565,14 +562,21 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroo %{python_sitearch}/subscription_manager/model/*.py* %{python_sitearch}/subscription_manager/plugin/__init__.py* %{python_sitearch}/subscription_manager/scripts/*.py* -%if %{use_python3} -%exclude %{python3_sitearch}/subscription_manager-*.egg-info/* -%exclude %{python3_sitearch}/subscription_manager +%if %{with python3} +%{python_sitearch}/subscription_manager/__pycache__ +%{python_sitearch}/subscription_manager/api/__pycache__ +%{python_sitearch}/subscription_manager/branding/__pycache__ +%{python_sitearch}/subscription_manager/model/__pycache__ +%{python_sitearch}/subscription_manager/plugin/__pycache__ +%{python_sitearch}/subscription_manager/scripts/__pycache__ %endif # our gtk2/gtk3 compat modules %dir %{python_sitearch}/subscription_manager/ga_impls %{python_sitearch}/subscription_manager/ga_impls/__init__.py* +%if %{with python3} +%{python_sitearch}/subscription_manager/ga_impls/__pycache__ +%endif %if 0%{?gtk3} %{python_sitearch}/subscription_manager/ga_impls/ga_gtk3.py* @@ -610,8 +614,15 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroo %{python_sitearch}/rhsmlib/dbus/*.py* %{python_sitearch}/rhsmlib/dbus/facts/*.py* %{python_sitearch}/rhsmlib/dbus/objects/*.py* -%if %{use_python3} -%exclude %{python3_sitearch}/rhsmlib +%if %{with python3} +%{python_sitearch}/rhsmlib/__pycache__ +%{python_sitearch}/rhsmlib/candlepin/__pycache__ +%{python_sitearch}/rhsmlib/compat/__pycache__ +%{python_sitearch}/rhsmlib/dbus/__pycache__ +%{python_sitearch}/rhsmlib/dbus/facts/__pycache__ +%{python_sitearch}/rhsmlib/dbus/objects/__pycache__ +%{python_sitearch}/rhsmlib/facts/__pycache__ +%{python_sitearch}/rhsmlib/services/__pycache__ %endif %{_datadir}/polkit-1/actions/com.redhat.*.policy @@ -630,16 +641,16 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroo # Incude rt CLI tool %dir %{python_sitearch}/rct %{python_sitearch}/rct/*.py* -%if %{use_python3} -%exclude %{python3_sitearch}/rct +%if %{with python3} +%{python_sitearch}/rct/__pycache__ %endif %attr(755,root,root) %{_bindir}/rct # Include consumer debug CLI tool %dir %{python_sitearch}/rhsm_debug %{python_sitearch}/rhsm_debug/*.py* -%if %{use_python3} -%exclude %{python3_sitearch}/rhsm_debug +%if %{with python3} +%{python_sitearch}/rhsm_debug/__pycache__ %endif %attr(755,root,root) %{_bindir}/rhsm-debug @@ -675,6 +686,9 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroo %{python_sitearch}/subscription_manager/gui/data/ui/*.ui %{python_sitearch}/subscription_manager/gui/data/glade/*.glade %{python_sitearch}/subscription_manager/gui/data/icons/*.svg +%if %{with python3} +%{python_sitearch}/subscription_manager/gui/__pycache__ +%endif %{_datadir}/applications/subscription-manager-gui.desktop %{_datadir}/icons/hicolor/16x16/apps/*.png @@ -705,6 +719,9 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroo %defattr(-,root,root,-) %dir %{python_sitearch}/subscription_manager/migrate %{python_sitearch}/subscription_manager/migrate/*.py* +%if %{with python3} +%{python_sitearch}/subscription_manager/migrate/__pycache__ +%endif %attr(755,root,root) %{_sbindir}/rhn-migrate-classic-to-rhsm %doc @@ -725,6 +742,9 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroo %endif %{_sysconfdir}/rhsm/pluginconf.d/container_content.ContainerContentPlugin.conf %{rhsm_plugins_dir}/container_content.py* +%if %{with python3} +%{rhsm_plugins_dir}/__pycache__ +%endif %{python_sitearch}/subscription_manager/plugin/container.py* # Copying Red Hat CA cert into each directory: @@ -739,6 +759,9 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroo %{_sysconfdir}/rhsm/pluginconf.d/ostree_content.OstreeContentPlugin.conf %{rhsm_plugins_dir}/ostree_content.py* %{python_sitearch}/subscription_manager/plugin/ostree/*.py* +%if %{with python3} +%{python_sitearch}/subscription_manager/plugin/ostree/__pycache__ +%endif %endif @@ -752,6 +775,13 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroo %{_datadir}/anaconda/addons/com_redhat_subscription_manager/gui/spokes/*.py* %{_datadir}/anaconda/addons/com_redhat_subscription_manager/categories/*.py* %{_datadir}/anaconda/addons/com_redhat_subscription_manager/ks/*.py* +%if %{with python3} +%{_datadir}/anaconda/addons/com_redhat_subscription_manager/__pycache__ +%{_datadir}/anaconda/addons/com_redhat_subscription_manager/gui/__pycache__ +%{_datadir}/anaconda/addons/com_redhat_subscription_manager/gui/spokes/__pycache__ +%{_datadir}/anaconda/addons/com_redhat_subscription_manager/categories/__pycache__ +%{_datadir}/anaconda/addons/com_redhat_subscription_manager/ks/__pycache__ +%endif %endif @@ -771,23 +801,13 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroo %files -n dnf-plugin-subscription-manager %defattr(-,root,root,-) %{python_sitearch}/dnf-plugins/* -%if %{use_python3} -%exclude %{python3_sitearch}/dnf-plugins/* -%endif %endif -%files -n subscription-manager-rhsm +%files -n %{rhsm_package_name} %defattr(-,root,root,-) -%dir %{python2_sitearch}/rhsm -%{python2_sitearch}/rhsm/* - -%if %{use_python3} -%files -n python3-subscription-manager-rhsm -%defattr(-,root,root,-) -%dir %{python3_sitearch}/rhsm -%{python3_sitearch}/rhsm/* -%endif +%dir %{python_sitearch}/rhsm +%{python_sitearch}/rhsm/* %files -n subscription-manager-rhsm-certificates %attr(755,root,root) %dir %{_sysconfdir}/rhsm @@ -880,6 +900,38 @@ touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Feb 26 2018 Alex Wood 1.21.2-2 +- Remove %%clean section (ignatenkobrain@fedoraproject.org) +- Remove BuildRoot definition (ignatenkobrain@fedoraproject.org) + +* Mon Feb 26 2018 Alex Wood 1.21.2-1 +- 1547354: Add missing requires for python-kitchen (awood@redhat.com) +- 1528625: Prevent dmidecode failure from returning None (awood@redhat.com) +- 1543639: Properly encode package profile data (jturel@redhat.com) +- 1527396: Subman cockpit plugin - fix registration using act. keys + (jhnidek@redhat.com) +- 1535974: Close register dialog, when status is changed (jhnidek@redhat.com) +- Add start date to available pool listing (wpoteat@redhat.com) +- Condition requiring --after and --all is unnecessary (wpoteat@redhat.com) +- 1510024: Handle rhel-alt product tags properly (khowell@redhat.com) +- 1540204: Raise RateLimitExceededException with headers (jhnidek@redhat.com) +- 1533905: Remove dependency on yum and chkconfig. (jhnidek@redhat.com) +- 1479353: Add --after option to list command (csnyder@redhat.com) +- 1537473: Subman rpm requires python-setuptools (jhnidek@redhat.com) +- 1525238: Do not protect rhel prod. cert with special case + (jhnidek@redhat.com) +- 1526622: Do not delete product certificates in protected directory + (jhnidek@redhat.com) +- 1519512: Handle non-UTF8 RPM vendors (khowell@redhat.com) +- 1487600: Fix registration success detection (khowell@redhat.com) +- 1527813: subman-gui use new URL of Online Documentation (jhnidek@redhat.com) +- 1527392: Clear credential data in register dialog (jhnidek@redhat.com) +- rct cat-manifest: show Web and API urls from consumer.json (evgeni@golov.de) +- Use dnf on RHEL or Fedora w/ using Python 3 (khowell@redhat.com) +- 1507030: RestlibExceptions should show they originate server-side + (awood@redhat.com) +- Package for Python 3 on Fedora (khowell@redhat.com) + * Fri Feb 09 2018 Fedora Release Engineering - 1.21.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild