openwrt/tools
Thomas Weißschuh 8040f74f8d tools/patch: apply patch for EACCES on xattr copy
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 <thomas@t-8ch.de>
(cherry picked from commit 0d375de10d)
2022-11-27 15:43:08 +01:00
..
autoconf
autoconf-archive
automake
b43-tools
bash
bc
bison
cbootimage
cbootimage-configs
ccache
cmake
coreutils
cpio
dosfstools
e2fsprogs
elftosb
expat
fakeroot
findutils
firmware-utils
flex
flock
genext2fs
gengetopt
gmp
include
isl
kernel2minor
libressl
libtool
llvm-bpf
lzma
lzma-old
m4
make-ext4fs
meson
missing-macros
mkimage
mklibs
mpc
mpfr
mtd-utils
mtools
ninja
padjffs2
patch tools/patch: apply patch for EACCES on xattr copy 2022-11-27 15:43:08 +01:00
patch-image
patchelf
pkgconf
quilt
sdimage
sed
sparse
squashfs
squashfskit4
sstrip
tar
xz
zip
zlib
zstd
Makefile