update conf.py and infra.py to add Loaded xfce4 builds

This commit is contained in:
manuel 2024-03-11 12:57:59 -01:00
parent 8330713884
commit 4892156a29
3 changed files with 139 additions and 2 deletions

View File

@ -187,6 +187,34 @@ class BuildOpenbox(BuildBase):
execute = command + '()'
exec(execute)
return cmd_list
class BuildLoadedxfce(BuildBase):
""" This class will ensure the loaded xfce builds are built """
def __init__(self, sbase, sarch):
"""
init the building, super will
ensure that the method resolution order (MRO) is followed
correctly, allowing for a smooth inheritance hierarchy
"""
super().__init__(sbase, sarch, self.opb_helper)
def opb_helper(self):
"""
The helper functions to ensure the loaded xfce requirements are
used
"""
arch_suffix = self.sarch[1:]
cmd_list = None
if self.sbase in ["deb", "dev"]:
if arch_suffix in ["64"]:
os.system(f'touch {self.sbase.upper()}.{arch_suffix}opb')
if arch_suffix in ["64"]:
cmd_list = getattr(conf, f"build{arch_suffix}_loaded_xfce_build", [])
for command in cmd_list:
execute = command + '()'
exec(execute)
return cmd_list
def readybuild():
@ -225,6 +253,12 @@ class Decsions:
" b-deb64",
type=str
)
self.argument_parser.add_argument("b",
help="identify the ISO to"
"build for example"
" b-loadxfdeb",
type=str
)
self.arguments = self.argument_parser.parse_args()
# Then determine what desktop build to look for
desktop_build_function = getattr(self, f'd{self.arguments.e[2:]}', None)
@ -241,6 +275,8 @@ class Decsions:
'b-dev32': ("dev", "_32"),
'b-debarm': ("deb", "_arm"),
'b-devarm': ("dev", "_arm"),
'b-loadxfdeb': ("deb", "_64"),
'b-loadxfdev': ("dev", "_64"),
}
build_type_mapping_oem = {
'b-deb64o': ("debo", "_64"),
@ -302,6 +338,21 @@ class Decsions:
BuildOpenbox(*build_type_mapping[build_argument])
else:
logger.critical("You have not specified a build to process!")
def doloadedxfce(self):
""" Arguments for the loaded xfce """
build_type_mapping = {
'b-loadxfdeb': ("deb", "_64"),
'b-loadxfdev': ("dev", "_64"),
}
build_argument = self.arguments.b
if build_argument in build_type_mapping:
pass
readybuild()
BuildLoadedxfce(*build_type_mapping[build_argument])
else:
logger.critical("You have not specified a build to process!")
Decsions()

View File

@ -38,6 +38,9 @@ setup_gfb_cmds = ('inflate_bubble.set_gfb',
setup_opb_cmds = ('inflate_bubble.set_opb',
'infra.open_box_configs'
)
setup_loaded_xfce_cmds = ('inflate_bubble.set_loaded_xfce',
'infra.open_loaded_xfce_configs'
)
# Setup grub chroot
@ -103,8 +106,12 @@ buildarm_opb_build = (shared_setup_cmds + setup_opb_cmds +
setup_chroot_grub_arm + setup_binary_grub_arm +
setup_fw_arm
)
#Xfce_loaded
build_xfce64_loaded_build = (shared_setup_cmds + setup_loaded_cmds +
setup_chroot_grub_64 + setup_binary_grub_64 +
setup_fw_64_32
)
### Inflate bubble section
# Packages that are to be installed as needed per Desktop
@ -175,6 +182,66 @@ OPENBOX_LIST = ('openbox\n'
'qt5ct\n'
'jgmenu\n'
)
LOADED_XFCE_LIST = ('xfce4\n'
'xfce4-goodies\n'
'xorg\n'
'xserver-xorg\n'
'xserver-xorg-input-synaptics\n'
'xserver-xorg-input-all\n'
'xserver-xorg-video-vmware\n'
'xserver-xorg-video-all\n'
'apt-config-auto-update\n'
'package-update-indicator\n'
'gnome-packagekit\n'
'gvfs-backends\n'
'blueman\n'
'gufw\n'
'tela-icon-theme\n'
'system-config-printer\n'
'menulibre\n'
'xscreensaver\n'
'xscreensaver-data\n'
'xscreensaver-data-extra\n'
'xscreensaver-gl\n'
'xscreensaver-gl-extra\n'
'gnome-calculator\n'
'accountsservice\n'
'catfish\n'
'timeshift\n'
'gnome-software\n'
'gnome-software-plugin-flatpak\n'
'gnome-software-plugin-snap\n'
'bleachbit\n'
'gimp\n'
'gimp-data-extras\n'
'atril\n'
'transmission-gtk\n'
'thunderbird\n'
'thunderbird-l10n-all\n'
'firefox-esr\n'
'firefox-esr-l10n-all\n'
'libreoffice\n'
'libreoffice-gtk3\n'
'libreoffice-l10n*\n'
'printer-driver-cups-pdf\n'
'gnome-2048\n'
'gnome-chess\n'
'gnome-mahjongg\n'
'gnome-sudoku\n'
'guvcview\n'
'vlc \n'
'qt5-style-plugins\n'
'qt5ct\n'
'xfsdump\n'
'tumbler\n'
'tumbler-plugins-extra\n'
'ffmpegthumbnailer\n'
'baobab\n'
'xdg-user-dirs-gtk\n'
)
KDE_LIST = ('sample1\n'
'sample2\n'
)
@ -418,6 +485,7 @@ LBSET_PRIVATE_DEV64 = (' --image-name "PeppermintOS-Devuan-64"')
LBSET_PRIVATE_DEBARM = (' --image-name "PeppermintOS-Debian-ARM"')
LBSET_PRIVATE_DEVARM = (' --debootstrap-options "--merged-usr"'
' --image-name "PeppermintOS-Devuan-ARM"'
LBSET_PRIVATE_LOADED_DEB64 = (' --image-name "PeppermintOS-Loaded-Debian-64"')
)
# These are the correct order combined LB commands for the builds by ISO name
@ -440,3 +508,6 @@ LBSET_DEVarm =(LBSET_MAIN_SHARED + LBSET_SHARED_ARM + LBSET_DEVUAN_SHARED
LBSET_DEBarm =(LBSET_MAIN_SHARED + LBSET_SHARED_ARM + LBSET_DEBIAN_SHARED
+ LBSET_PRIVATE_DEBARM
)
LBSET_LOADED_DEB64 = (LBSET_MAIN_SHARED + LBSET_SHARED_64 + LBSET_DEBIAN_SHARED
+ LBSET_PRIVATE_LOADED_DEB64
)

View File

@ -472,6 +472,21 @@ def open_box_configs():
dirs_exist_ok = True
)
logger.info(MSG_FIN + HOME_FOLDER + WPCHROOT + des_ob)
def open_box_configs():
"""
Copy the openbox files
"""
logger.info("Copy loaded xfce configs")
src_ob = '/loaded-xfce'
des_ob = '/etc/skel/'
logger.info("INFO: Copying - " + HOME_FOLDER + src_ob)
shutil.copytree(HOME_FOLDER + src_ob,
HOME_FOLDER + WPCHROOT + des_ob,
dirs_exist_ok = True
)
logger.info(MSG_FIN + HOME_FOLDER + WPCHROOT + des_ob)