Debrand for AlmaLinux

This commit is contained in:
eabdullin 2024-11-28 10:10:35 +03:00
parent f95cdd0ed2
commit f0607f7d43
2 changed files with 59 additions and 6 deletions

47
almalinux_debrand.patch Normal file
View File

@ -0,0 +1,47 @@
diff -aruN subscription-manager-1.29.37/etc-conf/syspurpose/valid_fields.json subscription-manager-1.29.37.alma/etc-conf/syspurpose/valid_fields.json
--- subscription-manager-1.29.37/etc-conf/syspurpose/valid_fields.json 2023-08-23 07:18:22
+++ subscription-manager-1.29.37.alma/etc-conf/syspurpose/valid_fields.json 2023-10-09 23:38:40
@@ -1,12 +1,10 @@
{
"role": [
- "Red Hat Enterprise Linux Server",
- "Red Hat Enterprise Linux Workstation",
- "Red Hat Enterprise Linux Compute Node"
+ "AlmaLinux Server",
+ "AlmaLinux Workstation",
+ "AlmaLinux Compute Node"
],
"service_level_agreement": [
- "Premium",
- "Standard",
"Self-Support"
],
"usage": [
diff -aruN subscription-manager-1.29.37/src/subscription_manager/repofile.py subscription-manager-1.29.37.alma/src/subscription_manager/repofile.py
--- subscription-manager-1.29.37/src/subscription_manager/repofile.py 2023-08-23 07:18:22
+++ subscription-manager-1.29.37.alma/src/subscription_manager/repofile.py 2023-10-09 23:38:48
@@ -375,11 +375,7 @@
"""
Try to create new repo file.
"""
- self.create_dir_path()
- if self.path_exists(self.path) or not self.manage_repos:
- return
- with open(self.path, "w") as f:
- f.write(self.REPOFILE_HEADER)
+ pass
def fix_content(self, content: str) -> str:
return content
diff -aruN subscription-manager-1.29.37/src/subscription_manager/repolib.py subscription-manager-1.29.37.alma/src/subscription_manager/repolib.py
--- subscription-manager-1.29.37/src/subscription_manager/repolib.py 2023-08-23 07:18:22
+++ subscription-manager-1.29.37.alma/src/subscription_manager/repolib.py 2023-10-09 23:38:57
@@ -92,7 +92,7 @@
def warning_message(enabled_yum_plugins: List[str]) -> str:
message = _(
"The yum/dnf plugins: %s were automatically enabled for the benefit of "
- "Red Hat Subscription Management. If not desired, use "
+ "Subscription Management. If not desired, use "
'"subscription-manager config --rhsm.auto_enable_yum_plugins=0" to '
"block this behavior."
) % ", ".join(enabled_yum_plugins)

View File

@ -96,7 +96,7 @@
Name: subscription-manager
Version: 1.30.1
Release: 1%{?dist}
Release: 1%{?dist}.alma.1
Summary: Tools and libraries for subscription and repository management
%if 0%{?suse_version}
Group: Productivity/Networking/System
@ -118,6 +118,9 @@ Source0: %{name}-%{version}.tar.gz
Source2: subscription-manager-rpmlintrc
%endif
# AlmaLinux patches
Patch1000: almalinux_debrand.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)
@ -226,7 +229,7 @@ Obsoletes: %{py_package_prefix}-syspurpose <= %{version}
%description
The Subscription Manager package provides programs and libraries to allow users
to manage subscriptions and yum repositories from the Red Hat entitlement
to manage subscriptions and yum repositories from an entitlement
platform.
@ -254,7 +257,7 @@ BuildRequires: libdnf-devel >= 0.22.5
Obsoletes: dnf-plugin-subscription-manager < 1.29.0
%description -n libdnf-plugin-subscription-manager
This package provides a plugin to interact with repositories from the Red Hat
This package provides a plugin to interact with repositories from an
entitlement platform; contains only one product-id binary plugin used by
e.g. microdnf.
@ -279,7 +282,7 @@ Requires: python3-librepo
Requires: dnf >= 1.0.0
%description -n dnf-plugin-subscription-manager
This package provides plugins to interact with repositories and subscriptions
from the Red Hat entitlement platform; contains subscription-manager and
from an entitlement platform; contains subscription-manager and
product-id plugins.
%endif
@ -315,7 +318,7 @@ 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
Summary: A Python library to communicate with a Unified Entitlement Platform
%if 0%{?suse_version}
Group: Development/Libraries/Python
%endif
@ -338,7 +341,7 @@ Provides: python-rhsm = %{version}-%{release}
Obsoletes: python-rhsm <= 1.20.3-1
%description -n %{rhsm_package_name}
A small library for communicating with the REST interface of a Red Hat Unified
A small library for communicating with the REST interface of a Unified
Entitlement Platform. This interface is used for the management of system
entitlements, certificates, and access to content.
@ -736,6 +739,9 @@ rmdir %{python_sitearch}/subscription_manager-*-*.egg-info --ignore-fail-on-non-
rm -f /var/lib/rhsm/cache/rhsm_icon.json
%changelog
* Mon Oct 07 2024 Eduard Abdullin <eabdullin@almalinux.org> - 1.30.1-1.alma.1
- Debrand for AlmaLinuxgi
* Wed Aug 21 2024 Pino Toscano <ptoscano@redhat.com> 1.30.1-1
- feat: forcefully switch automatic cloud registration to v1
(ptoscano@redhat.com)