diff --git a/0001-test-escape-left-brace-in-a-regex-in-test-run.patch b/0001-test-escape-left-brace-in-a-regex-in-test-run.patch deleted file mode 100644 index f73ae7ec11dcab1340f0d287072ce37061bf8378..0000000000000000000000000000000000000000 --- a/0001-test-escape-left-brace-in-a-regex-in-test-run.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 7caefe0a7206bf0da40fcea66c3292345abf24f9 Mon Sep 17 00:00:00 2001 -From: Troy Dawson -Date: Mon, 24 Jul 2017 14:42:06 +0200 -Subject: [PATCH 1/7] test: escape left brace in a regex in test/run - -... to fix test-suite failure with perl-5.26.0 - -Bug: https://bugzilla.redhat.com/1473853 ---- - test/run | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/run b/test/run -index 4b1f8d0..07e916c 100755 ---- a/test/run -+++ b/test/run -@@ -106,7 +106,7 @@ for (;;) { - if (defined $line) { - # Substitute %VAR and %{VAR} with environment variables. - $line =~ s[%(\w+)][$ENV{$1}]eg; -- $line =~ s[%{(\w+)}][$ENV{$1}]eg; -+ $line =~ s[%\{(\w+)}][$ENV{$1}]eg; - } - if (defined $line) { - if ($line =~ s/^\s*< ?//) { --- -1.8.3.1 - diff --git a/0002-attr_multi-attr_multif-Don-t-set-errno-to-EINVAL.patch b/0002-attr_multi-attr_multif-Don-t-set-errno-to-EINVAL.patch deleted file mode 100644 index 7685244775294a2a58e5d7017ad687f5e602f2f5..0000000000000000000000000000000000000000 --- a/0002-attr_multi-attr_multif-Don-t-set-errno-to-EINVAL.patch +++ /dev/null @@ -1,37 +0,0 @@ -From c6b3d77b1c52af927ddf34230505e4b7d4df0960 Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher -Date: Mon, 17 Dec 2018 14:33:55 +0100 -Subject: [PATCH 2/7] attr_multi, attr_multif: Don't set errno to -EINVAL - -When attr_multi or attr_multif are called with an invalid am_opcode, -they fail with errno set to -EINVAL. Instead, the errno value should be -positive. ---- - libattr/libattr.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libattr/libattr.c b/libattr/libattr.c -index d6668af..8180c3f 100644 ---- a/libattr/libattr.c -+++ b/libattr/libattr.c -@@ -391,7 +391,7 @@ attr_single(const char *path, attr_multiop_t *op, int flags) - { - int r = -1; - -- errno = -EINVAL; -+ errno = EINVAL; - flags |= op->am_flags; - if (op->am_opcode == ATTR_OP_GET) - r = attr_get(path, op->am_attrname, op->am_attrvalue, -@@ -409,7 +409,7 @@ attr_singlef(const int fd, attr_multiop_t *op, int flags) - { - int r = -1; - -- errno = -EINVAL; -+ errno = EINVAL; - flags |= op->am_flags; - if (op->am_opcode == ATTR_OP_GET) - r = attr_getf(fd, op->am_attrname, op->am_attrvalue, --- -1.8.3.1 - diff --git a/0003-attr-2.4.48-xattr-conf-nfs4-acls.patch b/0003-attr-2.4.48-xattr-conf-nfs4-acls.patch new file mode 100644 index 0000000000000000000000000000000000000000..1b77c5c03fdcb4a8785c40d52e99cae67d77e4e5 --- /dev/null +++ b/0003-attr-2.4.48-xattr-conf-nfs4-acls.patch @@ -0,0 +1,64 @@ +From 5c04ee88bc3a8fe4bde91d488d74bbadb836a5e6 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Mon, 4 Mar 2019 16:13:42 +0100 +Subject: [PATCH 1/2] xattr.conf: document how libattr itself uses the file + +Otherwise users could think that only entries with the `skip` action +are excluded by libattr functions attr_copy_file() and attr_copy_fd() +by default. +--- + xattr.conf | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/xattr.conf b/xattr.conf +index dcbc12c..7361fbd 100644 +--- a/xattr.conf ++++ b/xattr.conf +@@ -6,6 +6,10 @@ + # Actions: + # permissions - copy when trying to preserve permissions. + # skip - do not copy. ++# ++# Note that libattr functions attr_copy_file() and attr_copy_fd() by default ++# skip all extended attributes that are matched by any of the below patterns, ++# regardless of the specified action. + + system.nfs4_acl permissions + system.nfs4acl permissions +-- +2.20.1 + + +From 951fbb74d402a96619b6b9ee894d272650ec7100 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Mon, 4 Mar 2019 16:21:52 +0100 +Subject: [PATCH 2/2] xattr.conf: remove entries for NFSv4 ACLs namespaces + +... in order to make it possible to copy NFSv4 ACLs by GNU coreutils' +implementation of cp(1). There is no way to make GNU coreutils copy +extended attributes that are matched by any entry from /etc/xattr.conf. + +GNU coreutils upstream says that NFS-related entries should be removed +from the default /etc/xattr.conf to make copying of NFSv4 ACLs work: + +http://lists.gnu.org/archive/html/bug-coreutils/2019-03/msg00008.html +--- + xattr.conf | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/xattr.conf b/xattr.conf +index 7361fbd..1ac5b2f 100644 +--- a/xattr.conf ++++ b/xattr.conf +@@ -11,8 +11,6 @@ + # skip all extended attributes that are matched by any of the below patterns, + # regardless of the specified action. + +-system.nfs4_acl permissions +-system.nfs4acl permissions + system.posix_acl_access permissions + system.posix_acl_default permissions + trusted.SGI_ACL_DEFAULT skip # xfs specific +-- +2.20.1 + diff --git a/0003-attr_list-attr_listf-Guard-against-unterminated-buff.patch b/0003-attr_list-attr_listf-Guard-against-unterminated-buff.patch deleted file mode 100644 index 500f9b50bd9a5a0c7b0e3459aca44737b8c99c54..0000000000000000000000000000000000000000 --- a/0003-attr_list-attr_listf-Guard-against-unterminated-buff.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 03d0e1ef54dc21e60ead4ec3161c217f3d53a5a7 Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher -Date: Mon, 17 Dec 2018 14:38:26 +0100 -Subject: [PATCH 3/7] attr_list, attr_listf: Guard against unterminated buffer - -attr_list and attr_listf can crash when the listxattr, llistxattr, or -flistxattr syscalls incorrectly return an unterminated buffer. Guard -against that by always appending a null character. ---- - libattr/libattr.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/libattr/libattr.c b/libattr/libattr.c -index 8180c3f..d550e10 100644 ---- a/libattr/libattr.c -+++ b/libattr/libattr.c -@@ -290,7 +290,7 @@ attr_list(const char *path, char *buffer, const int buffersize, int flags, - { - const char *l; - int length, vlength, count = 0; -- char lbuf[MAXLISTLEN]; -+ char lbuf[MAXLISTLEN+1]; - char name[MAXNAMELEN+16]; - int start_offset, end_offset; - -@@ -301,11 +301,12 @@ attr_list(const char *path, char *buffer, const int buffersize, int flags, - bzero(buffer, sizeof(attrlist_t)); - - if (flags & ATTR_DONTFOLLOW) -- length = llistxattr(path, lbuf, sizeof(lbuf)); -+ length = llistxattr(path, lbuf, sizeof(lbuf) - 1); - else -- length = listxattr(path, lbuf, sizeof(lbuf)); -+ length = listxattr(path, lbuf, sizeof(lbuf) - 1); - if (length <= 0) - return length; -+ lbuf[length] = 0; /* not supposed to be necessary */ - - start_offset = sizeof(attrlist_t); - end_offset = buffersize & ~(8-1); /* 8 byte align */ -@@ -340,7 +341,7 @@ attr_listf(int fd, char *buffer, const int buffersize, int flags, - { - const char *l; - int length, vlength, count = 0; -- char lbuf[MAXLISTLEN]; -+ char lbuf[MAXLISTLEN+1]; - char name[MAXNAMELEN+16]; - int start_offset, end_offset; - -@@ -350,9 +351,10 @@ attr_listf(int fd, char *buffer, const int buffersize, int flags, - } - bzero(buffer, sizeof(attrlist_t)); - -- length = flistxattr(fd, lbuf, sizeof(lbuf)); -+ length = flistxattr(fd, lbuf, sizeof(lbuf) - 1); - if (length < 0) - return length; -+ lbuf[length] = 0; /* not supposed to be necessary */ - - start_offset = sizeof(attrlist_t); - end_offset = buffersize & ~(8-1); /* 8 byte align */ --- -1.8.3.1 - diff --git a/0004-getfattr-don-t-count-terminating-NULL-in-well_enough.patch b/0004-getfattr-don-t-count-terminating-NULL-in-well_enough.patch deleted file mode 100644 index 777b621a406e5aa83fe114183f9dc3ef705da17c..0000000000000000000000000000000000000000 --- a/0004-getfattr-don-t-count-terminating-NULL-in-well_enough.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e4c006f07f050e0af08602d0064c3420080b7313 Mon Sep 17 00:00:00 2001 -From: Jeff Layton -Date: Thu, 13 Jun 2019 10:55:35 -0400 -Subject: [PATCH 4/7] getfattr: don't count terminating NULL in - well_enough_printable - -If the value is a string with the terminating NUL included in the -length, then don't count that terminating NUL when determining whether -the string is printable. This is consistent with the fact that getfattr -doesn't print the terminating NUL character in --encoding=text (commit -7fed4441e12d). - -Signed-off-by: Jeff Layton ---- - tools/getfattr.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tools/getfattr.c b/tools/getfattr.c -index 72a8852..0ba5781 100644 ---- a/tools/getfattr.c -+++ b/tools/getfattr.c -@@ -110,6 +110,10 @@ int well_enough_printable(const char *value, size_t size) - { - size_t n, nonpr = 0; - -+ /* Don't count the NULL terminator if there is one */ -+ if (size && !value[size - 1]) -+ size--; -+ - for (n=0; n < size; n++) - if (!isprint(*value++)) - nonpr++; --- -1.8.3.1 - diff --git a/0005-attr-Replace-bzero-with-memset.patch b/0005-attr-Replace-bzero-with-memset.patch deleted file mode 100644 index 089c5f9a0f2b18d7a99c2d1a28e10a1bd76dd2a2..0000000000000000000000000000000000000000 --- a/0005-attr-Replace-bzero-with-memset.patch +++ /dev/null @@ -1,69 +0,0 @@ -From fbf5b460f20273c6bbdebeab0ca7bb75d4ab33a2 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Sun, 11 Aug 2019 16:17:11 -0700 -Subject: [PATCH 5/7] attr: Replace bzero with memset - -bzero is a deprecated function that is optionally unavailable with -uClibc-ng. - -Signed-off-by: Rosen Penev ---- - include/attributes.h | 4 ++-- - libattr/libattr.c | 4 ++-- - tools/attr.c | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/include/attributes.h b/include/attributes.h -index 14beb8f..039c817 100644 ---- a/include/attributes.h -+++ b/include/attributes.h -@@ -91,9 +91,9 @@ typedef struct attrlist_ent { /* data from attr_list() */ - * Implement a "cursor" for use in successive attr_list() calls. - * It provides a way to find the last attribute that was returned in the - * last attr_list() call so that we can get the next one without missing -- * any. This should be bzero()ed before use and whenever it is desired to -+ * any. This should be zeroed before use and whenever it is desired to - * start over from the beginning of the attribute list. The only valid -- * operation on a cursor is to bzero() it. -+ * operation on a cursor is to zero it. - */ - typedef struct attrlist_cursor { - uint32_t opaque[4]; /* an opaque cookie */ -diff --git a/libattr/libattr.c b/libattr/libattr.c -index d550e10..2ebd1c5 100644 ---- a/libattr/libattr.c -+++ b/libattr/libattr.c -@@ -298,7 +298,7 @@ attr_list(const char *path, char *buffer, const int buffersize, int flags, - errno = EINVAL; - return -1; - } -- bzero(buffer, sizeof(attrlist_t)); -+ memset(buffer, 0, sizeof(attrlist_t)); - - if (flags & ATTR_DONTFOLLOW) - length = llistxattr(path, lbuf, sizeof(lbuf) - 1); -@@ -349,7 +349,7 @@ attr_listf(int fd, char *buffer, const int buffersize, int flags, - errno = EINVAL; - return -1; - } -- bzero(buffer, sizeof(attrlist_t)); -+ memset(buffer, 0, sizeof(attrlist_t)); - - length = flistxattr(fd, lbuf, sizeof(lbuf) - 1); - if (length < 0) -diff --git a/tools/attr.c b/tools/attr.c -index c8aa0b4..312aef1 100644 ---- a/tools/attr.c -+++ b/tools/attr.c -@@ -228,7 +228,7 @@ main(int argc, char **argv) - perror("malloc"); - exit(1); - } -- bzero((char *)&cursor, sizeof(cursor)); -+ memset(&cursor, 0, sizeof(cursor)); - do { - error = attr_list(filename, buffer, BUFSIZE, - attrflags, &cursor); --- -1.8.3.1 - diff --git a/0006-Switch-back-to-syscall.patch b/0006-Switch-back-to-syscall.patch deleted file mode 100644 index 5d3eed8cc80e2341426e83f52b1dcd84d98bdbe5..0000000000000000000000000000000000000000 --- a/0006-Switch-back-to-syscall.patch +++ /dev/null @@ -1,123 +0,0 @@ -From cb937740fa0dddf9c398618035054c657959c783 Mon Sep 17 00:00:00 2001 -From: Andreas Gruenbacher -Date: Fri, 17 Aug 2018 14:07:31 +0200 -Subject: [PATCH 6/7] Switch back to syscall() - -Switch back to syscall() for the *xattr system calls. The current -mechanism of forwarding those calls to glibc breaks libraries like -libfakeroot (fakeroot) and libasan (the gcc address sanitizer; gcc --fsanitize=address). - -Those libraries provide wrappers for functions defined in other shared -libraries, usually glibc, do their own processing, and forward calls to -the original symbols looke dup via dlsym(RTLD_NEXT, "symbol_name"). In -our case, dlsym returns the libattr_*xattr wrappers. However, when our -wrappers try calling glibc, they end up calling the libfakeroot / -libasan wrappers instead because those override the original symbols => -recursion. - -The libattr_*xattr wrappers will only be used when symbols are looked up -at runtime (dlopen / dlsym). Programs linking against libattr will -directly use the glibc provided symbols. Therefore, the slightly worse -performance of syscall() won't affect any of the "normal" users of -libattr. ---- - libattr/syscalls.c | 26 ++++++++++++++------------ - 1 file changed, 14 insertions(+), 12 deletions(-) - -diff --git a/libattr/syscalls.c b/libattr/syscalls.c -index 3013aa0..721ad7f 100644 ---- a/libattr/syscalls.c -+++ b/libattr/syscalls.c -@@ -22,6 +22,8 @@ - - #include "config.h" - -+#include -+#include - #include - - #ifdef HAVE_VISIBILITY_ATTRIBUTE -@@ -31,67 +33,67 @@ - int libattr_setxattr(const char *path, const char *name, - void *value, size_t size, int flags) - { -- return setxattr(path, name, value, size, flags); -+ return syscall(__NR_setxattr, path, name, value, size, flags); - } - - int libattr_lsetxattr(const char *path, const char *name, - void *value, size_t size, int flags) - { -- return lsetxattr(path, name, value, size, flags); -+ return syscall(__NR_lsetxattr, path, name, value, size, flags); - } - - int libattr_fsetxattr(int filedes, const char *name, - void *value, size_t size, int flags) - { -- return fsetxattr(filedes, name, value, size, flags); -+ return syscall(__NR_fsetxattr, filedes, name, value, size, flags); - } - - ssize_t libattr_getxattr(const char *path, const char *name, - void *value, size_t size) - { -- return getxattr(path, name, value, size); -+ return syscall(__NR_getxattr, path, name, value, size); - } - - ssize_t libattr_lgetxattr(const char *path, const char *name, - void *value, size_t size) - { -- return lgetxattr(path, name, value, size); -+ return syscall(__NR_lgetxattr, path, name, value, size); - } - - ssize_t libattr_fgetxattr(int filedes, const char *name, - void *value, size_t size) - { -- return fgetxattr(filedes, name, value, size); -+ return syscall(__NR_fgetxattr, filedes, name, value, size); - } - - ssize_t libattr_listxattr(const char *path, char *list, size_t size) - { -- return listxattr(path, list, size); -+ return syscall(__NR_listxattr, path, list, size); - } - - ssize_t libattr_llistxattr(const char *path, char *list, size_t size) - { -- return llistxattr(path, list, size); -+ return syscall(__NR_llistxattr, path, list, size); - } - - ssize_t libattr_flistxattr(int filedes, char *list, size_t size) - { -- return flistxattr(filedes, list, size); -+ return syscall(__NR_flistxattr, filedes, list, size); - } - - int libattr_removexattr(const char *path, const char *name) - { -- return removexattr(path, name); -+ return syscall(__NR_removexattr, path, name); - } - - int libattr_lremovexattr(const char *path, const char *name) - { -- return lremovexattr(path, name); -+ return syscall(__NR_lremovexattr, path, name); - } - - int libattr_fremovexattr(int filedes, const char *name) - { -- return fremovexattr(filedes, name); -+ return syscall(__NR_fremovexattr, filedes, name); - } - - #ifdef HAVE_VISIBILITY_ATTRIBUTE --- -1.8.3.1 - diff --git a/0007-bypass-wrong-output-when-enabled-selinux.patch b/0007-bypass-wrong-output-when-enabled-selinux.patch deleted file mode 100644 index a9ce9d339891bbce40afcab794b14edc3e0bc794..0000000000000000000000000000000000000000 --- a/0007-bypass-wrong-output-when-enabled-selinux.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 20576addae44d7256617806e4504524e0d1c9b13 Mon Sep 17 00:00:00 2001 -From: Shijie Luo -Date: Sun, 15 Mar 2020 14:15:42 -0400 -Subject: [PATCH 7/7] bypass wrong output when enabled selinux - -When enforced selinux, excuting command getfattr may output something -about selinux. Bypass these messages to make testcases go success. - -Signed-off-by: Shijie Luo ---- - test/run | 20 +++++++++++++------- - 1 file changed, 13 insertions(+), 7 deletions(-) - -diff --git a/test/run b/test/run -index 07e916c..7e46a70 100755 ---- a/test/run -+++ b/test/run -@@ -160,21 +160,27 @@ sub process_test($$$$) { - map { s/\s/\\$&/g; $_ } @$p), " -- "; - my $result = exec_test($prog, $in); - my @good = (); -- my $nmax = (@$out > @$result) ? @$out : @$result; -- for (my $n=0; $n < $nmax; $n++) { -+ my $nmax = @$out; -+ my $mmax = @$result; -+ for (my $n=0, my $m=0; $n < $nmax; $n++, $m++) { - my $use_re; -+ - if (defined $out->[$n] && $out->[$n] =~ /^~ /) { - $use_re = 1; - $out->[$n] =~ s/^~ //g; - } - -- if (!defined($out->[$n]) || !defined($result->[$n]) || -- (!$use_re && $result->[$n] ne $out->[$n]) || -- ( $use_re && $result->[$n] !~ /^$out->[$n]/)) { -- push @good, ($use_re ? '!~' : '!='); -+ while ($m < $mmax && -+ (!$use_re && $result->[$m] ne $out->[$n]) || -+ ( $use_re && $result->[$m] !~ /^$out->[$n]/)) { -+ $m++; -+ } -+ -+ if (!defined($result->[$m])) { -+ push @good, ($use_re ? '!~' : '!='); - } - else { -- push @good, ($use_re ? '=~' : '=='); -+ push @good, ($use_re ? '=~' : '=='); - } - } - my $good = !(grep /!/, @good); --- -1.8.3.1 - diff --git a/0008-carry-security.evm-when-copying-files.patch b/0008-carry-security.evm-when-copying-files.patch deleted file mode 100644 index aee3b8af1f0f760b4723c3f30a9b66fe2eb2261f..0000000000000000000000000000000000000000 --- a/0008-carry-security.evm-when-copying-files.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a0be13cb66e2297adce275d4308cae10ac4eb5e9 Mon Sep 17 00:00:00 2001 -From: Anakin Zhang -Date: Wed, 2 Sep 2020 23:18:56 +0800 -Subject: [PATCH] carry security.evm when copy files - -security.evm xattr is used to store a file's EVM signature. This xattr is -needed by kernel EVM (Extended Verification Module) to provide file integrity -protection. - -This patch is intended to allow carrying security.evm xattr when copying files. -Without this patch, digest lists' security.evm xattr will miss when running -dracut to make new initramfs. - -Signed-off-by: Anakin Zhang ---- - xattr.conf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/xattr.conf b/xattr.conf -index dcbc12c..125fd18 100644 ---- a/xattr.conf -+++ b/xattr.conf -@@ -18,4 +18,4 @@ trusted.SGI_DMI_* skip # xfs specific - trusted.SGI_MAC_FILE skip # xfs specific - xfsroot.* skip # xfs specific; obsolete - user.Beagle.* skip # ignore Beagle index data --security.evm skip # may only be written by kernel -+#security.evm skip # may only be written by kernel --- -2.23.0.windows.1 - diff --git a/attr-2.4.48.tar.gz b/attr-2.4.48.tar.gz deleted file mode 100644 index 78a7c0e036554d43c03e8228894428d7ccab46db..0000000000000000000000000000000000000000 Binary files a/attr-2.4.48.tar.gz and /dev/null differ diff --git a/attr-2.5.1.tar.gz b/attr-2.5.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..dbb77f7c6fd26cc54b8993360090b2807bc6caaf Binary files /dev/null and b/attr-2.5.1.tar.gz differ diff --git a/attr.spec b/attr.spec index f1552887bb4bc42a00aca3ed2bc0e800885d949e..3bfa331ead192c1179f9c90f9efff7f470559a59 100644 --- a/attr.spec +++ b/attr.spec @@ -1,40 +1,46 @@ -%{!?_licensedir:%global license %%doc} -Name: attr -Version: 2.4.48 -Release: 12 -Summary: Commands for Manipulating Filesystem Extended Attributes -License: GPLv2+ AND LGPLv2+ -URL: https://savannah.nongnu.org/projects/attr -Source0: https://download-mirror.savannah.gnu.org/releases/attr/attr-%{version}.tar.gz - -# fix test-suite failure with perl-5.26.0 (#1473853) -Patch1: 0001-test-escape-left-brace-in-a-regex-in-test-run.patch -Patch2: 0002-attr_multi-attr_multif-Don-t-set-errno-to-EINVAL.patch -Patch3: 0003-attr_list-attr_listf-Guard-against-unterminated-buff.patch -Patch4: 0004-getfattr-don-t-count-terminating-NULL-in-well_enough.patch -Patch5: 0005-attr-Replace-bzero-with-memset.patch -Patch6: 0006-Switch-back-to-syscall.patch -Patch7: 0007-bypass-wrong-output-when-enabled-selinux.patch -Patch8: 0008-carry-security.evm-when-copying-files.patch - -BuildRequires: gettext, libtool, chrpath, gcc, git, gdb +Summary: Utilities for managing filesystem extended attributes +Name: attr +Version: 2.5.1 +Release: 1 +Source: https://download-mirror.savannah.gnu.org/releases/attr/attr-%{version}.tar.gz + +Patch3: 0003-attr-2.4.48-xattr-conf-nfs4-acls.patch + +License: GPLv2+ +URL: https://savannah.nongnu.org/projects/attr +BuildRequires: gettext +BuildRequires: libtool +BuildRequires: make, chrpath, gcc, git, gdb +# needed for %%check +BuildRequires: perl(FileHandle) + +%description +A set of tools for manipulating extended attributes on filesystem +objects, in particular getfattr(1) and setfattr(1). +An attr(1) command is also provided which is largely compatible +with the SGI IRIX tool of the same name. + Provides: libattr Obsoletes: libattr Conflicts: xfsdump < 3.1.8 Conflicts: filesystem < 3 -%description +%description A set of tools for manipulating extended attributes on filesystem objects, in particular getfattr(1) and setfattr(1). An attr(1) command is also provided which is largely compatible with the SGI IRIX tool of the same name. %package -n libattr-devel +Summary: Files needed for building programs with libattr License: LGPLv2+ -Summary: Header files for libattr Obsoletes: libattr +# for which is symlinked to Requires: glibc-headers +# provides {,f,l}{get,list,remove,set}xattr.2 man pages +Recommends: man-pages + %description -n libattr-devel This package contains header files and documentation needed to develop programs which make use of extended attributes. @@ -42,19 +48,32 @@ For Linux programs, the documented system call API is the recommended interface, but an SGI IRIX compatibility interface is also provided. -%package help -Summary: Including man files for attr -Requires: man +Currently only ext2, ext3, ext4 and XFS support extended attributes. +The SGI IRIX compatibility API built above the Linux system calls is +used by programs such as xfsdump(8), xfsrestore(8) and xfs_fsr(8). -%description help -This contains man files for the using of attr +You should install libattr-devel if you want to develop programs +which make use of extended attributes. If you install libattr-devel, +you'll also want to install attr. %prep -%autosetup -Sgit -n %{name}-%{version} +%autosetup -p1 + +# FIXME: root tests are not ready for SELinux +sed -e 's|test/root/getfattr.test||' \ + -i test/Makemodule.am Makefile.in %build -%configure --disable-silent-rules -make %{?_smp_mflags} +%configure +%make_build + +%check +if ./setfattr -n user.name -v value .; then + make check || exit $? +else + echo '*** xattrs are probably not supported by the file system,' \ + 'the test-suite will NOT run ***' +fi %install %make_install @@ -63,8 +82,7 @@ chrpath -d $RPM_BUILD_ROOT%{_bindir}/attr chrpath -d $RPM_BUILD_ROOT%{_bindir}/getfattr chrpath -d $RPM_BUILD_ROOT%{_bindir}/setfattr - -# handle docs on our own +# drop already installed documentation, we will use an RPM macro to install it rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}* # temporarily provide attr/xattr.h symlink until users are migrated (#1601482) @@ -72,36 +90,32 @@ ln -fs ../sys/xattr.h $RPM_BUILD_ROOT%{_includedir}/attr/xattr.h %find_lang %{name} -%check -if ./setfattr -n user.name -v value .; then - make check || exit $? -else - echo '*** xattrs are probably not supported by the file system,' \ - 'the test-suite will NOT run ***' -fi - -%post -n %{name} -p /sbin/ldconfig -%postun -n %{name} -p /sbin/ldconfig - %files -f %{name}.lang %doc doc/CHANGES %license doc/COPYING* -%{_bindir}/* +%{_bindir}/attr +%{_bindir}/getfattr +%{_bindir}/setfattr +%{_mandir}/man1/attr.1* +%{_mandir}/man1/getfattr.1* +%{_mandir}/man1/setfattr.1* %{_libdir}/libattr.so.* %config(noreplace) %{_sysconfdir}/xattr.conf %files -n libattr-devel %{_libdir}/libattr.so -%{_libdir}/pkgconfig/*.pc %{_libdir}/libattr.a %{_libdir}/libattr.la +%{_libdir}/pkgconfig/*.pc %{_includedir}/attr +%{_mandir}/man3/attr_*.3.* + -%files help -%{_mandir}/man1/* -%{_mandir}/man3/* %changelog +* Wed Jul 07 2021 ningjin - 2.5.1-1 +- update to 2.5.1 + * Wed Sep 2 2020 Anakin Zhang - 2.4.48-12 - Type:bugfix - ID:NA @@ -133,7 +147,7 @@ fi - Type:bugfix - ID:NA - SUG:restart -- DESC:fix error condition of while loop +- DESC:fix error condition of while loop in 0001-bypass-wrong-output-when-enabled-selinux.patch. * Mon Mar 16 2020 Shijie Luo - 2.4.48-6 @@ -174,3 +188,4 @@ fi * Mon Apr 15 2019 Buildteam - 2.4.48-2 - Package Initialization +