2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-09 14:36:44 +00:00

Fill in the spots the SUSE 16 work missed

- the aarch64 osdeploy spec builds the stateful suse16 addons but its
  diskless loop was never extended, so the aarch64 rpm shipped suse16
  without suse16-diskless and a packed image got a dangling addons.cpio.
- imgutil's builddeb keeps its own copy of the directory list that
  confluent_imgutil.spec.tmpl has, and it had learned about neither suse16
  nor el10.
- gather_bootloader gained a /usr/share/efi fallback for shim on both
  architectures but only for x86_64 on grub, so an aarch64 root found a
  shim and then died copying grub.

Finally, rewriting repos.d file by file rather than copying the tree meant
a subdirectory or a file that is not valid UTF-8 aborted the build before
any package was installed, which also regressed SUSE 15. Pass anything
that is not a plain text repo definition through untouched and restore the
modes on the ones that are rewritten.
This commit is contained in:
Markus Hilger
2026-09-05 02:12:18 +02:00
parent 5645fb5cfd
commit 9dd5802698
3 changed files with 23 additions and 7 deletions
@@ -47,7 +47,7 @@ for os in rhvh4 el7 genesis el8 suse15 suse16 debian debian13 ubuntu20.04 ubuntu
mv ../addons.cpio .
cd ..
done
for os in el7 el8 suse15 el9 el10 ubuntu20.04 ubuntu22.04 ubuntu24.04 ubuntu26.04; do
for os in el7 el8 suse15 suse16 el9 el10 ubuntu20.04 ubuntu22.04 ubuntu24.04 ubuntu26.04; do
mkdir ${os}disklessout
cd ${os}disklessout
if [ -d ../${os}bin ]; then
+1 -1
View File
@@ -13,7 +13,7 @@ mkdir -p deb/confluent_imgutil_$VERSION/opt/confluent/lib/imgutil
mkdir -p deb/confluent_imgutil_$VERSION/opt/confluent/bin
mv imgutil deb/confluent_imgutil_$VERSION/opt/confluent/bin/
chmod a+x deb/confluent_imgutil_$VERSION/opt/confluent/bin/imgutil
mv ubuntu* suse15 el7 el9 el8 deb/confluent_imgutil_$VERSION/opt/confluent/lib/imgutil/
mv ubuntu* suse15 suse16 el7 el9 el10 el8 deb/confluent_imgutil_$VERSION/opt/confluent/lib/imgutil/
mkdir -p deb/confluent_imgutil_$VERSION/opt/confluent/share/licenses/confluent_imgutil
cp LICENSE deb/confluent_imgutil_$VERSION/opt/confluent/share/licenses/confluent_imgutil
sed -e 's/#VERSION#/'$VERSION/ control.tmpl > deb/confluent_imgutil_$VERSION/DEBIAN/control
+21 -5
View File
@@ -634,12 +634,22 @@ class SuseHandler(OsHandler):
targrepos = os.path.join(targzypp, 'repos.d')
mkdirp(targrepos)
for repofile in glob.glob('/etc/zypp/repos.d/*'):
with open(repofile) as repoin:
cfg = [line for line in repoin.read().splitlines()
if not line.startswith('service=')]
with open(os.path.join(
targrepos, os.path.basename(repofile)), 'w') as repoout:
targrepo = os.path.join(targrepos, os.path.basename(repofile))
# Anything that is not a plain text repo definition is passed
# through as-is rather than rewritten
if os.path.isdir(repofile):
shutil.copytree(repofile, targrepo)
continue
try:
with open(repofile) as repoin:
cfg = [line for line in repoin.read().splitlines()
if not line.startswith('service=')]
except (IsADirectoryError, UnicodeDecodeError):
shutil.copy2(repofile, targrepo)
continue
with open(targrepo, 'w') as repoout:
repoout.write('\n'.join(cfg) + '\n')
shutil.copystat(repofile, targrepo)
idx = 1
for source in self.sources:
if not source:
@@ -1813,6 +1823,12 @@ def gather_bootloader(outdir, rootpath='/'):
grubbin = os.path.join(rootpath, 'usr/lib/grub/arm64-efi/monolithic/grubaa64.efi')
if not os.path.exists(grubbin):
grubbin = os.path.join(rootpath, 'usr/share/efi/x86_64/grub.efi')
if not os.path.exists(grubbin):
# same relocation as the shim above, on the other architecture
aa64grub = os.path.join(rootpath, 'usr/share/efi/aarch64/grub.efi')
if os.path.exists(aa64grub):
grubbin = aa64grub
grubdestfilename = 'grubaa64.efi'
if not os.path.exists(grubbin):
grubs = os.path.join(rootpath, 'boot/efi/EFI/*/grubx64.efi')
grubs = glob.glob(grubs)