-
Notifications
You must be signed in to change notification settings - Fork 25
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
openbsd: command line extract fails with xz #62
Comments
Added additional diagnostics with 6ec6106 |
We can re-open this but seems unlikely that I will have time to work on this. |
xfoo-1.00.tar.xz inherits group from directory and xz cannot handle this. To simulate the problem under Linux do the following: xz: foo: Cannot set the file group: Operation not permitted POSIX https://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html says: Man xz says: So I would say the behavior of the chown(2) system call on OpenBSD works correctly and this is a bug in xz. It tries to change the group of the new file although it is already correct. The author did not anticipate that this may fail. With Linux it works as the chown(2) system call allows to change to a group, in that the user does not belong, if the file has already the group. Try this on Linux: cd /tmp On OpenBSD the same Perl program fails: Linux man 2 chown says: Not documented is, that if the owner of the file changes to a group he is not member of and the file already belongs to this group, the system call succeeds. I would say this contradicts the "if and only if" in the POSIX statement. Neither xz nor Linux kernel are POSIX compliant. |
Fair.
|
Assuming that my analysis is correct, the correct fix would be to patch xz so that it also works on a POSIX compliant operating system. |
Let's see what the xz developers think about this patch. |
OpenBSD does not allow to change the group of a file if the user does not belong to this group. In contrast to Linux, OpenBSD also fails if the new group is the same as the old one. Do not call fchown(2) in this case, it would change nothing anyway. This fixes an issue with Perl Alien::Build module. PerlAlien/Alien-Build#62
Not sure if this is an xz, openbsd, or environment bug, but I get this from some cpantesters running openbsd
I am unable to reproduce on my own openbsd VM, and other cpantesters do not show this error.
The text was updated successfully, but these errors were encountered: