Backport PR#1035 to fix Rawhide composes (I hope)
This commit is contained in:
parent
cf351447ac
commit
0d7e6b5223
@ -0,0 +1,45 @@
|
|||||||
|
From 6ba02f734c481dfb7fa3feab11b6831b449d82cb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Williamson <awilliam@redhat.com>
|
||||||
|
Date: Mon, 15 Jun 2020 17:05:02 -0700
|
||||||
|
Subject: [PATCH] Ensure /proc exists before trying to touch /proc/modules
|
||||||
|
|
||||||
|
The last few Rawhide composes failed because, when we try to
|
||||||
|
touch /proc/modules here (in treebuilder.py), /proc does not
|
||||||
|
exist in the inroot. I tried and failed all afternoon to figure
|
||||||
|
out *why* it suddenly doesn't exist; I'd still like to know, but
|
||||||
|
this at least should make it not an issue. `exist_ok=True` means
|
||||||
|
that if the dir already exists we'll do nothing and carry on.
|
||||||
|
|
||||||
|
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
||||||
|
---
|
||||||
|
src/pylorax/creator.py | 1 +
|
||||||
|
src/pylorax/treebuilder.py | 1 +
|
||||||
|
2 files changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/pylorax/creator.py b/src/pylorax/creator.py
|
||||||
|
index 7075d325..fc090a26 100644
|
||||||
|
--- a/src/pylorax/creator.py
|
||||||
|
+++ b/src/pylorax/creator.py
|
||||||
|
@@ -256,6 +256,7 @@ def rebuild_initrds_for_live(opts, sys_root_dir, results_dir):
|
||||||
|
raise Exception("No initrds found, cannot rebuild_initrds")
|
||||||
|
|
||||||
|
# Hush some dracut warnings. TODO: bind-mount proc in place?
|
||||||
|
+ os.makedirs(joinpaths(sys_root_dir, "/proc"), exist_ok=True)
|
||||||
|
open(joinpaths(sys_root_dir,"/proc/modules"),"w")
|
||||||
|
|
||||||
|
if opts.ostree:
|
||||||
|
diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py
|
||||||
|
index cbb8872f..c30df638 100644
|
||||||
|
--- a/src/pylorax/treebuilder.py
|
||||||
|
+++ b/src/pylorax/treebuilder.py
|
||||||
|
@@ -309,6 +309,7 @@ class TreeBuilder(object):
|
||||||
|
raise Exception("No kernels found, cannot rebuild_initrds")
|
||||||
|
|
||||||
|
# Hush some dracut warnings. TODO: bind-mount proc in place?
|
||||||
|
+ os.makedirs(joinpaths(self.vars.inroot, "/proc"), exist_ok=True)
|
||||||
|
open(joinpaths(self.vars.inroot,"/proc/modules"),"w")
|
||||||
|
for kernel in self.kernels:
|
||||||
|
if prefix:
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
11
lorax.spec
11
lorax.spec
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name: lorax
|
Name: lorax
|
||||||
Version: 33.5
|
Version: 33.5
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Tool for creating the anaconda install images
|
Summary: Tool for creating the anaconda install images
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -15,6 +15,10 @@ URL: https://github.com/weldr/lorax
|
|||||||
# tito build --tgz
|
# tito build --tgz
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# https://github.com/weldr/lorax/pull/1035
|
||||||
|
# Ensure /proc exists before trying to touch /proc/modules
|
||||||
|
Patch0: 0001-Ensure-proc-exists-before-trying-to-touch-proc-modul.patch
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
|
|
||||||
@ -179,7 +183,7 @@ A command line tool for use with the lorax-composer API server. Examine blueprin
|
|||||||
build images, etc. from the command line.
|
build images, etc. from the command line.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -267,6 +271,9 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin
|
|||||||
%{_mandir}/man1/composer-cli.1*
|
%{_mandir}/man1/composer-cli.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 15 2020 Adam Williamson <awilliam@redhat.com> - 33.5-2
|
||||||
|
- Backport PR#1035 to fix Rawhide composes (I hope)
|
||||||
|
|
||||||
* Thu Jun 11 2020 Brian C. Lane <bcl@redhat.com> 33.5-1
|
* Thu Jun 11 2020 Brian C. Lane <bcl@redhat.com> 33.5-1
|
||||||
- lorax-composer: Add deprecation notice to documentation (bcl@redhat.com)
|
- lorax-composer: Add deprecation notice to documentation (bcl@redhat.com)
|
||||||
- composer-cli: Return a better error with no value (bcl@redhat.com)
|
- composer-cli: Return a better error with no value (bcl@redhat.com)
|
||||||
|
Loading…
Reference in New Issue
Block a user