2023-08-24 06:16:56 +00:00
|
|
|
"""
|
|
|
|
* Author: "PeppermintOS Team(peppermintosteam@proton.me)
|
|
|
|
*
|
|
|
|
* License: SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
*
|
2023-08-30 03:16:57 +00:00
|
|
|
* Build the ISOs for the the system
|
2023-08-24 06:16:56 +00:00
|
|
|
"""
|
|
|
|
import os
|
|
|
|
from pathlib import Path
|
|
|
|
import argparse
|
|
|
|
import collections
|
2023-09-05 14:38:55 +00:00
|
|
|
import logging
|
2023-08-24 06:16:56 +00:00
|
|
|
import conf
|
|
|
|
import infra
|
2023-08-30 03:19:40 +00:00
|
|
|
import inflate_bubble
|
2023-08-30 03:49:56 +00:00
|
|
|
import finish_cleanup
|
2023-08-24 06:16:56 +00:00
|
|
|
|
|
|
|
# Set the home path used regardless the user logged in
|
|
|
|
BSTRING_ISO_CONFIGS = '~/bubbles/iso_configs'
|
|
|
|
HOME_FOLDER = str(Path(BSTRING_ISO_CONFIGS).expanduser())
|
|
|
|
FUSATO_ROOT = '/fusato'
|
|
|
|
WPCHROOT = '/fusato/config/includes.chroot'
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-09-23 15:19:18 +00:00
|
|
|
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set up the logging format
|
|
|
|
logger = logging.getLogger()
|
|
|
|
handler = logging.StreamHandler()
|
|
|
|
formatter = logging.Formatter(
|
|
|
|
'%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
|
|
|
|
handler.setFormatter(formatter)
|
|
|
|
logger.addHandler(handler)
|
|
|
|
logger.setLevel(logging.DEBUG)
|
|
|
|
|
|
|
|
# Common Logging Messages
|
|
|
|
CFG_TREE_READY = "Config tree ready!"
|
|
|
|
CFG_READY = "Configs in place start the ISO build process"
|
|
|
|
START_LIVEBUILD = "Start Live-Build Process"
|
|
|
|
BUILD_COMPLETED = "ISO build has completed successfully"
|
|
|
|
BUILD_COMPLETED = "ISO is ready for usage."
|
|
|
|
|
2023-08-24 06:16:56 +00:00
|
|
|
|
|
|
|
class BuildXfce:
|
|
|
|
"""
|
|
|
|
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
|
2023-09-23 15:19:18 +00:00
|
|
|
if sbase == "deb":
|
2023-08-27 07:17:45 +00:00
|
|
|
# Run the Debian Build
|
2023-08-24 06:16:56 +00:00
|
|
|
self.debian_build()
|
2023-09-23 15:19:18 +00:00
|
|
|
elif sbase == "dev":
|
2023-08-24 06:16:56 +00:00
|
|
|
self.devuan_build()
|
|
|
|
else:
|
|
|
|
print("No base has been found")
|
|
|
|
|
2023-08-30 03:16:57 +00:00
|
|
|
|
|
|
|
def build_deb_64(self):
|
|
|
|
""" Builds the 64bit ISO XFCE"""
|
2023-08-27 10:50:33 +00:00
|
|
|
current_working_directory = os.getcwd()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
|
|
|
logger.info("Building a Debian based 64 bit ISO")
|
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEB64
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Start with the XFCE stuff
|
|
|
|
cmd_list_64 = collections.deque(conf.build64_xfce_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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("deb", "_64")
|
|
|
|
infra.BinaryFolders("deb", "_64")
|
|
|
|
infra.ArchitectureFiles("deb", "_64")
|
2023-09-24 11:18:44 +00:00
|
|
|
infra.Archive("deb", "_64")
|
2023-08-30 03:16:57 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEB64
|
2023-08-27 10:51:47 +00:00
|
|
|
os.system(lbsetup)
|
2023-08-27 07:44:11 +00:00
|
|
|
run_cmd = 'sudo lb build'
|
2023-08-25 04:36:45 +00:00
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_xfce("deb", "64")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_debian_xfce_based()
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 03:16:57 +00:00
|
|
|
|
|
|
|
def build_deb_32(self):
|
|
|
|
""" Builds the 32bit ISO XFCE"""
|
|
|
|
current_working_directory = os.getcwd()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
|
|
|
logger.info("Building a Debian based 32 bit ISO")
|
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEB32
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Start with the XFCE stuff
|
|
|
|
cmd_list_32 = collections.deque(conf.build32_xfce_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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("deb", "_32")
|
|
|
|
infra.BinaryFolders("deb", "_32")
|
|
|
|
infra.ArchitectureFiles("deb", "_32")
|
|
|
|
infra.Archive("deb", "_32")
|
2023-08-30 03:16:57 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEB32
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_xfce("deb", "32")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_debian_xfce_based()
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 03:16:57 +00:00
|
|
|
|
2023-09-23 15:19:18 +00:00
|
|
|
|
2023-08-30 03:16:57 +00:00
|
|
|
def build_deb_arm(self):
|
|
|
|
""" Builds the arm ISO XFCE"""
|
|
|
|
current_working_directory = os.getcwd()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
|
|
|
logger.info("Building a Debian based arm bit ISO")
|
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEBARM
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Start with the XFCE stuff
|
|
|
|
cmd_list_arm = collections.deque(conf.buildarm_xfce_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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("deb", "_arm")
|
|
|
|
infra.BinaryFolders("deb", "_arm")
|
|
|
|
infra.ArchitectureFiles("deb", "_arm")
|
2023-09-24 11:18:44 +00:00
|
|
|
infra.Archive("deb", "_arm")
|
2023-08-30 03:16:57 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEBARM
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_xfce("deb", "arm")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-27 07:44:11 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_debian_xfce_based()
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 03:16:57 +00:00
|
|
|
|
2023-08-24 06:16:56 +00:00
|
|
|
def debian_build(self):
|
|
|
|
"""
|
|
|
|
Used to build the Debian base XFCE ISO
|
|
|
|
"""
|
2023-09-23 15:19:18 +00:00
|
|
|
if self.sarch == '_64':
|
2023-08-30 03:16:57 +00:00
|
|
|
self.build_deb_64()
|
2023-09-23 15:19:18 +00:00
|
|
|
elif self.sarch == '_32':
|
2023-08-30 03:16:57 +00:00
|
|
|
self.build_deb_32()
|
2023-09-23 15:19:18 +00:00
|
|
|
elif self.sarch == '_arm':
|
2023-08-30 03:16:57 +00:00
|
|
|
self.build_deb_arm()
|
2023-08-24 06:16:56 +00:00
|
|
|
else:
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.warning("No active build specified!")
|
2023-08-24 06:16:56 +00:00
|
|
|
|
2023-08-30 03:16:57 +00:00
|
|
|
|
|
|
|
def build_dev_64(self):
|
|
|
|
""" Builds the 64bit ISO XFCE"""
|
|
|
|
current_working_directory = os.getcwd()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
|
|
|
logger.info("Building a devuan based 64 bit ISO")
|
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEV64
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Start with the XFCE stuff
|
|
|
|
cmd_list_64 = collections.deque(conf.build64_xfce_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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("dev", "_64")
|
|
|
|
infra.BinaryFolders("dev", "_64")
|
|
|
|
infra.ArchitectureFiles("dev", "_64")
|
2023-09-24 11:18:44 +00:00
|
|
|
infra.Archive("dev", "_64")
|
2023-08-30 03:16:57 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEV64
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_xfce("dev","64")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_devuan_xfce_based()
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
|
|
|
#'finish_cleanup.copy_iso_file_prod_deb64',
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 03:16:57 +00:00
|
|
|
|
2023-09-23 15:19:18 +00:00
|
|
|
|
2023-08-30 03:16:57 +00:00
|
|
|
def build_dev_32(self):
|
|
|
|
""" Builds the 32bit ISO XFCE"""
|
|
|
|
current_working_directory = os.getcwd()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
|
|
|
logger.info("Building a devuan based 32 bit ISO")
|
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEV32
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Start with the XFCE stuff
|
|
|
|
cmd_list_32 = collections.deque(conf.build32_xfce_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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("dev", "_32")
|
|
|
|
infra.BinaryFolders("dev", "_32")
|
|
|
|
infra.ArchitectureFiles("dev", "_32")
|
2023-09-24 11:18:44 +00:00
|
|
|
infra.Archive("dev", "_32")
|
2023-08-30 03:16:57 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEV32
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_xfce("dev","32")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_devuan_xfce_based()
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
2023-09-05 14:38:55 +00:00
|
|
|
#'finish_cleanup.copy_iso_file_prod_deb32',
|
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 03:16:57 +00:00
|
|
|
|
|
|
|
def build_dev_arm(self):
|
|
|
|
""" Builds the arm ISO XFCE"""
|
|
|
|
current_working_directory = os.getcwd()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
2023-08-30 03:16:57 +00:00
|
|
|
print("INFO: Building a devuan based arm bit ISO")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEVARM
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 03:16:57 +00:00
|
|
|
# Start with the XFCE stuff
|
|
|
|
cmd_list_arm = collections.deque(conf.buildarm_xfce_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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("dev", "_arm")
|
|
|
|
infra.BinaryFolders("dev", "_arm")
|
|
|
|
infra.ArchitectureFiles("dev", "_arm")
|
2023-09-24 11:18:44 +00:00
|
|
|
infra.Archive("dev", "_arm")
|
2023-08-30 03:16:57 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEVARM
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_xfce("dev","arm")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 03:16:57 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_devuan_xfce_based()
|
2023-08-30 04:32:36 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 03:16:57 +00:00
|
|
|
|
2023-09-23 15:19:18 +00:00
|
|
|
|
2023-08-24 06:16:56 +00:00
|
|
|
def devuan_build(self):
|
|
|
|
"""
|
2023-08-29 07:01:12 +00:00
|
|
|
Used to build the devuan base XFCE ISO
|
2023-08-24 06:16:56 +00:00
|
|
|
"""
|
2023-09-23 15:19:18 +00:00
|
|
|
if self.sarch == '_64':
|
2023-08-30 03:16:57 +00:00
|
|
|
self.build_dev_64()
|
2023-09-23 15:19:18 +00:00
|
|
|
elif self.sarch == '_32':
|
2023-08-30 03:16:57 +00:00
|
|
|
self.build_dev_32()
|
2023-09-23 15:19:18 +00:00
|
|
|
elif self.sarch == '_arm':
|
2023-08-30 03:16:57 +00:00
|
|
|
self.build_dev_arm()
|
2023-08-29 07:01:12 +00:00
|
|
|
else:
|
|
|
|
print("WARNING: No active build specified")
|
2023-08-24 06:16:56 +00:00
|
|
|
|
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
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
|
2023-09-23 15:19:18 +00:00
|
|
|
if sbase == "deb":
|
2023-08-30 05:23:03 +00:00
|
|
|
# Run the Debian Build
|
|
|
|
self.debian_build()
|
2023-09-23 15:19:18 +00:00
|
|
|
elif sbase == "dev":
|
2023-08-30 05:23:03 +00:00
|
|
|
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()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
|
|
|
logger.info("Building a Debian based 64 bit ISO")
|
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEB64
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 05:23:03 +00:00
|
|
|
# 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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("deb", "_64")
|
|
|
|
infra.BinaryFolders("deb", "_64")
|
|
|
|
infra.ArchitectureFiles("deb", "_64")
|
|
|
|
infra.Archive("deb", "_64")
|
2023-08-30 05:23:03 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEB64
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_gnomeflashback("deb","64")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_debian_gfb_based()
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
|
2023-09-23 15:19:18 +00:00
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
def build_deb_32(self):
|
|
|
|
""" Builds the 32bit ISO GNOME FlashBack"""
|
|
|
|
current_working_directory = os.getcwd()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
2023-08-30 05:23:03 +00:00
|
|
|
print("INFO: Building a Debian based 32 bit ISO")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEB32
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 05:23:03 +00:00
|
|
|
# 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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("deb", "_32")
|
|
|
|
infra.BinaryFolders("deb", "_32")
|
|
|
|
infra.ArchitectureFiles("deb", "_32")
|
|
|
|
infra.Archive("deb", "_32")
|
2023-08-30 05:23:03 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEB32
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_gnomeflashback("deb","32")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_debian_gfb_based()
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
|
2023-09-23 15:19:18 +00:00
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
def build_deb_arm(self):
|
|
|
|
""" Builds the arm ISO GNOME FlashBack"""
|
|
|
|
current_working_directory = os.getcwd()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
2023-08-30 05:23:03 +00:00
|
|
|
print("INFO: Building a Debian based arm bit ISO")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEBARM
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 05:23:03 +00:00
|
|
|
# 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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("deb", "_arm")
|
|
|
|
infra.BinaryFolders("deb", "_arm")
|
|
|
|
infra.ArchitectureFiles("deb", "_arm")
|
|
|
|
infra.Archive("deb", "_arm")
|
2023-08-30 05:23:03 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEBARM
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_gnomeflashback("deb","arm")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_debian_gfb_based()
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
|
2023-09-23 15:19:18 +00:00
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
def debian_build(self):
|
|
|
|
"""
|
|
|
|
Used to build the Debian base GNOME FlashBack ISO
|
|
|
|
"""
|
2023-09-23 15:19:18 +00:00
|
|
|
if self.sarch == '_64':
|
2023-08-30 05:23:03 +00:00
|
|
|
self.build_deb_64()
|
2023-09-23 15:19:18 +00:00
|
|
|
elif self.sarch == '_32':
|
2023-08-30 05:23:03 +00:00
|
|
|
self.build_deb_32()
|
2023-09-23 15:19:18 +00:00
|
|
|
elif self.sarch == '_arm':
|
2023-08-30 05:23:03 +00:00
|
|
|
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()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
2023-08-30 05:23:03 +00:00
|
|
|
print("INFO: Building a devuan based 64 bit ISO")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEV64
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 05:23:03 +00:00
|
|
|
# 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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("dev", "_64")
|
|
|
|
infra.BinaryFolders("dev", "_64")
|
|
|
|
infra.ArchitectureFiles("dev", "_64")
|
|
|
|
infra.Archive("dev", "_64")
|
2023-08-30 05:23:03 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEV64
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_gnomeflashback("dev","64")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_devuan_gfb_based()
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
|
|
|
#'finish_cleanup.copy_iso_file_prod_deb64',
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
|
|
|
|
def build_dev_32(self):
|
|
|
|
""" Builds the 32bit ISO GNOME FlashBack"""
|
|
|
|
current_working_directory = os.getcwd()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
2023-08-30 05:23:03 +00:00
|
|
|
print("INFO: Building a devuan based 32 bit ISO")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEV32
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 05:23:03 +00:00
|
|
|
# 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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("dev", "_32")
|
|
|
|
infra.BinaryFolders("dev", "_32")
|
|
|
|
infra.ArchitectureFiles("dev", "_32")
|
|
|
|
infra.Archive("dev", "_32")
|
2023-08-30 05:23:03 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEV32
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_gnomeflashback("dev","32")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_devuan_gfb_based()
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
2023-09-05 14:38:55 +00:00
|
|
|
#'finish_cleanup.copy_iso_file_prod_deb32',
|
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
|
2023-09-23 15:19:18 +00:00
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
def build_dev_arm(self):
|
|
|
|
""" Builds the arm ISO GNOME FlashBack"""
|
|
|
|
current_working_directory = os.getcwd()
|
2023-09-05 14:38:55 +00:00
|
|
|
dir_current = "Current working directory" + current_working_directory
|
2023-08-30 05:23:03 +00:00
|
|
|
print("INFO: Building a devuan based arm bit ISO")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
# Set the config tree
|
2023-09-05 14:38:55 +00:00
|
|
|
lbsetup = conf.LBSET_DEVARM
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_TREE_READY)
|
2023-08-30 05:23:03 +00:00
|
|
|
# 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
|
2023-09-23 15:19:18 +00:00
|
|
|
infra.ChrootFolders("dev", "_arm")
|
|
|
|
infra.BinaryFolders("dev", "_arm")
|
|
|
|
infra.ArchitectureFiles("dev", "_arm")
|
|
|
|
infra.Archive("dev", "_arm")
|
2023-08-30 05:23:03 +00:00
|
|
|
# Run the Build
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(CFG_READY)
|
|
|
|
logger.info(START_LIVEBUILD)
|
|
|
|
logger.info(dir_current)
|
|
|
|
lbsetup = conf.LBSET_DEVARM
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(lbsetup)
|
|
|
|
run_cmd = 'sudo lb build'
|
|
|
|
current_working_directory = os.getcwd()
|
|
|
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
2023-09-05 14:38:55 +00:00
|
|
|
# Set the build inidcator
|
2023-09-23 15:19:18 +00:00
|
|
|
inflate_bubble.make_bld_gnomeflashback("dev", "arm")
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
os.system(run_cmd)
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info(BUILD_COMPLETED)
|
|
|
|
logger.info(dir_current)
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.make_check_sum()
|
2023-09-05 14:38:55 +00:00
|
|
|
finish_cleanup.copy_devuan_gfb_based()
|
2023-08-30 05:23:03 +00:00
|
|
|
finish_cleanup.kill_old_iso()
|
2023-09-05 14:38:55 +00:00
|
|
|
#'finish_cleanup.copy_iso_file_prod_DEBARM',
|
|
|
|
logger.info(BUILD_COMPLETED)
|
2023-09-11 11:54:37 +00:00
|
|
|
|
2023-08-30 05:23:03 +00:00
|
|
|
|
|
|
|
def devuan_build(self):
|
|
|
|
"""
|
|
|
|
Used to build the devuan base GNOME FlashBack ISO
|
|
|
|
"""
|
2023-09-23 15:19:18 +00:00
|
|
|
if self.sarch == '_64':
|
2023-08-30 05:23:03 +00:00
|
|
|
self.build_dev_64()
|
2023-09-23 15:19:18 +00:00
|
|
|
elif self.sarch == '_32':
|
2023-08-30 05:23:03 +00:00
|
|
|
self.build_dev_32()
|
2023-09-23 15:19:18 +00:00
|
|
|
elif self.sarch == '_arm':
|
2023-08-30 05:23:03 +00:00
|
|
|
self.build_dev_arm()
|
|
|
|
else:
|
|
|
|
print("WARNING: No active build specified")
|
|
|
|
|
|
|
|
|
2023-08-24 06:16:56 +00:00
|
|
|
def readybuild():
|
|
|
|
"""" Make Ready the bld structure If fusato exists remove it.
|
|
|
|
and recreate it, otherwise just make a new folder named
|
|
|
|
fusato.
|
|
|
|
"""
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.info("Making ready the fusato build directory")
|
2023-08-24 06:16:56 +00:00
|
|
|
os.chdir(HOME_FOLDER)
|
|
|
|
if os.path.exists('fusato'):
|
|
|
|
rm_cmd = "sudo rm -r -f fusato"
|
|
|
|
os.system(rm_cmd)
|
|
|
|
os.makedirs('fusato')
|
|
|
|
else:
|
|
|
|
os.makedirs('fusato')
|
|
|
|
|
|
|
|
|
|
|
|
class Decsions:
|
|
|
|
"""
|
|
|
|
Aguments used to tell the application what to build
|
|
|
|
"""
|
|
|
|
def __init__(self):
|
|
|
|
# Set up the terminal arguments
|
|
|
|
self.argument_parser = argparse.ArgumentParser()
|
|
|
|
self.argument_parser.add_argument("set",
|
|
|
|
help="set what build to start",
|
|
|
|
type=str
|
|
|
|
)
|
|
|
|
self.argument_parser.add_argument("e",
|
|
|
|
help="identify the desktop"
|
|
|
|
" environment for example"
|
|
|
|
" e-xfce",
|
|
|
|
type=str
|
|
|
|
)
|
|
|
|
self.argument_parser.add_argument("b",
|
|
|
|
help="identify the ISO to"
|
|
|
|
"build for example"
|
|
|
|
" b-deb64",
|
|
|
|
type=str
|
|
|
|
)
|
|
|
|
self.arguments = self.argument_parser.parse_args()
|
|
|
|
# Then determine what desktop build to look for
|
|
|
|
if self.arguments.e == 'e-gnomefb':
|
|
|
|
self.dgnomefb()
|
|
|
|
elif self.arguments.e == 'e-xfce':
|
|
|
|
self.dxfce()
|
|
|
|
elif self.arguments.e == 'e-openbox':
|
|
|
|
self.dopenbox()
|
|
|
|
|
|
|
|
def dxfce(self):
|
|
|
|
""" Arguments for the XFCE """
|
|
|
|
if self.arguments.e == 'e-xfce':
|
|
|
|
if self.arguments.b == 'b-deb64':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildXfce("deb", "_64")
|
2023-08-24 06:16:56 +00:00
|
|
|
elif self.arguments.b == 'b-deb32':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildXfce("deb", "_32")
|
2023-08-24 06:16:56 +00:00
|
|
|
elif self.arguments.b == 'b-dev64':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildXfce("dev", "_64")
|
2023-08-24 06:16:56 +00:00
|
|
|
elif self.arguments.b == 'b-dev32':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildXfce("dev", "_32")
|
2023-08-24 06:16:56 +00:00
|
|
|
elif self.arguments.b == 'b-debarm':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildXfce("deb", "_arm")
|
2023-08-24 06:16:56 +00:00
|
|
|
elif self.arguments.b == 'b-devarm':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildXfce("dev", "_arm")
|
2023-08-24 06:16:56 +00:00
|
|
|
else:
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.critical("You have not specified a build to process!")
|
2023-08-24 06:16:56 +00:00
|
|
|
|
|
|
|
def dgnomefb(self):
|
|
|
|
""" Arguments for the gnomefb """
|
|
|
|
if self.arguments.e == 'e-gnomefb':
|
|
|
|
if self.arguments.b == 'b-deb64':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildGflashback("deb", "_64")
|
2023-08-24 06:16:56 +00:00
|
|
|
elif self.arguments.b == 'b-deb32':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildGflashback("deb", "_32")
|
2023-09-09 13:54:32 +00:00
|
|
|
elif self.arguments.b == 'b-debarm':
|
2023-08-24 06:16:56 +00:00
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildGflashback("deb", "_arm")
|
2023-08-24 06:16:56 +00:00
|
|
|
elif self.arguments.b == 'b-dev32':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildGflashback("dev", "_32")
|
2023-09-09 13:54:32 +00:00
|
|
|
elif self.arguments.b == 'b-dev64':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildGflashback("dev", "_64")
|
2023-08-24 06:16:56 +00:00
|
|
|
elif self.arguments.b == 'b-devarm':
|
|
|
|
readybuild()
|
2023-09-23 15:19:18 +00:00
|
|
|
BuildGflashback("dev", "_arm")
|
2023-08-24 06:16:56 +00:00
|
|
|
else:
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.critical("You have not specified a build to process!")
|
2023-08-24 06:16:56 +00:00
|
|
|
|
|
|
|
def dopenbox(self):
|
|
|
|
""" Arguments for the openbox """
|
|
|
|
if self.arguments.e == 'e-openbox':
|
|
|
|
if self.arguments.b == 'b-deb64':
|
|
|
|
readybuild()
|
|
|
|
print('run openbox builds deb64')
|
|
|
|
elif self.arguments.b == 'b-deb32':
|
|
|
|
readybuild()
|
|
|
|
print('run openbox builds deb32')
|
|
|
|
elif self.arguments.b == 'b-dev64':
|
|
|
|
readybuild()
|
|
|
|
print('run openbox builds dev64')
|
|
|
|
elif self.arguments.b == 'b-dev32':
|
|
|
|
readybuild()
|
|
|
|
print('run openbox builds dev32')
|
|
|
|
elif self.arguments.b == 'b-debarm':
|
|
|
|
readybuild()
|
|
|
|
print('run openbox builds debarm')
|
|
|
|
elif self.arguments.b == 'b-devarm':
|
|
|
|
readybuild()
|
|
|
|
print('run openbox builds devarm')
|
|
|
|
else:
|
|
|
|
print('You have not specified a valid '
|
|
|
|
'build architecture!!')
|
|
|
|
else:
|
2023-09-05 14:38:55 +00:00
|
|
|
logger.critical("You have not specified a valid "
|
|
|
|
"desktop environment!!")
|
2023-08-24 06:16:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
Decsions()
|