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
Ownership of files #3
Comments
Sounds reasonable; you are suggesting set owner to root, and group to wheel? |
Yes, that's what I am suggesting. You can do this after creating the mpkg, with reown_mpkg, but still, bist_mpkg could do this as well. Btw. reown_mpkg could have root:wheel as default I guess, but that is a minor issue. |
Hum. By default it seems that an 'Admin' user is a member of the 'admin' group, but not the 'wheel' group. This means that this will fail, by default, without sudo
This will also fail:
So - if I attempt these it means the
|
Hmmm, it is already not optimal that the building user has to have admin rights, and it is even worse if one has to do sudo to build. But it seems like there is no other way to get proper user:group settings. I really don't know what is the good solution here. |
By the way, the recommended ownerships appear to be |
root:admin is fine with me as well. I just saw that the other Python packages were installed as root:wheel, that's why I thought that that's the standard. Btw. you can try running 'Verify permissions' or 'Repair permissions' (or whatever it is called) on the Volume you install the package to, and then it will tell you if root:admin is inappropriate. Probably it is fine. |
Although you link points to a retired, outdated document..... |
I think the best thing is to leave the current behavior as is, which is just to change the installable files to We can add a warning to run sudo reown_mpkg dist/yourpackage-version.mpkg to fix the permissions on the package. The preserves backwards compatibility, doesn't require sudo for building packages, and at least warns the user about the permission problems. Do you agree? |
Well, I am not happy, but what can we do? So yes, I agree. It would be really nice to be able to build an mpkg on my build server, by a non-admin user, but looks like it is impossible right now. I am looking into building a dmg, that contains the mpkg, and modifying the user/group/permission in the dmg should be definitely possible, because it is just a file. But this is another issue..... |
Thanks for taking the time to work this out, btw. |
Suggest running `reown_mpkg` on the built archive. Closes MacPythongh-3 - thanks to @gaborcsardi for pointing out the problem.
RF: warn about permissions of archive Suggest running reown_mpkg on the built archive. Closes gh-3 - thanks to @gaborcsardi for pointing out the problem.
bdist_mpkg sets the group of the files in the mpkg, but it does not set the owner. So the files installed by mpkg might have a random owner.
Also, I am not sure if setting the group to
admin
is the best practice, because other python packages have groupwheel
:The text was updated successfully, but these errors were encountered: