openplotter / openplotter-settings

Main OpenPlotter app
GNU General Public License v3.0
77 stars 13 forks source link

contrib proposal: Add repositories during Debian package installation. #21

Closed FredericGuilbault closed 1 year ago

FredericGuilbault commented 1 year ago

I would like to do a pull request that add the openplotter repositories to the host machine during the post-install hook of the debian package instead of from /usr/bin/openplotter-settings

My need is to have the packages of the repository available without having to run openplotter-settings and while we have full root permission.

For reference, the Opera browser is doing like this: https://pastebin.com/05nnnkbR

Would you be interested ?

sailoog commented 1 year ago

I would prefer to keep the current system because Openplotter sources have undergone many changes in the past and this system is flexible enough for future changes. Debian's packaging rules are very restrictive (thankfully) and the current system (python) can interact with all other Openplotter packages.

If you need that for your project, you can do what we do in openplotter-gen for unattended sources installation: https://github.com/openplotter/pi-gen/blob/openplotter64/stage6/00-add-sources/00-run.sh

FredericGuilbault commented 1 year ago

If you need that for your project,

Yep, that's what I did, ( and that should be the installation procedure for any non-dev IMO ). But while exploring openplotter and clicking around, I have been quite surprised about some wild https://www.free-x.de/deb4op adding itself to a root owned file. That's why I started to look at the source code.

I must say that from a Linux perspective, there is something wrong in this.

FredericGuilbault commented 1 year ago

this system is flexible enough for future changes.

The .deb Packaging system should be flexible enough for any future changes (as it has been good enough for any package that debian maintain since 1993). Repository list tho should be solidly static.

FredericGuilbault commented 1 year ago

After further testing the paswordless ability to write in root:root files only happens on liveOS, but if I try to do it with nano or others, I need the password. Somehow openplotter seem to be able to use the live's user sudoers rules.


EDIT: I have found in /var/log/auth.log that it allowed pkexec settingsSourcesInstall to be run without prompting for password, where sudo would not have allowed it. This is where the difference between the liveOS env and the installed one reside.

FredericGuilbault commented 1 year ago

Im closing as you says you will keep it like that. Although there is something still bugging me in the fact that the procedure require installing a package that contain a script that need to be run to add a repo that containing the initial package. On the other hand, I completely understand that your main usage is to ship the openplotter OS, not to distribute the software, so that's edge case for you. ....and we all have limited time available :)