-
Notifications
You must be signed in to change notification settings - Fork 112
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
postinst:(su) run the Workstation App as mortal user #938
Conversation
Launched an ad hoc build |
I had a problem running the ad hoc build, the error message is:
I think I need to fix the |
New ad hoc build here! |
@@ -58,7 +58,11 @@ if is_darwin; then | |||
|
|||
# Restart the app if it was running. | |||
echo "Restarting Chef Workstation App..." | |||
$INSTALLER_DIR/bin/$app_launcher load | |||
echo "USER: $USER" |
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.
Could we remove the echos? The output is not actionable or informative to the operator .
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.
Agree.
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.
100% agreed!! I need to:
- wait for the Chef Workstation App to bump its version
- rebase this branch
- remove the echos
- merge!
This build is just for debugging as the commit message says it. I will remove that commit in a bit. thanks for the prompt review
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.
@jonsmorrow @marcparadise could you review again now? I have removed the echos and rebased this branch! 💯
@@ -58,7 +58,11 @@ if is_darwin; then | |||
|
|||
# Restart the app if it was running. | |||
echo "Restarting Chef Workstation App..." | |||
$INSTALLER_DIR/bin/$app_launcher load | |||
echo "USER: $USER" |
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.
Agree.
echo "USER: $USER" | ||
echo "USERNAME: $USERNAME" | ||
echo "SUDO_USER: $SUDO_USER" | ||
echo "HOME: $HOME" |
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.
It doesn't appear $HOME is used anywhere?
#940 Merged the Tray App is now version |
Last ad hoc build! Let us wait for 2 hours for the build and then let us verify the functionality, if everything looks good then l will merge this PR. |
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.
LGTM, assuming you've verified sudo_user will be set in all normal cases the user has used sudo to install.
@marcparadise I think that is how omnibus runs the |
@afiune postinst is run by the platform package manager (rpm, dpkg); omnibus is responsible for putting it in the right place in the package itself. |
Good that I tested! We need to use
I will update this PR! 🥇 |
22c4cce
to
f8804dc
Compare
Signed-off-by: Salim Afiune <afiune@chef.io>
f8804dc
to
9e09de0
Compare
This is the good one!! This ad hoc build should work! |
Description
Update the
postinst
to run the Workstation App as a mortal user instead ofroot
.Signed-off-by: Salim Afiune afiune@chef.io
Related Issue
Depends on chef/chef-workstation-app#160
Types of changes
Checklist: