From 19c63800ded36f27d3143216903502f367761dc2 Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Wed, 28 May 2025 11:38:44 +0200 Subject: [PATCH 1/2] refs #2094 try fixing resolvconf --- chroot-tasks.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/chroot-tasks.py b/chroot-tasks.py index afd721a..389bd37 100755 --- a/chroot-tasks.py +++ b/chroot-tasks.py @@ -87,7 +87,7 @@ def boottoolsSoftwareCompile(): print ('boottoolsSoftwareCompile: spartlnx', file=sys.stderr) try: utils.run (['which', 'spartl64.run']) except: - utils.run (['wget', '--quiet', 'http://damien.guibouret.free.fr/savepart.zip']) + utils.run (['wget', '--tries=5', 'http://damien.guibouret.free.fr/savepart.zip']) utils.run (['unzip', '-o', 'savepart.zip', '-d', '/sbin/', 'spartl64.run', 'spartlnx.run']) utils.run (['mkdir', '/usr/share/doc/spartlnx']) utils.run (['unzip', '-j', '-o', 'savepart.zip', '-d', '/usr/share/doc/spartlnx/', 'doc/en/*']) @@ -115,12 +115,21 @@ def boottoolsRemovePackages(): print ('boottoolsRemovePackages', file=sys.stderr) apt.remove (['python3-dev', 'python3-setuptools', 'python3-pip']) -def setup_resolvconf(): - if os.path.islink('/etc/resolc.conf'): - os.unlink ('/etc/resolv.conf') +def setup_resolvconf1(): + print ('setup_resolvconf1', file=sys.stderr) + subprocess.run (['ls', '-l', '/etc/resolv.conf']) + os.unlink ('/etc/resolv.conf') f = open ('/etc/resolv.conf', 'w') f.write ('nameserver 8.8.8.8') f.close() + subprocess.run (['ls', '-l', '/etc/resolv.conf']) + +def setup_resolvconf2(): + print ('setup_resolvconf2', file=sys.stderr) + subprocess.run (['ls', '-l', '/etc/resolv.conf']) + os.unlink ('/etc/resolv.conf') + os.symlink ('/run/resolvconf/resolv.conf', '/etc/resolv.conf') + subprocess.run (['ls', '-l', '/etc/resolv.conf']) def boottoolsInitrdGenerate (osrelease): print ('boottoolsInitrdGenerate', file=sys.stderr) @@ -159,10 +168,10 @@ if __name__ == '__main__': debconf_settings = config['General'].get ('debconf_settings') updateCaCertificates() - setup_resolvconf() + setup_resolvconf1() boottoolsSoftwareInstall (args.osarch, args.osrelease) boottoolsSoftwareCompile() boottoolsPythonModules() boottoolsRemovePackages() - setup_resolvconf() ## do this again, since someone seems to be overwriting the file + setup_resolvconf2() boottoolsInitrdGenerate (args.osrelease) From 5a52e3ecaeee190821eebd33bbfb3ff938989be9 Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Wed, 28 May 2025 13:23:33 +0200 Subject: [PATCH 2/2] refs #2094 try fixing resolvconf --- CHANGELOG.md | 6 ++++++ chroot-tasks.py | 6 ++---- includes/etc/initramfs-tools/scripts/VERSION.txt | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d57d0b2..881d7f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.7.0] - 2025-05-28 + +### Changed + +- Leave resolv.conf as a symlink to /run/resolvconf/resolv.conf + ## [3.6.0] - 2025-05-21 ### Changed diff --git a/chroot-tasks.py b/chroot-tasks.py index 389bd37..362c65f 100755 --- a/chroot-tasks.py +++ b/chroot-tasks.py @@ -115,21 +115,19 @@ def boottoolsRemovePackages(): print ('boottoolsRemovePackages', file=sys.stderr) apt.remove (['python3-dev', 'python3-setuptools', 'python3-pip']) +## have working DNS during the build def setup_resolvconf1(): print ('setup_resolvconf1', file=sys.stderr) - subprocess.run (['ls', '-l', '/etc/resolv.conf']) os.unlink ('/etc/resolv.conf') f = open ('/etc/resolv.conf', 'w') f.write ('nameserver 8.8.8.8') f.close() - subprocess.run (['ls', '-l', '/etc/resolv.conf']) +## leave the final configuration for oglive def setup_resolvconf2(): print ('setup_resolvconf2', file=sys.stderr) - subprocess.run (['ls', '-l', '/etc/resolv.conf']) os.unlink ('/etc/resolv.conf') os.symlink ('/run/resolvconf/resolv.conf', '/etc/resolv.conf') - subprocess.run (['ls', '-l', '/etc/resolv.conf']) def boottoolsInitrdGenerate (osrelease): print ('boottoolsInitrdGenerate', file=sys.stderr) diff --git a/includes/etc/initramfs-tools/scripts/VERSION.txt b/includes/etc/initramfs-tools/scripts/VERSION.txt index 38aae09..4593cc8 100644 --- a/includes/etc/initramfs-tools/scripts/VERSION.txt +++ b/includes/etc/initramfs-tools/scripts/VERSION.txt @@ -1 +1 @@ -OpenGnsys Client 3.6.0 +OpenGnsys Client 3.7.0