From bfd5cf1204e2cc45f04d4e270b9c8e040e847ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Fri, 11 May 2012 21:19:04 +0200 Subject: [PATCH] ls: upstream fix - correctly show symlinks in / --- coreutils-8.17-ls-rootdir-symlink.patch | 21 +++++++++++++++++++++ coreutils.spec | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 coreutils-8.17-ls-rootdir-symlink.patch diff --git a/coreutils-8.17-ls-rootdir-symlink.patch b/coreutils-8.17-ls-rootdir-symlink.patch new file mode 100644 index 0000000..7227afe --- /dev/null +++ b/coreutils-8.17-ls-rootdir-symlink.patch @@ -0,0 +1,21 @@ +diff -urNp coreutils-8.17-orig/src/ls.c coreutils-8.17/src/ls.c +--- coreutils-8.17-orig/src/ls.c 2012-05-11 20:59:01.467946060 +0200 ++++ coreutils-8.17/src/ls.c 2012-05-11 21:00:38.276821883 +0200 +@@ -3206,14 +3206,9 @@ make_link_name (char const *name, char const *linkname) + if (IS_ABSOLUTE_FILE_NAME (linkname)) + return xstrdup (linkname); + +- /* The link is to a relative name. Prepend any leading directory +- in 'name' to the link name. */ +- size_t prefix_len = dir_len (name); +- if (prefix_len == 0) +- return xstrdup (linkname); +- +- char *p = xmalloc (prefix_len + 1 + strlen (linkname) + 1); +- stpcpy (stpncpy (p, name, prefix_len + 1), linkname); ++ char *d = dir_name (name); ++ char *p = file_name_concat (d, linkname, NULL); ++ free (d); + return p; + } + diff --git a/coreutils.spec b/coreutils.spec index 9e81b26..628b7f9 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.17 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -18,6 +18,7 @@ Source202: coreutils-su-l.pamd Source203: coreutils-runuser-l.pamd # From upstream +Patch1: coreutils-8.17-ls-rootdir-symlink.patch # Our patches #general patch to workaround koji build system issues @@ -143,6 +144,7 @@ the old GNU fileutils, sh-utils, and textutils packages. %setup -q # From upstream +%patch1 -p1 -b .roodirsymlink # Our patches %patch100 -p1 -b .configure @@ -416,6 +418,9 @@ fi %{?!norunuser:%{_sbindir}/runuser} %changelog +* Fri May 11 2012 Ondrej Vasik 8.17-2 +- ls: upstream fix - correctly show symlinks in / + * Fri May 11 2012 Ondrej Vasik 8.17-1 - new upstream release 8.17