-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from drauger-os-development/testing
Documentation updates, QoL improvements
- Loading branch information
Showing
20 changed files
with
195 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
Package: system-installer | ||
Version: 2.5.0 | ||
Version: 2.5.5 | ||
Maintainer: Thomas Castleman <[email protected]> | ||
Homepage: https://github.com/drauger-os-development/system-installer | ||
Section: admin | ||
Architecture: amd64 | ||
Priority: important | ||
Depends: arch-install-scripts, python3 (>=3.6.7-1~18.04), bash, gir1.2-gtk-3.0 (>=3.24.12-1ubuntu1), coreutils (>=8.28-1ubuntu1), apt (>=1.6.11), squashfs-tools (>=1:4.3-6ubuntu0.18.04.1), zenity (>=3.28.1-1), grub2-common (>=2.02-2ubuntu8.13), initramfs-tools (>=0.130ubuntu3.8), systemd (>=237-3ubuntu10.24), locales (>=2.27-3ubuntu1), procps (>=2:3.3.12-3ubuntu1.1), grep (>=3.1-2), keyboard-configuration, util-linux (>=2.34-0.1ubuntu2), python3-parted (>=3.11.2), python3-psutil (>=5.5.0), python3-apt (>=2.0.0), python3-urllib3 (>=1.26.5-1~exp1), python3-gnupg (>=0.4.5), python3-xmltodict (>=0.11.0) | ||
Depends: arch-install-scripts, python3 (>=3.6.7-1~18.04), bash, gir1.2-gtk-3.0 (>=3.24.12-1ubuntu1), coreutils (>=8.28-1ubuntu1), apt (>=1.6.11), squashfs-tools (>=1:4.3-6ubuntu0.18.04.1), zenity (>=3.28.1-1), grub2-common (>=2.02-2ubuntu8.13), initramfs-tools (>=0.130ubuntu3.8), systemd (>=237-3ubuntu10.24), locales (>=2.27-3ubuntu1), procps (>=2:3.3.12-3ubuntu1.1), grep (>=3.1-2), keyboard-configuration, util-linux (>=2.34-0.1ubuntu2), python3-parted (>=3.11.2), python3-psutil (>=5.5.0), python3-apt (>=2.0.0), python3-urllib3 (>=1.26.5-1~exp1), python3-gnupg (>=0.4.5), python3-xmltodict (>=0.11.0), python3-dnspython | ||
Description: System Installer for Drauger OS | ||
System Installer for Drauger OS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This file is for defining some simple build settings | ||
# start a line with a hashtag (#) to denote a comment | ||
# | ||
# ALL URLs should be rsync URLS | ||
# | ||
# META_URL contains the meta package for the kernel | ||
META_URL=rsync://rsync.draugeros.org/apt/pool/main/l/linux-meta | ||
# PACK_URL contains the actual kernel image and header packages | ||
PACK_URL=rsync://rsync.draugeros.org/apt/pool/main/l/linux-upstream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Testing Distros | ||
|
||
This list details which distros have been tested and are known working with `system-installer`. Config changes to get `system-installer` working are acceptable. | ||
|
||
## To test: | ||
- [ ] Get the distro booted up in a VM or on a live USB/CD/DVD | ||
- [ ] Run `git clone https://github.com/drauger-os-development/system-installer` to clone the repo | ||
- [ ] `cd` into the folder: `cd system-installer` | ||
- [ ] Make any necessary changes to the default config to get `system-installer` to work. | ||
- [ ] Install Packages needed to build: `sudo apt install python3-dev libpython3-dev` | ||
- [ ] Build the package: `./build.sh` | ||
- [ ] Install the package: `sudo apt install ../system-installer_*.deb` | ||
- [ ] Run `system-installer` in a terminal and try to install the OS! | ||
|
||
## When testing, please do these things: | ||
- [ ] Install using the auto-partitioner (on both EFI and BIOS) | ||
- [ ] Install using the manual partitioner (on both EFI and BIOS) | ||
- [ ] Install with and without Restricted Extras enabled | ||
|
||
## For extra credit, try: | ||
- [ ] Installing using Quick Install | ||
- [ ] Installing using OEM install (this includes the End User Experience) | ||
- [ ] Sending an Installation Report | ||
- [ ] Installing with a RAID array configured in the installer | ||
|
||
|
||
## Tested Distros ✅ | ||
✅ **Drauger OS 7.5.1** - KNOWN WORKING | ||
|
||
✅ **Drauger OS 7.6** - KNOWN WORKING |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* system-installer.cxx | ||
* | ||
* Copyright 2022 Thomas Castleman <[email protected]> | ||
* Copyright 2023 Thomas Castleman <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -46,7 +46,7 @@ | |
|
||
using namespace std; | ||
|
||
str VERSION = "2.5.0"; | ||
str VERSION = "2.5.5"; | ||
str R = "\033[0;31m"; | ||
str G = "\033[0;32m"; | ||
str Y = "\033[1;33m"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# | ||
# report.py | ||
# | ||
# Copyright 2022 Thomas Castleman <[email protected]> | ||
# Copyright 2023 Thomas Castleman <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -462,7 +462,7 @@ def generate_message(self): | |
if custom == self.default_message: | ||
output['CUSTOM MESSAGE'] = "NONE" | ||
else: | ||
output['CUSTOM MESSAGE'] = custom | ||
output['CUSTOM MESSAGE'] = custom.split("\n") | ||
else: | ||
output['CUSTOM MESSAGE'] = "NONE" | ||
try: | ||
|
@@ -702,7 +702,7 @@ def ram_info(): | |
if ram_capacity[each] == []: | ||
del ram_capacity[each] | ||
swap_capacity = check_output(["swapon", "--show"]).decode().split("\n") | ||
return {"RAM": ram_capacity, "SWAP": swap_capacity} | ||
return {"RAM": dict(ram_capacity), "SWAP": swap_capacity} | ||
|
||
|
||
def disk_info(): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# | ||
# check_internet.py | ||
# | ||
# Copyright 2022 Thomas Castleman <[email protected]> | ||
# Copyright 2023 Thomas Castleman <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -22,19 +22,25 @@ | |
# | ||
# | ||
"""Ping servers to see if we have internet""" | ||
from subprocess import check_output, CalledProcessError | ||
import json | ||
import dns.resolver as res | ||
import common | ||
|
||
|
||
def ping(mirror, count): | ||
"""Ping the mirrors""" | ||
def ping(mirror): | ||
"""Try doing a DNS resolution on the mirrors""" | ||
# We need just the domain name, so we have to parse things down a bit | ||
mirror = mirror.split("/")[2] | ||
command = ["ping", "-c", str(count), "-q", mirror] | ||
# get the ping times | ||
output = check_output(command).decode("utf-8").split("\n")[-2] | ||
return float(output.split("/")[-2]) | ||
if mirror[:4] == "http": | ||
mirror = mirror.split("/")[2] | ||
if mirror[-1] == "/": | ||
mirror = mirror[:-1] | ||
try: | ||
res.resolve(mirror, "A") | ||
return True | ||
except (res.NoNameservers, res.NoAnswer): | ||
return False | ||
except res.NXDOMAIN: | ||
return None | ||
|
||
|
||
def has_internet(): | ||
|
@@ -44,18 +50,24 @@ def has_internet(): | |
with open("/etc/system-installer/settings.json", "r") as mirrors_file: | ||
mirrors = json.load(mirrors_file) | ||
|
||
ping_count = mirrors["ping count"] | ||
mirrors = mirrors["ping servers"] | ||
|
||
# get only the unique mirrors | ||
mirrors = common.unique(mirrors) | ||
# Get our ping times | ||
results = [] | ||
try: | ||
# Ping all listed servers, in case one or more is blocked | ||
for each in mirrors: | ||
ping(each, ping_count) | ||
|
||
except CalledProcessError: | ||
results.append(ping(each)) | ||
except: | ||
return False | ||
|
||
return True | ||
true = 0 | ||
false = 0 | ||
for each in results: | ||
if each: | ||
true += 1 | ||
else: | ||
false += 1 | ||
|
||
return (true > false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# | ||
# common.py | ||
# | ||
# Copyright 2022 Thomas Castleman <[email protected]> | ||
# Copyright 2023 Thomas Castleman <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# | ||
# __init__.py | ||
# | ||
# Copyright 2022 Thomas Castleman <[email protected]> | ||
# Copyright 2023 Thomas Castleman <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -32,3 +32,4 @@ | |
import modules.make_user as make_user | ||
import modules.purge as purge | ||
import modules.verify_install as verify_install | ||
import modules.common as common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common.py |
Oops, something went wrong.