diff --git a/almalinux_debrand.patch b/almalinux_debrand.patch new file mode 100644 index 0000000..21e0ac7 --- /dev/null +++ b/almalinux_debrand.patch @@ -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) diff --git a/subscription-manager.spec b/subscription-manager.spec index 1123ae5..4b0f4cf 100644 --- a/subscription-manager.spec +++ b/subscription-manager.spec @@ -96,7 +96,7 @@ Name: subscription-manager Version: 1.30.6 -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 Patch +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) @@ -225,7 +228,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. @@ -253,7 +256,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. @@ -277,7 +280,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 @@ -313,7 +316,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 @@ -336,7 +339,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. @@ -360,6 +363,9 @@ cloud metadata and signatures. %prep %setup -q +# Applying AlmaLinux Patch +%patch -P 1000 -p1 -b .almalinux_debrand + %build make -f Makefile VERSION=%{version}-%{release} CFLAGS="%{optflags}" \ LDFLAGS="%{__global_ldflags}" OS_DIST="%{dist}" PYTHON="%{__python}" \ @@ -735,6 +741,9 @@ rm -f /var/lib/rhsm/cache/rhsm_icon.json rm -f /var/lib/rhsm/cache/content_access_mode.json %changelog +* Wed May 14 2025 Eduard Abdullin - 1.30.6-1.alma.1 +- Debrand for AlmaLinux + * Thu Mar 06 2025 Pino Toscano 1.30.6-1 - Translated using Weblate (Italian) (toscano.pino@tiscali.it) - Translated using Weblate (Japanese) (ptoscano@redhat.com)