[elbe-devel] [PATCH 1/3] elbepack: rfs: read preseed.txt directly from chroot
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Thu Apr 25 17:47:20 CEST 2024
debconf-set-selections can read an input file directly which is simpler.
This also removes the hack that works around the fact that chroot() does
not properly handle shell metacharacters.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/rfs.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/elbepack/rfs.py b/elbepack/rfs.py
index c3fea7d38d39..0245ddfbd1be 100644
--- a/elbepack/rfs.py
+++ b/elbepack/rfs.py
@@ -306,8 +306,7 @@ class BuildEnv:
preseed_txt = preseed_to_text(preseed)
self.rfs.write_file('var/cache/elbe/preseed.txt', 0o644, preseed_txt)
with self.rfs:
- cmd = (f'debconf-set-selections < {self.rfs.fname("var/cache/elbe/preseed.txt")}')
- chroot(self.rfs.path, cmd)
+ chroot(self.rfs.path, 'debconf-set-selections /var/cache/elbe/preseed.txt')
def seed_etc(self):
passwd = self.xml.text('target/passwd_hashed')
--
2.44.0
More information about the elbe-devel
mailing list