Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Fedora Release Engineering
edc63ac2d7 dist-git conversion 2010-07-28 10:28:08 +00:00
Bill Nottingham
4b831e33f7 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:31:50 +00:00
Zdenek Prikryl
59584307cc Fixed following symlinks #284121 Removed explicit Requires(post + postun)
#225290
2007-10-31 07:47:37 +00:00
Jesse Keating
d3cc7cc083 Initialize branch F-8 for attr 2007-10-20 04:16:04 +00:00
4 changed files with 62 additions and 24 deletions

View file

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: attr
# $Id: Makefile,v 1.1 2004/09/09 03:14:35 cvsdist Exp $
NAME := attr
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -0,0 +1,55 @@
--- attr-2.4.38/getfattr/getfattr.c.recursive 2007-01-23 06:56:40.000000000 +0100
+++ attr-2.4.38/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++;
}

View file

@ -1,13 +1,14 @@
Summary: Utilities for managing filesystem extended attributes
Name: attr
Version: 2.4.38
Release: 1%{?dist}
Release: 2%{?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.38-recursive.patch
License: GPL
URL: http://oss.sgi.com/projects/xfs/
Group: System Environment/Base
@ -23,8 +24,6 @@ with the SGI IRIX tool of the same name.
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 @@ you'll also want to install attr.
%patch1 -p1 -b .perms
%patch2 -p1 -b .multilib
%patch3 -p1 -b .build
%patch4 -p1 -b .recursive
autoconf
@ -114,6 +114,10 @@ rm -rf $RPM_BUILD_ROOT
/%{_lib}/libattr.so.*
%changelog
* Wed Oct 31 2007 Zdenek Prikryl <zprikryl@redhat.com> 2.4.38-2
- Fixed following symlinks #284121
- Removed explicit Requires(post + postun) #225290
* Tue Jul 31 2007 Zdenek Prikryl <zprikryl@redhat.com> 2.4.38-1
- New version 2.4.38
- Resolves #245415