refs #596 add 04-boottoolsSoftwareCompile
parent
7fc700a6ab
commit
8419065f0b
|
@ -0,0 +1,40 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
from boottoolsfunctions import _run
|
||||||
|
|
||||||
|
os.environ['LANGUAGE'] = os.environ['LC_ALL'] = os.environ['LANG'] = 'C'
|
||||||
|
|
||||||
|
#source /opt/opengnsys/lib/engine/bin/ToolsGNU.c &>/dev/null
|
||||||
|
|
||||||
|
os.chdir ('/tmp')
|
||||||
|
|
||||||
|
## apt-get install wget gettext unzip git
|
||||||
|
|
||||||
|
print ('ms-sys')
|
||||||
|
try: _run (['which', 'ms-sys'])
|
||||||
|
except:
|
||||||
|
_run (['wget', 'https://sourceforge.net/projects/ms-sys/files/latest/download', '-O', 'ms-sys.tar.gz'])
|
||||||
|
_run (['tar', '-xpzf', 'ms-sys.tar.gz'])
|
||||||
|
mssys_dir = subprocess.run (['tar tzf ms-sys.tar.gz |head -n 1'], shell=True, capture_output=True, text=True).stdout.strip()
|
||||||
|
print ('mssys_dir "{}"'.format (mssys_dir))
|
||||||
|
os.chdir (mssys_dir)
|
||||||
|
_run (['make', 'install'])
|
||||||
|
os.chdir ('..')
|
||||||
|
|
||||||
|
print ('spartlnx')
|
||||||
|
try: _run (['which', 'spartl64.run'])
|
||||||
|
except:
|
||||||
|
_run (['wget', 'http://damien.guibouret.free.fr/savepart.zip'])
|
||||||
|
_run (['unzip', '-o', 'savepart.zip', '-d', '/sbin/', 'spartl64.run'])
|
||||||
|
_run (['mkdir', '/usr/share/doc/spartlnx'])
|
||||||
|
_run (['unzip', '-j', '-o', 'savepart.zip', '-d', '/usr/share/doc/spartlnx/', 'doc/en/*'])
|
||||||
|
|
||||||
|
print ('python-libfdisk')
|
||||||
|
_run (['apt-get', '-y', 'install', 'python3-psutil', 'python3-dev', 'libfdisk-dev', 'python3-setuptools'])
|
||||||
|
_run (['git', 'clone', 'git://git.48k.eu/python-libfdisk'])
|
||||||
|
os.chdir ('python-libfdisk')
|
||||||
|
_run (['python3', 'setup.py', 'install'])
|
||||||
|
os.chdir ('..')
|
||||||
|
_run (['apt-get', '-y', 'remove', 'python3-dev', 'python3-setuptools'])
|
|
@ -147,9 +147,11 @@ logger.debug ('running \'schroot --chroot IMGogclient -- {}/03-boottoolsSoftware
|
||||||
stdout, _ = _run (['schroot', '--chroot', 'IMGogclient', '--', '{}/03-boottoolsSoftwareInstall.py'.format (curdir), '--osrelease', osrelease, '--osarch', osarch])
|
stdout, _ = _run (['schroot', '--chroot', 'IMGogclient', '--', '{}/03-boottoolsSoftwareInstall.py'.format (curdir), '--osrelease', osrelease, '--osarch', osarch])
|
||||||
logger.debug ('03-boottoolsSoftwareInstall stdout follows: {}'.format (stdout))
|
logger.debug ('03-boottoolsSoftwareInstall stdout follows: {}'.format (stdout))
|
||||||
|
|
||||||
"""
|
|
||||||
schroot --chroot IMGogclient -- /usr/bin/boot-tools/boottoolsSoftwareInstall.sh >>/tmp/fase5.out
|
|
||||||
logger.info ('Fase 5.2 compilar software.')
|
logger.info ('Fase 5.2 compilar software.')
|
||||||
|
logger.debug ('running \'schroot --chroot IMGogclient -- {}/04-boottoolsSoftwareCompile.py\'')
|
||||||
|
stdout, _ = _run (['schroot', '--chroot', 'IMGogclient', '--', '{}/04-boottoolsSoftwareCompile.py'.format (curdir)])
|
||||||
|
logger.debug ('04-boottoolsSoftwareCompile stdout follows: {}'.format (stdout))
|
||||||
|
"""
|
||||||
cd /
|
cd /
|
||||||
schroot --chroot IMGogclient -- /usr/bin/boot-tools/boottoolsSoftwareCompile.sh >>/tmp/fase5.out
|
schroot --chroot IMGogclient -- /usr/bin/boot-tools/boottoolsSoftwareCompile.sh >>/tmp/fase5.out
|
||||||
cd -
|
cd -
|
||||||
|
|
Loading…
Reference in New Issue