From facba645c51f5d2315bd7a7adb3b8dbd0411279d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 10 Jun 2020 10:17:54 -0400 Subject: [PATCH] Revert "Switch to tar" This reverts commit c6d0c121d4d43949ae108d34e3825437d8d91a38. --- confluent_osdeploy/confluent_osdeploy.spec.tmpl | 4 ++-- confluent_server/bin/osimage | 6 +++--- confluent_server/confluent/osimage.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/confluent_osdeploy/confluent_osdeploy.spec.tmpl b/confluent_osdeploy/confluent_osdeploy.spec.tmpl index 5005bcbf..4bc123fe 100644 --- a/confluent_osdeploy/confluent_osdeploy.spec.tmpl +++ b/confluent_osdeploy/confluent_osdeploy.spec.tmpl @@ -39,8 +39,8 @@ cd esxi7out cp -a ../opt . cp -a ../esxi7/initramfs/* . chmod +x bin/* opt/confluent/bin/* -tar cf ../addons.tar * -mv ../addons.tar . +tar zcvf ../addons.tgz * +mv ../addons.tgz . cd .. %install diff --git a/confluent_server/bin/osimage b/confluent_server/bin/osimage index a29f1083..9349c62a 100644 --- a/confluent_server/bin/osimage +++ b/confluent_server/bin/osimage @@ -137,11 +137,11 @@ def initialize(cmdset): sys.stderr.write('Error occurred while packing site initramfs') sys.exit(1) os.rename(tmpname, '/var/lib/confluent/public/site/initramfs.cpio') - tmptarname = tmpname.replace('cpio', 'tar') - tarcmd = ['tar', '--transform=s|^|etc/|', '-cf', tmptarname] + topack + tmptarname = tmpname.replace('cpio', 'tgz') + tarcmd = ['tar', '--transform=s|^|etc/|', '-czf', tmptarname] + topack subprocess.check_call(tarcmd) os.chdir(opath) - os.rename(tmptarname, '/var/lib/confluent/public/site/initramfs.tar') + os.rename(tmptarname, '/var/lib/confluent/public/site/initramfs.tgz') if cmdset.k: with open('/etc/ssh/ssh_known_hosts', 'a+b') as skh: for cafile in glob.glob('/var/lib/confluent/public/site/ssh/*.ca'): diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 0852f8c6..87aecaa5 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -71,14 +71,14 @@ def update_boot_esxi(profiledir, profile, label): elif cfgline.startswith('modules='): modlist = cfgline.split('=', 1)[1] filesneeded.extend(modlist.split(' --- ')) - newbootcfg += cfgline + ' --- /initramfs/addons.tar --- /site.tar\n' + newbootcfg += cfgline + ' --- /initramfs/addons.tgz --- /site.tgz\n' else: newbootcfg += cfgline + '\n' os.makedirs('{0}/boot/efi/boot/'.format(profiledir)) with open('{0}/boot/efi/boot/BOOT.CFG'.format(profiledir), 'w+') as bcfg: bcfg.write(newbootcfg) - os.symlink('/var/lib/confluent/public/site/initramfs.tar', - '{0}/boot/site.tar'.format(profiledir)) + os.symlink('/var/lib/confluent/public/site/initramfs.tgz', + '{0}/boot/site.tgz'.format(profiledir)) for fn in filesneeded: if fn.startswith('/'): fn = fn[1:]