From 2bec60656edc5a9db57e5dd338894fc3a440649f Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: Aug 02 2017 12:00:00 +0000 Subject: Manual CentOS Debranding --- diff --git a/README.debrand b/README.debrand deleted file mode 100644 index 01c46d2..0000000 --- a/README.debrand +++ /dev/null @@ -1,2 +0,0 @@ -Warning: This package was configured for automatic debranding, but the changes -failed to apply. diff --git a/SOURCES/subscription-manager-1.19.21-centos-remove-redhat.repo.patch b/SOURCES/subscription-manager-1.19.21-centos-remove-redhat.repo.patch new file mode 100644 index 0000000..1e72611 --- /dev/null +++ b/SOURCES/subscription-manager-1.19.21-centos-remove-redhat.repo.patch @@ -0,0 +1,11 @@ +diff -uNrp subscription-manager-1.19.21.orig/src/subscription_manager/repolib.py subscription-manager-1.19.21/src/subscription_manager/repolib.py +--- subscription-manager-1.19.21.orig/src/subscription_manager/repolib.py 2017-06-21 20:41:38.000000000 +0000 ++++ subscription-manager-1.19.21/src/subscription_manager/repolib.py 2017-08-02 11:42:10.445263785 +0000 +@@ -819,6 +819,7 @@ class RepoFile(ConfigParser): + return Repo(section, self.items(section)) + + def create(self): ++ return + if self.path_exists(self.path) or not self.manage_repos: + return + f = open(self.path, 'w') diff --git a/SPECS/subscription-manager.spec b/SPECS/subscription-manager.spec index d111e5c..32d638e 100644 --- a/SPECS/subscription-manager.spec +++ b/SPECS/subscription-manager.spec @@ -7,6 +7,7 @@ %global use_initial_setup 1 %global rhsm_plugins_dir /usr/share/rhsm-plugins %global use_gtk3 %use_systemd +%global if_centos (0%{?centos_ver} && 0%{?centos_ver} >= 7) %if 0%{?rhel} == 7 %global use_initial_setup 1 @@ -75,6 +76,8 @@ URL: http://www.candlepinproject.org/ Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch999: subscription-manager-1.19.21-centos-remove-redhat.repo.patch + Requires: python-ethtool Requires: python-iniparse Requires: python-decorator @@ -280,6 +283,8 @@ the remote in the currently deployed .origin file. %prep %setup -q +%patch999 -p1 + %build make -f Makefile VERSION=%{version}-%{release} CFLAGS="%{optflags}" \ LDFLAGS="%{__global_ldflags}" OS_DIST="%{dist}" %{?gtk_version} @@ -292,8 +297,9 @@ make -f Makefile install VERSION=%{version}-%{release} \ %{?install_ostree} %{?post_boot_tool} %{?gtk_version} \ %{?install_yum_plugins} %{?install_dnf_plugins} -desktop-file-validate %{buildroot}/etc/xdg/autostart/rhsm-icon.desktop -desktop-file-validate %{buildroot}/usr/share/applications/subscription-manager-gui.desktop +#desktop-file-validate %{buildroot}/etc/xdg/autostart/rhsm-icon.desktop +#desktop-file-validate %{buildroot}/usr/share/applications/subscription-manager-gui.desktop +rm %{buildroot}/etc/xdg/autostart/rhsm-icon.desktop %find_lang rhsm %find_lang %{name} --with-gnome @@ -310,12 +316,20 @@ touch %{buildroot}%{_sysconfdir}/yum.repos.d/redhat.repo %{__mkdir_p} %{buildroot}%{_sysconfdir}/pki/entitlement # Setup cert directories for the container plugin: +%if 0%{!?if_centos} %{__mkdir_p} %{buildroot}%{_sysconfdir}/docker/certs.d/ %{__mkdir} %{buildroot}%{_sysconfdir}/docker/certs.d/cdn.redhat.com install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/redhat-entitlement-authority.pem %{buildroot}%{_sysconfdir}/docker/certs.d/cdn.redhat.com/redhat-entitlement-authority.crt +%else +rm %{buildroot}/%{_sysconfdir}/rhsm/ca/redhat-entitlement-authority.pem +%endif +%if 0%{!?if_centos} %{__mkdir_p} %{buildroot}%{_sysconfdir}/etc/rhsm/ca install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/redhat-entitlement-authority.pem %{buildroot}/%{_sysconfdir}/rhsm/ca/redhat-entitlement-authority.pem +%else +rm %{_builddir}/%{buildsubdir}/etc-conf/redhat-entitlement-authority.pem +%endif %clean rm -rf %{buildroot} @@ -480,7 +494,7 @@ rm -rf %{buildroot} %{_datadir}/appdata/subscription-manager-gui.appdata.xml # gui system config files -%{_sysconfdir}/xdg/autostart/rhsm-icon.desktop +#%{_sysconfdir}/xdg/autostart/rhsm-icon.desktop %if !0%{?sles_version} %{_sysconfdir}/pam.d/subscription-manager-gui %{_sysconfdir}/security/console.apps/subscription-manager-gui @@ -513,9 +527,9 @@ rm -rf %{buildroot} %{rhsm_plugins_dir}/container_content.py* %{python_sitelib}/subscription_manager/plugin/container.py* # 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}/rhsm/ca/redhat-entitlement-authority.pem -%attr(644,root,root) %{_sysconfdir}/docker/certs.d/cdn.redhat.com/redhat-entitlement-authority.crt +#%attr(755,root,root) %dir %{_sysconfdir}/docker/certs.d/cdn.redhat.com +#%attr(644,root,root) %{_sysconfdir}/rhsm/ca/redhat-entitlement-authority.pem +#%attr(644,root,root) %{_sysconfdir}/docker/certs.d/cdn.redhat.com/redhat-entitlement-authority.crt %if %has_ostree @@ -606,6 +620,9 @@ touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Aug 2 2017 Johnny Hughes 1.19.21-1 +- Manual CentOS Debranding + * Wed Jun 21 2017 Kevin Howell 1.19.21-1 - 1463765: Sync zanata translations (khowell@redhat.com) - 1463765: Fix wrong Indic-language translations (khowell@redhat.com)