From 4892156a2903acd44ba5be3719dc6d171351e635 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 11 Mar 2024 12:57:59 -0100 Subject: [PATCH] update conf.py and infra.py to add Loaded xfce4 builds --- python_modules/build_iso.py | 51 +++++++++++++++++++++++++ python_modules/conf.py | 75 ++++++++++++++++++++++++++++++++++++- python_modules/infra.py | 15 ++++++++ 3 files changed, 139 insertions(+), 2 deletions(-) diff --git a/python_modules/build_iso.py b/python_modules/build_iso.py index 90569e2c..39b5a257 100644 --- a/python_modules/build_iso.py +++ b/python_modules/build_iso.py @@ -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() diff --git a/python_modules/conf.py b/python_modules/conf.py index 882f2073..aa31836f 100644 --- a/python_modules/conf.py +++ b/python_modules/conf.py @@ -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 + ) diff --git a/python_modules/infra.py b/python_modules/infra.py index e4b4e236..89af3b8f 100644 --- a/python_modules/infra.py +++ b/python_modules/infra.py @@ -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)