Feat: add spoolman support #477

Open
DicyRoll wants to merge 13 commits from DicyRoll/feat/spoolman into master
DicyRoll commented 2024-06-08 15:01:11 +02:00 (Migrated from github.com)

Hello, this PR adds support (install, update, remove, backup) for Spoolman as it was requested in #373.


Main outline

  • The install script follows the Spoolman docs and it has support for advanced configuration (only for the server's port at the moment)
  • The update script follows the Spoolman docs
  • The remove script deletes the Spoolman dir as well as the dir containing the SQLite db, cache and logs located by default in ~/.local/share/spoolman
  • The backup script copies both the Spoolman dir and the ~/.local/share/spoolman into kiauh's backup dir

Possible problems and thing to keep in mind

  • I've tested the installation with python 3.9 through 3.12: every version installs correctly other than python 3.12, there seems to be some problem when it tries to build wheels for greenlet (which seems to already have an open issue python-greenlet/greenlet#406) and uvloop. I could add a check and a warning for the python version to the install script, let me know what you think
  • As said above in the outline section the advanced configuration only allows to edit the server's port for now, the addition of more configuration steps (like external db servers as suggested in #373 (which I might implement in the future)) should be pretty straight forward by adding them to the advanced_config function

Of course let me know if something needs changing or improving

Hello, this PR adds support (install, update, remove, backup) for [Spoolman](https://github.com/Donkie/Spoolman) as it was requested in #373. --- ### Main outline - The install script follows the [Spoolman docs](https://github.com/Donkie/Spoolman/blob/master/README.md#:~:text=sudo%20apt%2Dget,scripts/install.sh) and it has support for advanced configuration (only for the server's port at the moment) - The update script follows the [Spoolman docs](https://github.com/Donkie/Spoolman/blob/master/README.md#:~:text=%23%20Stop%20and,rm%20%2Drf%20../Spoolman_old) - The remove script deletes the Spoolman dir as well as the dir containing the SQLite db, cache and logs located by default in `~/.local/share/spoolman` - The backup script copies both the Spoolman dir and the `~/.local/share/spoolman` into kiauh's backup dir ### Possible problems and thing to keep in mind - I've tested the installation with python 3.9 through 3.12: every version installs correctly other than python 3.12, there seems to be some problem when it tries to build wheels for [greenlet](https://github.com/python-greenlet/greenlet) (which seems to already have an open issue python-greenlet/greenlet#406) and uvloop. I could add a check and a warning for the python version to the install script, let me know what you think - As said above in the outline section the advanced configuration only allows to edit the server's port for now, the addition of more configuration steps (like external db servers as suggested in #373 (which I might implement in the future)) should be pretty straight forward by adding them to the `advanced_config` function Of course let me know if something needs changing or improving
dw-0 commented 2024-06-09 19:06:02 +02:00 (Migrated from github.com)

Thank you for the PR!
I will have a look at it once i find some time. I am currently working on a full python migration of KIAUH, hence my energy going into the current bash version is rather limited and usually i would refrain from merging that addition but it does not look very complex, so i think it would be fine to merge it and also migrate it to python afterwards to prepare it for KIAUH v6.

Are you interested in adding Spoolman as a KIAUH extension for v6 as well? On the v6 dev branch are some extensions already implemented, so you could take them as inspiration if you want. If not, im fine with it of course and i will migrate that myself afterwards.

Thank you for the PR! I will have a look at it once i find some time. I am currently working on a full python migration of KIAUH, hence my energy going into the current bash version is rather limited and usually i would refrain from merging that addition but it does not look very complex, so i think it would be fine to merge it and also migrate it to python afterwards to prepare it for KIAUH v6. Are you interested in adding Spoolman as a KIAUH extension for v6 as well? On the v6 dev branch are some extensions already implemented, so you could take them as inspiration if you want. If not, im fine with it of course and i will migrate that myself afterwards.
DicyRoll commented 2024-06-09 19:25:29 +02:00 (Migrated from github.com)

Hello!

I didn't realize how far along v6 is in development. (Oh well, at least now I have an idea of how KIAUH works.) This implementation is pretty straightforward, with much of the heavy lifting done by Spoolman's install.sh.

Regarding the v6 implementation, yes I'd be really happy to take a crack at that as well!

Hello! I didn't realize how far along v6 is in development. (Oh well, at least now I have an idea of how KIAUH works.) This implementation is pretty straightforward, with much of the heavy lifting done by Spoolman's `install.sh`. Regarding the v6 implementation, yes I'd be really happy to take a crack at that as well!
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin DicyRoll/feat/spoolman:DicyRoll/feat/spoolman
git checkout DicyRoll/feat/spoolman
Sign in to join this conversation.