diff --git a/.gitignore b/.gitignore index 04fe33d..4b09410 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/subscription-manager-1.25.17.tar.gz -SOURCES/subscription-manager-cockpit-1.25.17.tar.gz +SOURCES/subscription-manager-1.26.16.tar.gz +SOURCES/subscription-manager-cockpit-1.26.16.tar.gz diff --git a/.subscription-manager.metadata b/.subscription-manager.metadata index e06b9b0..f18d6d5 100644 --- a/.subscription-manager.metadata +++ b/.subscription-manager.metadata @@ -1,2 +1,2 @@ -cf356060bc760a59c537200ddcf898c860e3ff1a SOURCES/subscription-manager-1.25.17.tar.gz -9efec5cace526cddb07dd2df349ad12fea38d8bc SOURCES/subscription-manager-cockpit-1.25.17.tar.gz +c775f87b247870cf48da3f4be4317540a2b97228 SOURCES/subscription-manager-1.26.16.tar.gz +e26075c89ebffcffeec8b8759b9a9603c1589053 SOURCES/subscription-manager-cockpit-1.26.16.tar.gz diff --git a/README.debrand b/README.debrand deleted file mode 100644 index 01c46d2..0000000 --- a/README.debrand +++ /dev/null @@ -1,2 +0,0 @@ -Warning: This package was configured for automatic debranding, but the changes -failed to apply. diff --git a/SOURCES/CENTOS-use-centos-syspurposes.patch b/SOURCES/CENTOS-use-centos-syspurposes.patch deleted file mode 100644 index 52d2e66..0000000 --- a/SOURCES/CENTOS-use-centos-syspurposes.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/etc-conf/syspurpose/valid_fields.json b/etc-conf/syspurpose/valid_fields.json -index 1ac7ea0e..305ec4b9 100644 ---- a/etc-conf/syspurpose/valid_fields.json -+++ b/etc-conf/syspurpose/valid_fields.json -@@ -1,12 +1,10 @@ - { - "role": [ -- "Red Hat Enterprise Linux Server", -- "Red Hat Enterprise Linux Workstation", -- "Red Hat Enterprise Linux Compute Node" -+ "CentOS Linux Server", -+ "CentOS Linux Workstation", -+ "CentOS Linux Compute Node" - ], - "service_level_agreement": [ -- "Premium", -- "Standard", - "Self-Support" - ], - "usage": [ diff --git a/SOURCES/subscription-manager-centos-remove-redhat.repo.patch b/SOURCES/subscription-manager-centos-remove-redhat.repo.patch deleted file mode 100644 index d474938..0000000 --- a/SOURCES/subscription-manager-centos-remove-redhat.repo.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -uNrp subscription-manager-1.23.8.orig/src/subscription_manager/repofile.py subscription-manager-1.23.8/src/subscription_manager/repofile.py ---- subscription-manager-1.23.8.orig/src/subscription_manager/repofile.py 2019-03-06 08:15:21.000000000 -0600 -+++ subscription-manager-1.23.8/src/subscription_manager/repofile.py 2019-07-10 12:03:11.266030982 -0500 -@@ -340,6 +340,7 @@ class RepoFileBase(object): - return self.path_exists(self.path) - - def create(self): -+ return - if self.path_exists(self.path) or not self.manage_repos: - return - with open(self.path, 'w') as f: diff --git a/SPECS/subscription-manager.spec b/SPECS/subscription-manager.spec index 02509d0..7a92bee 100644 --- a/SPECS/subscription-manager.spec +++ b/SPECS/subscription-manager.spec @@ -7,11 +7,31 @@ %global use_firstboot 0 %global use_inotify 1 %global py2_package_prefix python2 -%global if_centos (0%{?centos_ver} && 0%{?centos_ver} >= 7) + +# Plugin for container (docker, podman) is not supported on RHEL 8 and higher +%if (0%{?rhel} && 0%{?rhel} >= 8) +%global use_container_plugin 0 +%else +%global use_container_plugin 1 +%endif + %if (0%{?rhel} >= 7 || 0%{?fedora}) %global dmidecode_version >= 3.12.2-2 %endif +# We use the tmpfiles_create macro from systemd-rpm-macros rpm. +# Because of an incorrect version labelling of that rpm in SLES 12 which +# contains the necessary macro definition, we are not able to simply require +# a certain version of systemd-rpm-macros which will definitely contain this +# macro. To keep our SLES builds working we define the macro here for ourselves. +%if !0%{?tmpfiles_create:1} +%define tmpfiles_create() \ +[ -x /usr/bin/systemd-tmpfiles ] && \ + /usr/bin/systemd-tmpfiles --create %{?*} >/dev/null 2>&1 || : \ +%{nil} +%endif + + # borrowed from dnf spec file & tweaked %if (0%{?rhel} && 0%{?rhel} <= 7) || 0%{?suse_version} %bcond_with python3 @@ -25,10 +45,10 @@ %bcond_without python2_rhsm %endif -%if %{with python3} +%if %{with python3} || 0%{?suse_version} %global use_subman_gui 0 %else -%global use_subman_gui 0 +%global use_subman_gui 1 %endif %if 0%{?suse_version} && 0%{?suse_version} < 1200 @@ -37,6 +57,12 @@ %global completion_dir %{_datadir}/bash-completion/completions %endif +%if 0%{?suse_version} > 1110 +%global run_dir /run +%else +%global run_dir /var/run +%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) @@ -46,13 +72,21 @@ %global gtk3 1 %endif -%if 0%{?rhel} == 6 || 0%{?suse_version} +%if 0%{?rhel} == 6 %global use_initial_setup 0 %global use_firstboot 1 %global use_inotify 0 %endif -%if %{use_subman_gui} || %{use_initial_setup} || %{use_firstboot} +%if 0%{?suse_version} +%global use_initial_setup 0 +%global use_firstboot 0 +%global use_subman_gui 0 +%global use_container_plugin 0 +%global use_inotify 0 +%endif + +%if (%{use_subman_gui} || %{use_initial_setup} || %{use_firstboot}) %global use_rhsm_gtk 1 %else %global use_rhsm_gtk 0 @@ -69,7 +103,11 @@ %global py_package_prefix python%{python3_pkgversion} %global rhsm_package_name %{py_package_prefix}-subscription-manager-rhsm %else +%if 0%{?suse_version} >= 1500 +%global py_package_prefix python2 +%else %global py_package_prefix python +%endif %global rhsm_package_name subscription-manager-rhsm %endif @@ -84,6 +122,12 @@ %global install_ostree INSTALL_OSTREE_PLUGIN=false %endif +%if %{use_container_plugin} +%global install_container INSTALL_CONTAINER_PLUGIN=true +%else +%global install_container INSTALL_CONTAINER_PLUGIN=false +%endif + # makefile will guess, but be specific. %if 0%{?gtk3} %global gtk_version GTK_VERSION=3 @@ -99,6 +143,7 @@ %if 0%{?suse_version} %global install_zypper_plugins INSTALL_ZYPPER_PLUGINS=true +%global post_boot_tool INSTALL_INITIAL_SETUP=false INSTALL_FIRSTBOOT=false %else %global install_zypper_plugins INSTALL_ZYPPER_PLUGINS=false %endif @@ -137,12 +182,56 @@ %global subpackages SUBPACKAGES="%{?include_syspurpose:syspurpose}" +# Build a list of python package to exclude from the build. +# This is necessary because we have multiple rpms which may or may not +# need to be built depending on the distro which are all in one source tree. +# Because the contents of these optional rpms is often a python package in the +# same source tree, if we choose not to build that package and don't tell +# setup.py to exclude those packages, we end up with files that get installed +# in the buildroot which are not packaged. This fails various +# rpm build / verify post steps, which in certain build systems causes the +# entire build to be considered a failure. +# The implementation of building a list iteratively in a spec file looks a bit +# weird. As we want the final value of the global named "exclude_packages" to +# be an environment variable definition it needs to begin with the following +# (less the single quotes): 'EXCLUDE_PACKAGES="' +# After that we can then make all of our checks to see whether certain items +# should be added to the comma separated list or not. +# In setup.py we are parsing the value of the env var as a string separated +# by commas ignoring empty values. That makes the comma at the end of +# each conditional addition to the list still valid. +%global exclude_packages EXCLUDE_PACKAGES=" + +# add new exclude packages items after me + +%if !%{use_rhsm_gtk} +%global exclude_packages %{exclude_packages}subscription_manager.gui, +%endif + +%if !%{use_container_plugin} +%global exclude_packages %{exclude_packages}*.plugin.container,} +%endif + +# add new exclude_packages items before me + +%global exclude_packages %{exclude_packages}" + +# Moving our shared icon dependancies to their own package +# Both our cockpit plugin and the rhsm-gtk package require an overlapping +# set of icons. +%global use_rhsm_icons 0%{use_cockpit} || 0%{use_rhsm_gtk} + Name: subscription-manager -Version: 1.25.17 +Version: 1.26.16 Release: 1%{?dist} Summary: Tools and libraries for subscription and repository management +%if 0%{?suse_version} +Group: Productivity/Networking/System +License: GPL-2.0 +%else Group: System Environment/Base License: GPLv2 +%endif URL: http://www.candlepinproject.org/ # How to create the source tarball: @@ -164,9 +253,6 @@ Source2: subscription-manager-rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %endif -Patch100: CENTOS-use-centos-syspurposes.patch -Patch101: subscription-manager-centos-remove-redhat.repo.patch - # 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) @@ -183,9 +269,19 @@ 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 -Requires: %{py_package_prefix}-dateutil +%if 0%{?suse_version} >= 1500 +BuildRequires: %{py_package_prefix}-python-dateutil +Requires: %{py_package_prefix}-python-dateutil +%else +BuildRequires: %{py_package_prefix}-dateutil +Requires: %{py_package_prefix}-dateutil +%endif Requires: %{py_package_prefix}-syspurpose # rhel 8 has different naming for setuptools going forward @@ -254,7 +350,11 @@ BuildRequires: desktop-file-utils %endif BuildRequires: %{?suse_version:dbus-1-glib-devel} %{!?suse_version:dbus-glib-devel} +%if 0%{?suse_version} <= 1110 +BuildRequires: %{?suse_version:sles-release} %{!?suse_version:system-release} +%else BuildRequires: %{?suse_version:distribution-release} %{!?suse_version:system-release} +%endif BuildRequires: %{?suse_version:gconf2-devel} %{!?suse_version:GConf2-devel} BuildRequires: %{?suse_version:update-desktop-files} %{!?suse_version:scrollkeeper} @@ -264,15 +364,18 @@ BuildRequires: %{?gtk3:gtk3-devel} %{!?gtk3:gtk2-devel} BuildRequires: libzypp %endif +%if %use_systemd +# We need the systemd RPM macros %if 0%{?suse_version} >= 1210 BuildRequires: systemd-rpm-macros %endif - -%if %use_systemd -# We need the systemd RPM macros BuildRequires: systemd %endif +%if !%{use_container_plugin} +Obsoletes: subscription-manager-plugin-container +%endif + %description The Subscription Manager package provides programs and libraries to allow users to manage subscriptions and yum repositories from the Red Hat entitlement @@ -281,32 +384,45 @@ platform. %package -n %{py_package_prefix}-syspurpose Summary: A commandline utility for declaring system syspurpose +%if 0%{?suse_version} +Group: Productivity/Networking/System +%else Group: System Environment/Base - +%endif %description -n %{py_package_prefix}-syspurpose Provides the syspurpose commandline utility. This utility manages the system syspurpose. +%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 Enables handling of content of type 'containerImage' in any certificates from the server. Populates /etc/docker/certs.d appropriately. - +%endif %if %{use_rhsm_gtk} %package -n rhsm-gtk Summary: GTK+ widgets used by subscription-manager-gui and initial_setup +%if 0%{?suse_version} +Group: Productivity/Networking/System +%else Group: System Environment/Base +%endif Requires: %{?gtk3:%{py_package_prefix}-gobject, gtk3} %{!?gtk3:pygtk2, pygtk2-libglade} Requires: usermode-gtk # Fedora can figure this out automatically, but RHEL cannot: # See #987071 Requires: librsvg2%{?_isa} +Requires: rhsm-icons %if 0%{?gtk3} Requires: font(cantarell) @@ -317,6 +433,7 @@ Requires: %{?suse_version:dejavu} %{!?suse_version:dejavu-sans-fonts} %if !0%{?suse_version} Requires(post): scrollkeeper Requires(postun): scrollkeeper +%else %endif %description -n rhsm-gtk @@ -328,7 +445,11 @@ and RHSM initial_setup module for Anaconda. %if %{use_subman_gui} %package -n subscription-manager-gui Summary: A GUI interface to manage Red Hat product subscriptions +%if 0%{?suse_version} +Group: Productivity/Networking/System +%else Group: System Environment/Base +%endif Requires: %{name} = %{version}-%{release} Requires: gnome-icon-theme @@ -348,7 +469,11 @@ subscriptions. %package -n subscription-manager-migration Summary: Migration scripts for moving to certificate based subscriptions +%if 0%{?suse_version} +Group: Productivity/Networking/System +%else Group: System Environment/Base +%endif Requires: %{name} = %{version}-%{release} Requires: rhnlib @@ -366,7 +491,11 @@ subscriptions %if %use_dnf %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} >= 29 || 0%{?rhel} >= 8) BuildRequires: cmake BuildRequires: gcc @@ -377,7 +506,7 @@ Requires: libdnf >= 0.22.5 %endif # See BZ 1581410 - avoid a circular dependency %if (0%{?rhel} < 8) -Requires: %{name} = %{version}-%{release} +Requires: %{name} >= %{version}-%{release} %endif %if %{with python3} Requires: python3-dnf-plugins-core @@ -402,7 +531,11 @@ product-id plugins. %if %use_firstboot %package -n subscription-manager-firstboot Summary: Firstboot screens for subscription manager +%if 0%{?suse_version} +Group: Productivity/Networking/System +%else Group: System Environment/Base +%endif Requires: rhsm-gtk = %{version}-%{release} Requires: rhn-setup-gnome @@ -417,7 +550,11 @@ This package contains the firstboot screens for subscription-manager. %if %use_initial_setup %package -n subscription-manager-initial-setup-addon Summary: initial-setup screens for subscription-manager +%if 0%{?suse_version} +Group: Productivity/Networking/System +%else Group: System Environment/Base +%endif Requires: rhsm-gtk = %{version}-%{release} Requires: initial-setup-gui >= 0.3.9.24-1 Obsoletes: subscription-manager-firstboot < 1.15.3-1 @@ -433,7 +570,11 @@ This package contains the initial-setup screens for subscription-manager. %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' @@ -449,12 +590,20 @@ the remote in the currently deployed .origin file. %package -n %{rhsm_package_name} Summary: A Python library to communicate with a Red Hat Unified Entitlement Platform +%if 0%{?suse_version} +Group: Development/Libraries/Python +%else Group: Development/Libraries +%endif %if %use_m2crypto Requires: %{?suse_version:python-m2crypto} %{!?suse_version:m2crypto} %endif +%if 0%{?suse_version} >= 1500 +Requires: %{py_package_prefix}-python-dateutil +%else Requires: %{py_package_prefix}-dateutil +%endif Requires: %{py_package_prefix}-iniparse # rpm-python is an old name for python2-rpm but RHEL6 uses the old name Requires: %{py_package_prefix}-six @@ -482,7 +631,11 @@ entitlements, certificates, and access to content. %if %{with python2_rhsm} %package -n python2-subscription-manager-rhsm Summary: A Python library to communicate with a Red Hat Unified Entitlement Platform +%if 0%{?suse_version} +Group: Development/Libraries/Python +%else Group: Development/Libraries +%endif BuildRequires: python2-devel @@ -508,7 +661,11 @@ entitlements, certificates, and access to content. %package -n subscription-manager-rhsm-certificates Summary: Certificates required to communicate with a Red Hat Unified Entitlement Platform +%if 0%{?suse_version} +Group: Development/Libraries/Python +%else Group: Development/Libraries +%endif Provides: python-rhsm-certificates = %{version}-%{release} Obsoletes: python-rhsm-certificates <= 1.20.3-1 @@ -527,20 +684,41 @@ Requires: subscription-manager Requires: cockpit-bridge Requires: cockpit-shell Requires: cockpit-ws +Requires: rhsm-icons %description -n subscription-manager-cockpit Subscription Manager Cockpit UI %endif +%if %{use_rhsm_icons} +%package -n rhsm-icons +Summary: Icons for Red Hat Subscription Management client tools +License: GPLv2 +BuildArch: noarch + +# As these two packages previously contained the icons now contained in +# rhsm-icons package, we need to specify the logical complement to a +# "Requires", which is "Conflicts". With any luck the underlying +# depsolver will cause the removal of this package if the request +# is to downgrade either of the following to a version below these +# requirements. +Conflicts: rhsm-gtk < 1.26.7 +Conflicts: subscription-manager-cockpit < 1.26.7 + +%description -n rhsm-icons +This package contains the desktop icons for the graphical interfaces provided for management +of Red Hat subscriptions. There are many such interfaces, subscription-manager-gui, +subscription-manager-initial-setup-addon, and subscription-manager-cockpit-plugin primarily. +%endif + %prep %setup -q -%patch100 -p1 -%patch101 -p1 %build make -f Makefile VERSION=%{version}-%{release} CFLAGS="%{optflags}" \ LDFLAGS="%{__global_ldflags}" OS_DIST="%{dist}" PYTHON="%{__python}" \ - %{?gtk_version} %{?subpackages} %{?include_syspurpose:INCLUDE_SYSPURPOSE="1"} + %{?gtk_version} %{?subpackages} %{?include_syspurpose:INCLUDE_SYSPURPOSE="1"} \ + %{exclude_packages} %if %{with python2_rhsm} python2 ./setup.py build --quiet --gtk-version=%{?gtk3:3}%{?!gtk3:2} --rpm-version=%{version}-%{release} @@ -560,14 +738,16 @@ make -f Makefile install VERSION=%{version}-%{release} \ DESTDIR=%{buildroot} PYTHON_SITELIB=%{python_sitearch} \ OS_VERSION=%{?fedora}%{?rhel}%{?suse_version} OS_DIST=%{dist} \ COMPLETION_DIR=%{completion_dir} \ - %{?install_ostree} %{?post_boot_tool} %{?gtk_version} \ + RUN_DIR=%{run_dir} \ + %{?install_ostree} %{?install_container} %{?post_boot_tool} %{?gtk_version} \ %{?install_yum_plugins} %{?install_dnf_plugins} \ %{?install_zypper_plugins} \ %{?with_systemd} \ %{?with_subman_gui} \ %{?with_cockpit} \ %{?subpackages} \ - %{?include_syspurpose:INCLUDE_SYSPURPOSE="1"} + %{?include_syspurpose:INCLUDE_SYSPURPOSE="1"} \ + %{?exclude_packages} %if (%{use_dnf} && (0%{?fedora} >= 29 || 0%{?rhel} >= 8)) pushd src/dnf-plugins/product-id @@ -610,27 +790,23 @@ sed -i 's/libexec/lib/g' %{buildroot}/%{_sysconfdir}/cron.daily/rhsmd # fake out the redhat.repo file %if %{use_yum} || %{use_dnf} mkdir %{buildroot}%{_sysconfdir}/yum.repos.d - #touch %{buildroot}%{_sysconfdir}/yum.repos.d/redhat.repo + touch %{buildroot}%{_sysconfdir}/yum.repos.d/redhat.repo %endif # fake out the certificate directories mkdir -p %{buildroot}%{_sysconfdir}/pki/consumer mkdir -p %{buildroot}%{_sysconfdir}/pki/entitlement +%if %{use_container_plugin} # Setup cert directories for the container plugin: mkdir -p %{buildroot}%{_sysconfdir}/docker/certs.d/ -%if 0%{!?if_centos} mkdir %{buildroot}%{_sysconfdir}/docker/certs.d/cdn.redhat.com install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/redhat-entitlement-authority.pem %{buildroot}%{_sysconfdir}/docker/certs.d/cdn.redhat.com/redhat-entitlement-authority.crt %endif -%if 0%{!?if_centos} mkdir -p %{buildroot}%{_sysconfdir}/etc/rhsm/ca install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/redhat-entitlement-authority.pem %{buildroot}/%{_sysconfdir}/rhsm/ca/redhat-entitlement-authority.pem install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/redhat-uep.pem %{buildroot}/%{_sysconfdir}/rhsm/ca/redhat-uep.pem -%else -rm %{buildroot}/%{_sysconfdir}/rhsm/ca/redhat-entitlement-authority.pem -%endif %if %use_cockpit # install cockpit dist targz @@ -645,6 +821,17 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %py_byte_compile %{__python3} %{buildroot}%{_datadir}/anaconda/addons/com_redhat_subscription_manager/ %endif +# symlink services to /usr/sbin/ when building for SUSE distributions +%if 0%{?suse_version} + %if %{use_systemd} + ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcrhsm + ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcrhsm-facts + ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcrhsmcertd + %else + ln -s %{_initrddir}/rhsmcertd %{buildroot}%{_sbindir}/rcrhsmcertd + %endif +%endif + # base/cli tools use the gettext domain 'rhsm', while the # gnome-help tools use domain 'subscription-manager' %files -f rhsm.lang @@ -713,6 +900,10 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %attr(644,root,root) %config(noreplace) %{_sysconfdir}/rhsm/rhsm.conf %config %attr(644,root,root) %{_sysconfdir}/rhsm/logging.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 @@ -744,7 +935,7 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %attr(755,root,root) %dir %{_var}/log/rhsm %attr(755,root,root) %dir %{_var}/spool/rhsm/debug -%attr(755,root,root) %dir %{_var}/run/rhsm +%ghost %attr(755,root,root) %dir %{run_dir}/rhsm %attr(750,root,root) %dir %{_var}/lib/rhsm %attr(750,root,root) %dir %{_var}/lib/rhsm/facts %attr(750,root,root) %dir %{_var}/lib/rhsm/packages @@ -842,10 +1033,18 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %if %use_systemd %attr(644,root,root) %{_unitdir}/*.service %attr(644,root,root) %{_tmpfilesdir}/%{name}.conf + %if 0%{?suse_version} + %{_sbindir}/rcrhsm + %{_sbindir}/rcrhsm-facts + %endif %else %attr(755,root,root) %{_initrddir}/rhsmcertd %endif +%if 0%{?suse_version} + %{_sbindir}/rcrhsmcertd +%endif + # Incude rt CLI tool %dir %{python_sitearch}/rct %{python_sitearch}/rct/*.py* @@ -879,14 +1078,6 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %{python_sitearch}/subscription_manager/gui/data/ui/*.ui %{python_sitearch}/subscription_manager/gui/data/glade/*.glade %{python_sitearch}/subscription_manager/gui/data/icons/*.svg -%{_datadir}/icons/hicolor/16x16/apps/*.png -%{_datadir}/icons/hicolor/22x22/apps/*.png -%{_datadir}/icons/hicolor/24x24/apps/*.png -%{_datadir}/icons/hicolor/32x32/apps/*.png -%{_datadir}/icons/hicolor/48x48/apps/*.png -%{_datadir}/icons/hicolor/96x96/apps/*.png -%{_datadir}/icons/hicolor/256x256/apps/*.png -%{_datadir}/icons/hicolor/scalable/apps/*.svg %if %{with python3} %{python_sitearch}/subscription_manager/gui/__pycache__ %endif @@ -894,7 +1085,6 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %if %{use_subman_gui} -#%files -n subscription-manager-gui -f subscription-manager.lang %files -n subscription-manager-gui %defattr(-,root,root,-) %attr(755,root,root) %{_sbindir}/subscription-manager-gui @@ -913,29 +1103,29 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %dir %{_datadir}/omf/subscription-manager %else # symlink to console-helper -#%{_bindir}/subscription-manager-gui +%{_bindir}/subscription-manager-gui %endif -#%{_bindir}/rhsm-icon +%{_bindir}/rhsm-icon -%{_datadir}/gnome/help/subscription-manager/C/figures/*.png -%{_datadir}/gnome/help/subscription-manager/C/*.xml +%doc %{_datadir}/gnome/help/subscription-manager/C/figures/*.png +%doc %{_datadir}/gnome/help/subscription-manager/C/*.xml %{_datadir}/omf/subscription-manager/subscription-manager-C.omf -#%{_datadir}/applications/subscription-manager-gui.desktop -#%{_datadir}/appdata/subscription-manager-gui.appdata.xml +%{_datadir}/applications/subscription-manager-gui.desktop +%{_datadir}/appdata/subscription-manager-gui.appdata.xml # desktop config files -#{_sysconfdir}/xdg/autostart/rhsm-icon.desktop -#if !0%{?suse_version} -#{_sysconfdir}/pam.d/subscription-manager-gui -#{_sysconfdir}/security/console.apps/subscription-manager-gui -#endif +%{_sysconfdir}/xdg/autostart/rhsm-icon.desktop +%if !0%{?suse_version} +%{_sysconfdir}/pam.d/subscription-manager-gui +%{_sysconfdir}/security/console.apps/subscription-manager-gui +%endif -#{completion_dir}/subscription-manager-gui +%{completion_dir}/subscription-manager-gui %doc -#{_mandir}/man8/subscription-manager-gui.8* -#{_mandir}/man8/rhsm-icon.8* +%{_mandir}/man8/subscription-manager-gui.8* +%{_mandir}/man8/rhsm-icon.8* %doc LICENSE %endif @@ -995,7 +1185,7 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %attr(644,root,root) %{_sysconfdir}/rhsm/syspurpose/valid_fields.json %attr(644,root,root) %{completion_dir}/syspurpose - +%if %{use_container_plugin} %files -n subscription-manager-plugin-container %defattr(-,root,root,-) %if 0%{?suse_version} @@ -1009,13 +1199,13 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %if %{with python3} %{rhsm_plugins_dir}/__pycache__/*container* %endif -%{python_sitearch}/subscription_manager/plugin/container.py* +%{python_sitearch}/subscription_manager/plugin/container/*.py* +%{python_sitearch}/subscription_manager/plugin/container/__pycache__ # Copying Red Hat CA cert into each directory: -#%attr(755,root,root) %dir %{_sysconfdir}/docker/certs.d/cdn.redhat.com -#%attr(644,root,root) %{_sysconfdir}/rhsm/ca/redhat-entitlement-authority.pem -#%attr(644,root,root) %{_sysconfdir}/docker/certs.d/cdn.redhat.com/redhat-entitlement-authority.crt - +%attr(755,root,root) %dir %{_sysconfdir}/docker/certs.d/cdn.redhat.com +%attr(644,root,root) %{_sysconfdir}/docker/certs.d/cdn.redhat.com/redhat-entitlement-authority.crt +%endif %if %has_ostree %files -n subscription-manager-plugin-ostree @@ -1070,7 +1260,8 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %attr(755,root,root) %dir %{_sysconfdir}/rhsm %attr(755,root,root) %dir %{_sysconfdir}/rhsm/ca -#%attr(644,root,root) %{_sysconfdir}/rhsm/ca/redhat-uep.pem +%attr(644,root,root) %{_sysconfdir}/rhsm/ca/redhat-entitlement-authority.pem +%attr(644,root,root) %{_sysconfdir}/rhsm/ca/redhat-uep.pem %if %use_cockpit %files -n subscription-manager-cockpit @@ -1087,21 +1278,32 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \; %{_datadir}/metainfo/org.candlepinproject.subscription_manager.metainfo.xml %if ! %use_subman_gui %{_datadir}/applications/subscription-manager-cockpit.desktop -%{_datadir}/icons/hicolor/16x16/apps/*.png -%{_datadir}/icons/hicolor/22x22/apps/*.png -%{_datadir}/icons/hicolor/24x24/apps/*.png -%{_datadir}/icons/hicolor/32x32/apps/*.png -%{_datadir}/icons/hicolor/48x48/apps/*.png -%{_datadir}/icons/hicolor/96x96/apps/*.png -%{_datadir}/icons/hicolor/256x256/apps/*.png +%endif +%endif + +%if %use_rhsm_icons +%files -n rhsm-icons +%defattr(-,root,root,-) %{_datadir}/icons/hicolor/scalable/apps/*.svg +%{_datadir}/icons/hicolor/symbolic/apps/*.svg %endif + +%if %use_systemd + %if 0%{?suse_version} +%pre + %service_add_pre rhsm.service + %service_add_pre rhsm-facts.service + %service_add_pre rhsmcertd.service + %endif %endif %post %if %use_systemd %if 0%{?suse_version} %service_add_post rhsmcertd.service + %service_add_post rhsm.service + %service_add_post rhsm-facts.service + %tmpfiles_create %{_tmpfilesdir}/subscription-manager.conf %else %systemd_post rhsmcertd.service %endif @@ -1131,16 +1333,30 @@ scrollkeeper-update -q -o %{_datadir}/omf/%{name} || : %endif %endif +%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 %if %use_systemd - %systemd_preun rhsmcertd.service + %if 0%{?suse_version} + %service_del_preun rhsm.service + %service_del_preun rhsm-facts.service + %service_del_preun rhsmcertd.service + %else + %systemd_preun rhsmcertd.service + %endif %else - /sbin/service rhsmcertd stop >/dev/null 2>&1 - /sbin/chkconfig --del rhsmcertd + %if 0%{?suse_version} + %stop_on_removal %{_initrddir}/rhsmcertd + %else + /sbin/service rhsmcertd stop >/dev/null 2>&1 + /sbin/chkconfig --del rhsmcertd + %endif %endif if [ -x /bin/dbus-send ] ; then @@ -1152,9 +1368,15 @@ fi %if %use_systemd %if 0%{?suse_version} %service_del_postun rhsmcertd.service + %service_del_postun rhsm.service + %service_del_postun rhsm-facts.service %else %systemd_postun_with_restart rhsmcertd.service %endif +%else + %if 0%{?suse_version} + %insserv_cleanup %{_initrddir}/rhsmcertd + %endif %endif %if %{use_subman_gui} @@ -1178,28 +1400,140 @@ gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog -* Thu Sep 26 2019 Christopher Snyder 1.25.17-1 -- 1754082: Fix our TPS tests (csnyder@redhat.com) +* Thu Apr 02 2020 Christopher Snyder 1.26.16-1 +- 1820001: initConfig method needs to be reinstated (wpoteat@redhat.com) -* Fri Sep 20 2019 Christopher Snyder 1.25.16-1 -- Include only container_content __pycache__ for container_content plugin +* Mon Mar 23 2020 Christopher Snyder 1.26.15-1 +- 1804114: New D-Bus method SetAll; ENT-2124 (jhnidek@redhat.com) + +* Fri Mar 06 2020 Christopher Snyder 1.26.14-1 +- 1754952: Update translations for syspurpose (csnyder@redhat.com) + +* Mon Feb 24 2020 Christopher Snyder 1.26.13-1 +- 1754952: Update translations (csnyder@redhat.com) +- cockpit: CSS fixes for dialog error messages (mvollmer@redhat.com) +- cockpit: Update cockpit-component-dialog (mvollmer@redhat.com) + +* Wed Feb 19 2020 Christopher Snyder 1.26.12-1 +- 1803858: Install insights-client package on demand (mvollmer@redhat.com) + +* Mon Feb 17 2020 Christopher Snyder 1.26.11-1 +- 1794653: corrected missing quotes for config check; ENT-2010 + (crag@redhat.com) + +* Fri Jan 24 2020 Christopher Snyder 1.26.10-1 +- 1782910: Log errors in logging set up after set up completes; ENT-1890 + (jhnidek@redhat.com) + +* Fri Dec 13 2019 Christopher Snyder 1.26.9-1 +- Make sure to set the mtime of the py files before creating pyc (csnyder@redhat.com) -* Mon Aug 19 2019 Christopher Snyder 1.25.15-1 -- 1689974: Update translations for 8.1 (csnyder@redhat.com) +* Sun Dec 01 2019 Christopher Snyder 1.26.8-1 +- Fix downgradability due to conflicts with rhsm-icons (csnyder@redhat.com) + +* Wed Nov 20 2019 Christopher Snyder 1.26.7-1 +- Add rhsm-icons package to contain all icons required by gui interfaces + (csnyder@redhat.com) + +* Tue Nov 19 2019 Christopher Snyder 1.26.6-1 +- 1728054: Obsolete sm-plugin-container on RHEL 8 (csnyder@redhat.com) -* Fri Aug 16 2019 Christopher Snyder 1.25.14-1 +* Mon Nov 18 2019 Christopher Snyder 1.26.5-1 +- Add RHEL 8.2 releaser (csnyder@redhat.com) +- Make Makefile SLE15 compatible (khowell@redhat.com) +- 1764265: Set gpgcheck to 0, when zypper is used; ENT-1758 + (jhnidek@redhat.com) +- 1760837: Disable zypper plugin via ZYPP_RHSM_PLUGIN_DISABLE + (khowell@redhat.com) +- 1764340: Handle RestlibException in zypper plugin (khowell@redhat.com) +- cockpit: Use new services image instead of candlepin (martin@piware.de) +- 1738764: Fix issue with syspurpose three-way merge; ENT-1564 + (jhnidek@redhat.com) +- 1703054: Blacklist some locales for Python2.x; ENT-1288 (jhnidek@redhat.com) +- 1752400: Ensure that configuration is recorded before data sync processes + (wpoteat@redhat.com) +- fixed wrong package name for dependency (p.seiler@linuxmail.org) +- cockpit: Bump test API to 204 (martin@piware.de) +- cockpit: Move default TESTS_OS to rhel-8-1 (martin@piware.de) +- cockpit: Support CI testing against a bots project PR (martin@piware.de) +- No need for inotify on suse (csnyder@redhat.com) +- cockpit: Don't clobber an existing bots checkout (martin@piware.de) + +* Fri Oct 04 2019 Christopher Snyder 1.26.4-1 +- No longer build subman gui for sles (csnyder@redhat.com) +- cockpit: Update bots target for moved GitHub project + (sanne.raymaekers@gmail.com) + +* Tue Sep 24 2019 Christopher Snyder 1.26.3-1 +- Include only container_content __pycache__ for container_content plugin + (csnyder@redhat.com) +- Do not use importlib unless available (csnyder@redhat.com) +- On sles15+ require python2-python-dateutil (csnyder@redhat.com) +- 1750546: Fix minor product-id issues (csnyder@redhat.com) +- cockpit: Add support for Red Hat Insights (mvollmer@redhat.com) +- Functional tests of yum/dnf plugins (jhnidek@redhat.com) +- 1520383: Update to logging levels (wpoteat@redhat.com) +- 1752059: corrected cron receving stdout mail for rhsmd run (crag@redhat.com) +- Update Vagrantfile to use sshfs instead of rsync. (bcourt@redhat.com) +- Add fedora30 vagrant box (csnyder@redhat.com) +- Align RHSM spoke to center (jhnidek@redhat.com) +- 1698606: Better advice message for syspurpose conflict; ENT-1341 + (jhnidek@redhat.com) +- Fix RHSM addon spoke header background (mkolman@redhat.com) +- Use symbolic icon in Anaconda (jhnidek@redhat.com) +- icons: update app icon (jimmac@gmail.com) +- 1663432: Updated keys.pot for syspurpose CLI; ENT-1246 (jhnidek@redhat.com) +- 1687523: Try to create /var/log/rhsm directory; ENT-1406 (jhnidek@redhat.com) + +* Tue Sep 03 2019 Christopher Snyder 1.26.2-1 +- 1621275: YUM plugin - less API calls; ENT-923 (jhnidek@redhat.com) +- small spec file improvements (p.seiler@linuxmail.org) +- better SUSE distributions integration (p.seiler@linuxmail.org) +- 1643189: Updated defaults to include rhsmd.processtimeout (crag@redhat.com) +- 1643189: Added timeout for rhsmd cron job (crag@redhat.com) +- 1728054: Do not install container plugin on RHEL8; ENT-1488 + (jhnidek@redhat.com) +- cockpit: Use less-loader 5.0.0 or later (mvollmer@redhat.com) +- cockpit: Make sure node_modules directory exists (mvollmer@redhat.com) +- cockpit: Put "root: true" into eslintrc (mvollmer@redhat.com) +- 1689974: Mark several strings for translation; ENT-1246 (jhnidek@redhat.com) +- 1743729: Update dnf-plugin dependencies for RHEL 7 (csnyder@redhat.com) +- 1657384: locale sent on request does not allow '.UTF-8' suffix + (wpoteat@redhat.com) +- 1742208: Send package profile on yum transactions (csnyder@redhat.com) +- Updated man pages (redeem command does not have --org option) + (jhnidek@redhat.com) +- 1700039: Cockpit - Disable cancel button on register dialog action + (wpoteat@redhat.com) +- Require the python2 version of Sphinx when necessary (csnyder@redhat.com) - 1708494: Proper messaging of syspurpose add-addons; ENT-1332 (jhnidek@redhat.com) +- Bump jquery from 3.2.1 to 3.4.0 in /cockpit + (49699333+dependabot[bot]@users.noreply.github.com) +- test: Add check-subscriptions to test the Cockpit UI (mvollmer@redhat.com) +- 1703148: Fix cockpit plugin, when golden ticket is used; ENT-1287 + (jhnidek@redhat.com) +- Generate 'ui_repoid_vars' only when running with YUM. (dmach@redhat.com) +- * Added chaching mechanism to function is_owner_using_golden_ticket to + minimize number of REST API call * Added several unit tests * Fixed some + typos (jhnidek@redhat.com) +- Send package profiles after updating repositories (yamato@redhat.com) +- 1710923: GUI: Do not auto-attach, when golden ticket is used; ENT-1309 + (jhnidek@redhat.com) +- 1719725: rhsm - Write config file atomically (mvollmer@redhat.com) +- Adding debian / ubuntu package build instructions (suttner@atix.de) -* Tue Jul 23 2019 Christopher Snyder 1.25.13-1 -- 1708700: Generate 'ui_repoid_vars' only when running with YUM. - (dmach@redhat.com) - -* Fri Jul 12 2019 Christopher Snyder 1.25.12-1 +* Tue Jun 25 2019 Christopher Snyder 1.26.1-1 - 1722055: cockpit package has additional dependency (wpoteat@redhat.com) -- Add rhel 8.1 tito releaser (csnyder@redhat.com) +- 1705017: Show in man page that --installed is the default for the list + command (wpoteat@redhat.com) - 1689974: Update translations for 8.1 (csnyder@redhat.com) +- Bump eslint from 3.19.0 to 4.18.2 in /cockpit + (49699333+dependabot[bot]@users.noreply.github.com) +- 1722238: Fix reporting insights id in facts on RHEL7 (jhnidek@redhat.com) +- Bump stringstream from 0.0.5 to 0.0.6 in /cockpit + (49699333+dependabot[bot]@users.noreply.github.com) * Mon Jun 17 2019 Christopher Snyder 1.25.11-1 - 1665167: syspurpose attributes in list --consumed; ENT-1315