diff --git a/tar-1.15.1-xattrs.patch b/tar-1.15.1-xattrs.patch index 5d08c10..3d40e97 100644 --- a/tar-1.15.1-xattrs.patch +++ b/tar-1.15.1-xattrs.patch @@ -1,1212 +1,35 @@ -diff -rup tar-1.15.1-orig/aclocal.m4 tar-1.15.1/aclocal.m4 ---- tar-1.15.1-orig/aclocal.m4 2004-12-21 08:29:44.000000000 -0500 -+++ tar-1.15.1/aclocal.m4 2006-09-25 11:01:16.000000000 -0400 -@@ -1,7 +1,7 @@ --# generated automatically by aclocal 1.9.3 -*- Autoconf -*- -+# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +--- 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-01 08:32:50.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-01 08:32:13.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) 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 + # 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. -@@ -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 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api - # 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 @@ AC_PREREQ([2.50])dnl - 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 @@ AC_CONFIG_COMMANDS_PRE( - 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 +@@ -20,8 +20,6 @@ # 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. + +-SOURCES = $(libtar_a_SOURCES) - --# 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 @@ fi])]) - # 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 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_ - 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 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS] - [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 @@ for _am_header in $config_headers :; do - 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 @@ fi - 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 @@ AC_MSG_RESULT([$_am_result]) - 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 @@ else - 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 @@ else - 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_SET_OPTIONS], - 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 @@ Check your system clock]) - 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 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) - - # 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 -rup tar-1.15.1-orig/config/config.guess tar-1.15.1/config/config.guess ---- tar-1.15.1-orig/config/config.guess 2004-12-15 03:55:00.000000000 -0500 -+++ tar-1.15.1/config/config.guess 2006-09-25 11:01:16.000000000 -0400 -@@ -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 @@ version="\ - 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_RELEASE=`(uname -r) 2>/dev/null` | - 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 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - # 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 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - 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 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - "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 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - *: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 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - 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 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - *:*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 @@ EOF - 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 @@ EOF - 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 @@ EOF - *: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 @@ EOF - 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 @@ EOF - 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 @@ EOF - 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 @@ EOF - 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 @@ EOF - 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 @@ EOF - 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 @@ EOF - 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 @@ EOF - 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 @@ EOF - 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 @@ EOF - *: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 @@ EOF - 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 -diff -rup tar-1.15.1-orig/config/config.sub tar-1.15.1/config/config.sub ---- tar-1.15.1-orig/config/config.sub 2004-12-15 03:55:00.000000000 -0500 -+++ tar-1.15.1/config/config.sub 2006-09-25 11:01:16.000000000 -0400 -@@ -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 @@ Report bugs and patches to &5 (exit $ac_status); }; }; then @@ -1832,7 +679,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -@@ -11536,7 +11986,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 +@@ -11536,7 +11986,7 @@ fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -1841,7 +688,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure 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 @@ extern "C" +@@ -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. */ @@ -1855,7 +702,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure ; return 0; } -@@ -11583,7 +12033,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l +@@ -11583,7 +12033,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1864,7 +711,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure break else echo "$as_me: failed program was:" >&5 -@@ -11596,18 +12046,18 @@ rm -f conftest.err conftest.$ac_objext \ +@@ -11596,18 +12046,18 @@ fi LIBS=$ac_func_search_save_LIBS fi @@ -1890,7 +737,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure 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 @@ fi +@@ -20541,17 +20991,17 @@ # programs in the package would end up linked with that potentially-shared # library, inducing unnecessary run-time overhead. @@ -1913,7 +760,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -20565,11 +21015,11 @@ extern "C" +@@ -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. */ @@ -1927,7 +774,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure ; return 0; } -@@ -20596,7 +21046,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l +@@ -20596,7 +21046,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1936,7 +783,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -@@ -20604,7 +21054,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 +@@ -20604,7 +21054,7 @@ fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -1945,7 +792,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure 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 @@ extern "C" +@@ -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. */ @@ -1959,7 +806,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure ; return 0; } -@@ -20651,7 +21101,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l +@@ -20651,7 +21101,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1968,7 +815,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure break else echo "$as_me: failed program was:" >&5 -@@ -20664,19 +21114,19 @@ rm -f conftest.err conftest.$ac_objext \ +@@ -20664,19 +21114,19 @@ fi LIBS=$ac_func_search_save_LIBS fi @@ -1995,7 +842,7 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure 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 @@ _ACEOF +@@ -20888,6 +21338,270 @@ fi done @@ -2266,979 +1113,25 @@ diff -rup tar-1.15.1-orig/configure tar-1.15.1/configure 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 -diff -rup tar-1.15.1-orig/configure.ac tar-1.15.1/configure.ac ---- tar-1.15.1-orig/configure.ac 2004-12-21 08:29:02.000000000 -0500 -+++ tar-1.15.1/configure.ac 2006-09-25 11:01:16.000000000 -0400 -@@ -40,6 +40,9 @@ AC_CHECK_HEADERS(fcntl.h linux/fd.h memo - 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) +--- tar-1.15.1/src/list.c.xattrs 2006-10-01 08:32:13.000000000 +0200 ++++ tar-1.15.1/src/list.c 2006-10-01 08:32:13.000000000 +0200 +@@ -563,6 +563,13 @@ + stat_info->stat.st_atime = start_time; + stat_info->stat.st_ctime = start_time; - AC_CHECK_HEADERS([sys/buf.h], [], [], - [#if HAVE_SYS_PARAM_H -@@ -110,6 +113,12 @@ tar_save_LIBS=$LIBS - 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 ]) -diff -rup tar-1.15.1-orig/doc/header.texi tar-1.15.1/doc/header.texi ---- tar-1.15.1-orig/doc/header.texi 2004-04-04 05:53:48.000000000 -0400 -+++ tar-1.15.1/doc/header.texi 2006-09-25 11:01:16.000000000 -0400 -@@ -265,6 +265,14 @@ struct sp_array - 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 @@ struct tar_stat_info - 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 @@ struct tar_stat_info - 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 -diff -rup tar-1.15.1-orig/doc/Makefile.in tar-1.15.1/doc/Makefile.in ---- tar-1.15.1-orig/doc/Makefile.in 2004-12-21 08:30:58.000000000 -0500 -+++ tar-1.15.1/doc/Makefile.in 2006-09-25 11:01:16.000000000 -0400 -@@ -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 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) - 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 @@ mostlyclean-vti: - 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 @@ uninstall-info-am: - 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 -diff -rup tar-1.15.1-orig/doc/stamp-vti tar-1.15.1/doc/stamp-vti ---- tar-1.15.1-orig/doc/stamp-vti 2004-12-21 08:33:12.000000000 -0500 -+++ tar-1.15.1/doc/stamp-vti 2006-09-25 11:01:16.000000000 -0400 -@@ -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 -diff -rup tar-1.15.1-orig/doc/tar.info tar-1.15.1/doc/tar.info ---- tar-1.15.1-orig/doc/tar.info 2004-12-21 08:03:19.000000000 -0500 -+++ tar-1.15.1/doc/tar.info 2006-09-25 11:01:16.000000000 -0400 -@@ -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 @@ File: tar.info, Node: Top, Next: Intro - 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 @@ conforming to POSIX.1-2001 standard. - 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 @@ they were before they were read, use the - 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 @@ distribution, this is part of file `src/ - 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 @@ distribution, this is part of file `src/ - 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 @@ distribution, this is part of file `src/ - 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 @@ Appendix C Index - * -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 @@ Appendix C Index - (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 @@ Appendix C Index - * 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 @@ Appendix C Index - * 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 @@ Appendix C Index - -  - 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 -diff -rup tar-1.15.1-orig/doc/tar.texi tar-1.15.1/doc/tar.texi ---- tar-1.15.1-orig/doc/tar.texi 2004-12-18 14:20:19.000000000 -0500 -+++ tar-1.15.1/doc/tar.texi 2006-09-25 11:01:16.000000000 -0400 -@@ -7012,6 +7012,8 @@ was given @value{op-format-posix} option - 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 @@ It is equivalent to @value{op-same-permi - - @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{--acls} and @option{--selinux} if -+they haven't been set already. -+ -+The @option{--xattrs} option has no equivalent short option name. -+ - @end table - - @node Standard -diff -rup tar-1.15.1-orig/doc/version.texi tar-1.15.1/doc/version.texi ---- tar-1.15.1-orig/doc/version.texi 2004-12-21 08:03:18.000000000 -0500 -+++ tar-1.15.1/doc/version.texi 2006-09-25 11:01:16.000000000 -0400 -@@ -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 -diff -rup tar-1.15.1-orig/lib/localedir.h tar-1.15.1/lib/localedir.h ---- tar-1.15.1-orig/lib/localedir.h 2004-12-21 09:01:12.000000000 -0500 -+++ tar-1.15.1/lib/localedir.h 2006-09-25 11:01:16.000000000 -0400 -@@ -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 -diff -rup tar-1.15.1-orig/lib/Makefile.in tar-1.15.1/lib/Makefile.in ---- tar-1.15.1-orig/lib/Makefile.in 2004-12-21 08:31:00.000000000 -0500 -+++ tar-1.15.1/lib/Makefile.in 2006-09-25 11:01:16.000000000 -0400 -@@ -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@ -diff -rup tar-1.15.1-orig/Makefile.in tar-1.15.1/Makefile.in ---- tar-1.15.1-orig/Makefile.in 2004-12-21 08:31:04.000000000 -0500 -+++ tar-1.15.1/Makefile.in 2006-09-25 11:01:16.000000000 -0400 -@@ -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 @@ uninstall-info-am: - # (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 @@ $(RECURSIVE_TARGETS): - 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 @@ $(RECURSIVE_TARGETS): - - 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 @@ maintainer-clean-recursive: - 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 \ -diff -rup tar-1.15.1-orig/rmt/Makefile.in tar-1.15.1/rmt/Makefile.in ---- tar-1.15.1-orig/rmt/Makefile.in 2004-12-21 08:31:01.000000000 -0500 -+++ tar-1.15.1/rmt/Makefile.in 2006-09-25 11:01:16.000000000 -0400 -@@ -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 @@ installcheck-rmtPROGRAMS: $(rmt_PROGRAMS - 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; \ -diff -rup tar-1.15.1-orig/scripts/Makefile.in tar-1.15.1/scripts/Makefile.in ---- tar-1.15.1-orig/scripts/Makefile.in 2004-12-21 08:31:01.000000000 -0500 -+++ tar-1.15.1/scripts/Makefile.in 2006-09-25 11:01:16.000000000 -0400 -@@ -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 @@ installcheck-libexecSCRIPTS: $(libexec_S - 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 @@ installcheck-sbinSCRIPTS: $(sbin_SCRIPTS - 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; \ -diff -rup tar-1.15.1-orig/src/common.h tar-1.15.1/src/common.h ---- tar-1.15.1-orig/src/common.h 2004-12-21 09:31:58.000000000 -0500 -+++ tar-1.15.1/src/common.h 2006-09-25 11:01:16.000000000 -0400 -@@ -247,6 +247,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; -@@ -654,6 +663,9 @@ extern char *output_start; - - void update_archive (void); - -+/* Module attrs.c. */ -+#include "xattrs.h" -+ - /* Module xheader.c. */ - - void xheader_decode (struct tar_stat_info *); -@@ -669,6 +681,12 @@ char *xheader_ghdr_name (void); - 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 @@ bool sparse_diff_file (int, struct tar_s - /* 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); -diff -rup tar-1.15.1-orig/src/create.c tar-1.15.1/src/create.c ---- tar-1.15.1-orig/src/create.c 2006-09-20 11:35:16.000000000 -0400 -+++ tar-1.15.1/src/create.c 2006-09-25 11:01:16.000000000 -0400 -@@ -753,6 +753,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.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; - } - -@@ -984,6 +1008,10 @@ dump_dir0 (char *directory, - if (!blk) - return; - -+ xattrs_acls_get(st, directory, -1); -+ xattrs_selinux_get(st, directory, -1); -+ xattrs_xattrs_get(st, directory, -1); -+ - if (incremental_option) - blk->header.typeflag = GNUTYPE_DUMPDIR; - else /* if (standard_option) */ -@@ -1438,6 +1466,10 @@ dump_file0 (struct tar_stat_info *st, ch - open_diag (st->orig_file_name); - return; - } -+ -+ xattrs_acls_get(st, p, fd); -+ xattrs_selinux_get(st, p, fd); -+ xattrs_xattrs_get(st, p, fd); - } - else - fd = -1; -diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c ---- tar-1.15.1-orig/src/extract.c 2006-09-20 11:35:16.000000000 -0400 -+++ tar-1.15.1/src/extract.c 2006-09-25 11:01:16.000000000 -0400 -@@ -71,6 +71,13 @@ struct delayed_set_stat ++ 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-01 08:32:13.000000000 +0200 ++++ tar-1.15.1/src/extract.c 2006-10-01 09:24:48.000000000 +0200 +@@ -71,6 +71,13 @@ mode_t invert_permissions; enum permstatus permstatus; bool after_symlinks; @@ -3252,7 +1145,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c char file_name[1]; }; -@@ -95,6 +102,18 @@ struct delayed_symlink +@@ -95,6 +102,18 @@ hard-linked together. */ struct string_list *sources; @@ -3271,7 +1164,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c /* The desired target of the desired link. */ char target[1]; }; -@@ -228,7 +247,7 @@ check_time (char const *file_name, time_ +@@ -228,7 +247,7 @@ static void set_stat (char const *file_name, @@ -3280,7 +1173,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c struct stat const *cur_info, mode_t invert_permissions, enum permstatus permstatus, char typeflag) -@@ -249,11 +268,11 @@ set_stat (char const *file_name, +@@ -249,11 +268,11 @@ /* FIXME: incremental_option should set ctime too, but how? */ if (incremental_option) @@ -3294,7 +1187,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c if (utime (file_name, &utimbuf) < 0) utime_error (file_name); -@@ -268,10 +287,14 @@ set_stat (char const *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. */ @@ -3310,7 +1203,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c if (0 < same_owner_option && permstatus != INTERDIR_PERMSTATUS) { /* When lchown exists, it should be used to change the attributes of -@@ -282,22 +305,22 @@ set_stat (char const *file_name, +@@ -282,22 +305,22 @@ if (typeflag == SYMTYPE) { #if HAVE_LCHOWN @@ -3339,7 +1232,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c invert_permissions, permstatus, typeflag); } } -@@ -310,7 +333,7 @@ set_stat (char const *file_name, +@@ -310,7 +333,7 @@ INVERT_PERMISSIONS bits from the file's current permissions. PERMSTATUS specifies the status of the file's permissions. */ static void @@ -3348,7 +1241,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c mode_t invert_permissions, enum permstatus permstatus) { size_t file_name_len = strlen (file_name); -@@ -322,7 +345,24 @@ delay_set_stat (char const *file_name, s +@@ -322,7 +345,24 @@ data->invert_permissions = invert_permissions; data->permstatus = permstatus; data->after_symlinks = 0; @@ -3374,7 +1267,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c data->next = delayed_set_stat_head; delayed_set_stat_head = data; } -@@ -404,7 +444,7 @@ make_directories (char *file_name) +@@ -404,7 +444,7 @@ invert_permissions is zero, because repair_delayed_set_stat may need to update the struct. */ delay_set_stat (file_name, @@ -3383,7 +1276,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c invert_permissions, INTERDIR_PERMSTATUS); print_for_mkdir (file_name, cursor - file_name, mode); -@@ -594,10 +634,27 @@ apply_nonancestor_delayed_set_stat (char +@@ -594,10 +634,27 @@ } if (! skip_this_one) @@ -3413,7 +1306,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c free (data); } } -@@ -800,7 +857,7 @@ extract_archive (void) +@@ -800,7 +857,7 @@ undo_last_backup (); } @@ -3422,7 +1315,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c (old_files_option == OVERWRITE_OLD_FILES ? UNKNOWN_PERMSTATUS : ARCHIVED_PERMSTATUS), -@@ -822,7 +879,7 @@ extract_archive (void) +@@ -822,7 +879,7 @@ break; if (status == 0) @@ -3431,7 +1324,21 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c else symlink_error (current_stat_info.link_name, file_name); } -@@ -995,7 +1052,7 @@ extract_archive (void) +@@ -865,6 +922,13 @@ + + 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; +@@ -995,7 +1059,7 @@ undo_last_backup (); break; }; @@ -3440,7 +1347,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c ARCHIVED_PERMSTATUS, typeflag); break; #endif -@@ -1011,7 +1068,7 @@ extract_archive (void) +@@ -1011,7 +1075,7 @@ break; if (status == 0) @@ -3449,7 +1356,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c ARCHIVED_PERMSTATUS, typeflag); else { -@@ -1090,11 +1147,11 @@ extract_archive (void) +@@ -1090,11 +1154,11 @@ || old_files_option == OVERWRITE_OLD_FILES) { if (status == 0) @@ -3463,7 +1370,7 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c 0, UNKNOWN_PERMSTATUS); } -@@ -1168,10 +1225,19 @@ apply_delayed_symlinks (void) +@@ -1168,10 +1232,19 @@ symlink_error (ds->target, source); else { @@ -3486,26 +1393,45 @@ diff -rup tar-1.15.1-orig/src/extract.c tar-1.15.1/src/extract.c } } } -diff -rup tar-1.15.1-orig/src/list.c tar-1.15.1/src/list.c ---- tar-1.15.1-orig/src/list.c 2006-09-20 11:35:15.000000000 -0400 -+++ tar-1.15.1/src/list.c 2006-09-25 11:01:16.000000000 -0400 -@@ -563,6 +563,13 @@ decode_header (union block *header, stru - stat_info->stat.st_atime = start_time; - stat_info->stat.st_ctime = start_time; +--- 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-01 08:32:13.000000000 +0200 +@@ -545,7 +545,7 @@ -+ 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); -diff -rup tar-1.15.1-orig/src/Makefile.am tar-1.15.1/src/Makefile.am ---- tar-1.15.1-orig/src/Makefile.am 2004-10-25 10:55:49.000000000 -0400 -+++ tar-1.15.1/src/Makefile.am 2006-09-25 11:01:16.000000000 -0400 + /* 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-09-21 00:42:03.825283750 +0200 ++++ tar-1.15.1/src/xattrs.h 2006-10-01 08:32:13.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-01 08:32:13.000000000 +0200 @@ -20,7 +20,7 @@ bin_PROGRAMS = tar @@ -3515,7 +1441,7 @@ diff -rup tar-1.15.1-orig/src/Makefile.am tar-1.15.1/src/Makefile.am tar_SOURCES = \ buffer.c\ compare.c\ -@@ -37,7 +37,8 @@ tar_SOURCES = \ +@@ -37,7 +37,8 @@ system.c\ tar.c\ update.c\ @@ -3525,927 +1451,14 @@ diff -rup tar-1.15.1-orig/src/Makefile.am tar-1.15.1/src/Makefile.am INCLUDES = -I$(top_srcdir)/lib -I../ -I../lib -@@ -45,4 +46,4 @@ tar.o: ../lib/localedir.h +@@ -45,4 +46,4 @@ LDADD = ../lib/libtar.a $(LIBINTL) $(LIBICONV) -tar_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) +tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) -diff -rup tar-1.15.1-orig/src/Makefile.in tar-1.15.1/src/Makefile.in ---- tar-1.15.1-orig/src/Makefile.in 2004-12-21 08:31:02.000000000 -0500 -+++ tar-1.15.1/src/Makefile.in 2006-09-25 11:01:16.000000000 -0400 -@@ -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 @@ am_tar_OBJECTS = buffer.$(OBJEXT) compar - 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 @@ sbindir = @sbindir@ - 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 @@ tar_SOURCES = \ - 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 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS - 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 @@ distclean-compile: - @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: -diff -rup tar-1.15.1-orig/src/misc.c tar-1.15.1/src/misc.c ---- tar-1.15.1-orig/src/misc.c 2004-09-13 04:12:05.000000000 -0400 -+++ tar-1.15.1/src/misc.c 2006-09-25 11:01:16.000000000 -0400 -@@ -545,7 +545,7 @@ decode_mode (mode_t mode, char *string) - - /* 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 @@ call_arg_fatal (char const *call, char c - - /* 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; -diff -rup tar-1.15.1-orig/src/tar.c tar-1.15.1/src/tar.c ---- tar-1.15.1-orig/src/tar.c 2006-09-20 11:35:16.000000000 -0400 -+++ tar-1.15.1/src/tar.c 2006-09-25 11:01:16.000000000 -0400 -@@ -180,7 +180,8 @@ assert_format(unsigned fmt_mask) - - enum - { -- ANCHORED_OPTION = CHAR_MAX + 1, -+ ACLS_OPTION = CHAR_MAX + 1, -+ ANCHORED_OPTION, - ATIME_PRESERVE_OPTION, - BACKUP_OPTION, - CHECKPOINT_OPTION, -@@ -197,14 +198,17 @@ enum - 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 @@ enum - 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 @@ enum - 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 @@ static struct argp_option options[] = { - {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 @@ static struct argp_option options[] = { - {"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 @@ parse_opt(int key, char *arg, struct arg - 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 @@ 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; -@@ -1729,11 +1801,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); - memset (st, 0, sizeof (*st)); - } -diff -rup tar-1.15.1-orig/src/tar.h tar-1.15.1/src/tar.h ---- tar-1.15.1-orig/src/tar.h 2004-04-04 05:53:30.000000000 -0400 -+++ tar-1.15.1/src/tar.h 2006-09-25 11:02:33.000000000 -0400 -@@ -265,6 +265,14 @@ struct sp_array - 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 @@ struct tar_stat_info - 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 @@ struct tar_stat_info - 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 -diff -rup tar-1.15.1-orig/src/xheader.c tar-1.15.1/src/xheader.c ---- tar-1.15.1-orig/src/xheader.c 2006-09-20 11:35:16.000000000 -0400 -+++ tar-1.15.1/src/xheader.c 2006-09-25 11:01:16.000000000 -0400 -@@ -414,6 +414,74 @@ xheader_write_global (void) - 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 @@ struct xhdr_tab - { - 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 @@ 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; - } - -@@ -451,7 +529,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; - } -@@ -462,7 +540,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; - } -@@ -522,7 +600,7 @@ run_override_list (struct keyword_list * - { - 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 @@ decx (void *data, char const *keyword, c - - 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 @@ format_uintmax (uintmax_t val, char *buf - } - - 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 @@ xheader_print (struct xheader *xhdr, cha - 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 @@ static void - 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 @@ gid_decoder (struct tar_stat_info *st, c - - 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 @@ path_decoder (struct tar_stat_info *st, - - 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 @@ size_decoder (struct tar_stat_info *st, - - 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 @@ uid_decoder (struct tar_stat_info *st, c - - 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 @@ sparse_size_decoder (struct tar_stat_inf - 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 @@ sparse_numblocks_decoder (struct tar_sta - - 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 @@ sparse_offset_decoder (struct tar_stat_i - - 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 @@ sparse_numbytes_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); -+ 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 @@ struct xhdr_tab const xhdr_tab[] = { - { "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 } - }; -diff -rup tar-1.15.1-orig/tests/Makefile.in tar-1.15.1/tests/Makefile.in ---- tar-1.15.1-orig/tests/Makefile.in 2004-12-21 08:31:03.000000000 -0500 -+++ tar-1.15.1/tests/Makefile.in 2006-09-25 11:01:16.000000000 -0400 -@@ -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-orig/src/xattrs.c 1969-12-31 19:00:00.000000000 -0500 -+++ tar-1.15.1/src/xattrs.c 2006-09-25 11:01:31.000000000 -0400 +--- /dev/null 2006-09-21 00:42:03.825283750 +0200 ++++ tar-1.15.1/src/xattrs.c 2006-10-01 08:32:13.000000000 +0200 @@ -0,0 +1,402 @@ +/* Create a tar archive. + @@ -4849,20 +1862,2993 @@ diff -rup tar-1.15.1-orig/tests/Makefile.in tar-1.15.1/tests/Makefile.in +#endif +} + ---- tar-1.15.1-orig/src/xattrs.h 1969-12-31 19:00:00.000000000 -0500 -+++ tar-1.15.1/src/xattrs.h 2006-09-25 11:01:16.000000000 -0400 -@@ -0,0 +1,14 @@ +--- 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-01 08:32:13.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-01 08:32:13.000000000 +0200 ++++ tar-1.15.1/src/xheader.c 2006-10-01 08:32:13.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; ++} + -+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); ++void xheader_xattr_free(struct xattr_array *xattr_map, size_t xattr_map_size) ++{ ++ size_t scan = 0; + -+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); ++ 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-01 08:32:13.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-01 08:32:13.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-01 08:32:13.000000000 +0200 ++++ tar-1.15.1/src/create.c 2006-10-01 08:32:13.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; + } + +@@ -984,6 +1008,10 @@ + if (!blk) + return; + ++ xattrs_acls_get(st, directory, -1); ++ xattrs_selinux_get(st, directory, -1); ++ xattrs_xattrs_get(st, directory, -1); ++ + if (incremental_option) + blk->header.typeflag = GNUTYPE_DUMPDIR; + else /* if (standard_option) */ +@@ -1438,6 +1466,10 @@ + open_diag (st->orig_file_name); + return; + } ++ ++ xattrs_acls_get(st, p, fd); ++ xattrs_selinux_get(st, p, fd); ++ xattrs_xattrs_get(st, p, fd); + } + else + fd = -1; +--- tar-1.15.1/src/tar.c.xattrs 2006-10-01 08:32:13.000000000 +0200 ++++ tar-1.15.1/src/tar.c 2006-10-01 08:32:13.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/tests/Makefile.in.xattrs 2004-12-21 14:31:03.000000000 +0100 ++++ tar-1.15.1/tests/Makefile.in 2006-10-01 08:32:13.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-01 08:32:13.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{--acls} and @option{--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-01 08:32:13.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-01 08:32:13.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-01 08:32:13.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-01 08:32:13.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-01 08:32:13.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/Makefile.in.xattrs 2004-12-21 14:31:04.000000000 +0100 ++++ tar-1.15.1/Makefile.in 2006-10-01 08:32:13.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/scripts/Makefile.in.xattrs 2004-12-21 14:31:01.000000000 +0100 ++++ tar-1.15.1/scripts/Makefile.in 2006-10-01 08:32:13.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/aclocal.m4.xattrs 2004-12-21 14:29:44.000000000 +0100 ++++ tar-1.15.1/aclocal.m4 2006-10-01 08:32:13.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) + # -------------------- +--- 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-01 08:32:13.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/config/config.sub.xattrs 2004-12-15 09:55:00.000000000 +0100 ++++ tar-1.15.1/config/config.sub 2006-10-01 08:32:13.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-01 08:32:14.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 diff --git a/tar.spec b/tar.spec index e6b5f68..1f5dbdd 100644 --- a/tar.spec +++ b/tar.spec @@ -2,7 +2,7 @@ Summary: A GNU file archiving program. Name: tar Epoch: 2 Version: 1.15.1 -Release: 17 +Release: 18 License: GPL Group: Applications/Archiving URL: http://www.gnu.org/software/tar/ @@ -113,6 +113,9 @@ fi %{_infodir}/tar.info* %changelog +* Sun Oct 01 2006 Peter Vrabec 2:1.15.1-18 +- fix tar-1.15.1-xattrs.patch (#208701) + * Tue Sep 19 2006 Peter Vrabec 2:1.15.1-17 - start new epoch, downgrade to solid stable 1.15.1-16 (#206979), - all patches are backported