From cc0db633d67c5fda98aa9b36071c9a9eb55d1dfd Mon Sep 17 00:00:00 2001 From: DomamaN202 <51743763+Domaman202@users.noreply.github.com> Date: Sun, 22 Oct 2023 06:37:05 +0700 Subject: [PATCH 1/5] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 0232528..8c88dc5 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,17 @@ chmod +x build.sh ./build.sh ``` +### ArchLinux + +```bash +yay -S clang-format +sudo pacman -S python3 git qemu-system-x86 +git clone https://git.synapseos.ru/Aren/BMOSP.git +cd BMOSP/ +chmod +x build.sh +./build.sh +``` + ## Запук ### Qemu From e7255ee14d9d47f1140c0c640be961a28770a41b Mon Sep 17 00:00:00 2001 From: DomamaN202 <51743763+Domaman202@users.noreply.github.com> Date: Sun, 22 Oct 2023 06:45:51 +0700 Subject: [PATCH 2/5] ArchLinux support in buildscript --- pbuild.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pbuild.py b/pbuild.py index f796ce1..14c3fe5 100644 --- a/pbuild.py +++ b/pbuild.py @@ -103,6 +103,7 @@ def check_tools(): if len(missing_tools) > 0: subprocess.run(["sudo", "apt", "install"] + missing_tools) + subprocess.run(["sudo", "pacman", "-S"] + missing_tools) def create_hdd(IMAGE_NAME): From 67d90b8d94b97cd2554bcfb49ea6f4309dd77675 Mon Sep 17 00:00:00 2001 From: Aren Elchinyan Date: Sun, 22 Oct 2023 15:27:02 +0300 Subject: [PATCH 3/5] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pbuild.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pbuild.py b/pbuild.py index 14c3fe5..89a9c63 100644 --- a/pbuild.py +++ b/pbuild.py @@ -2,6 +2,7 @@ import shutil import subprocess import time +import platform from multiprocessing import Pool @@ -93,6 +94,17 @@ def check_limine(): os.chdir("..") + +def check_os(): + current_os = platform.system().lower() + + if current_os == 'linux': + dist = platform.linux_distribution()[0].lower() + + if dist == 'ubuntu' or dist == 'debian': + return 1 + return 0 + def check_tools(): required_tools = ["gcc", "g++", "xorriso", "make", "mtools", "curl"] missing_tools = [] @@ -102,7 +114,9 @@ def check_tools(): missing_tools.append(tool) if len(missing_tools) > 0: - subprocess.run(["sudo", "apt", "install"] + missing_tools) + if check_os(): + subprocess.run(["sudo", "apt", "install"] + missing_tools) + return subprocess.run(["sudo", "pacman", "-S"] + missing_tools) @@ -165,4 +179,4 @@ def create_iso(IMAGE_NAME): create_iso("bmosp") create_hdd("bmosp") - print(f"Не забудьте сохранить изменения! Номер сборки: {major}.{minor}.{build}") \ No newline at end of file + print(f"Не забудьте сохранить изменения! Номер сборки: {major}.{minor}.{build}") From dc0a4ca234c7f6365d2c97f4b2dc0d2f75c9238d Mon Sep 17 00:00:00 2001 From: Aren Elchinyan Date: Sun, 22 Oct 2023 15:32:53 +0300 Subject: [PATCH 4/5] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B0=20platform?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pbuild.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pbuild.py b/pbuild.py index 89a9c63..a86e78c 100644 --- a/pbuild.py +++ b/pbuild.py @@ -2,7 +2,6 @@ import shutil import subprocess import time -import platform from multiprocessing import Pool @@ -96,13 +95,19 @@ def check_limine(): def check_os(): - current_os = platform.system().lower() - - if current_os == 'linux': - dist = platform.linux_distribution()[0].lower() - - if dist == 'ubuntu' or dist == 'debian': - return 1 + import platform + using_distro = False + try: + import distro + using_distro = True + except ImportError: + pass + if using_distro: + linux_distro = distro.like() + else: + linux_distro = platform.linux_distribution()[0] + if linux_distro.lower( in ['debian', 'ubuntu']: + return 1 return 0 def check_tools(): From 5c3d1ffb8961c2c0703c07949164c54e841fcb40 Mon Sep 17 00:00:00 2001 From: Aren Elchinyan Date: Sun, 22 Oct 2023 15:34:35 +0300 Subject: [PATCH 5/5] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D0=BF=D0=B5=D1=87=D0=B0=D1=82?= =?UTF-8?q?=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pbuild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbuild.py b/pbuild.py index a86e78c..a14d661 100644 --- a/pbuild.py +++ b/pbuild.py @@ -106,7 +106,7 @@ def check_os(): linux_distro = distro.like() else: linux_distro = platform.linux_distribution()[0] - if linux_distro.lower( in ['debian', 'ubuntu']: + if linux_distro.lower() in ['debian', 'ubuntu']: return 1 return 0