Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature debian 12 install script #1109

Draft
wants to merge 59 commits into
base: main
Choose a base branch
from

Conversation

SylvainMT
Copy link
Contributor

Description

  • Write a new script for the Automatic Installation of ARM on a Baremetal Debian 12, Debian 11, OMV 6.5 or OMV 7 Linux Distribution.
  • Complete re-write of the relevant wiki page.

Fixes #1070

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This feature update comes with a documentation update

How Has This Been Tested?

The testing methodology unfortunately is not automated. To complete these tests I had to create and destroy VMs on Proxmox numerous times. For each check that the script performs, I have tested on Debian 12. These include (but are not limited to)

  • Ensure the script is run as "Effective Root User" (as root or with sudo)
  • arm group exists / does not exist
  • arm user exists / does not exist
  • User chooses to use default password
  • User chooses to provide custom password succesfully
  • User chooses to provide custom password but fails to do so after 3 attempts
  • The distribution of Linux is Debian 12 or 11 (OMV runs on Debian 12 or 11)
  • The 'contrib' repository is present / not present. (For Debian 12 also test if update contrib and security contrib is present / not present.
  • The "armui" service is loaded and active
  • The "armui" service is loaded but innactive
  • The /opt/arm directory exists (if it does ask the user permission to delete it)
  • If a previous installation is detected, ask the user if they want to keep the previous installation's config files. If not, copy fresh config files but backup the old ones.

Tested installation on these Linux Distributions

  • Docker (The installation script does not affect the Docker installation, and has been tested to confirm this is true)
  • Installation on a clean Debian 12
  • Installation on a Debian 12 that had an existing ARM installation
  • Installation on a clean Debian 11
  • Installation on a Debian 11 that had an existing ARM installation
  • Installation on OMV 6.5
  • Installation on OMV 7.0
  • Confirm that each option presented to the user results in the expected outcome

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have tested that my fix is effective or that my feature works

Changelog:

Include the details of changes made here

  • Create a new Installation script from scratch, using inspiration from the old one in the Dev2 branch and save it in the /script/installers/ folder
  • Complete rewrite of the automatic installation on Debian wiki page
  • New thickclient, udev rule, arm wrapper script and armui.service files (did not erase the old ones, just created new ones, this was done to not break previous bare-metal installations that may still use them.)

Logs

Not applicable

SylvainMT and others added 30 commits March 2, 2024 15:43
…t to install on Bare Metal in a Debian 12 Installation."

Issue automatic-ripping-machine#1070

Create Script and function "Has_Sudo_Privileges()"
…erve Global Variable values outside of functions.

Added function to create arm Group.
Need to seperate it into more readable functions.
Comment Code for legibility.
Added Building and Installing of MakeMKV.

Fixed a bug where the script would not complete if run as sudo.
Create function to test for the availability of the contrib package, if that test fails, exit the script.
… to checkout the repository, if existing, at the latest ARM Release.
1. This installation method is unsupported.
2. MakeMKV is in Beta and free to use while in Beta, and provide a link to MakeMKV purchase page.
3. Provide a link to the ARM MIT licence
GitHub Worklow was updating the version number automatically.  Returned the Version Number to what it should be after disabling the GitHub Workflow.
A new Udev Rules file.
A new Amr.service file.
A new arm_venv_wrapper.sh file

Updated Debian12Installer.sh file to use the newly created files. Also added a testing flag to pull from testing repo and not production repo.
…fault sudo is not installed in the Proxmox LXC Debian 12 container image...)

Added a stub function for running the post-install setup UI
…uplication of code that could lead to hard to find errors and bugs.

Added verification for the installation of the sudo package.

Added verification for the installation of the lsb-release package and the ability for the script to install it if missing.

Succesfully tested in a Proxmox LXC container enviroment.
…DO script call. (The ability to call the script with or without SUDO... Now the script needs to be called with SUDO or as root)
…due to user error (fail to enter match the password 3 times). The user and group arm would be created but no password would be set on the account. Now if the user fails to enter a password, the newly crated account is deleted.

if the arm user account is pre-existing, give the user the opportunity to change it's password.
…passed to the script. Now the script exits with and error if the fork or tag was not found.
…ub repo of a prior installation to deleting any existing /opt/arm directory and clonning a fresh repository from the chosen fork and tag. Give the user the option to decline to proceed. Copy any existing config files to backups.
More testing is required to attempt to test more variables.
If innactive, warn the user that proceeding is not recommended but allow for the user to continue the process.

Moved test for presence of /opt/amr directory ealier, before any installation is completed, to allow the user to abandon installation earlier and only make minimal changes to the system.

Added link to MakeMKV-Info wiki page.
- Added Pre-Installation Steps
- Added 2 new error codes
- Modified the formatting of the Note at the top of the page regarding the deprecated nature of this installation method.
@SylvainMT
Copy link
Contributor Author

I apologize for the Unverified commits, I had some configuration issues with my PyCharm installations. I can verify that each of these commits was indeed made by myself.

@shitwolfymakes
Copy link
Member

I'll test this when I get a chance

@SylvainMT SylvainMT marked this pull request as draft April 23, 2024 05:21
@SylvainMT
Copy link
Contributor Author

I encountered a problem when I tried to use it in a Proxmox Container, I'm going to work to fix it and set this pull ready for review when I have a fix for it.

I am also going to build HandBrake from source to use the latest version, as that too caused me an issue when trying to use Hardware Acceleration.

Sorry for the delay.

Copy link

sonarcloud bot commented May 17, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a Bash Installation Script to install on Bare Metal in a Debian 12 Installation.🔧
2 participants