Closed stweil closed 2 years ago
Those commands run in sudo
context and "restore" the ownership to root
.
@kba, @bertsky, can we merge this PR? That is required before a PR for "solution 2" can be made.
Please elaborate why you think this line can be removed.
See my comment above: those commands run in sudo context and "restore" the ownership to root.
They operate on /root/.parallel
which is owned by root
before and after that command.
We change the permissions back because deps-ubuntu
must be called with sudo
.
With #323 we can be sure that the git
calls and consequently the $(SEMGIT)
calls are run as the user owning the repository.
That leaves the question whether deps-ubuntu
in the submodules' Makefiles does things beyond apt-get install
, right? or is there something else I am missing.
So, how about I merge this change into #323 and test in the context of that PR that for a fresh clone, sudo make deps-ubuntu
leaves all files in the repo and subrepo with the right permissions?
@stweil that line is meant to restore the permissions to ~/.parallel
after the sudo actions. (We run parallel
as root and might create configs there – at least on first use.)
@stweil that line is meant to restore the permissions to
~/.parallel
after the sudo actions. (We runparallel
as root and might create configs there – at least on first use.)
Yes, we run it as root
. Therefore ~
is /root
, and parallel
puts its files there.
We change the permissions back because
deps-ubuntu
must be called withsudo
.
We don't change any permissions for files created by parallel
"back". Either it runs as root
and writes files owned by root in the root home, or it runs as normal user and writes files owned by that user in the user's home. The comment which I removed, too, is simply misleading because it is wrong.
Note that the HOME
macro changes to /root
when running with sudo
.
Signed-off-by: Stefan Weil sw@weilnetz.de