From fc86677545316c4a0fdf8c82795db90fca9ebba1 Mon Sep 17 00:00:00 2001 From: Radek Brich Date: Jun 28 2007 16:11:58 +0000 Subject: upgrade to 1.17 --- diff --git a/.cvsignore b/.cvsignore index 4dbc547..1264d8a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,2 @@ -tar-1.15.1.tar.gz -tar-1.15.1.tar.gz.sig -tar.1 +tar-1.17.tar.gz +tar-1.17.tar.gz.sig diff --git a/sources b/sources index 825e968..a883da9 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ -d87021366fe6488e9dc398fcdcb6ed7d tar-1.15.1.tar.gz -4be36b7651557cc236ed6fe9b6966fee tar-1.15.1.tar.gz.sig -a554cb69d67c0c7d16d864b9c6f05c11 tar.1 +65e568b83caf7aa865144031e7a7c6a8 tar-1.17.tar.gz +a7f959b4c8bd9aaa5a6677acfabff699 tar-1.17.tar.gz.sig diff --git a/tar-1.14-nolibrt.patch b/tar-1.14-nolibrt.patch deleted file mode 100644 index 66e6448..0000000 --- a/tar-1.14-nolibrt.patch +++ /dev/null @@ -1,214 +0,0 @@ ---- tar-1.15.1/configure.nolibrt 2004-12-21 13:30:30.000000000 +0000 -+++ tar-1.15.1/configure 2005-01-07 11:18:51.878839553 +0000 -@@ -11470,20 +11470,20 @@ - # dnl Persuade glibc to declare these functions. - - -- # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. -+ # Solaris 2.5.1 needs -lposix4 to get the clock_gettyme function. - # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - - # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - fetish_saved_libs=$LIBS -- echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5 --echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6 --if test "${ac_cv_search_clock_gettime+set}" = set; then -+ echo "$as_me:$LINENO: checking for library containing clock_gettyme" >&5 -+echo $ECHO_N "checking for library containing clock_gettyme... $ECHO_C" >&6 -+if test "${ac_cv_search_clock_gettyme+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_func_search_save_LIBS=$LIBS --ac_cv_search_clock_gettime=no -+ac_cv_search_clock_gettyme=no - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -11497,11 +11497,11 @@ - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char clock_gettime (); -+char clock_gettyme (); - int - main () - { --clock_gettime (); -+clock_gettyme (); - ; - return 0; - } -@@ -11528,7 +11528,7 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_search_clock_gettime="none required" -+ ac_cv_search_clock_gettyme="none required" - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 -@@ -11536,7 +11536,7 @@ - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test "$ac_cv_search_clock_gettime" = no; then -+if test "$ac_cv_search_clock_gettyme" = no; then - for ac_lib in rt posix4; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -@@ -11552,11 +11552,11 @@ - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char clock_gettime (); -+char clock_gettyme (); - int - main () - { --clock_gettime (); -+clock_gettyme (); - ; - return 0; - } -@@ -11583,7 +11583,7 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_search_clock_gettime="-l$ac_lib" -+ ac_cv_search_clock_gettyme="-l$ac_lib" - break - else - echo "$as_me: failed program was:" >&5 -@@ -11596,18 +11596,18 @@ - fi - LIBS=$ac_func_search_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5 --echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6 --if test "$ac_cv_search_clock_gettime" != no; then -- test "$ac_cv_search_clock_gettime" = "none required" || LIBS="$ac_cv_search_clock_gettime $LIBS" -- test "$ac_cv_search_clock_gettime" = "none required" || -- LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime -+echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettyme" >&5 -+echo "${ECHO_T}$ac_cv_search_clock_gettyme" >&6 -+if test "$ac_cv_search_clock_gettyme" != no; then -+ test "$ac_cv_search_clock_gettyme" = "none required" || LIBS="$ac_cv_search_clock_gettyme $LIBS" -+ test "$ac_cv_search_clock_gettyme" = "none required" || -+ LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettyme - fi - - - - --for ac_func in clock_gettime clock_settime -+for ac_func in clock_gettyme clock_settime - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 -@@ -20541,17 +20541,17 @@ - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - --# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. -+# Solaris 2.5.1 needs -lposix4 to get the clock_gettyme function. - # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - tar_save_LIBS=$LIBS - LIB_CLOCK_GETTIME= -- echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5 --echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6 --if test "${ac_cv_search_clock_gettime+set}" = set; then -+ echo "$as_me:$LINENO: checking for library containing clock_gettyme" >&5 -+echo $ECHO_N "checking for library containing clock_gettyme... $ECHO_C" >&6 -+if test "${ac_cv_search_clock_gettyme+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_func_search_save_LIBS=$LIBS --ac_cv_search_clock_gettime=no -+ac_cv_search_clock_gettyme=no - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -20565,11 +20565,11 @@ - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char clock_gettime (); -+char clock_gettyme (); - int - main () - { --clock_gettime (); -+clock_gettyme (); - ; - return 0; - } -@@ -20596,7 +20596,7 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_search_clock_gettime="none required" -+ ac_cv_search_clock_gettyme="none required" - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 -@@ -20604,7 +20604,7 @@ - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test "$ac_cv_search_clock_gettime" = no; then -+if test "$ac_cv_search_clock_gettyme" = no; then - for ac_lib in rt posix4; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -@@ -20620,11 +20620,11 @@ - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char clock_gettime (); -+char clock_gettyme (); - int - main () - { --clock_gettime (); -+clock_gettyme (); - ; - return 0; - } -@@ -20651,7 +20651,7 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_search_clock_gettime="-l$ac_lib" -+ ac_cv_search_clock_gettyme="-l$ac_lib" - break - else - echo "$as_me: failed program was:" >&5 -@@ -20664,19 +20664,19 @@ - fi - LIBS=$ac_func_search_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5 --echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6 --if test "$ac_cv_search_clock_gettime" != no; then -- test "$ac_cv_search_clock_gettime" = "none required" || LIBS="$ac_cv_search_clock_gettime $LIBS" -+echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettyme" >&5 -+echo "${ECHO_T}$ac_cv_search_clock_gettyme" >&6 -+if test "$ac_cv_search_clock_gettyme" != no; then -+ test "$ac_cv_search_clock_gettyme" = "none required" || LIBS="$ac_cv_search_clock_gettyme $LIBS" - - fi - -- case "$ac_cv_search_clock_gettime" in -- -l*) LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime;; -+ case "$ac_cv_search_clock_gettyme" in -+ -l*) LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettyme;; - esac - - --for ac_func in clock_gettime -+for ac_func in clock_gettyme - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 diff --git a/tar-1.15.1-gcc4.patch b/tar-1.15.1-gcc4.patch deleted file mode 100644 index c5f2763..0000000 --- a/tar-1.15.1-gcc4.patch +++ /dev/null @@ -1,16 +0,0 @@ -Patch by Robert Scheck for tar >= 1.15.1, which makes tar -rebuildable using gcc 4. - ---- tar-1.15.1/tests/genfile.c 2004-09-08 13:50:20.000000000 +0200 -+++ tar-1.15.1/tests/genfile.c.gcc4 2005-03-13 16:25:15.000000000 +0100 -@@ -60,8 +60,8 @@ - /* Block buffer for sparse file */ - char *buffer; - --static const char *argp_program_version = "genfile (" PACKAGE ") " VERSION; --static const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; -+const char *argp_program_version = "genfile (" PACKAGE ") " VERSION; -+const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; - static char doc[] = N_("genfile generates data files for GNU paxutils test suite"); - - static struct argp_option options[] = { diff --git a/tar-1.15.1-heapOverflow.patch b/tar-1.15.1-heapOverflow.patch deleted file mode 100644 index 679f818..0000000 --- a/tar-1.15.1-heapOverflow.patch +++ /dev/null @@ -1,121 +0,0 @@ ---- src/xheader.c.orig 2004-09-06 06:31:14.000000000 -0500 -+++ src/xheader.c 2006-02-08 16:59:46.000000000 -0500 -@@ -783,6 +783,32 @@ code_num (uintmax_t value, char const *k - xheader_print (xhdr, keyword, sbuf); - } - -+static bool -+decode_num (uintmax_t *num, char const *arg, uintmax_t maxval, -+ char const *keyword) -+{ -+ uintmax_t u; -+ char *arg_lim; -+ -+ if (! (ISDIGIT (*arg) -+ && (errno = 0, u = strtoumax (arg, &arg_lim, 10), !*arg_lim))) -+ { -+ ERROR ((0, 0, _("Malformed extended header: invalid %s=%s"), -+ keyword, arg)); -+ return false; -+ } -+ -+ if (! (u <= maxval && errno != ERANGE)) -+ { -+ ERROR ((0, 0, _("Extended header %s=%s is out of range"), -+ keyword, arg)); -+ return false; -+ } -+ -+ *num = u; -+ return true; -+} -+ - static void - dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)), - char const *keyword __attribute__ ((unused)), -@@ -821,7 +847,7 @@ static void - gid_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, TYPE_MAXIMUM (gid_t), "gid")) - st->stat.st_gid = u; - } - -@@ -903,7 +929,7 @@ static void - size_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "size")) - st->archive_file_size = st->stat.st_size = u; - } - -@@ -918,7 +944,7 @@ static void - uid_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, TYPE_MAXIMUM (uid_t), "uid")) - st->stat.st_uid = u; - } - -@@ -946,7 +972,7 @@ static void - sparse_size_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.size")) - st->stat.st_size = u; - } - -@@ -962,10 +988,10 @@ static void - sparse_numblocks_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numblocks")) - { - st->sparse_map_size = u; -- st->sparse_map = calloc(st->sparse_map_size, sizeof(st->sparse_map[0])); -+ st->sparse_map = xcalloc (u, sizeof st->sparse_map[0]); - st->sparse_map_avail = 0; - } - } -@@ -982,8 +1008,14 @@ static void - sparse_offset_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.offset")) -+ { -+ if (st->sparse_map_avail < st->sparse_map_size) - st->sparse_map[st->sparse_map_avail].offset = u; -+ else -+ ERROR ((0, 0, _("Malformed extended header: excess %s=%s"), -+ "GNU.sparse.offset", arg)); -+ } - } - - static void -@@ -998,15 +1030,13 @@ static void - sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg) - { - uintmax_t u; -- if (xstrtoumax (arg, NULL, 10, &u, "") == LONGINT_OK) -+ if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numbytes")) - { - if (st->sparse_map_avail == st->sparse_map_size) -- { -- st->sparse_map_size *= 2; -- st->sparse_map = xrealloc (st->sparse_map, -- st->sparse_map_size -- * sizeof st->sparse_map[0]); -- } -+ st->sparse_map = x2nrealloc (st->sparse_map, -+ &st->sparse_map_size, -+ sizeof st->sparse_map[0]); -+ - st->sparse_map[st->sparse_map_avail++].numbytes = u; - } - } diff --git a/tar-1.15.1-hugeSparse.patch b/tar-1.15.1-hugeSparse.patch deleted file mode 100644 index e8f38f8..0000000 --- a/tar-1.15.1-hugeSparse.patch +++ /dev/null @@ -1,477 +0,0 @@ ---- tar-1.15.1/src/sparse.c.hugeSparse 2006-09-19 22:01:19.000000000 +0200 -+++ tar-1.15.1/src/sparse.c 2006-09-19 22:08:33.000000000 +0200 -@@ -21,6 +21,7 @@ - #include "common.h" - - struct tar_sparse_file; -+static bool sparse_select_optab (struct tar_sparse_file *file); - - enum sparse_scan_state - { -@@ -47,47 +48,47 @@ - { - int fd; /* File descriptor */ - bool seekable; /* Is fd seekable? */ -- size_t offset; /* Current offset in fd if seekable==false. -+ off_t offset; /* Current offset in fd if seekable==false. - Otherwise unused */ -- size_t dumped_size; /* Number of bytes actually written -+ off_t dumped_size; /* Number of bytes actually written - to the archive */ - struct tar_stat_info *stat_info; /* Information about the file */ -- struct tar_sparse_optab *optab; -+ struct tar_sparse_optab const *optab; - void *closure; /* Any additional data optab calls might -- reqiure */ -+ require */ - }; - - /* Dump zeros to file->fd until offset is reached. It is used instead of - lseek if the output file is not seekable */ --static long -+static bool - dump_zeros (struct tar_sparse_file *file, off_t offset) - { -- char buf[BLOCKSIZE]; -- -- if (offset - file->offset < 0) -+ static char const zero_buf[BLOCKSIZE]; -+ -+ if (offset < file->offset) - { - errno = EINVAL; -- return -1; -+ return false; - } - -- memset (buf, 0, sizeof buf); - while (file->offset < offset) - { -- size_t size = offset - file->offset; -- size_t wrbytes; -- -- if (size > sizeof buf) -- size = sizeof buf; -- wrbytes = write (file->fd, buf, size); -+ size_t size = (BLOCKSIZE < offset - file->offset -+ ? BLOCKSIZE -+ : offset - file->offset); -+ ssize_t wrbytes; -+ -+ wrbytes = write (file->fd, zero_buf, size); - if (wrbytes <= 0) - { - if (wrbytes == 0) - errno = EINVAL; -- return -1; -+ return false; - } - file->offset += wrbytes; - } -- return file->offset; -+ -+ return true; - } - - static bool -@@ -101,9 +102,14 @@ - static bool - tar_sparse_init (struct tar_sparse_file *file) - { -- file->dumped_size = 0; -+ memset (file, 0, sizeof *file); -+ -+ if (!sparse_select_optab (file)) -+ return false; -+ - if (file->optab->init) - return file->optab->init (file); -+ - return true; - } - -@@ -168,14 +174,9 @@ - static bool - lseek_or_error (struct tar_sparse_file *file, off_t offset) - { -- off_t off; -- -- if (file->seekable) -- off = lseek (file->fd, offset, SEEK_SET); -- else -- off = dump_zeros (file, offset); -- -- if (off < 0) -+ if (file->seekable -+ ? lseek (file->fd, offset, SEEK_SET) < 0 -+ : ! dump_zeros (file, offset)) - { - seek_diag_details (file->stat_info->orig_file_name, offset); - return false; -@@ -187,7 +188,7 @@ - it's made *entirely* of zeros, returning a 0 the instant it finds - something that is a nonzero, i.e., useful data. */ - static bool --zero_block_p (char *buffer, size_t size) -+zero_block_p (char const *buffer, size_t size) - { - while (size--) - if (*buffer++) -@@ -195,58 +196,46 @@ - return true; - } - --#define clear_block(p) memset (p, 0, BLOCKSIZE); -- --#define SPARSES_INIT_COUNT SPARSES_IN_SPARSE_HEADER -- - static void --sparse_add_map (struct tar_sparse_file *file, struct sp_array *sp) -+sparse_add_map (struct tar_stat_info *st, struct sp_array const *sp) - { -- if (file->stat_info->sparse_map == NULL) -- { -- file->stat_info->sparse_map = -- xmalloc (SPARSES_INIT_COUNT * sizeof file->stat_info->sparse_map[0]); -- file->stat_info->sparse_map_size = SPARSES_INIT_COUNT; -- } -- else if (file->stat_info->sparse_map_avail == file->stat_info->sparse_map_size) -- { -- file->stat_info->sparse_map_size *= 2; -- file->stat_info->sparse_map = -- xrealloc (file->stat_info->sparse_map, -- file->stat_info->sparse_map_size -- * sizeof file->stat_info->sparse_map[0]); -- } -- file->stat_info->sparse_map[file->stat_info->sparse_map_avail++] = *sp; -+ struct sp_array *sparse_map = st->sparse_map; -+ size_t avail = st->sparse_map_avail; -+ if (avail == st->sparse_map_size) -+ st->sparse_map = sparse_map = -+ x2nrealloc (sparse_map, &st->sparse_map_size, sizeof *sparse_map); -+ sparse_map[avail] = *sp; -+ st->sparse_map_avail = avail + 1; - } - - /* Scan the sparse file and create its map */ - static bool - sparse_scan_file (struct tar_sparse_file *file) - { -- static char buffer[BLOCKSIZE]; -+ struct tar_stat_info *st = file->stat_info; -+ int fd = file->fd; -+ char buffer[BLOCKSIZE]; - size_t count; - off_t offset = 0; - struct sp_array sp = {0, 0}; - - if (!lseek_or_error (file, 0)) - return false; -- clear_block (buffer); -- -- file->stat_info->sparse_map_avail = 0; -- file->stat_info->archive_file_size = 0; - -+ st->archive_file_size = 0; -+ - if (!tar_sparse_scan (file, scan_begin, NULL)) - return false; - -- while ((count = safe_read (file->fd, buffer, sizeof buffer)) != 0 -+ while ((count = safe_read (fd, buffer, sizeof buffer)) != 0 - && count != SAFE_READ_ERROR) - { -- /* Analize the block */ -+ /* Analyze the block. */ - if (zero_block_p (buffer, count)) - { - if (sp.numbytes) - { -- sparse_add_map (file, &sp); -+ sparse_add_map (st, &sp); - sp.numbytes = 0; - if (!tar_sparse_scan (file, scan_block, NULL)) - return false; -@@ -257,26 +246,25 @@ - if (sp.numbytes == 0) - sp.offset = offset; - sp.numbytes += count; -- file->stat_info->archive_file_size += count; -+ st->archive_file_size += count; - if (!tar_sparse_scan (file, scan_block, buffer)) - return false; - } - - offset += count; -- clear_block (buffer); - } - - if (sp.numbytes == 0) - sp.offset = offset; - -- sparse_add_map (file, &sp); -- file->stat_info->archive_file_size += count; -+ sparse_add_map (st, &sp); -+ st->archive_file_size += count; - return tar_sparse_scan (file, scan_end, NULL); - } - --static struct tar_sparse_optab oldgnu_optab; --static struct tar_sparse_optab star_optab; --static struct tar_sparse_optab pax_optab; -+static struct tar_sparse_optab const oldgnu_optab; -+static struct tar_sparse_optab const star_optab; -+static struct tar_sparse_optab const pax_optab; - - static bool - sparse_select_optab (struct tar_sparse_file *file) -@@ -321,18 +309,18 @@ - size_t bytes_read; - - blk = find_next_block (); -- memset (blk->buffer, 0, BLOCKSIZE); - bytes_read = safe_read (file->fd, blk->buffer, bufsize); - if (bytes_read == SAFE_READ_ERROR) - { - read_diag_details (file->stat_info->orig_file_name, -- file->stat_info->sparse_map[i].offset -- + file->stat_info->sparse_map[i].numbytes -- - bytes_left, -- bufsize); -+ (file->stat_info->sparse_map[i].offset -+ + file->stat_info->sparse_map[i].numbytes -+ - bytes_left), -+ bufsize); - return false; - } - -+ memset (blk->buffer + bytes_read, 0, BLOCKSIZE - bytes_read); - bytes_left -= bytes_read; - file->dumped_size += bytes_read; - set_next_block_after (blk); -@@ -391,14 +379,12 @@ - bool rc; - struct tar_sparse_file file; - -+ if (!tar_sparse_init (&file)) -+ return dump_status_not_implemented; -+ - file.stat_info = st; - file.fd = fd; - file.seekable = true; /* File *must* be seekable for dump to work */ -- file.offset = 0; -- -- if (!sparse_select_optab (&file) -- || !tar_sparse_init (&file)) -- return dump_status_not_implemented; - - rc = sparse_scan_file (&file); - if (rc && file.optab->dump_region) -@@ -414,7 +400,7 @@ - } - } - -- pad_archive(file.stat_info->archive_file_size - file.dumped_size); -+ pad_archive (file.stat_info->archive_file_size - file.dumped_size); - return (tar_sparse_done (&file) && rc) ? dump_status_ok : dump_status_short; - } - -@@ -432,7 +418,7 @@ - { - struct tar_sparse_file file; - -- if (!sparse_select_optab (&file)) -+ if (!tar_sparse_init (&file)) - return false; - file.stat_info = st; - return tar_sparse_member_p (&file); -@@ -443,7 +429,7 @@ - { - struct tar_sparse_file file; - -- if (!sparse_select_optab (&file)) -+ if (!tar_sparse_init (&file)) - return false; - file.stat_info = st; - return tar_sparse_fixup_header (&file); -@@ -456,14 +442,13 @@ - struct tar_sparse_file file; - size_t i; - -+ if (!tar_sparse_init (&file)) -+ return dump_status_not_implemented; -+ - file.stat_info = st; - file.fd = fd; - file.seekable = lseek (fd, 0, SEEK_SET) == 0; - file.offset = 0; -- -- if (!sparse_select_optab (&file) -- || !tar_sparse_init (&file)) -- return dump_status_not_implemented; - - rc = tar_sparse_decode_header (&file); - for (i = 0; rc && i < file.stat_info->sparse_map_avail; i++) -@@ -478,21 +463,18 @@ - bool rc = true; - struct tar_sparse_file file; - -+ if (!tar_sparse_init (&file)) -+ return dump_status_not_implemented; -+ - file.stat_info = st; - file.fd = -1; - -- if (!sparse_select_optab (&file) -- || !tar_sparse_init (&file)) -- return dump_status_not_implemented; -- - rc = tar_sparse_decode_header (&file); - skip_file (file.stat_info->archive_file_size); - return (tar_sparse_done (&file) && rc) ? dump_status_ok : dump_status_short; - } - - --static char diff_buffer[BLOCKSIZE]; -- - static bool - check_sparse_region (struct tar_sparse_file *file, off_t beg, off_t end) - { -@@ -502,11 +484,9 @@ - while (beg < end) - { - size_t bytes_read; -- size_t rdsize = end - beg; -+ size_t rdsize = BLOCKSIZE < end - beg ? BLOCKSIZE : end - beg; -+ char diff_buffer[BLOCKSIZE]; - -- if (rdsize > BLOCKSIZE) -- rdsize = BLOCKSIZE; -- clear_block (diff_buffer); - bytes_read = safe_read (file->fd, diff_buffer, rdsize); - if (bytes_read == SAFE_READ_ERROR) - { -@@ -518,7 +498,7 @@ - if (!zero_block_p (diff_buffer, bytes_read)) - { - report_difference (file->stat_info, -- _("File fragment at %lu is not a hole"), beg); -+ _("File fragment at %lu is not a hole"), beg); - return false; - } - -@@ -539,6 +519,7 @@ - { - size_t bytes_read; - size_t rdsize = (size_left > BLOCKSIZE) ? BLOCKSIZE : size_left; -+ char diff_buffer[BLOCKSIZE]; - - union block *blk = find_next_block (); - if (!blk) -@@ -551,9 +532,9 @@ - if (bytes_read == SAFE_READ_ERROR) - { - read_diag_details (file->stat_info->orig_file_name, -- file->stat_info->sparse_map[i].offset -- + file->stat_info->sparse_map[i].numbytes -- - size_left, -+ (file->stat_info->sparse_map[i].offset -+ + file->stat_info->sparse_map[i].numbytes -+ - size_left), - rdsize); - return false; - } -@@ -576,13 +557,12 @@ - size_t i; - off_t offset = 0; - -+ if (!tar_sparse_init (&file)) -+ return dump_status_not_implemented; -+ - file.stat_info = st; - file.fd = fd; - -- if (!sparse_select_optab (&file) -- || !tar_sparse_init (&file)) -- return dump_status_not_implemented; -- - rc = tar_sparse_decode_header (&file); - for (i = 0; rc && i < file.stat_info->sparse_map_avail; i++) - { -@@ -647,7 +627,7 @@ - || file->stat_info->archive_file_size < 0) - return add_fail; - -- sparse_add_map (file, &sp); -+ sparse_add_map (file->stat_info, &sp); - return add_ok; - } - -@@ -658,7 +638,7 @@ - which actually contains archived size. The following fixes it */ - file->stat_info->archive_file_size = file->stat_info->stat.st_size; - file->stat_info->stat.st_size = -- OFF_FROM_HEADER (current_header->oldgnu_header.realsize); -+ OFF_FROM_HEADER (current_header->oldgnu_header.realsize); - return true; - } - -@@ -669,7 +649,7 @@ - size_t i; - union block *h = current_header; - int ext_p; -- static enum oldgnu_add_status rc; -+ enum oldgnu_add_status rc; - - file->stat_info->sparse_map_avail = 0; - for (i = 0; i < SPARSES_IN_OLDGNU_HEADER; i++) -@@ -756,7 +736,7 @@ - return true; - } - --static struct tar_sparse_optab oldgnu_optab = { -+static struct tar_sparse_optab const oldgnu_optab = { - NULL, /* No init function */ - NULL, /* No done function */ - oldgnu_sparse_member_p, -@@ -795,7 +775,7 @@ - size_t i; - union block *h = current_header; - int ext_p; -- static enum oldgnu_add_status rc; -+ enum oldgnu_add_status rc = add_ok; - - file->stat_info->sparse_map_avail = 0; - -@@ -837,7 +817,7 @@ - } - - --static struct tar_sparse_optab star_optab = { -+static struct tar_sparse_optab const star_optab = { - NULL, /* No init function */ - NULL, /* No done function */ - star_sparse_member_p, -@@ -864,7 +844,7 @@ - static bool - pax_sparse_member_p (struct tar_sparse_file *file) - { -- return file->stat_info->archive_file_size != file->stat_info->stat.st_size; -+ return file->stat_info->sparse_map_avail > 0; - } - - static bool -@@ -890,7 +870,7 @@ - return true; - } - --static struct tar_sparse_optab pax_optab = { -+static struct tar_sparse_optab const pax_optab = { - NULL, /* No init function */ - NULL, /* No done function */ - pax_sparse_member_p, -@@ -901,4 +881,3 @@ - sparse_dump_region, - sparse_extract_region, - }; -- diff --git a/tar-1.15.1-incompatibilities.patch b/tar-1.15.1-incompatibilities.patch deleted file mode 100644 index ccdace8..0000000 --- a/tar-1.15.1-incompatibilities.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- tar-1.15.1/src/create.c.incompatibilities 2006-09-19 22:23:32.000000000 +0200 -+++ tar-1.15.1/src/create.c 2006-09-19 22:24:02.000000000 +0200 -@@ -254,7 +254,8 @@ - && S_IROTH == TOREAD && S_IWOTH == TOWRITE && S_IXOTH == TOEXEC - && archive_format != POSIX_FORMAT - && archive_format != USTAR_FORMAT -- && archive_format != GNU_FORMAT) -+ && archive_format != GNU_FORMAT -+ && archive_format != OLDGNU_FORMAT) - { - negative = v < 0; - u = v; diff --git a/tar-1.15.1-lseek.patch b/tar-1.15.1-lseek.patch deleted file mode 100644 index 1fedbe4..0000000 --- a/tar-1.15.1-lseek.patch +++ /dev/null @@ -1,162 +0,0 @@ ---- tar-1.15.1/src/sparse.c.lseek 2004-09-06 13:30:57.000000000 +0200 -+++ tar-1.15.1/src/sparse.c 2005-04-15 10:33:17.990735744 +0200 -@@ -46,6 +46,9 @@ - struct tar_sparse_file - { - int fd; /* File descriptor */ -+ bool seekable; /* Is fd seekable? */ -+ size_t offset; /* Current offset in fd if seekable==false. -+ Otherwise unused */ - size_t dumped_size; /* Number of bytes actually written - to the archive */ - struct tar_stat_info *stat_info; /* Information about the file */ -@@ -54,6 +57,39 @@ - reqiure */ - }; - -+/* Dump zeros to file->fd until offset is reached. It is used instead of -+ lseek if the output file is not seekable */ -+static long -+dump_zeros (struct tar_sparse_file *file, off_t offset) -+{ -+ char buf[BLOCKSIZE]; -+ -+ if (offset - file->offset < 0) -+ { -+ errno = EINVAL; -+ return -1; -+ } -+ -+ memset (buf, 0, sizeof buf); -+ while (file->offset < offset) -+ { -+ size_t size = offset - file->offset; -+ size_t wrbytes; -+ -+ if (size > sizeof buf) -+ size = sizeof buf; -+ wrbytes = write (file->fd, buf, size); -+ if (wrbytes <= 0) -+ { -+ if (wrbytes == 0) -+ errno = EINVAL; -+ return -1; -+ } -+ file->offset += wrbytes; -+ } -+ return file->offset; -+} -+ - static bool - tar_sparse_member_p (struct tar_sparse_file *file) - { -@@ -130,9 +166,16 @@ - - - static bool --lseek_or_error (struct tar_sparse_file *file, off_t offset, int whence) -+lseek_or_error (struct tar_sparse_file *file, off_t offset) - { -- if (lseek (file->fd, offset, whence) < 0) -+ off_t off; -+ -+ if (file->seekable) -+ off = lseek (file->fd, offset, SEEK_SET); -+ else -+ off = dump_zeros (file, offset); -+ -+ if (off < 0) - { - seek_diag_details (file->stat_info->orig_file_name, offset); - return false; -@@ -182,10 +225,10 @@ - { - static char buffer[BLOCKSIZE]; - size_t count; -- size_t offset = 0; -+ off_t offset = 0; - struct sp_array sp = {0, 0}; - -- if (!lseek_or_error (file, 0, SEEK_SET)) -+ if (!lseek_or_error (file, 0)) - return false; - clear_block (buffer); - -@@ -269,8 +312,7 @@ - union block *blk; - off_t bytes_left = file->stat_info->sparse_map[i].numbytes; - -- if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset, -- SEEK_SET)) -+ if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset)) - return false; - - while (bytes_left > 0) -@@ -304,8 +346,7 @@ - { - size_t write_size; - -- if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset, -- SEEK_SET)) -+ if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset)) - return false; - - write_size = file->stat_info->sparse_map[i].numbytes; -@@ -313,7 +354,7 @@ - if (write_size == 0) - { - /* Last block of the file is a hole */ -- if (sys_truncate (file->fd)) -+ if (file->seekable && sys_truncate (file->fd)) - truncate_warn (file->stat_info->orig_file_name); - } - else while (write_size > 0) -@@ -330,6 +371,7 @@ - count = full_write (file->fd, blk->buffer, wrbytes); - write_size -= count; - file->dumped_size += count; -+ file->offset += count; - if (count != wrbytes) - { - write_error_details (file->stat_info->orig_file_name, -@@ -351,7 +393,9 @@ - - file.stat_info = st; - file.fd = fd; -- -+ file.seekable = true; /* File *must* be seekable for dump to work */ -+ file.offset = 0; -+ - if (!sparse_select_optab (&file) - || !tar_sparse_init (&file)) - return dump_status_not_implemented; -@@ -414,7 +458,9 @@ - - file.stat_info = st; - file.fd = fd; -- -+ file.seekable = lseek (fd, 0, SEEK_SET) == 0; -+ file.offset = 0; -+ - if (!sparse_select_optab (&file) - || !tar_sparse_init (&file)) - return dump_status_not_implemented; -@@ -450,7 +496,7 @@ - static bool - check_sparse_region (struct tar_sparse_file *file, off_t beg, off_t end) - { -- if (!lseek_or_error (file, beg, SEEK_SET)) -+ if (!lseek_or_error (file, beg)) - return false; - - while (beg < end) -@@ -486,8 +532,7 @@ - { - size_t size_left; - -- if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset, -- SEEK_SET)) -+ if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset)) - return false; - size_left = file->stat_info->sparse_map[i].numbytes; - while (size_left > 0) diff --git a/tar-1.15.1-makeCheck.patch b/tar-1.15.1-makeCheck.patch deleted file mode 100644 index 8576290..0000000 --- a/tar-1.15.1-makeCheck.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- tar-1.15.1/tests/testsuite.at.makeCheck 2004-12-21 13:41:40.000000000 +0100 -+++ tar-1.15.1/tests/testsuite.at 2005-07-26 14:56:10.000000000 +0200 -@@ -64,7 +64,7 @@ - - m4_include([options.at]) - --m4_include([append.at]) -+#m4_include([append.at]) - - m4_include([delete01.at]) - m4_include([delete02.at]) -@@ -87,7 +87,7 @@ - m4_include([link01.at]) - - m4_include([listed01.at]) --m4_include([listed02.at]) -+#m4_include([listed02.at]) - - m4_include([longv7.at]) - ---- tar-1.15.1/tests/pipe.at.makeCheck 2004-12-21 13:51:40.000000000 +0100 -+++ tar-1.15.1/tests/pipe.at 2005-07-26 14:54:33.000000000 +0200 -@@ -34,7 +34,7 @@ - mkdir directory - genfile --length 10240 --pattern zeros > directory/file1 - genfile --length 13 > directory/file2 --tar cf archive directory -+tar cf archive directory/file1 directory/file2 - mv directory orig - cat archive | tar xfv - - echo "separator" -@@ -42,11 +42,10 @@ - echo "separator" - cmp orig/file2 directory/file2], - [0], --[directory/ --directory/file1 -+[directory/file1 - directory/file2 - separator - separator - ]) - --AT_CLEANUP -\ No newline at end of file -+AT_CLEANUP diff --git a/tar-1.15.1-mangling.patch b/tar-1.15.1-mangling.patch deleted file mode 100644 index 9f78c33..0000000 --- a/tar-1.15.1-mangling.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- tar-1.15.1/src/common.h.mangling 2006-12-04 12:47:40.000000000 +0100 -+++ tar-1.15.1/src/common.h 2006-12-04 12:47:40.000000000 +0100 -@@ -124,6 +124,9 @@ - - GLOBAL bool absolute_names_option; - -+/* Allow GNUTYPE_NAMES type? */ -+GLOBAL bool allow_name_mangling_option; -+ - /* Display file times in UTC */ - GLOBAL bool utc_option; - ---- tar-1.15.1/src/extract.c.mangling 2006-12-04 12:47:40.000000000 +0100 -+++ tar-1.15.1/src/extract.c 2006-12-04 12:47:40.000000000 +0100 -@@ -1171,7 +1171,13 @@ - break; - - case GNUTYPE_NAMES: -- extract_mangle (); -+ if (allow_name_mangling_option) { -+ extract_mangle (); -+ } -+ else { -+ ERROR ((0, 0, _("GNUTYPE_NAMES mangling ignored"))); -+ skip_member (); -+ } - break; - - case GNUTYPE_MULTIVOL: ---- tar-1.15.1/src/tar.c.mangling 2006-12-04 12:47:40.000000000 +0100 -+++ tar-1.15.1/src/tar.c 2006-12-04 12:55:35.000000000 +0100 -@@ -182,6 +182,7 @@ - { - ACLS_OPTION = CHAR_MAX + 1, - ANCHORED_OPTION, -+ ALLOW_NAME_MANGLING_OPTION, - ATIME_PRESERVE_OPTION, - BACKUP_OPTION, - CHECKPOINT_OPTION, -@@ -546,6 +547,8 @@ - - {NULL, 'o', 0, 0, - N_("when creating, same as --old-archive. When extracting, same as --no-same-owner"), 91 }, -+ {"allow-name-mangling", ALLOW_NAME_MANGLING_OPTION, 0, 0, -+ N_("when creating, allow GNUTYPE_NAMES mangling -- considered dangerous"), 91 }, - - {NULL, 0, NULL, 0, - N_("Other options:"), 100 }, -@@ -931,6 +934,10 @@ - case 'Z': - set_use_compress_program_option ("compress"); - break; -+ -+ case ALLOW_NAME_MANGLING_OPTION: -+ allow_name_mangling_option = true; -+ break; - - case ANCHORED_OPTION: - args->exclude_options |= EXCLUDE_ANCHORED; diff --git a/tar-1.15.1-newerOption.patch b/tar-1.15.1-newerOption.patch deleted file mode 100644 index cfbfb05..0000000 --- a/tar-1.15.1-newerOption.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- tar-1.15.1/src/create.c.newerOption 2005-08-15 15:53:27.000000000 +0000 -+++ tar-1.15.1/src/create.c 2005-08-15 15:53:51.000000000 +0000 -@@ -1387,7 +1387,7 @@ - && OLDER_STAT_TIME (st->stat, m) - && (!after_date_option || OLDER_STAT_TIME (st->stat, c))) - { -- if (!incremental_option) -+ if (!incremental_option && verbose_option) - WARN ((0, 0, _("%s: file is unchanged; not dumped"), - quotearg_colon (p))); - return; diff --git a/tar-1.15.1-optionsOrder.patch b/tar-1.15.1-optionsOrder.patch deleted file mode 100644 index b8c89da..0000000 --- a/tar-1.15.1-optionsOrder.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- tar-1.15.1/src/tar.c.optionsOrder 2006-09-19 21:39:41.000000000 +0200 -+++ tar-1.15.1/src/tar.c 2006-09-19 21:40:35.000000000 +0200 -@@ -617,9 +617,9 @@ - - switch (key) - { -- case 1: -+ case ARGP_KEY_ARG: - /* File name or non-parsed option, because of ARGP_IN_ORDER */ -- name_add (optarg); -+ name_add (arg); - args->input_files++; - break; - diff --git a/tar-1.15.1-padCorrectly.patch b/tar-1.15.1-padCorrectly.patch deleted file mode 100644 index 73b671a..0000000 --- a/tar-1.15.1-padCorrectly.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- tar-1.15.1/src/create.c.padCorrectly 2005-11-04 10:18:08.000000000 -0500 -+++ tar-1.15.1/src/create.c 2005-11-04 10:21:05.000000000 -0500 -@@ -877,8 +877,8 @@ - return dump_status_short; - } - size_left -= count; -- -- set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE); -+ if (count) -+ set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE); - - if (count != bufsize) - { -@@ -892,7 +892,7 @@ - STRINGIFY_BIGINT (size_left, buf))); - if (! ignore_failed_read_option) - exit_status = TAREXIT_FAILURE; -- pad_archive (size_left); -+ pad_archive (size_left - (bufsize-count)); - return dump_status_short; - } - } diff --git a/tar-1.15.1-permissions.patch b/tar-1.15.1-permissions.patch deleted file mode 100644 index 26d6198..0000000 --- a/tar-1.15.1-permissions.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- tar-1.15.1/src/extract.c.permissions 2004-12-21 10:55:12.000000000 +0100 -+++ tar-1.15.1/src/extract.c 2006-09-20 12:16:08.000000000 +0200 -@@ -404,7 +404,7 @@ - invert_permissions is zero, because - repair_delayed_set_stat may need to update the struct. */ - delay_set_stat (file_name, -- ¤t_stat_info.stat /* ignored */, -+ ¤t_stat_info.stat, - invert_permissions, INTERDIR_PERMSTATUS); - - print_for_mkdir (file_name, cursor - file_name, mode); -@@ -1065,7 +1065,7 @@ - } - if (S_ISDIR (st.st_mode)) - { -- mode = st.st_mode & ~ current_umask; -+ mode = st.st_mode; - goto directory_exists; - } - } -@@ -1088,11 +1088,16 @@ - if (status == 0 - || old_files_option == DEFAULT_OLD_FILES - || old_files_option == OVERWRITE_OLD_FILES) -- delay_set_stat (file_name, ¤t_stat_info.stat, -- MODE_RWX & (mode ^ current_stat_info.stat.st_mode), -- (status == 0 -- ? ARCHIVED_PERMSTATUS -- : UNKNOWN_PERMSTATUS)); -+ { -+ if (status == 0) -+ delay_set_stat (file_name, ¤t_stat_info.stat, -+ MODE_RWX & (mode ^ current_stat_info.stat.st_mode), -+ ARCHIVED_PERMSTATUS); -+ else /* For an already existing directory, invert_perms must be 0 */ -+ delay_set_stat (file_name, ¤t_stat_info.stat, -+ 0, -+ UNKNOWN_PERMSTATUS); -+ } - break; - - case GNUTYPE_VOLHDR: diff --git a/tar-1.15.1-sparseTotals.patch b/tar-1.15.1-sparseTotals.patch deleted file mode 100644 index 2f73cf4..0000000 --- a/tar-1.15.1-sparseTotals.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- tar-1.15.1/src/create.c.sparseTotals 2005-07-27 11:10:38.000000000 +0200 -+++ tar-1.15.1/src/create.c 2005-07-27 11:10:50.000000000 +0200 -@@ -332,16 +332,20 @@ - } - - --/* A file is not dumpable if -+/* A file is considered dumpable if it is sparse and both --sparse and --totals -+ are specified. -+ Otherwise, it is dumpable unless any of the following conditions occur: -+ - a) it is empty *and* world-readable, or - b) current archive is /dev/null */ - - bool - file_dumpable_p (struct tar_stat_info *st) - { -- return !(dev_null_output -- || (st->archive_file_size == 0 -- && (st->stat.st_mode & MODE_R) == MODE_R)); -+ if (dev_null_output) -+ return totals_option && sparse_option && sparse_file_p (st); -+ return !(st->archive_file_size == 0 -+ && (st->stat.st_mode & MODE_R) == MODE_R); - } - - -@@ -1437,7 +1441,7 @@ - else - fd = -1; - -- if (sparse_option && sparse_file_p (st)) -+ if (fd != -1 && sparse_option && sparse_file_p (st)) - { - status = sparse_dump_file (fd, st); - if (status == dump_status_not_implemented) diff --git a/tar-1.15.1-xattrs.patch b/tar-1.15.1-xattrs.patch deleted file mode 100644 index 5e1d9b9..0000000 --- a/tar-1.15.1-xattrs.patch +++ /dev/null @@ -1,4874 +0,0 @@ ---- tar-1.15.1/config/config.sub.xattrs 2004-12-15 09:55:00.000000000 +0100 -+++ tar-1.15.1/config/config.sub 2006-10-04 11:52:36.000000000 +0200 -@@ -1,9 +1,9 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - --timestamp='2004-08-29' -+timestamp='2003-06-18' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -70,7 +70,7 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO -@@ -118,8 +118,7 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ -- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -145,7 +144,7 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis | -knuth | -cray) -+ -apple | -axis) - os= - basic_machine=$1 - ;; -@@ -229,15 +228,14 @@ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k | iq2000 \ -- | m32r | m32rle | m68000 | m68k | m88k | mcore \ -+ | ip2k \ -+ | m32r | m68000 | m68k | m88k | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -@@ -249,7 +247,6 @@ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -- | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ -@@ -260,6 +257,7 @@ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -+ | s390 | s390x \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ -@@ -300,15 +298,15 @@ - | avr-* \ - | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | craynv-* | cydra-* \ -+ | clipper-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* | iq2000-* \ -- | m32r-* | m32rle-* \ -+ | ip2k-* \ -+ | m32r-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ -@@ -322,18 +320,17 @@ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -- | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -- | mmix-* \ - | msp430-* \ -- | none-* | np1-* | ns16k-* | ns32k-* \ -+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -+ | s390-* | s390x-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -@@ -364,9 +361,6 @@ - basic_machine=a29k-amd - os=-udi - ;; -- abacus) -- basic_machine=abacus-unknown -- ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout -@@ -384,9 +378,6 @@ - amd64) - basic_machine=x86_64-pc - ;; -- amd64-*) -- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; - amdahl) - basic_machine=580-amdahl - os=-sysv -@@ -446,27 +437,12 @@ - basic_machine=j90-cray - os=-unicos - ;; -- craynv) -- basic_machine=craynv-cray -- os=-unicosmp -- ;; -- cr16c) -- basic_machine=cr16c-unknown -- os=-elf -- ;; - crds | unos) - basic_machine=m68k-crds - ;; -- crisv32 | crisv32-* | etraxfs*) -- basic_machine=crisv32-axis -- ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -- crx) -- basic_machine=crx-unknown -- os=-elf -- ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; -@@ -667,6 +643,10 @@ - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -+ mmix*) -+ basic_machine=mmix-knuth -+ os=-mmixware -+ ;; - monitor) - basic_machine=m68k-rom68k - os=-coff -@@ -747,6 +727,10 @@ - np1) - basic_machine=np1-gould - ;; -+ nv1) -+ basic_machine=nv1-cray -+ os=-unicosmp -+ ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; -@@ -758,10 +742,6 @@ - basic_machine=or32-unknown - os=-coff - ;; -- os400) -- basic_machine=powerpc-ibm -- os=-os400 -- ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose -@@ -853,12 +833,6 @@ - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; -- s390 | s390-*) -- basic_machine=s390-ibm -- ;; -- s390x | s390x-*) -- basic_machine=s390x-ibm -- ;; - sa29200) - basic_machine=a29k-amd - os=-udi -@@ -982,10 +956,6 @@ - tower | tower-32) - basic_machine=m68k-ncr - ;; -- tpf) -- basic_machine=s390x-ibm -- os=-tpf -- ;; - udi29k) - basic_machine=a29k-amd - os=-udi -@@ -1059,9 +1029,6 @@ - romp) - basic_machine=romp-ibm - ;; -- mmix) -- basic_machine=mmix-knuth -- ;; - rs6000) - basic_machine=rs6000-ibm - ;; -@@ -1157,20 +1124,19 @@ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ -- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1194,9 +1160,6 @@ - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -- -linux-dietlibc) -- os=-linux-dietlibc -- ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; -@@ -1209,9 +1172,6 @@ - -opened*) - os=-openedition - ;; -- -os400*) -- os=-os400 -- ;; - -wince*) - os=-wince - ;; -@@ -1233,9 +1193,6 @@ - -atheos*) - os=-atheos - ;; -- -syllable*) -- os=-syllable -- ;; - -386bsd) - os=-bsd - ;; -@@ -1258,9 +1215,6 @@ - -sinix*) - os=-sysv4 - ;; -- -tpf*) -- os=-tpf -- ;; - -triton*) - os=-sysv3 - ;; -@@ -1328,9 +1282,9 @@ - arm*-semi) - os=-aout - ;; -- c4x-* | tic4x-*) -- os=-coff -- ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1377,9 +1331,6 @@ - *-ibm) - os=-aix - ;; -- *-knuth) -- os=-mmixware -- ;; - *-wec) - os=-proelf - ;; -@@ -1512,15 +1463,9 @@ - -mvs* | -opened*) - vendor=ibm - ;; -- -os400*) -- vendor=ibm -- ;; - -ptx*) - vendor=sequent - ;; -- -tpf*) -- vendor=ibm -- ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; ---- tar-1.15.1/config/config.guess.xattrs 2004-12-15 09:55:00.000000000 +0100 -+++ tar-1.15.1/config/config.guess 2006-10-04 11:52:36.000000000 +0200 -@@ -1,9 +1,9 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - --timestamp='2004-10-25' -+timestamp='2003-06-17' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -53,7 +53,7 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO -@@ -136,6 +136,13 @@ - UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown - UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -+## for Red Hat Linux -+if test -f /etc/redhat-release ; then -+ VENDOR=redhat ; -+else -+ VENDOR= ; -+fi -+ - # Note: order is significant - the case branches are not exclusive. - - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in -@@ -197,21 +204,15 @@ - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit 0 ;; -- amd64:OpenBSD:*:*) -- echo x86_64-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; -- cats:OpenBSD:*:*) -- echo arm-unknown-openbsd${UNAME_RELEASE} -+ arc:OpenBSD:*:*) -+ echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; -- luna88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; -@@ -227,33 +228,25 @@ - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; -+ pmax:OpenBSD:*:*) -+ echo mipsel-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; - sgi:OpenBSD:*:*) -- echo mips64-unknown-openbsd${UNAME_RELEASE} -+ echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; -+ wgrisc:OpenBSD:*:*) -+ echo mipsel-unknown-openbsd${UNAME_RELEASE} -+ exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; -- *:ekkoBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:MirBSD:*:*) -- echo powerppc-unknown-mirbsd${UNAME_RELEASE} -- exit 0 ;; -- *:MirBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -- exit 0 ;; - alpha:OSF1:*:*) -- case $UNAME_RELEASE in -- *4.0) -+ if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- ;; -- *5.*) -- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -- ;; -- esac -+ fi - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU -@@ -291,12 +284,14 @@ - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac -- # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit 0 ;; -+ Alpha*:OpenVMS:*:*) -+ echo alpha-hp-vms - exit 0 ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? -@@ -319,9 +314,6 @@ - *:OS/390:*:*) - echo i370-ibm-openedition - exit 0 ;; -- *:OS400:*:*) -- echo powerpc-ibm-os400 -- exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; -@@ -342,7 +334,7 @@ - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) -+ DRS?6000:UNIX_SV:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; - esac ;; -@@ -414,9 +406,6 @@ - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; -- m68k:machten:*:*) -- echo m68k-apple-machten${UNAME_RELEASE} -- exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; -@@ -752,7 +741,7 @@ - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - *:UNICOS/mp:*:*) -- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -@@ -760,11 +749,6 @@ - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; -- 5000:UNIX_System_V:4.*:*) -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; -@@ -774,8 +758,19 @@ - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; -- *:FreeBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) -+ # Determine whether the default compiler uses glibc. -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #include -+ #if __GLIBC__ >= 2 -+ LIBC=gnu -+ #else -+ LIBC= -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -@@ -808,13 +803,8 @@ - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) -- # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; -- *:GNU/*:*:*) -- # other systems with GNU libc and userland -- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -- exit 0 ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; -@@ -824,17 +814,8 @@ - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit 0 ;; -- crisv32:Linux:*:*) -- echo crisv32-axis-linux-gnu -- exit 0 ;; -- frv:Linux:*:*) -- echo frv-unknown-linux-gnu -- exit 0 ;; - ia64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- m32r*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu - exit 0 ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -@@ -878,10 +859,10 @@ - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -+ echo powerpc-${VENDOR:-unknown}-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -+ echo powerpc64-${VENDOR:-unknown}-linux-gnu - exit 0 ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -@@ -909,7 +890,7 @@ - echo hppa64-unknown-linux-gnu - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) -- echo ${UNAME_MACHINE}-ibm-linux -+ echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu - exit 0 ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -@@ -921,7 +902,7 @@ - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - x86_64:Linux:*:*) -- echo x86_64-unknown-linux-gnu -+ echo x86_64-${VENDOR:-unknown}-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so -@@ -971,12 +952,9 @@ - LIBC=gnuaout - #endif - #endif -- #ifdef __dietlibc__ -- LIBC=dietlibc -- #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; - i*86:DYNIX/ptx:4*:*) -@@ -1004,9 +982,6 @@ - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; -- i*86:syllable:*:*) -- echo ${UNAME_MACHINE}-pc-syllable -- exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; -@@ -1076,9 +1051,9 @@ - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit 0 ;; -- M68*:*:R3V[5678]*:*) -+ M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) -+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -@@ -1176,10 +1151,9 @@ - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Darwin:*:*) -- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -- case $UNAME_PROCESSOR in -+ case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; -- unknown) UNAME_PROCESSOR=powerpc ;; -+ powerpc) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; -@@ -1194,7 +1168,7 @@ - *:QNX:*:4*) - echo i386-pc-qnx - exit 0 ;; -- NSR-?:NONSTOP_KERNEL:*:*) -+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; - *:NonStop-UX:*:*) -@@ -1238,19 +1212,6 @@ - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; -- *:DragonFly:*:*) -- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -- exit 0 ;; -- *:*VMS:*:*) -- UNAME_MACHINE=`(uname -p) 2>/dev/null` -- case "${UNAME_MACHINE}" in -- A*) echo alpha-dec-vms && exit 0 ;; -- I*) echo ia64-dec-vms && exit 0 ;; -- V*) echo vax-dec-vms && exit 0 ;; -- esac ;; -- *:XENIX:*:SysV) -- echo i386-pc-xenix -- exit 0 ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 ---- tar-1.15.1/tests/Makefile.in.xattrs 2004-12-21 14:31:03.000000000 +0100 -+++ tar-1.15.1/tests/Makefile.in 2006-10-04 11:52:36.000000000 +0200 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.3 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -21,8 +21,6 @@ - - # François Pinard , 1988. - # Sergey Poznyakoff , 2004. --SOURCES = $(genfile_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ ---- tar-1.15.1/doc/tar.texi.xattrs 2004-12-18 20:20:19.000000000 +0100 -+++ tar-1.15.1/doc/tar.texi 2006-10-04 11:52:36.000000000 +0200 -@@ -7012,6 +7012,8 @@ - Notice, that currently @acronym{GNU} extensions are not - allowed with this format. Following is the list of options that - cannot be used with @value{op-format-posix}: -+This is the only format that can store ACLs, SELinux context and extended -+attributes. - - @itemize @bullet - @item @value{op-label}, when used with @value{op-create}. -@@ -7501,6 +7503,51 @@ - - @FIXME{I do not see the purpose of such an option. (Neither I. FP.)} - -+@opindex acls -+@item --acls -+This option causes @command{tar} to store each file's ACLs in the archive. -+ -+The @option{--acls} option has no equivalent short option name. -+ -+@opindex selinux -+@item --selinux -+This option causes @command{tar} to store each file's SELinux security context -+information in the archive. -+ -+The @option{--selinux} option has no equivalent short option name. -+ -+@opindex xattrs -+@item --xattrs -+This option causes @command{tar} to store each file's extended attributes in -+the archive. This option also enables @option{--acls} and @option{--selinux} if they haven't been set already, due to the fact that the data for those are -+stored in special xattrs. -+ -+The @option{--xattrs} option has no equivalent short option name. -+ -+@opindex no-acls -+@item --no-acls -+This option causes @command{tar} not to store each file's ACLs in the archive -+and not to extract any ACL information in an archive. -+ -+The @option{--acls} option has no equivalent short option name. -+ -+@opindex no-selinux -+@item --no-selinux -+This option causes @command{tar} not to store each file's SELinux security -+context information in the archive and not to extract any SELinux information in -+an archive. -+ -+The @option{--selinux} option has no equivalent short option name. -+ -+@opindex no-xattrs -+@item --no-xattrs -+This option causes @command{tar} not to store each file's extended attributes in -+the archive and not to extract any extended attributes in an archive. This -+option also enables @option{--no-acls} and @option{--no-selinux} if -+they haven't been set already. -+ -+The @option{--xattrs} option has no equivalent short option name. -+ - @end table - - @node Standard ---- tar-1.15.1/doc/Makefile.in.xattrs 2004-12-21 14:30:58.000000000 +0100 -+++ tar-1.15.1/doc/Makefile.in 2006-10-04 11:52:36.000000000 +0200 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.3 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -300,9 +300,11 @@ - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - am__cwd=`pwd` && cd $(srcdir) && \ - rm -rf $$backupdir && mkdir $$backupdir && \ -- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ -- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ -- done; \ -+ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -+ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ -+ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ -+ done; \ -+ else :; fi && \ - cd "$$am__cwd"; \ - if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $@ $<; \ -@@ -361,10 +363,11 @@ - maintainer-clean-vti: - -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi - .dvi.ps: -+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - $(DVIPS) -o $@ $< - - uninstall-info-am: -- $(PRE_UNINSTALL) -+ @$(PRE_UNINSTALL) - @if (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ -@@ -380,7 +383,7 @@ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if cd "$(DESTDIR)$(infodir)"; then \ -- echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ -+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ - rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ - else :; fi); \ - done ---- tar-1.15.1/doc/header.texi.xattrs 2004-04-04 11:53:48.000000000 +0200 -+++ tar-1.15.1/doc/header.texi 2006-10-04 11:52:36.000000000 +0200 -@@ -265,6 +265,14 @@ - size_t numbytes; - @}; - -+/* Information about xattrs for a file. */ -+struct xattr_array -+ @{ -+ char *xkey; -+ char *xval_ptr; -+ size_t xval_len; -+ @}; -+ - struct tar_stat_info - @{ - char *orig_file_name; /* name of file read from the archive header */ -@@ -278,6 +286,15 @@ - unsigned int devmajor; /* device major number */ - char *uname; /* user name of owner */ - char *gname; /* group name of owner */ -+ -+ char *cntx_name; /* SELinux context for the current archive entry. */ -+ -+ char *acls_a_ptr; /* Access ACLs for the current archive entry. */ -+ size_t acls_a_len; /* Access ACLs for the current archive entry. */ -+ -+ char *acls_d_ptr; /* Default ACLs for the current archive entry. */ -+ size_t acls_d_len; /* Default ACLs for the current archive entry. */ -+ - struct stat stat; /* regular filesystem stat */ - - /* Nanosecond parts of file timestamps (if available) */ -@@ -294,7 +311,10 @@ - sparse_map array. Zero if the file is - not sparse */ - size_t sparse_map_size; /* Size of the sparse map */ -- struct sp_array *sparse_map; -+ struct sp_array *sparse_map; -+ -+ size_t xattr_map_size; /* Size of the xattr map */ -+ struct xattr_array *xattr_map; - @}; - - union block ---- tar-1.15.1/doc/stamp-vti.xattrs 2004-12-21 14:33:12.000000000 +0100 -+++ tar-1.15.1/doc/stamp-vti 2006-10-04 11:52:36.000000000 +0200 -@@ -1,4 +1,4 @@ --@set UPDATED 18 December 2004 --@set UPDATED-MONTH December 2004 -+@set UPDATED 23 September 2006 -+@set UPDATED-MONTH September 2006 - @set EDITION 1.15.1 - @set VERSION 1.15.1 ---- tar-1.15.1/doc/version.texi.xattrs 2004-12-21 14:03:18.000000000 +0100 -+++ tar-1.15.1/doc/version.texi 2006-10-04 11:52:36.000000000 +0200 -@@ -1,4 +1,4 @@ --@set UPDATED 18 December 2004 --@set UPDATED-MONTH December 2004 -+@set UPDATED 23 September 2006 -+@set UPDATED-MONTH September 2006 - @set EDITION 1.15.1 - @set VERSION 1.15.1 ---- tar-1.15.1/doc/tar.info.xattrs 2004-12-21 14:03:19.000000000 +0100 -+++ tar-1.15.1/doc/tar.info 2006-10-04 11:52:36.000000000 +0200 -@@ -1,6 +1,6 @@ --This is tar.info, produced by makeinfo version 4.7 from tar.texi. -+This is tar.info, produced by makeinfo version 4.8 from tar.texi. - -- This manual is for GNU `tar' (version 1.15.1, 18 December 2004), -+ This manual is for GNU `tar' (version 1.15.1, 23 September 2006), - which creates and extracts files from archives. - - Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, -@@ -35,7 +35,7 @@ - GNU tar: an archiver tool - ************************* - --This manual is for GNU `tar' (version 1.15.1, 18 December 2004), which -+This manual is for GNU `tar' (version 1.15.1, 23 September 2006), which - creates and extracts files from archives. - - Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, -@@ -6354,7 +6354,8 @@ - A POSIX conformant archive will be created if `tar' was given - `--format=posix' option. Notice, that currently GNU extensions are not - allowed with this format. Following is the list of options that cannot --be used with `--format=posix': -+be used with `--format=posix': This is the only format that can store -+ACLs, SELinux context and extended attributes. - - * `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL'), when used with - `--create' (`-c'). -@@ -6797,6 +6798,46 @@ - is equivalent to `--same-permissions' (`--preserve-permissions', - `-p') plus `--same-order' (`--preserve-order', `-s'). - -+`--acls' -+ This option causes `tar' to store each file's ACLs in the archive. -+ -+ The `--acls' option has no equivalent short option name. -+ -+`--selinux' -+ This option causes `tar' to store each file's SELinux security -+ context information in the archive. -+ -+ The `--selinux' option has no equivalent short option name. -+ -+`--xattrs' -+ This option causes `tar' to store each file's extended attributes -+ in the archive. This option also enables `--acls' and `--selinux' -+ if+they haven't been set already, due to the fact that the data -+ for those are stored in special xattrs. -+ -+ The `--xattrs' option has no equivalent short option name. -+ -+`--no-acls' -+ This option causes `tar' not to store each file's ACLs in the -+ archive and not to extract any ACL information in an archive. -+ -+ The `--acls' option has no equivalent short option name. -+ -+`--no-selinux' -+ This option causes `tar' not to store each file's SELinux security -+ context information in the archive and not to extract any SELinux -+ information in an archive. -+ -+ The `--selinux' option has no equivalent short option name. -+ -+`--no-xattrs' -+ This option causes `tar' not to store each file's extended -+ attributes in the archive and not to extract any extended -+ attributes in an archive. This option also enables `--acls' and -+ `--selinux' if they haven't been set already. -+ -+ The `--xattrs' option has no equivalent short option name. -+ - -  - File: tar.info, Node: Standard, Next: Extensions, Prev: Attributes, Up: Formats -@@ -7123,6 +7164,14 @@ - size_t numbytes; - }; - -+ /* Information about xattrs for a file. */ -+ struct xattr_array -+ { -+ char *xkey; -+ char *xval_ptr; -+ size_t xval_len; -+ }; -+ - struct tar_stat_info - { - char *orig_file_name; /* name of file read from the archive header */ -@@ -7136,6 +7185,15 @@ - unsigned int devmajor; /* device major number */ - char *uname; /* user name of owner */ - char *gname; /* group name of owner */ -+ -+ char *cntx_name; /* SELinux context for the current archive entry. */ -+ -+ char *acls_a_ptr; /* Access ACLs for the current archive entry. */ -+ size_t acls_a_len; /* Access ACLs for the current archive entry. */ -+ -+ char *acls_d_ptr; /* Default ACLs for the current archive entry. */ -+ size_t acls_d_len; /* Default ACLs for the current archive entry. */ -+ - struct stat stat; /* regular filesystem stat */ - - /* Nanosecond parts of file timestamps (if available) */ -@@ -7153,6 +7211,9 @@ - not sparse */ - size_t sparse_map_size; /* Size of the sparse map */ - struct sp_array *sparse_map; -+ -+ size_t xattr_map_size; /* Size of the xattr map */ -+ struct xattr_array *xattr_map; - }; - - union block -@@ -9271,6 +9332,7 @@ - * -suffix: backup. (line 68) - * abbreviations for months: Calendar date items. (line 38) - * absolute file names: Remote Tape Server. (line 17) -+* acls: Attributes. (line 118) - * Adding archives to an archive: concatenate. (line 6) - * Adding files to an Archive: appending files. (line 8) - * ADMINISTRATOR: General-Purpose Variables. -@@ -9446,6 +9508,9 @@ - (line 6) - * next DAY: Day of week items. (line 15) - * next in date strings: General date syntax. (line 26) -+* no-acls: Attributes. (line 137) -+* no-selinux: Attributes. (line 143) -+* no-xattrs: Attributes. (line 150) - * noon in date strings: Time of day items. (line 21) - * now in date strings: Relative items in date strings. - (line 33) -@@ -9494,6 +9559,7 @@ - * Running out of space: Reading. (line 6) - * Running out of space during extraction: Scarce. (line 6) - * Salz, Rich: Authors of get_date. (line 6) -+* selinux: Attributes. (line 123) - * simple backup method: backup. (line 64) - * SIMPLE_BACKUP_SUFFIX: backup. (line 68) - * SLEEP_MESSAGE: General-Purpose Variables. -@@ -9555,6 +9621,7 @@ - * Working directory, specifying: directory. (line 6) - * Writing extracted files to standard output: Writing. (line 6) - * Writing new archives: file. (line 36) -+* xattrs: Attributes. (line 129) - * XLIST: General-Purpose Variables. - (line 80) - * year in date strings: Relative items in date strings. -@@ -9565,172 +9632,172 @@ - -  - Tag Table: --Node: Top1264 --Node: Introduction9089 --Node: Book Contents9948 --Node: Definitions12120 --Node: What tar Does13921 --Node: Naming tar Archives16686 --Node: Current status17413 --Node: Authors19471 --Node: Reports21176 --Node: Tutorial21535 --Node: assumptions22348 --Node: stylistic conventions24827 --Node: basic tar options25270 --Node: frequent operations28909 --Node: Two Frequent Options29561 --Node: file tutorial30192 --Node: verbose tutorial31275 --Node: help tutorial33009 --Node: create33363 --Node: prepare for examples34864 --Node: Creating the archive36578 --Node: create verbose39377 --Node: short create40198 --Node: create dir43095 --Node: list45701 --Node: list dir48222 --Node: extract49211 --Node: extracting archives50413 --Node: extracting files50903 --Node: extract dir53003 --Node: extracting untrusted archives55386 --Node: failing commands56265 --Node: going further57350 --Node: tar invocation57500 --Node: Synopsis58997 --Node: using tar options63416 --Node: Styles66021 --Node: Mnemonic Options67830 --Node: Short Options70030 --Ref: Short Options-Footnote-171838 --Node: Old Options72055 --Ref: Old Options-Footnote-175007 --Node: Mixing75177 --Ref: Mixing-Footnote-177543 --Node: All Options77667 --Node: Operation Summary78272 --Node: Option Summary79533 --Ref: Option Summary-Footnote-1101314 --Node: Short Option Summary101377 --Node: help103153 --Ref: help-Footnote-1106597 --Node: verbose106806 --Node: interactive111072 --Node: operations113151 --Node: Basic tar113410 --Ref: Basic tar-Footnote-1116723 --Node: Advanced tar116867 --Node: Operations117712 --Node: append119670 --Ref: append-Footnote-1122850 --Node: appending files123016 --Node: multiple124794 --Node: update127495 --Node: how to update128503 --Node: concatenate130286 --Node: delete133562 --Node: compare135552 --Node: create options137206 --Node: Ignore Failed Read137608 --Node: extract options137811 --Node: Reading138722 --Node: read full records140309 --Node: Ignore Zeros140645 --Node: Writing141656 --Node: Dealing with Old Files142124 --Node: Overwrite Old Files144550 --Node: Keep Old Files146007 --Node: Keep Newer Files146525 --Node: Unlink First146814 --Node: Recursive Unlink147218 --Node: Modification Times147766 --Node: Setting Access Permissions148544 --Node: Writing to Standard Output149168 --Node: remove files150600 --Node: Scarce150789 --Node: Starting File151037 --Node: Same Order151867 --Node: backup152703 --Node: Applications156385 --Node: looking ahead157647 --Node: Backups158472 --Node: Full Dumps161478 --Node: Inc Dumps166991 --Node: incremental and listed-incremental168276 --Node: Backup Levels172728 --Node: Backup Parameters175085 --Node: General-Purpose Variables176262 --Node: Magnetic Tape Control180941 --Node: User Hooks182273 --Node: backup-specs example183584 --Node: Scripted Backups184727 --Ref: Scripted Backups-Footnote-1187468 --Node: Scripted Restoration187850 --Node: Choosing190347 --Node: file191289 --Node: Selecting Archive Members194938 --Node: files196281 --Node: nul197885 --Node: exclude199267 --Node: controlling pattern-patching with exclude201156 --Node: problems with exclude203204 --Node: Wildcards205415 --Node: after207948 --Node: recurse211056 --Node: one213679 --Node: directory215315 --Node: absolute218390 --Node: Date input formats221535 --Node: General date syntax223851 --Node: Calendar date items226556 --Node: Time of day items228553 --Node: Time zone items230605 --Node: Day of week items231839 --Node: Relative items in date strings232828 --Node: Pure numbers in date strings235630 --Node: Seconds since the Epoch236611 --Node: Specifying time zone rules238236 --Node: Authors of get_date240600 --Node: Formats241352 --Node: Portability246068 --Node: Portable Names247368 --Node: dereference248073 --Node: old249466 --Node: ustar250543 --Node: gnu251133 --Node: posix252420 --Node: Checksumming253124 --Node: Large or Negative Values255048 --Node: Compression257034 --Node: gzip257346 --Node: sparse262234 --Ref: sparse-Footnote-1267514 --Node: Attributes267810 --Node: Standard273223 --Node: Extensions299111 --Node: cpio301663 --Node: Media306411 --Node: Device308372 --Node: Remote Tape Server313411 --Node: Common Problems and Solutions317236 --Node: Blocking317628 --Node: Format Variations324240 --Node: Blocking Factor325177 --Node: Many336857 --Node: Tape Positioning340651 --Node: mt342510 --Node: Using Multiple Tapes344350 --Node: Multi-Volume Archives349453 --Node: Tape Files353515 --Node: label354991 --Ref: label-Footnote-1358790 --Node: verify359025 --Node: Write Protection362404 --Node: Free Software Needs Free Documentation363234 --Node: Copying This Manual368203 --Node: GNU Free Documentation License368461 --Node: Index390867 -+Node: Top1265 -+Node: Introduction9091 -+Node: Book Contents9950 -+Node: Definitions12122 -+Node: What tar Does13923 -+Node: Naming tar Archives16688 -+Node: Current status17415 -+Node: Authors19473 -+Node: Reports21178 -+Node: Tutorial21537 -+Node: assumptions22350 -+Node: stylistic conventions24829 -+Node: basic tar options25272 -+Node: frequent operations28911 -+Node: Two Frequent Options29563 -+Node: file tutorial30194 -+Node: verbose tutorial31277 -+Node: help tutorial33011 -+Node: create33365 -+Node: prepare for examples34866 -+Node: Creating the archive36580 -+Node: create verbose39379 -+Node: short create40200 -+Node: create dir43097 -+Node: list45703 -+Node: list dir48224 -+Node: extract49213 -+Node: extracting archives50415 -+Node: extracting files50905 -+Node: extract dir53005 -+Node: extracting untrusted archives55388 -+Node: failing commands56267 -+Node: going further57352 -+Node: tar invocation57502 -+Node: Synopsis58999 -+Node: using tar options63418 -+Node: Styles66023 -+Node: Mnemonic Options67832 -+Node: Short Options70032 -+Ref: Short Options-Footnote-171840 -+Node: Old Options72057 -+Ref: Old Options-Footnote-175009 -+Node: Mixing75179 -+Ref: Mixing-Footnote-177545 -+Node: All Options77669 -+Node: Operation Summary78274 -+Node: Option Summary79535 -+Ref: Option Summary-Footnote-1101316 -+Node: Short Option Summary101379 -+Node: help103155 -+Ref: help-Footnote-1106599 -+Node: verbose106808 -+Node: interactive111074 -+Node: operations113153 -+Node: Basic tar113412 -+Ref: Basic tar-Footnote-1116725 -+Node: Advanced tar116869 -+Node: Operations117714 -+Node: append119672 -+Ref: append-Footnote-1122852 -+Node: appending files123018 -+Node: multiple124796 -+Node: update127497 -+Node: how to update128505 -+Node: concatenate130288 -+Node: delete133564 -+Node: compare135554 -+Node: create options137208 -+Node: Ignore Failed Read137610 -+Node: extract options137813 -+Node: Reading138724 -+Node: read full records140311 -+Node: Ignore Zeros140647 -+Node: Writing141658 -+Node: Dealing with Old Files142126 -+Node: Overwrite Old Files144552 -+Node: Keep Old Files146009 -+Node: Keep Newer Files146527 -+Node: Unlink First146816 -+Node: Recursive Unlink147220 -+Node: Modification Times147768 -+Node: Setting Access Permissions148546 -+Node: Writing to Standard Output149170 -+Node: remove files150602 -+Node: Scarce150791 -+Node: Starting File151039 -+Node: Same Order151869 -+Node: backup152705 -+Node: Applications156387 -+Node: looking ahead157649 -+Node: Backups158474 -+Node: Full Dumps161480 -+Node: Inc Dumps166993 -+Node: incremental and listed-incremental168278 -+Node: Backup Levels172730 -+Node: Backup Parameters175087 -+Node: General-Purpose Variables176264 -+Node: Magnetic Tape Control180943 -+Node: User Hooks182275 -+Node: backup-specs example183586 -+Node: Scripted Backups184729 -+Ref: Scripted Backups-Footnote-1187470 -+Node: Scripted Restoration187852 -+Node: Choosing190349 -+Node: file191291 -+Node: Selecting Archive Members194940 -+Node: files196283 -+Node: nul197887 -+Node: exclude199269 -+Node: controlling pattern-patching with exclude201158 -+Node: problems with exclude203206 -+Node: Wildcards205417 -+Node: after207950 -+Node: recurse211058 -+Node: one213681 -+Node: directory215317 -+Node: absolute218392 -+Node: Date input formats221537 -+Node: General date syntax223853 -+Node: Calendar date items226558 -+Node: Time of day items228555 -+Node: Time zone items230607 -+Node: Day of week items231841 -+Node: Relative items in date strings232830 -+Node: Pure numbers in date strings235632 -+Node: Seconds since the Epoch236613 -+Node: Specifying time zone rules238238 -+Node: Authors of get_date240602 -+Node: Formats241354 -+Node: Portability246070 -+Node: Portable Names247370 -+Node: dereference248075 -+Node: old249468 -+Node: ustar250545 -+Node: gnu251135 -+Node: posix252422 -+Node: Checksumming253212 -+Node: Large or Negative Values255136 -+Node: Compression257122 -+Node: gzip257434 -+Node: sparse262322 -+Ref: sparse-Footnote-1267602 -+Node: Attributes267898 -+Node: Standard274771 -+Node: Extensions301343 -+Node: cpio303895 -+Node: Media308643 -+Node: Device310604 -+Node: Remote Tape Server315643 -+Node: Common Problems and Solutions319468 -+Node: Blocking319860 -+Node: Format Variations326472 -+Node: Blocking Factor327409 -+Node: Many339089 -+Node: Tape Positioning342883 -+Node: mt344742 -+Node: Using Multiple Tapes346582 -+Node: Multi-Volume Archives351685 -+Node: Tape Files355747 -+Node: label357223 -+Ref: label-Footnote-1361022 -+Node: verify361257 -+Node: Write Protection364636 -+Node: Free Software Needs Free Documentation365466 -+Node: Copying This Manual370435 -+Node: GNU Free Documentation License370693 -+Node: Index393099 -  - End Tag Table ---- tar-1.15.1/lib/localedir.h.xattrs 2004-12-21 15:01:12.000000000 +0100 -+++ tar-1.15.1/lib/localedir.h 2006-10-04 11:52:36.000000000 +0200 -@@ -1,4 +1,4 @@ - #define LOCALEDIR "/usr/share/locale" - #ifndef DEFAULT_RMT_COMMAND --# define DEFAULT_RMT_COMMAND "/etc/rmt" -+# define DEFAULT_RMT_COMMAND "/sbin/rmt" - #endif ---- tar-1.15.1/lib/Makefile.in.xattrs 2004-12-21 14:31:00.000000000 +0100 -+++ tar-1.15.1/lib/Makefile.in 2006-10-04 11:52:36.000000000 +0200 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.3 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -20,8 +20,6 @@ - # Free Software Foundation, Inc. - - --SOURCES = $(libtar_a_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ ---- tar-1.15.1/rmt/Makefile.in.xattrs 2004-12-21 14:31:01.000000000 +0100 -+++ tar-1.15.1/rmt/Makefile.in 2006-10-04 11:52:36.000000000 +0200 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.3 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -14,8 +14,6 @@ - - @SET_MAKE@ - --SOURCES = $(rmt_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -304,7 +302,8 @@ - f=`echo "$$p" | \ - sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - for opt in --help --version; do \ -- if "$(DESTDIR)$(rmtdir)/$$f" $$opt > c$${pid}_.out 2> c$${pid}_.err \ -+ if "$(DESTDIR)$(rmtdir)/$$f" $$opt >c$${pid}_.out \ -+ 2>c$${pid}_.err &2; bad=1; fi; \ ---- tar-1.15.1/src/list.c.xattrs 2006-10-04 11:52:36.000000000 +0200 -+++ tar-1.15.1/src/list.c 2006-10-04 11:52:36.000000000 +0200 -@@ -563,6 +563,13 @@ - stat_info->stat.st_atime = start_time; - stat_info->stat.st_ctime = start_time; - -+ stat_info->acls_a_ptr = NULL; -+ stat_info->acls_a_len = 0; -+ stat_info->acls_d_ptr = NULL; -+ stat_info->acls_d_len = 0; -+ stat_info->cntx_name = NULL; -+ xheader_xattr_init(stat_info); -+ - if (format == OLDGNU_FORMAT && incremental_option) - { - stat_info->stat.st_atime = TIME_FROM_HEADER (header->oldgnu_header.atime); ---- tar-1.15.1/src/extract.c.xattrs 2006-10-04 11:52:36.000000000 +0200 -+++ tar-1.15.1/src/extract.c 2006-10-04 11:54:47.000000000 +0200 -@@ -71,6 +71,13 @@ - mode_t invert_permissions; - enum permstatus permstatus; - bool after_symlinks; -+ char *cntx_name; -+ char *acls_a_ptr; -+ size_t acls_a_len; -+ char *acls_d_ptr; -+ size_t acls_d_len; -+ size_t xattr_map_size; /* Size of the xattr map */ -+ struct xattr_array *xattr_map; - char file_name[1]; - }; - -@@ -95,6 +102,18 @@ - hard-linked together. */ - struct string_list *sources; - -+ /* SELinux context */ -+ char *cntx_name; -+ -+ /* ACLs */ -+ char *acls_a_ptr; -+ size_t acls_a_len; -+ char *acls_d_ptr; -+ size_t acls_d_len; -+ -+ size_t xattr_map_size; /* Size of the xattr map */ -+ struct xattr_array *xattr_map; -+ - /* The desired target of the desired link. */ - char target[1]; - }; -@@ -228,13 +247,13 @@ - - static void - set_stat (char const *file_name, -- struct stat const *stat_info, -+ struct tar_stat_info const *st, - struct stat const *cur_info, - mode_t invert_permissions, enum permstatus permstatus, - char typeflag) - { - struct utimbuf utimbuf; -- -+ - if (typeflag != SYMTYPE) - { - /* We do the utime before the chmod because some versions of utime are -@@ -249,11 +268,11 @@ - /* FIXME: incremental_option should set ctime too, but how? */ - - if (incremental_option) -- utimbuf.actime = stat_info->st_atime; -+ utimbuf.actime = st->stat.st_atime; - else - utimbuf.actime = start_time; - -- utimbuf.modtime = stat_info->st_mtime; -+ utimbuf.modtime = st->stat.st_mtime; - - if (utime (file_name, &utimbuf) < 0) - utime_error (file_name); -@@ -268,10 +287,14 @@ - done, it is not possible anymore to change file permissions, so we - have to set permissions prior to possibly giving files away. */ - -- set_mode (file_name, stat_info, cur_info, -+ set_mode (file_name, &st->stat, cur_info, - invert_permissions, permstatus, typeflag); - } - -+ xattrs_acls_set(st, file_name, typeflag); -+ xattrs_selinux_set(st, file_name, typeflag); -+ xattrs_xattrs_set(st, file_name, typeflag); -+ - if (0 < same_owner_option && permstatus != INTERDIR_PERMSTATUS) - { - /* When lchown exists, it should be used to change the attributes of -@@ -282,22 +305,22 @@ - if (typeflag == SYMTYPE) - { - #if HAVE_LCHOWN -- if (lchown (file_name, stat_info->st_uid, stat_info->st_gid) < 0) -+ if (lchown (file_name, st->stat.st_uid, st->stat.st_gid) < 0) - chown_error_details (file_name, -- stat_info->st_uid, stat_info->st_gid); -+ st->stat.st_uid, st->stat.st_gid); - #endif - } - else - { -- if (chown (file_name, stat_info->st_uid, stat_info->st_gid) < 0) -+ if (chown (file_name, st->stat.st_uid, st->stat.st_gid) < 0) - chown_error_details (file_name, -- stat_info->st_uid, stat_info->st_gid); -+ st->stat.st_uid, st->stat.st_gid); - - /* On a few systems, and in particular, those allowing to give files - away, changing the owner or group destroys the suid or sgid bits. - So let's attempt setting these bits once more. */ -- if (stat_info->st_mode & (S_ISUID | S_ISGID | S_ISVTX)) -- set_mode (file_name, stat_info, 0, -+ if (st->stat.st_mode & (S_ISUID | S_ISGID | S_ISVTX)) -+ set_mode (file_name, &st->stat, 0, - invert_permissions, permstatus, typeflag); - } - } -@@ -310,7 +333,7 @@ - INVERT_PERMISSIONS bits from the file's current permissions. - PERMSTATUS specifies the status of the file's permissions. */ - static void --delay_set_stat (char const *file_name, struct stat const *stat_info, -+delay_set_stat (char const *file_name, struct tar_stat_info const *st, - mode_t invert_permissions, enum permstatus permstatus) - { - size_t file_name_len = strlen (file_name); -@@ -322,7 +345,24 @@ - data->invert_permissions = invert_permissions; - data->permstatus = permstatus; - data->after_symlinks = 0; -- data->stat_info = *stat_info; -+ data->cntx_name = NULL; -+ assign_string (&data->cntx_name, st->cntx_name); -+ if (st->acls_a_ptr) -+ data->acls_a_ptr = xmemdup(st->acls_a_ptr, st->acls_a_len); -+ else -+ { -+ data->acls_a_ptr = NULL; -+ data->acls_a_len = 0; -+ } -+ if (st->acls_d_ptr) -+ data->acls_d_ptr = xmemdup(st->acls_d_ptr, st->acls_d_len); -+ else -+ { -+ data->acls_d_ptr = NULL; -+ data->acls_d_len = 0; -+ } -+ xheader_xattr_copy (st, &data->xattr_map, &data->xattr_map_size); -+ data->stat_info = st->stat; - data->next = delayed_set_stat_head; - delayed_set_stat_head = data; - } -@@ -404,7 +444,7 @@ - invert_permissions is zero, because - repair_delayed_set_stat may need to update the struct. */ - delay_set_stat (file_name, -- ¤t_stat_info.stat, -+ ¤t_stat_info, - invert_permissions, INTERDIR_PERMSTATUS); - - print_for_mkdir (file_name, cursor - file_name, mode); -@@ -594,10 +634,27 @@ - } - - if (! skip_this_one) -- set_stat (data->file_name, &data->stat_info, cur_info, -- data->invert_permissions, data->permstatus, DIRTYPE); -+ { -+ struct tar_stat_info st1; - -+ st1.stat = data->stat_info; -+ st1.cntx_name = data->cntx_name; -+ st1.acls_a_ptr = data->acls_a_ptr; -+ st1.acls_a_len = data->acls_a_len; -+ st1.acls_d_ptr = data->acls_d_ptr; -+ st1.acls_d_len = data->acls_d_len; -+ st1.xattr_map = data->xattr_map; -+ st1.xattr_map_size = data->xattr_map_size; -+ -+ set_stat (data->file_name, &st1, cur_info, -+ data->invert_permissions, data->permstatus, DIRTYPE); -+ } -+ - delayed_set_stat_head = data->next; -+ xheader_xattr_free (data->xattr_map, data->xattr_map_size); -+ free (data->cntx_name); -+ free (data->acls_a_ptr); -+ free (data->acls_d_ptr); - free (data); - } - } -@@ -800,7 +857,7 @@ - undo_last_backup (); - } - -- set_stat (file_name, ¤t_stat_info.stat, 0, 0, -+ set_stat (file_name, ¤t_stat_info, 0, 0, - (old_files_option == OVERWRITE_OLD_FILES - ? UNKNOWN_PERMSTATUS - : ARCHIVED_PERMSTATUS), -@@ -822,7 +879,7 @@ - break; - - if (status == 0) -- set_stat (file_name, ¤t_stat_info.stat, 0, 0, 0, SYMTYPE); -+ set_stat (file_name, ¤t_stat_info, 0, 0, 0, SYMTYPE); - else - symlink_error (current_stat_info.link_name, file_name); - } -@@ -865,6 +922,14 @@ - + strlen (file_name) + 1); - p->sources->next = 0; - strcpy (p->sources->string, file_name); -+ p->cntx_name = NULL; -+ assign_string (&p->cntx_name, current_stat_info.cntx_name); -+ p->acls_a_ptr = NULL; -+ p->acls_a_len = 0; -+ p->acls_d_ptr = NULL; -+ p->acls_d_len = 0; -+ p->xattr_map = NULL; -+ p->xattr_map_size = 0; - strcpy (p->target, current_stat_info.link_name); - - h = delayed_set_stat_head; -@@ -995,7 +1060,7 @@ - undo_last_backup (); - break; - }; -- set_stat (file_name, ¤t_stat_info.stat, 0, 0, -+ set_stat (file_name, ¤t_stat_info, 0, 0, - ARCHIVED_PERMSTATUS, typeflag); - break; - #endif -@@ -1011,7 +1076,7 @@ - break; - - if (status == 0) -- set_stat (file_name, ¤t_stat_info.stat, NULL, 0, -+ set_stat (file_name, ¤t_stat_info, NULL, 0, - ARCHIVED_PERMSTATUS, typeflag); - else - { -@@ -1090,11 +1155,11 @@ - || old_files_option == OVERWRITE_OLD_FILES) - { - if (status == 0) -- delay_set_stat (file_name, ¤t_stat_info.stat, -+ delay_set_stat (file_name, ¤t_stat_info, - MODE_RWX & (mode ^ current_stat_info.stat.st_mode), - ARCHIVED_PERMSTATUS); - else /* For an already existing directory, invert_perms must be 0 */ -- delay_set_stat (file_name, ¤t_stat_info.stat, -+ delay_set_stat (file_name, ¤t_stat_info, - 0, - UNKNOWN_PERMSTATUS); - } -@@ -1168,10 +1233,19 @@ - symlink_error (ds->target, source); - else - { -+ struct tar_stat_info st1; -+ - valid_source = source; -- st.st_uid = ds->uid; -- st.st_gid = ds->gid; -- set_stat (source, &st, 0, 0, 0, SYMTYPE); -+ st1.stat.st_uid = ds->uid; -+ st1.stat.st_gid = ds->gid; -+ st1.cntx_name = ds->cntx_name; -+ st1.acls_a_ptr = ds->acls_a_ptr; -+ st1.acls_a_len = ds->acls_a_len; -+ st1.acls_d_ptr = ds->acls_d_ptr; -+ st1.acls_d_len = ds->acls_d_len; -+ st1.xattr_map = ds->xattr_map; -+ st1.xattr_map_size = ds->xattr_map_size; -+ set_stat (source, &st1, 0, 0, 0, SYMTYPE); - } - } - } ---- tar-1.15.1/src/misc.c.xattrs 2004-09-13 10:12:05.000000000 +0200 -+++ tar-1.15.1/src/misc.c 2006-10-04 11:52:36.000000000 +0200 -@@ -545,7 +545,7 @@ - - /* Report an error associated with the system call CALL and the - optional name NAME. */ --static void -+void - call_arg_error (char const *call, char const *name) - { - int e = errno; -@@ -563,7 +563,7 @@ - - /* Report a warning associated with the system call CALL and - the optional file name NAME. */ --static void -+void - call_arg_warn (char const *call, char const *name) - { - int e = errno; ---- /dev/null 2006-10-03 09:18:45.784834250 +0200 -+++ tar-1.15.1/src/xattrs.h 2006-10-04 11:52:36.000000000 +0200 -@@ -0,0 +1,14 @@ -+ -+extern void xattrs_acls_get(struct tar_stat_info *st, -+ char const *file_name, int fd); -+extern void xattrs_selinux_get(struct tar_stat_info *st, -+ char const *file_name, int fd); -+extern void xattrs_xattrs_get(struct tar_stat_info *st, -+ char const *file_name, int fd); -+ -+extern void xattrs_acls_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag); -+extern void xattrs_selinux_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag); -+extern void xattrs_xattrs_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag); ---- tar-1.15.1/src/Makefile.am.xattrs 2004-10-25 16:55:49.000000000 +0200 -+++ tar-1.15.1/src/Makefile.am 2006-10-04 11:52:36.000000000 +0200 -@@ -20,7 +20,7 @@ - - bin_PROGRAMS = tar - --noinst_HEADERS = arith.h common.h tar.h -+noinst_HEADERS = arith.h common.h tar.h xattrs.h - tar_SOURCES = \ - buffer.c\ - compare.c\ -@@ -37,7 +37,8 @@ - system.c\ - tar.c\ - update.c\ -- utf8.c -+ utf8.c\ -+ xattrs.c - - INCLUDES = -I$(top_srcdir)/lib -I../ -I../lib - -@@ -45,4 +46,4 @@ - - LDADD = ../lib/libtar.a $(LIBINTL) $(LIBICONV) - --tar_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) -+tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) ---- /dev/null 2006-10-03 09:18:45.784834250 +0200 -+++ tar-1.15.1/src/xattrs.c 2006-10-04 11:54:47.000000000 +0200 -@@ -0,0 +1,402 @@ -+/* Create a tar archive. -+ -+ Copyright (C) 2006 Free Software Foundation, Inc. -+ -+ Written by James Antill, on 2006-07-27. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU General Public License as published by the -+ Free Software Foundation; either version 2, or (at your option) any later -+ version. -+ -+ This program is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -+ Public License for more details. -+ -+ You should have received a copy of the GNU General Public License along -+ with this program; if not, write to the Free Software Foundation, Inc., -+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -+ -+#include -+ -+#include -+ -+#include "common.h" -+ -+ -+#ifndef HAVE_SELINUX_SELINUX_H -+# undef HAVE_LIBSELINUX -+#endif -+ -+#ifndef HAVE_ATTR_XATTR_H -+# undef HAVE_XATTRS -+#endif -+ -+#ifndef HAVE_SYS_ACL_H -+# undef HAVE_LIBACL -+#endif -+ -+#ifdef HAVE_SELINUX_SELINUX_H -+# include -+#endif -+ -+#ifdef HAVE_ATTR_XATTR_H -+# include -+#endif -+ -+#ifdef HAVE_SYS_ACL_H -+# include -+#endif -+ -+ -+#if 0 /* unused by xattr's atm. */ -+static void xattrs__fd_get(struct tar_stat_info *st, -+ char const *file_name, int fd, const char *attr, -+ char **ret_ptr, size_t *ret_len) -+{ -+#ifdef HAVE_XATTRS -+ static ssize_t asz = 1024; -+ ssize_t ret = 0; -+ static char *val = NULL; -+ -+ if (!val) val = xmalloc (asz); -+ -+ while (((ret = fgetxattr (fd, attr, val, asz)) == -1) && -+ (errno == ERANGE)) -+ { -+ asz <<= 1; -+ val = xrealloc (val, asz); -+ } -+ -+ if (ret != -1) -+ { -+ *ret_ptr = xmemdup (val, ret); -+ *ret_len = ret; -+ } -+ else if (errno != ENOATTR) -+ call_arg_warn ("fgetxattr", file_name); -+#endif -+} -+#endif -+ -+static void xattrs__acls_get_a(struct tar_stat_info *st, -+ char const *file_name, int fd, -+ char **ret_ptr, size_t *ret_len) -+{ /* "system.posix_acl_access" */ -+#ifdef HAVE_LIBACL -+ char *val = NULL; -+ acl_t acl; -+ -+ if (fd != -1) -+ { -+ if ((acl = acl_get_fd (fd)) == (acl_t)NULL) -+ { -+ if (errno != ENOTSUP) -+ call_arg_warn ("acl_get_fd", file_name); -+ return; -+ } -+ } -+ else if ((acl = acl_get_file (file_name, ACL_TYPE_ACCESS)) == (acl_t)NULL) -+ { -+ if (errno != ENOTSUP) -+ call_arg_warn ("acl_get_file", file_name); -+ return; -+ } -+ -+ -+ val = acl_to_text(acl, NULL); -+ acl_free (acl); -+ -+ if (val == NULL) -+ { -+ call_arg_warn ("acl_to_text", file_name); -+ return; -+ } -+ -+ *ret_ptr = xstrdup (val); -+ *ret_len = strlen (val); -+ -+ acl_free (val); -+#endif -+} -+ -+static void xattrs__acls_get_d(struct tar_stat_info *st, -+ char const *file_name, -+ char **ret_ptr, size_t *ret_len) -+{ /* "system.posix_acl_default" */ -+#ifdef HAVE_LIBACL -+ char *val = NULL; -+ acl_t acl; -+ -+ if ((acl = acl_get_file (file_name, ACL_TYPE_DEFAULT)) == (acl_t)NULL) -+ { -+ if (errno != ENOTSUP) -+ call_arg_warn ("acl_get_file", file_name); -+ return; -+ } -+ -+ val = acl_to_text(acl, NULL); -+ acl_free (acl); -+ -+ if (val == NULL) -+ { -+ call_arg_warn ("acl_to_text", file_name); -+ return; -+ } -+ -+ *ret_ptr = xstrdup (val); -+ *ret_len = strlen (val); -+ -+ acl_free (val); -+#endif -+} -+ -+void xattrs_acls_get(struct tar_stat_info *st, char const *file_name, int fd) -+{ -+ if (acls_option > 0) -+ { -+ xattrs__acls_get_a (st, file_name, fd, -+ &st->acls_a_ptr, &st->acls_a_len); -+ if (fd == -1) /* Hack: default is on directories only */ -+ xattrs__acls_get_d (st, file_name, -+ &st->acls_d_ptr, &st->acls_d_len); -+ } -+} -+ -+void xattrs_selinux_get(struct tar_stat_info *st, char const *file_name, int fd) -+{ -+#ifdef HAVE_LIBSELINUX -+ if (selinux_context_option > 0) -+ if (fd == -1) -+ { -+ if (lgetfilecon (file_name, &st->cntx_name) == -1) -+ call_arg_warn ("lgetfilecon", file_name); -+ } -+ else if (fgetfilecon (fd, &st->cntx_name) == -1) -+ call_arg_warn ("fgetfilecon", file_name); -+#endif -+} -+ -+void xattrs_xattrs_get(struct tar_stat_info *st, char const *file_name, int fd) -+{ -+#ifdef HAVE_XATTRS -+ if (xattrs_option > 0) -+ { /* get all xattrs ... this include security.* and system.* if -+ available. We filter them here, but we have to filter them -+ in xattrs_xattrs_set() anyway. -+ */ -+ static ssize_t xsz = 1024; -+ static char *xatrs = NULL; -+ ssize_t xret = -1; -+ -+ if (!xatrs) xatrs = xmalloc (xsz); -+ -+ while (((fd == -1) ? -+ ((xret = listxattr (file_name, xatrs, xsz)) == -1) : -+ ((xret = flistxattr (fd, xatrs, xsz)) == -1)) && -+ (errno == ERANGE)) -+ { -+ xsz <<= 1; -+ xatrs = xrealloc (xatrs, xsz); -+ } -+ -+ if (xret == -1) -+ call_arg_warn ((fd == -1) ? "listxattrs" : "flistxattrs", file_name); -+ else -+ { -+ const char *attr = xatrs; -+ static ssize_t asz = 1024; -+ static char *val = NULL; -+ -+ if (!val) val = xmalloc (asz); -+ -+ while (xret > 0) -+ { -+ size_t len = strlen (attr); -+ ssize_t aret = 0; -+ -+ if (strncmp (attr, "user.", strlen("user.")) && -+ strncmp (attr, "root.", strlen("root."))) -+ goto next_attr; /* only store normal xattrs */ -+ -+ while (((fd == -1) ? -+ ((aret = getxattr (file_name, attr, val, asz)) == -1) : -+ ((aret = fgetxattr (fd, attr, val, asz)) == -1)) && -+ (errno == ERANGE)) -+ { -+ asz <<= 1; -+ val = xrealloc (val, asz); -+ } -+ -+ if (aret != -1) -+ xheader_xattr_add (st, attr, val, aret); -+ else if (errno != ENOATTR) -+ call_arg_warn ("fgetxattr", file_name); -+ -+ next_attr: -+ attr += len + 1; -+ xret -= len + 1; -+ } -+ } -+ } -+#endif -+} -+ -+static void xattrs__fd_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag, -+ const char *attr, -+ const char *ptr, size_t len) -+{ -+#ifdef HAVE_XATTRS -+ if (ptr) -+ { -+ const char *sysname = "setxattr"; -+ int ret = -1; -+ -+ if (typeflag != SYMTYPE) -+ ret = setxattr (file_name, attr, ptr, len, 0); -+ else -+ { -+ sysname = "lsetxattr"; -+ ret = lsetxattr (file_name, attr, ptr, len, 0); -+ } -+ -+ if ((ret == -1) && (errno == EPERM)) -+ call_arg_warn(sysname, file_name); -+ else if ((ret == -1) && (errno != EOPNOTSUPP)) -+ call_arg_error(sysname, file_name); -+ } -+#endif -+} -+ -+/* convert unix permissions into an ACL ... needed due to "default" ACLs */ -+#ifdef HAVE_LIBACL -+static acl_t perms2acl(int perms) -+{ -+ char val[] = "user::---,group::---,other::---"; -+ /* 0123456789 123456789 123456789 123456789 */ -+ -+ /* user */ -+ if (perms & 0400) val[ 6] = 'r'; -+ if (perms & 0200) val[ 7] = 'w'; -+ if (perms & 0100) val[ 8] = 'x'; -+ -+ /* group */ -+ if (perms & 0040) val[17] = 'r'; -+ if (perms & 0020) val[18] = 'w'; -+ if (perms & 0010) val[19] = 'x'; -+ -+ /* other */ -+ if (perms & 0004) val[28] = 'r'; -+ if (perms & 0002) val[29] = 'w'; -+ if (perms & 0001) val[30] = 'x'; -+ -+ return (acl_from_text (val)); -+} -+#endif -+ -+static void xattrs__acls_set(struct tar_stat_info const *st, -+ char const *file_name, int type, -+ const char *ptr, size_t len) -+{ /* "system.posix_acl_access" */ -+#ifdef HAVE_LIBACL -+ acl_t acl; -+ -+ if (ptr) -+ { -+ /* assert (strlen (ptr) == len); */ -+ acl = acl_from_text (ptr); -+ acls_option = 1; -+ } -+ else if (acls_option > 0) -+ acl = perms2acl (st->stat.st_mode); -+ else -+ return; /* don't call acl functions unless we first hit an ACL, or -+ --acls was passed explicitly */ -+ -+ if (acl == (acl_t)NULL) -+ { -+ call_arg_warn ("acl_from_text", file_name); -+ return; -+ } -+ -+ if (acl_set_file (file_name, type, acl) == -1) -+ { -+ if (errno != ENOTSUP) -+ call_arg_warn ("acl_set_file", file_name); -+ } -+ acl_free (acl); -+#endif -+} -+ -+void xattrs_acls_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag) -+{ -+ if ((acls_option >= 0) && (typeflag != SYMTYPE)) -+ { -+#ifdef HAVE_LIBACL -+ xattrs__acls_set (st, file_name, ACL_TYPE_ACCESS, -+ st->acls_a_ptr, st->acls_a_len); -+ if (S_ISDIR (st->stat.st_mode)) -+ xattrs__acls_set (st, file_name, ACL_TYPE_DEFAULT, -+ st->acls_d_ptr, st->acls_d_len); -+#endif -+ } -+} -+ -+void xattrs_selinux_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag) -+{ -+#ifdef HAVE_LIBSELINUX -+ if ((selinux_context_option >= 0) && st->cntx_name) -+ { -+ const char *sysname = "setfilecon"; -+ int ret = -1; -+ -+ if (typeflag != SYMTYPE) -+ ret = setfilecon (file_name, st->cntx_name); -+ else -+ { -+ sysname = "lsetfilecon"; -+ ret = lsetfilecon (file_name, st->cntx_name); -+ } -+ -+ if ((ret == -1) && (errno == EPERM)) -+ call_arg_warn(sysname, file_name); -+ else if ((ret == -1) && (errno != EOPNOTSUPP)) -+ call_arg_error(sysname, file_name); -+ } -+#endif -+} -+ -+void xattrs_xattrs_set(struct tar_stat_info const *st, -+ char const *file_name, char typeflag) -+{ -+#ifdef HAVE_XATTRS -+ if ((xattrs_option >= 0) && st->xattr_map_size) -+ { -+ size_t scan = 0; -+ -+ while (scan < st->xattr_map_size) -+ { -+ char *keyword = st->xattr_map[scan].xkey; -+ -+ /* assert (!memcpy (keyword, "SCHILY.xattr.", strlen("SCHILY.xattr."))); */ -+ keyword += strlen("SCHILY.xattr."); -+ -+ if (strncmp (keyword, "user.", strlen("user.")) && -+ strncmp (keyword, "root.", strlen("root."))) -+ continue; /* don't try and set anything but normal xattrs */ -+ -+ /* should we ignore root.* EPERM errors when not root ? */ -+ xattrs__fd_set (st, file_name, typeflag, keyword, -+ st->xattr_map[scan].xval_ptr, -+ st->xattr_map[scan].xval_len); -+ -+ ++scan; -+ } -+ } -+#endif -+} -+ ---- tar-1.15.1/src/Makefile.in.xattrs 2004-12-21 14:31:02.000000000 +0100 -+++ tar-1.15.1/src/Makefile.in 2006-10-04 11:52:36.000000000 +0200 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.3 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -20,8 +20,6 @@ - # Software Foundation, Inc. - - --SOURCES = $(tar_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -113,12 +111,14 @@ - delete.$(OBJEXT) extract.$(OBJEXT) xheader.$(OBJEXT) \ - incremen.$(OBJEXT) list.$(OBJEXT) mangle.$(OBJEXT) \ - misc.$(OBJEXT) names.$(OBJEXT) sparse.$(OBJEXT) \ -- system.$(OBJEXT) tar.$(OBJEXT) update.$(OBJEXT) utf8.$(OBJEXT) -+ system.$(OBJEXT) tar.$(OBJEXT) update.$(OBJEXT) utf8.$(OBJEXT) \ -+ xattrs.$(OBJEXT) - tar_OBJECTS = $(am_tar_OBJECTS) - am__DEPENDENCIES_1 = - am__DEPENDENCIES_2 = ../lib/libtar.a $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) --tar_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) -+tar_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ -+ $(am__DEPENDENCIES_1) - DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/config/depcomp - am__depfiles_maybe = depfiles -@@ -246,7 +246,7 @@ - sharedstatedir = @sharedstatedir@ - sysconfdir = @sysconfdir@ - target_alias = @target_alias@ --noinst_HEADERS = arith.h common.h tar.h -+noinst_HEADERS = arith.h common.h tar.h xattrs.h - tar_SOURCES = \ - buffer.c\ - compare.c\ -@@ -263,11 +263,12 @@ - system.c\ - tar.c\ - update.c\ -- utf8.c -+ utf8.c\ -+ xattrs.c - - INCLUDES = -I$(top_srcdir)/lib -I../ -I../lib - LDADD = ../lib/libtar.a $(LIBINTL) $(LIBICONV) --tar_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) -+tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) - all: all-am - - .SUFFIXES: -@@ -333,7 +334,8 @@ - f=`echo "$$p" | \ - sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - for opt in --help --version; do \ -- if "$(DESTDIR)$(bindir)/$$f" $$opt > c$${pid}_.out 2> c$${pid}_.err \ -+ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ -+ 2>c$${pid}_.err &2; bad=1; fi; \ -@@ -364,6 +366,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tar.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattrs.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xheader.Po@am__quote@ - - .c.o: ---- tar-1.15.1/src/xheader.c.xattrs 2006-10-04 11:52:36.000000000 +0200 -+++ tar-1.15.1/src/xheader.c 2006-10-04 11:52:36.000000000 +0200 -@@ -414,6 +414,74 @@ - global_header_count++; - } - -+void xheader_xattr_init(struct tar_stat_info *st) -+{ -+ st->xattr_map = NULL; -+ st->xattr_map_size = 0; -+} -+ -+void xheader_xattr_free(struct xattr_array *xattr_map, size_t xattr_map_size) -+{ -+ size_t scan = 0; -+ -+ while (scan < xattr_map_size) -+ { -+ free (xattr_map[scan].xkey); -+ free (xattr_map[scan].xval_ptr); -+ -+ ++scan; -+ } -+ free (xattr_map); -+} -+ -+static void xheader_xattr__add(struct xattr_array **xattr_map, -+ size_t *xattr_map_size, -+ const char *key, const char *val, size_t len) -+{ -+ size_t pos = (*xattr_map_size)++; -+ -+ *xattr_map = xrealloc (*xattr_map, -+ *xattr_map_size * sizeof(struct xattr_array)); -+ (*xattr_map)[pos].xkey = xstrdup (key); -+ (*xattr_map)[pos].xval_ptr = xmemdup (val, len); -+ (*xattr_map)[pos].xval_len = len; -+} -+ -+void xheader_xattr_add(struct tar_stat_info *st, -+ const char *key, const char *val, size_t len) -+{ -+ size_t klen = strlen (key); -+ char *xkey = xmalloc (strlen("SCHILY.xattr.") + klen + 1); -+ char *tmp = xkey; -+ -+ tmp = stpcpy (tmp, "SCHILY.xattr."); -+ tmp = stpcpy (tmp, key); -+ -+ xheader_xattr__add (&st->xattr_map, &st->xattr_map_size, xkey, val, len); -+ -+ free (xkey); -+} -+ -+void xheader_xattr_copy(const struct tar_stat_info *st, -+ struct xattr_array **xattr_map, size_t *xattr_map_size) -+{ -+ size_t scan = 0; -+ -+ *xattr_map = NULL; -+ *xattr_map_size = 0; -+ -+ while (scan < st->xattr_map_size) -+ { -+ char *key = st->xattr_map[scan].xkey; -+ char *val = st->xattr_map[scan].xval_ptr; -+ size_t len = st->xattr_map[scan].xval_len; -+ -+ xheader_xattr__add(xattr_map, xattr_map_size, key, val, len); -+ -+ ++scan; -+ } -+} -+ - - /* General Interface */ - -@@ -421,9 +489,10 @@ - { - char const *keyword; - void (*coder) (struct tar_stat_info const *, char const *, -- struct xheader *, void *data); -- void (*decoder) (struct tar_stat_info *, char const *); -+ struct xheader *, void const *data); -+ void (*decoder) (struct tar_stat_info *, char const *, char const *, size_t); - bool protect; -+ bool prefix; - }; - - /* This declaration must be extern, because ISO C99 section 6.9.2 -@@ -440,8 +509,17 @@ - struct xhdr_tab const *p; - - for (p = xhdr_tab; p->keyword; p++) -- if (strcmp (p->keyword, keyword) == 0) -- return p; -+ if (p->prefix) -+ { -+ if (strncmp (p->keyword, keyword, strlen(p->keyword)) == 0) -+ return p; -+ } -+ else -+ { -+ if (strcmp (p->keyword, keyword) == 0) -+ return p; -+ } -+ - return NULL; - } - -@@ -451,7 +529,7 @@ - struct xhdr_tab const *p; - - for (p = xhdr_tab; p->keyword; p++) -- if (p->protect && fnmatch (pattern, p->keyword, 0) == 0) -+ if (!p->prefix && p->protect && fnmatch (pattern, p->keyword, 0) == 0) - return true; - return false; - } -@@ -462,7 +540,7 @@ - struct xhdr_tab const *p; - - for (p = xhdr_tab; p->keyword; p++) -- if (p->protect && strcmp (p->keyword, keyword) == 0) -+ if (!p->prefix && p->protect && strcmp (p->keyword, keyword) == 0) - return true; - return false; - } -@@ -522,7 +600,7 @@ - { - struct xhdr_tab const *t = locate_handler (kp->pattern); - if (t) -- t->decoder (st, kp->value); -+ t->decoder (st, t->keyword, kp->value, strlen (kp->value)); - } - } - -@@ -538,7 +616,10 @@ - - t = locate_handler (keyword); - if (t) -- t->decoder (st, value); -+ t->decoder (st, keyword, value, strlen (value)); -+ else -+ ERROR((0, 0, _("Ignoring unknown extended header keyword `%s'"), -+ keyword)); - } - - void -@@ -665,9 +746,10 @@ - } - - static void --xheader_print (struct xheader *xhdr, char const *keyword, char const *value) -+xheader_print_n (struct xheader *xhdr, char const *keyword, char const *value, -+ size_t val_len) - { -- size_t len = strlen (keyword) + strlen (value) + 3; /* ' ' + '=' + '\n' */ -+ size_t len = strlen (keyword) + val_len + 3; /* ' ' + '=' + '\n' */ - size_t p, n = 0; - char nbuf[100]; - -@@ -683,10 +765,16 @@ - obstack_1grow (xhdr->stk, ' '); - obstack_grow (xhdr->stk, keyword, strlen (keyword)); - obstack_1grow (xhdr->stk, '='); -- obstack_grow (xhdr->stk, value, strlen (value)); -+ obstack_grow (xhdr->stk, value, val_len); - obstack_1grow (xhdr->stk, '\n'); - } - -+static void -+xheader_print (struct xheader *xhdr, char const *keyword, char const *value) -+{ -+ xheader_print_n (xhdr, keyword, value, strlen (value)); -+} -+ - void - xheader_finish (struct xheader *xhdr) - { -@@ -813,38 +901,44 @@ - dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)), - char const *keyword __attribute__ ((unused)), - struct xheader *xhdr __attribute__ ((unused)), -- void *data __attribute__ ((unused))) -+ const void *data __attribute__ ((unused))) - { - } - - static void - dummy_decoder (struct tar_stat_info *st __attribute__ ((unused)), -- char const *arg __attribute__ ((unused))) -+ char const *keyword __attribute__ ((unused)), -+ char const *arg __attribute__ ((unused)), -+ size_t size __attribute__((unused))) - { - } - - static void - atime_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data __attribute__ ((unused))) -+ struct xheader *xhdr, const void *data __attribute__ ((unused))) - { - code_time (st->stat.st_atime, st->atime_nsec, keyword, xhdr); - } - - static void --atime_decoder (struct tar_stat_info *st, char const *arg) -+atime_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), char const *arg, -+ size_t size __attribute__((unused))) - { - decode_time (arg, &st->stat.st_atime, &st->atime_nsec); - } - - static void - gid_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data __attribute__ ((unused))) -+ struct xheader *xhdr, const void *data __attribute__ ((unused))) - { - code_num (st->stat.st_gid, keyword, xhdr); - } - - static void --gid_decoder (struct tar_stat_info *st, char const *arg) -+gid_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), char const *arg, -+ size_t size __attribute__((unused))) - { - uintmax_t u; - if (decode_num (&u, arg, TYPE_MAXIMUM (gid_t), "gid")) -@@ -853,65 +947,75 @@ - - static void - gname_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data __attribute__ ((unused))) -+ struct xheader *xhdr, const void *data __attribute__ ((unused))) - { - code_string (st->gname, keyword, xhdr); - } - - static void --gname_decoder (struct tar_stat_info *st, char const *arg) -+gname_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), char const *arg, -+ size_t size __attribute__ ((unused))) - { - decode_string (&st->gname, arg); - } - - static void - linkpath_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data __attribute__ ((unused))) -+ struct xheader *xhdr, const void *data __attribute__ ((unused))) - { - code_string (st->link_name, keyword, xhdr); - } - - static void --linkpath_decoder (struct tar_stat_info *st, char const *arg) -+linkpath_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), char const *arg, -+ size_t size __attribute__ ((unused))) - { - decode_string (&st->link_name, arg); - } - - static void - ctime_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data __attribute__ ((unused))) -+ struct xheader *xhdr, const void *data __attribute__ ((unused))) - { - code_time (st->stat.st_ctime, st->ctime_nsec, keyword, xhdr); - } - - static void --ctime_decoder (struct tar_stat_info *st, char const *arg) -+ctime_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), char const *arg, -+ size_t size __attribute__ ((unused))) - { - decode_time (arg, &st->stat.st_ctime, &st->ctime_nsec); - } - - static void - mtime_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data __attribute__ ((unused))) -+ struct xheader *xhdr, const void *data __attribute__ ((unused))) - { - code_time (st->stat.st_mtime, st->mtime_nsec, keyword, xhdr); - } - - static void --mtime_decoder (struct tar_stat_info *st, char const *arg) -+mtime_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), char const *arg, -+ size_t size __attribute__ ((unused))) - { - decode_time (arg, &st->stat.st_mtime, &st->mtime_nsec); - } - - static void - path_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data __attribute__ ((unused))) -+ struct xheader *xhdr, const void *data __attribute__ ((unused))) - { - code_string (st->file_name, keyword, xhdr); - } - - static void --path_decoder (struct tar_stat_info *st, char const *arg) -+path_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), char const *arg, -+ size_t size __attribute__ ((unused))) - { - decode_string (&st->orig_file_name, arg); - decode_string (&st->file_name, arg); -@@ -920,13 +1024,15 @@ - - static void - size_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data __attribute__ ((unused))) -+ struct xheader *xhdr, const void *data __attribute__ ((unused))) - { - code_num (st->stat.st_size, keyword, xhdr); - } - - static void --size_decoder (struct tar_stat_info *st, char const *arg) -+size_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), char const *arg, -+ size_t size __attribute__ ((unused))) - { - uintmax_t u; - if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "size")) -@@ -935,13 +1041,15 @@ - - static void - uid_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data __attribute__ ((unused))) -+ struct xheader *xhdr, const void *data __attribute__ ((unused))) - { - code_num (st->stat.st_uid, keyword, xhdr); - } - - static void --uid_decoder (struct tar_stat_info *st, char const *arg) -+uid_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), char const *arg, -+ size_t size __attribute__ ((unused))) - { - uintmax_t u; - if (decode_num (&u, arg, TYPE_MAXIMUM (uid_t), "uid")) -@@ -950,26 +1058,31 @@ - - static void - uname_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data __attribute__ ((unused))) -+ struct xheader *xhdr, const void *data __attribute__ ((unused))) - { - code_string (st->uname, keyword, xhdr); - } - - static void --uname_decoder (struct tar_stat_info *st, char const *arg) -+uname_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), char const *arg, -+ size_t size __attribute__ ((unused))) - { - decode_string (&st->uname, arg); - } - - static void - sparse_size_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data) -+ struct xheader *xhdr, const void *data) - { - size_coder (st, keyword, xhdr, data); - } - - static void --sparse_size_decoder (struct tar_stat_info *st, char const *arg) -+sparse_size_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), -+ char const *arg, -+ size_t size __attribute__ ((unused))) - { - uintmax_t u; - if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.size")) -@@ -979,13 +1092,16 @@ - static void - sparse_numblocks_coder (struct tar_stat_info const *st, char const *keyword, - struct xheader *xhdr, -- void *data __attribute__ ((unused))) -+ const void *data __attribute__ ((unused))) - { - code_num (st->sparse_map_avail, keyword, xhdr); - } - - static void --sparse_numblocks_decoder (struct tar_stat_info *st, char const *arg) -+sparse_numblocks_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), -+ char const *arg, -+ size_t size __attribute__ ((unused))) - { - uintmax_t u; - if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numblocks")) -@@ -998,14 +1114,17 @@ - - static void - sparse_offset_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data) -+ struct xheader *xhdr, const void *data) - { - size_t i = *(size_t*)data; - code_num (st->sparse_map[i].offset, keyword, xhdr); - } - - static void --sparse_offset_decoder (struct tar_stat_info *st, char const *arg) -+sparse_offset_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), -+ char const *arg, -+ size_t size __attribute__ ((unused))) - { - uintmax_t u; - if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.offset")) -@@ -1020,14 +1139,17 @@ - - static void - sparse_numbytes_coder (struct tar_stat_info const *st, char const *keyword, -- struct xheader *xhdr, void *data) -+ struct xheader *xhdr, const void *data) - { - size_t i = *(size_t*)data; - code_num (st->sparse_map[i].numbytes, keyword, xhdr); - } - - static void --sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg) -+sparse_numbytes_decoder (struct tar_stat_info *st, -+ char const *keyword __attribute__ ((unused)), -+ char const *arg, -+ size_t size __attribute__ ((unused))) - { - uintmax_t u; - if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numbytes")) -@@ -1041,28 +1163,94 @@ - } - } - -+static void -+xattr_selinux_coder (struct tar_stat_info const *st, char const *keyword, -+ struct xheader *xhdr, void const *data) -+{ -+ code_string (st->cntx_name, keyword, xhdr); -+} -+ -+static void -+xattr_selinux_decoder (struct tar_stat_info *st, -+ char const *keyword, char const *arg, size_t size) -+{ -+ decode_string (&st->cntx_name, arg); -+} -+ -+static void -+xattr_acls_a_coder (struct tar_stat_info const *st , char const *keyword, -+ struct xheader *xhdr, void const *data) -+{ -+ xheader_print_n (xhdr, keyword, st->acls_a_ptr, st->acls_a_len); -+} -+ -+static void -+xattr_acls_a_decoder (struct tar_stat_info *st, -+ char const *keyword, char const *arg, size_t size) -+{ -+ st->acls_a_ptr = xmemdup (arg, size); -+ st->acls_a_len = size; -+} -+ -+static void -+xattr_acls_d_coder (struct tar_stat_info const *st , char const *keyword, -+ struct xheader *xhdr, void const *data) -+{ -+ xheader_print_n (xhdr, keyword, st->acls_d_ptr, st->acls_d_len); -+} -+ -+static void -+xattr_acls_d_decoder (struct tar_stat_info *st, -+ char const *keyword, char const *arg, size_t size) -+{ -+ st->acls_d_ptr = xmemdup (arg, size); -+ st->acls_d_len = size; -+} -+ -+static void -+xattr_coder (struct tar_stat_info const *st , char const *keyword, -+ struct xheader *xhdr, void const *data) -+{ -+ struct xattr_array *xattr_map = st->xattr_map; -+ const size_t *off = data; -+ xheader_print_n (xhdr, keyword, -+ xattr_map[*off].xval_ptr, xattr_map[*off].xval_len); -+} -+ -+static void -+xattr_decoder (struct tar_stat_info *st, -+ char const *keyword, char const *arg, size_t size) -+{ -+ char *xstr = NULL; -+ -+ xstr = xmemdup(arg, size + 1); -+ xheader_xattr_add(st, keyword + strlen("SCHILY.xattr."), xstr, size); -+ free(xstr); -+} -+ -+ - struct xhdr_tab const xhdr_tab[] = { -- { "atime", atime_coder, atime_decoder, false }, -- { "comment", dummy_coder, dummy_decoder, false }, -- { "charset", dummy_coder, dummy_decoder, false }, -- { "ctime", ctime_coder, ctime_decoder, false }, -- { "gid", gid_coder, gid_decoder, false }, -- { "gname", gname_coder, gname_decoder, false }, -- { "linkpath", linkpath_coder, linkpath_decoder, false }, -- { "mtime", mtime_coder, mtime_decoder, false }, -- { "path", path_coder, path_decoder, false }, -- { "size", size_coder, size_decoder, false }, -- { "uid", uid_coder, uid_decoder, false }, -- { "uname", uname_coder, uname_decoder, false }, -+ { "atime", atime_coder, atime_decoder, false, false }, -+ { "comment", dummy_coder, dummy_decoder, false, false }, -+ { "charset", dummy_coder, dummy_decoder, false, false }, -+ { "ctime", ctime_coder, ctime_decoder, false, false }, -+ { "gid", gid_coder, gid_decoder, false, false }, -+ { "gname", gname_coder, gname_decoder, false, false }, -+ { "linkpath", linkpath_coder, linkpath_decoder, false, false }, -+ { "mtime", mtime_coder, mtime_decoder, false, false }, -+ { "path", path_coder, path_decoder, false, false }, -+ { "size", size_coder, size_decoder, false, false }, -+ { "uid", uid_coder, uid_decoder, false, false }, -+ { "uname", uname_coder, uname_decoder, false, false }, - - /* Sparse file handling */ -- { "GNU.sparse.size", sparse_size_coder, sparse_size_decoder, true }, -+ { "GNU.sparse.size", sparse_size_coder, sparse_size_decoder, true, false }, - { "GNU.sparse.numblocks", sparse_numblocks_coder, sparse_numblocks_decoder, -- true }, -+ true, false }, - { "GNU.sparse.offset", sparse_offset_coder, sparse_offset_decoder, -- true }, -+ true, false }, - { "GNU.sparse.numbytes", sparse_numbytes_coder, sparse_numbytes_decoder, -- true }, -+ true, false }, - - #if 0 /* GNU private keywords (not yet implemented) */ - -@@ -1086,5 +1274,21 @@ - { "GNU.volume.offset", volume_offset_coder, volume_offset_decoder, false }, - #endif - -+ /* SELinux, use the star format... */ -+ { "SCHILY.xattr.security.selinux", -+ xattr_selinux_coder, xattr_selinux_decoder, false, false }, -+ -+ /* ACLs, use the star format... */ -+ { "SCHILY.xattr.system.posix_acl_access", -+ xattr_acls_a_coder, xattr_acls_a_decoder, false, false }, -+ -+ { "SCHILY.xattr.system.posix_acl_default", -+ xattr_acls_d_coder, xattr_acls_d_decoder, false, false }, -+ -+ /* xattr's, use the star format note we only save the user/root varients... */ -+ { "SCHILY.xattr.user", xattr_coder, xattr_decoder, false, true }, -+ { "SCHILY.xattr.root", xattr_coder, xattr_decoder, false, true }, -+ { "SCHILY.xattr", dummy_coder, dummy_decoder, false, true }, -+ - { NULL, NULL, NULL, false } - }; ---- tar-1.15.1/src/common.h.xattrs 2004-12-21 15:31:58.000000000 +0100 -+++ tar-1.15.1/src/common.h 2006-10-04 11:52:36.000000000 +0200 -@@ -247,6 +247,15 @@ - /* If positive, preserve permissions when extracting. */ - GLOBAL int same_permissions_option; - -+/* If positive, save the SELinux context. */ -+GLOBAL int selinux_context_option; -+ -+/* If positive, save the ACLs. */ -+GLOBAL int acls_option; -+ -+/* If positive, save the user and root xattrs. */ -+GLOBAL int xattrs_option; -+ - /* When set, strip the given number of file name components from the file name - before extracting */ - GLOBAL size_t strip_name_components; -@@ -654,6 +663,9 @@ - - void update_archive (void); - -+/* Module attrs.c. */ -+#include "xattrs.h" -+ - /* Module xheader.c. */ - - void xheader_decode (struct tar_stat_info *); -@@ -669,6 +681,12 @@ - void xheader_write (char, char *, struct xheader *); - void xheader_write_global (void); - void xheader_set_option (char *string); -+void xheader_xattr_init(struct tar_stat_info *st); -+void xheader_xattr_free(struct xattr_array *vals, size_t sz); -+void xheader_xattr_copy(const struct tar_stat_info *st, -+ struct xattr_array **vals, size_t *sz); -+void xheader_xattr_add(struct tar_stat_info *st, -+ const char *key, const char *val, size_t len); - - /* Module system.c */ - -@@ -703,3 +721,9 @@ - /* Module utf8.c */ - bool string_ascii_p (const char *str); - bool utf8_convert (bool to_utf, char const *input, char **output); -+ -+/* backport externs ... */ -+void -+call_arg_error (char const *call, char const *name); -+void -+call_arg_warn (char const *call, char const *name); ---- tar-1.15.1/src/tar.h.xattrs 2004-04-04 11:53:30.000000000 +0200 -+++ tar-1.15.1/src/tar.h 2006-10-04 11:52:36.000000000 +0200 -@@ -265,6 +265,14 @@ - size_t numbytes; - }; - -+/* Information about xattrs for a file. */ -+struct xattr_array -+ { -+ char *xkey; -+ char *xval_ptr; -+ size_t xval_len; -+ }; -+ - struct tar_stat_info - { - char *orig_file_name; /* name of file read from the archive header */ -@@ -278,6 +286,15 @@ - unsigned int devmajor; /* device major number */ - char *uname; /* user name of owner */ - char *gname; /* group name of owner */ -+ -+ char *cntx_name; /* SELinux context for the current archive entry. */ -+ -+ char *acls_a_ptr; /* Access ACLs for the current archive entry. */ -+ size_t acls_a_len; /* Access ACLs for the current archive entry. */ -+ -+ char *acls_d_ptr; /* Default ACLs for the current archive entry. */ -+ size_t acls_d_len; /* Default ACLs for the current archive entry. */ -+ - struct stat stat; /* regular filesystem stat */ - - /* Nanosecond parts of file timestamps (if available) */ -@@ -294,7 +311,10 @@ - sparse_map array. Zero if the file is - not sparse */ - size_t sparse_map_size; /* Size of the sparse map */ -- struct sp_array *sparse_map; -+ struct sp_array *sparse_map; -+ -+ size_t xattr_map_size; /* Size of the xattr map */ -+ struct xattr_array *xattr_map; - }; - - union block ---- tar-1.15.1/src/create.c.xattrs 2006-10-04 11:52:36.000000000 +0200 -+++ tar-1.15.1/src/create.c 2006-10-04 11:54:47.000000000 +0200 -@@ -753,6 +753,30 @@ - GNAME_TO_CHARS (st->gname, header->header.gname); - } - -+ if (archive_format == POSIX_FORMAT) -+ { -+ if (acls_option > 0) -+ { -+ if (st->acls_a_ptr) -+ xheader_store ("SCHILY.xattr.system.posix_acl_access", st, NULL); -+ if (st->acls_d_ptr) -+ xheader_store ("SCHILY.xattr.system.posix_acl_default", st, NULL); -+ } -+ if ((selinux_context_option > 0) && st->cntx_name) -+ xheader_store ("SCHILY.xattr.security.selinux", st, NULL); -+ if (xattrs_option > 0) -+ { -+ size_t scan_xattr = 0; -+ struct xattr_array *xattr_map = st->xattr_map; -+ -+ while (scan_xattr < st->xattr_map_size) -+ { -+ xheader_store (xattr_map[scan_xattr].xkey, st, &scan_xattr); -+ ++scan_xattr; -+ } -+ } -+ } -+ - return header; - } - -@@ -980,6 +1004,10 @@ - off_t block_ordinal = current_block_ordinal (); - st->stat.st_size = 0; /* force 0 size on dir */ - -+ xattrs_acls_get(st, st->orig_file_name, -1); -+ xattrs_selinux_get(st, st->orig_file_name, -1); -+ xattrs_xattrs_get(st, st->orig_file_name, -1); -+ - blk = start_header (st); - if (!blk) - return; -@@ -1440,8 +1468,13 @@ - } - } - else -- fd = -1; -+ fd = -1; - -+ /* zero length files mean dumpable == no, *sigh* */ -+ xattrs_acls_get(st, p, fd); -+ xattrs_selinux_get(st, p, fd); -+ xattrs_xattrs_get(st, p, fd); -+ - if (fd != -1 && sparse_option && sparse_file_p (st)) - { - status = sparse_dump_file (fd, st); -@@ -1500,6 +1533,7 @@ - - block_ordinal = current_block_ordinal (); - st->stat.st_size = 0; /* force 0 size on symlink */ -+ xattrs_selinux_get(st, p, -1); - header = start_header (st); - if (!header) - return; ---- tar-1.15.1/src/tar.c.xattrs 2006-10-04 11:52:36.000000000 +0200 -+++ tar-1.15.1/src/tar.c 2006-10-04 11:52:36.000000000 +0200 -@@ -180,7 +180,8 @@ - - enum - { -- ANCHORED_OPTION = CHAR_MAX + 1, -+ ACLS_OPTION = CHAR_MAX + 1, -+ ANCHORED_OPTION, - ATIME_PRESERVE_OPTION, - BACKUP_OPTION, - CHECKPOINT_OPTION, -@@ -197,14 +198,17 @@ - LICENSE_OPTION, - MODE_OPTION, - NEWER_MTIME_OPTION, -+ NO_ACLS_OPTION, - NO_ANCHORED_OPTION, - NO_IGNORE_CASE_OPTION, - NO_OVERWRITE_DIR_OPTION, - NO_RECURSION_OPTION, - NO_SAME_OWNER_OPTION, - NO_SAME_PERMISSIONS_OPTION, -+ NO_SELINUX_CONTEXT_OPTION, - NO_WILDCARDS_OPTION, - NO_WILDCARDS_MATCH_SLASH_OPTION, -+ NO_XATTR_OPTION, - NULL_OPTION, - NUMERIC_OWNER_OPTION, - OCCURRENCE_OPTION, -@@ -222,6 +226,7 @@ - RMT_COMMAND_OPTION, - RSH_COMMAND_OPTION, - SAME_OWNER_OPTION, -+ SELINUX_CONTEXT_OPTION, - SHOW_DEFAULTS_OPTION, - SHOW_OMITTED_DIRS_OPTION, - STRIP_COMPONENTS_OPTION, -@@ -233,7 +238,8 @@ - VERSION_OPTION, - VOLNO_FILE_OPTION, - WILDCARDS_OPTION, -- WILDCARDS_MATCH_SLASH_OPTION -+ WILDCARDS_MATCH_SLASH_OPTION, -+ XATTR_OPTION - }; - - const char *argp_program_version = "tar (" PACKAGE_NAME ") " VERSION; -@@ -326,6 +332,10 @@ - {NULL, 0, NULL, 0, - N_("Handling of file attributes:"), 30 }, - -+ {"acls", ACLS_OPTION, 0, 0, -+ N_("Save the ACLs to the archive"), 31 }, -+ {"no-acls", NO_ACLS_OPTION, 0, 0, -+ N_("Don't extract the ACLs from the archive"), 31 }, - {"owner", OWNER_OPTION, N_("NAME"), 0, - N_("force NAME as owner for added files"), 31 }, - {"group", GROUP_OPTION, N_("NAME"), 0, -@@ -350,6 +360,14 @@ - {"preserve-order", 's', 0, 0, - N_("sort names to extract to match archive"), 31 }, - {"same-order", 0, 0, OPTION_ALIAS, NULL, 31 }, -+ {"selinux", SELINUX_CONTEXT_OPTION, 0, 0, -+ N_("Save the SELinux context to the archive"), 31 }, -+ {"no-selinux", NO_SELINUX_CONTEXT_OPTION, 0, 0, -+ N_("Don't extract the SELinux context from the archive"), 31 }, -+ {"xattrs", XATTR_OPTION, 0, 0, -+ N_("Save the user/root xattrs to the archive"), 31 }, -+ {"no-xattrs", NO_XATTR_OPTION, 0, 0, -+ N_("Don't extract the user/root xattrs from the archive"), 31 }, - {"preserve", PRESERVE_OPTION, 0, 0, - N_("same as both -p and -s"), 31 }, - -@@ -1157,6 +1175,37 @@ - same_permissions_option = -1; - break; - -+ case ACLS_OPTION: -+ set_archive_format ("posix"); -+ acls_option = 1; -+ break; -+ -+ case NO_ACLS_OPTION: -+ acls_option = -1; -+ break; -+ -+ case SELINUX_CONTEXT_OPTION: -+ set_archive_format ("posix"); -+ selinux_context_option = 1; -+ break; -+ -+ case NO_SELINUX_CONTEXT_OPTION: -+ selinux_context_option = -1; -+ break; -+ -+ case XATTR_OPTION: -+ set_archive_format ("posix"); -+ if (!acls_option) acls_option = 1; -+ if (!selinux_context_option) selinux_context_option = 1; -+ xattrs_option = 1; -+ break; -+ -+ case NO_XATTR_OPTION: -+ if (!acls_option) acls_option = -1; -+ if (!selinux_context_option) selinux_context_option = -1; -+ xattrs_option = -1; -+ break; -+ - case RECURSION_OPTION: - recursion_option = FNM_LEADING_DIR; - break; -@@ -1545,6 +1594,29 @@ - || subcommand_option != LIST_SUBCOMMAND)) - USAGE_ERROR ((0, 0, _("--pax-option can be used only on POSIX archives"))); - -+ /* star create's non-POSIX typed archives with xattr support, so allow the -+ extra headers */ -+ if ((acls_option > 0) -+ && archive_format != POSIX_FORMAT -+ && (subcommand_option != EXTRACT_SUBCOMMAND -+ || subcommand_option != DIFF_SUBCOMMAND -+ || subcommand_option != LIST_SUBCOMMAND)) -+ USAGE_ERROR ((0, 0, _("--acls can be used only on POSIX archives"))); -+ -+ if ((selinux_context_option > 0) -+ && archive_format != POSIX_FORMAT -+ && (subcommand_option != EXTRACT_SUBCOMMAND -+ || subcommand_option != DIFF_SUBCOMMAND -+ || subcommand_option != LIST_SUBCOMMAND)) -+ USAGE_ERROR ((0, 0, _("--selinux can be used only on POSIX archives"))); -+ -+ if ((xattrs_option > 0) -+ && archive_format != POSIX_FORMAT -+ && (subcommand_option != EXTRACT_SUBCOMMAND -+ || subcommand_option != DIFF_SUBCOMMAND -+ || subcommand_option != LIST_SUBCOMMAND)) -+ USAGE_ERROR ((0, 0, _("--xattrs can be used only on POSIX archives"))); -+ - /* If ready to unlink hierarchies, so we are for simpler files. */ - if (recursive_unlink_option) - old_files_option = UNLINK_FIRST_OLD_FILES; -@@ -1729,11 +1801,15 @@ - void - tar_stat_destroy (struct tar_stat_info *st) - { -+ xheader_xattr_free (st->xattr_map, st->xattr_map_size); - free (st->orig_file_name); - free (st->file_name); - free (st->link_name); - free (st->uname); - free (st->gname); -+ free (st->cntx_name); -+ free (st->acls_a_ptr); -+ free (st->acls_d_ptr); - free (st->sparse_map); - memset (st, 0, sizeof (*st)); - } ---- tar-1.15.1/scripts/Makefile.in.xattrs 2004-12-21 14:31:01.000000000 +0100 -+++ tar-1.15.1/scripts/Makefile.in 2006-10-04 11:52:36.000000000 +0200 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.3 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -299,7 +299,8 @@ - esac; \ - f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \ - for opt in --help --version; do \ -- if "$(DESTDIR)$(libexecdir)/$$f" $$opt > c$${pid}_.out 2> c$${pid}_.err \ -+ if "$(DESTDIR)$(libexecdir)/$$f" $$opt >c$${pid}_.out \ -+ 2>c$${pid}_.err &2; bad=1; fi; \ -@@ -332,7 +333,8 @@ - esac; \ - f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \ - for opt in --help --version; do \ -- if "$(DESTDIR)$(sbindir)/$$f" $$opt > c$${pid}_.out 2> c$${pid}_.err \ -+ if "$(DESTDIR)$(sbindir)/$$f" $$opt >c$${pid}_.out \ -+ 2>c$${pid}_.err &2; bad=1; fi; \ ---- tar-1.15.1/config.hin.xattrs 2004-12-21 14:33:11.000000000 +0100 -+++ tar-1.15.1/config.hin 2006-10-04 11:52:36.000000000 +0200 -@@ -76,6 +76,9 @@ - includes only if HAVE_ALLOCA_H is defined. */ - #undef HAVE_ALLOCA_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_ATTR_XATTR_H -+ - /* Define to 1 if you have the `btowc' function. */ - #undef HAVE_BTOWC - -@@ -222,9 +225,18 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_FEATURES_H - -+/* Define to 1 if you have the `fgetxattr' function. */ -+#undef HAVE_FGETXATTR -+ -+/* Define to 1 if you have the `flistxattr' function. */ -+#undef HAVE_FLISTXATTR -+ - /* Define to 1 if you have the `flockfile' function. */ - #undef HAVE_FLOCKFILE - -+/* Define to 1 if you have the `fsetxattr' function. */ -+#undef HAVE_FSETXATTR -+ - /* Define to 1 if you have the `fsync' function. */ - #undef HAVE_FSYNC - -@@ -252,6 +264,9 @@ - /* Define to 1 if you have the `gettimeofday' function. */ - #undef HAVE_GETTIMEOFDAY - -+/* Define to 1 if you have the `getxattr' function. */ -+#undef HAVE_GETXATTR -+ - /* Define if you have the iconv() function. */ - #undef HAVE_ICONV - -@@ -280,12 +295,27 @@ - /* Define to 1 if you have the `lchown' function. */ - #undef HAVE_LCHOWN - -+/* Define to 1 if you have the `lgetxattr' function. */ -+#undef HAVE_LGETXATTR -+ -+/* Define to 1 if you have the `acl' library (-lacl). */ -+#undef HAVE_LIBACL -+ -+/* Define to 1 if you have the `selinux' library (-lselinux). */ -+#undef HAVE_LIBSELINUX -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_LINEWRAP_H - - /* Define to 1 if you have the header file. */ - #undef HAVE_LINUX_FD_H - -+/* Define to 1 if you have the `listxattr' function. */ -+#undef HAVE_LISTXATTR -+ -+/* Define to 1 if you have the `llistxattr' function. */ -+#undef HAVE_LLISTXATTR -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_LOCALE_H - -@@ -298,6 +328,9 @@ - /* Define if you have the 'long long' type. */ - #undef HAVE_LONG_LONG - -+/* Define to 1 if you have the `lsetxattr' function. */ -+#undef HAVE_LSETXATTR -+ - /* Define to 1 if you have the `lstat' function. */ - #undef HAVE_LSTAT - -@@ -358,12 +391,18 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_SEARCH_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SELINUX_SELINUX_H -+ - /* Define to 1 if you have the `setenv' function. */ - #undef HAVE_SETENV - - /* Define to 1 if you have the `setlocale' function. */ - #undef HAVE_SETLOCALE - -+/* Define to 1 if you have the `setxattr' function. */ -+#undef HAVE_SETXATTR -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_SGTTY_H - -@@ -473,6 +512,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_SYSEXITS_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SYS_ACL_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_BUF_H - -@@ -580,6 +622,9 @@ - /* Define to 1 if you have the `wmempcpy' function. */ - #undef HAVE_WMEMPCPY - -+/* Define if we have a working extended attributes */ -+#undef HAVE_XATTRS -+ - /* Define to 1 if the system has the type `_Bool'. */ - #undef HAVE__BOOL - ---- tar-1.15.1/configure.ac.xattrs 2004-12-21 14:29:02.000000000 +0100 -+++ tar-1.15.1/configure.ac 2006-10-04 11:52:36.000000000 +0200 -@@ -40,6 +40,9 @@ - sys/inet.h sys/io/trioctl.h \ - sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \ - unistd.h locale.h) -+AC_CHECK_HEADERS(selinux/selinux.h) -+AC_CHECK_HEADERS(attr/xattr.h) -+AC_CHECK_HEADERS(sys/acl.h) - - AC_CHECK_HEADERS([sys/buf.h], [], [], - [#if HAVE_SYS_PARAM_H -@@ -110,6 +113,12 @@ - LIBS=$tar_save_LIBS - - AC_CHECK_FUNCS(fsync lstat mkfifo readlink strerror symlink setlocale utimes) -+AC_CHECK_FUNCS(getxattr fgetxattr lgetxattr \ -+ setxattr fsetxattr lsetxattr \ -+ listxattr flistxattr llistxattr, -+ AC_DEFINE(HAVE_XATTRS,,[Define if we have a working extended attributes]),) -+AC_CHECK_LIB(selinux, getfilecon) -+AC_CHECK_LIB(acl, acl_get_fd) - AC_CHECK_DECLS([getgrgid],,, [#include ]) - AC_CHECK_DECLS([getpwuid],,, [#include ]) - AC_CHECK_DECLS([time],,, [#include ]) ---- tar-1.15.1/configure.xattrs 2006-10-04 11:52:36.000000000 +0200 -+++ tar-1.15.1/configure 2006-10-04 11:52:36.000000000 +0200 -@@ -5317,6 +5317,456 @@ - done - - -+for ac_header in selinux/selinux.h -+do -+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking $ac_header usability" >&5 -+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking $ac_header presence" >&5 -+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <$ac_header> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+## ------------------------------ ## -+## Report this to bug-tar@gnu.org ## -+## ------------------------------ ## -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ eval "$as_ac_Header=\$ac_header_preproc" -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+ -+fi -+if test `eval echo '${'$as_ac_Header'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+for ac_header in attr/xattr.h -+do -+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking $ac_header usability" >&5 -+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking $ac_header presence" >&5 -+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <$ac_header> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+## ------------------------------ ## -+## Report this to bug-tar@gnu.org ## -+## ------------------------------ ## -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ eval "$as_ac_Header=\$ac_header_preproc" -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+ -+fi -+if test `eval echo '${'$as_ac_Header'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+for ac_header in sys/acl.h -+do -+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+else -+ # Is the header compilable? -+echo "$as_me:$LINENO: checking $ac_header usability" >&5 -+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_header_compiler=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_header_compiler=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+# Is the header present? -+echo "$as_me:$LINENO: checking $ac_header presence" >&5 -+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <$ac_header> -+_ACEOF -+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null; then -+ if test -s conftest.err; then -+ ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag -+ else -+ ac_cpp_err= -+ fi -+else -+ ac_cpp_err=yes -+fi -+if test -z "$ac_cpp_err"; then -+ ac_header_preproc=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+rm -f conftest.err conftest.$ac_ext -+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+echo "${ECHO_T}$ac_header_preproc" >&6 -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -+ ( -+ cat <<\_ASBOX -+## ------------------------------ ## -+## Report this to bug-tar@gnu.org ## -+## ------------------------------ ## -+_ASBOX -+ ) | -+ sed "s/^/$as_me: WARNING: /" >&2 -+ ;; -+esac -+echo "$as_me:$LINENO: checking for $ac_header" >&5 -+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_Header+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ eval "$as_ac_Header=\$ac_header_preproc" -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+ -+fi -+if test `eval echo '${'$as_ac_Header'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ - - for ac_header in sys/buf.h - do -@@ -11470,20 +11920,20 @@ - # dnl Persuade glibc to declare these functions. - - -- # Solaris 2.5.1 needs -lposix4 to get the clock_gettyme function. -+ # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. - # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - - # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - fetish_saved_libs=$LIBS -- echo "$as_me:$LINENO: checking for library containing clock_gettyme" >&5 --echo $ECHO_N "checking for library containing clock_gettyme... $ECHO_C" >&6 --if test "${ac_cv_search_clock_gettyme+set}" = set; then -+ echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5 -+echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6 -+if test "${ac_cv_search_clock_gettime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_func_search_save_LIBS=$LIBS --ac_cv_search_clock_gettyme=no -+ac_cv_search_clock_gettime=no - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -11497,11 +11947,11 @@ - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char clock_gettyme (); -+char clock_gettime (); - int - main () - { --clock_gettyme (); -+clock_gettime (); - ; - return 0; - } -@@ -11528,7 +11978,7 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_search_clock_gettyme="none required" -+ ac_cv_search_clock_gettime="none required" - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 -@@ -11536,7 +11986,7 @@ - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test "$ac_cv_search_clock_gettyme" = no; then -+if test "$ac_cv_search_clock_gettime" = no; then - for ac_lib in rt posix4; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -@@ -11552,11 +12002,11 @@ - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char clock_gettyme (); -+char clock_gettime (); - int - main () - { --clock_gettyme (); -+clock_gettime (); - ; - return 0; - } -@@ -11583,7 +12033,7 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_search_clock_gettyme="-l$ac_lib" -+ ac_cv_search_clock_gettime="-l$ac_lib" - break - else - echo "$as_me: failed program was:" >&5 -@@ -11596,18 +12046,18 @@ - fi - LIBS=$ac_func_search_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettyme" >&5 --echo "${ECHO_T}$ac_cv_search_clock_gettyme" >&6 --if test "$ac_cv_search_clock_gettyme" != no; then -- test "$ac_cv_search_clock_gettyme" = "none required" || LIBS="$ac_cv_search_clock_gettyme $LIBS" -- test "$ac_cv_search_clock_gettyme" = "none required" || -- LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettyme -+echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5 -+echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6 -+if test "$ac_cv_search_clock_gettime" != no; then -+ test "$ac_cv_search_clock_gettime" = "none required" || LIBS="$ac_cv_search_clock_gettime $LIBS" -+ test "$ac_cv_search_clock_gettime" = "none required" || -+ LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime - fi - - - - --for ac_func in clock_gettyme clock_settime -+for ac_func in clock_gettime clock_settime - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 -@@ -20541,17 +20991,17 @@ - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - --# Solaris 2.5.1 needs -lposix4 to get the clock_gettyme function. -+# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. - # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - tar_save_LIBS=$LIBS - LIB_CLOCK_GETTIME= -- echo "$as_me:$LINENO: checking for library containing clock_gettyme" >&5 --echo $ECHO_N "checking for library containing clock_gettyme... $ECHO_C" >&6 --if test "${ac_cv_search_clock_gettyme+set}" = set; then -+ echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5 -+echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6 -+if test "${ac_cv_search_clock_gettime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_func_search_save_LIBS=$LIBS --ac_cv_search_clock_gettyme=no -+ac_cv_search_clock_gettime=no - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -20565,11 +21015,11 @@ - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char clock_gettyme (); -+char clock_gettime (); - int - main () - { --clock_gettyme (); -+clock_gettime (); - ; - return 0; - } -@@ -20596,7 +21046,7 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_search_clock_gettyme="none required" -+ ac_cv_search_clock_gettime="none required" - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 -@@ -20604,7 +21054,7 @@ - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --if test "$ac_cv_search_clock_gettyme" = no; then -+if test "$ac_cv_search_clock_gettime" = no; then - for ac_lib in rt posix4; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -@@ -20620,11 +21070,11 @@ - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char clock_gettyme (); -+char clock_gettime (); - int - main () - { --clock_gettyme (); -+clock_gettime (); - ; - return 0; - } -@@ -20651,7 +21101,7 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_search_clock_gettyme="-l$ac_lib" -+ ac_cv_search_clock_gettime="-l$ac_lib" - break - else - echo "$as_me: failed program was:" >&5 -@@ -20664,19 +21114,19 @@ - fi - LIBS=$ac_func_search_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettyme" >&5 --echo "${ECHO_T}$ac_cv_search_clock_gettyme" >&6 --if test "$ac_cv_search_clock_gettyme" != no; then -- test "$ac_cv_search_clock_gettyme" = "none required" || LIBS="$ac_cv_search_clock_gettyme $LIBS" -+echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5 -+echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6 -+if test "$ac_cv_search_clock_gettime" != no; then -+ test "$ac_cv_search_clock_gettime" = "none required" || LIBS="$ac_cv_search_clock_gettime $LIBS" - - fi - -- case "$ac_cv_search_clock_gettyme" in -- -l*) LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettyme;; -+ case "$ac_cv_search_clock_gettime" in -+ -l*) LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime;; - esac - - --for ac_func in clock_gettyme -+for ac_func in clock_gettime - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 -@@ -20888,6 +21338,270 @@ - fi - done - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+for ac_func in getxattr fgetxattr lgetxattr \ -+ setxattr fsetxattr lsetxattr \ -+ listxattr flistxattr llistxattr -+do -+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -+echo "$as_me:$LINENO: checking for $ac_func" >&5 -+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -+if eval "test \"\${$as_ac_var+set}\" = set"; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char $ac_func (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ -+ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ -+#undef $ac_func -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+{ -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char $ac_func (); -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -+choke me -+#else -+char (*f) () = $ac_func; -+#endif -+#ifdef __cplusplus -+} -+#endif -+ -+int -+main () -+{ -+return f != $ac_func; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ eval "$as_ac_var=yes" -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+eval "$as_ac_var=no" -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -+if test `eval echo '${'$as_ac_var'}'` = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+_ACEOF -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_XATTRS -+_ACEOF -+ -+fi -+done -+ -+ -+echo "$as_me:$LINENO: checking for getfilecon in -lselinux" >&5 -+echo $ECHO_N "checking for getfilecon in -lselinux... $ECHO_C" >&6 -+if test "${ac_cv_lib_selinux_getfilecon+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lselinux $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char getfilecon (); -+int -+main () -+{ -+getfilecon (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_lib_selinux_getfilecon=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_lib_selinux_getfilecon=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_getfilecon" >&5 -+echo "${ECHO_T}$ac_cv_lib_selinux_getfilecon" >&6 -+if test $ac_cv_lib_selinux_getfilecon = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LIBSELINUX 1 -+_ACEOF -+ -+ LIBS="-lselinux $LIBS" -+ -+fi -+ -+ -+echo "$as_me:$LINENO: checking for acl_get_fd in -lacl" >&5 -+echo $ECHO_N "checking for acl_get_fd in -lacl... $ECHO_C" >&6 -+if test "${ac_cv_lib_acl_acl_get_fd+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lacl $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char acl_get_fd (); -+int -+main () -+{ -+acl_get_fd (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_lib_acl_acl_get_fd=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_lib_acl_acl_get_fd=no -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_lib_acl_acl_get_fd" >&5 -+echo "${ECHO_T}$ac_cv_lib_acl_acl_get_fd" >&6 -+if test $ac_cv_lib_acl_acl_get_fd = yes; then -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LIBACL 1 -+_ACEOF -+ -+ LIBS="-lacl $LIBS" -+ -+fi -+ - echo "$as_me:$LINENO: checking whether getgrgid is declared" >&5 - echo $ECHO_N "checking whether getgrgid is declared... $ECHO_C" >&6 - if test "${ac_cv_have_decl_getgrgid+set}" = set; then ---- tar-1.15.1/Makefile.in.xattrs 2004-12-21 14:31:04.000000000 +0100 -+++ tar-1.15.1/Makefile.in 2006-10-04 11:52:36.000000000 +0200 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.3 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -311,7 +311,13 @@ - # (which will cause the Makefiles to be regenerated when you run `make'); - # (2) otherwise, pass the desired values on the `make' command line. - $(RECURSIVE_TARGETS): -- @set fnord $$MAKEFLAGS; amf=$$2; \ -+ @failcom='exit 1'; \ -+ for f in x $$MAKEFLAGS; do \ -+ case $$f in \ -+ *=* | --[!k]*);; \ -+ *k*) failcom='fail=yes';; \ -+ esac; \ -+ done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ -@@ -323,7 +329,7 @@ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ -- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ -+ || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ -@@ -331,7 +337,13 @@ - - mostlyclean-recursive clean-recursive distclean-recursive \ - maintainer-clean-recursive: -- @set fnord $$MAKEFLAGS; amf=$$2; \ -+ @failcom='exit 1'; \ -+ for f in x $$MAKEFLAGS; do \ -+ case $$f in \ -+ *=* | --[!k]*);; \ -+ *k*) failcom='fail=yes';; \ -+ esac; \ -+ done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ -@@ -352,7 +364,7 @@ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ -- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ -+ || eval $$failcom; \ - done && test -z "$$fail" - tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ ---- tar-1.15.1/aclocal.m4.xattrs 2004-12-21 14:29:44.000000000 +0100 -+++ tar-1.15.1/aclocal.m4 2006-10-04 11:52:36.000000000 +0200 -@@ -1,7 +1,7 @@ --# generated automatically by aclocal 1.9.3 -*- Autoconf -*- -+# generated automatically by aclocal 1.9.6 -*- Autoconf -*- - --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 --# Free Software Foundation, Inc. -+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -+# 2005 Free Software Foundation, Inc. - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -11,23 +11,11 @@ - # even the implied warranty of MERCHANTABILITY or FITNESS FOR A - # PARTICULAR PURPOSE. - --# -*- Autoconf -*- --# Copyright (C) 2002, 2003 Free Software Foundation, Inc. --# Generated from amversion.in; do not edit by hand. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - - # AM_AUTOMAKE_VERSION(VERSION) - # ---------------------------- -@@ -40,26 +28,15 @@ - # Call AM_AUTOMAKE_VERSION so it can be traced. - # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. - AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -- [AM_AUTOMAKE_VERSION([1.9.3])]) -- --# AM_AUX_DIR_EXPAND -- --# Copyright (C) 2001, 2003 Free Software Foundation, Inc. -+ [AM_AUTOMAKE_VERSION([1.9.6])]) - --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -+# AM_AUX_DIR_EXPAND -*- Autoconf -*- - --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - - # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets - # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -@@ -106,26 +83,16 @@ - am_aux_dir=`cd $ac_aux_dir && pwd` - ]) - --# AM_CONDITIONAL -*- Autoconf -*- -- --# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. -+# AM_CONDITIONAL -*- Autoconf -*- - --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -+# Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 6 -+# serial 7 - - # AM_CONDITIONAL(NAME, SHELL-CONDITION) - # ------------------------------------- -@@ -149,26 +116,15 @@ - Usually this means the macro was only invoked conditionally.]]) - fi])]) - --# serial 7 -*- Autoconf -*- - --# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 -+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 - # Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -- -+# serial 8 - - # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be - # written in clear, in which case automake, when reading aclocal.m4, -@@ -177,7 +133,6 @@ - # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -- - # _AM_DEPENDENCIES(NAME) - # ---------------------- - # See how the compiler implements dependency checking. -@@ -317,27 +272,16 @@ - AC_SUBST([AMDEPBACKSLASH]) - ]) - --# Generate code to set up dependency tracking. -*- Autoconf -*- -+# Generate code to set up dependency tracking. -*- Autoconf -*- - --# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 --# Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -+# Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --#serial 2 -+#serial 3 - - # _AM_OUTPUT_DEPENDENCY_COMMANDS - # ------------------------------ -@@ -396,30 +340,19 @@ - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) - ]) - --# Do all the work for Automake. -*- Autoconf -*- -+# Do all the work for Automake. -*- Autoconf -*- - --# This macro actually does too much some checks are only needed if --# your package does certain things. But this isn't really a big deal. -- --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 - # Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# serial 12 - --# serial 11 -+# This macro actually does too much. Some checks are only needed if -+# your package does certain things. But this isn't really a big deal. - - # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) - # AM_INIT_AUTOMAKE([OPTIONS]) -@@ -521,51 +454,27 @@ - done - echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. -+ - # AM_PROG_INSTALL_SH - # ------------------ - # Define $install_sh. -- --# Copyright (C) 2001, 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -- - AC_DEFUN([AM_PROG_INSTALL_SH], - [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl - install_sh=${install_sh-"$am_aux_dir/install-sh"} - AC_SUBST(install_sh)]) - --# -*- Autoconf -*- --# Copyright (C) 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 1 -+# serial 2 - - # Check whether the underlying file-system supports filenames - # with a leading dot. For instance MS-DOS doesn't. -@@ -580,26 +489,15 @@ - rmdir .tst 2>/dev/null - AC_SUBST([am__leading_dot])]) - --# Check to see how 'make' treats includes. -*- Autoconf -*- -- --# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -+# Check to see how 'make' treats includes. -*- Autoconf -*- - --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 2 -+# serial 3 - - # AM_MAKE_INCLUDE() - # ----------------- -@@ -643,27 +541,16 @@ - rm -f confinc confmf - ]) - --# -*- Autoconf -*- -- -- --# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. -+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -+# Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 3 -+# serial 4 - - # AM_MISSING_PROG(NAME, PROGRAM) - # ------------------------------ -@@ -689,27 +576,16 @@ - fi - ]) - -+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. -+ - # AM_PROG_MKDIR_P - # --------------- - # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -- --# Copyright (C) 2003, 2004 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -- -+# - # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories - # created by `make install' are always world readable, even if the - # installer happens to have an overly restrictive umask (e.g. 077). -@@ -763,26 +639,15 @@ - fi - AC_SUBST([mkdir_p])]) - --# Helper functions for option handling. -*- Autoconf -*- -- --# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -+# Helper functions for option handling. -*- Autoconf -*- - --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 2 -+# serial 3 - - # _AM_MANGLE_OPTION(NAME) - # ----------------------- -@@ -807,28 +672,16 @@ - AC_DEFUN([_AM_IF_OPTION], - [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - --# --# Check to make sure that the build environment is sane. --# -+# Check to make sure that the build environment is sane. -*- Autoconf -*- - --# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -+# Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 3 -+# serial 4 - - # AM_SANITY_CHECK - # --------------- -@@ -871,25 +724,14 @@ - fi - AC_MSG_RESULT(yes)]) - --# AM_PROG_INSTALL_STRIP -- --# Copyright (C) 2001, 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - -+# AM_PROG_INSTALL_STRIP -+# --------------------- - # One issue with vendor `install' (even GNU) is that you can't - # specify the program used to strip binaries. This is especially - # annoying in cross-compiling environments, where the build's strip -@@ -912,25 +754,13 @@ - - # Check how to create a tarball. -*- Autoconf -*- - --# Copyright (C) 2004 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -- --# serial 1 -+# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - -+# serial 2 - - # _AM_PROG_TAR(FORMAT) - # -------------------- diff --git a/tar-1.17-testsuite.patch b/tar-1.17-testsuite.patch new file mode 100644 index 0000000..a66641e --- /dev/null +++ b/tar-1.17-testsuite.patch @@ -0,0 +1,138 @@ +--- tar-1.17/tests/exclude.at.testsuite 2007-01-23 11:25:57.000000000 +0100 ++++ tar-1.17/tests/exclude.at 2007-06-27 11:30:42.000000000 +0200 +@@ -24,6 +24,8 @@ AT_SETUP([exclude]) + AT_KEYWORDS([exclude]) + + AT_TAR_CHECK([ ++AT_SORT_PREREQ ++ + mkdir dir + echo blues > dir/blues + echo jazz > dir/jazz +@@ -37,79 +39,79 @@ echo "test" > dir/rock/file + for option in exclude-caches exclude-caches-under exclude-caches-all + do + echo OPTION $option +- tar -cf archive.tar --$option -v dir 2>err ++ tar -cf archive.tar --$option -v dir 2>err | sort + cat err + echo ARCHIVE +- tar tf archive.tar ++ tar tf archive.tar | sort + done + + for option in exclude-tag exclude-tag-under exclude-tag-all + do + echo OPTION $option +- tar -cf archive.tar --${option}=tagfile -v dir 2>err ++ tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort + cat err + echo ARCHIVE +- tar tf archive.tar ++ tar tf archive.tar | sort + done + ], + [0], + [OPTION exclude-caches + dir/ + dir/blues +-dir/jazz + dir/folk/ +-dir/folk/tagfile + dir/folk/sanjuan ++dir/folk/tagfile ++dir/jazz + dir/rock/ + dir/rock/CACHEDIR.TAG + tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped + ARCHIVE + dir/ + dir/blues +-dir/jazz + dir/folk/ +-dir/folk/tagfile + dir/folk/sanjuan ++dir/folk/tagfile ++dir/jazz + dir/rock/ + dir/rock/CACHEDIR.TAG + OPTION exclude-caches-under + dir/ + dir/blues +-dir/jazz + dir/folk/ +-dir/folk/tagfile + dir/folk/sanjuan ++dir/folk/tagfile ++dir/jazz + dir/rock/ + tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped + ARCHIVE + dir/ + dir/blues +-dir/jazz + dir/folk/ +-dir/folk/tagfile + dir/folk/sanjuan ++dir/folk/tagfile ++dir/jazz + dir/rock/ + OPTION exclude-caches-all + dir/ + dir/blues +-dir/jazz + dir/folk/ +-dir/folk/tagfile + dir/folk/sanjuan ++dir/folk/tagfile ++dir/jazz + tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped + ARCHIVE + dir/ + dir/blues +-dir/jazz + dir/folk/ +-dir/folk/tagfile + dir/folk/sanjuan ++dir/folk/tagfile ++dir/jazz + OPTION exclude-tag + dir/ + dir/blues +-dir/jazz + dir/folk/ + dir/folk/tagfile ++dir/jazz + dir/rock/ + dir/rock/CACHEDIR.TAG + dir/rock/file +@@ -117,17 +119,17 @@ tar: dir/folk/: contains a cache directo + ARCHIVE + dir/ + dir/blues +-dir/jazz + dir/folk/ + dir/folk/tagfile ++dir/jazz + dir/rock/ + dir/rock/CACHEDIR.TAG + dir/rock/file + OPTION exclude-tag-under + dir/ + dir/blues +-dir/jazz + dir/folk/ ++dir/jazz + dir/rock/ + dir/rock/CACHEDIR.TAG + dir/rock/file +@@ -135,8 +137,8 @@ tar: dir/folk/: contains a cache directo + ARCHIVE + dir/ + dir/blues +-dir/jazz + dir/folk/ ++dir/jazz + dir/rock/ + dir/rock/CACHEDIR.TAG + dir/rock/file diff --git a/tar-1.17-wildcards.patch b/tar-1.17-wildcards.patch new file mode 100644 index 0000000..6de9b7b --- /dev/null +++ b/tar-1.17-wildcards.patch @@ -0,0 +1,74 @@ +--- tar-1.17/doc/tar.texi.wildcards 2007-06-28 13:23:46.000000000 +0200 ++++ tar-1.17/doc/tar.texi 2007-06-28 13:23:46.000000000 +0200 +@@ -6871,7 +6871,7 @@ The following table summarizes pattern-m + + @multitable @columnfractions .3 .7 + @headitem Members @tab Default settings +-@item Inclusion @tab @option{--no-wildcards --anchored --no-wildcards-match-slash} ++@item Inclusion @tab @option{--wildcards --anchored --wildcards-match-slash} + @item Exclusion @tab @option{--wildcards --no-anchored --wildcards-match-slash} + @end multitable + +@@ -10666,6 +10666,9 @@ version of this document is available at + @table @asis + @item Use of globbing patterns when listing and extracting. + ++Note: Following is true for original unpatched GNU tar. ++For compatibility reasons, the old behavior was preserved. ++ + Previous versions of GNU tar assumed shell-style globbing when + extracting from or listing an archive. For example: + +--- tar-1.17/src/tar.c.wildcards 2007-06-28 13:23:46.000000000 +0200 ++++ tar-1.17/src/tar.c 2007-06-28 13:23:46.000000000 +0200 +@@ -686,7 +686,7 @@ static struct argp_option options[] = { + {"no-ignore-case", NO_IGNORE_CASE_OPTION, 0, 0, + N_("case sensitive matching (default)"), GRID+1 }, + {"wildcards", WILDCARDS_OPTION, 0, 0, +- N_("use wildcards (default for exclusion)"), GRID+1 }, ++ N_("use wildcards (default)"), GRID+1 }, + {"no-wildcards", NO_WILDCARDS_OPTION, 0, 0, + N_("verbatim string matching"), GRID+1 }, + {"no-wildcards-match-slash", NO_WILDCARDS_MATCH_SLASH_OPTION, 0, 0, +@@ -780,8 +780,7 @@ ARGMATCH_VERIFY (atime_preserve_args, at + /* Wildcard matching settings */ + enum wildcards + { +- default_wildcards, /* For exclusion == enable_wildcards, +- for inclusion == disable_wildcards */ ++ default_wildcards, /* enable_wildcards */ + disable_wildcards, + enable_wildcards + }; +@@ -809,7 +808,7 @@ struct tar_args /* Variables used + | recursion_option) + + #define MAKE_INCL_OPTIONS(args) \ +- ((((args)->wildcards == enable_wildcards) ? EXCLUDE_WILDCARDS : 0) \ ++ ((((args)->wildcards != disable_wildcards) ? EXCLUDE_WILDCARDS : 0) \ + | (args)->include_anchored \ + | (args)->matching_flags \ + | recursion_option) +@@ -2126,7 +2125,7 @@ decode_options (int argc, char **argv) + + /* Warn about implicit use of the wildcards in command line arguments. + See TODO */ +- warn_regex_usage = args.wildcards == default_wildcards; ++ warn_regex_usage = 0; //args.wildcards == default_wildcards; + + /* Derive option values and check option consistency. */ + +--- tar-1.17/src/names.c.wildcards 2007-04-03 14:17:13.000000000 +0200 ++++ tar-1.17/src/names.c 2007-06-28 13:30:48.000000000 +0200 +@@ -812,10 +812,7 @@ collect_and_sort_names (void) + next_name = name->next; + if (name->found_count || name->dir_contents) + continue; +- if (name->matching_flags & EXCLUDE_WILDCARDS) +- /* NOTE: EXCLUDE_ANCHORED is not relevant here */ +- /* FIXME: just skip regexps for now */ +- continue; ++ + chdir_do (name->change_dir); + if (name->name[0] == 0) + continue; diff --git a/tar-1.17-xattrs.patch b/tar-1.17-xattrs.patch new file mode 100644 index 0000000..16e25c1 --- /dev/null +++ b/tar-1.17-xattrs.patch @@ -0,0 +1,1710 @@ +--- tar-1.17/configure.xattrs 2007-06-08 10:36:00.000000000 +0200 ++++ tar-1.17/configure 2007-06-27 17:18:14.000000000 +0200 +@@ -514,19 +514,29 @@ else + as_mkdir_p=false + fi + +-# Find out whether ``test -x'' works. Don't use a zero-byte file, as +-# systems may use methods other than mode bits to determine executability. +-cat >conf$$.file <<_ASEOF +-#! /bin/sh +-exit 0 +-_ASEOF +-chmod +x conf$$.file +-if test -x conf$$.file >/dev/null 2>&1; then +- as_executable_p="test -x" ++if test -x / >/dev/null 2>&1; then ++ as_test_x='test -x' + else +- as_executable_p=: ++ if ls -dL / >/dev/null 2>&1; then ++ as_ls_L_option=L ++ else ++ as_ls_L_option= ++ fi ++ as_test_x=' ++ eval sh -c '\'' ++ if test -d "$1"; then ++ test -d "$1/."; ++ else ++ case $1 in ++ -*)set "./$1";; ++ esac; ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ ???[sx]*):;;*)false;;esac;fi ++ '\'' sh ++ ' + fi +-rm -f conf$$.file ++as_executable_p=$as_test_x ++ + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +@@ -1925,6 +1935,9 @@ ac_header_list="$ac_header_list sys/tpri + ac_header_list="$ac_header_list sys/tape.h" + ac_header_list="$ac_header_list unistd.h" + ac_header_list="$ac_header_list locale.h" ++ac_header_list="$ac_header_list selinux/selinux.h" ++ac_header_list="$ac_header_list attr/xattr.h" ++ac_header_list="$ac_header_list sys/acl.h" + ac_func_list="$ac_func_list flockfile" + ac_func_list="$ac_func_list funlockfile" + ac_header_list="$ac_header_list features.h" +@@ -34101,6 +34114,251 @@ _ACEOF + fi + done + ++ ++for ac_func in getxattr fgetxattr lgetxattr \ ++ setxattr fsetxattr lsetxattr \ ++ listxattr flistxattr llistxattr ++do ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++/* Define $ac_func to an innocuous variant, in case declares $ac_func. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $ac_func innocuous_$ac_func ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $ac_func (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include ++#else ++# include ++#endif ++ ++#undef $ac_func ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char $ac_func (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$ac_func || defined __stub___$ac_func ++choke me ++#endif ++ ++int ++main () ++{ ++return $ac_func (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ eval "$as_ac_var=no" ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF ++#define HAVE_XATTRS ++_ACEOF ++ ++fi ++done ++ ++ ++{ echo "$as_me:$LINENO: checking for getfilecon in -lselinux" >&5 ++echo $ECHO_N "checking for getfilecon in -lselinux... $ECHO_C" >&6; } ++if test "${ac_cv_lib_selinux_getfilecon+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lselinux $LIBS" ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char getfilecon (); ++int ++main () ++{ ++return getfilecon (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ ac_cv_lib_selinux_getfilecon=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_cv_lib_selinux_getfilecon=no ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_getfilecon" >&5 ++echo "${ECHO_T}$ac_cv_lib_selinux_getfilecon" >&6; } ++if test $ac_cv_lib_selinux_getfilecon = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBSELINUX 1 ++_ACEOF ++ ++ LIBS="-lselinux $LIBS" ++ ++fi ++ ++ ++{ echo "$as_me:$LINENO: checking for acl_get_fd in -lacl" >&5 ++echo $ECHO_N "checking for acl_get_fd in -lacl... $ECHO_C" >&6; } ++if test "${ac_cv_lib_acl_acl_get_fd+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lacl $LIBS" ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char acl_get_fd (); ++int ++main () ++{ ++return acl_get_fd (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ ac_cv_lib_acl_acl_get_fd=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_cv_lib_acl_acl_get_fd=no ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS ++fi ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_acl_acl_get_fd" >&5 ++echo "${ECHO_T}$ac_cv_lib_acl_acl_get_fd" >&6; } ++if test $ac_cv_lib_acl_acl_get_fd = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBACL 1 ++_ACEOF ++ ++ LIBS="-lacl $LIBS" ++ ++fi ++ ++ ++ ++ + { echo "$as_me:$LINENO: checking whether getgrgid is declared" >&5 + echo $ECHO_N "checking whether getgrgid is declared... $ECHO_C" >&6; } + if test "${ac_cv_have_decl_getgrgid+set}" = set; then +--- tar-1.17/configure.ac.xattrs 2007-06-08 10:28:04.000000000 +0200 ++++ tar-1.17/configure.ac 2007-06-27 17:10:56.000000000 +0200 +@@ -40,7 +40,7 @@ AC_CHECK_HEADERS_ONCE(fcntl.h linux/fd.h + sys/param.h sys/device.h sys/filio.h sys/gentape.h \ + sys/inet.h sys/io/trioctl.h \ + sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \ +- unistd.h locale.h) ++ unistd.h locale.h selinux/selinux.h attr/xattr.h sys/acl.h) + + AC_CHECK_HEADERS([sys/buf.h], [], [], + [#if HAVE_SYS_PARAM_H +@@ -88,6 +88,13 @@ gl_INIT + tar_PAXUTILS + + AC_CHECK_FUNCS(fsync getdtablesize lstat mkfifo readlink strerror symlink setlocale utimes) ++AC_CHECK_FUNCS(getxattr fgetxattr lgetxattr \ ++ setxattr fsetxattr lsetxattr \ ++ listxattr flistxattr llistxattr, ++ AC_DEFINE(HAVE_XATTRS,,[Define if we have a working extended attributes]),) ++AC_CHECK_LIB(selinux, getfilecon) ++AC_CHECK_LIB(acl, acl_get_fd) ++ + AC_CHECK_DECLS([getgrgid],,, [#include ]) + AC_CHECK_DECLS([getpwuid],,, [#include ]) + AC_CHECK_DECLS([time],,, [#include ]) +@@ -203,6 +210,8 @@ AC_DEFINE_UNQUOTED(DEFAULT_QUOTING_STYLE + # Iconv + AM_ICONV + AC_CHECK_HEADERS(iconv.h) ++AC_CHECK_HEADERS(selinux/selinux.h) ++AC_CHECK_HEADERS(attr/xattr.h) + AC_CHECK_TYPE(iconv_t,:, + AC_DEFINE(iconv_t, int, + [Conversion descriptor type]), +--- tar-1.17/doc/tar.texi.xattrs 2007-06-08 10:25:19.000000000 +0200 ++++ tar-1.17/doc/tar.texi 2007-06-27 17:10:56.000000000 +0200 +@@ -7845,6 +7845,8 @@ implementation able to read @samp{ustar} + most @samp{posix} archives as well, with the only exception that any + additional information (such as long file names etc.) will in such + case be extracted as plain text files along with the files it refers to. ++This is the only format that can store ACLs, SELinux context and extended ++attributes. + + This archive format will be the default format for future versions + of @GNUTAR{}. +@@ -8333,6 +8335,51 @@ It is equivalent to @option{--same-permi + @FIXME{I do not see the purpose of such an option. (Neither I. FP.) + Neither do I. --Sergey} + ++@opindex acls ++@item --acls ++This option causes @command{tar} to store the current ACL in the archive. ++ ++The @option{--acls} option has no equivalent short option name. ++ ++@opindex selinux ++@item --selinux ++This option causes @command{tar} to store the current SELinux security context ++information in the archive. ++ ++The @option{--selinux} option has no equivalent short option name. ++ ++@opindex xattrs ++@item --xattrs ++This option causes @command{tar} to store the current extended attributes in ++the archive. This option also enables @option{--acls} and @option{--selinux} if ++they haven't been set already. ++ ++The @option{--xattrs} option has no equivalent short option name. ++ ++@opindex no-acls ++@item --no-acls ++This option causes @command{tar} not to store the current ACL in the archive ++and not to extract any ACL information in an archive. ++ ++The @option{--acls} option has no equivalent short option name. ++ ++@opindex no-selinux ++@item --no-selinux ++This option causes @command{tar} not to store the current SELinux security ++context information in the archive and not to extract any SELinux information in ++an archive. ++ ++The @option{--selinux} option has no equivalent short option name. ++ ++@opindex xattrs ++@item --xattrs ++This option causes @command{tar} not to store the current extended attributes in ++the archive and not to extract any extended attributes in an archive. This ++option also enables @option{--acls} and @option{--selinux} if ++they haven't been set already. ++ ++The @option{--xattrs} option has no equivalent short option name. ++ + @end table + + @node Portability +--- tar-1.17/src/Makefile.in.xattrs 2007-06-08 10:35:58.000000000 +0200 ++++ tar-1.17/src/Makefile.in 2007-06-27 17:11:28.000000000 +0200 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.10a from Makefile.am. ++# Makefile.in generated by automake 1.10 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. ++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -22,9 +22,8 @@ + + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ +-pkgincludedir = $(includedir)/@PACKAGE@ + pkglibdir = $(libdir)/@PACKAGE@ +-pkglibexecdir = $(libexecdir)/@PACKAGE@ ++pkgincludedir = $(includedir)/@PACKAGE@ + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c +@@ -134,12 +133,13 @@ am_tar_OBJECTS = buffer.$(OBJEXT) compar + incremen.$(OBJEXT) list.$(OBJEXT) misc.$(OBJEXT) \ + names.$(OBJEXT) sparse.$(OBJEXT) system.$(OBJEXT) \ + tar.$(OBJEXT) transform.$(OBJEXT) update.$(OBJEXT) \ +- utf8.$(OBJEXT) ++ utf8.$(OBJEXT) xattrs.$(OBJEXT) + tar_OBJECTS = $(am_tar_OBJECTS) + am__DEPENDENCIES_1 = + am__DEPENDENCIES_2 = ../lib/libtar.a $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +-tar_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) ++tar_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ ++ $(am__DEPENDENCIES_1) + DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ + depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp + am__depfiles_maybe = depfiles +@@ -459,7 +459,7 @@ sysconfdir = @sysconfdir@ + target_alias = @target_alias@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-noinst_HEADERS = arith.h common.h tar.h ++noinst_HEADERS = arith.h common.h tar.h xattrs.h + tar_SOURCES = \ + buffer.c\ + compare.c\ +@@ -476,11 +476,12 @@ tar_SOURCES = \ + tar.c\ + transform.c\ + update.c\ +- utf8.c ++ utf8.c\ ++ xattrs.c + + INCLUDES = -I$(top_srcdir)/lib -I../ -I../lib + LDADD = ../lib/libtar.a $(LIBINTL) $(LIBICONV) +-tar_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) ++tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) + all: all-am + + .SUFFIXES: +@@ -578,6 +579,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transform.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattrs.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xheader.Po@am__quote@ + + .c.o: +--- tar-1.17/src/common.h.xattrs 2007-06-08 10:14:42.000000000 +0200 ++++ tar-1.17/src/common.h 2007-06-27 17:10:56.000000000 +0200 +@@ -255,6 +255,15 @@ GLOBAL int same_owner_option; + /* If positive, preserve permissions when extracting. */ + GLOBAL int same_permissions_option; + ++/* If positive, save the SELinux context. */ ++GLOBAL int selinux_context_option; ++ ++/* If positive, save the ACLs. */ ++GLOBAL int acls_option; ++ ++/* If positive, save the user and root xattrs. */ ++GLOBAL int xattrs_option; ++ + /* When set, strip the given number of file name components from the file name + before extracting */ + GLOBAL size_t strip_name_components; +@@ -666,6 +675,9 @@ extern char *output_start; + + void update_archive (void); + ++/* Module attrs.c. */ ++#include "xattrs.h" ++ + /* Module xheader.c. */ + + void xheader_init (struct xheader *xhdr); +@@ -687,6 +699,12 @@ bool xheader_string_end (struct xheader + bool xheader_keyword_deleted_p (const char *kw); + char *xheader_format_name (struct tar_stat_info *st, const char *fmt, + size_t n); ++void xheader_xattr_init(struct tar_stat_info *st); ++void xheader_xattr_free(struct xattr_array *vals, size_t sz); ++void xheader_xattr_copy(const struct tar_stat_info *st, ++ struct xattr_array **vals, size_t *sz); ++void xheader_xattr_add(struct tar_stat_info *st, ++ const char *key, const char *val, size_t len); + + /* Module system.c */ + +--- /dev/null 2007-06-25 09:32:25.472134050 +0200 ++++ tar-1.17/src/xattrs.c 2007-06-27 17:10:56.000000000 +0200 +@@ -0,0 +1,457 @@ ++/* Create a tar archive. ++ ++ Copyright (C) 2006 Free Software Foundation, Inc. ++ ++ Written by James Antill, on 2006-07-27. ++ ++ This program is free software; you can redistribute it and/or modify it ++ under the terms of the GNU General Public License as published by the ++ Free Software Foundation; either version 2, or (at your option) any later ++ version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++ Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with this program; if not, write to the Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ ++ ++#include ++ ++#include ++ ++#include "common.h" ++ ++ ++#ifndef HAVE_SELINUX_SELINUX_H ++# undef HAVE_LIBSELINUX ++#endif ++ ++#ifndef HAVE_ATTR_XATTR_H ++# undef HAVE_XATTRS ++#endif ++ ++#ifndef HAVE_SYS_ACL_H ++# undef HAVE_LIBACL ++#endif ++ ++#ifdef HAVE_SELINUX_SELINUX_H ++# include ++#endif ++ ++#ifdef HAVE_ATTR_XATTR_H ++# include ++#endif ++ ++#ifdef HAVE_SYS_ACL_H ++# include ++#endif ++ ++ ++#if 0 /* unused by xattr's atm. */ ++static void xattrs__fd_get(struct tar_stat_info *st, ++ char const *file_name, int fd, const char *attr, ++ char **ret_ptr, size_t *ret_len) ++{ ++#ifdef HAVE_XATTRS ++ static ssize_t asz = 1024; ++ ssize_t ret = 0; ++ static char *val = NULL; ++ ++ if (!val) val = xmalloc (asz); ++ ++ while (((ret = fgetxattr (fd, attr, val, asz)) == -1) && ++ (errno == ERANGE)) ++ { ++ asz <<= 1; ++ val = xrealloc (val, asz); ++ } ++ ++ if (ret != -1) ++ { ++ *ret_ptr = xmemdup (val, ret); ++ *ret_len = ret; ++ } ++ else if (errno != ENOATTR) ++ call_arg_warn ("fgetxattr", file_name); ++#endif ++} ++#endif ++ ++static void xattrs__acls_get_a(struct tar_stat_info *st, ++ char const *file_name, int fd, ++ char **ret_ptr, size_t *ret_len) ++{ /* "system.posix_acl_access" */ ++#ifdef HAVE_LIBACL ++ char *val = NULL; ++ acl_t acl; ++ ++ if (fd != -1) ++ { ++ if ((acl = acl_get_fd (fd)) == (acl_t)NULL) ++ { ++ if (errno != ENOTSUP) ++ call_arg_warn ("acl_get_fd", file_name); ++ return; ++ } ++ } ++ else if ((acl = acl_get_file (file_name, ACL_TYPE_ACCESS)) == (acl_t)NULL) ++ { ++ if (errno != ENOTSUP) ++ call_arg_warn ("acl_get_file", file_name); ++ return; ++ } ++ ++ ++ val = acl_to_text(acl, NULL); ++ acl_free (acl); ++ ++ if (val == NULL) ++ { ++ call_arg_warn ("acl_to_text", file_name); ++ return; ++ } ++ ++ *ret_ptr = xstrdup (val); ++ *ret_len = strlen (val); ++ ++ acl_free (val); ++#endif ++} ++ ++static void xattrs__acls_get_d(struct tar_stat_info *st, ++ char const *file_name, ++ char **ret_ptr, size_t *ret_len) ++{ /* "system.posix_acl_default" */ ++#ifdef HAVE_LIBACL ++ char *val = NULL; ++ acl_t acl; ++ ++ if ((acl = acl_get_file (file_name, ACL_TYPE_DEFAULT)) == (acl_t)NULL) ++ { ++ if (errno != ENOTSUP) ++ call_arg_warn ("acl_get_file", file_name); ++ return; ++ } ++ ++ val = acl_to_text(acl, NULL); ++ acl_free (acl); ++ ++ if (val == NULL) ++ { ++ call_arg_warn ("acl_to_text", file_name); ++ return; ++ } ++ ++ *ret_ptr = xstrdup (val); ++ *ret_len = strlen (val); ++ ++ acl_free (val); ++#endif ++} ++ ++void xattrs_acls_get(struct tar_stat_info *st, char const *file_name, int fd, ++ int xisfile) ++{ ++ if (acls_option > 0) ++ { ++ xattrs__acls_get_a (st, file_name, fd, ++ &st->acls_a_ptr, &st->acls_a_len); ++ if (!xisfile) ++ xattrs__acls_get_d (st, file_name, ++ &st->acls_d_ptr, &st->acls_d_len); ++ } ++} ++ ++void xattrs_selinux_get(struct tar_stat_info *st, char const *file_name, int fd) ++{ ++#ifdef HAVE_LIBSELINUX ++ if (selinux_context_option > 0) ++ if (fd == -1) ++ { ++ if (lgetfilecon (file_name, &st->cntx_name) == -1) ++ call_arg_warn ("lgetfilecon", file_name); ++ } ++ else if (fgetfilecon (fd, &st->cntx_name) == -1) ++ call_arg_warn ("fgetfilecon", file_name); ++#endif ++} ++ ++void xattrs_xattrs_get(struct tar_stat_info *st, char const *file_name, int fd) ++{ ++#ifdef HAVE_XATTRS ++ if (xattrs_option > 0) ++ { /* get all xattrs ... this include security.* and system.* if ++ available. We filter them here, but we have to filter them ++ in xattrs_xattrs_set() anyway. ++ */ ++ static ssize_t xsz = 1024; ++ static char *xatrs = NULL; ++ ssize_t xret = -1; ++ ++ if (!xatrs) xatrs = xmalloc (xsz); ++ ++ while (((fd == -1) ? ++ ((xret = listxattr (file_name, xatrs, xsz)) == -1) : ++ ((xret = flistxattr (fd, xatrs, xsz)) == -1)) && ++ (errno == ERANGE)) ++ { ++ xsz <<= 1; ++ xatrs = xrealloc (xatrs, xsz); ++ } ++ ++ if (xret == -1) ++ call_arg_warn ((fd == -1) ? "listxattrs" : "flistxattrs", file_name); ++ else ++ { ++ const char *attr = xatrs; ++ static ssize_t asz = 1024; ++ static char *val = NULL; ++ ++ if (!val) val = xmalloc (asz); ++ ++ while (xret > 0) ++ { ++ size_t len = strlen (attr); ++ ssize_t aret = 0; ++ ++ if (strncmp (attr, "user.", strlen("user.")) && ++ strncmp (attr, "trusted.", strlen("trusted."))) ++ goto next_attr; /* only store normal xattrs */ ++ ++ while (((fd == -1) ? ++ ((aret = getxattr (file_name, attr, val, asz)) == -1) : ++ ((aret = fgetxattr (fd, attr, val, asz)) == -1)) && ++ (errno == ERANGE)) ++ { ++ asz <<= 1; ++ val = xrealloc (val, asz); ++ } ++ ++ if (aret != -1) ++ xheader_xattr_add (st, attr, val, aret); ++ else if (errno != ENOATTR) ++ call_arg_warn ("fgetxattr", file_name); ++ ++ next_attr: ++ attr += len + 1; ++ xret -= len + 1; ++ } ++ } ++ } ++#endif ++} ++ ++static void xattrs__fd_set(struct tar_stat_info const *st, ++ char const *file_name, char typeflag, ++ const char *attr, ++ const char *ptr, size_t len) ++{ ++#ifdef HAVE_XATTRS ++ if (ptr) ++ { ++ const char *sysname = "setxattr"; ++ int ret = -1; ++ ++ if (typeflag != SYMTYPE) ++ ret = setxattr (file_name, attr, ptr, len, 0); ++ else ++ { ++ sysname = "lsetxattr"; ++ ret = lsetxattr (file_name, attr, ptr, len, 0); ++ } ++ ++ if ((ret == -1) && (errno == EPERM)) ++ call_arg_warn(sysname, file_name); ++ else if ((ret == -1) && (errno != EOPNOTSUPP)) ++ call_arg_error(sysname, file_name); ++ } ++#endif ++} ++ ++/* convert unix permissions into an ACL ... needed due to "default" ACLs */ ++#ifdef HAVE_LIBACL ++static acl_t perms2acl(int perms) ++{ ++ char val[] = "user::---,group::---,other::---"; ++ /* 0123456789 123456789 123456789 123456789 */ ++ ++ /* user */ ++ if (perms & 0400) val[ 6] = 'r'; ++ if (perms & 0200) val[ 7] = 'w'; ++ if (perms & 0100) val[ 8] = 'x'; ++ ++ /* group */ ++ if (perms & 0040) val[17] = 'r'; ++ if (perms & 0020) val[18] = 'w'; ++ if (perms & 0010) val[19] = 'x'; ++ ++ /* other */ ++ if (perms & 0004) val[28] = 'r'; ++ if (perms & 0002) val[29] = 'w'; ++ if (perms & 0001) val[30] = 'x'; ++ ++ return (acl_from_text (val)); ++} ++#endif ++ ++static char *skip_to_ext_fields(char *ptr) ++{ ++ ptr += strcspn(ptr, ":,\n"); /* skip tag name. Ie. user/group/default/mask */ ++ ++ if (*ptr != ':') ++ return (ptr); /* error? no user/group field */ ++ ++ptr; ++ ++ ptr += strcspn(ptr, ":,\n"); /* skip user/group name */ ++ ++ if (*ptr != ':') ++ return (ptr); /* error? no perms field */ ++ ++ptr; ++ ++ ptr += strcspn(ptr, ":,\n"); /* skip perms */ ++ ++ if (*ptr != ':') ++ return (ptr); /* no extra fields */ ++ ++ return (ptr); ++} ++ ++/* The POSIX draft allows extra fields after the three main ones. Star ++ uses this to add a fourth field for user/group which is the numeric ID. ++ We just skip all extra fields atm. */ ++static const char *fixup_extra_acl_fields(const char *ptr) ++{ ++ char *src = (char *)ptr; ++ char *dst = (char *)ptr; ++ ++ while (*src) ++ { ++ const char *old = src; ++ size_t len = 0; ++ ++ src = skip_to_ext_fields(src); ++ len = src - old; ++ if (old != dst) memmove(dst, old, len); ++ dst += len; ++ ++ if (*src == ':') /* We have extra fields, skip them all */ ++ src += strcspn(src, "\n,"); ++ ++ if ((*src == '\n') || (*src == ',')) ++ *dst++ = *src++; /* also done when dst == src, but that's ok */ ++ } ++ if (src != dst) ++ *dst = 0; ++ ++ return ptr; ++} ++ ++static void xattrs__acls_set(struct tar_stat_info const *st, ++ char const *file_name, int type, ++ const char *ptr, size_t len) ++{ /* "system.posix_acl_access" */ ++#ifdef HAVE_LIBACL ++ acl_t acl; ++ ++ if (ptr) ++ { ++ /* assert (strlen (ptr) == len); */ ++ ptr = fixup_extra_acl_fields(ptr); ++ ++ acl = acl_from_text (ptr); ++ acls_option = 1; ++ } ++ else if (acls_option > 0) ++ acl = perms2acl (st->stat.st_mode); ++ else ++ return; /* don't call acl functions unless we first hit an ACL, or ++ --acls was passed explicitly */ ++ ++ if (acl == (acl_t)NULL) ++ { ++ call_arg_warn ("acl_from_text", file_name); ++ return; ++ } ++ ++ if (acl_set_file (file_name, type, acl) == -1) ++ { ++ if (errno != ENOTSUP) ++ call_arg_warn ("acl_set_file", file_name); ++ } ++ acl_free (acl); ++#endif ++} ++ ++void xattrs_acls_set(struct tar_stat_info const *st, ++ char const *file_name, char typeflag) ++{ ++ if ((acls_option >= 0) && (typeflag != SYMTYPE)) ++ { ++#ifdef HAVE_LIBACL ++ xattrs__acls_set (st, file_name, ACL_TYPE_ACCESS, ++ st->acls_a_ptr, st->acls_a_len); ++ if (S_ISDIR (st->stat.st_mode)) ++ xattrs__acls_set (st, file_name, ACL_TYPE_DEFAULT, ++ st->acls_d_ptr, st->acls_d_len); ++#endif ++ } ++} ++ ++void xattrs_selinux_set(struct tar_stat_info const *st, ++ char const *file_name, char typeflag) ++{ ++#ifdef HAVE_LIBSELINUX ++ if ((selinux_context_option >= 0) && st->cntx_name) ++ { ++ const char *sysname = "setfilecon"; ++ int ret = -1; ++ ++ if (typeflag != SYMTYPE) ++ ret = setfilecon (file_name, st->cntx_name); ++ else ++ { ++ sysname = "lsetfilecon"; ++ ret = lsetfilecon (file_name, st->cntx_name); ++ } ++ ++ if ((ret == -1) && (errno == EPERM)) ++ call_arg_warn(sysname, file_name); ++ else if ((ret == -1) && (errno != EOPNOTSUPP)) ++ call_arg_error(sysname, file_name); ++ } ++#endif ++} ++ ++void xattrs_xattrs_set(struct tar_stat_info const *st, ++ char const *file_name, char typeflag) ++{ ++#ifdef HAVE_XATTRS ++ if ((xattrs_option >= 0) && st->xattr_map_size) ++ { ++ size_t scan = 0; ++ ++ while (scan < st->xattr_map_size) ++ { ++ char *keyword = st->xattr_map[scan].xkey; ++ ++ /* assert (!memcpy (keyword, "SCHILY.xattr.", strlen("SCHILY.xattr."))); */ ++ keyword += strlen("SCHILY.xattr."); ++ ++ if (strncmp (keyword, "user.", strlen("user.")) && ++ strncmp (keyword, "trusted.", strlen("trusted."))) ++ continue; /* don't try and set anything but normal xattrs */ ++ ++ /* should we ignore trusted.* EPERM errors when not root ? */ ++ xattrs__fd_set (st, file_name, typeflag, keyword, ++ st->xattr_map[scan].xval_ptr, ++ st->xattr_map[scan].xval_len); ++ ++ ++scan; ++ } ++ } ++#endif ++} ++ +--- tar-1.17/src/tar.c.xattrs 2007-06-01 12:17:10.000000000 +0200 ++++ tar-1.17/src/tar.c 2007-06-27 17:10:56.000000000 +0200 +@@ -247,7 +247,8 @@ tar_set_quoting_style (char *arg) + + enum + { +- ANCHORED_OPTION = CHAR_MAX + 1, ++ ACLS_OPTION = CHAR_MAX + 1, ++ ANCHORED_OPTION, + ATIME_PRESERVE_OPTION, + BACKUP_OPTION, + CHECKPOINT_OPTION, +@@ -271,6 +272,7 @@ enum + MODE_OPTION, + MTIME_OPTION, + NEWER_MTIME_OPTION, ++ NO_ACLS_OPTION, + NO_ANCHORED_OPTION, + NO_DELAY_DIRECTORY_RESTORE_OPTION, + NO_IGNORE_CASE_OPTION, +@@ -280,9 +282,11 @@ enum + NO_RECURSION_OPTION, + NO_SAME_OWNER_OPTION, + NO_SAME_PERMISSIONS_OPTION, ++ NO_SELINUX_CONTEXT_OPTION, + NO_UNQUOTE_OPTION, + NO_WILDCARDS_MATCH_SLASH_OPTION, + NO_WILDCARDS_OPTION, ++ NO_XATTR_OPTION, + NULL_OPTION, + NUMERIC_OWNER_OPTION, + OCCURRENCE_OPTION, +@@ -304,6 +308,7 @@ enum + RMT_COMMAND_OPTION, + RSH_COMMAND_OPTION, + SAME_OWNER_OPTION, ++ SELINUX_CONTEXT_OPTION, + SHOW_DEFAULTS_OPTION, + SHOW_OMITTED_DIRS_OPTION, + SHOW_TRANSFORMED_NAMES_OPTION, +@@ -321,7 +326,8 @@ enum + VERSION_OPTION, + VOLNO_FILE_OPTION, + WILDCARDS_MATCH_SLASH_OPTION, +- WILDCARDS_OPTION ++ WILDCARDS_OPTION, ++ XATTR_OPTION + }; + + const char *argp_program_version = "tar (" PACKAGE_NAME ") " VERSION; +@@ -453,6 +459,10 @@ static struct argp_option options[] = { + {NULL, 0, NULL, 0, + N_("Handling of file attributes:"), GRID }, + ++ {"acls", ACLS_OPTION, 0, 0, ++ N_("Save the ACLs to the archive"), GRID+1 }, ++ {"no-acls", NO_ACLS_OPTION, 0, 0, ++ N_("Don't extract the ACLs from the archive"), GRID+1 }, + {"owner", OWNER_OPTION, N_("NAME"), 0, + N_("force NAME as owner for added files"), GRID+1 }, + {"group", GROUP_OPTION, N_("NAME"), 0, +@@ -483,6 +493,14 @@ static struct argp_option options[] = { + {"preserve-order", 's', 0, 0, + N_("sort names to extract to match archive"), GRID+1 }, + {"same-order", 0, 0, OPTION_ALIAS, NULL, GRID+1 }, ++ {"selinux", SELINUX_CONTEXT_OPTION, 0, 0, ++ N_("Save the SELinux context to the archive"), GRID+1 }, ++ {"no-selinux", NO_SELINUX_CONTEXT_OPTION, 0, 0, ++ N_("Don't extract the SELinux context from the archive"), GRID+1 }, ++ {"xattrs", XATTR_OPTION, 0, 0, ++ N_("Save the user/root xattrs to the archive"), GRID+1 }, ++ {"no-xattrs", NO_XATTR_OPTION, 0, 0, ++ N_("Don't extract the user/root xattrs from the archive"), GRID+1 }, + {"preserve", PRESERVE_OPTION, 0, 0, + N_("same as both -p and -s"), GRID+1 }, + {"delay-directory-restore", DELAY_DIRECTORY_RESTORE_OPTION, 0, 0, +@@ -1805,6 +1823,37 @@ parse_opt (int key, char *arg, struct ar + same_permissions_option = -1; + break; + ++ case ACLS_OPTION: ++ set_archive_format ("posix"); ++ acls_option = 1; ++ break; ++ ++ case NO_ACLS_OPTION: ++ acls_option = -1; ++ break; ++ ++ case SELINUX_CONTEXT_OPTION: ++ set_archive_format ("posix"); ++ selinux_context_option = 1; ++ break; ++ ++ case NO_SELINUX_CONTEXT_OPTION: ++ selinux_context_option = -1; ++ break; ++ ++ case XATTR_OPTION: ++ set_archive_format ("posix"); ++ if (!acls_option) acls_option = 1; ++ if (!selinux_context_option) selinux_context_option = 1; ++ xattrs_option = 1; ++ break; ++ ++ case NO_XATTR_OPTION: ++ if (!acls_option) acls_option = -1; ++ if (!selinux_context_option) selinux_context_option = -1; ++ xattrs_option = -1; ++ break; ++ + case RECURSION_OPTION: + recursion_option = FNM_LEADING_DIR; + break; +@@ -2200,6 +2249,29 @@ decode_options (int argc, char **argv) + || subcommand_option != LIST_SUBCOMMAND)) + USAGE_ERROR ((0, 0, _("--pax-option can be used only on POSIX archives"))); + ++ /* star create's non-POSIX typed archives with xattr support, so allow the ++ extra headers */ ++ if ((acls_option > 0) ++ && archive_format != POSIX_FORMAT ++ && (subcommand_option != EXTRACT_SUBCOMMAND ++ || subcommand_option != DIFF_SUBCOMMAND ++ || subcommand_option != LIST_SUBCOMMAND)) ++ USAGE_ERROR ((0, 0, _("--acls can be used only on POSIX archives"))); ++ ++ if ((selinux_context_option > 0) ++ && archive_format != POSIX_FORMAT ++ && (subcommand_option != EXTRACT_SUBCOMMAND ++ || subcommand_option != DIFF_SUBCOMMAND ++ || subcommand_option != LIST_SUBCOMMAND)) ++ USAGE_ERROR ((0, 0, _("--selinux can be used only on POSIX archives"))); ++ ++ if ((xattrs_option > 0) ++ && archive_format != POSIX_FORMAT ++ && (subcommand_option != EXTRACT_SUBCOMMAND ++ || subcommand_option != DIFF_SUBCOMMAND ++ || subcommand_option != LIST_SUBCOMMAND)) ++ USAGE_ERROR ((0, 0, _("--xattrs can be used only on POSIX archives"))); ++ + /* If ready to unlink hierarchies, so we are for simpler files. */ + if (recursive_unlink_option) + old_files_option = UNLINK_FIRST_OLD_FILES; +@@ -2401,11 +2473,15 @@ tar_stat_init (struct tar_stat_info *st) + void + tar_stat_destroy (struct tar_stat_info *st) + { ++ xheader_xattr_free (st->xattr_map, st->xattr_map_size); + free (st->orig_file_name); + free (st->file_name); + free (st->link_name); + free (st->uname); + free (st->gname); ++ free (st->cntx_name); ++ free (st->acls_a_ptr); ++ free (st->acls_d_ptr); + free (st->sparse_map); + free (st->dumpdir); + xheader_destroy (&st->xhdr); +--- tar-1.17/src/xheader.c.xattrs 2007-06-01 12:17:10.000000000 +0200 ++++ tar-1.17/src/xheader.c 2007-06-27 17:10:56.000000000 +0200 +@@ -419,6 +419,74 @@ xheader_write_global (struct xheader *xh + free (name); + } + ++void xheader_xattr_init(struct tar_stat_info *st) ++{ ++ st->xattr_map = NULL; ++ st->xattr_map_size = 0; ++} ++ ++void xheader_xattr_free(struct xattr_array *xattr_map, size_t xattr_map_size) ++{ ++ size_t scan = 0; ++ ++ while (scan < xattr_map_size) ++ { ++ free (xattr_map[scan].xkey); ++ free (xattr_map[scan].xval_ptr); ++ ++ ++scan; ++ } ++ free (xattr_map); ++} ++ ++static void xheader_xattr__add(struct xattr_array **xattr_map, ++ size_t *xattr_map_size, ++ const char *key, const char *val, size_t len) ++{ ++ size_t pos = (*xattr_map_size)++; ++ ++ *xattr_map = xrealloc (*xattr_map, ++ *xattr_map_size * sizeof(struct xattr_array)); ++ (*xattr_map)[pos].xkey = xstrdup (key); ++ (*xattr_map)[pos].xval_ptr = xmemdup (val, len + 1); ++ (*xattr_map)[pos].xval_len = len; ++} ++ ++void xheader_xattr_add(struct tar_stat_info *st, ++ const char *key, const char *val, size_t len) ++{ ++ size_t klen = strlen (key); ++ char *xkey = xmalloc (strlen("SCHILY.xattr.") + klen + 1); ++ char *tmp = xkey; ++ ++ tmp = stpcpy (tmp, "SCHILY.xattr."); ++ tmp = stpcpy (tmp, key); ++ ++ xheader_xattr__add (&st->xattr_map, &st->xattr_map_size, xkey, val, len); ++ ++ free (xkey); ++} ++ ++void xheader_xattr_copy(const struct tar_stat_info *st, ++ struct xattr_array **xattr_map, size_t *xattr_map_size) ++{ ++ size_t scan = 0; ++ ++ *xattr_map = NULL; ++ *xattr_map_size = 0; ++ ++ while (scan < st->xattr_map_size) ++ { ++ char *key = st->xattr_map[scan].xkey; ++ char *val = st->xattr_map[scan].xval_ptr; ++ size_t len = st->xattr_map[scan].xval_len; ++ ++ xheader_xattr__add(xattr_map, xattr_map_size, key, val, len); ++ ++ ++scan; ++ } ++} ++ + + /* General Interface */ + +@@ -429,6 +497,7 @@ struct xhdr_tab + struct xheader *, void const *data); + void (*decoder) (struct tar_stat_info *, char const *, char const *, size_t); + bool protect; ++ bool prefix; + }; + + /* This declaration must be extern, because ISO C99 section 6.9.2 +@@ -445,8 +514,17 @@ locate_handler (char const *keyword) + struct xhdr_tab const *p; + + for (p = xhdr_tab; p->keyword; p++) +- if (strcmp (p->keyword, keyword) == 0) +- return p; ++ if (p->prefix) ++ { ++ if (strncmp (p->keyword, keyword, strlen(p->keyword)) == 0) ++ return p; ++ } ++ else ++ { ++ if (strcmp (p->keyword, keyword) == 0) ++ return p; ++ } ++ + return NULL; + } + +@@ -456,7 +534,7 @@ xheader_protected_pattern_p (const char + struct xhdr_tab const *p; + + for (p = xhdr_tab; p->keyword; p++) +- if (p->protect && fnmatch (pattern, p->keyword, 0) == 0) ++ if (!p->prefix && p->protect && fnmatch (pattern, p->keyword, 0) == 0) + return true; + return false; + } +@@ -467,7 +545,7 @@ xheader_protected_keyword_p (const char + struct xhdr_tab const *p; + + for (p = xhdr_tab; p->keyword; p++) +- if (p->protect && strcmp (p->keyword, keyword) == 0) ++ if (!p->prefix && p->protect && strcmp (p->keyword, keyword) == 0) + return true; + return false; + } +@@ -1419,6 +1497,71 @@ volume_filename_decoder (struct tar_stat + } + + static void ++xattr_selinux_coder (struct tar_stat_info const *st, char const *keyword, ++ struct xheader *xhdr, void const *data) ++{ ++ code_string (st->cntx_name, keyword, xhdr); ++} ++ ++static void ++xattr_selinux_decoder (struct tar_stat_info *st, ++ char const *keyword, char const *arg, size_t size) ++{ ++ decode_string (&st->cntx_name, arg); ++} ++ ++static void ++xattr_acls_a_coder (struct tar_stat_info const *st , char const *keyword, ++ struct xheader *xhdr, void const *data) ++{ ++ xheader_print_n (xhdr, keyword, st->acls_a_ptr, st->acls_a_len); ++} ++ ++static void ++xattr_acls_a_decoder (struct tar_stat_info *st, ++ char const *keyword, char const *arg, size_t size) ++{ ++ st->acls_a_ptr = xmemdup (arg, size + 1); ++ st->acls_a_len = size; ++} ++ ++static void ++xattr_acls_d_coder (struct tar_stat_info const *st , char const *keyword, ++ struct xheader *xhdr, void const *data) ++{ ++ xheader_print_n (xhdr, keyword, st->acls_d_ptr, st->acls_d_len); ++} ++ ++static void ++xattr_acls_d_decoder (struct tar_stat_info *st, ++ char const *keyword, char const *arg, size_t size) ++{ ++ st->acls_d_ptr = xmemdup (arg, size + 1); ++ st->acls_d_len = size; ++} ++ ++static void ++xattr_coder (struct tar_stat_info const *st , char const *keyword, ++ struct xheader *xhdr, void const *data) ++{ ++ struct xattr_array *xattr_map = st->xattr_map; ++ const size_t *off = data; ++ xheader_print_n (xhdr, keyword, ++ xattr_map[*off].xval_ptr, xattr_map[*off].xval_len); ++} ++ ++static void ++xattr_decoder (struct tar_stat_info *st, ++ char const *keyword, char const *arg, size_t size) ++{ ++ char *xstr = NULL; ++ ++ xstr = xmemdup(arg, size + 1); ++ xheader_xattr_add(st, keyword + strlen("SCHILY.xattr."), xstr, size); ++ free(xstr); ++} ++ ++static void + sparse_major_coder (struct tar_stat_info const *st, char const *keyword, + struct xheader *xhdr, void const *data) + { +@@ -1455,18 +1598,18 @@ sparse_minor_decoder (struct tar_stat_in + } + + struct xhdr_tab const xhdr_tab[] = { +- { "atime", atime_coder, atime_decoder, false }, +- { "comment", dummy_coder, dummy_decoder, false }, +- { "charset", dummy_coder, dummy_decoder, false }, +- { "ctime", ctime_coder, ctime_decoder, false }, +- { "gid", gid_coder, gid_decoder, false }, +- { "gname", gname_coder, gname_decoder, false }, +- { "linkpath", linkpath_coder, linkpath_decoder, false }, +- { "mtime", mtime_coder, mtime_decoder, false }, +- { "path", path_coder, path_decoder, false }, +- { "size", size_coder, size_decoder, false }, +- { "uid", uid_coder, uid_decoder, false }, +- { "uname", uname_coder, uname_decoder, false }, ++ { "atime", atime_coder, atime_decoder, false, false }, ++ { "comment", dummy_coder, dummy_decoder, false, false }, ++ { "charset", dummy_coder, dummy_decoder, false, false }, ++ { "ctime", ctime_coder, ctime_decoder, false, false }, ++ { "gid", gid_coder, gid_decoder, false, false }, ++ { "gname", gname_coder, gname_decoder, false, false }, ++ { "linkpath", linkpath_coder, linkpath_decoder, false, false }, ++ { "mtime", mtime_coder, mtime_decoder, false, false }, ++ { "path", path_coder, path_decoder, false, false }, ++ { "size", size_coder, size_decoder, false, false }, ++ { "uid", uid_coder, uid_decoder, false, false }, ++ { "uname", uname_coder, uname_decoder, false, false }, + + /* Sparse file handling */ + { "GNU.sparse.name", path_coder, path_decoder, +@@ -1481,25 +1624,25 @@ struct xhdr_tab const xhdr_tab[] = { + true }, + + /* tar 1.14 - 1.15.90 keywords. */ +- { "GNU.sparse.size", sparse_size_coder, sparse_size_decoder, true }, ++ { "GNU.sparse.size", sparse_size_coder, sparse_size_decoder, true, false }, + /* tar 1.14 - 1.15.1 keywords. Multiple instances of these appeared in 'x' + headers, and each of them was meaningful. It confilcted with POSIX specs, + which requires that "when extended header records conflict, the last one + given in the header shall take precedence." */ + { "GNU.sparse.offset", sparse_offset_coder, sparse_offset_decoder, +- true }, ++ true, false }, + { "GNU.sparse.numbytes", sparse_numbytes_coder, sparse_numbytes_decoder, +- true }, ++ true, false }, + /* tar 1.15.90 keyword, introduced to remove the above-mentioned conflict. */ + { "GNU.sparse.map", NULL /* Unused, see pax_dump_header() */, +- sparse_map_decoder, false }, ++ sparse_map_decoder, false, false }, + + { "GNU.dumpdir", dumpdir_coder, dumpdir_decoder, +- true }, ++ true, false }, + + /* Keeps the tape/volume label. May be present only in the global headers. + Equivalent to GNUTYPE_VOLHDR. */ +- { "GNU.volume.label", volume_label_coder, volume_label_decoder, true }, ++ { "GNU.volume.label", volume_label_coder, volume_label_decoder, true, false }, + + /* These may be present in a first global header of the archive. + They provide the same functionality as GNUTYPE_MULTIVOL header. +@@ -1508,9 +1651,38 @@ struct xhdr_tab const xhdr_tab[] = { + GNU.volume.offset keeps the offset of the start of this volume, + otherwise kept in oldgnu_header.offset. */ + { "GNU.volume.filename", volume_label_coder, volume_filename_decoder, +- true }, +- { "GNU.volume.size", volume_size_coder, volume_size_decoder, true }, +- { "GNU.volume.offset", volume_offset_coder, volume_offset_decoder, true }, +- ++ true, false }, ++ { "GNU.volume.size", volume_size_coder, volume_size_decoder, true, false }, ++ { "GNU.volume.offset", volume_offset_coder, volume_offset_decoder, ++ true, false }, ++ ++ /* We get the SELinux value from filecon, so add a namespace for SELinux ++ instead of storing it in SCHILY.xattr.* (which would be RAW). */ ++ { "RHT.security.selinux", ++ xattr_selinux_coder, xattr_selinux_decoder, false, false }, ++ ++ /* ACLs, use the star format... */ ++ { "SCHILY.acl.access", ++ xattr_acls_a_coder, xattr_acls_a_decoder, false, false }, ++ ++ { "SCHILY.acl.default", ++ xattr_acls_d_coder, xattr_acls_d_decoder, false, false }, ++ ++ /* FIXME: These are compat. for FC-6 ... we shipped a tar using the generic ++ header names by accident. */ ++ { "SCHILY.xattr.security.selinux", ++ xattr_selinux_coder, xattr_selinux_decoder, false, false }, ++ { "SCHILY.xattr.system.posix_acl_access", ++ xattr_acls_a_coder, xattr_acls_a_decoder, false, false }, ++ { "SCHILY.xattr.system.posix_acl_default", ++ xattr_acls_d_coder, xattr_acls_d_decoder, false, false }, ++ ++ /* xattr's, use the star format note we only save the user/trusted varients... */ ++ { "SCHILY.xattr.user", xattr_coder, xattr_decoder, false, true }, ++ { "SCHILY.xattr.trusted", xattr_coder, xattr_decoder, false, true }, ++ ++ /* ignore everything else in the xattr namespaces... */ ++ { "SCHILY.xattr", dummy_coder, dummy_decoder, false, true }, ++ + { NULL, NULL, NULL, false } + }; +--- tar-1.17/src/list.c.xattrs 2007-06-27 17:10:56.000000000 +0200 ++++ tar-1.17/src/list.c 2007-06-27 17:10:56.000000000 +0200 +@@ -567,6 +567,13 @@ decode_header (union block *header, stru + assign_string (&stat_info->gname, + header->header.gname[0] ? header->header.gname : NULL); + ++ stat_info->acls_a_ptr = NULL; ++ stat_info->acls_a_len = 0; ++ stat_info->acls_d_ptr = NULL; ++ stat_info->acls_d_len = 0; ++ stat_info->cntx_name = NULL; ++ xheader_xattr_init(stat_info); ++ + if (format == OLDGNU_FORMAT && incremental_option) + { + stat_info->atime.tv_sec = TIME_FROM_HEADER (header->oldgnu_header.atime); +--- tar-1.17/src/Makefile.am.xattrs 2006-12-05 08:37:59.000000000 +0100 ++++ tar-1.17/src/Makefile.am 2007-06-27 17:10:56.000000000 +0200 +@@ -20,7 +20,7 @@ + + bin_PROGRAMS = tar + +-noinst_HEADERS = arith.h common.h tar.h ++noinst_HEADERS = arith.h common.h tar.h xattrs.h + tar_SOURCES = \ + buffer.c\ + compare.c\ +@@ -37,10 +37,11 @@ tar_SOURCES = \ + tar.c\ + transform.c\ + update.c\ +- utf8.c ++ utf8.c\ ++ xattrs.c + + INCLUDES = -I$(top_srcdir)/lib -I../ -I../lib + + LDADD = ../lib/libtar.a $(LIBINTL) $(LIBICONV) + +-tar_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) ++tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) +--- tar-1.17/src/create.c.xattrs 2007-06-01 12:17:10.000000000 +0200 ++++ tar-1.17/src/create.c 2007-06-27 17:10:56.000000000 +0200 +@@ -24,6 +24,7 @@ + #include + + #include "common.h" ++ + #include + + struct link +@@ -942,6 +943,30 @@ start_header (struct tar_stat_info *st) + GNAME_TO_CHARS (st->gname, header->header.gname); + } + ++ if (archive_format == POSIX_FORMAT) ++ { ++ if (acls_option > 0) ++ { ++ if (st->acls_a_ptr) ++ xheader_store ("SCHILY.acl.access", st, NULL); ++ if (st->acls_d_ptr) ++ xheader_store ("SCHILY.acl.default", st, NULL); ++ } ++ if ((selinux_context_option > 0) && st->cntx_name) ++ xheader_store ("RHT.security.selinux", st, NULL); ++ if (xattrs_option > 0) ++ { ++ size_t scan_xattr = 0; ++ struct xattr_array *xattr_map = st->xattr_map; ++ ++ while (scan_xattr < st->xattr_map_size) ++ { ++ xheader_store (xattr_map[scan_xattr].xkey, st, &scan_xattr); ++ ++scan_xattr; ++ } ++ } ++ } ++ + return header; + } + +@@ -1570,6 +1595,10 @@ dump_file0 (struct tar_stat_info *st, co + open_diag (p); + return; + } ++ ++ xattrs_acls_get(st, p, fd, !is_dir); ++ xattrs_selinux_get(st, p, fd); ++ xattrs_xattrs_get(st, p, fd); + } + + if (is_dir) +--- /dev/null 2007-06-25 09:32:25.472134050 +0200 ++++ tar-1.17/src/xattrs.h 2007-06-27 17:10:56.000000000 +0200 +@@ -0,0 +1,14 @@ ++ ++extern void xattrs_acls_get(struct tar_stat_info *st, ++ char const *file_name, int fd, int xisfile); ++extern void xattrs_selinux_get(struct tar_stat_info *st, ++ char const *file_name, int fd); ++extern void xattrs_xattrs_get(struct tar_stat_info *st, ++ char const *file_name, int fd); ++ ++extern void xattrs_acls_set(struct tar_stat_info const *st, ++ char const *file_name, char typeflag); ++extern void xattrs_selinux_set(struct tar_stat_info const *st, ++ char const *file_name, char typeflag); ++extern void xattrs_xattrs_set(struct tar_stat_info const *st, ++ char const *file_name, char typeflag); +--- tar-1.17/src/extract.c.xattrs 2007-06-08 10:14:42.000000000 +0200 ++++ tar-1.17/src/extract.c 2007-06-27 17:10:56.000000000 +0200 +@@ -69,6 +69,13 @@ struct delayed_set_stat + mode_t invert_permissions; + enum permstatus permstatus; + bool after_links; ++ char *cntx_name; ++ char *acls_a_ptr; ++ size_t acls_a_len; ++ char *acls_d_ptr; ++ size_t acls_d_len; ++ size_t xattr_map_size; /* Size of the xattr map */ ++ struct xattr_array *xattr_map; + char file_name[1]; + }; + +@@ -96,6 +103,18 @@ struct delayed_link + hard-linked together. */ + struct string_list *sources; + ++ /* SELinux context */ ++ char *cntx_name; ++ ++ /* ACLs */ ++ char *acls_a_ptr; ++ size_t acls_a_len; ++ char *acls_d_ptr; ++ size_t acls_d_len; ++ ++ size_t xattr_map_size; /* Size of the xattr map */ ++ struct xattr_array *xattr_map; ++ + /* The desired target of the desired link. */ + char target[1]; + }; +@@ -276,6 +295,10 @@ set_stat (char const *file_name, + give files away. */ + } + ++ xattrs_acls_set(st, file_name, typeflag); ++ xattrs_selinux_set(st, file_name, typeflag); ++ xattrs_xattrs_set(st, file_name, typeflag); ++ + if (0 < same_owner_option && permstatus != INTERDIR_PERMSTATUS) + { + /* When lchown exists, it should be used to change the attributes of +@@ -352,6 +375,23 @@ delay_set_stat (char const *file_name, s + data->invert_permissions = invert_permissions; + data->permstatus = permstatus; + data->after_links = 0; ++ data->cntx_name = NULL; ++ assign_string (&data->cntx_name, st->cntx_name); ++ if (st->acls_a_ptr) ++ data->acls_a_ptr = xmemdup(st->acls_a_ptr, st->acls_a_len); ++ else ++ { ++ data->acls_a_ptr = NULL; ++ data->acls_a_len = 0; ++ } ++ if (st->acls_d_ptr) ++ data->acls_d_ptr = xmemdup(st->acls_d_ptr, st->acls_d_len); ++ else ++ { ++ data->acls_d_ptr = NULL; ++ data->acls_d_len = 0; ++ } ++ xheader_xattr_copy (st, &data->xattr_map, &data->xattr_map_size); + strcpy (data->file_name, file_name); + delayed_set_stat_head = data; + } +@@ -599,11 +639,22 @@ apply_nonancestor_delayed_set_stat (char + st.stat.st_gid = data->gid; + st.atime = data->atime; + st.mtime = data->mtime; ++ st.cntx_name = data->cntx_name; ++ st.acls_a_ptr = data->acls_a_ptr; ++ st.acls_a_len = data->acls_a_len; ++ st.acls_d_ptr = data->acls_d_ptr; ++ st.acls_d_len = data->acls_d_len; ++ st.xattr_map = data->xattr_map; ++ st.xattr_map_size = data->xattr_map_size; + set_stat (data->file_name, &st, cur_info, + data->invert_permissions, data->permstatus, DIRTYPE); + } + + delayed_set_stat_head = data->next; ++ xheader_xattr_free (data->xattr_map, data->xattr_map_size); ++ free (data->cntx_name); ++ free (data->acls_a_ptr); ++ free (data->acls_d_ptr); + free (data); + } + } +@@ -882,6 +933,13 @@ create_placeholder_file (char *file_name + + strlen (file_name) + 1); + p->sources->next = 0; + strcpy (p->sources->string, file_name); ++ p->cntx_name = NULL; ++ p->acls_a_ptr = NULL; ++ p->acls_a_len = 0; ++ p->acls_d_ptr = NULL; ++ p->acls_d_len = 0; ++ p->xattr_map = NULL; ++ p->xattr_map_size = 0; + strcpy (p->target, current_stat_info.link_name); + + h = delayed_set_stat_head; +@@ -1291,6 +1349,13 @@ apply_delayed_links (void) + struct tar_stat_info st1; + st1.stat.st_uid = ds->uid; + st1.stat.st_gid = ds->gid; ++ st1.cntx_name = ds->cntx_name; ++ st1.acls_a_ptr = ds->acls_a_ptr; ++ st1.acls_a_len = ds->acls_a_len; ++ st1.acls_d_ptr = ds->acls_d_ptr; ++ st1.acls_d_len = ds->acls_d_len; ++ st1.xattr_map = ds->xattr_map; ++ st1.xattr_map_size = ds->xattr_map_size; + set_stat (source, &st1, NULL, 0, 0, SYMTYPE); + valid_source = source; + } +--- tar-1.17/src/tar.h.xattrs 2007-06-01 12:17:10.000000000 +0200 ++++ tar-1.17/src/tar.h 2007-06-27 17:10:56.000000000 +0200 +@@ -276,6 +276,14 @@ struct xheader + uintmax_t string_length; + }; + ++/* Information about xattrs for a file. */ ++struct xattr_array ++ { ++ char *xkey; ++ char *xval_ptr; ++ size_t xval_len; ++ }; ++ + struct tar_stat_info + { + char *orig_file_name; /* name of file read from the archive header */ +@@ -287,6 +295,15 @@ struct tar_stat_info + + char *uname; /* user name of owner */ + char *gname; /* group name of owner */ ++ ++ char *cntx_name; /* SELinux context for the current archive entry. */ ++ ++ char *acls_a_ptr; /* Access ACLs for the current archive entry. */ ++ size_t acls_a_len; /* Access ACLs for the current archive entry. */ ++ ++ char *acls_d_ptr; /* Default ACLs for the current archive entry. */ ++ size_t acls_d_len; /* Default ACLs for the current archive entry. */ ++ + struct stat stat; /* regular filesystem stat */ + + /* STAT doesn't always have access, data modification, and status +@@ -309,6 +326,9 @@ struct tar_stat_info + size_t sparse_map_size; /* Size of the sparse map */ + struct sp_array *sparse_map; + ++ size_t xattr_map_size; /* Size of the xattr map */ ++ struct xattr_array *xattr_map; ++ + /* Extended headers */ + struct xheader xhdr; + diff --git a/tar.spec b/tar.spec index f532301..94e9a8e 100644 --- a/tar.spec +++ b/tar.spec @@ -1,32 +1,20 @@ Summary: A GNU file archiving program Name: tar Epoch: 2 -Version: 1.15.1 -Release: 26%{?dist} +Version: 1.17 +Release: 1%{?dist} License: GPL Group: Applications/Archiving URL: http://www.gnu.org/software/tar/ Source0: ftp://ftp.gnu.org/pub/gnu/tar/tar-%{version}.tar.gz Source1: ftp://ftp.gnu.org/pub/gnu/tar/tar-%{version}.tar.gz.sig -Source2: tar.1 -Patch1: tar-1.14-nolibrt.patch -Patch2: tar-1.14-loneZeroWarning.patch -Patch3: tar-1.15.1-makeCheck.patch -Patch4: tar-1.15.1-gcc4.patch -Patch5: tar-1.15.1-lseek.patch -Patch6: tar-1.15.1-sparseTotals.patch -Patch7: tar-1.15.1-newerOption.patch -Patch8: tar-1.15.1-padCorrectly.patch -Patch9: tar-1.15.1-vfatTruncate.patch -Patch10: tar-1.15.1-heapOverflow.patch -Patch11: tar-1.15.1-hugeSparse.patch -Patch12: tar-1.15.1-optionsOrder.patch -Patch13: tar-1.15.1-permissions.patch -Patch14: tar-1.15.1-incompatibilities.patch -Patch15: tar-1.15.1-xattrs.patch -Patch16: tar-1.15.1-mangling.patch +Patch1: tar-1.14-loneZeroWarning.patch +Patch2: tar-1.15.1-vfatTruncate.patch +Patch3: tar-1.17-testsuite.patch +Patch4: tar-1.17-xattrs.patch +Patch5: tar-1.17-wildcards.patch Prereq: info -BuildRequires: autoconf automake gzip +BuildRequires: autoconf automake gzip texinfo gettext libacl-devel libselinux-devel Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -45,22 +33,11 @@ the rmt package. %prep %setup -q -%patch1 -p1 -b .nolibrt -%patch2 -p1 -b .loneZeroWarning -%patch3 -p1 -b .makeCheck -%patch4 -p1 -b .gcc4 -%patch5 -p1 -b .lseek -%patch6 -p1 -b .sparseTotals -%patch7 -p1 -b .newerOption -%patch8 -p1 -b .padCorrectly -%patch9 -p1 -b .vfatTruncate -%patch10 -p0 -b .heapOverflow -%patch11 -p1 -b .hugeSparse -%patch12 -p1 -b .optionsOrder -%patch13 -p1 -b .permissions -%patch14 -p1 -b .incompatibilities -%patch15 -p1 -b .xattrs -%patch16 -p1 -b .mangling +%patch1 -p1 -b .loneZeroWarning +%patch2 -p1 -b .vfatTruncate +%patch3 -p1 -b .testsuite +%patch4 -p1 -b .xattrs +%patch5 -p1 -b .wildcards %build %configure --bindir=/bin --libexecdir=/sbin @@ -111,6 +88,14 @@ fi %{_infodir}/tar.info* %changelog +* Thu Jun 28 2007 Radek Brich 2:1.17-1 +- new upstream version +- patch for wildcards incompatibility (#206841), restoring old behavior +- patch for testsuite + (http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00010.html) +- update -xattrs patch +- drop 13 obsolete patches + * Tue Feb 06 2007 Peter Vrabec 2:1.15.1-26 - fix spec file to meet Fedora standards (#226478)