From 05255d68b7e0820b055f079f3d4950c8239218c1 Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 26 May 2023 01:43:29 +0000 Subject: [PATCH] add pepbld.py scripts --- PepDeb32/BldHelper.py | 2 +- PepDeb32/pepbld.py | 38 ++++++------- PepDeb32/pepbld.sh | 1 - PepDeb64/BldHelper.py | 2 +- PepDeb64/pepbld.py | 96 +++++++++++++++++++++++++++++++++ PepDeb_arm64/BldHelper.py | 2 +- PepDeb_arm64/pepbld.py | 96 +++++++++++++++++++++++++++++++++ PepDev32/pepbld.py | 109 ++++++++++++++++++++++++++++++++++++++ PepDev64/pepbld.py | 108 +++++++++++++++++++++++++++++++++++++ PepDev_arm64/pepbld.py | 109 ++++++++++++++++++++++++++++++++++++++ 10 files changed, 541 insertions(+), 22 deletions(-) create mode 100644 PepDeb64/pepbld.py create mode 100644 PepDeb_arm64/pepbld.py create mode 100644 PepDev32/pepbld.py create mode 100644 PepDev64/pepbld.py create mode 100644 PepDev_arm64/pepbld.py diff --git a/PepDeb32/BldHelper.py b/PepDeb32/BldHelper.py index 8d38f53..70cf304 100755 --- a/PepDeb32/BldHelper.py +++ b/PepDeb32/BldHelper.py @@ -24,7 +24,7 @@ WorkingDir = "/home/pepadmin/PepMini/PepDeb32" # Execute the ISO building script os.chdir(WorkingDir) -os.system("./pepbld.sh") +os.system("python3 pepbld.py") # Move and rename the ISO file os.chdir("fusato") diff --git a/PepDeb32/pepbld.py b/PepDeb32/pepbld.py index 0668bc1..97eb42a 100644 --- a/PepDeb32/pepbld.py +++ b/PepDeb32/pepbld.py @@ -5,6 +5,8 @@ import os import subprocess +import sys +import shutil # Set the working folder variable uchinanchu = os.getcwd() @@ -36,6 +38,7 @@ lb_command = [ "--debian-installer-gui", "true", "--parent-mirror-debian-installer", "http://repo.peppermintos.com/packages", "--iso-preparer", "PeppermintOS-https://peppermintos.com/", + "--uefi-secure-boot" "enable", "--iso-publisher", "Peppermint OS Team", "--iso-volume", "PeppermintOS", "--image-name", "PepOS-mini-iso", @@ -49,7 +52,6 @@ subprocess.run(lb_command + sys.argv[1:]) # Setup the installer structure os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), exist_ok=True) -os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "etc"), exist_ok=True) os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed"), exist_ok=True) os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos"), exist_ok=True) os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final"), exist_ok=True) @@ -68,28 +70,28 @@ os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", " os.makedirs(os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), exist_ok=True) shutil.copy(os.path.join(uchinanchu, "pepinstaller", "preseed", "preseed.cfg"), os.path.join(uchinanchu, "fusato", "config", "includes.installer")) -shutil.copytree(os.path.join(uchinanchu, "pephooks", "normal"), os.path.join(uchinanchu, "fusato", "config", "hooks", "normal")) -shutil.copytree(os.path.join(uchinanchu, "pepscripts"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d")) +shutil.copytree(os.path.join(uchinanchu, "pephooks", "normal"), os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepscripts"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), dirs_exist_ok=True) shutil.copy(os.path.join(uchinanchu, "pepsources", "multimedia.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) shutil.copy(os.path.join(uchinanchu, "pepsources", "peppermint.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final")) shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) -shutil.copytree(os.path.join(uchinanchu, "pepkeyrings"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings")) -shutil.copytree(os.path.join(uchinanchu, "polkit"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit")) -shutil.copytree(os.path.join(uchinanchu, "pepapplication"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps")) -shutil.copytree(os.path.join(uchinanchu, "pepdatabase"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database")) -shutil.copytree(os.path.join(uchinanchu, "PepProPixMaps"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps")) -shutil.copytree(os.path.join(uchinanchu, "pepconf"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf")) -shutil.copytree(os.path.join(uchinanchu, "PepProTools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools")) -shutil.copytree(os.path.join(uchinanchu, "peplightdm"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm")) +shutil.copytree(os.path.join(uchinanchu, "pepkeyrings"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "polkit"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepapplication"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepdatabase"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProPixMaps"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepconf"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProTools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peplightdm"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), dirs_exist_ok=True) # Copy recursive files and sub-directories -shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "debian", "boot"), os.path.join(uchinanchu, "fusato", "config", "includes.binary")) -shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "debian", "isolinux"), os.path.join(uchinanchu, "fusato", "config", "includes.binary")) -shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "graphics"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share")) -shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "themes"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share")) -shutil.copytree(os.path.join(uchinanchu, "pepgrub", "debian"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub")) -shutil.copytree(os.path.join(uchinanchu, "pylibraries"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py")) -shutil.copytree(os.path.join(uchinanchu, "pmostools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools")) +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "debian", "boot"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "debian", "isolinux"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "graphics"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "themes"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepgrub", "debian"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pylibraries"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pmostools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), dirs_exist_ok=True) subprocess.run("lb build", shell=True) diff --git a/PepDeb32/pepbld.sh b/PepDeb32/pepbld.sh index 62af7bc..0df7140 100755 --- a/PepDeb32/pepbld.sh +++ b/PepDeb32/pepbld.sh @@ -42,7 +42,6 @@ lb config noauto \ # Setup the installer structure mkdir -p $uchinanchu/fusato/config/includes.installer mkdir -p $uchinanchu/fusato/config/includes.installer/usr/lib/finish-install.d -mkdir -p $uchinanchu/fusato/config/includes.installer/etc mkdir -p $uchinanchu/fusato/config/includes.installer/preseed mkdir -p $uchinanchu/fusato/config/includes.installer/preseed/repos mkdir -p $uchinanchu/fusato/config/includes.installer/preseed/sources-final diff --git a/PepDeb64/BldHelper.py b/PepDeb64/BldHelper.py index 81def5d..c583598 100755 --- a/PepDeb64/BldHelper.py +++ b/PepDeb64/BldHelper.py @@ -24,7 +24,7 @@ WorkingDir = "/home/pepadmin/PepMini/PepDeb64" # Execute the ISO building script os.chdir(WorkingDir) -os.system("./pepbld.sh") +os.system("python3 pepbld.py") # Move and rename the ISO file os.chdir("fusato") diff --git a/PepDeb64/pepbld.py b/PepDeb64/pepbld.py new file mode 100644 index 0000000..491d5f8 --- /dev/null +++ b/PepDeb64/pepbld.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-3.0-or-later +# +# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me) + +import os +import subprocess +import sys +import shutil + +# Set the working folder variable +uchinanchu = os.getcwd() + +# Create the build folder, move into it removing stale mountpoints and files there. +if os.path.exists("fusato") and not os.path.isdir("fusato"): + os.remove("fusato") +elif not os.path.exists("fusato"): + os.makedirs("fusato") + +os.chdir("fusato") +subprocess.run("umount $(mount | grep '${PWD}/chroot' | tac | cut -f3 -d' ') 2>/dev/null", shell=True) +for i in os.listdir() + ['.build']: + if i == 'cache': + continue + else: + os.system("rm -rf " + i) + +# Defines Live Build settings +lb_command = [ + "lb", "config", "noauto", + "--binary-images", "iso-hybrid", + "--architectures", "amd64", + "--distribution", "bookworm", + "--archive-areas", "main contrib non-free non-free-firmware", + "--firmware-chroot", "false", + "--debian-installer", "netinst", + "--debian-installer-distribution", "bookworm", + "--debian-installer-gui", "true", + "--parent-mirror-debian-installer", "http://repo.peppermintos.com/packages", + "--iso-preparer", "PeppermintOS-https://peppermintos.com/", + "--iso-publisher", "Peppermint OS Team", + "--iso-volume", "PeppermintOS", + "--image-name", "PepOS-mini-iso", + "--checksums", "sha512", + "--zsync", "false", + "--win32-loader", "false", + "--debian-installer-preseedfile", "preseed.cfg" +] + +subprocess.run(lb_command + sys.argv[1:]) + +# Setup the installer structure +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), exist_ok=True) + +shutil.copy(os.path.join(uchinanchu, "pepinstaller", "preseed", "preseed.cfg"), os.path.join(uchinanchu, "fusato", "config", "includes.installer")) +shutil.copytree(os.path.join(uchinanchu, "pephooks", "normal"), os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepscripts"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), dirs_exist_ok=True) +shutil.copy(os.path.join(uchinanchu, "pepsources", "multimedia.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "peppermint.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copytree(os.path.join(uchinanchu, "pepkeyrings"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "polkit"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepapplication"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepdatabase"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProPixMaps"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepconf"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProTools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peplightdm"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), dirs_exist_ok=True) + +# Copy recursive files and sub-directories +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "debian", "boot"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "debian", "isolinux"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "graphics"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "themes"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepgrub", "debian"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pylibraries"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pmostools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), dirs_exist_ok=True) + +subprocess.run("lb build", shell=True) diff --git a/PepDeb_arm64/BldHelper.py b/PepDeb_arm64/BldHelper.py index cc529ad..9390310 100755 --- a/PepDeb_arm64/BldHelper.py +++ b/PepDeb_arm64/BldHelper.py @@ -24,7 +24,7 @@ WorkingDir = "/home/pepadmin/PepMini/PepDeb_arm64" # Execute the ISO building script os.chdir(WorkingDir) -os.system("./pepbld.sh") +os.system("python3 pepbld.py") # Move and rename the ISO file os.chdir("fusato") diff --git a/PepDeb_arm64/pepbld.py b/PepDeb_arm64/pepbld.py new file mode 100644 index 0000000..d1553eb --- /dev/null +++ b/PepDeb_arm64/pepbld.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-3.0-or-later +# +# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me) + +import os +import subprocess +import sys +import shutil + +# Set the working folder variable +uchinanchu = os.getcwd() + +# Create the build folder, move into it removing stale mountpoints and files there. +if os.path.exists("fusato") and not os.path.isdir("fusato"): + os.remove("fusato") +elif not os.path.exists("fusato"): + os.makedirs("fusato") + +os.chdir("fusato") +subprocess.run("umount $(mount | grep '${PWD}/chroot' | tac | cut -f3 -d' ') 2>/dev/null", shell=True) +for i in os.listdir() + ['.build']: + if i == 'cache': + continue + else: + os.system("rm -rf " + i) + +# Defines Live Build settings +lb_command = [ + "lb", "config", "noauto", + "--binary-images", "iso-hybrid", + "--architectures", "arm64", + "--distribution", "bookworm", + "--archive-areas", "main contrib non-free non-free-firmware", + "--firmware-chroot", "false", + "--debian-installer", "netinst", + "--debian-installer-distribution", "bookworm", + "--debian-installer-gui", "true", + "--parent-mirror-debian-installer", "http://repo.peppermintos.com/packages", + "--iso-preparer", "PeppermintOS-https://peppermintos.com/", + "--iso-publisher", "Peppermint OS Team", + "--iso-volume", "PeppermintOS", + "--image-name", "PepOS-mini-iso", + "--checksums", "sha512", + "--zsync", "false", + "--win32-loader", "false", + "--debian-installer-preseedfile", "preseed.cfg" +] + +subprocess.run(lb_command + sys.argv[1:]) + +# Setup the installer structure +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), exist_ok=True) + +shutil.copy(os.path.join(uchinanchu, "pepinstaller", "preseed", "preseed.cfg"), os.path.join(uchinanchu, "fusato", "config", "includes.installer")) +shutil.copytree(os.path.join(uchinanchu, "pephooks", "normal"), os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepscripts"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), dirs_exist_ok=True) +shutil.copy(os.path.join(uchinanchu, "pepsources", "multimedia.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "peppermint.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copytree(os.path.join(uchinanchu, "pepkeyrings"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "polkit"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepapplication"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepdatabase"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProPixMaps"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepconf"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProTools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peplightdm"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), dirs_exist_ok=True) + +# Copy recursive files and sub-directories +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "debian", "boot"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "debian", "isolinux"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "graphics"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "themes"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepgrub", "debian"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pylibraries"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pmostools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), dirs_exist_ok=True) + +subprocess.run("lb build", shell=True) diff --git a/PepDev32/pepbld.py b/PepDev32/pepbld.py new file mode 100644 index 0000000..9faf471 --- /dev/null +++ b/PepDev32/pepbld.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-3.0-or-later +# +# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me) + +import os +import subprocess +import sys +import shutil + +# Set the working folder variable +uchinanchu = os.getcwd() + +# Create the build folder, move into it removing stale mountpoints and files there. +if os.path.exists("fusato") and not os.path.isdir("fusato"): + os.remove("fusato") +elif not os.path.exists("fusato"): + os.makedirs("fusato") + +os.chdir("fusato") +subprocess.run("umount $(mount | grep '${PWD}/chroot' | tac | cut -f3 -d' ') 2>/dev/null", shell=True) +for i in os.listdir() + ['.build']: + if i == 'cache': + continue + else: + os.system("rm -rf " + i) + +# Defines Live Build settings +lb_command = [ + "lb", "config", "noauto", + "--binary-images", "iso-hybrid", + "--architectures", "i386", + "--distribution", "daedalus", + "--initsystem", "sysvinit", + "--archive-areas", "main contrib non-free non-free-firmware", + "--mirror-bootstrap" "http://deb.devuan.org/merged". + "--parent-mirror-bootstrap" "http://deb.devuan.org/merged", + "--parent-mirror-chroot" "http://deb.devuan.org/merged", + "--parent-mirror-chroot-security" "http://deb.devuan.org/merged", + "--parent-mirror-binary" "http://deb.devuan.org/merged", + "--parent-mirror-binary-security" "http://deb.devuan.org/merged", + "--mirror-chroot" "http://deb.devuan.org/merged", + "--mirror-chroot-security" "http://deb.devuan.org/merged", + "--security" "false", + "--updates" "false", + "--backports" "false", + "--uefi-secure-boot" "enable", + "--firmware-chroot", "false", + "--debian-installer", "netinst", + "--debian-installer-distribution", "daedalus", + "--debian-installer-gui", "true", + "--parent-mirror-debian-installer", "http://repo.peppermintos.com/packages", + "--iso-preparer", "PeppermintOS-https://peppermintos.com/", + "--iso-publisher", "Peppermint OS Team", + "--iso-volume", "PeppermintOS", + "--image-name", "PepOS-mini-iso", + "--checksums", "sha512", + "--zsync", "false", + "--win32-loader", "false", + "--debian-installer-preseedfile", "preseed.cfg" +] + +subprocess.run(lb_command + sys.argv[1:]) + +# Setup the installer structure +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), exist_ok=True) + +shutil.copy(os.path.join(uchinanchu, "pepinstaller", "preseed", "preseed.cfg"), os.path.join(uchinanchu, "fusato", "config", "includes.installer")) +shutil.copytree(os.path.join(uchinanchu, "pephooks", "normal"), os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepscriptsdev"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), dirs_exist_ok=True) +shutil.copy(os.path.join(uchinanchu, "pepsources", "multimedia.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "peppermint.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copytree(os.path.join(uchinanchu, "pepkeyrings"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "polkit"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepapplication"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepdatabase"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProPixMaps"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepconf"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProTools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peplightdm"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), dirs_exist_ok=True) + +# Copy recursive files and sub-directories +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "devuan", "boot"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "devuan", "isolinux"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "graphics"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "themes"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepgrub", "devuan"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pylibraries"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pmostools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), dirs_exist_ok=True) + +subprocess.run("lb build", shell=True) diff --git a/PepDev64/pepbld.py b/PepDev64/pepbld.py new file mode 100644 index 0000000..0fb268a --- /dev/null +++ b/PepDev64/pepbld.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-3.0-or-later +# +# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me) + +import os +import subprocess +import sys +import shutil + +# Set the working folder variable +uchinanchu = os.getcwd() + +# Create the build folder, move into it removing stale mountpoints and files there. +if os.path.exists("fusato") and not os.path.isdir("fusato"): + os.remove("fusato") +elif not os.path.exists("fusato"): + os.makedirs("fusato") + +os.chdir("fusato") +subprocess.run("umount $(mount | grep '${PWD}/chroot' | tac | cut -f3 -d' ') 2>/dev/null", shell=True) +for i in os.listdir() + ['.build']: + if i == 'cache': + continue + else: + os.system("rm -rf " + i) + +# Defines Live Build settings +lb_command = [ + "lb", "config", "noauto", + "--binary-images", "iso-hybrid", + "--architectures", "amd64", + "--distribution", "daedalus", + "--initsystem", "sysvinit", + "--archive-areas", "main contrib non-free non-free-firmware", + "--mirror-bootstrap" "http://deb.devuan.org/merged". + "--parent-mirror-bootstrap" "http://deb.devuan.org/merged", + "--parent-mirror-chroot" "http://deb.devuan.org/merged", + "--parent-mirror-chroot-security" "http://deb.devuan.org/merged", + "--parent-mirror-binary" "http://deb.devuan.org/merged", + "--parent-mirror-binary-security" "http://deb.devuan.org/merged", + "--mirror-chroot" "http://deb.devuan.org/merged", + "--mirror-chroot-security" "http://deb.devuan.org/merged", + "--security" "false", + "--updates" "false", + "--backports" "false", + "--firmware-chroot", "false", + "--debian-installer", "netinst", + "--debian-installer-distribution", "daedalus", + "--debian-installer-gui", "true", + "--parent-mirror-debian-installer", "http://repo.peppermintos.com/packages", + "--iso-preparer", "PeppermintOS-https://peppermintos.com/", + "--iso-publisher", "Peppermint OS Team", + "--iso-volume", "PeppermintOS", + "--image-name", "PepOS-mini-iso", + "--checksums", "sha512", + "--zsync", "false", + "--win32-loader", "false", + "--debian-installer-preseedfile", "preseed.cfg" +] + +subprocess.run(lb_command + sys.argv[1:]) + +# Setup the installer structure +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), exist_ok=True) + +shutil.copy(os.path.join(uchinanchu, "pepinstaller", "preseed", "preseed.cfg"), os.path.join(uchinanchu, "fusato", "config", "includes.installer")) +shutil.copytree(os.path.join(uchinanchu, "pephooks", "normal"), os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepscriptsdev"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), dirs_exist_ok=True) +shutil.copy(os.path.join(uchinanchu, "pepsources", "multimedia.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "peppermint.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copytree(os.path.join(uchinanchu, "pepkeyrings"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "polkit"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepapplication"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepdatabase"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProPixMaps"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepconf"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProTools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peplightdm"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), dirs_exist_ok=True) + +# Copy recursive files and sub-directories +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "devuan", "boot"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "devuan", "isolinux"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "graphics"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "themes"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepgrub", "devuan"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pylibraries"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pmostools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), dirs_exist_ok=True) + +subprocess.run("lb build", shell=True) diff --git a/PepDev_arm64/pepbld.py b/PepDev_arm64/pepbld.py new file mode 100644 index 0000000..71d5851 --- /dev/null +++ b/PepDev_arm64/pepbld.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-3.0-or-later +# +# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me) + +import os +import subprocess +import sys +import shutil + +# Set the working folder variable +uchinanchu = os.getcwd() + +# Create the build folder, move into it removing stale mountpoints and files there. +if os.path.exists("fusato") and not os.path.isdir("fusato"): + os.remove("fusato") +elif not os.path.exists("fusato"): + os.makedirs("fusato") + +os.chdir("fusato") +subprocess.run("umount $(mount | grep '${PWD}/chroot' | tac | cut -f3 -d' ') 2>/dev/null", shell=True) +for i in os.listdir() + ['.build']: + if i == 'cache': + continue + else: + os.system("rm -rf " + i) + +# Defines Live Build settings +lb_command = [ + "lb", "config", "noauto", + "--binary-images", "iso-hybrid", + "--architectures", "arm64", + "--distribution", "daedalus", + "--initsystem", "sysvinit", + "--archive-areas", "main contrib non-free non-free-firmware", + "--mirror-bootstrap" "http://deb.devuan.org/merged". + "--parent-mirror-bootstrap" "http://deb.devuan.org/merged", + "--parent-mirror-chroot" "http://deb.devuan.org/merged", + "--parent-mirror-chroot-security" "http://deb.devuan.org/merged", + "--parent-mirror-binary" "http://deb.devuan.org/merged", + "--parent-mirror-binary-security" "http://deb.devuan.org/merged", + "--mirror-chroot" "http://deb.devuan.org/merged", + "--mirror-chroot-security" "http://deb.devuan.org/merged", + "--security" "false", + "--updates" "false", + "--backports" "false", + "--uefi-secure-boot" "enable", + "--firmware-chroot", "false", + "--debian-installer", "netinst", + "--debian-installer-distribution", "daedalus", + "--debian-installer-gui", "true", + "--parent-mirror-debian-installer", "http://repo.peppermintos.com/packages", + "--iso-preparer", "PeppermintOS-https://peppermintos.com/", + "--iso-publisher", "Peppermint OS Team", + "--iso-volume", "PeppermintOS", + "--image-name", "PepOS-mini-iso", + "--checksums", "sha512", + "--zsync", "false", + "--win32-loader", "false", + "--debian-installer-preseedfile", "preseed.cfg" +] + +subprocess.run(lb_command + sys.argv[1:]) + +# Setup the installer structure +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), exist_ok=True) +os.makedirs(os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), exist_ok=True) + +shutil.copy(os.path.join(uchinanchu, "pepinstaller", "preseed", "preseed.cfg"), os.path.join(uchinanchu, "fusato", "config", "includes.installer")) +shutil.copytree(os.path.join(uchinanchu, "pephooks", "normal"), os.path.join(uchinanchu, "fusato", "config", "hooks", "normal"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepscriptsdev"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "lib", "finish-install.d"), dirs_exist_ok=True) +shutil.copy(os.path.join(uchinanchu, "pepsources", "multimedia.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "peppermint.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "sources-final")) +shutil.copy(os.path.join(uchinanchu, "pepsources", "sources.list"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "repos")) +shutil.copytree(os.path.join(uchinanchu, "pepkeyrings"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "keyrings"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "polkit"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "polkit"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepapplication"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "apps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepdatabase"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "database"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProPixMaps"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "pixmaps"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepconf"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "conf"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "PepProTools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "protools"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peplightdm"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "lightdm"), dirs_exist_ok=True) + +# Copy recursive files and sub-directories +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "devuan", "boot"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "peploadersplash", "devuan", "isolinux"), os.path.join(uchinanchu, "fusato", "config", "includes.binary"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "graphics"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepinstaller", "themes"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "usr", "share"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pepgrub", "devuan"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "grub"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pylibraries"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "py"), dirs_exist_ok=True) +shutil.copytree(os.path.join(uchinanchu, "pmostools"), os.path.join(uchinanchu, "fusato", "config", "includes.installer", "preseed", "tools"), dirs_exist_ok=True) + +subprocess.run("lb build", shell=True)