rpms/attr/F-7 attr-2.4.32-recursive.patch, NONE, 1.1 attr.spec, 1.25, 1.26

Zdenek Prikryl (zprikryl) fedora-extras-commits at redhat.com
Wed Nov 7 08:00:05 UTC 2007


Author: zprikryl

Update of /cvs/extras/rpms/attr/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11637

Modified Files:
	attr.spec 
Added Files:
	attr-2.4.32-recursive.patch 
Log Message:
Fixed following symlinks #284121
Removed explicit Requires(post + postun) #225290


attr-2.4.32-recursive.patch:

--- NEW FILE attr-2.4.32-recursive.patch ---
--- attr-2.4.32/getfattr/getfattr.c.recursive	2006-06-20 08:51:25.000000000 +0200
+++ attr-2.4.32/getfattr/getfattr.c	2007-09-11 04:00:49.000000000 +0200
@@ -410,6 +410,38 @@ void help(void)
 "      --help              this help text\n"));
 }
 
+char *resolve_symlinks(const char *file)
+{
+	static char buffer[4096];
+	struct stat stat;
+	char *path = NULL;
+
+	if (lstat(file, &stat) == -1)
+		return path;
+
+	if (S_ISLNK(stat.st_mode) && !opt_walk_physical)
+		path = realpath(file, buffer);
+	else
+		path = (char *)file;    /* not a symlink, use given path */
+
+	return path;
+}
+
+int walk_tree(const char *file)
+{
+	const char *p;
+
+	if ((p = resolve_symlinks(file)) == NULL) {
+		fprintf(stderr, "%s: %s: %s\n", progname,
+			xquote(file), strerror(errno));
+		return 1;
+	} else if (nftw(p, do_print, 0, opt_walk_logical? 0 : FTW_PHYS) < 0) {
+		fprintf(stderr, "%s: %s: %s\n", progname, xquote(file),
+			strerror(errno));
+		return 1;
+	}
+	return 0;
+}
 
 int main(int argc, char *argv[])
 {
@@ -499,12 +531,7 @@ int main(int argc, char *argv[])
 	}
 
 	while (optind < argc) {
-		if (nftw(argv[optind], do_print, 0,
-			 opt_walk_physical * FTW_PHYS) < 0) {
-			fprintf(stderr, "%s: %s: %s\n", progname, argv[optind],
-			        strerror_ea(errno));
-			had_errors++;
-		}
+		had_errors += walk_tree(argv[optind]);
 		optind++;
 	}
 


Index: attr.spec
===================================================================
RCS file: /cvs/extras/rpms/attr/F-7/attr.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- attr.spec	23 Feb 2007 10:11:12 -0000	1.25
+++ attr.spec	7 Nov 2007 07:59:25 -0000	1.26
@@ -1,13 +1,14 @@
 Summary: Utilities for managing filesystem extended attributes
 Name: attr
 Version: 2.4.32
-Release: 2%{?dist}
+Release: 3%{?dist}
 Conflicts: xfsdump < 2.0.0
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Source: ftp://oss.sgi.com/projects/xfs/cmd_tars/attr_%{version}-1.tar.gz
 Patch1: attr-2.0.8-docperms.patch
 Patch2: attr-2.2.0-multilib.patch
 Patch3: attr-2.4.32-build.patch
+Patch4: attr-2.4.32-recursive.patch
 License: GPL
 URL: http://oss.sgi.com/projects/xfs/
 Group: System Environment/Base
@@ -23,8 +24,6 @@
 Summary: Dynamic library for extended attribute support
 Group: System Environment/Libraries
 License: LGPL
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
 
 %description -n libattr
 This package contains the libattr.so dynamic library which contains
@@ -60,6 +59,7 @@
 %patch1 -p1 -b .perms
 %patch2 -p1 -b .multilib
 %patch3 -p1 -b .build
+%patch4 -p1 -b .recursive
 
 autoconf
 
@@ -114,6 +114,10 @@
 /%{_lib}/libattr.so.*
 
 %changelog
+* Wed Nov 7 2007 Zdenek Prikryl <zprikryl at redhat.com> - 2.4.32-3
+- Fixed following symlinks #284121
+- Removed explicit Requires(post + postun) #225290
+
 * Fri Feb 23 2007 Karsten Hopp <karsten at redhat.com> 2.4.32-2
 - add disttag
 - remove trailing dot from summary




More information about the fedora-extras-commits mailing list