Skip to content
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

tools/patch: apply patch for EACCES on xattr copy #10469

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

1582130940
Copy link
Contributor

When compiling OpenWRT on a compressed btrfs volume the build fails in libtool.
The file libltdl/config/ltmain.m4sh from libtool-2.4.2.tar.xz is missing write permissions, therefore patch falls back to copying the file and patching that. During this patch tries to preserve all file attribute on the new copy.
However the attribute btrfs.compression is privileged and btrfs return EACCES.
While patch ignores multiple other error codes during the copy of xattr copy it is not prepared for EACCES and aborts.

EACCES should be ignored the same way as the other errors.

Build log:

...
Applying ./patches/000-relocatable.patch using plaintext:
patching file libltdl/config/general.m4sh
patching file libtoolize.in
patching file libtoolize.m4sh
patching file libltdl/m4/libtool.m4

Applying ./patches/100-libdir-fixes.patch using plaintext:
patching file libltdl/config/ltmain.m4sh
File libltdl/config/ltmain.sh is read-only; trying to patch anyway
patching file libltdl/config/ltmain.sh
patch: setting attribute btrfs.compression for btrfs.compression: Permission denied
Patch failed!  Please fix ./patches/100-libdir-fixes.patch!

Link: https://lists.gnu.org/archive/html/bug-patch/2022-11/msg00000.html
Signed-off-by: Thomas Weißschuh [email protected]

Q:你知道这是pull request吗?(使用 "x" 选择)

  • 我知道

When compiling OpenWRT on a compressed btrfs volume the build fails in
libtool.
The file `libltdl/config/ltmain.m4sh` from `libtool-2.4.2.tar.xz` is
missing write permissions, therefore patch falls back to copying the
file and patching that. During this patch tries to preserve all file
attribute on the new copy.
However the attribute `btrfs.compression` is privileged and btrfs return
EACCES.
While patch ignores multiple other error codes during the copy of xattr
copy it is not prepared for EACCES and aborts.

EACCES should be ignored the same way as the other errors.

Build log:
```
...
Applying ./patches/000-relocatable.patch using plaintext:
patching file libltdl/config/general.m4sh
patching file libtoolize.in
patching file libtoolize.m4sh
patching file libltdl/m4/libtool.m4

Applying ./patches/100-libdir-fixes.patch using plaintext:
patching file libltdl/config/ltmain.m4sh
File libltdl/config/ltmain.sh is read-only; trying to patch anyway
patching file libltdl/config/ltmain.sh
patch: setting attribute btrfs.compression for btrfs.compression: Permission denied
Patch failed!  Please fix ./patches/100-libdir-fixes.patch!
```

Link: https://lists.gnu.org/archive/html/bug-patch/2022-11/msg00000.html
Signed-off-by: Thomas Weißschuh <[email protected]>
@aiamadeus aiamadeus merged commit 9cd6f16 into coolsnowwolf:master Nov 21, 2022
github-actions bot added a commit to liyufan/lede that referenced this pull request Nov 21, 2022
github-actions bot added a commit to Pengfei00/lede that referenced this pull request Nov 21, 2022
github-actions bot added a commit to aiastia-bak/lede that referenced this pull request Nov 21, 2022
github-actions bot added a commit to September999999999/lede that referenced this pull request Nov 21, 2022
github-actions bot added a commit to HongJie-Master/lede that referenced this pull request Nov 21, 2022
github-actions bot added a commit to Sneezyw/lede that referenced this pull request Nov 21, 2022
github-actions bot added a commit to ZHYxulei/lede that referenced this pull request Nov 21, 2022
github-actions bot added a commit to chingxuds/lede-custom that referenced this pull request Nov 21, 2022
github-actions bot added a commit to 2054686334/lede that referenced this pull request Nov 21, 2022
github-actions bot added a commit to mchh1234/lede that referenced this pull request Nov 21, 2022
github-actions bot added a commit to Jinnrry/lede that referenced this pull request Nov 21, 2022
github-actions bot pushed a commit to zesming/lede that referenced this pull request Nov 22, 2022
@1582130940 1582130940 deleted the pull branch November 22, 2022 02:13
github-actions bot added a commit to DeakeyTan/openwrt that referenced this pull request Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants