From 08c873e0e31e7cd84d0002c6210f0a84d72814e8 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 18 Mar 2019 19:59:05 +0000 Subject: [PATCH] Backport networking patch --- ...tboot-Enable-networking-if-Ignition-.patch | 28 +++++++++++++++++++ ignition.spec | 7 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0001-02_ignition_firstboot-Enable-networking-if-Ignition-.patch diff --git a/0001-02_ignition_firstboot-Enable-networking-if-Ignition-.patch b/0001-02_ignition_firstboot-Enable-networking-if-Ignition-.patch new file mode 100644 index 0000000..9f71bee --- /dev/null +++ b/0001-02_ignition_firstboot-Enable-networking-if-Ignition-.patch @@ -0,0 +1,28 @@ +From c62a108c79db49cecb9f323d6567d33a86fa6dc7 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Mon, 18 Mar 2019 13:54:56 +0000 +Subject: [PATCH] 02_ignition_firstboot: Enable networking if Ignition will run + +Today coreos-assembler is hardcoding the initramfs networking kargs to +do DHCP; this is problematic for e.g. bare metal where one often wants +to configure static networking. + +Let's only enable initramfs networking if we're doing Ignition. +--- + grub/02_ignition_firstboot | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub/02_ignition_firstboot b/grub/02_ignition_firstboot +index a154918..b4e926d 100755 +--- a/grub/02_ignition_firstboot ++++ b/grub/02_ignition_firstboot +@@ -9,5 +9,5 @@ search --set=bootpart --label boot + # to be used later on the kernel command line. + set ignition_firstboot="" + if [ -f "(${bootpart})/ignition.firstboot" ]; then +- set ignition_firstboot="ignition.firstboot" ++ set ignition_firstboot="ignition.firstboot rd.neednet=1 ip=dhcp" + fi +-- +2.20.1 + diff --git a/ignition.spec b/ignition.spec index f97b701..bd9691a 100644 --- a/ignition.spec +++ b/ignition.spec @@ -73,7 +73,7 @@ Name: ignition Version: 0.31.0 -Release: 2.git%{shortcommit}%{?dist} +Release: 3.git%{shortcommit}%{?dist} Summary: First boot installer and configuration tool License: ASL 2.0 URL: https://%{provider_prefix} @@ -319,6 +319,7 @@ Requires: dracut-network BuildArchitectures: noarch Patch0: 0001-grub-find-boot-partition-and-use-it-directly.patch +Patch1: 0001-02_ignition_firstboot-Enable-networking-if-Ignition-.patch %description dracut Dracut modules for ignition to enable ignition services to run in the @@ -342,6 +343,7 @@ initramfs on boot. %setup -T -D -a 1 -q -n %{repo}-%{commit} cd %{dracutrepo}-%{dracutcommit} %patch0 -p1 +%patch1 -p1 %build # Set up PWD as a proper import path for go @@ -484,6 +486,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %endif %changelog +* Mon Mar 18 2019 Colin Walters - 0.31.0-3.gitf59a653 +- Backport patch for networking + * Mon Mar 04 2019 Dusty Mabe - 0.31.0-2.gitf59a653 - ignition-dracut: backport patch for finding ignition.firstboot file on UEFI systems https://github.com/coreos/ignition-dracut/pull/52