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
Clean / improve install script #46
Conversation
…erly changed during postinstall
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.
I've read all the commits, apart the bind9 grep everything looks fine for me (and the "keep old log stuff" but that's less important).
Thanks for this significant amount of work in improving the quality of this code 👍
install_yunohost
Outdated
@@ -210,6 +216,14 @@ function check_assertions() | |||
if is_raspbian ; then | |||
user_pi_logged_out || die "The user pi should be logged out." | |||
fi | |||
|
|||
# Check possible conflict with apache, bind9. | |||
[[ -z "$(dpkg --list | grep ' bind9')" ]] || [[ "$FORCE" == "1" ]] \ |
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.
This one will likely failed because it greps every package that has "bind9" in its name and YunoHost itself requires bind9-utils (for dyndns-keygen used by TSIG). You probably want to do a grep 'bind9 '
(with a space).
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.
This one will likely failed because it greps every package that has "bind9" in its name and YunoHost itself requires bind9-utils (for dyndns-keygen used by TSIG). You probably want to do a grep 'bind9 '
(with a space).
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.
Indeed, not sure why but actually in the final diff it's with bind9
(which is probably why github is flagging as outdated) so that should be ok :P
install_yunohost
Outdated
parse_options | ||
parse_options "$@" | ||
|
||
rm -f $YUNOHOST_LOG |
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.
You might want to do a mv
+ date $YUNOHOST_LOG $YUNOHOST_LOG$(date +%F_%X)
instead to keep old logs for debugging.
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.
Yea, I was a bit lazy about that but that shouldn't take long to implement, will do x)
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.
okay, once it's done you can merge for me :)
Ah, so apparently github haven't kept my bind9 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.
Review system seems broken when made on several commits.
install_yunohost
Outdated
@@ -210,6 +216,14 @@ function check_assertions() | |||
if is_raspbian ; then | |||
user_pi_logged_out || die "The user pi should be logged out." | |||
fi | |||
|
|||
# Check possible conflict with apache, bind9. | |||
[[ -z "$(dpkg --list | grep ' bind9')" ]] || [[ "$FORCE" == "1" ]] \ |
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.
This one will likely failed because it greps every package that has "bind9" in its name and YunoHost itself requires bind9-utils (for dyndns-keygen used by TSIG). You probably want to do a grep 'bind9 '
(with a space).
Also thanks a lot for having taken the time to split this in a lot of commits, this has made the review painless for me and I greatly appreciate it ❤️ |
Fixed the remaining point and tested an install on a VPS with |
That looks weird, but shouldn't we fix that before merging :o? |
I guess x) I'll have a deeper look |
So after investigating :
So, not sure what to do with this... I see those possibilities :
|
Okay I'm merging this as is, since as described, the issue I mentioned is not related to the changes but with the way I did my tests. We can discuss at some point how we want to design the use of this script. |
This is an attempt to clean and improve the install script.
In particular, for the following :
if ! step foo; then die "bar" fi
, just dostep foo || die "bar"
) ;curl | bash
instruction, we need to avoid the case where thecurl
ends up in the middle of the request, but still dumps half the script and we get weirdly corrupted installs ;As discussed in https://dev.yunohost.org/issues/525 , one of the goal is also to move towards a simple
curl https://install.yunohost.org | bash
install procedure (and provide more cautious instructions for people willing to check integrity / authenticity..). In particular, we should also be able to move step 3 (= check that root has password - not sure why it's necessary) as a check inside the script.