MSVSphere changes

i10-beta changed/i10-beta/subscription-manager-1.30.1-1.el10.inferit
Sergey Cherevko 2 days ago
parent 80b1cf4d03
commit e57bababba
Signed by: scherevko
GPG Key ID: D87CBBC16D2E4A72

File diff suppressed because it is too large Load Diff

@ -0,0 +1,28 @@
From 5d2f973ef5ae4fb1eba602afe11c404162edf474 Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <eugene@zamriy.info>
Date: Sun, 2 Apr 2023 19:02:34 +0300
Subject: [PATCH 2/4] Set MSVSphere syspurposes
---
etc-conf/syspurpose/valid_fields.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/etc-conf/syspurpose/valid_fields.json b/etc-conf/syspurpose/valid_fields.json
index 1ac7ea0..0cf3787 100644
--- a/etc-conf/syspurpose/valid_fields.json
+++ b/etc-conf/syspurpose/valid_fields.json
@@ -1,8 +1,8 @@
{
"role": [
- "Red Hat Enterprise Linux Server",
- "Red Hat Enterprise Linux Workstation",
- "Red Hat Enterprise Linux Compute Node"
+ "MSVSphere Server",
+ "MSVSphere Workstation",
+ "MSVSphere Compute Node"
],
"service_level_agreement": [
"Premium",
--
2.43.5

@ -0,0 +1,29 @@
From 6eda92395cde8e527f26d24399d86c2cf18d22b3 Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <eugene@zamriy.info>
Date: Sun, 2 Apr 2023 19:03:40 +0300
Subject: [PATCH 3/4] Disable repo file creation
---
src/subscription_manager/repofile.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/subscription_manager/repofile.py b/src/subscription_manager/repofile.py
index c5bbee9..8ed6592 100644
--- a/src/subscription_manager/repofile.py
+++ b/src/subscription_manager/repofile.py
@@ -374,11 +374,7 @@ class RepoFileBase:
"""
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
--
2.43.5

@ -0,0 +1,23 @@
From 85b334400b4d8ff73b3a0c0ec636ba03d32f5410 Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <eugene@zamriy.info>
Date: Sun, 2 Apr 2023 19:15:32 +0300
Subject: [PATCH 4/4] Disable subscription manager plugin
---
etc-conf/plugin/subscription-manager.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc-conf/plugin/subscription-manager.conf b/etc-conf/plugin/subscription-manager.conf
index 9050582..2392f67 100644
--- a/etc-conf/plugin/subscription-manager.conf
+++ b/etc-conf/plugin/subscription-manager.conf
@@ -1,5 +1,5 @@
[main]
-enabled=1
+enabled=0
# When following option is set to 1, then all repositories defined outside redhat.repo will be disabled
# every time subscription-manager plugin is triggered by dnf or yum
--
2.43.5

@ -96,7 +96,7 @@
Name: subscription-manager
Version: 1.30.1
Release: 1%{?dist}
Release: 1%{?dist}.inferit
Summary: Tools and libraries for subscription and repository management
%if 0%{?suse_version}
Group: Productivity/Networking/System
@ -113,6 +113,12 @@ URL: http://www.candlepinproject.org/
# tito build --tag subscription-manager-$VERSION-$RELEASE --tgz
Source0: %{name}-%{version}.tar.gz
# MSVSphere patches
Patch1001: 0001-Debrand-for-MSVSphere.patch
Patch1002: 0002-Set-MSVSphere-syspurposes.patch
Patch1003: 0003-Disable-repo-file-creation.patch
Patch1004: 0004-Disable-subscription-manager-plugin.patch
# Especially for the OpenSuse Build Service we need to have another lint config
%if 0%{?suse_version}
Source2: subscription-manager-rpmlintrc
@ -361,6 +367,10 @@ cloud metadata and signatures.
%prep
%setup -q
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
%build
make -f Makefile VERSION=%{version}-%{release} CFLAGS="%{optflags}" \
@ -407,7 +417,9 @@ popd
# fake out the redhat.repo file
%if %{use_dnf}
mkdir %{buildroot}%{_sysconfdir}/yum.repos.d
%if %{undefined msvsphere_ver}
touch %{buildroot}%{_sysconfdir}/yum.repos.d/redhat.repo
%endif
%endif
# fake out the certificate directories
@ -417,9 +429,11 @@ 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 %{undefined msvsphere_ver}
mkdir %{buildroot}%{_sysconfdir}/docker/certs.d/cdn.redhat.com
install -m 644 %{_builddir}/%{buildsubdir}/src/content_plugins/redhat-entitlement-authority.pem %{buildroot}%{_sysconfdir}/docker/certs.d/cdn.redhat.com/redhat-entitlement-authority.crt
%endif
%endif
# fix timestamps on our byte compiled files so they match across arches
find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \;
@ -615,10 +629,12 @@ find %{buildroot} -name \*.py* -exec touch -r %{SOURCE0} '{}' \;
%{python_sitearch}/subscription_manager/plugin/container/__pycache__
%{python_sitearch}/subscription_manager/plugin/container/*.py*
%if %{undefined msvsphere_ver}
# 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}/docker/certs.d/cdn.redhat.com/redhat-entitlement-authority.crt
%endif
%endif
%if %has_ostree
%files -n subscription-manager-plugin-ostree
@ -736,6 +752,9 @@ rmdir %{python_sitearch}/subscription_manager-*-*.egg-info --ignore-fail-on-non-
rm -f /var/lib/rhsm/cache/rhsm_icon.json
%changelog
* Wed Dec 25 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 1.30.1-1.inferit
- Debrand for MSVSphere
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.30.1-1
- Rebuilt for MSVSphere 10

Loading…
Cancel
Save