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

Fix ownership issues with client/build-external #2153

Merged
merged 1 commit into from
Jan 27, 2017

Conversation

ekimekim
Copy link
Contributor

When the directory is created during the build process, it is as root.

This prevents us deleting root-owned files inside the directory during make clean.

In client/build/, we get around this because the directory contains a tracked file,
so it's created during git checkout.
We make this the case for build-external by adding a hidden, empty file to track.
This won't fix existing checkouts though, so we also add a fix-up step to make clean.

Fixes #2031

@2opremio
Copy link
Contributor

You may consider using a .gitignore file, like suggested at http://stackoverflow.com/a/932982/1914440

@ekimekim ekimekim force-pushed the mike/track-build-external branch from 8267df0 to e87fb80 Compare January 27, 2017 00:10
@ekimekim
Copy link
Contributor Author

done. PTAL?

@2opremio
Copy link
Contributor

LGTM, CI failed though

@ekimekim
Copy link
Contributor Author

ERROR: unsatisfiable constraints:
  bash (missing):
    required by: world[bash]

fixed by #2158, so I'll rebase on master to pick it up

When the directory is created during the build process, it is as root.

This prevents us deleting root-owned files inside the directory during make clean.

In client/build/, we get around this because the directory contains a tracked file,
so it's created during git checkout.
We make this the case for build-external by adding a hidden, empty file to track.
This won't fix existing checkouts though, so we also add a fix-up step to make clean.

The use of .gitignore as the empty file to track is taken from
	https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F
Specifically:
	"If you really need a directory to exist in checkouts you should create a file in it.
	.gitignore works well for this purpose"
@ekimekim ekimekim force-pushed the mike/track-build-external branch from e87fb80 to 02a2dd9 Compare January 27, 2017 22:57
@ekimekim ekimekim merged commit 9b21183 into master Jan 27, 2017
@ekimekim ekimekim deleted the mike/track-build-external branch January 27, 2017 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make clean fails with rm: ... Permission denied
2 participants