diff --git a/iso_configs/calamares_settings/deb_64/calamares/modules/fstab.conf b/iso_configs/calamares_settings/deb_64/calamares/modules/fstab.conf deleted file mode 100644 index 8da60df0..00000000 --- a/iso_configs/calamares_settings/deb_64/calamares/modules/fstab.conf +++ /dev/null @@ -1,27 +0,0 @@ -# SPDX-FileCopyrightText: no -# SPDX-License-Identifier: CC0-1.0 -# -# Configure fstab options -# ---- -mountOptions: - default: defaults,noatime,nodiscard - btrfs: defaults,noatime,noautodefrag,nodiscard - btrfs_swap: defaults - swap: defaults - -crypttabOptions: luks,keyscript=/bin/cat - -efiMountOptions: umask=0077 - -ssdExtraMountOptions: - btrfs: ssd - -tmpOptions: - default: - tmpfs: false - options: "" - ssd: - tmpfs: true - options: "defaults,noatime,mode=1777" - diff --git a/iso_configs/calamares_settings/deb_64/calamares/modules/locale.conf b/iso_configs/calamares_settings/deb_64/calamares/modules/locale.conf deleted file mode 100644 index f5e9096b..00000000 --- a/iso_configs/calamares_settings/deb_64/calamares/modules/locale.conf +++ /dev/null @@ -1,6 +0,0 @@ -localeGenPath: "/etc/locale.gen" -geoip: - style: "json" - url: "https://ipapi.co/json" - selector: "timezone" - diff --git a/iso_configs/calamares_settings/deb_64/calamares/modules/mount.conf b/iso_configs/calamares_settings/deb_64/calamares/modules/mount.conf deleted file mode 100644 index 5bc886d2..00000000 --- a/iso_configs/calamares_settings/deb_64/calamares/modules/mount.conf +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: no -# SPDX-License-Identifier: CC0-1.0 -# -# Mount filesystems in the target (generally, before treating the -# target as a usable chroot / "live" system). ---- - -extraMounts: - - device: proc - fs: proc - mountPoint: /proc - - device: sys - fs: sysfs - mountPoint: /sys - - device: /dev - mountPoint: /dev - options: bind - - device: tmpfs - fs: tmpfs - mountPoint: /run - - device: /run/udev - mountPoint: /run/udev - options: bind - -extraMountsEfi: - - device: efivarfs - fs: efivarfs - mountPoint: /sys/firmware/efi/efivars - -btrfsSubvolumes: - - mountPoint: / - subvolume: /@ - - mountPoint: /home - subvolume: /@home - - mountPoint: /var/cache - subvolume: /@cache - - mountPoint: /var/log - subvolume: /@log diff --git a/iso_configs/calamares_settings/deb_64/calamares/modules/netinstall-packages.yaml b/iso_configs/calamares_settings/deb_64/calamares/modules/netinstall-packages.yaml deleted file mode 100644 index 3eeaef26..00000000 --- a/iso_configs/calamares_settings/deb_64/calamares/modules/netinstall-packages.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Auto generated descriptions from netinstall-packages -- name: " Select your init systems " - description: "Choose an init system" - critical: false - selected: false - hidden: false - expanded: true - subgroups: - - name: " sysvinit-core" - description: " System-V-like init" - packages: - - sysvinit-core - - name: " runit-init" - description: " system-wide service supervision (as init system)" - packages: - - runit-init - - name: " openrc" - description: " dependency based service manager (runlevel change mechanism)" - packages: - - openrc diff --git a/iso_configs/calamares_settings/deb_64/calamares/modules/packages.conf b/iso_configs/calamares_settings/deb_64/calamares/modules/packages.conf deleted file mode 100644 index d41c24d9..00000000 --- a/iso_configs/calamares_settings/deb_64/calamares/modules/packages.conf +++ /dev/null @@ -1,15 +0,0 @@ -backend: apt - -operations: - - remove: - - 'live-boot' - - 'live-boot-doc' - - 'live-config' - - 'live-config-doc' - - 'live-config-systemd' - - 'live-config-systemd' - - 'live-tools' - - 'live-task-localisation' - - 'live-task-recommended' - - 'calamares-settings-debian' - - 'calamares' diff --git a/iso_configs/calamares_settings/shared_structure/usr/bin/install-peppermint b/iso_configs/calamares_settings/shared_structure/usr/bin/install-peppermint deleted file mode 100755 index 272cb6ef..00000000 --- a/iso_configs/calamares_settings/shared_structure/usr/bin/install-peppermint +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -### -# Wrapper for running calamares on Peppermint live media -### - -# Stale file left behind by live-build that messes with partitioning -sudo mv /etc/fstab /etc/fstab.orig.calamares - -# Access control to run calamares as root for xwayland -#xhost +si:localuser:root -pkexec calamares -#pkexec calamares --debug | sudo tee /var/log/Calamares-Install.log -xhost -si:localuser:root - -# Restore stale fstab, for what it's worth -sudo mv /etc/fstab.orig.calamares /etc/fstab diff --git a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/bootloader-config/module.desc b/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/bootloader-config/module.desc deleted file mode 100644 index ace4c06f..00000000 --- a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/bootloader-config/module.desc +++ /dev/null @@ -1,6 +0,0 @@ ---- -type: "job" -name: "bootloader-config" -interface: "process" -command: "/usr/sbin/bootloader-config" -timeout: 600 diff --git a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/dpkg-unsafe-io-undo/module.desc b/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/dpkg-unsafe-io-undo/module.desc deleted file mode 100644 index 15f80f81..00000000 --- a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/dpkg-unsafe-io-undo/module.desc +++ /dev/null @@ -1,6 +0,0 @@ ---- -type: "job" -name: "dpkg-unsafe-io-undo" -interface: "process" -command: "/usr/sbin/dpkg-unsafe-io -u" -timeout: 600 diff --git a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/dpkg-unsafe-io/module.desc b/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/dpkg-unsafe-io/module.desc deleted file mode 100644 index aea96250..00000000 --- a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/dpkg-unsafe-io/module.desc +++ /dev/null @@ -1,6 +0,0 @@ ---- -type: "job" -name: "dpkg-unsafe-io" -interface: "process" -command: "/usr/sbin/dpkg-unsafe-io" -timeout: 600 diff --git a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/grub-defaults/module.desc b/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/grub-defaults/module.desc deleted file mode 100644 index 391d6a06..00000000 --- a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/grub-defaults/module.desc +++ /dev/null @@ -1,6 +0,0 @@ ---- -type: "job" -name: "grub-defaults" -interface: "process" -command: "/usr/sbin/grub-defaults" -timeout: 600 diff --git a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/sources-final/module.desc b/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/sources-final/module.desc deleted file mode 100644 index 4ff75eba..00000000 --- a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/sources-final/module.desc +++ /dev/null @@ -1,6 +0,0 @@ ---- -type: "job" -name: "sources-final" -interface: "process" -command: "/usr/sbin/sources-final" -timeout: 600 diff --git a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/sources-media-unmount/module.desc b/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/sources-media-unmount/module.desc deleted file mode 100644 index 0df415bc..00000000 --- a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/sources-media-unmount/module.desc +++ /dev/null @@ -1,6 +0,0 @@ ---- -type: "job" -name: "sources-media-unmount" -interface: "process" -command: "/usr/sbin/sources-media -u" -timeout: 600 diff --git a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/sources-media/module.desc b/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/sources-media/module.desc deleted file mode 100644 index 16432f13..00000000 --- a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/sources-media/module.desc +++ /dev/null @@ -1,6 +0,0 @@ ---- -type: "job" -name: "sources-media" -interface: "process" -command: "/usr/sbin/sources-media" -timeout: 600 diff --git a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/update-system/module.desc b/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/update-system/module.desc deleted file mode 100644 index 15b918dc..00000000 --- a/iso_configs/calamares_settings/shared_structure/usr/lib/calamares/modules/update-system/module.desc +++ /dev/null @@ -1,6 +0,0 @@ ---- -type: "job" -name: "update-system" -interface: "process" -command: "/usr/sbin/update-system" -timeout: 600 diff --git a/iso_configs/pylibraries/pepperpy/hooks.py b/iso_configs/pylibraries/pepperpy/hooks.py index c960ac86..0d3089c2 100644 --- a/iso_configs/pylibraries/pepperpy/hooks.py +++ b/iso_configs/pylibraries/pepperpy/hooks.py @@ -135,7 +135,7 @@ def setting_permissions(): os.system('chmod 755 /usr/share/applications/Welcome.desktop') os.system('chmod 755 /usr/share/applications/plank.desktop') os.system('chmod 755 /usr/share/applications/kumo.desktop') - os.system('chmod 755 /usr/share/applications/Install-peppermint.desktop') + os.system('chmod 755 /usr/share/applications/calamares-install-peppermint.desktop') # Executables os.system('chmod 755 /usr/local/bin/xDaily') os.system('chmod 755 /usr/local/bin/kumo') diff --git a/python_modules/build_iso.py b/python_modules/build_iso.py index 3e38fbba..d0fd5f74 100644 --- a/python_modules/build_iso.py +++ b/python_modules/build_iso.py @@ -69,10 +69,9 @@ class BuildBase: def infra_helper(self): """ Get the build infrastucture ready """ - infra_methods = [infra.ChrootFolders, infra.BinaryFolders, + infra_methods = [infra.BinaryFolders, infra.ChrootInstallerFiles, infra.ArchitectureFiles, infra.Archive, infra.InstallerFiles, infra.FusatoConfigs, - infra.ChrootInstallerFiles, ] for method in infra_methods: method(self.sbase, self.sarch) diff --git a/python_modules/conf.py b/python_modules/conf.py index 2afeb675..2e4650a4 100644 --- a/python_modules/conf.py +++ b/python_modules/conf.py @@ -326,6 +326,7 @@ LIGHT_DM_LIST = ('lightdm\n' GENERAL_SHARED_LIST = ('alsa-utils\n' 'bluez\n' 'calamares\n' + 'calamares-settings-debian\n' 'console-setup\n' 'cups\n' 'curl\n' diff --git a/python_modules/infra.py b/python_modules/infra.py index c0e2a96d..13613bc3 100644 --- a/python_modules/infra.py +++ b/python_modules/infra.py @@ -56,6 +56,7 @@ class Archive: ) logger.info(MSG_FIN + HOME_FOLDER + FUSATOCONFIG + des) +<<<<<<< HEAD class ChrootFolders: """ @@ -99,6 +100,8 @@ class ChrootFolders: logger.info(MSG_FIN + HOME_FOLDER + WPCHROOT + des) +======= +>>>>>>> 412189ca0d7eb516b872e742cc7dc32a18ba7545 class ChrootInstallerFiles: """ Copies all installer folders to CHROOT depending on the base. @@ -302,25 +305,35 @@ def mini_shared_installer_files(): src_paths = ('/installer/keyrings/', '/installer/applications/', - '/database/', + #'/database/', '/PepProPixMaps/', '/pmostools/', '/PepProTools/', '/polkit/', '/issue/', - '/pylibraries/', + '/pylibraries/requests/', + '/pylibraries/tendo/', + '/pylibraries/tendo-0.3.0.dist-info/', + '/pylibraries/ttkbootstrap/', + '/pylibraries/ttkbootstrap-1.10.1.dist-info/', + '/pylibraries/ttkcreator/', '/lightdm/', '/autostart' ) des_paths =('/preseed/keyrings/', '/preseed/apps/', - '/preseed/database/', + #'/preseed/database/', '/preseed/pixmaps/', '/preseed/tools/', '/preseed/protools/', '/preseed/polkit/', '/preseed/conf/', - '/preseed/py/', + '/preseed/py/requests/', + '/preseed/py/tendo/', + '/preseed/py/tendo-0.3.0.dist-info/', + '/preseed/py/ttkbootstrap/', + '/preseed/py/ttkbootstrap-1.10.1.dist-info/', + '/preseed/py/ttkcreator/', '/preseed/lightdm/', '/preseed/autostart/' ) @@ -344,53 +357,57 @@ def mini_shared_installer_files(): class ArchitectureFiles: """ - Copy all the needed files to CHROOT Depending on the - architecture it will, copy files as needed + Copy all the needed files and folders to CHROOT. Depending on the + architecture, it will copy files and folders as needed. """ - def __init__(self, sbase, sarch): + def __init__(self, sbase, sarch, force_copy=False): + self.force_copy = force_copy logger.info("Copy Architecture") - self.sbase = sbase self.sarch = sarch - calamares_path = '/calamares_settings/' sources_path = '/sources/' - src_paths = (#calamares_path + self.sbase + self.sarch + # All of the calamares files are copied in the ChrootInstallerFiles class maybe this shold be deleted - #'/calamares/settings.conf', - #calamares_path + self.sbase + self.sarch + - #'/install-peppermint', - #calamares_path + self.sbase + self.sarch + - #'/sources-final', - #calamares_path + self.sbase + self.sarch + - #'/bootloader-config', - #calamares_path + - #'adddesktopicon/add-calamares-desktop-icon', - sources_path + self.sbase + self.sarch + + src_paths = (sources_path + self.sbase + self.sarch + '/sources.list', - '/id_files/pep_id' - ) - des_paths = (#'/etc/calamares/settings.conf', - #'/usr/bin/install-peppermint', - #'/usr/sbin/sources-final', - #'/usr/sbin/bootloader-config', - #'/usr/bin/add-calamares-desktop-icon', - '/opt/pepconf/sources.list', - '/usr/share/peppermint/pep_id' - ) - # copy files to thier CHROOT Location + '/id_files/pep_id', + '/osrelease/' + self.sbase + self.sarch, + '/osrelease/' + self.sbase + self.sarch, + '/grub/'+ self.sbase + self.sarch, + '/grub/' + self.sbase + '_themes' + ) + des_paths = ('/opt/pepconf/sources.list', + '/usr/share/peppermint/pep_id', + '/usr/lib', + '/opt/pepconf', + '/boot/grub', + '/boot/grub/themes' + ) + + # copy files and folders to their CHROOT Location src_q = collections.deque(src_paths) des_q = collections.deque(des_paths) 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.copy(HOME_FOLDER + source, - HOME_FOLDER + WPCHROOT + des - ) - logger.info(MSG_FIN + HOME_FOLDER + WPCHROOT + des) + src_path = HOME_FOLDER + source + des_path = HOME_FOLDER + WPCHROOT + des + if os.path.exists(des_path) and not self.force_copy: + logger.info(f"Skipping {src_path} as it already exists at {des_path}") + continue + + logger.info(f"Copying {src_path} to {des_path}") + try: + if os.path.isdir(src_path): + shutil.copytree(src_path, des_path, ignore_dangling_symlinks=True) + else: + shutil.copy2(src_path, des_path) + except Exception as e: + logger.error(f"Error copying {src_path} to {des_path}: {e}") + else: + logger.info(f"Successfully copied {src_path} to {des_path}") def set_symlinks(): """ @@ -435,8 +452,7 @@ def shared_folders(): '/face', '/pmostools', '/autostart', - '/pylibraries', - '/calamares_settings/branding' + '/pylibraries' ) des_paths =('/usr/share/plymouth/themes/joy', '/usr/share/applications', @@ -452,8 +468,7 @@ def shared_folders(): '/etc/skel/', '/etc/skel/.local/share/pmostools', '/etc/skel/.config/autostart', - '/usr/lib/python3/dist-packages', - '/etc/calamares/branding' + '/usr/lib/python3/dist-packages' ) src_q = collections.deque(src_paths) des_q = collections.deque(des_paths)