-
Notifications
You must be signed in to change notification settings - Fork 159
fix(scripts/login.in): don't canonicalize symlink value #179
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
Conversation
|
Thank you for working on this though, The It would be useful and helpful to users coming from GNU/Linux, I think, if the There is, however, also the factor to consider that the original creator of This detail could be relevant for security, but from a usability perspective, it makes it inconvenient and tedious to set programs outside of the Termux folder as the default shell if desired, like for example the global mksh, I would be interested in a discussion about the potential benefits or drawbacks of relaxing the strictness of the permissions check in |
|
Thanks for your comments. |
|
Very good! I like this! I just have a couple of other small suggestions, and then I don't see anything else I would change here. Other people might have other comments about this though. I am not sure what fornwall's or agnostic-apollo's opinions about this would be since they designed the original behavior, and they might have chosen it for a reason. |
TomJo2000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tl;dr Quote your variables.
|
@TomJo2000 as far as I can see, every single thing you mentioned is something that is already there in the current master branch of termux-tools before any of the changes in this PR (so everything you mentioned is copied and pasted from the master branch). Does this mean you would like everything you mentioned to be changed globally throughout the repository, all at once? |
Is this PR not up to date with the |
It is (otherwise GitHub would say there are conflicts) what I mean to say is that every change you suggested (except for the double-exporting of |
We should clean up quoting across all scripts. |
For each case of green (added) "unquoted variables", "backtick command substitution", and " In my opinion, it would be more organized to make all those changes in a separate PR to keep them together, and keep this PR focused on solving these two issues: That way, the changes are individually readable and reviewable more easily, and whichever of the two PRs is merged last, is the PR that would end up having to be rebased over the changes added into master by the other PR. |
Eh, didn't notice that I guess.
That makes sense to me.
Yep that makes more sense. |
|
Thanks for both of your comments. |
|
Posix doesn't matter if |
|
|
And this change to convert |
That is essentially the breaking change proposed here, which is basically one way to solve these two problems:
If you know of different ways to solve those two problems, without introducing a breaking change, it would be interesting to investigate, Otherwise, it seems like a good idea to me, which would need to be documented in the release notes, and before deploying a release containing the change, some updates applied to all external softwares that read |
|
I guess other ways to resolve the two problems could be to replace the instance of the but in my opinion, creating a basic configuration file for setting the active shell would make the way Termux works slightly more familiar to users coming from GNU/Linux, who are used to being able to see the user's current login shell stored in plaintext in GNU/Linux's configuration file, Others might have other opinions, and if these problems are not considered high-priority enough to introduce a breaking change to solve, then of course this PR does not absolutely need to be accepted. |
|
I wasn't aware of |
Oh yeah |
|
Busybox issue occurs because symlinks are canonicalized by A text file to be consistent with linux distro would make sense if we had a formal format for such a config file, and at least not one named
Additionally, note that we are using |
|
That makes sense to me, though I would note after seeing this: if this is confirmation that part of the purpose of There was a situation when someone had a problem when using It is just an idea though, and isn't necessarily how this implementation of Some GNU/Linux distros have a very minimal default other ones have a much larger default https://github.com/gentoo/baselayout/blob/21a5713c09bc10104936e4ec8299953509d472c2/etc/shells |
|
Yes, |
|
I'm hoping to get back to the Apt 3 updates this weekend. |
Oh right, that would be the quoting of the |
|
I think merging together was more to do with final testing of both together before release, I haven't done that for both. Deb builds available in same pull would make things easier. Can bump termux-tools in a separate pull too. How much work is left for apt3? |
Final re-validation for E.g what needs to be rolled back, and how are we getting the DEBs for that? |
|
Please do leave any thoughts on that in termux/termux-packages#24212, I'm gonna call it a night. Also I wrote like 15 commits related to the Footnotes |
Unfortunately, I wasn't able to find where the change to |
|
I added some more detail on how the program works to the help message, hopefully that was what you meant. |
|
I posted the help you had to add, currently it doesn't include empty path either. |
|
Github doesn't let me copy links to review comments. So posting again. |
thank you for posting again - I think there must just be a bug in GitHub preventing us from seeing the previous message where that is, because I expanded every review box here and searched the HTML for those strings, and they don't appear anywhere on this page for me except your most recent comment. |
|
Yeah, I think I forgot to submit review. Sorry! |
|
I have added the help message now. Thanks! |
|
Looks good, thanks a lot! Can merge, I will leave any final testing to robert and tom. |
TomJo2000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no functionality changes since my last review, so I am happy to re-re-approve this PR.
Thanks for bearing with us @candrew66. 👍
I'll wait for final sign-off from @robertkirkman.
@agnostic-apollo am I interpreting your comment above correctly that I am good to merge this PR?
|
Yup, approve from me. I guess its up to robert now. |
chsh first checks for a shell using its absolute path (if it starts with `/`), before checking in `$PREFIX/bin/`
also allow shells owned by different effective group IDs
|
Thank you for your contribution. 👍 |
- Continuation of termux#179, particularly these topics from there: - termux#179 (review) - termux#179 (comment) - Contains things that were proposed there, but that it was decided to separate out into another PR for organization and easier review - Replaces space intendation with tab indentation in shell scripts - Replaces backtick command substitution syntax with dollar symbol and parentheses command substitution syntax in shell scripts - Places double quote symbols around all string (non-numerical) variable references that aren't possibly-empty references in the argument lists of command invocations - (placing double quote symbols around a possibly-empty variable in a command invocation is a case where the double quote symbols would cause an error to happen) - Places double quote symbols around all instances of `@TERMUX_PREFIX@` and other replaced strings in `.sh.in` files - Moves instances of multiline `local` variable declarations into single lines anywhere that doing so wouldn't make the line more than 100 characters long - Sets `-o pipefail` in any script that already had `set -e -u` at the top - Remove unused function `hostname()` from `pkg` - Remove unused variable `PREFIX` from `termux-restore` - Unify and clarify instances of `login`-related error message in `chsh`
- Continuation of termux#179, particularly these topics from there: - termux#179 (review) - termux#179 (comment) - Contains things that were proposed there, but that it was decided to separate out into another PR for organization and easier review - Replaces space intendation with tab indentation in shell scripts - Replaces backtick command substitution syntax with dollar symbol and parentheses command substitution syntax in shell scripts - Places double quote symbols around all string (non-numerical) variable references that aren't possibly-empty references in the argument lists of command invocations - (placing double quote symbols around a possibly-empty variable in a command invocation is a case where the double quote symbols would cause an error to happen) - Places double quote symbols around all instances of `@TERMUX_PREFIX@` and other replaced strings in `.sh.in` files - Moves instances of multiline `local` variable declarations into single lines anywhere that doing so wouldn't make the line more than 100 characters long - Sets `-o pipefail` in any script that already had `set -e -u` at the top - Remove unused function `hostname()` from `pkg` - Remove unused variable `PREFIX` from `termux-restore` - Unify and clarify instances of `login`-related error message in `chsh`
- Continuation of termux#179, particularly these topics from there: - termux#179 (review) - termux#179 (comment) - Contains things that were proposed there, but that it was decided to separate out into another PR for organization and easier review - Replaces space intendation with tab indentation in shell scripts - Replaces backtick command substitution syntax with dollar symbol and parentheses command substitution syntax in shell scripts - Places double quote symbols around all string (non-numerical) variable references that aren't possibly-empty references in the argument lists of command invocations - (placing double quote symbols around a possibly-empty variable in a command invocation is a case where the double quote symbols would cause an error to happen) - Places double quote symbols around all instances of `@TERMUX_PREFIX@` and other replaced strings in `.sh.in` files - Moves instances of multiline `local` variable declarations into single lines anywhere that doing so wouldn't make the line more than 100 characters long - Remove unused function `hostname()` from `pkg` - Remove unused variable `PREFIX` from `termux-restore` - Unify and clarify instances of `login`-related error message in `chsh`
Also: fix(scripts/chsh.in): allow passing absolute path to shell
Closes #140