- Debrand for AlmaLinux

This commit is contained in:
eabdullin 2024-09-24 16:25:10 +03:00
parent d54fbde198
commit 3cf110da3f
2 changed files with 56 additions and 1 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 Name: subscription-manager
Version: 1.30.1 Version: 1.30.1
Release: 1%{?dist} Release: 1%{?dist}.alma.1
Summary: Tools and libraries for subscription and repository management Summary: Tools and libraries for subscription and repository management
%if 0%{?suse_version} %if 0%{?suse_version}
Group: Productivity/Networking/System Group: Productivity/Networking/System
@ -118,6 +118,9 @@ Source0: %{name}-%{version}.tar.gz
Source2: subscription-manager-rpmlintrc Source2: subscription-manager-rpmlintrc
%endif %endif
# AlmaLinux patches
Patch1000: almalinux_debrand.patch
# The following macro examples are preceeded by '%' to stop macro expansion # 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 # in the comments. (See https://bugzilla.redhat.com/show_bug.cgi?id=1224660 for
# why this is necessary) # why this is necessary)
@ -362,6 +365,8 @@ cloud metadata and signatures.
%prep %prep
%setup -q %setup -q
%autopatch -p1
%build %build
make -f Makefile VERSION=%{version}-%{release} CFLAGS="%{optflags}" \ make -f Makefile VERSION=%{version}-%{release} CFLAGS="%{optflags}" \
LDFLAGS="%{__global_ldflags}" OS_DIST="%{dist}" PYTHON="%{__python}" \ LDFLAGS="%{__global_ldflags}" OS_DIST="%{dist}" PYTHON="%{__python}" \
@ -736,6 +741,9 @@ rmdir %{python_sitearch}/subscription_manager-*-*.egg-info --ignore-fail-on-non-
rm -f /var/lib/rhsm/cache/rhsm_icon.json rm -f /var/lib/rhsm/cache/rhsm_icon.json
%changelog %changelog
* Tue Sep 24 2024 Eduard Abdullin <eabdullin@almalinux.org> - 1.30.1-1.alma.1
- Debrand for AlmaLinux
* Wed Aug 21 2024 Pino Toscano <ptoscano@redhat.com> 1.30.1-1 * Wed Aug 21 2024 Pino Toscano <ptoscano@redhat.com> 1.30.1-1
- feat: forcefully switch automatic cloud registration to v1 - feat: forcefully switch automatic cloud registration to v1
(ptoscano@redhat.com) (ptoscano@redhat.com)