-
Notifications
You must be signed in to change notification settings - Fork 147
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
New code layout for SUSI application #481
Comments
Thanks for the ideas, I agree with the general proposal, but want to point out a few things
To fall in line with what you proposed, we should
|
Actually git grepping through susi_linux git it is not so bad ... most sudos can be categorized into the following categories:
So I think that getting rid of the That is BTW the biggest problem with packaging |
@norbusan
About using |
On current desktop, the pulseaudio deamon is often started in the user session, that is, when a user logs in, Other users, in our case the
That is true. The underscore is not a required option. It is one option to make sure that we don't create a username that might be taken at the moment or in the future. Concerning Hope that explains my intentions |
Sorry I don't have enough time to think carefully to give a proper proposal, so I just give brief of my thinking here and we will discuss about new project layout for SUSI.
Why we need it?
My suggestion:
Object is to transform SUSI Server, SUSI Linux, so that it can be packaged to *.deb. We then setup a repo to distribute the updates in form of deb. Other than deb, recently there are new packaging mechanism like snap, flatpak. The later try to isolate the application in a sandbox environment. This sounds secure, but in fact, that isolated environment causes many bugs that prevent the app from accessing other system's resource. So I decide to stay with deb. We also deliver the RaspberryPi box with just enough software and don't want user to install more to it, so we don't really need an isolated environment for our SUSI apps in that box.
When packaged in deb, our app will be installed in system folders (/etc, /usr/share, /var/lib) where normall user cannot overwrite. That prevents user from modifying our code (and break the app) by accident.
With deb package, the factory reset is easy: Just reinstall the app with
apt install --reinstall
. Resetting configuration is also easy:dpkg-reconfigure
.Being installed to system folder, our app needs a dedicated user for it. I suggest to create a user
susi
with home folder in/var/lib/susi
to run our app. This user can be created by postinst script of deb package. Other than that, we will add this user togpio
group so that it can access GPIO without "sudo". That "adding user to group" step can also be done automatically with postinst script.To be simple, we let both SUSI Server and SUSI Linux run in
susi
user.The text was updated successfully, but these errors were encountered: