-
Notifications
You must be signed in to change notification settings - Fork 86
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
Advise adding a requirement to run script as normal user #573
Comments
Hi!, thanks for taking the time to report an issue. I'm sorry to hear that you ended up with problems while running the installation script on a root shell. Working on a root shell is highly discouraged in most distros (especially Ubuntu and derivatives). If I remember correctly, depending on the method used to gain root access on your shell, your environment variables may or may not have been reset from user to root. So things like $PATH, or $HOME may still be the user's while running the commands as root. I have the impression that this is what happened to you.
The problem here is to define what 'improper' means here. E.g. running the script as root is not a problem per se. Perhaps a check could be added to verify that $HOME, What method was used to get your root shell? Do you know? |
Hello, I was intentionally running as root from a prior project. Therefore everything was ran with root user's environment variables. I can see your PoV about running it as root not being a problem; I do realize now it's an option I chose rather than an issue with how the script itself should function. Your idea of checking the env rather than just the user sounds like a good implementation if this was a more common issue. I don't particularly like running pip with sudo (my mistake not reading the script + root shell), perhaps you could install as user and check if $PATH needs to be appended if it isn't a requirement to do so. The only actual issue that occurred was needing to install Tizonia packages manually but I don't see where that issue could've arisen from your end. |
Hi,
The script is intended to do a system-wide installation of Tizonia, and that is why a system-wide installation of pip packages is the only option. That is the only way to guarantee that Tizonia works for all users in the system. If someone wishes to install pip packages in its user environment only, then the option of tweaking the script to do But I like the idea of warning the user if the script is run as root, in which case I think the execution should be aborted. So I'm thinking about adding a command-line option to the script that would be required in case you want to install as root. E.g. something along these lines:
|
This change has been commited to master : 3823763 |
I've got to say, you've one of the most responsive and cordial devs I've had the pleasure of speaking with. I hope to be able to emulate the same level of professionalism that you've shown someday. Thanks for all you do. |
[Description of the issue]
Was in root shell when I ran install.sh, caused pip modules to be given root permissions and I had to reconfigure all the packages.
Steps to Reproduce
Expected behavior: For the script to end if shell configuration was improper. This was after I actually read the script and saw it had calls for root access, my mistake. Otherwise I thought it would installed correctly with packaging making it easy to remove.
Actual behaviour: Pip modules installed as root, recursive dependencies of missing packages. Unable to install/uninstall packages due to reverse dependencies/recursive dependencies.
Reproduces how often: Once. I'm not fond of hurting myself.
Versions
tizonia 0.18.0
Debug Info:
* [Boost 1_65_1]
* [TagLib 1.11.1]
* [MediaInfoLib - v17.12]
ID_LIKE="ubuntu debian"
PRETTY_NAME="KDE neon Developer Edition"
VERSION_ID="18.04"
Python = 2.7.15rc1
Python = 3.6.7
apt = 1.6.10 (amd64)
Installation Method Used
curl -kL https://github.com/tizonia/tizonia-openmax-il/raw/master/tools/install.sh | bash
Additional Information
Paste of installation log:
https://0bin.net/paste/S9E20yhBpf5zBl5h#8IuC+pDphJCdnqV9keg3m0zpV2AhZpBW7avhb0x1+L9
Any additional information, configuration or data that might be necessary to
reproduce the issue.
Unsure. Running apt update or repair operators did not resolve the issue. I went to the repository and downloaded the .deb files for my architecture, then used dpkg -i to install.
The text was updated successfully, but these errors were encountered: