From 7eed0e10ef4d8b94680e8b16b4d08db9a590bcfa Mon Sep 17 00:00:00 2001 From: Sofia Boldyreva Date: Mon, 3 Feb 2025 16:35:13 +0100 Subject: [PATCH] Initial commit --- config.yaml | 29 +++++++++++++++++++++ files/almalinux_debrand.patch | 47 +++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 config.yaml create mode 100644 files/almalinux_debrand.patch diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..3ab8930 --- /dev/null +++ b/config.yaml @@ -0,0 +1,29 @@ +actions: + - replace: + - target: "spec" + find: "the Red Hat entitlement" + replace: "an entitlement" + count: 2 + - target: "spec" + find: "This package provides a plugin to interact with repositories from the Red Hat" + replace: "This package provides a plugin to interact with repositories from an" + count: 1 + - target: "spec" + find: "a Red Hat Unified" + replace: "a Unified" + count: 2 + + - modify_release: + - suffix: ".alma.1" + enabled: true + + - changelog_entry: + - name: "Eduard Abdullin" + email: "eabdullin@almalinux.org" + line: + - "Debrand for AlmaLinux" + + - add_files: + - type: "patch" + name: "almalinux_debrand.patch" + number: 1000 diff --git a/files/almalinux_debrand.patch b/files/almalinux_debrand.patch new file mode 100644 index 0000000..21e0ac7 --- /dev/null +++ b/files/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)