Updated
Signed-off-by: debianpepper <pdpdebdevuan@protonmail.com>
This commit is contained in:
parent
6b3fc26ccc
commit
eec796eef6
|
@ -399,6 +399,383 @@ class BuildXfce:
|
|||
print("WARNING: No active build specified")
|
||||
|
||||
|
||||
class BuildGflashback:
|
||||
"""
|
||||
Determine what base to use and then build the ISO
|
||||
"""
|
||||
def __init__(self, sbase, sarch):
|
||||
self.sbase = sbase
|
||||
self.sarch = sarch
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
# Determine what base to build
|
||||
if sbase == "deb":
|
||||
# Run the Debian Build
|
||||
self.debian_build()
|
||||
elif sbase == "dev":
|
||||
self.devuan_build()
|
||||
else:
|
||||
print("No base has been found")
|
||||
|
||||
|
||||
def build_deb_64(self):
|
||||
""" Builds the 64bit ISO GNOME FlashBack"""
|
||||
current_working_directory = os.getcwd()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Building a Debian based 64 bit ISO")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
# Set the config tree
|
||||
lbsetup = conf.lbset_deb64
|
||||
os.system(lbsetup)
|
||||
print("Config tree ready!")
|
||||
# Start with the GNOME FlashBack stuff
|
||||
cmd_list_64 = collections.deque(conf.build64_gfb_build)
|
||||
list_size_64 = len(cmd_list_64)
|
||||
for _ in range(list_size_64):
|
||||
i = cmd_list_64.popleft()
|
||||
execute = i + '()'
|
||||
exec(execute)
|
||||
# Run the specific classes
|
||||
infra.ChrootFolders("deb", "_64")
|
||||
infra.BinaryFolders("deb", "_64")
|
||||
infra.ArchitectureFiles("deb", "_64")
|
||||
# Run the Build
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Configs in place start the ISO build process")
|
||||
print("INFO: Start Live-Build Process")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('.' * term_size.columns)
|
||||
lbsetup = conf.lbset_deb64
|
||||
os.system(lbsetup)
|
||||
run_cmd = 'sudo lb build'
|
||||
current_working_directory = os.getcwd()
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
os.system(run_cmd)
|
||||
print("INFO: ISO build has completed successfully")
|
||||
print('.' * term_size.columns)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
finish_cleanup.make_check_sum()
|
||||
finish_cleanup.copy_iso_file_nightly_deb64()
|
||||
finish_cleanup.kill_old_iso()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: ISO is ready for usage.")
|
||||
print('=' * term_size.columns)
|
||||
|
||||
|
||||
def build_deb_32(self):
|
||||
""" Builds the 32bit ISO GNOME FlashBack"""
|
||||
current_working_directory = os.getcwd()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Building a Debian based 32 bit ISO")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
# Set the config tree
|
||||
lbsetup = conf.lbset_deb32
|
||||
os.system(lbsetup)
|
||||
print("Config tree ready!")
|
||||
# Start with the GNOME FlashBack stuff
|
||||
cmd_list_32 = collections.deque(conf.build32_gfb_build)
|
||||
list_size_32 = len(cmd_list_32)
|
||||
for _ in range(list_size_32):
|
||||
i = cmd_list_32.popleft()
|
||||
execute = i + '()'
|
||||
exec(execute)
|
||||
# Run the specific classes
|
||||
infra.ChrootFolders("deb", "_32")
|
||||
infra.BinaryFolders("deb", "_32")
|
||||
infra.ArchitectureFiles("deb", "_32")
|
||||
# Run the Build
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Configs in place start the ISO build process")
|
||||
print("INFO: Start Live-Build Process")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('.' * term_size.columns)
|
||||
lbsetup = conf.lbset_deb32
|
||||
os.system(lbsetup)
|
||||
run_cmd = 'sudo lb build'
|
||||
current_working_directory = os.getcwd()
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
os.system(run_cmd)
|
||||
print("INFO: ISO build has completed successfully")
|
||||
print('.' * term_size.columns)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
finish_cleanup.make_check_sum()
|
||||
finish_cleanup.copy_iso_file_nightly_deb32()
|
||||
finish_cleanup.kill_old_iso()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: ISO is ready for usage.")
|
||||
print('=' * term_size.columns)
|
||||
|
||||
|
||||
def build_deb_arm(self):
|
||||
""" Builds the arm ISO GNOME FlashBack"""
|
||||
current_working_directory = os.getcwd()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Building a Debian based arm bit ISO")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
# Set the config tree
|
||||
lbsetup = conf.lbset_debarm
|
||||
os.system(lbsetup)
|
||||
print("Config tree ready!")
|
||||
# Start with the GNOME FlashBack stuff
|
||||
cmd_list_arm = collections.deque(conf.buildarm_gfb_build)
|
||||
list_size_arm = len(cmd_list_arm)
|
||||
for _ in range(list_size_arm):
|
||||
i = cmd_list_arm.popleft()
|
||||
execute = i + '()'
|
||||
exec(execute)
|
||||
# Run the specific classes
|
||||
infra.ChrootFolders("deb", "_arm")
|
||||
infra.BinaryFolders("deb", "_arm")
|
||||
infra.ArchitectureFiles("deb", "_arm")
|
||||
# Run the Build
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Configs in place start the ISO build process")
|
||||
print("INFO: Start Live-Build Process")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('.' * term_size.columns)
|
||||
lbsetup = conf.lbset_debarm
|
||||
os.system(lbsetup)
|
||||
run_cmd = 'sudo lb build'
|
||||
current_working_directory = os.getcwd()
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
os.system(run_cmd)
|
||||
print("INFO: ISO build has completed successfully")
|
||||
print('.' * term_size.columns)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
finish_cleanup.make_check_sum()
|
||||
finish_cleanup.copy_iso_file_nightly_debarm()
|
||||
finish_cleanup.kill_old_iso()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: ISO is ready for usage.")
|
||||
print('=' * term_size.columns)
|
||||
|
||||
|
||||
def debian_build(self):
|
||||
"""
|
||||
Used to build the Debian base GNOME FlashBack ISO
|
||||
"""
|
||||
if self.sarch == '_64':
|
||||
self.build_deb_64()
|
||||
elif self.sarch == '_32':
|
||||
self.build_deb_32()
|
||||
elif self.sarch == '_arm':
|
||||
self.build_deb_arm()
|
||||
else:
|
||||
print("WARNING: No active build specified")
|
||||
|
||||
|
||||
def build_dev_64(self):
|
||||
""" Builds the 64bit ISO GNOME FlashBack"""
|
||||
current_working_directory = os.getcwd()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Building a devuan based 64 bit ISO")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
# Set the config tree
|
||||
lbsetup = conf.lbset_dev64
|
||||
os.system(lbsetup)
|
||||
print("Config tree ready!")
|
||||
# Start with the GNOME FlashBack stuff
|
||||
cmd_list_64 = collections.deque(conf.build64_gfb_build)
|
||||
list_size_64 = len(cmd_list_64)
|
||||
for _ in range(list_size_64):
|
||||
i = cmd_list_64.popleft()
|
||||
execute = i + '()'
|
||||
exec(execute)
|
||||
# Run the specific classes
|
||||
infra.ChrootFolders("dev", "_64")
|
||||
infra.BinaryFolders("dev", "_64")
|
||||
infra.ArchitectureFiles("dev", "_64")
|
||||
# Run the Build
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Configs in place start the ISO build process")
|
||||
print("INFO: Start Live-Build Process")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('.' * term_size.columns)
|
||||
lbsetup = conf.lbset_dev64
|
||||
os.system(lbsetup)
|
||||
run_cmd = 'sudo lb build'
|
||||
current_working_directory = os.getcwd()
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
os.system(run_cmd)
|
||||
print("INFO: ISO build has completed successfully")
|
||||
print('.' * term_size.columns)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
finish_cleanup.make_check_sum()
|
||||
finish_cleanup.copy_iso_file_nightly_dev64()
|
||||
finish_cleanup.kill_old_iso()
|
||||
#'finish_cleanup.copy_iso_file_prod_deb64',
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: ISO is ready for usage.")
|
||||
print('=' * term_size.columns)
|
||||
|
||||
|
||||
def build_dev_32(self):
|
||||
""" Builds the 32bit ISO GNOME FlashBack"""
|
||||
current_working_directory = os.getcwd()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Building a devuan based 32 bit ISO")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
# Set the config tree
|
||||
lbsetup = conf.lbset_dev32
|
||||
os.system(lbsetup)
|
||||
print("Config tree ready!")
|
||||
# Start with the GNOME FlashBack stuff
|
||||
cmd_list_32 = collections.deque(conf.build32_gfb_build)
|
||||
list_size_32 = len(cmd_list_32)
|
||||
for _ in range(list_size_32):
|
||||
i = cmd_list_32.popleft()
|
||||
execute = i + '()'
|
||||
exec(execute)
|
||||
# Run the specific classes
|
||||
infra.ChrootFolders("dev", "_32")
|
||||
infra.BinaryFolders("dev", "_32")
|
||||
infra.ArchitectureFiles("dev", "_32")
|
||||
# Run the Build
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Configs in place start the ISO build process")
|
||||
print("INFO: Start Live-Build Process")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('.' * term_size.columns)
|
||||
lbsetup = conf.lbset_dev32
|
||||
os.system(lbsetup)
|
||||
run_cmd = 'sudo lb build'
|
||||
current_working_directory = os.getcwd()
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
os.system(run_cmd)
|
||||
print("INFO: ISO build has completed successfully")
|
||||
print('.' * term_size.columns)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
finish_cleanup.make_check_sum()
|
||||
finish_cleanup.copy_iso_file_nightly_dev32()
|
||||
finish_cleanup.kill_old_iso()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: ISO is ready for usage.")
|
||||
print('=' * term_size.columns)
|
||||
|
||||
|
||||
def build_dev_arm(self):
|
||||
""" Builds the arm ISO GNOME FlashBack"""
|
||||
current_working_directory = os.getcwd()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Building a devuan based arm bit ISO")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
# Set the config tree
|
||||
lbsetup = conf.lbset_devarm
|
||||
os.system(lbsetup)
|
||||
print("Config tree ready!")
|
||||
# Start with the GNOME FlashBack stuff
|
||||
cmd_list_arm = collections.deque(conf.buildarm_gfb_build)
|
||||
list_size_arm = len(cmd_list_arm)
|
||||
for _ in range(list_size_arm):
|
||||
i = cmd_list_arm.popleft()
|
||||
execute = i + '()'
|
||||
exec(execute)
|
||||
# Run the specific classes
|
||||
infra.ChrootFolders("dev", "_arm")
|
||||
infra.BinaryFolders("dev", "_arm")
|
||||
infra.ArchitectureFiles("dev", "_arm")
|
||||
# Run the Build
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: Configs in place start the ISO build process")
|
||||
print("INFO: Start Live-Build Process")
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('.' * term_size.columns)
|
||||
lbsetup = conf.lbset_devarm
|
||||
os.system(lbsetup)
|
||||
run_cmd = 'sudo lb build'
|
||||
current_working_directory = os.getcwd()
|
||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
os.system(run_cmd)
|
||||
print("INFO: ISO build has completed successfully")
|
||||
print('.' * term_size.columns)
|
||||
print("INFO: Current working directory" +
|
||||
current_working_directory
|
||||
)
|
||||
print('=' * term_size.columns)
|
||||
finish_cleanup.make_check_sum()
|
||||
finish_cleanup.copy_iso_file_nightly_devarm()
|
||||
finish_cleanup.kill_old_iso()
|
||||
print('=' * term_size.columns)
|
||||
print("INFO: ISO is ready for usage.")
|
||||
print('=' * term_size.columns)
|
||||
|
||||
|
||||
def devuan_build(self):
|
||||
"""
|
||||
Used to build the devuan base GNOME FlashBack ISO
|
||||
"""
|
||||
if self.sarch == '_64':
|
||||
self.build_dev_64()
|
||||
elif self.sarch == '_32':
|
||||
self.build_dev_32()
|
||||
elif self.sarch == '_arm':
|
||||
self.build_dev_arm()
|
||||
else:
|
||||
print("WARNING: No active build specified")
|
||||
|
||||
|
||||
def readybuild():
|
||||
"""" Make Ready the bld structure If fusato exists remove it.
|
||||
and recreate it, otherwise just make a new folder named
|
||||
|
@ -477,22 +854,22 @@ class Decsions:
|
|||
if self.arguments.e == 'e-gnomefb':
|
||||
if self.arguments.b == 'b-deb64':
|
||||
readybuild()
|
||||
print('run gnomefb builds deb64')
|
||||
BuildGflashback("deb", "_64")
|
||||
elif self.arguments.b == 'b-deb32':
|
||||
readybuild()
|
||||
print('run gnomefb builds deb32')
|
||||
BuildGflashback("deb", "_32")
|
||||
elif self.arguments.b == 'b-dev64':
|
||||
readybuild()
|
||||
print('run gnomefb builds dev64')
|
||||
BuildGflashback("deb", "_arm")
|
||||
elif self.arguments.b == 'b-dev32':
|
||||
readybuild()
|
||||
print('run gnomefb builds dev32')
|
||||
BuildGflashback("dev", "_64")
|
||||
elif self.arguments.b == 'b-debarm':
|
||||
readybuild()
|
||||
print('run gnomefb builds debarm')
|
||||
BuildGflashback("dev", "_32")
|
||||
elif self.arguments.b == 'b-devarm':
|
||||
readybuild()
|
||||
print('run gnomefb builds devarm')
|
||||
BuildGflashback("dev", "_arm")
|
||||
else:
|
||||
print('You have not specified a valid '
|
||||
'build architecture!!')
|
||||
|
|
|
@ -28,6 +28,10 @@ setup_xfce_cmds = ('inflate_bubble.set_xfce',
|
|||
'infra.xfce_configs'
|
||||
)
|
||||
|
||||
setup_gfb_cmds = ('inflate_bubble.set_gfb',
|
||||
'infra.gnome_flahsbak_configs'
|
||||
)
|
||||
|
||||
|
||||
# Setup grub chroot
|
||||
setup_chroot_grub_64 = ('inflate_bubble.set_chroot_grub_64',)
|
||||
|
@ -61,6 +65,21 @@ buildarm_xfce_build = (shared_setup_cmds + setup_xfce_cmds +
|
|||
setup_fw_arm
|
||||
)
|
||||
|
||||
build64_gfb_build = (shared_setup_cmds + setup_gfb_cmds +
|
||||
setup_chroot_grub_64 + setup_binary_grub_64 +
|
||||
setup_fw_64_32
|
||||
)
|
||||
|
||||
build32_gfb_build = (shared_setup_cmds + setup_gfb_cmds +
|
||||
setup_chroot_grub_32 + setup_binary_grub_32 +
|
||||
setup_fw_64_32
|
||||
)
|
||||
|
||||
buildarm_gfb_build = (shared_setup_cmds + setup_gfb_cmds +
|
||||
setup_chroot_grub_arm + setup_binary_grub_arm +
|
||||
setup_fw_arm
|
||||
)
|
||||
|
||||
|
||||
### Inflate bubble section
|
||||
|
||||
|
|
|
@ -101,6 +101,12 @@ def set_xfce():
|
|||
encoding='UTF-8') as xfce_file:
|
||||
xfce_file.write(conf.xfce_list)
|
||||
|
||||
def set_gfb():
|
||||
""" Create the list for the xfce xfce list"""
|
||||
with open(HOME_FOLDER + PACKAGE_LIST + 'gfb.list.chroot', 'x',
|
||||
encoding='UTF-8') as gfb_file:
|
||||
xfce_file.write(conf.gfb_list)
|
||||
|
||||
|
||||
# CHROOT Specific
|
||||
def set_chroot_grub_64():
|
||||
|
|
Loading…
Reference in New Issue