comparison src/feature.h @ 33408:dcfbfe57141c v9.0.1962

patch 9.0.1962: No support for writing extended attributes Commit: https://github.com/vim/vim/commit/e085dfda5d8dde064b0332464040959479696d1c Author: Christian Brabandt <cb@256bit.org> Date: Sat Sep 30 12:49:18 2023 +0200 patch 9.0.1962: No support for writing extended attributes Problem: No support for writing extended attributes Solution: Add extended attribute support for linux It's been a long standing issue, that if you write a file with extended attributes and backupcopy is set to no, the file will loose the extended attributes. So this patch adds support for retrieving the extended attributes and copying it to the new file. It currently only works on linux, mainly because I don't know the different APIs for other systems (BSD, MacOSX and Solaris). On linux, this should be supported since Kernel 2.4 or something, so this should be pretty safe to use now. Enable the extended attribute support with normal builds. I also added it explicitly to the :version output as well as make it able to check using `:echo has("xattr")`, to have users easily check that this is available. In contrast to the similar support for SELINUX and SMACK support (which also internally uses extended attributes), I have made this a FEAT_XATTR define, instead of the similar HAVE_XATTR. Add a test and change CI to include relevant packages so that CI can test that extended attributes are correctly written. closes: #306 closes: #13203 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Sep 2023 13:00:06 +0200
parents 695b50472e85
children ac02f2b5e9e2
comparison
equal deleted inserted replaced
33407:c476e82af6a7 33408:dcfbfe57141c
20 /* 20 /*
21 * When adding a new feature: 21 * When adding a new feature:
22 * - Add a #define below. 22 * - Add a #define below.
23 * - Add a message in the table above ex_version(). 23 * - Add a message in the table above ex_version().
24 * - Add a string to f_has(). 24 * - Add a string to f_has().
25 * - Add a feature to ":help feature-list" in doc/eval.txt. 25 * - Add a feature to ":help feature-list" in doc/builtin.txt.
26 * - Add feature to ":help +feature-list" in doc/various.txt. 26 * - Add feature to ":help +feature-list" in doc/various.txt.
27 * - Add comment for the documentation of commands that use the feature. 27 * - Add comment for the documentation of commands that use the feature.
28 */ 28 */
29 29
30 /* 30 /*
1173 || defined(DYNAMIC_MZSCHEME) \ 1173 || defined(DYNAMIC_MZSCHEME) \
1174 || defined(DYNAMIC_LUA) \ 1174 || defined(DYNAMIC_LUA) \
1175 || defined(FEAT_TERMINAL) 1175 || defined(FEAT_TERMINAL)
1176 # define USING_LOAD_LIBRARY 1176 # define USING_LOAD_LIBRARY
1177 #endif 1177 #endif
1178
1179 /*
1180 * XATTR support
1181 */
1182
1183 #if defined(FEAT_NORMAL) && defined(HAVE_XATTR)
1184 # define FEAT_XATTR
1185 #endif