Skip to content
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

To build without sudo. #3789

Merged
merged 1 commit into from
Oct 17, 2017
Merged

To build without sudo. #3789

merged 1 commit into from
Oct 17, 2017

Conversation

spasam
Copy link
Contributor

@spasam spasam commented Oct 5, 2017

Assuming required software has been installed, it is not necessary to have
sudo access to build osquery. make deps and make can be run if dependency
path is overwritten. Add OSQUERY_NOSUDO flag to skip sudo.

Assuming required software has been installed, it is not necessary to have
sudo access to build osquery. make deps and make can be run if dependency
path is overwritten. Add OSQUERY_NOSUDO flag to skip sudo.
@facebook-github-bot facebook-github-bot added the cla signed Automated label: Pull Request author has signed the osquery CLA label Oct 5, 2017
@muffins muffins added the build label Oct 5, 2017
@muffins
Copy link
Contributor

muffins commented Oct 5, 2017

ok to test

@muffins
Copy link
Contributor

muffins commented Oct 14, 2017

@spasam I'm alright with landing this, could you paste some examples of you running with both OSQUERY_NOSUDO=True and OSQUERY_NOSUDO=False to demonstrate it's working?

@spasam
Copy link
Contributor Author

spasam commented Oct 17, 2017

Crap somehow missed the message.

@muffins OSQUERY_NOSUDO=True is the only one that matters. Any other value or unset OSQUERY_NOSUDO will need sudo access.

Use case is simple. I don't like giving build accounts (eg: jenkins) sudo privileges. We have been building osquery with this change for a while now.

Out of band, we setup /usr/local/osquery with the right ownership. Instead of using make depsclean we use rm -rf /usr/local/osquery/*. With OSQUERY_NOSUDO=True we can then run make deps

rm -rf /usr/local/osquery/*
export OSQUERY_NOSUDO=True
make deps
make -j4

@spasam
Copy link
Contributor Author

spasam commented Oct 17, 2017

BTW, make sysprep still requires sudo (as it does not use do_sudo function)

@theopolis theopolis merged commit 40eaddb into osquery:master Oct 17, 2017
@muffins
Copy link
Contributor

muffins commented Oct 17, 2017

Sorry, mean to close this last night but it completely slipped my mind!

@spasam spasam deleted the sudo branch November 12, 2017 23:41
trizt pushed a commit to trizt/osquery that referenced this pull request May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build cla signed Automated label: Pull Request author has signed the osquery CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants