summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog9
-rw-r--r--debian/control1
-rw-r--r--debian/patches/dyson-acl-dirty.patch144
-rw-r--r--debian/patches/series1
4 files changed, 155 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 73898ffc..30b4ef75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+coreutils (8.24-0+dyson1) unstable; urgency=medium
+
+ * New upstream release
+ * Added debian/patches/dyson-acl-dirty.patch
+ * Remove doc/stamp-vti and doc/version.texi on clean (d/clean)
+ * coreutils provides realpath
+
+ -- Igor Pashev <pashev.igor@gmail.com> Sat, 04 Jul 2015 17:39:04 +0300
+
coreutils (8.23-0+dyson1) unstable; urgency=medium
* New upstream release
diff --git a/debian/control b/debian/control
index 4d5a5c82..d82fa829 100644
--- a/debian/control
+++ b/debian/control
@@ -20,6 +20,7 @@ Multi-Arch: foreign
Pre-Depends: ${shlibs:Depends}, ${misc:Pre-Depends}
Essential: yes
Depends: ${misc:Depends}
+Provides: realpath
Description: GNU core utilities
This package contains the basic file, shell and text manipulation
utilities which are expected to exist on every operating system.
diff --git a/debian/patches/dyson-acl-dirty.patch b/debian/patches/dyson-acl-dirty.patch
new file mode 100644
index 00000000..f484d731
--- /dev/null
+++ b/debian/patches/dyson-acl-dirty.patch
@@ -0,0 +1,144 @@
+Description: ls --acl prints ACLs (illumos only)
+Bug-Dyson: http://osdyson.org/issues/106
+Index: coreutils/src/ls.c
+===================================================================
+--- coreutils.orig/src/ls.c
++++ coreutils/src/ls.c
+@@ -49,6 +49,8 @@
+ # include <sys/ptem.h>
+ #endif
+
++#include <sys/acl.h>
++
+ #include <stdio.h>
+ #include <assert.h>
+ #include <setjmp.h>
+@@ -185,7 +187,7 @@ verify (sizeof filetype_letter - 1 == ar
+ C_LINK, C_SOCK, C_FILE, C_DIR \
+ }
+
+-enum acl_type
++enum ls_acl_type
+ {
+ ACL_T_NONE,
+ ACL_T_LSM_CONTEXT_ONLY,
+@@ -219,7 +221,7 @@ struct fileinfo
+
+ /* For long listings, true if the file has an access control list,
+ or a security context. */
+- enum acl_type acl_type;
++ enum ls_acl_type ls_acl_type;
+
+ /* For color listings, true if a regular file has capability info. */
+ bool has_capability;
+@@ -271,6 +273,7 @@ static void print_horizontal (void);
+ static int format_user_width (uid_t u);
+ static int format_group_width (gid_t g);
+ static void print_long_format (const struct fileinfo *f);
++static void do_print_acl (const struct fileinfo *f);
+ static void print_many_per_line (void);
+ static size_t print_name_with_quoting (const struct fileinfo *f,
+ bool symlink_target,
+@@ -356,6 +359,7 @@ static struct pending *pending_dirs;
+ static struct timespec current_time;
+
+ static bool print_scontext;
++static bool print_acl;
+ static char UNKNOWN_SECURITY_CONTEXT[] = "?";
+
+ /* Whether any of the files has an ACL. This affects the width of the
+@@ -799,7 +803,8 @@ enum
+ SI_OPTION,
+ SORT_OPTION,
+ TIME_OPTION,
+- TIME_STYLE_OPTION
++ TIME_STYLE_OPTION,
++ ACL_OPTION,
+ };
+
+ static struct option const long_options[] =
+@@ -845,6 +850,7 @@ static struct option const long_options[
+ {"color", optional_argument, NULL, COLOR_OPTION},
+ {"block-size", required_argument, NULL, BLOCK_SIZE_OPTION},
+ {"context", no_argument, 0, 'Z'},
++ {"acl", no_argument, 0, ACL_OPTION},
+ {"author", no_argument, NULL, AUTHOR_OPTION},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
+@@ -1579,6 +1585,7 @@ decode_switches (int argc, char **argv)
+ ignore_patterns = NULL;
+ hide_patterns = NULL;
+ print_scontext = false;
++ print_acl = false;
+
+ getenv_quoting_style ();
+
+@@ -1932,6 +1939,11 @@ decode_switches (int argc, char **argv)
+ print_scontext = true;
+ break;
+
++ case ACL_OPTION:
++ print_acl = true;
++ format = long_format;
++ break;
++
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+@@ -3076,12 +3088,12 @@ gobble_file (char const *name, enum file
+ have_acl = (0 < n);
+ }
+
+- f->acl_type = (!have_scontext && !have_acl
++ f->ls_acl_type = (!have_scontext && !have_acl
+ ? ACL_T_NONE
+ : (have_scontext && !have_acl
+ ? ACL_T_LSM_CONTEXT_ONLY
+ : ACL_T_YES));
+- any_has_acl |= f->acl_type != ACL_T_NONE;
++ any_has_acl |= f->ls_acl_type != ACL_T_NONE;
+
+ if (err)
+ error (0, errno, "%s", quotearg_colon (absolute_name));
+@@ -3807,6 +3819,19 @@ format_inode (char *buf, size_t buflen,
+ : (char *) "?");
+ }
+
++/* Print ACL for F. */
++static void
++do_print_acl (const struct fileinfo *f)
++{
++ acl_t *aclp;
++ if (0 == acl_get(f->name, 0, &aclp) && NULL != aclp) {
++ putchar('\n');
++ acl_printacl(aclp, 80, 0);
++ acl_free(aclp);
++ }
++
++}
++
+ /* Print information about F in long format. */
+ static void
+ print_long_format (const struct fileinfo *f)
+@@ -3838,9 +3863,9 @@ print_long_format (const struct fileinfo
+ }
+ if (! any_has_acl)
+ modebuf[10] = '\0';
+- else if (f->acl_type == ACL_T_LSM_CONTEXT_ONLY)
++ else if (f->ls_acl_type == ACL_T_LSM_CONTEXT_ONLY)
+ modebuf[10] = '.';
+- else if (f->acl_type == ACL_T_YES)
++ else if (f->ls_acl_type == ACL_T_YES)
+ modebuf[10] = '+';
+
+ switch (time_type)
+@@ -4026,6 +4051,9 @@ print_long_format (const struct fileinfo
+ }
+ else if (indicator_style != none)
+ print_type_indicator (f->stat_ok, f->stat.st_mode, f->filetype);
++
++ if (f->filetype != symbolic_link && print_acl)
++ do_print_acl(f);
+ }
+
+ /* Output to OUT a quoted representation of the file name NAME,
diff --git a/debian/patches/series b/debian/patches/series
index abcaf193..9127eeca 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
85_timer_settime.patch
99_hppa_longlong.patch
99_kfbsd_fstat_patch.patch
+dyson-acl-dirty.patch