refs #953 improve versioning of the final iso file
parent
f9a275e380
commit
d6eb76f36b
|
@ -41,15 +41,6 @@ Y también podemos indicar otro archivo de configuración usando --config.
|
|||
|
||||
Las imágenes se crean en ./ogclient. Es conveniente crear este directorio con antelación, antes de ejecutar docker, porque de este modo el directorio queda con permisos de usuario. De lo contrario, docker lo crearía como root y necesitaríamos sudo para hacer cualquier cosa dentro de él.
|
||||
|
||||
Puede que durante la ejecución del contenedor salga un error como este una o más veces:
|
||||
|
||||
Exception ignored in: <function _acquireLock at 0x7fdac10f1f80>
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3.12/logging/__init__.py", line 241, in _acquireLock
|
||||
_lock.acquire()
|
||||
|
||||
Es un bug conocido en la biblioteca "logging" de python, para el cual ya existe solución y solo es cuestión de tiempo que la versión de python incluida en ubuntu incluya el fix.
|
||||
|
||||
|
||||
Descripción de la estrucutra de boot-tools
|
||||
------------------------------------------
|
||||
|
|
|
@ -239,9 +239,8 @@ def copy_og_files (builder, og_shared, og_engine, ogclientmount, osdistrib, osco
|
|||
subprocess.run (f'rsync -aH {og_shared}/lib/fonts {ogclientmount}/usr/local/lib', shell=True)
|
||||
subprocess.run (f'rsync -aH {og_shared}/lib/qtplugins/* {ogclientmount}/usr/local/plugins', shell=True)
|
||||
|
||||
# Browser y ogAdmClient.
|
||||
if os.path.exists (f'{og_shared}/bin/browser'): shutil.copy (f'{og_shared}/bin/browser', f'{ogclientmount}/bin/')
|
||||
if os.path.exists (f'{og_shared}/bin/ogAdmClient'): shutil.copy (f'{og_shared}/bin/ogAdmClient', f'{ogclientmount}/bin/')
|
||||
# Browser
|
||||
if os.path.exists (f'{og_shared}/bin/browser'): shutil.copy (f'{og_shared}/bin/browser', f'{ogclientmount}/bin/')
|
||||
|
||||
def sysctl (btrootfsmnt):
|
||||
logger.debug ('copiando sysctl.conf')
|
||||
|
@ -369,16 +368,17 @@ def mkisofs (pxepkg, isolinux_tpl, bttargetdir, nameisoclient):
|
|||
#el ogclienteToISO debe tener una copia del ogvmlinuz como linuxISO
|
||||
#cp -prv /var/lib/tftpboot/ogclientToIso/* /tmp/iso/ogclient
|
||||
|
||||
today = datetime.datetime.now(datetime.timezone.utc).strftime ('%Y%m%d')
|
||||
oldpwd = os.getcwd()
|
||||
os.chdir ('/tmp')
|
||||
logger.debug (f'mkisofs -quiet -V ogClient -o {nameisoclient}.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -J -no-emul-boot -boot-load-size 4 -boot-info-table /tmp/iso')
|
||||
utils.run (['mkisofs', '-quiet', '-V', 'ogClient', '-o', f'{nameisoclient}.iso', '-b', 'isolinux/isolinux.bin', '-c', 'isolinux/boot.cat', '-J', '-no-emul-boot', '-boot-load-size', '4', '-boot-info-table', '/tmp/iso'])
|
||||
logger.debug (f'mkisofs -quiet -V ogClient -o {nameisoclient}-{today}.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -J -no-emul-boot -boot-load-size 4 -boot-info-table /tmp/iso')
|
||||
utils.run (['mkisofs', '-quiet', '-V', 'ogClient', '-o', f'{nameisoclient}-{today}.iso', '-b', 'isolinux/isolinux.bin', '-c', 'isolinux/boot.cat', '-J', '-no-emul-boot', '-boot-load-size', '4', '-boot-info-table', '/tmp/iso'])
|
||||
|
||||
utils.write_md5 (f'{nameisoclient}.iso')
|
||||
utils.write_md5 (f'{nameisoclient}-{today}.iso')
|
||||
os.chdir (oldpwd)
|
||||
|
||||
shutil.move (f'/tmp/{nameisoclient}.iso' , f'/var/lib/tftpboot/ogclient/{nameisoclient}.iso')
|
||||
shutil.move (f'/tmp/{nameisoclient}.iso.sum', f'/var/lib/tftpboot/ogclient/{nameisoclient}.iso.sum')
|
||||
shutil.move (f'/tmp/{nameisoclient}-{today}.iso' , f'/var/lib/tftpboot/ogclient/{nameisoclient}-{today}.iso')
|
||||
shutil.move (f'/tmp/{nameisoclient}-{today}.iso.sum', f'/var/lib/tftpboot/ogclient/{nameisoclient}-{today}.iso.sum')
|
||||
|
||||
#def __unused_boottoolsBootGraphics():
|
||||
# find /tmp/opengnsys_installer/ -name .svn -type d -exec rm -fr {} \; 2>/dev/null;
|
||||
|
|
Loading…
Reference in New Issue