January 8, 2021, 7:23am
I just start
GitHub - YunoHost-Apps/ci_ynh: Experimental YunoHost package check as a YunoHost app using Django... as a experiment…
The idea is to run something like the package check via YunoHost App. So every developer can easy maintain a own “CI Server” for his own projects, just by install “ci_ynh”
I plan to use these tools:
Django admin as “WebGUI” (managing the list of which packages to check, see results etc)
Huey task queue that will run the package checks
The idea is to install/backup/deinstall/restore one package and check if it’s available. Collect the output and store everything in the database.
But I will probably only have time for a first prototype.
January 8, 2021, 11:48am
I added a first source code dump
The question is: how to execute something like: “install package XY” ?
Currently i call something like:
sudo yunohost app install ... via subprocess, here:
This file has been truncated.
from ci_ynh.models import Check, Package
logger = logging.getLogger(__name__)
def call_yunohost(*, action_name, args, package, check):
logger.info('Start %r subprocess for "%s" with: %r', action_name, package, ' '.join(args))
process = subprocess.run(
timeout=15 * 60,
But that may not be a really good idea. At least, because of using
January 8, 2021, 4:53pm
It’s a little bit active (After i start Huey worker manually):
(Looks ugly because of not existing translations)
January 8, 2021, 5:49pm
I am trying this approach right now:
I create a second user, add him to “sudo” group and start Huey worked as these user.
WIP: Use different user for Huey worker and add it to sudoes · YunoHost-Apps/ci_ynh@4d36254 · GitHub
But failed with:
e.g.: Can i talk to a API endpoint to install/deinstall packages?!?
January 9, 2021, 5:50pm
I try to run Huey task query as root, see:
Run Huey as root · YunoHost-Apps/ci_ynh@afbdcbc · GitHub
Anybody with a better idea?
January 17, 2022, 4:06pm
What’s about to create a user without need to enter the sudo password?!?
Or create a root service that handle the installation?
January 17, 2022, 4:31pm
…but maybe it’s generally a bad idea to install the package directly and not using something like LXC. Because if the installation is faulty then we may stick with a unknown state and a de install may not cleanup everything.