Hello community,
here is the log from the commit of package attr for openSUSE:Factory
checked in at Fri Jan 9 01:27:09 CET 2009.
--------
--- attr/attr.changes 2008-12-10 13:43:05.000000000 +0100
+++ /mounts/work_src_done/STABLE/attr/attr.changes 2009-01-09 01:26:42.313964000 +0100
@@ -1,0 +2,6 @@
+Tue Jan 6 14:09:13 PST 2009 - bphilips@suse.de
+
+- Fix tests and add make target
+- Version bump to get fix for getfattr -P bnc#457660
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
attr-2.4.39.src.tar.bz2
remove-ea-conv.diff
walk-attr.diff
xattr_conf.diff
New:
----
attr_2.4.43-1.tar.gz
attr-add-make-test-target-and-use-make-to-run-tests.patch
attr-fix-walk_tree_recursive-for-the-walk_tree_dereference-case.patch
attr-move-ext2-3-tests-into-seperate-test-file.patch
attr-tests-for-path-recursion-with-l-p-r.patch
attr-various-improvements-for-test-run.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ attr.spec ++++++
--- /var/tmp/diff_new_pack.O23359/_old 2009-01-09 01:26:52.000000000 +0100
+++ /var/tmp/diff_new_pack.O23359/_new 2009-01-09 01:26:52.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package attr (Version 2.4.39)
+# spec file for package attr (Version 2.4.43)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,14 +22,16 @@
Group: System/Filesystems
AutoReqProv: on
Summary: Commands for Manipulating Extended Attributes
-Version: 2.4.39
-Release: 67
-Source: %{name}-%{version}.src.tar.bz2
+Version: 2.4.43
+Release: 1
+Source: %{name}_%{version}-1.tar.gz
Source1: xattr.conf
Patch0: builddefs.in.diff
-Patch1: xattr_conf.diff
-Patch2: remove-ea-conv.diff
-Patch3: walk-attr.diff
+Patch1: attr-move-ext2-3-tests-into-seperate-test-file.patch
+Patch2: attr-various-improvements-for-test-run.patch
+Patch3: attr-add-make-test-target-and-use-make-to-run-tests.patch
+Patch4: attr-tests-for-path-recursion-with-l-p-r.patch
+Patch5: attr-fix-walk_tree_recursive-for-the-walk_tree_dereference-case.patch
Url: ftp://oss.sgi.com/projects/xfs/cmd_tars
BuildRoot: %{_tmppath}/%{name}-%{version}-build
License: GPL v2 or later
@@ -102,6 +104,8 @@
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
%build
export OPTIMIZER="$RPM_OPT_FLAGS -fPIC"
@@ -186,6 +190,9 @@
%config %{_sysconfdir}/xattr.conf
%changelog
+* Tue Jan 06 2009 bphilips@suse.de
+- Fix tests and add make target
+- Version bump to get fix for getfattr -P bnc#457660
* Wed Dec 10 2008 olh@suse.de
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
(bnc#437293)
@@ -199,7 +206,7 @@
* Sat Oct 27 2007 agruen@suse.de
- Don't exhaust the number of file descriptors in the path walking
code, and make sure each directory is only visited once.
-* Fri Oct 26 2007 agruen@suse.de
+* Thu Oct 25 2007 agruen@suse.de
- A large jump to the current upstream version 2.4.39.
- Fix the upstream path walking code.
- Remove the ea-conv script; this is not relevant anymore since
@@ -255,11 +262,11 @@
* Thu Jan 01 2004 agruen@suse.de
- Update to version 2.4.12. Bug fix in directory tree walking
code.
-* Wed Oct 22 2003 kukuk@suse.de
+* Tue Oct 21 2003 kukuk@suse.de
- Fix provides/requires for update case
* Thu Aug 28 2003 agruen@suse.de
- Fix a bug with error handling while walking directory trees.
-* Thu Aug 28 2003 ro@suse.de
+* Wed Aug 27 2003 ro@suse.de
- fix patch-depth in specfile
* Tue Aug 26 2003 agruen@suse.de
- Fix SIGSEGV if the quote function.
@@ -274,7 +281,7 @@
- Update to 2.4.2
* Sun Apr 06 2003 agruen@suse.de
- Update to 2.4.1.
-* Thu Feb 27 2003 agruen@suse.de
+* Wed Feb 26 2003 agruen@suse.de
- Fix broken attr_copy_check_permissions() function.
* Wed Feb 26 2003 agruen@suse.de
- Update to attr-2.4.0 which has our patches integrated.
@@ -311,7 +318,7 @@
- Change the documentation path in builddefs.in instead of in
configure.in.
- Update to version 2.0.9
-* Thu Jun 20 2002 lmuelle@suse.de
+* Wed Jun 19 2002 lmuelle@suse.de
- Remove DESTDIR patch, use DIST_ROOT of package instead
- Update to version 2.0.8
* Wed Jun 12 2002 ro@suse.de
++++++ attr-add-make-test-target-and-use-make-to-run-tests.patch ++++++
Subject: [PATCH] attr: add make test target and use make to run tests
The tests are difficult to run. So, this patch adds a Make target that
sets up the path and runs *.test files in the test/ directory.
ext specific tests can be ran from the test directory by running
`make ext`
Signed-off-by: Brandon Philips
---
Makefile | 6 +++++-
test/Makefile | 22 +++++++++++++---------
test/README | 4 ++++
3 files changed, 22 insertions(+), 10 deletions(-)
Index: attr-2.4.43/test/README
===================================================================
--- attr-2.4.43.orig/test/README
+++ attr-2.4.43/test/README
@@ -1,3 +1,7 @@
+Run `make test` in the root source tree to build the tree and run
+FS-independent tests.
+
+Run `cd test; make ext` to run ext specific tests.
Andreas Gruenbacher's tests for the ext2 filesystem extended attributes
support. Most of these tests should work for any filesystem type, and
Index: attr-2.4.43/test/Makefile
===================================================================
--- attr-2.4.43.orig/test/Makefile
+++ attr-2.4.43/test/Makefile
@@ -1,16 +1,20 @@
#
-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2008 Novell, Inc.
#
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
+TEST = $(wildcard *.test)
+EXT = $(wildcard ext/*.test)
-# ensure we pick these up in the source tarball
-LSRCFILES = attr.test run README
+PATH := $(abspath ../getfattr/):$(abspath ../setfattr):$(abspath ../chattr):$(PATH)
-default:
+all: $(TEST)
+ext: $(EXT)
-include $(BUILDRULES)
+$(TEST):
+ @echo "*** $@ ***"; perl run $@
-install:
-install-dev install-lib:
+$(EXT):
+ @echo "EXT specific tests"; @echo "*** $@ ***"; perl run $@
+
+.PHONY: $(TEST) $(EXT) default
+.NOTPARALLEL:
Index: attr-2.4.43/Makefile
===================================================================
--- attr-2.4.43.orig/Makefile
+++ attr-2.4.43/Makefile
@@ -17,7 +17,7 @@ LDIRT = config.log .dep config.status co
Logs/* built .census install.* install-dev.* install-lib.* *.gz
SUBDIRS = include libmisc libattr attr getfattr setfattr \
- examples test m4 man doc po debian build
+ examples m4 man doc po debian build
default: $(CONFIGURE)
ifeq ($(HAVE_BUILDDEFS), no)
@@ -62,3 +62,7 @@ install-dev install-lib: default
realclean distclean: clean
rm -f $(LDIRT) $(CONFIGURE)
rm -rf autom4te.cache Logs
+
+.PHONY: test
+test: default
+ $(MAKE) -C test/
++++++ attr-fix-walk_tree_recursive-for-the-walk_tree_dereference-case.patch ++++++
Subject: attr: Fix WALK_TREE_RECURSIVE for the WALK_TREE_DEREFERENCE case
NOTE: This fix was already added to the attr tree
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/attr/libmisc/walk_tree.c
[295] $ mkdir -p 1/sub -- ok
[296] $ mkdir 1/link -- ok
[297] $ touch 1/link/link-file -- ok
[298] $ touch 1/sub/sub-file -- ok
[299] $ ln -s `pwd`/1/link 1/sub/link -- ok
[300] $ setfattr -n "user.a" 1 -- ok
[301] $ setfattr -n "user.a" 1/link/link-file -- ok
[302] $ setfattr -n "user.a" 1/link -- ok
[303] $ setfattr -n "user.a" 1/sub/sub-file -- ok
[304] $ setfattr -n "user.a" 1/sub -- ok
[305] $ getfattr -P -R 1 -- failed
# file: 1 | # file: 1
user.a | user.a
|
# file: 1/sub | # file: 1/sub
user.a | user.a
|
# file: 1/sub/link | # file: 1/sub/link
user.a | user.a
|
# file: 1/sub/sub-file ? # file: 1/sub/link/link-file
user.a | user.a
|
# file: 1/link ? # file: 1/sub/sub-file
user.a | user.a
|
# file: 1/link/link-file ? # file: 1/link
user.a | user.a
|
~ ? # file: 1/link/link-file
~ ? user.a
~ ?
[324] $ getfattr -R -P 1/sub -- failed
# file: 1/sub | # file: 1/sub
user.a | user.a
|
# file: 1/sub/link | # file: 1/sub/link
user.a | user.a
|
# file: 1/sub/sub-file ? # file: 1/sub/link/link-file
user.a | user.a
|
~ ? # file: 1/sub/sub-file
~ ? user.a
~ ?
Signed-off-by: Brandon Philips
---
libmisc/walk_tree.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Index: acl-2.2.47/libmisc/walk_tree.c
===================================================================
--- acl-2.2.47.orig/libmisc/walk_tree.c
+++ acl-2.2.47/libmisc/walk_tree.c
@@ -93,8 +93,15 @@ static int walk_tree_rec(const char *pat
have_dir_stat = 1;
}
err = func(path, &st, flags, arg);
+
+ /*
+ * Recurse if WALK_TREE_RECURSIVE and the path is:
+ * a dir not from a symlink
+ * a link and follow_symlinks
+ */
if ((flags & WALK_TREE_RECURSIVE) &&
- (S_ISDIR(st.st_mode) || (S_ISLNK(st.st_mode) && follow_symlinks))) {
+ (!(flags & WALK_TREE_SYMLINK) && S_ISDIR(st.st_mode)) ||
+ ((flags & WALK_TREE_SYMLINK) && follow_symlinks)) {
struct dirent *entry;
/*
++++++ attr-move-ext2-3-tests-into-seperate-test-file.patch ++++++
Subject: [PATCH] attr: move ext2/3 tests into seperate test file.
Some of these tests are fs specific and don't work under newer ext3
disks. Move into a seperate directory and file.
Signed-off-by: Brandon Philips
---
test/attr.test | 91 +++++++++++++++++++++++++------------------------------
test/ext/fs.test | 68 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 111 insertions(+), 48 deletions(-)
Index: attr-2.4.43/test/attr.test
===================================================================
--- attr-2.4.43.orig/test/attr.test
+++ attr-2.4.43/test/attr.test
@@ -1,8 +1,4 @@
-Tests for extended attributes on ext2/ext3 file systems. The initial
-size checks and the file size checks are ext2/ext3 specific. The
-other setfattr/getfattr operations are designed to cover all special
-cases in the ext27ext3 kernel patches, but they should work on other
-filesystems as well.
+Tests for extended attributes on file systems.
Execute this test using the `run' script in this directory:
@@ -29,14 +25,6 @@ Try various valid and invalid names
$ setfattr -n user.n -v value f
$ rm f
-Size checks, for an ext2/ext3 file system with a block size of 4K
-
- $ touch f
- $ setfattr -n user.name -v 4040++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ f
- $ setfattr -n user.name -v 4041+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ f
- > setfattr: f: No space left on device
-
- $ rm f
Editing values
@@ -147,17 +135,30 @@ Test extended attribute block sharing
$ touch f g h
$ setfattr -n user.novalue f g h
- $ ls -s f g h
- > 4 f
- > 4 g
- > 4 h
-
+ $ getfattr f g h
+ > # file: f
+ > user.novalue
+ >
+ > # file: g
+ > user.novalue
+ >
+ > # file: h
+ > user.novalue
+ >
+
$ setfattr -n user.name -v value f
- $ ls -s f g h
- > 4 f
- > 4 g
- > 4 h
-
+ $ getfattr f g h
+ > # file: f
+ > user.name
+ > user.novalue
+ >
+ > # file: g
+ > user.novalue
+ >
+ > # file: h
+ > user.novalue
+ >
+
$ getfattr -d f g h
> # file: f
> user.name="value"
@@ -169,38 +170,32 @@ Test extended attribute block sharing
> # file: h
> user.novalue
>
-
+
$ setfattr -n user.name -v value g
- $ ls -s f g h
- > 4 f
- > 4 g
- > 4 h
-
- $ setfattr -x user.novalue h
- $ ls -s f g h
- > 4 f
- > 4 g
- > 0 h
-
- $ getfattr -d f g h
+ $ getfattr f g h
> # file: f
- > user.name="value"
+ > user.name
> user.novalue
>
> # file: g
- > user.name="value"
+ > user.name
> user.novalue
>
-
- $ setfattr -n user.name -v other-value g
- $ setfattr -n user.name -v value g
- $ setfattr -x user.name f g
- $ setfattr -x user.novalue f g
- $ ls -s f g h
- > 0 f
- > 0 g
- > 0 h
-
+ > # file: h
+ > user.novalue
+ >
+
+ $ setfattr -x user.novalue h
+ $ getfattr f g h
+ > # file: f
+ > user.name
+ > user.novalue
+ >
+ > # file: g
+ > user.name
+ > user.novalue
+ >
+
$ rm f g h
Attributes of symlinks vs. the files pointed to
Index: attr-2.4.43/test/ext/fs.test
===================================================================
--- /dev/null
+++ attr-2.4.43/test/ext/fs.test
@@ -0,0 +1,68 @@
+Tests for extended attributes on ext2/ext3 file systems. The initial
+size checks and the file size checks are ext2/ext3 specific. The
+other setfattr/getfattr operations are designed to cover all special
+cases in the ext27ext3 kernel patches, but they should work on other
+filesystems as well.
+
+Size checks, for an ext2/ext3 file system with a block size of 4K
+
+ $ touch f
+ $ setfattr -n user.name -v 4040++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ f
+ $ setfattr -n user.name -v 4041+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ f
+ > setfattr: f: No space left on device
+
+ $ rm f
+
+
+Test extended attribute block sharing
+
+ $ touch f g h
+ $ setfattr -n user.novalue f g h
+ $ ls -s f g h
+ > 4 f
+ > 4 g
+ > 4 h
+
+ $ setfattr -n user.name -v value f
+ $ ls -s f g h
+ > 4 f
+ > 4 g
+ > 4 h
+
+ $ getfattr -d f g h
+ > # file: f
+ > user.name="value"
+ > user.novalue
+ >
+ > # file: g
+ > user.novalue
+ >
+ > # file: h
+ > user.novalue
+ >
+
+ $ setfattr -n user.name -v value g
+ $ ls -s f g h
+ > 4 f
+ > 4 g
+ > 4 h
+
+ $ setfattr -x user.novalue h
+ $ ls -s f g h
+ > 4 f
+ > 4 g
+ > 0 h
+
+ $ setfattr -n user.name -v other-value g
+ $ setfattr -n user.name -v value g
+ $ setfattr -x user.name f g
+ $ setfattr -x user.novalue f g
+ $ ls -s f g h
+ > 0 f
+ > 0 g
+ > 0 h
+
+ $ rm f g h
+
+
+
++++++ attr-tests-for-path-recursion-with-l-p-r.patch ++++++
Subject: [PATCH] attr: Tests for path recursion with -L -P -R
Add tests against patches from Andreas to fix up walk_tree.c.
Signed-off-by: Brandon Philips
---
test/attr.test | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 116 insertions(+)
Index: attr-2.4.43/test/attr.test
===================================================================
--- attr-2.4.43.orig/test/attr.test
+++ attr-2.4.43/test/attr.test
@@ -253,3 +253,119 @@ Tests for attribute names that contains
$ cd ..
$ rm -rf d
+
+Tests for proper path recursion reported by Tony Ernst bnc#457660
+
+ $ mkdir -p 1/2/3
+ $ setfattr -n "user.9" 1
+ $ setfattr -n "user.a" 1
+ $ setfattr -n "user.9" 1/2
+ $ setfattr -n "user.a" 1/2
+ $ setfattr -n "user.9" 1/2/3
+ $ setfattr -n "user.a" 1/2/3
+
+ $ getfattr -h -L -R -m '.' -e hex 1
+ > # file: 1
+ > user.9
+ > user.a
+ >
+ > # file: 1/2
+ > user.9
+ > user.a
+ >
+ > # file: 1/2/3
+ > user.9
+ > user.a
+ >
+
+ $ getfattr -h -P -R -m '.' -e hex 1/2
+ > # file: 1/2
+ > user.9
+ > user.a
+ >
+ > # file: 1/2/3
+ > user.9
+ > user.a
+ >
+
+ $ rm -R 1
+
+Test for proper recursion of directory structures with -L -P -R
+
+ $ mkdir -p 1/sub
+ $ mkdir 1/link
+ $ touch 1/link/link-file
+ $ touch 1/sub/sub-file
+ $ ln -s `pwd`/1/link 1/sub/link
+ $ setfattr -n "user.a" 1
+ $ setfattr -n "user.a" 1/link/link-file
+ $ setfattr -n "user.a" 1/link
+ $ setfattr -n "user.a" 1/sub/sub-file
+ $ setfattr -n "user.a" 1/sub
+ $ getfattr -P -R 1
+ > # file: 1
+ > user.a
+ >
+ > # file: 1/sub
+ > user.a
+ >
+ > # file: 1/sub/link
+ > user.a
+ >
+ > # file: 1/sub/sub-file
+ > user.a
+ >
+ > # file: 1/link
+ > user.a
+ >
+ > # file: 1/link/link-file
+ > user.a
+ >
+ $ getfattr -R -P 1/sub
+ > # file: 1/sub
+ > user.a
+ >
+ > # file: 1/sub/link
+ > user.a
+ >
+ > # file: 1/sub/sub-file
+ > user.a
+ >
+ $ getfattr -L -R 1
+ > # file: 1
+ > user.a
+ >
+ > # file: 1/sub
+ > user.a
+ >
+ > # file: 1/sub/link
+ > user.a
+ >
+ > # file: 1/sub/link/link-file
+ > user.a
+ >
+ > # file: 1/sub/sub-file
+ > user.a
+ >
+ > # file: 1/link
+ > user.a
+ >
+ > # file: 1/link/link-file
+ > user.a
+ >
+ $ getfattr -R 1/sub/link
+ > # file: 1/sub/link
+ > user.a
+ >
+ > # file: 1/sub/link/link-file
+ > user.a
+ >
+ $ getfattr -L -R 1/sub/link
+ > # file: 1/sub/link
+ > user.a
+ >
+ > # file: 1/sub/link/link-file
+ > user.a
+ >
+
+ $ rm -R 1
++++++ attr-various-improvements-for-test-run.patch ++++++
Subject: [PATCH] attr: various improvements for test/run
First move process_test to avoid a warning:
main::process_test() called too early to check prototype at ./run line 47.
main::process_test() called too early to check prototype at ./run line 60.
Create two ENV variables TUSER and TGROUP to get the user/group
running the test.
Add a | test line that is similar to > but is interpreted as a regular
expression.
Signed-off-by: Brandon Philips
---
test/run | 99 ++++++++++++++++++++++++++++++++-------------------------------
1 file changed, 51 insertions(+), 48 deletions(-)
Index: acl-2.2.47/test/run
===================================================================
--- acl-2.2.47.orig/test/run
+++ acl-2.2.47/test/run
@@ -25,26 +25,69 @@ if (isatty(fileno(STDOUT))) {
$FAILED = "\033[31m\033[1m" . $FAILED . "\033[m";
}
+$ENV{"TUSER"} = getpwuid($>);
+$ENV{"TGROUP"} = getgrgid($));
+
sub exec_test($$);
-my ($prog, $in, $out) = ([], [], []);
+my ($prog, $in, $out, $outmatch) = ([], [], [], []);
my $line_number = 0;
my $prog_line;
my ($tests, $failed) = (0,0);
+sub process_test($$$$$) {
+ my ($prog, $prog_line, $in, $out, $outmatch) = @_;
+
+ return unless @$prog;
+
+ my $p = [ @$prog ];
+ print "[$prog_line] \$ ", join(' ',
+ map { s/\s/\\$&/g; $_ } @$p), " -- ";
+ my $result = exec_test($prog, $in);
+ my $good = 1;
+ my $nmax = (@$outmatch > @$result) ? @$outmatch : @$result;
+ for (my $n=0; $n < $nmax; $n++) {
+ if (!defined($outmatch->[$n]) || !defined($result->[$n]) ||
+ $result->[$n] !~ /($outmatch->[$n])/) {
+ $good = 0;
+ }
+ }
+ $tests++;
+ $failed++ unless $good;
+ print $good ? $OK : $FAILED, "\n";
+ if (!$good) {
+ for (my $n=0; $n < $nmax; $n++) {
+ my $l = defined($out->[$n]) ? $out->[$n] : "~";
+ chomp $l;
+ my $r = defined($result->[$n]) ? $result->[$n] : "~";
+ chomp $r;
+ print sprintf("%-37s %s %-39s\n", $l, $l eq $r ? "|" : "?", $r);
+ }
+ } elsif ($opt_v) {
+ print join('', @$result);
+ }
+}
+
+
+
for (;;) {
my $line = <>; $line_number++;
if (defined $line) {
# Substitute %VAR and %{VAR} with environment variables.
- $line =~ s[%(?:(\w+)|\{(\w+)\})][$ENV{"$1$2"}]eg;
+ $line =~ s[%\{(\w+)\}][$ENV{"$1"}]eg;
+ $line =~ s[%(\w+)][$ENV{"$1"}]eg;
}
if (defined $line) {
if ($line =~ s/^\s*< ?//) {
push @$in, $line;
- } elsif ($line =~ s/^\s*> ?//) {
+ } elsif ($line =~ s/^\s*> ?//) { # explicit matching
+ push @$outmatch, "^(\Q$line\E)\$";
+ push @$out, $line;
+ } elsif ($line =~ s/^\s*\| ?//) { # regex case
+ push @$outmatch, $line;
push @$out, $line;
} else {
- process_test($prog, $prog_line, $in, $out);
+ process_test($prog, $prog_line, $in, $out, $outmatch);
$prog = [];
$prog_line = 0;
@@ -55,9 +98,10 @@ for (;;) {
$prog_line = $line_number;
$in = [];
$out = [];
+ $outmatch = [];
}
} else {
- process_test($prog, $prog_line, $in, $out);
+ process_test($prog, $prog_line, $in, $out, $outmatch);
last;
}
}
@@ -75,39 +119,6 @@ print $status, "\n";
exit $failed ? 1 : 0;
-sub process_test($$$$) {
- my ($prog, $prog_line, $in, $out) = @_;
-
- return unless @$prog;
-
- my $p = [ @$prog ];
- print "[$prog_line] \$ ", join(' ',
- map { s/\s/\\$&/g; $_ } @$p), " -- ";
- my $result = exec_test($prog, $in);
- my $good = 1;
- my $nmax = (@$out > @$result) ? @$out : @$result;
- for (my $n=0; $n < $nmax; $n++) {
- if (!defined($out->[$n]) || !defined($result->[$n]) ||
- $out->[$n] ne $result->[$n]) {
- $good = 0;
- }
- }
- $tests++;
- $failed++ unless $good;
- print $good ? $OK : $FAILED, "\n";
- if (!$good) {
- for (my $n=0; $n < $nmax; $n++) {
- my $l = defined($out->[$n]) ? $out->[$n] : "~";
- chomp $l;
- my $r = defined($result->[$n]) ? $result->[$n] : "~";
- chomp $r;
- print sprintf("%-37s %s %-39s\n", $l, $l eq $r ? "|" : "?", $r);
- }
- } elsif ($opt_v) {
- print join('', @$result);
- }
-}
-
sub su($) {
my ($user) = @_;
++++++ builddefs.in.diff ++++++
--- /var/tmp/diff_new_pack.O23359/_old 2009-01-09 01:26:52.000000000 +0100
+++ /var/tmp/diff_new_pack.O23359/_new 2009-01-09 01:26:52.000000000 +0100
@@ -1,7 +1,11 @@
-Index: attr-2.4.39/include/builddefs.in
+---
+ include/builddefs.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: attr-2.4.43/include/builddefs.in
===================================================================
---- attr-2.4.39.orig/include/builddefs.in
-+++ attr-2.4.39/include/builddefs.in
+--- attr-2.4.43.orig/include/builddefs.in
++++ attr-2.4.43/include/builddefs.in
@@ -33,7 +33,7 @@ PKG_LIB_DIR = @libdir@@libdirsuffix@
PKG_DEVLIB_DIR = @libexecdir@@libdirsuffix@
PKG_INC_DIR = @includedir@/attr
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org