From 90a548f8a0628d8e1858c313c461657c49304238 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Dec 09 2014 19:18:24 +0000 Subject: Allow for disabling rhel registration --- diff --git a/0014-Allow-for-disabling-rhel-registration.patch b/0014-Allow-for-disabling-rhel-registration.patch new file mode 100644 index 0000000..5970307 --- /dev/null +++ b/0014-Allow-for-disabling-rhel-registration.patch @@ -0,0 +1,45 @@ +From 041dedfbfbf45ae38cb4959cacce1920f28ffbf3 Mon Sep 17 00:00:00 2001 +From: James Slagle +Date: Tue, 9 Dec 2014 14:14:53 -0500 +Subject: [PATCH] Allow for disabling rhel registration + +When using the rhel element, it can be uesful to disable registration. +For instance, if using an internal mirror repository that does not +require registration/authentication. + +Change-Id: I42fa34e7f146137e5b1b9c5d7785702311e1dca1 +--- + .../os-refresh-config/pre-configure.d/06-rhel-registration | 3 +++ + elements/rhel-common/pre-install.d/00-rhel-registration | 5 ++++- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration b/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration +index f85569f..d7fd5be 100755 +--- a/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration ++++ b/elements/rhel-common/os-refresh-config/pre-configure.d/06-rhel-registration +@@ -113,6 +113,9 @@ case "${REG_METHOD:-}" in + # beta-rpms repo only needed to support the katello-ca rpm above. + subscription-manager repos --disable ${satellite_repo} + ;; ++ disable) ++ echo "Disabling RHEL registration" ++ ;; + *) + echo "WARNING: only 'portal' and 'satellite' are valid values for REG_METHOD." + exit 0 +diff --git a/elements/rhel-common/pre-install.d/00-rhel-registration b/elements/rhel-common/pre-install.d/00-rhel-registration +index ced9529..0314019 100755 +--- a/elements/rhel-common/pre-install.d/00-rhel-registration ++++ b/elements/rhel-common/pre-install.d/00-rhel-registration +@@ -96,7 +96,10 @@ case "${REG_METHOD:-}" in + # beta-rpms repo only needed to support the katello-ca rpm above. + subscription-manager repos --disable rhel-7-server-rh-common-beta-rpms + ;; ++ disable) ++ echo "Disabling RHEL registration" ++ ;; + *) +- echo "WARNING: only 'portal' and 'satellite' are valid values for REG_METHOD." ++ echo "WARNING: only 'portal', 'satellite', and 'disable' are valid values for REG_METHOD." + exit 1 + esac diff --git a/diskimage-builder.spec b/diskimage-builder.spec index 28f4348..b76e88c 100644 --- a/diskimage-builder.spec +++ b/diskimage-builder.spec @@ -1,7 +1,7 @@ Name: diskimage-builder Summary: Image building tools for OpenStack Version: 0.1.34 -Release: 17%{?dist} +Release: 18%{?dist} License: ASL 2.0 Group: System Environment/Base URL: https://launchpad.net/diskimage-builder @@ -20,6 +20,7 @@ Patch0010: 0010-Update-RHEL-Registration.patch Patch0011: 0011-Allow-source-repositories-to-be-disabled-completely.patch Patch0012: 0012-Allow-injecting-arbitrary-yum-repo-configuration.patch Patch0013: 0013-Convert-deploy-ramdisk-to-targetcli.patch +Patch0014: 0014-Allow-for-disabling-rhel-registration.patch BuildArch: noarch BuildRequires: python2-devel @@ -51,6 +52,7 @@ Requires: dib-utils %patch0011 -p1 %patch0012 -p1 %patch0013 -p1 +%patch0014 -p1 %build %{__python} setup.py build @@ -103,6 +105,9 @@ Components of TripleO that are responsible for building disk images. %{_datadir}/%{name}/elements %changelog +* Tue Dec 09 2014 James Slagle 0.1.34-18 +- Allow for disabling rhel registration + * Tue Dec 08 2014 James Slagle 0.1.34-17 - Make files created by patch 0012-Allow-injecting-arbitrary-yum-repo-configuration.patch +x