Commit graph

290 commits

Author SHA1 Message Date
Microtechno9000
6c82f95822 #1705 Graceful shutdown of armui service
Resolves issue when running not in docker
2026-03-13 09:59:38 +10:30
xieve
9850e69037
[BUGFIX] Refactor logging & exception handling (#1696)
* refactor: use ProcessHandler instead of subprocess.run

* fix(logger): consistency, versatility and formatting

Before:

	[2026-02-06 18:40:20] DEBUG ARM: Class.method <message>

After:

	2026-02-08 10:18:08 ARM: DEBUG: Class.method: <message>

- stdout now uses short formatting (eg. for journald, which timestamps stdout)
- Handling of debug level formatting is more consistent now
- Removed `clean_loggers()`:
	- This function wasn't really doing what it said it was, since it was only removing at most one handler. Instead, I opted to only remove FileHandlers, such that if a more specific log file is created, the messages are not also logged to arm.log, but they are still logged to stdout and syslog.

* fix(logger): crash because of empty label

* feat(ripper.main): --no-syslog argument

Some containers don't have or need a syslog

* fix(ripper.main): log level of critical errors

* fix(ripper.main): handle errors during setup

* fix(ripper.main): handle SIGTERM

* refactor(ripper.utils.arm_setup): simplify log setup

* fix(ripper.utils.arm_setup): create logs/progress folder

* refactor(ripper.utils): always use RipperException to bail

Replaces all bare Exceptions and all sys.exit() calls with
RipperExceptions.

- more consistent error handling
- simplified make_dir helper function
- removed try-catch where we were calling sys.exit() anyways

* fix: remove UNIDENTIFIED_EJECT

Closes automatic-ripping-machine/automatic-ripping-machine#1360

UNIDENTIFIED_EJECT is not necessary anymore, since the ripper will now
always eject at the end (if AUTO_EJECT is set), even if an error is
thrown, so we can do away with the unreliable pre-check entirely and
rest assured that the ripper itself is much more capable of correctly
identifying whether a disc is rippable or not.

* fix: joblength should be 0 if it didn't start

* refactor(logger): deduplicated timestamp-filename logic

* fix(ripper): allow ripping of discs with no label

* fix(ripper.makemkv): missing attribute

* feat(ProcessHandler): capture stderr

* chore(ripper): remove unused imports and variables

* fix(ProcessHandler): type issues

* Bump version from 2.21.5 to 2.22.1

---------

Co-authored-by: Mtech <62650032+microtechno9000@users.noreply.github.com>
2026-02-17 22:02:44 +10:30
Matthias Schabhüttl
894bcf9aac
[BUGFIX] Debian installer: robust contrib repo detection for deb822 + mirror lists (#1677)
fix(installer): correctly detect contrib for bookworm-updates/security across deb822 + mirror lists

- Replace `apt-cache policy` grep checks with APT index target parsing to avoid false negatives
- Accept Debian suite aliases (stable, stable-updates, stable-security) in addition to codename suites
- Add fallbacks for deb822 `*.sources` and classic `sources.list`/`*.list` formats
- Prevent repeated “Missing bookworm-updates/contrib” warnings when contrib is already configured
2026-02-17 21:18:10 +10:30
xieve
824e720e46
[BUGFIX] replace hard-coded paths with configurable ones (#1487)
fix: replace hard-coded paths with configurable ones

- Location of arm.yaml can now optionally be set via the ARM_CONFIG_FILE environment variable
- The default location stays the same (/etc/arm/config/arm.yaml)
- All settings concerning paths in arm.yaml should now work as expected,
  the following have had their behavior fixed:
	- INSTALLPATH
	- APPRISE
	- ABCDE_CONFIG_FILE
	- LOGPATH
- Mountpoints for discs are not hardcoded any more, instead:
	- If the disc is already mounted anywhere and the mountpoint is
	  readable, it is used
	- Otherwise, the disc is mounted via `mount --all <devpath>` (aka. auto-mount) to wherever specified in `fstab`
	- That is the reason why the default `fstab` has changed, to allow for auto-mount

Co-authored-by: Mtech <62650032+microtechno9000@users.noreply.github.com>
2026-02-06 09:36:55 +10:30
1337-server
57ca6fa791
[FEATURE] Add cd-r/cd-rw support (#1589)
* Add cd-r/cd-rw support

* Update VERSION
2025-10-08 22:13:42 +10:30
xieve
f2093ee35e
[BUGFIX] Port track 99 detection to python (#1489)
* feat(ProcessHandler): Compact error output

* refactor(ProcessHandler): remove unnecessary assignment

* feat(ProcessHandler): add check argument

* feat(ProcessHandler): log command

* feat(ProcessHandler): log command output on error

* feat(ProcessHandler): decode by default

* refactor: move Track 99 detection to identify

closes automatic-ripping-machine/automatic-ripping-machine#1360

* Update VERSION
2025-10-02 06:38:50 +01:00
Stefan
c6f5df4465
[BUGFIX] Verifying checksum of downloaded source Tarball (#1514)
* Update DebianInstaller.sh

Bugfix copy-paste error: checking SHA256 hash of 'makemkv-bin' twice and none of 'makemkv-oss'

* Update VERSION

bump version number

* Update VERSION

align to current version

---------

Co-authored-by: Mtech <62650032+microtechno9000@users.noreply.github.com>
2025-08-29 09:53:30 +09:30
Stefan
de2d8d404c
[BUGFIX] Update DebianInstaller.sh (#1493)
* Update DebianInstaller.sh

Fix $PaswordConfirmed uninitialized/undefined in line 557

* Update VERSION

Bump version number

* Update VERSION

Bump version number

* Update VERSION

align with current main branch version
2025-08-18 20:51:45 +09:30
matthias
456a35d1bd
[BUGFIX]: allow all MakeMKV keys (#1518)
* BUGFIX: allow all MakeMKV keys

* Version Increment
2025-08-12 19:50:22 +09:30
matthias
d842f9a468
[BUGFIX] prep_mkv not working (#1509)
* BugFix: prep_mkv not working

The prep_mkv function is internally calling the update_key.sh script.
Due to shell=True, the command is never executing. This also fixes the
command output to stdout, adds proper Error handling in the bash script
and increases the verbosity level of the script on errors so that users
on info level know what is happening. It also defines Known Errors both
in the bash script and in makemkv.py.

* Version Increment
2025-08-11 06:04:51 +09:30
Mtech
cdc7c1b02f
[BUGFIX] UI Progress Bar and Old ARM Version Removal (#1414)
* bugfix for issue #1377

* bugfix for ui issue#1403

bugfix ui colour
bugfix json api calls to reduce processing time
bugfix unknown status reports as 0% and undefined

* bugfix for timezones missing #1379

Addition of timezone info into ARM
2025-07-01 22:04:51 +09:30
flammableliquids
27f9649b8f
Bare metal ubuntu update 22 [BUGFIX] (#1368)
* Bare metal Ubuntu 22

apt installs updated to account for ubuntu 22.04

Minor wiki reference fixes

* Update Ubuntu-20.04-Automatic-Installation.md

* Update armui.service

fixing which was discovered when executing bare metal.

DebianInstaller.sh uses armui.service to set up the service. Without referring the venv python, none of the packages are detected, and the ui won't run.

* Update nvidia.md

basic notes on how to set up driver.
distro drivers are often slow to be released.

* Script tidy and Removal

Ubuntu Script is not required as testing on 20.04 and 24.02 has been successful.

docker-setup.sh and ubuntu-quicksync.sh moved into the installers folder for clarity when browsing folders.

* Wiki Update for Ubuntu 24.02

Debian script tested successfully on bare metal install of 24.02 Ubuntu.

Wiki pages updated to reflect file changes and script replacements.

* [Automated] Release: patch - Version from 2.12.1 to 2.12.2

* Further Documentation updates

* removed reference to wrong branch in documentation

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-25 15:52:10 +09:30
ringo805
19aebc4e73
[BUGFIX] added timezone env variable to start_arm_container.sh (#1369)
* added timezone env variable to start_arm_container.sh

Timezone defaults to UTC when TZ isn't set. Users may forget or not know to set their timezone when using this script if an option doesn't appear for it. This makes users aware they can set their timezone if desired.

* Update Docker.md

---------

Co-authored-by: Mtech <62650032+microtechno9000@users.noreply.github.com>
2025-04-21 21:00:37 +09:30
Sylvain Tousignant
4bebc8bb9d
[BUGFIX] debian 12 install script (#1109)
* Created new Branch for new feature: "Create a Bash Installation Script to install on Bare Metal in a Debian 12 Installation."

Issue #1070

Create Script and function "Has_Sudo_Privileges()"

* Added Descriptive Error message and exit command to shell script if the user does not have Sudo privileges.

* Correct an error where I failed to understand that BASH does not preserve Global Variable values outside of functions.

Added function to create arm Group.

* Logic for creating User and group completed.

Need to seperate it into more readable functions.

* Refactor code for User and group deletion.
Comment Code for legibility.

* [Automated] Increment Version

* Refactored the code, added more comments.

Added Building and Installing of MakeMKV.

Fixed a bug where the script would not complete if run as sudo.

* [Automated] Increment Version

* Create function to install ARM Deb Package Dependencies.

Create function to test for the availability of the contrib package, if that test fails, exit the script.

* [Automated] Increment Version

* Added a function to clone the repository at the latest Arm Release or to checkout the repository, if existing, at the latest ARM Release.

* [Automated] Increment Version

* Correct Code Editor Warnings

* [Automated] Increment Version

* Added User Disclaimer, Informing the user that
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

* [Automated] Increment Version

* Return Version Number to what it should be.

GitHub Worklow was updating the version number automatically.  Returned the Version Number to what it should be after disabling the GitHub Workflow.

* Create Function to create the Python Virtual Environment for ARM and install the Python Requirements.

* To not break previous installs, create the following files.
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.

* Change the location of the created SystemD Service from /etc/systemd/system to /lib/systemd/system

* Added an early check to confirm the sudo package is installed.  (By default sudo is not installed in the Proxmox LXC Debian 12 container image...)

Added a stub function for running the post-install setup UI

* Comment out SUDO_FLAG and all attached code, this was a unnecessary duplication 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.

* Deleted the commented-out code that enabled the abadonned optional SUDO script call.  (The ability to call the script with or without SUDO...  Now the script needs to be called with SUDO or as root)

* Add numerous TODO messages to keep track of changes and modifications yet to be made...

* Remove and IF statement dealing with the deprecated SudoFlag variable.

* Completed the Launch Setup Function.

Added script options instead of the hardcoded Test Flag of earlier versions.

* Fixed an issue where we create a new user but fail to add a password 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.

* Added some checks for the existence of the repo and / or tag options passed to the script.  Now the script exits with and error if the fork or tag was not found.

* To keep it simpler.  Changed the script from trying to update the github 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.

* add lsb-release package to the initial apt install call therefore keeping the apt update call to just one.

* Tested script with Debian 11 and Debian 12.

More testing is required to attempt to test more variables.

* Update TODOs

* Complete rewrite to reflect the new installation script for Debian and OMV.

This wiki entry is still a draft.

* Fix a glaring omission regarding the Officially supported installation method.

* Fix a typo

* Remove Completed TODOs

* Added test for Amrui.service, if active, exit install script.
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.

* Fixed a typo in ErrorCode 214.

* Update Setting-up-ARM-script-(Debian-OMV).md

- 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.

* Create Virtualization-Proxmox.md

A brief pros and cons evaluation of which Proxmox method to use.

* Fixed the wiki updates, after the long pause in development of this feature.

The original Debian Install file was renamed for only OMV, and a new file, was created for Debian.  Restored the OMV file to be identical to main, and moved my changes to the Debian file.

* Add a TODO to fix the problem presented when installing ARM using Proxmox LXC containers.

* Allow ARM to bind protected ports (ei: 1~1024)  This only applies to the Debian Install Script and not the Docker setup.

* Fix armUI Service Found when it did not exist error.

Update the Wiki Entry page, add a note about the length (in time) of the installation, remove mentioned support for OMV.

Update User Disclaimer in script, to reflect current date and to remove OMV support mention.

Update Version Number

* Fix Wiki entry regarding the valid part number, now arm can be installed using any port number even the lower levels from 1 to 1024.  Remove Error code 210 about port number being in the restricted range.

* Update cautionary disclaimer at the top of the wiki page.

Add Intended Use section to the wiki page.

* Remove a file that was never intended to be part of this feature update.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: wolfy <wolfy@shitwolfymakes.com>
Co-authored-by: Mtech <62650032+microtechno9000@users.noreply.github.com>
2025-01-14 22:29:54 +10:30
wolfy
c48b05282b
Only set permissions on folder creation
Without this change, every time a user runs the container it will reset the permissions of the folders. Otherwise this could break ownership of arm folders mounted from SMB/NFS shares every time the container is run.
2024-05-15 07:20:39 -05:00
wolfy
505d3a0fa5
Permissions now always set on container start 2024-05-09 21:58:02 -05:00
wolfy
4d32d73213
Fix permissions issue caused by a8a8b8f 2024-05-09 21:54:38 -05:00
Microtechno9000
9677cbdf6b bash typo 2024-02-13 23:54:05 +10:30
Microtechno9000
81d9a88537 Resloved issue with bash script typos 2024-02-13 23:52:16 +10:30
Microtechno9000
a8a8b8f5bc Potential fix for chown issue #822 2024-02-13 23:04:50 +10:30
Microtechno9000
51983e63b5 Auto stash before merge of "bugfix_various" and "origin/bugfix_various" 2024-01-26 13:16:36 +10:30
Microtechno9000
6ab4476068 Resolved issue with removing a users music folder
Added docker clean to devtools
2024-01-23 21:31:09 +10:30
1337-server
60109ae759
Merge branch 'main' into bugfix_various 2023-12-29 19:07:46 +00:00
Mtech
5410c8e08a
bugfix for issue #1026 - typo in docker-setup.sh (#1027)
* bugfix for issue #1026

* bugfix for last line, resolving arm folder as string not a directory
2023-12-29 19:02:16 +00:00
Microtechno9000
935fe9282f bugfix - issue #1019, docker failing to start as music folder can't be removed 2023-12-29 08:01:59 +10:30
Daniel Martin
8a978f2c3a Fix bad use of "ln -sf", which does something unexpected if the destination
is already a link to a directory.
2023-11-26 17:43:06 -05:00
wolfy
bd1b203b6f
Merge branch 'main' into main 2023-09-24 15:43:21 -06:00
Martin Cross
81cdd91d2b arm user home folder owner fix, add symlink to fix abcde conf and docker compose docs mismatch. 2023-09-10 20:23:02 +01:00
Martin Cross
6cf95a027b Fix handling of the abcde.conf file for docker 2023-09-10 16:12:54 +01:00
Martin Cross
cc27fbc981 Add option to disable ejection on an unidentified disc (https://github.com/automatic-ripping-machine/automatic-ripping-machine/issues/779) 2023-09-10 14:48:18 +01:00
ptrkb
2a4a8a0a1e
Update start_arm_container.sh
changed container path from Music to music
2023-07-01 20:10:21 +02:00
TallPatrick
e054b26ad2
Update scripts/docker-setup.sh
better clarity of log message.

Co-authored-by: wolfy <wolfy@shitwolfymakes.com>
2023-06-21 20:18:08 -07:00
TallPatrick
7c6e02d2a6
Update scripts/docker-setup.sh
Better way to back up the script.

Co-authored-by: wolfy <wolfy@shitwolfymakes.com>
2023-06-21 20:17:47 -07:00
TallPatrick
36eecc4bc2
Update docker-setup.sh
Added rudimentary handling for checking if "start_arm_container.sh" already exists, and changing the name to "start_arm_container_OLD.sh" if it does, so the new "start_arm_container.sh" can be written
2023-06-19 00:32:56 -07:00
1337-server
586d49ddef Move armlog location to variable 2023-05-30 16:15:26 +01:00
1337-server
e5ec5ec908
Merge branch 'main' into small-fixes 2023-05-20 08:34:05 +01:00
1337-server
02b1fd5745 Added direct logging from udev triggers into arm.yaml 2023-05-16 06:42:25 +01:00
1337-server
3dff33e750 Revert of abcde.conf link
Fixes crash on HandBrake fail - now logs correctly

Fixes HB trying to rip more tracks than available

Fixes no failure/error logged in job log

Added more debug msg to makemkv output
2023-05-16 05:53:22 +01:00
wrjacqmein
86ec9db4d9
Update arm_user_files_setup.sh (#834)
updated to link version of abcde with docker passed file.
2023-05-14 21:08:54 +01:00
Microtechno9000
e6660173e4 docker setup script add arm to docker group
added arm user to docker user group if docker is already installed, was missing from setup
2023-05-05 20:23:31 +09:30
1337-server
3e9d8072e2
Move makemkv progress into own logs (#767)
* Move makemkv progress into own logs

* [Automated] Increment Version

* add missing space

* Remove old progress logs

* Update VERSION

* Update logger.py

* Update json_api.py

---------

Co-authored-by: 1337server <sndspamfilter@gamil.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-04-01 20:02:42 +01:00
wolfy
c72df7cccb
Updates to MakeMKV key handling and extras (#751)
* Update publish-image.yml

* Delete installer_test.yml

* Create test-pr-image-build.yml

* Update README.md

* fix bug

* Create shellcheck.yml

* Added setting to store permanent keys

* Added pseudocode to files

* minor reorganization

* added TODO

* test fix

* updated comments.json

* corrected container name

* fixed breaking typo

* fix erroneous directory creation

* make sure this is a string

* fixed breaking typo

* Moved functions to new file

* implement #752

* Added logic

* Add update logic

* append, not truncate

* add quotes to path strings

* fixed logical bug

* Update PR template to reflect recent changes

* Removed MAKEMKV_APP_KEY env variable from the container

* reinstated docker-setup.sh

* Implemented graceful key updating

* fix flake8 error

* fix flake8 error

* fix flake8 error

* don't run on archived branches

* don't run on archived branches

* added cancel-in-progress attribute to workflow

* fix flake8 error

* fix flake8 error

* try to fix flake8 error

* try to fix flake8 error

* try to fix flake8 error

* make sure flake8 sees arm.yaml in the right area

* fix typo

* use correct directory name

* reorganized to speed up build

* fixed key update script not being logged

* logfile redirect now in run_makemkv

* remove logging of key value

* fixed exception raising

* correct branch name

* remove sudo

* fixed bug causing booleans to convert to ints

---------

Co-authored-by: 1337-server <sndspamfilter@gmail.com>
2023-02-25 01:06:26 +00:00
1337-server
fc2e6980a3
Merge branch 'main' into Add-arm-to-render-group 2023-02-19 20:04:33 +00:00
1337-server
41afc6155a
Update arm_user_files_setup.sh 2023-02-19 03:04:49 +00:00
1337-server
cda9b50da2
Add transcode folder 2023-02-17 02:34:07 +00:00
1337-server
5f1fa7a672
Fixes #722 - Adds raw folder to installer (#723)
Fixes #722

Adds raw folder to creation of folders
2023-02-15 00:37:11 +00:00
wolfy
56dfb69c7e
Installer removal (#712)
* Removed old installers

* remove live install option

* removed deprecated reference

* Update ubuntu-20.04-install.sh
2023-02-08 23:06:55 +00:00
wolfy
94483b1b37
Key Update Hotfix (#697)
* Key Update Hotfix

* Make sure the folder exists and has proper owner

* Update VERSION

* make sure the file isnt owned by root
2023-02-04 05:57:30 +00:00
1337-server
16cbe128fe
Fixes #699 (#700)
* Delete debian-setup.sh No longer used

* create setup folders Debian installer

* Bump arm-dependencies from `4479498` to `e326b7f`
2023-02-04 05:51:12 +00:00
wolfy
baff5c61ec
Added python stuff to PATH 2023-01-25 18:42:01 -07:00