-
Notifications
You must be signed in to change notification settings - Fork 71
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 Clippy warnings for rustc version 1.65 #652
Fix Clippy warnings for rustc version 1.65 #652
Conversation
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.
Thanks!!
d9ce89b
to
a213f29
Compare
3cc84e2
to
e0fd688
Compare
Two warnings have been introduced and both are from category: needless_borrow This commit is to remove the needless borrow Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
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.
Firstly, why do we set 777 if we need write permissions?
Secondly, I'm not sure the new rust deployment procedure would require write permissions for everyone to the rust registry.
Why do we set 777? we need read and write permissions (not sure about the execute, but I believe we need it as well). |
I think if we need to change permissions for the rust registry to by open for everyone then we do something wrong with either rust installation or build procedure. We need to fix that instead of adding a work-around. Using "su" for running cargo also looks strange. For example, a similar issue was fixed without setting 777 permissions: |
I guess the benefit of using a common registry is not to download and build the same stuff again. By having a separate registry, we will lose this benefit. (as we are running the same test but for different users) Not sure why |
Ignore my comment about "su", I didn't scroll enough to the side to see the whole command. |
Yea, it's mentioned in the slack discussion here. I don't mind either approach, but the thing is, having a common group might (with unmask) allow users to access each other files (through group permission) might not be a good idea. I will take a look at the tests closely. @ionut-arm, Could you give us your insights on the common group? |
My reason is that for me permissions 777 always look like a hack saying "we didn't care to think about defining correct permissions". It's not a good example of using Parsec even if it's only in a test container Parsec book recommends to use parsec-clients group for client applications that wish to use the Parsec service: https://parallaxsecond.github.io/parsec-book/getting_started/installation_options.html So, instead of using 777 on the registry in ci.sh I would prefer to see in the docker image
|
I think, if possible, using the group approach might be better. I think the tests we have which require multiple users are less about how the users can mess with each other, and more about showing that we can - in the Parsec service - facilitate user ID-based authentication. What the users can then do to each other outside of the service isn't really a concern (unless, of course, that has some implication on the actual tests). |
8fd338e
to
4641bfa
Compare
Hey @anta5010, @ionut-arm |
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
Motive: The latest rust release (1.65) seems to handle the registry differently. It needs to write permissions to the registry for each command. Even if the package is in the registry. Solution: Create a common group for parsec clients users which grant them r/w access to the registry (files in general). Set the group owner of /opt/rust/registry to the common group and set permissions to 775. i.e. "drwxrwxr-x 1 root parsec-clients registry" Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
4641bfa
to
3c338db
Compare
Two warnings have been introduced, and both are from the category: needless_borrow
This commit is to remove the needless borrow
Signed-off-by: Mohamed Omar Asaker mohamed.omarasaker@arm.com