From 9413d66623ab87bf0d87d045d047c4eaac4402bd Mon Sep 17 00:00:00 2001 From: Christopher Snyder Date: Mon, 17 Jan 2022 10:51:53 -0500 Subject: [PATCH] Update subscription-manager to 1.29.23-1 Resolves: #2028894 - Don't allow service-level --serverurl on registered system Resolves: #2037771 - Cockpit registration dialog: enable insights by default Resolves: #2039322 - fix string representation of DMI facts (ptoscano@redhat.com) Resolves: #2026316 - Do not delete cache of content_access during refresh Resolves: #2026286 - consider user-specified --org in any case (ptoscano@redhat.com) Resolves: #1995032 - Use multiple environments (wpoteat@redhat.com) Resolves: #2028969 - Do not try to load compliance status from cache (jhnidek@redhat.com) Resolves: #2029927 - Fix bash autocompletion (mhorky@redhat.com) Resolves: #2026320 - fix format of HTTP-date headers (ptoscano@redhat.com) Resolves: #1999048 - Fixed partially subscribed product in Cockpit plugin Resolves: #2023257 - Disallowed attaching using D-Bus in SCA mode (jhnidek@redhat.com) Resolves: #2023257 - Disallowed attaching pool in SCA mode: (jhnidek@redhat.com) Resolves: #2028894 - Don't allow service-level --serverurl on registered system Resolves: #2037771 - Cockpit registration dialog: enable insights by default Resolves: #2039322 - fix string representation of DMI facts (ptoscano@redhat.com) Resolves: #2026316 - Do not delete cache of content_access during refresh Resolves: #2026286 - consider user-specified --org in any case (ptoscano@redhat.com) Resolves: #1995032 - Use multiple environments (wpoteat@redhat.com) Resolves: #2028969 - Do not try to load compliance status from cache (jhnidek@redhat.com) Resolves: #2029927 - Fix bash autocompletion (mhorky@redhat.com) Resolves: #2026320 - fix format of HTTP-date headers (ptoscano@redhat.com) Resolves: #1999048 - Fixed partially subscribed product in Cockpit plugin Resolves: #2023257 - Disallowed attaching using D-Bus in SCA mode (jhnidek@redhat.com) Resolves: #2023257 - Disallowed attaching pool in SCA mode: (jhnidek@redhat.com) --- .gitignore | 2 + sources | 4 +- subscription-manager-rpmlintrc | 15 ++ subscription-manager.spec | 274 +++++++++++++++++++++------------ 4 files changed, 194 insertions(+), 101 deletions(-) create mode 100644 subscription-manager-rpmlintrc diff --git a/.gitignore b/.gitignore index fe5cb29..8f72678 100644 --- a/.gitignore +++ b/.gitignore @@ -147,3 +147,5 @@ /subscription-manager-cockpit-1.29.18.tar.gz /subscription-manager-1.29.21.tar.gz /subscription-manager-cockpit-1.29.21.tar.gz +/subscription-manager-1.29.23.tar.gz +/subscription-manager-cockpit-1.29.23.tar.gz diff --git a/sources b/sources index 5d1eca6..b0532a5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (subscription-manager-1.29.21.tar.gz) = 02064b16d4db107b337f9d9e6fb530963143f69511ee3b3c72635aa23c6d7edaa338813747198ef09159f7aa0de04bbb86d225724e261a844e3e9e350853ed5a -SHA512 (subscription-manager-cockpit-1.29.21.tar.gz) = de5f182aaaad4e3c6adf14aeff03a952df45475a62440ecec253bbb51f9cc49750e1ceb406fbb731e1e6d2022edd3d983604a1e8671d8bebecd1e328179e7535 +SHA512 (subscription-manager-1.29.23.tar.gz) = c60b1dd9c00f69ad87bc7e59cf0ba09c36a84f7a307339c305bd9f3f294c43faa3af3fff7b0ef2d6b3db5c420b870d858bcd04370b5c3bee993601548eba84b8 +SHA512 (subscription-manager-cockpit-1.29.23.tar.gz) = 04c800a6a04432eff2436ccdc7e8df50cb60f20d38a6bb0dc880da74fa0965a04846473eda8f9b31092d84cab1a448d68848a14148c1e8ed6ea8eb6b597f9c11 diff --git a/subscription-manager-rpmlintrc b/subscription-manager-rpmlintrc new file mode 100644 index 0000000..86a331b --- /dev/null +++ b/subscription-manager-rpmlintrc @@ -0,0 +1,15 @@ +# This seems ok to me +addFilter('invalid-url') + +# All dnf plugins seem to hardcode paths +addFilter("hardcoded-library-path .*lib/dnf-plugins/.*") + +# Filter out zypper plugins too! +addFilter("hardcoded-library-path .*lib/zypp/plugins/.*") + +# Systemd tmpfiles are in /usr/lib +addFilter("hardcoded-library-path .*lib/tmpfiles.d/.*") + +# Ignore failing suse specific checks +setBadness("suse-dbus-unauthorized-service", 0) +setBadness("polkit-unauthorized-privilege", 0) diff --git a/subscription-manager.spec b/subscription-manager.spec index 514e880..eac6197 100644 --- a/subscription-manager.spec +++ b/subscription-manager.spec @@ -32,7 +32,11 @@ %global python_sitearch %python3_sitearch %global python_sitelib %python3_sitelib %global __python %__python3 +%if 0%{?suse_version} +%global py_package_prefix python3 +%else %global py_package_prefix python%{python3_pkgversion} +%endif %global rhsm_package_name %{py_package_prefix}-subscription-manager-rhsm %global _hardened_build 1 @@ -107,7 +111,7 @@ %global use_rhsm_icons 0%{use_cockpit} Name: subscription-manager -Version: 1.29.21 +Version: 1.29.23 Release: 1%{?dist} Summary: Tools and libraries for subscription and repository management %if 0%{?suse_version} @@ -131,6 +135,11 @@ Source0: %{name}-%{version}.tar.gz Source1: %{name}-cockpit-%{version}.tar.gz %endif +# Especially for the OpenSuse Build Service we need to have another lint config +%if 0%{?suse_version} +Source2: subscription-manager-rpmlintrc +%endif + # The following macro examples are preceeded by '%' to stop macro expansion # in the comments. (See https://bugzilla.redhat.com/show_bug.cgi?id=1224660 for # why this is necessary) @@ -147,18 +156,27 @@ Requires: %{py_package_prefix}-ethtool Requires: %{py_package_prefix}-iniparse Requires: %{py_package_prefix}-decorator Requires: virt-what -%if 0%{?suse_version} -Requires: logrotate -Requires: cron -%endif Requires: %{rhsm_package_name} = %{version} Requires: %{py_package_prefix}-six + %if 0%{?suse_version} -BuildRequires: %{py_package_prefix}-python-dateutil -Requires: %{py_package_prefix}-python-dateutil +Requires: %{py_package_prefix}-python-dateutil +Requires: %{py_package_prefix}-dbus-python +Requires: logrotate +Requires: cron +Requires: %{py_package_prefix}-gobject2 +Requires: libzypp +Requires: %{py_package_prefix}-zypp-plugin %else -BuildRequires: %{py_package_prefix}-dateutil Requires: %{py_package_prefix}-dateutil +Requires: %{py_package_prefix}-dbus +Requires: usermode +Requires: python3-gobject-base +# 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 aarch64 ppc ppc64 ppc64le s390 s390x +Requires: %{py_package_prefix}-dmidecode %{?dmidecode_version} +%endif %endif # rhel 8 has different naming for setuptools going forward @@ -168,8 +186,6 @@ Requires: platform-python-setuptools Requires: %{py_package_prefix}-setuptools %endif -Requires: python3-dbus - %if %{use_dnf} %if %{create_libdnf_rpm} Requires: dnf >= 1.0.0 @@ -180,18 +196,6 @@ Requires: dnf-plugin-subscription-manager = %{version} %endif %endif -%if 0%{?suse_version} -Requires: python-gobject2, libzypp, zypp-plugin-python, python-zypp -%else -Requires: usermode -Requires: python3-gobject-base -# 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 aarch64 ppc ppc64 ppc64le s390 s390x -Requires: %{py_package_prefix}-dmidecode %{?dmidecode_version} -%endif -%endif - %if %use_inotify Requires: %{py_package_prefix}-inotify %endif @@ -202,7 +206,7 @@ Requires(postun): systemd Requires: python3-cloud-what = %{version}-%{release} -BuildRequires: %{?suse_version:python-devel >= 2.6} %{!?suse_version:%{py_package_prefix}-devel} +BuildRequires: %{py_package_prefix}-devel BuildRequires: openssl-devel BuildRequires: gcc BuildRequires: %{py_package_prefix}-setuptools @@ -217,18 +221,15 @@ BuildRequires: desktop-file-utils %if 0%{?suse_version} BuildRequires: distribution-release +BuildRequires: libzypp +BuildRequires: systemd-rpm-macros +BuildRequires: python3-rpm-macros +BuildRequires: %{py_package_prefix}-python-dateutil %else BuildRequires: system-release +BuildRequires: %{py_package_prefix}-dateutil %endif -%if 0%{?suse_version} -BuildRequires: libzypp -%endif - -# We need the systemd RPM macros -%if 0%{?suse_version} -BuildRequires: systemd-rpm-macros -%endif BuildRequires: systemd Obsoletes: subscription-manager-initial-setup-addon <= %{version}-%{release} @@ -261,11 +262,7 @@ platform. %if %{use_container_plugin} %package -n subscription-manager-plugin-container Summary: A plugin for handling container content -%if 0%{?suse_version} -Group: Productivity/Networking/System -%else Group: System Environment/Base -%endif Requires: %{name} = %{version}-%{release} %description -n subscription-manager-plugin-container @@ -279,12 +276,7 @@ from the server. Populates /etc/docker/certs.d appropriately. %if %{create_libdnf_rpm} %package -n libdnf-plugin-subscription-manager Summary: Subscription Manager plugin for libdnf -%if 0%{?suse_version} -Group: Productivity/Networking/System -%else Group: System Environment/Base -%endif - BuildRequires: cmake BuildRequires: gcc BuildRequires: json-c-devel @@ -305,11 +297,7 @@ e.g. microdnf. # RPM containing DNF plugin %package -n dnf-plugin-subscription-manager Summary: Subscription Manager plugins for DNF -%if 0%{?suse_version} -Group: Productivity/Networking/System -%else Group: System Environment/Base -%endif %if (0%{?fedora} || 0%{?rhel}) BuildRequires: cmake @@ -349,11 +337,7 @@ package or when debugging this package. %if %has_ostree %package -n subscription-manager-plugin-ostree Summary: A plugin for handling OSTree content. -%if 0%{?suse_version} -Group: Productivity/Networking/System -%else Group: System Environment/Base -%endif Requires: %{py_package_prefix}-gobject-base # plugin needs a slightly newer version of python-iniparse for 'tidy' @@ -549,7 +533,9 @@ install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/redhat-uep.pem %{buildroot}/ # fix timestamps on our byte compiled files so they match across arches find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; +%if !0%{?suse_version} %py_byte_compile %{__python3} %{buildroot}%{rhsm_plugins_dir}/ +%endif # symlink services to /usr/sbin/ when building for SUSE distributions %if 0%{?suse_version} @@ -563,25 +549,30 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %files -f rhsm.lang %defattr(-,root,root,-) -# Make some unusual directories for suse part of subscription-manager +# Make some unusual directories and files for suse part of subscription-manager %if 0%{?suse_version} + %dir %{_sysconfdir}/pki %dir %{_prefix}/share/polkit-1 %dir %{_prefix}/share/polkit-1/actions %dir %{_sysconfdir}/dbus-1 %dir %{_sysconfdir}/dbus-1/system.d +%attr(755,root,root) %dir %{_sysconfdir}/rhsm/zypper.repos.d +%attr(644,root,root) %config(noreplace) %{_sysconfdir}/rhsm/zypper.conf +# zypper plugin +%{_prefix}/lib/zypp/plugins/services/rhsm +# links to /usr/sbin/service +%{_sbindir}/rcrhsm +%{_sbindir}/rcrhsm-facts +%{_sbindir}/rcrhsmcertd -# Suse specific -%if %{use_dnf} - %dir %{_sysconfdir}/dnf - %dir %{_sysconfdir}/dnf/plugins - %dir %{_prefix}/lib/dnf-plugins/ -%endif +%else -# Suse specific -%if %{use_dnf} - %dir %{_sysconfdir}/yum.repos.d -%endif +# symlink to console-helper +%{_bindir}/subscription-manager +# PAM config +%{_sysconfdir}/pam.d/subscription-manager +%{_sysconfdir}/security/console.apps/subscription-manager %endif @@ -602,11 +593,6 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %attr(755,root,root) %{_sbindir}/subscription-manager -# symlink to console-helper -%if !0%{?suse_version} -%{_bindir}/subscription-manager -%endif - %attr(755,root,root) %{_bindir}/rhsmcertd %attr(755,root,root) %{_libexecdir}/rhsmcertd-worker @@ -620,22 +606,8 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %attr(755,root,root) %dir %{_sysconfdir}/rhsm/syspurpose %attr(644,root,root) %{_sysconfdir}/rhsm/syspurpose/valid_fields.json -%if 0%{?suse_version} -%attr(755,root,root) %dir %{_sysconfdir}/rhsm/zypper.repos.d -%endif - %attr(644,root,root) %config(noreplace) %{_sysconfdir}/rhsm/rhsm.conf -%if 0%{?suse_version} - %attr(644,root,root) %config(noreplace) %{_sysconfdir}/rhsm/zypper.conf -%endif - -# PAM config -%if !0%{?suse_version} -%{_sysconfdir}/pam.d/subscription-manager -%{_sysconfdir}/security/console.apps/subscription-manager -%endif - %if %{use_dnf} %ghost %{_sysconfdir}/yum.repos.d/redhat.repo %endif @@ -692,11 +664,6 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %{python_sitelib}/dnf-plugins/* %endif -# zypper plugins -%if 0%{?suse_version} -%{_prefix}/lib/zypp/plugins/services/rhsm -%endif - # rhsmlib %dir %{python_sitearch}/rhsmlib %{python_sitearch}/rhsmlib/*.py* @@ -727,14 +694,6 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.*.conf %attr(644,root,root) %{_unitdir}/*.service %attr(644,root,root) %{_tmpfilesdir}/%{name}.conf -%if 0%{?suse_version} - %{_sbindir}/rcrhsm - %{_sbindir}/rcrhsm-facts -%endif - -%if 0%{?suse_version} - %{_sbindir}/rcrhsmcertd -%endif # Incude rt CLI tool %dir %{python_sitearch}/rct @@ -759,12 +718,6 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %if %{use_container_plugin} %files -n subscription-manager-plugin-container %defattr(-,root,root,-) -%if 0%{?suse_version} -%dir %{_sysconfdir}/docker -%dir %{_sysconfdir}/docker/certs.d -%dir %{_sysconfdir}/rhsm/ca -%dir %{python_sitearch}/subscription_manager/plugin -%endif %{_sysconfdir}/rhsm/pluginconf.d/container_content.ContainerContentPlugin.conf %{rhsm_plugins_dir}/container_content.py* %{rhsm_plugins_dir}/__pycache__/*container* @@ -881,12 +834,10 @@ if [ -x /bin/dbus-send ] ; then fi -%if !0%{?suse_version} %if %{use_container_plugin} %post -n subscription-manager-plugin-container %{__python} %{rhsm_plugins_dir}/container_content.py || : %endif -%endif %preun if [ $1 -eq 0 ] ; then @@ -919,6 +870,131 @@ rmdir %{python_sitearch}/subscription_manager-*-*.egg-info --ignore-fail-on-non- %changelog +* Mon Jan 17 2022 Christopher Snyder 1.29.23-1 +- Ignore debian architecture ALL (schmidt@atix.de) +- 2028894: Don't allow service-level --serverurl on registered system + (mhorky@redhat.com) +- 2037771: Cockpit registration dialog: enable insights by default + (jhnidek@redhat.com) +- 2039322: fix string representation of DMI facts (ptoscano@redhat.com) +- Drop usage of six.python_2_unicode_compatible (ptoscano@redhat.com) +- ENT-4588: Switch away from six iterators (mhorky@redhat.com) +- ENT-4590: Switch away from six.callable (mhorky@redhat.com) +- ENT-4587: Switch away from six types (mhorky@redhat.com) +- Adding permissive coverage publishing (jmolet@redhat.com) +- Ensure that prompted environment entry follows state of multiples + (wpoteat@redhat.com) +- 2026316: Do not delete cache of content_access during refresh + (jhnidek@redhat.com) +- More SUSE compliance (jhnidek@redhat.com) +- Updates for non-multi-environment scenario (wpoteat@redhat.com) +- Fix some minor issues related to syspurpose (jhnidek@redhat.com) +- syspurpose: handle users w/o organizations (ptoscano@redhat.com) +- service-level: drop useless check (ptoscano@redhat.com) +- 2026286: consider user-specified --org in any case (ptoscano@redhat.com) +- Drop the Vagrant bits (ptoscano@redhat.com) +- 1995032: Use multiple environments (wpoteat@redhat.com) +- cache: fix typo in debug message (ptoscano@redhat.com) +- Switch away from Thread.getName() (ptoscano@redhat.com) +- Fix indentation of ProductStatus. (jhnidek@redhat.com) +- 2028969: Do not try to load compliance status from cache (jhnidek@redhat.com) +- Switch comma-separated join to space-separated join (schmidt@atix.de) +- 2029927: Fix bash autocompletion (mhorky@redhat.com) +- utils: use shutil.get_terminal_size() (ptoscano@redhat.com) +- Remove PyXML leftovers (ptoscano@redhat.com) +- 2026320: fix format of HTTP-date headers (ptoscano@redhat.com) +- connection: move HTTP-date formatting to own helper (ptoscano@redhat.com) +- Ensure datetime.timezone.utc objects for parsed UTC dates + (ptoscano@redhat.com) +- rhsm: drop custom which() implementation (ptoscano@redhat.com) +- facts: switch to shutil.which() (ptoscano@redhat.com) +- test: unconditionally use hashlib (ptoscano@redhat.com) +- 1999048: Fixed partially subscribed product in Cockpit plugin + (jhnidek@redhat.com) +- test: rename tests to default pytest filename pattern (ptoscano@redhat.com) +- Fixed last bits related to updated D-Bus Register method. + (jhnidek@redhat.com) +- Cockpit plugin: display syspurpose card without attributes + (jhnidek@redhat.com) +- 2023257: Disallowed attaching using D-Bus in SCA mode (jhnidek@redhat.com) +- 2023257: Disallowed attaching pool in SCA mode: (jhnidek@redhat.com) +- Refactoring of temporary disablement of dir watchers. (jhnidek@redhat.com) +- Ignore enable_content option in RegisterWithActivationKeys() + (jhnidek@redhat.com) +- Use benefits of enable_content in cockpit plugin. (jhnidek@redhat.com) +- Added enable_content option to Register() D-Bus method (jhnidek@redhat.com) +- Added refresh() method to entitlement service (jhnidek@redhat.com) +- Fixed issue with status cache (jhnidek@redhat.com) +- Add information about content access mode to consumer (jhnidek@redhat.com) +- 2024929: build: fix build on 'build' target (ptoscano@redhat.com) +- 2023391: libdnf: respect environment CFLAGS (ptoscano@redhat.com) +- Drop unused ssl_verify_depth config option (ptoscano@redhat.com) +- tests: drop test_po_files.py (ptoscano@redhat.com) +- Update translation files (noreply@weblate.org) +- New extraction for translatable strings (ptoscano@redhat.com) + +* Mon Jan 17 2022 Christopher Snyder +- Ignore debian architecture ALL (schmidt@atix.de) +- 2028894: Don't allow service-level --serverurl on registered system + (mhorky@redhat.com) +- 2037771: Cockpit registration dialog: enable insights by default + (jhnidek@redhat.com) +- 2039322: fix string representation of DMI facts (ptoscano@redhat.com) +- Drop usage of six.python_2_unicode_compatible (ptoscano@redhat.com) +- ENT-4588: Switch away from six iterators (mhorky@redhat.com) +- ENT-4590: Switch away from six.callable (mhorky@redhat.com) +- ENT-4587: Switch away from six types (mhorky@redhat.com) +- Adding permissive coverage publishing (jmolet@redhat.com) +- Ensure that prompted environment entry follows state of multiples + (wpoteat@redhat.com) +- 2026316: Do not delete cache of content_access during refresh + (jhnidek@redhat.com) +- More SUSE compliance (jhnidek@redhat.com) +- Updates for non-multi-environment scenario (wpoteat@redhat.com) +- Fix some minor issues related to syspurpose (jhnidek@redhat.com) +- syspurpose: handle users w/o organizations (ptoscano@redhat.com) +- service-level: drop useless check (ptoscano@redhat.com) +- 2026286: consider user-specified --org in any case (ptoscano@redhat.com) +- 1995032: Use multiple environments (wpoteat@redhat.com) +- cache: fix typo in debug message (ptoscano@redhat.com) +- Switch away from Thread.getName() (ptoscano@redhat.com) +- Fix indentation of ProductStatus. (jhnidek@redhat.com) +- 2028969: Do not try to load compliance status from cache (jhnidek@redhat.com) +- Switch comma-separated join to space-separated join (schmidt@atix.de) +- 2029927: Fix bash autocompletion (mhorky@redhat.com) +- utils: use shutil.get_terminal_size() (ptoscano@redhat.com) +- Remove PyXML leftovers (ptoscano@redhat.com) +- 2026320: fix format of HTTP-date headers (ptoscano@redhat.com) +- connection: move HTTP-date formatting to own helper (ptoscano@redhat.com) +- Ensure datetime.timezone.utc objects for parsed UTC dates + (ptoscano@redhat.com) +- rhsm: drop custom which() implementation (ptoscano@redhat.com) +- facts: switch to shutil.which() (ptoscano@redhat.com) +- test: unconditionally use hashlib (ptoscano@redhat.com) +- 1999048: Fixed partially subscribed product in Cockpit plugin + (jhnidek@redhat.com) +- test: rename tests to default pytest filename pattern (ptoscano@redhat.com) +- Fixed last bits related to updated D-Bus Register method. + (jhnidek@redhat.com) +- Cockpit plugin: display syspurpose card without attributes + (jhnidek@redhat.com) +- 2023257: Disallowed attaching using D-Bus in SCA mode (jhnidek@redhat.com) +- 2023257: Disallowed attaching pool in SCA mode: (jhnidek@redhat.com) +- Refactoring of temporary disablement of dir watchers. (jhnidek@redhat.com) +- Ignore enable_content option in RegisterWithActivationKeys() + (jhnidek@redhat.com) +- Use benefits of enable_content in cockpit plugin. (jhnidek@redhat.com) +- Added enable_content option to Register() D-Bus method (jhnidek@redhat.com) +- Added refresh() method to entitlement service (jhnidek@redhat.com) +- Fixed issue with status cache (jhnidek@redhat.com) +- Add information about content access mode to consumer (jhnidek@redhat.com) +- 2024929: build: fix build on 'build' target (ptoscano@redhat.com) +- 2023391: libdnf: respect environment CFLAGS (ptoscano@redhat.com) +- Drop unused ssl_verify_depth config option (ptoscano@redhat.com) +- tests: drop test_po_files.py (ptoscano@redhat.com) +- Update translation files (noreply@weblate.org) +- New extraction for translatable strings (ptoscano@redhat.com) + * Thu Nov 11 2021 Christopher Snyder 1.29.21-1 - 2020248: handle server-side consumer deletion in syspurpose commands (ptoscano@redhat.com)