diff --git a/coreutils-6.9.90-preserve_mode-fix.diff b/coreutils-6.9.90-preserve_mode-fix.diff new file mode 100644 index 0000000..998fd26 --- /dev/null +++ b/coreutils-6.9.90-preserve_mode-fix.diff @@ -0,0 +1,58 @@ +--- + src/cp.c | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +Index: b/src/cp.c +=================================================================== +--- a/src/cp.c ++++ b/src/cp.c +@@ -404,6 +404,7 @@ make_dir_parents_private (char const *co + slash++; + while ((slash = strchr (slash, '/'))) + { ++ int src_errno; + /* Add this directory to the list of directories whose modes need + fixing later. */ + struct dir_attr *new = xmalloc (sizeof *new); +@@ -413,12 +414,22 @@ make_dir_parents_private (char const *co + *attr_list = new; + + *slash = '\0'; ++ src_errno = (stat (src, &new->st) != 0 ++ ? errno ++ : S_ISDIR (new->st.st_mode) ++ ? 0 ++ : ENOTDIR); ++ if (src_errno) ++ { ++ error (0, src_errno, _("failed to get attributes of %s"), ++ quote (src)); ++ return false; ++ } + if (stat (dir, &stats) != 0) + { + mode_t src_mode; + mode_t omitted_permissions; + mode_t mkdir_mode; +- int src_errno; + + /* This component does not exist. We must set + *new_dst and new->st.st_mode inside this loop because, +@@ -426,17 +437,6 @@ make_dir_parents_private (char const *co + make_dir_parents_private creates only e_dir/../a if + ./b already exists. */ + *new_dst = true; +- src_errno = (stat (src, &new->st) != 0 +- ? errno +- : S_ISDIR (new->st.st_mode) +- ? 0 +- : ENOTDIR); +- if (src_errno) +- { +- error (0, src_errno, _("failed to get attributes of %s"), +- quote (src)); +- return false; +- } + src_mode = new->st.st_mode; + + /* If the ownership or special mode bits might change, diff --git a/coreutils.changes b/coreutils.changes index 0fd777f..de21b0d 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 7 11:12:01 CET 2008 - jblunck@suse.de + +- fix a cp bug with -p --parents + ------------------------------------------------------------------- Wed Dec 12 11:27:08 CET 2007 - rguenther@suse.de diff --git a/coreutils.spec b/coreutils.spec index c989d24..643143b 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ # # spec file for package coreutils (Version 6.9.90) # -# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -20,7 +20,7 @@ Obsoletes: libselinux <= 1.23.11-3 libselinux-32bit >= 9 libselinux-64bit = AutoReqProv: on PreReq: %{install_info_prereq} Version: 6.9.90 -Release: 6 +Release: 9 Summary: GNU Core Utilities Source: coreutils-%{version}.tar.bz2 Source1: su.pamd @@ -39,6 +39,7 @@ Patch20: coreutils-6.8-su.diff Patch21: coreutils-6.8.0-pie.diff Patch22: coreutils-5.3.0-sbin4su.diff Patch23: coreutils-getaddrinfo.diff +Patch24: coreutils-6.9.90-preserve_mode-fix.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -107,6 +108,7 @@ Authors: %patch21 %patch22 %patch23 -p1 +%patch24 -p1 %build AUTOPOINT=true autoreconf -fi @@ -171,6 +173,8 @@ rm -rf $RPM_BUILD_ROOT %dir %{_prefix}/share/locale/*/LC_TIME %changelog +* Mon Jan 07 2008 - jblunck@suse.de +- fix a cp bug with -p --parents * Wed Dec 12 2007 - rguenther@suse.de - adjust test-getaddrinfo to not fail w/o network connection * Mon Dec 10 2007 - ro@suse.de