updated modules

This commit is contained in:
manuel 2024-05-12 00:17:42 +00:00
parent 41775f0ed1
commit 4e887fe69a
5 changed files with 31 additions and 25 deletions

View File

@ -254,18 +254,18 @@ class BuildMini(BuildBase):
ensure that the method resolution order (MRO) is followed
correctly, allowing for a smooth inheritance hierarchy
"""
super().__init__(sbase, sarch, self.server_helper)
super().__init__(sbase, sarch, self.mini_helper)
def server_helper(self):
def mini_helper(self):
"""
The helper functions to ensure the server requirements are
The helper functions to ensure the mini requirements are
used
"""
arch_suffix = self.sarch[1:]
cmd_list = None
if self.sbase in ["deb", "dev"]:
if arch_suffix in ["64", "32", "arm", "64srv", "64ld", "64min", "32min"]:
os.system(f'touch {self.sbase.upper()}.{arch_suffix}min')
os.system(f'touch {self.sbase.upper()}.{arch_suffix}mini')
if arch_suffix in ["64", "32", "arm", "64srv", "64ld", "64min", "32min"]:
cmd_list = getattr(conf, f"build{arch_suffix}_mini_build", [])
for command in cmd_list:
@ -423,7 +423,7 @@ class Decisions:
logger.critical("You have not specified a build to process!")
def dmini(self):
""" Arguments for the openbox """
""" Arguments for the Mini """
build_type_mapping = {
'b-deb64': ("deb", "_64min"),
'b-deb32': ("deb", "_32min"),

View File

@ -45,10 +45,9 @@ shared_setup_server_cmds = ('inflate_bubble.set_fusato_server_installer_structur
'infra.boostrap_shared'
)
shared_setup_mini_cmds = ('inflate_bubble.set_fusato_server_installer_structure',
'inflate_bubble.set_fusato_mini_installer_structure',
shared_setup_mini_cmds = ('inflate_bubble.set_fusato_mini_installer_structure',
'inflate_bubble.set_binary_shared',
'infra.mini_installer_folders'
'infra.mini_installer_files'
)
# Setup Desktop configs
@ -70,6 +69,8 @@ setup_server_cmds = ('inflate_bubble.set_server',
'infra.server_configs'
)
setup_mini_cmds = ('inflate_bubble.set_mini',
)
# Setup grub chroot
setup_chroot_grub_64 = ('inflate_bubble.set_chroot_grub_64',)
@ -137,22 +138,24 @@ buildarm_opb_build = (shared_setup_cmds + setup_opb_cmds +
)
#Xfce_loaded
build64ld_loaded_build = (shared_setup_loaded_cmds + setup_loaded_cmds +
build64_loaded_build = (shared_setup_loaded_cmds + setup_loaded_cmds +
setup_chroot_grub_64ld + setup_binary_grub_64 +
setup_fw_64_32
)
#Server
build64srv_server_build = (shared_setup_server_cmds + setup_server_cmds +
build64_server_build = (shared_setup_server_cmds + setup_server_cmds +
setup_chroot_grub_64srv + setup_binary_grub_64 +
setup_fw_64_32
)
#Mini
build64min_mini_build = (shared_setup_mini_cmds + setup_binary_grub_64
build64_mini_build = (shared_setup_mini_cmds + setup_mini_cmds +
setup_binary_grub_64 + setup_fw_64_32
)
build32min_mini_build = (shared_setup_mini_cmds + setup_binary_grub_32
build32_mini_build = (shared_setup_mini_cmds + setup_mini_cmds +
setup_binary_grub_32 + setup_fw_64_32
)
### Inflate bubble section

View File

@ -109,7 +109,7 @@ def check_build_type():
def kill_old_iso():
""" Delete older ISOs"""
base_path = BASE_DESTINATION
arch_list = ['/deb32/', '/deb64/', '/debarm/', '/dev32/', '/dev64/', '/devarm/', '/deb64srv/', '/dev64srv/', '/deb64ld/', '/dev64ld/', 'deb64min', 'deb32min', 'dev64min', 'dev32min']
arch_list = ['/deb32/', '/deb64/', '/debarm/', '/dev32/', '/dev64/', '/devarm/', '/deb64srv/', '/dev64srv/', '/deb64ld/', '/dev64ld/', '/deb64min/', '/deb32min/', '/dev64min/', '/dev32min/']
de_list = ['gfb', 'opb', 'xfce', 'loaded', 'server', 'mini']
for archs in arch_list:
for desktops in de_list:

View File

@ -106,7 +106,10 @@ def set_fusato_mini_installer_structure():
at the moment you deal with the installer
"""
# Define os diretórios a serem criados no includes-installer
installer_dirs = ['/preseed/repos/',
installer_dirs = ['/preseed',
'/usr/lib/finish-install.d/',
'/usr/share/'
'/preseed/repos/',
'/preseed/keyrings/',
'/preseed/grub/',
'/preseed/apps/',

View File

@ -172,7 +172,7 @@ class InstallerFiles:
'/installer/grub/'+ self.sbase + self.sarch,
'/installer/sources/'+ self.sbase + self.sarch,
'/installer/sources/'+ self.sbase + self.sarch,
'/osrelease/'+ self.sbase + self.sarch,
'/osrelease/'+ self.sbase + self.sarch
)
des_installer =('/',
'/usr/share/',
@ -180,9 +180,9 @@ class InstallerFiles:
'/preseed/grub/',
'/preseed/repos/',
'/preseed/conf/',
'/preseed/conf/',
'/preseed/conf/'
)
# installer FIles
# installer files
installer_src_q = collections.deque(src_installer)
installer_des_q = collections.deque(des_installer)
installer_size_q = len(installer_src_q)
@ -196,13 +196,13 @@ class InstallerFiles:
)
logger.info(MSG_FIN + HOME_FOLDER + WPINSTALLER + des)
def mini_installer_folders():
def mini_installer_files():
"""
This function will get the files that are shared commonly amongst
all server builds,
all mini builds,
"""
logger.info("Copy mini installer folders")
logger.info("Copy mini installer files")
src_paths = ('/installer/keyrings/',
'/installer/applications/',
@ -228,17 +228,17 @@ def mini_installer_folders():
'/preseed/lightdm/',
'/preseed/autostart/'
)
# copy files to thier INSTALLER Location
src_q = collections.deque(src_paths)
des_q = collections.deque(des_paths)
size_q = len(des_q)
size_q = len(src_q)
for size_length in range(size_q):
source = src_q.popleft()
des = des_q.popleft()
logger.info(MSG_COPY+ HOME_FOLDER + source)
shutil.copytree(HOME_FOLDER + source,
HOME_FOLDER + WPINSTALLER + des,
dirs_exist_ok = True
)
shutil.copy(HOME_FOLDER + source,
HOME_FOLDER + WPINSTALLER + des
)
logger.info(MSG_FIN + HOME_FOLDER + WPINSTALLER + des)