Description of problem: Using the Yocto projet tool, I used to compile linux distribution. After an OS upgrade I just encountered this error which is unexpected. Version-Release number of selected component (if applicable): 1.32 How reproducible: Always Steps to Reproduce: 1. Create a folder 2. populate this folder with empty files (mode 644) and one mode 444 3. archive with attributes and then try to extract preserving attributes... simple code mkdir src touch src/a touch src/b chmod 444 src/b mkdir out tar --xattrs --xattrs-include='*' -cf - -S -C src -p . | tar --xattrs --xattrs-include='*' -xf - -C out tar: ./b: Cannot open: Permission denied tar: Exiting with failure status due to previous errors Actual results: failure Expected results: pass Additional info: $ ls -lZ src/ total 0 -rw-r--r--. 1 shaiton shaiton unconfined_u:object_r:user_home_t:s0 0 8 oct. 18:48 a -r--r--r--. 1 shaiton shaiton unconfined_u:object_r:user_home_t:s0 0 8 oct. 18:48 b $ lsattr src/ --------------e----- src/a --------------e----- src/b setxattr("/proc/self/fd/5/./a", "security.selinux", "unconfined_u:object_r:user_home_"..., 37, 0) = 0 openat(5, "./a", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK|O_CLOEXEC, 0644) = 6 utimensat(6, NULL, [UTIME_OMIT, {tv_sec=1602175704, tv_nsec=679442719} /* 2020-10-08T18:48:24.679442719+0200 */], 0) = 0 close(6) = 0 mknodat(5, "./b", 0444) = -1 EEXIST (File exists) unlinkat(5, "./b", 0) = 0 mknodat(5, "./b", 0444) = 0 setxattr("/proc/self/fd/5/./b", "security.selinux", "unconfined_u:object_r:user_home_"..., 37, 0) = 0 openat(5, "./b", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK|O_CLOEXEC, 0444) = -1 EACCES (Permission denied) write(2, "tar: ", 5tar: ) = 5 write(2, "./b: Cannot open", 16./b: Cannot open) = 16 write(2, ": Permission denied", 19: Permission denied) = 19 write(2, "\n", 1
Apparently this is not the bug I am facing, as the same code behave exactly the same under F32. However I keep it open in order to understand what is wrong with extracting a read only file from a tar archive and preserving its attributes. Thanks
Thank you for the report, Kevin! I proposed the following patch upstream: https://github.com/praiskup/tar/commit/63982eb098f6798a314d8f6aeb2e4139a78d2922
Proposal: https://www.mail-archive.com/bug-tar@gnu.org/msg05904.html
Thanks Pavel for your prompt reaction. Happy to try any koji (s)rpm if needed
Ok, testing build is here: https://copr.fedorainfracloud.org/coprs/praiskup/rhbz-1886540-tar/ ( dnf copr enable praiskup/rhbz-1886540-tar ) Though I'd like to give the upstream some time to react before we apply this against the Fedora package.
PR: https://src.fedoraproject.org/rpms/tar/pull-request/7
Oh yeah I forgot about copr. Works for me. I am still looking for the change between F32 where the same code raises the same issue but the « yocto build » is a success. This should not be a blocker for the F33 release, therefore no probs to wait for the upstream feedback.
Patch still not applied upstream.
This message is a reminder that Fedora 33 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '33'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 33 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Updated against latest upstream source (in my "mirror"), and CI tested: https://github.com/praiskup/tar/pull/2
I've tried to reach out to the upstream again: https://www.mail-archive.com/bug-tar@gnu.org/msg06146.html
This message is a reminder that Fedora Linux 35 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '35'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 35 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13. Fedora Linux 35 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.
PR https://src.fedoraproject.org/rpms/tar/pull-request/7 updated
Upstreamed in tar-1.35 version, which is in Fedora Rawhide.