4875 lines
157 KiB
Diff
4875 lines
157 KiB
Diff
--- tar-1.15.1/config/config.sub.xattrs 2004-12-15 09:55:00.000000000 +0100
|
||
+++ tar-1.15.1/config/config.sub 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,9 +1,9 @@
|
||
#! /bin/sh
|
||
# Configuration validation subroutine script.
|
||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||
-# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||
|
||
-timestamp='2004-08-29'
|
||
+timestamp='2003-06-18'
|
||
|
||
# This file is (in principle) common to ALL GNU software.
|
||
# The presence of a machine in this file suggests that SOME GNU software
|
||
@@ -70,7 +70,7 @@
|
||
version="\
|
||
GNU config.sub ($timestamp)
|
||
|
||
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||
Free Software Foundation, Inc.
|
||
|
||
This is free software; see the source for copying conditions. There is NO
|
||
@@ -118,8 +118,7 @@
|
||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||
case $maybe_os in
|
||
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
|
||
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||
+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||
os=-$maybe_os
|
||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||
;;
|
||
@@ -145,7 +144,7 @@
|
||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||
- -apple | -axis | -knuth | -cray)
|
||
+ -apple | -axis)
|
||
os=
|
||
basic_machine=$1
|
||
;;
|
||
@@ -229,15 +228,14 @@
|
||
| a29k \
|
||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||
- | am33_2.0 \
|
||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||
| c4x | clipper \
|
||
| d10v | d30v | dlx | dsp16xx \
|
||
| fr30 | frv \
|
||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||
| i370 | i860 | i960 | ia64 \
|
||
- | ip2k | iq2000 \
|
||
- | m32r | m32rle | m68000 | m68k | m88k | mcore \
|
||
+ | ip2k \
|
||
+ | m32r | m68000 | m68k | m88k | mcore \
|
||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||
| mips16 \
|
||
| mips64 | mips64el \
|
||
@@ -249,7 +247,6 @@
|
||
| mipsisa32 | mipsisa32el \
|
||
| mipsisa32r2 | mipsisa32r2el \
|
||
| mipsisa64 | mipsisa64el \
|
||
- | mipsisa64r2 | mipsisa64r2el \
|
||
| mipsisa64sb1 | mipsisa64sb1el \
|
||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||
| mipstx39 | mipstx39el \
|
||
@@ -260,6 +257,7 @@
|
||
| pdp10 | pdp11 | pj | pjl \
|
||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||
| pyramid \
|
||
+ | s390 | s390x \
|
||
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||
| sh64 | sh64le \
|
||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
|
||
@@ -300,15 +298,15 @@
|
||
| avr-* \
|
||
| bs2000-* \
|
||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||
- | clipper-* | craynv-* | cydra-* \
|
||
+ | clipper-* | cydra-* \
|
||
| d10v-* | d30v-* | dlx-* \
|
||
| elxsi-* \
|
||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||
| h8300-* | h8500-* \
|
||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||
| i*86-* | i860-* | i960-* | ia64-* \
|
||
- | ip2k-* | iq2000-* \
|
||
- | m32r-* | m32rle-* \
|
||
+ | ip2k-* \
|
||
+ | m32r-* \
|
||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||
| m88110-* | m88k-* | mcore-* \
|
||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||
@@ -322,18 +320,17 @@
|
||
| mipsisa32-* | mipsisa32el-* \
|
||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||
| mipsisa64-* | mipsisa64el-* \
|
||
- | mipsisa64r2-* | mipsisa64r2el-* \
|
||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||
| mipstx39-* | mipstx39el-* \
|
||
- | mmix-* \
|
||
| msp430-* \
|
||
- | none-* | np1-* | ns16k-* | ns32k-* \
|
||
+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
||
| orion-* \
|
||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||
| pyramid-* \
|
||
| romp-* | rs6000-* \
|
||
+ | s390-* | s390x-* \
|
||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||
@@ -364,9 +361,6 @@
|
||
basic_machine=a29k-amd
|
||
os=-udi
|
||
;;
|
||
- abacus)
|
||
- basic_machine=abacus-unknown
|
||
- ;;
|
||
adobe68k)
|
||
basic_machine=m68010-adobe
|
||
os=-scout
|
||
@@ -384,9 +378,6 @@
|
||
amd64)
|
||
basic_machine=x86_64-pc
|
||
;;
|
||
- amd64-*)
|
||
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||
- ;;
|
||
amdahl)
|
||
basic_machine=580-amdahl
|
||
os=-sysv
|
||
@@ -446,27 +437,12 @@
|
||
basic_machine=j90-cray
|
||
os=-unicos
|
||
;;
|
||
- craynv)
|
||
- basic_machine=craynv-cray
|
||
- os=-unicosmp
|
||
- ;;
|
||
- cr16c)
|
||
- basic_machine=cr16c-unknown
|
||
- os=-elf
|
||
- ;;
|
||
crds | unos)
|
||
basic_machine=m68k-crds
|
||
;;
|
||
- crisv32 | crisv32-* | etraxfs*)
|
||
- basic_machine=crisv32-axis
|
||
- ;;
|
||
cris | cris-* | etrax*)
|
||
basic_machine=cris-axis
|
||
;;
|
||
- crx)
|
||
- basic_machine=crx-unknown
|
||
- os=-elf
|
||
- ;;
|
||
da30 | da30-*)
|
||
basic_machine=m68k-da30
|
||
;;
|
||
@@ -667,6 +643,10 @@
|
||
mips3*)
|
||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||
;;
|
||
+ mmix*)
|
||
+ basic_machine=mmix-knuth
|
||
+ os=-mmixware
|
||
+ ;;
|
||
monitor)
|
||
basic_machine=m68k-rom68k
|
||
os=-coff
|
||
@@ -747,6 +727,10 @@
|
||
np1)
|
||
basic_machine=np1-gould
|
||
;;
|
||
+ nv1)
|
||
+ basic_machine=nv1-cray
|
||
+ os=-unicosmp
|
||
+ ;;
|
||
nsr-tandem)
|
||
basic_machine=nsr-tandem
|
||
;;
|
||
@@ -758,10 +742,6 @@
|
||
basic_machine=or32-unknown
|
||
os=-coff
|
||
;;
|
||
- os400)
|
||
- basic_machine=powerpc-ibm
|
||
- os=-os400
|
||
- ;;
|
||
OSE68000 | ose68000)
|
||
basic_machine=m68000-ericsson
|
||
os=-ose
|
||
@@ -853,12 +833,6 @@
|
||
rtpc | rtpc-*)
|
||
basic_machine=romp-ibm
|
||
;;
|
||
- s390 | s390-*)
|
||
- basic_machine=s390-ibm
|
||
- ;;
|
||
- s390x | s390x-*)
|
||
- basic_machine=s390x-ibm
|
||
- ;;
|
||
sa29200)
|
||
basic_machine=a29k-amd
|
||
os=-udi
|
||
@@ -982,10 +956,6 @@
|
||
tower | tower-32)
|
||
basic_machine=m68k-ncr
|
||
;;
|
||
- tpf)
|
||
- basic_machine=s390x-ibm
|
||
- os=-tpf
|
||
- ;;
|
||
udi29k)
|
||
basic_machine=a29k-amd
|
||
os=-udi
|
||
@@ -1059,9 +1029,6 @@
|
||
romp)
|
||
basic_machine=romp-ibm
|
||
;;
|
||
- mmix)
|
||
- basic_machine=mmix-knuth
|
||
- ;;
|
||
rs6000)
|
||
basic_machine=rs6000-ibm
|
||
;;
|
||
@@ -1157,20 +1124,19 @@
|
||
| -aos* \
|
||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
|
||
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||
| -chorusos* | -chorusrdb* \
|
||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
|
||
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
|
||
# Remember, each alternative MUST END IN *, to match a version number.
|
||
;;
|
||
-qnx*)
|
||
@@ -1194,9 +1160,6 @@
|
||
-mac*)
|
||
os=`echo $os | sed -e 's|mac|macos|'`
|
||
;;
|
||
- -linux-dietlibc)
|
||
- os=-linux-dietlibc
|
||
- ;;
|
||
-linux*)
|
||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||
;;
|
||
@@ -1209,9 +1172,6 @@
|
||
-opened*)
|
||
os=-openedition
|
||
;;
|
||
- -os400*)
|
||
- os=-os400
|
||
- ;;
|
||
-wince*)
|
||
os=-wince
|
||
;;
|
||
@@ -1233,9 +1193,6 @@
|
||
-atheos*)
|
||
os=-atheos
|
||
;;
|
||
- -syllable*)
|
||
- os=-syllable
|
||
- ;;
|
||
-386bsd)
|
||
os=-bsd
|
||
;;
|
||
@@ -1258,9 +1215,6 @@
|
||
-sinix*)
|
||
os=-sysv4
|
||
;;
|
||
- -tpf*)
|
||
- os=-tpf
|
||
- ;;
|
||
-triton*)
|
||
os=-sysv3
|
||
;;
|
||
@@ -1328,9 +1282,9 @@
|
||
arm*-semi)
|
||
os=-aout
|
||
;;
|
||
- c4x-* | tic4x-*)
|
||
- os=-coff
|
||
- ;;
|
||
+ c4x-* | tic4x-*)
|
||
+ os=-coff
|
||
+ ;;
|
||
# This must come before the *-dec entry.
|
||
pdp10-*)
|
||
os=-tops20
|
||
@@ -1377,9 +1331,6 @@
|
||
*-ibm)
|
||
os=-aix
|
||
;;
|
||
- *-knuth)
|
||
- os=-mmixware
|
||
- ;;
|
||
*-wec)
|
||
os=-proelf
|
||
;;
|
||
@@ -1512,15 +1463,9 @@
|
||
-mvs* | -opened*)
|
||
vendor=ibm
|
||
;;
|
||
- -os400*)
|
||
- vendor=ibm
|
||
- ;;
|
||
-ptx*)
|
||
vendor=sequent
|
||
;;
|
||
- -tpf*)
|
||
- vendor=ibm
|
||
- ;;
|
||
-vxsim* | -vxworks* | -windiss*)
|
||
vendor=wrs
|
||
;;
|
||
--- tar-1.15.1/config/config.guess.xattrs 2004-12-15 09:55:00.000000000 +0100
|
||
+++ tar-1.15.1/config/config.guess 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,9 +1,9 @@
|
||
#! /bin/sh
|
||
# Attempt to guess a canonical system name.
|
||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||
-# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||
|
||
-timestamp='2004-10-25'
|
||
+timestamp='2003-06-17'
|
||
|
||
# This file is free software; you can redistribute it and/or modify it
|
||
# under the terms of the GNU General Public License as published by
|
||
@@ -53,7 +53,7 @@
|
||
GNU config.guess ($timestamp)
|
||
|
||
Originally written by Per Bothner.
|
||
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||
Free Software Foundation, Inc.
|
||
|
||
This is free software; see the source for copying conditions. There is NO
|
||
@@ -136,6 +136,13 @@
|
||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||
|
||
+## for Red Hat Linux
|
||
+if test -f /etc/redhat-release ; then
|
||
+ VENDOR=redhat ;
|
||
+else
|
||
+ VENDOR= ;
|
||
+fi
|
||
+
|
||
# Note: order is significant - the case branches are not exclusive.
|
||
|
||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||
@@ -197,21 +204,15 @@
|
||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||
echo "${machine}-${os}${release}"
|
||
exit 0 ;;
|
||
- amd64:OpenBSD:*:*)
|
||
- echo x86_64-unknown-openbsd${UNAME_RELEASE}
|
||
- exit 0 ;;
|
||
amiga:OpenBSD:*:*)
|
||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
- cats:OpenBSD:*:*)
|
||
- echo arm-unknown-openbsd${UNAME_RELEASE}
|
||
+ arc:OpenBSD:*:*)
|
||
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
hp300:OpenBSD:*:*)
|
||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
- luna88k:OpenBSD:*:*)
|
||
- echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||
- exit 0 ;;
|
||
mac68k:OpenBSD:*:*)
|
||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
@@ -227,33 +228,25 @@
|
||
mvmeppc:OpenBSD:*:*)
|
||
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
+ pmax:OpenBSD:*:*)
|
||
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||
+ exit 0 ;;
|
||
sgi:OpenBSD:*:*)
|
||
- echo mips64-unknown-openbsd${UNAME_RELEASE}
|
||
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
sun3:OpenBSD:*:*)
|
||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
+ wgrisc:OpenBSD:*:*)
|
||
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||
+ exit 0 ;;
|
||
*:OpenBSD:*:*)
|
||
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
- *:ekkoBSD:*:*)
|
||
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||
- exit 0 ;;
|
||
- macppc:MirBSD:*:*)
|
||
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
|
||
- exit 0 ;;
|
||
- *:MirBSD:*:*)
|
||
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
||
- exit 0 ;;
|
||
alpha:OSF1:*:*)
|
||
- case $UNAME_RELEASE in
|
||
- *4.0)
|
||
+ if test $UNAME_RELEASE = "V4.0"; then
|
||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||
- ;;
|
||
- *5.*)
|
||
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||
- ;;
|
||
- esac
|
||
+ fi
|
||
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||
# OSF/1 and Tru64 systems produced since 1995. I hope that
|
||
# covers most systems running today. This code pipes the CPU
|
||
@@ -291,12 +284,14 @@
|
||
"EV7.9 (21364A)")
|
||
UNAME_MACHINE="alphaev79" ;;
|
||
esac
|
||
- # A Pn.n version is a patched version.
|
||
# A Vn.n version is a released version.
|
||
# A Tn.n version is a released field test version.
|
||
# A Xn.n version is an unreleased experimental baselevel.
|
||
# 1.2 uses "1.2" for uname -r.
|
||
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||
+ exit 0 ;;
|
||
+ Alpha*:OpenVMS:*:*)
|
||
+ echo alpha-hp-vms
|
||
exit 0 ;;
|
||
Alpha\ *:Windows_NT*:*)
|
||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||
@@ -319,9 +314,6 @@
|
||
*:OS/390:*:*)
|
||
echo i370-ibm-openedition
|
||
exit 0 ;;
|
||
- *:OS400:*:*)
|
||
- echo powerpc-ibm-os400
|
||
- exit 0 ;;
|
||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||
exit 0;;
|
||
@@ -342,7 +334,7 @@
|
||
DRS?6000:unix:4.0:6*)
|
||
echo sparc-icl-nx6
|
||
exit 0 ;;
|
||
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
|
||
+ DRS?6000:UNIX_SV:4.2*:7*)
|
||
case `/usr/bin/uname -p` in
|
||
sparc) echo sparc-icl-nx7 && exit 0 ;;
|
||
esac ;;
|
||
@@ -414,9 +406,6 @@
|
||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
- m68k:machten:*:*)
|
||
- echo m68k-apple-machten${UNAME_RELEASE}
|
||
- exit 0 ;;
|
||
powerpc:machten:*:*)
|
||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
@@ -752,7 +741,7 @@
|
||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||
exit 0 ;;
|
||
*:UNICOS/mp:*:*)
|
||
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||
exit 0 ;;
|
||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||
@@ -760,11 +749,6 @@
|
||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||
exit 0 ;;
|
||
- 5000:UNIX_System_V:4.*:*)
|
||
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||
- exit 0 ;;
|
||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
@@ -774,8 +758,19 @@
|
||
*:BSD/OS:*:*)
|
||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
- *:FreeBSD:*:*)
|
||
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||
+ *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
|
||
+ # Determine whether the default compiler uses glibc.
|
||
+ eval $set_cc_for_build
|
||
+ sed 's/^ //' << EOF >$dummy.c
|
||
+ #include <features.h>
|
||
+ #if __GLIBC__ >= 2
|
||
+ LIBC=gnu
|
||
+ #else
|
||
+ LIBC=
|
||
+ #endif
|
||
+EOF
|
||
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
|
||
exit 0 ;;
|
||
i*:CYGWIN*:*)
|
||
echo ${UNAME_MACHINE}-pc-cygwin
|
||
@@ -808,13 +803,8 @@
|
||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||
exit 0 ;;
|
||
*:GNU:*:*)
|
||
- # the GNU system
|
||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||
exit 0 ;;
|
||
- *:GNU/*:*:*)
|
||
- # other systems with GNU libc and userland
|
||
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
||
- exit 0 ;;
|
||
i*86:Minix:*:*)
|
||
echo ${UNAME_MACHINE}-pc-minix
|
||
exit 0 ;;
|
||
@@ -824,17 +814,8 @@
|
||
cris:Linux:*:*)
|
||
echo cris-axis-linux-gnu
|
||
exit 0 ;;
|
||
- crisv32:Linux:*:*)
|
||
- echo crisv32-axis-linux-gnu
|
||
- exit 0 ;;
|
||
- frv:Linux:*:*)
|
||
- echo frv-unknown-linux-gnu
|
||
- exit 0 ;;
|
||
ia64:Linux:*:*)
|
||
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||
- exit 0 ;;
|
||
- m32r*:Linux:*:*)
|
||
- echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||
+ echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
|
||
exit 0 ;;
|
||
m68*:Linux:*:*)
|
||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||
@@ -878,10 +859,10 @@
|
||
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
|
||
;;
|
||
ppc:Linux:*:*)
|
||
- echo powerpc-unknown-linux-gnu
|
||
+ echo powerpc-${VENDOR:-unknown}-linux-gnu
|
||
exit 0 ;;
|
||
ppc64:Linux:*:*)
|
||
- echo powerpc64-unknown-linux-gnu
|
||
+ echo powerpc64-${VENDOR:-unknown}-linux-gnu
|
||
exit 0 ;;
|
||
alpha:Linux:*:*)
|
||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||
@@ -909,7 +890,7 @@
|
||
echo hppa64-unknown-linux-gnu
|
||
exit 0 ;;
|
||
s390:Linux:*:* | s390x:Linux:*:*)
|
||
- echo ${UNAME_MACHINE}-ibm-linux
|
||
+ echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
|
||
exit 0 ;;
|
||
sh64*:Linux:*:*)
|
||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||
@@ -921,7 +902,7 @@
|
||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||
exit 0 ;;
|
||
x86_64:Linux:*:*)
|
||
- echo x86_64-unknown-linux-gnu
|
||
+ echo x86_64-${VENDOR:-unknown}-linux-gnu
|
||
exit 0 ;;
|
||
i*86:Linux:*:*)
|
||
# The BFD linker knows what the default object file format is, so
|
||
@@ -971,12 +952,9 @@
|
||
LIBC=gnuaout
|
||
#endif
|
||
#endif
|
||
- #ifdef __dietlibc__
|
||
- LIBC=dietlibc
|
||
- #endif
|
||
EOF
|
||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||
- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
|
||
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
|
||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||
;;
|
||
i*86:DYNIX/ptx:4*:*)
|
||
@@ -1004,9 +982,6 @@
|
||
i*86:atheos:*:*)
|
||
echo ${UNAME_MACHINE}-unknown-atheos
|
||
exit 0 ;;
|
||
- i*86:syllable:*:*)
|
||
- echo ${UNAME_MACHINE}-pc-syllable
|
||
- exit 0 ;;
|
||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
@@ -1076,9 +1051,9 @@
|
||
M680?0:D-NIX:5.3:*)
|
||
echo m68k-diab-dnix
|
||
exit 0 ;;
|
||
- M68*:*:R3V[5678]*:*)
|
||
+ M68*:*:R3V[567]*:*)
|
||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
|
||
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
|
||
OS_REL=''
|
||
test -r /etc/.relid \
|
||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||
@@ -1176,10 +1151,9 @@
|
||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
*:Darwin:*:*)
|
||
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||
- case $UNAME_PROCESSOR in
|
||
+ case `uname -p` in
|
||
*86) UNAME_PROCESSOR=i686 ;;
|
||
- unknown) UNAME_PROCESSOR=powerpc ;;
|
||
+ powerpc) UNAME_PROCESSOR=powerpc ;;
|
||
esac
|
||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
@@ -1194,7 +1168,7 @@
|
||
*:QNX:*:4*)
|
||
echo i386-pc-qnx
|
||
exit 0 ;;
|
||
- NSR-?:NONSTOP_KERNEL:*:*)
|
||
+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
|
||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
*:NonStop-UX:*:*)
|
||
@@ -1238,19 +1212,6 @@
|
||
SEI:*:*:SEIUX)
|
||
echo mips-sei-seiux${UNAME_RELEASE}
|
||
exit 0 ;;
|
||
- *:DragonFly:*:*)
|
||
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||
- exit 0 ;;
|
||
- *:*VMS:*:*)
|
||
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||
- case "${UNAME_MACHINE}" in
|
||
- A*) echo alpha-dec-vms && exit 0 ;;
|
||
- I*) echo ia64-dec-vms && exit 0 ;;
|
||
- V*) echo vax-dec-vms && exit 0 ;;
|
||
- esac ;;
|
||
- *:XENIX:*:SysV)
|
||
- echo i386-pc-xenix
|
||
- exit 0 ;;
|
||
esac
|
||
|
||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||
--- tar-1.15.1/tests/Makefile.in.xattrs 2004-12-21 14:31:03.000000000 +0100
|
||
+++ tar-1.15.1/tests/Makefile.in 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,8 +1,8 @@
|
||
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||
# @configure_input@
|
||
|
||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||
-# 2003, 2004 Free Software Foundation, Inc.
|
||
+# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||
# This Makefile.in is free software; the Free Software Foundation
|
||
# gives unlimited permission to copy and/or distribute it,
|
||
# with or without modifications, as long as this notice is preserved.
|
||
@@ -21,8 +21,6 @@
|
||
|
||
# François Pinard <pinard@iro.umontreal.ca>, 1988.
|
||
# Sergey Poznyakoff <gray@mirddin.farlep.net>, 2004.
|
||
-SOURCES = $(genfile_SOURCES)
|
||
-
|
||
srcdir = @srcdir@
|
||
top_srcdir = @top_srcdir@
|
||
VPATH = @srcdir@
|
||
--- tar-1.15.1/doc/tar.texi.xattrs 2004-12-18 20:20:19.000000000 +0100
|
||
+++ tar-1.15.1/doc/tar.texi 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -7012,6 +7012,8 @@
|
||
Notice, that currently @acronym{GNU} extensions are not
|
||
allowed with this format. Following is the list of options that
|
||
cannot be used with @value{op-format-posix}:
|
||
+This is the only format that can store ACLs, SELinux context and extended
|
||
+attributes.
|
||
|
||
@itemize @bullet
|
||
@item @value{op-label}, when used with @value{op-create}.
|
||
@@ -7501,6 +7503,51 @@
|
||
|
||
@FIXME{I do not see the purpose of such an option. (Neither I. FP.)}
|
||
|
||
+@opindex acls
|
||
+@item --acls
|
||
+This option causes @command{tar} to store each file's ACLs in the archive.
|
||
+
|
||
+The @option{--acls} option has no equivalent short option name.
|
||
+
|
||
+@opindex selinux
|
||
+@item --selinux
|
||
+This option causes @command{tar} to store each file's SELinux security context
|
||
+information in the archive.
|
||
+
|
||
+The @option{--selinux} option has no equivalent short option name.
|
||
+
|
||
+@opindex xattrs
|
||
+@item --xattrs
|
||
+This option causes @command{tar} to store each file's extended attributes in
|
||
+the archive. This option also enables @option{--acls} and @option{--selinux} if they haven't been set already, due to the fact that the data for those are
|
||
+stored in special xattrs.
|
||
+
|
||
+The @option{--xattrs} option has no equivalent short option name.
|
||
+
|
||
+@opindex no-acls
|
||
+@item --no-acls
|
||
+This option causes @command{tar} not to store each file's ACLs in the archive
|
||
+and not to extract any ACL information in an archive.
|
||
+
|
||
+The @option{--acls} option has no equivalent short option name.
|
||
+
|
||
+@opindex no-selinux
|
||
+@item --no-selinux
|
||
+This option causes @command{tar} not to store each file's SELinux security
|
||
+context information in the archive and not to extract any SELinux information in
|
||
+an archive.
|
||
+
|
||
+The @option{--selinux} option has no equivalent short option name.
|
||
+
|
||
+@opindex no-xattrs
|
||
+@item --no-xattrs
|
||
+This option causes @command{tar} not to store each file's extended attributes in
|
||
+the archive and not to extract any extended attributes in an archive. This
|
||
+option also enables @option{--no-acls} and @option{--no-selinux} if
|
||
+they haven't been set already.
|
||
+
|
||
+The @option{--xattrs} option has no equivalent short option name.
|
||
+
|
||
@end table
|
||
|
||
@node Standard
|
||
--- tar-1.15.1/doc/Makefile.in.xattrs 2004-12-21 14:30:58.000000000 +0100
|
||
+++ tar-1.15.1/doc/Makefile.in 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,8 +1,8 @@
|
||
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||
# @configure_input@
|
||
|
||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||
-# 2003, 2004 Free Software Foundation, Inc.
|
||
+# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||
# This Makefile.in is free software; the Free Software Foundation
|
||
# gives unlimited permission to copy and/or distribute it,
|
||
# with or without modifications, as long as this notice is preserved.
|
||
@@ -300,9 +300,11 @@
|
||
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||
am__cwd=`pwd` && cd $(srcdir) && \
|
||
rm -rf $$backupdir && mkdir $$backupdir && \
|
||
- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||
- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||
- done; \
|
||
+ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
||
+ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||
+ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||
+ done; \
|
||
+ else :; fi && \
|
||
cd "$$am__cwd"; \
|
||
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||
-o $@ $<; \
|
||
@@ -361,10 +363,11 @@
|
||
maintainer-clean-vti:
|
||
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
|
||
.dvi.ps:
|
||
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||
$(DVIPS) -o $@ $<
|
||
|
||
uninstall-info-am:
|
||
- $(PRE_UNINSTALL)
|
||
+ @$(PRE_UNINSTALL)
|
||
@if (install-info --version && \
|
||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||
list='$(INFO_DEPS)'; \
|
||
@@ -380,7 +383,7 @@
|
||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||
(if cd "$(DESTDIR)$(infodir)"; then \
|
||
- echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
|
||
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
|
||
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
|
||
else :; fi); \
|
||
done
|
||
--- tar-1.15.1/doc/header.texi.xattrs 2004-04-04 11:53:48.000000000 +0200
|
||
+++ tar-1.15.1/doc/header.texi 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -265,6 +265,14 @@
|
||
size_t numbytes;
|
||
@};
|
||
|
||
+/* Information about xattrs for a file. */
|
||
+struct xattr_array
|
||
+ @{
|
||
+ char *xkey;
|
||
+ char *xval_ptr;
|
||
+ size_t xval_len;
|
||
+ @};
|
||
+
|
||
struct tar_stat_info
|
||
@{
|
||
char *orig_file_name; /* name of file read from the archive header */
|
||
@@ -278,6 +286,15 @@
|
||
unsigned int devmajor; /* device major number */
|
||
char *uname; /* user name of owner */
|
||
char *gname; /* group name of owner */
|
||
+
|
||
+ char *cntx_name; /* SELinux context for the current archive entry. */
|
||
+
|
||
+ char *acls_a_ptr; /* Access ACLs for the current archive entry. */
|
||
+ size_t acls_a_len; /* Access ACLs for the current archive entry. */
|
||
+
|
||
+ char *acls_d_ptr; /* Default ACLs for the current archive entry. */
|
||
+ size_t acls_d_len; /* Default ACLs for the current archive entry. */
|
||
+
|
||
struct stat stat; /* regular filesystem stat */
|
||
|
||
/* Nanosecond parts of file timestamps (if available) */
|
||
@@ -294,7 +311,10 @@
|
||
sparse_map array. Zero if the file is
|
||
not sparse */
|
||
size_t sparse_map_size; /* Size of the sparse map */
|
||
- struct sp_array *sparse_map;
|
||
+ struct sp_array *sparse_map;
|
||
+
|
||
+ size_t xattr_map_size; /* Size of the xattr map */
|
||
+ struct xattr_array *xattr_map;
|
||
@};
|
||
|
||
union block
|
||
--- tar-1.15.1/doc/stamp-vti.xattrs 2004-12-21 14:33:12.000000000 +0100
|
||
+++ tar-1.15.1/doc/stamp-vti 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,4 +1,4 @@
|
||
-@set UPDATED 18 December 2004
|
||
-@set UPDATED-MONTH December 2004
|
||
+@set UPDATED 23 September 2006
|
||
+@set UPDATED-MONTH September 2006
|
||
@set EDITION 1.15.1
|
||
@set VERSION 1.15.1
|
||
--- tar-1.15.1/doc/version.texi.xattrs 2004-12-21 14:03:18.000000000 +0100
|
||
+++ tar-1.15.1/doc/version.texi 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,4 +1,4 @@
|
||
-@set UPDATED 18 December 2004
|
||
-@set UPDATED-MONTH December 2004
|
||
+@set UPDATED 23 September 2006
|
||
+@set UPDATED-MONTH September 2006
|
||
@set EDITION 1.15.1
|
||
@set VERSION 1.15.1
|
||
--- tar-1.15.1/doc/tar.info.xattrs 2004-12-21 14:03:19.000000000 +0100
|
||
+++ tar-1.15.1/doc/tar.info 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,6 +1,6 @@
|
||
-This is tar.info, produced by makeinfo version 4.7 from tar.texi.
|
||
+This is tar.info, produced by makeinfo version 4.8 from tar.texi.
|
||
|
||
- This manual is for GNU `tar' (version 1.15.1, 18 December 2004),
|
||
+ This manual is for GNU `tar' (version 1.15.1, 23 September 2006),
|
||
which creates and extracts files from archives.
|
||
|
||
Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003,
|
||
@@ -35,7 +35,7 @@
|
||
GNU tar: an archiver tool
|
||
*************************
|
||
|
||
-This manual is for GNU `tar' (version 1.15.1, 18 December 2004), which
|
||
+This manual is for GNU `tar' (version 1.15.1, 23 September 2006), which
|
||
creates and extracts files from archives.
|
||
|
||
Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003,
|
||
@@ -6354,7 +6354,8 @@
|
||
A POSIX conformant archive will be created if `tar' was given
|
||
`--format=posix' option. Notice, that currently GNU extensions are not
|
||
allowed with this format. Following is the list of options that cannot
|
||
-be used with `--format=posix':
|
||
+be used with `--format=posix': This is the only format that can store
|
||
+ACLs, SELinux context and extended attributes.
|
||
|
||
* `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL'), when used with
|
||
`--create' (`-c').
|
||
@@ -6797,6 +6798,46 @@
|
||
is equivalent to `--same-permissions' (`--preserve-permissions',
|
||
`-p') plus `--same-order' (`--preserve-order', `-s').
|
||
|
||
+`--acls'
|
||
+ This option causes `tar' to store each file's ACLs in the archive.
|
||
+
|
||
+ The `--acls' option has no equivalent short option name.
|
||
+
|
||
+`--selinux'
|
||
+ This option causes `tar' to store each file's SELinux security
|
||
+ context information in the archive.
|
||
+
|
||
+ The `--selinux' option has no equivalent short option name.
|
||
+
|
||
+`--xattrs'
|
||
+ This option causes `tar' to store each file's extended attributes
|
||
+ in the archive. This option also enables `--acls' and `--selinux'
|
||
+ if+they haven't been set already, due to the fact that the data
|
||
+ for those are stored in special xattrs.
|
||
+
|
||
+ The `--xattrs' option has no equivalent short option name.
|
||
+
|
||
+`--no-acls'
|
||
+ This option causes `tar' not to store each file's ACLs in the
|
||
+ archive and not to extract any ACL information in an archive.
|
||
+
|
||
+ The `--acls' option has no equivalent short option name.
|
||
+
|
||
+`--no-selinux'
|
||
+ This option causes `tar' not to store each file's SELinux security
|
||
+ context information in the archive and not to extract any SELinux
|
||
+ information in an archive.
|
||
+
|
||
+ The `--selinux' option has no equivalent short option name.
|
||
+
|
||
+`--no-xattrs'
|
||
+ This option causes `tar' not to store each file's extended
|
||
+ attributes in the archive and not to extract any extended
|
||
+ attributes in an archive. This option also enables `--acls' and
|
||
+ `--selinux' if they haven't been set already.
|
||
+
|
||
+ The `--xattrs' option has no equivalent short option name.
|
||
+
|
||
|
||
|
||
File: tar.info, Node: Standard, Next: Extensions, Prev: Attributes, Up: Formats
|
||
@@ -7123,6 +7164,14 @@
|
||
size_t numbytes;
|
||
};
|
||
|
||
+ /* Information about xattrs for a file. */
|
||
+ struct xattr_array
|
||
+ {
|
||
+ char *xkey;
|
||
+ char *xval_ptr;
|
||
+ size_t xval_len;
|
||
+ };
|
||
+
|
||
struct tar_stat_info
|
||
{
|
||
char *orig_file_name; /* name of file read from the archive header */
|
||
@@ -7136,6 +7185,15 @@
|
||
unsigned int devmajor; /* device major number */
|
||
char *uname; /* user name of owner */
|
||
char *gname; /* group name of owner */
|
||
+
|
||
+ char *cntx_name; /* SELinux context for the current archive entry. */
|
||
+
|
||
+ char *acls_a_ptr; /* Access ACLs for the current archive entry. */
|
||
+ size_t acls_a_len; /* Access ACLs for the current archive entry. */
|
||
+
|
||
+ char *acls_d_ptr; /* Default ACLs for the current archive entry. */
|
||
+ size_t acls_d_len; /* Default ACLs for the current archive entry. */
|
||
+
|
||
struct stat stat; /* regular filesystem stat */
|
||
|
||
/* Nanosecond parts of file timestamps (if available) */
|
||
@@ -7153,6 +7211,9 @@
|
||
not sparse */
|
||
size_t sparse_map_size; /* Size of the sparse map */
|
||
struct sp_array *sparse_map;
|
||
+
|
||
+ size_t xattr_map_size; /* Size of the xattr map */
|
||
+ struct xattr_array *xattr_map;
|
||
};
|
||
|
||
union block
|
||
@@ -9271,6 +9332,7 @@
|
||
* -suffix: backup. (line 68)
|
||
* abbreviations for months: Calendar date items. (line 38)
|
||
* absolute file names: Remote Tape Server. (line 17)
|
||
+* acls: Attributes. (line 118)
|
||
* Adding archives to an archive: concatenate. (line 6)
|
||
* Adding files to an Archive: appending files. (line 8)
|
||
* ADMINISTRATOR: General-Purpose Variables.
|
||
@@ -9446,6 +9508,9 @@
|
||
(line 6)
|
||
* next DAY: Day of week items. (line 15)
|
||
* next in date strings: General date syntax. (line 26)
|
||
+* no-acls: Attributes. (line 137)
|
||
+* no-selinux: Attributes. (line 143)
|
||
+* no-xattrs: Attributes. (line 150)
|
||
* noon in date strings: Time of day items. (line 21)
|
||
* now in date strings: Relative items in date strings.
|
||
(line 33)
|
||
@@ -9494,6 +9559,7 @@
|
||
* Running out of space: Reading. (line 6)
|
||
* Running out of space during extraction: Scarce. (line 6)
|
||
* Salz, Rich: Authors of get_date. (line 6)
|
||
+* selinux: Attributes. (line 123)
|
||
* simple backup method: backup. (line 64)
|
||
* SIMPLE_BACKUP_SUFFIX: backup. (line 68)
|
||
* SLEEP_MESSAGE: General-Purpose Variables.
|
||
@@ -9555,6 +9621,7 @@
|
||
* Working directory, specifying: directory. (line 6)
|
||
* Writing extracted files to standard output: Writing. (line 6)
|
||
* Writing new archives: file. (line 36)
|
||
+* xattrs: Attributes. (line 129)
|
||
* XLIST: General-Purpose Variables.
|
||
(line 80)
|
||
* year in date strings: Relative items in date strings.
|
||
@@ -9565,172 +9632,172 @@
|
||
|
||
|
||
Tag Table:
|
||
-Node: Top1264
|
||
-Node: Introduction9089
|
||
-Node: Book Contents9948
|
||
-Node: Definitions12120
|
||
-Node: What tar Does13921
|
||
-Node: Naming tar Archives16686
|
||
-Node: Current status17413
|
||
-Node: Authors19471
|
||
-Node: Reports21176
|
||
-Node: Tutorial21535
|
||
-Node: assumptions22348
|
||
-Node: stylistic conventions24827
|
||
-Node: basic tar options25270
|
||
-Node: frequent operations28909
|
||
-Node: Two Frequent Options29561
|
||
-Node: file tutorial30192
|
||
-Node: verbose tutorial31275
|
||
-Node: help tutorial33009
|
||
-Node: create33363
|
||
-Node: prepare for examples34864
|
||
-Node: Creating the archive36578
|
||
-Node: create verbose39377
|
||
-Node: short create40198
|
||
-Node: create dir43095
|
||
-Node: list45701
|
||
-Node: list dir48222
|
||
-Node: extract49211
|
||
-Node: extracting archives50413
|
||
-Node: extracting files50903
|
||
-Node: extract dir53003
|
||
-Node: extracting untrusted archives55386
|
||
-Node: failing commands56265
|
||
-Node: going further57350
|
||
-Node: tar invocation57500
|
||
-Node: Synopsis58997
|
||
-Node: using tar options63416
|
||
-Node: Styles66021
|
||
-Node: Mnemonic Options67830
|
||
-Node: Short Options70030
|
||
-Ref: Short Options-Footnote-171838
|
||
-Node: Old Options72055
|
||
-Ref: Old Options-Footnote-175007
|
||
-Node: Mixing75177
|
||
-Ref: Mixing-Footnote-177543
|
||
-Node: All Options77667
|
||
-Node: Operation Summary78272
|
||
-Node: Option Summary79533
|
||
-Ref: Option Summary-Footnote-1101314
|
||
-Node: Short Option Summary101377
|
||
-Node: help103153
|
||
-Ref: help-Footnote-1106597
|
||
-Node: verbose106806
|
||
-Node: interactive111072
|
||
-Node: operations113151
|
||
-Node: Basic tar113410
|
||
-Ref: Basic tar-Footnote-1116723
|
||
-Node: Advanced tar116867
|
||
-Node: Operations117712
|
||
-Node: append119670
|
||
-Ref: append-Footnote-1122850
|
||
-Node: appending files123016
|
||
-Node: multiple124794
|
||
-Node: update127495
|
||
-Node: how to update128503
|
||
-Node: concatenate130286
|
||
-Node: delete133562
|
||
-Node: compare135552
|
||
-Node: create options137206
|
||
-Node: Ignore Failed Read137608
|
||
-Node: extract options137811
|
||
-Node: Reading138722
|
||
-Node: read full records140309
|
||
-Node: Ignore Zeros140645
|
||
-Node: Writing141656
|
||
-Node: Dealing with Old Files142124
|
||
-Node: Overwrite Old Files144550
|
||
-Node: Keep Old Files146007
|
||
-Node: Keep Newer Files146525
|
||
-Node: Unlink First146814
|
||
-Node: Recursive Unlink147218
|
||
-Node: Modification Times147766
|
||
-Node: Setting Access Permissions148544
|
||
-Node: Writing to Standard Output149168
|
||
-Node: remove files150600
|
||
-Node: Scarce150789
|
||
-Node: Starting File151037
|
||
-Node: Same Order151867
|
||
-Node: backup152703
|
||
-Node: Applications156385
|
||
-Node: looking ahead157647
|
||
-Node: Backups158472
|
||
-Node: Full Dumps161478
|
||
-Node: Inc Dumps166991
|
||
-Node: incremental and listed-incremental168276
|
||
-Node: Backup Levels172728
|
||
-Node: Backup Parameters175085
|
||
-Node: General-Purpose Variables176262
|
||
-Node: Magnetic Tape Control180941
|
||
-Node: User Hooks182273
|
||
-Node: backup-specs example183584
|
||
-Node: Scripted Backups184727
|
||
-Ref: Scripted Backups-Footnote-1187468
|
||
-Node: Scripted Restoration187850
|
||
-Node: Choosing190347
|
||
-Node: file191289
|
||
-Node: Selecting Archive Members194938
|
||
-Node: files196281
|
||
-Node: nul197885
|
||
-Node: exclude199267
|
||
-Node: controlling pattern-patching with exclude201156
|
||
-Node: problems with exclude203204
|
||
-Node: Wildcards205415
|
||
-Node: after207948
|
||
-Node: recurse211056
|
||
-Node: one213679
|
||
-Node: directory215315
|
||
-Node: absolute218390
|
||
-Node: Date input formats221535
|
||
-Node: General date syntax223851
|
||
-Node: Calendar date items226556
|
||
-Node: Time of day items228553
|
||
-Node: Time zone items230605
|
||
-Node: Day of week items231839
|
||
-Node: Relative items in date strings232828
|
||
-Node: Pure numbers in date strings235630
|
||
-Node: Seconds since the Epoch236611
|
||
-Node: Specifying time zone rules238236
|
||
-Node: Authors of get_date240600
|
||
-Node: Formats241352
|
||
-Node: Portability246068
|
||
-Node: Portable Names247368
|
||
-Node: dereference248073
|
||
-Node: old249466
|
||
-Node: ustar250543
|
||
-Node: gnu251133
|
||
-Node: posix252420
|
||
-Node: Checksumming253124
|
||
-Node: Large or Negative Values255048
|
||
-Node: Compression257034
|
||
-Node: gzip257346
|
||
-Node: sparse262234
|
||
-Ref: sparse-Footnote-1267514
|
||
-Node: Attributes267810
|
||
-Node: Standard273223
|
||
-Node: Extensions299111
|
||
-Node: cpio301663
|
||
-Node: Media306411
|
||
-Node: Device308372
|
||
-Node: Remote Tape Server313411
|
||
-Node: Common Problems and Solutions317236
|
||
-Node: Blocking317628
|
||
-Node: Format Variations324240
|
||
-Node: Blocking Factor325177
|
||
-Node: Many336857
|
||
-Node: Tape Positioning340651
|
||
-Node: mt342510
|
||
-Node: Using Multiple Tapes344350
|
||
-Node: Multi-Volume Archives349453
|
||
-Node: Tape Files353515
|
||
-Node: label354991
|
||
-Ref: label-Footnote-1358790
|
||
-Node: verify359025
|
||
-Node: Write Protection362404
|
||
-Node: Free Software Needs Free Documentation363234
|
||
-Node: Copying This Manual368203
|
||
-Node: GNU Free Documentation License368461
|
||
-Node: Index390867
|
||
+Node: Top1265
|
||
+Node: Introduction9091
|
||
+Node: Book Contents9950
|
||
+Node: Definitions12122
|
||
+Node: What tar Does13923
|
||
+Node: Naming tar Archives16688
|
||
+Node: Current status17415
|
||
+Node: Authors19473
|
||
+Node: Reports21178
|
||
+Node: Tutorial21537
|
||
+Node: assumptions22350
|
||
+Node: stylistic conventions24829
|
||
+Node: basic tar options25272
|
||
+Node: frequent operations28911
|
||
+Node: Two Frequent Options29563
|
||
+Node: file tutorial30194
|
||
+Node: verbose tutorial31277
|
||
+Node: help tutorial33011
|
||
+Node: create33365
|
||
+Node: prepare for examples34866
|
||
+Node: Creating the archive36580
|
||
+Node: create verbose39379
|
||
+Node: short create40200
|
||
+Node: create dir43097
|
||
+Node: list45703
|
||
+Node: list dir48224
|
||
+Node: extract49213
|
||
+Node: extracting archives50415
|
||
+Node: extracting files50905
|
||
+Node: extract dir53005
|
||
+Node: extracting untrusted archives55388
|
||
+Node: failing commands56267
|
||
+Node: going further57352
|
||
+Node: tar invocation57502
|
||
+Node: Synopsis58999
|
||
+Node: using tar options63418
|
||
+Node: Styles66023
|
||
+Node: Mnemonic Options67832
|
||
+Node: Short Options70032
|
||
+Ref: Short Options-Footnote-171840
|
||
+Node: Old Options72057
|
||
+Ref: Old Options-Footnote-175009
|
||
+Node: Mixing75179
|
||
+Ref: Mixing-Footnote-177545
|
||
+Node: All Options77669
|
||
+Node: Operation Summary78274
|
||
+Node: Option Summary79535
|
||
+Ref: Option Summary-Footnote-1101316
|
||
+Node: Short Option Summary101379
|
||
+Node: help103155
|
||
+Ref: help-Footnote-1106599
|
||
+Node: verbose106808
|
||
+Node: interactive111074
|
||
+Node: operations113153
|
||
+Node: Basic tar113412
|
||
+Ref: Basic tar-Footnote-1116725
|
||
+Node: Advanced tar116869
|
||
+Node: Operations117714
|
||
+Node: append119672
|
||
+Ref: append-Footnote-1122852
|
||
+Node: appending files123018
|
||
+Node: multiple124796
|
||
+Node: update127497
|
||
+Node: how to update128505
|
||
+Node: concatenate130288
|
||
+Node: delete133564
|
||
+Node: compare135554
|
||
+Node: create options137208
|
||
+Node: Ignore Failed Read137610
|
||
+Node: extract options137813
|
||
+Node: Reading138724
|
||
+Node: read full records140311
|
||
+Node: Ignore Zeros140647
|
||
+Node: Writing141658
|
||
+Node: Dealing with Old Files142126
|
||
+Node: Overwrite Old Files144552
|
||
+Node: Keep Old Files146009
|
||
+Node: Keep Newer Files146527
|
||
+Node: Unlink First146816
|
||
+Node: Recursive Unlink147220
|
||
+Node: Modification Times147768
|
||
+Node: Setting Access Permissions148546
|
||
+Node: Writing to Standard Output149170
|
||
+Node: remove files150602
|
||
+Node: Scarce150791
|
||
+Node: Starting File151039
|
||
+Node: Same Order151869
|
||
+Node: backup152705
|
||
+Node: Applications156387
|
||
+Node: looking ahead157649
|
||
+Node: Backups158474
|
||
+Node: Full Dumps161480
|
||
+Node: Inc Dumps166993
|
||
+Node: incremental and listed-incremental168278
|
||
+Node: Backup Levels172730
|
||
+Node: Backup Parameters175087
|
||
+Node: General-Purpose Variables176264
|
||
+Node: Magnetic Tape Control180943
|
||
+Node: User Hooks182275
|
||
+Node: backup-specs example183586
|
||
+Node: Scripted Backups184729
|
||
+Ref: Scripted Backups-Footnote-1187470
|
||
+Node: Scripted Restoration187852
|
||
+Node: Choosing190349
|
||
+Node: file191291
|
||
+Node: Selecting Archive Members194940
|
||
+Node: files196283
|
||
+Node: nul197887
|
||
+Node: exclude199269
|
||
+Node: controlling pattern-patching with exclude201158
|
||
+Node: problems with exclude203206
|
||
+Node: Wildcards205417
|
||
+Node: after207950
|
||
+Node: recurse211058
|
||
+Node: one213681
|
||
+Node: directory215317
|
||
+Node: absolute218392
|
||
+Node: Date input formats221537
|
||
+Node: General date syntax223853
|
||
+Node: Calendar date items226558
|
||
+Node: Time of day items228555
|
||
+Node: Time zone items230607
|
||
+Node: Day of week items231841
|
||
+Node: Relative items in date strings232830
|
||
+Node: Pure numbers in date strings235632
|
||
+Node: Seconds since the Epoch236613
|
||
+Node: Specifying time zone rules238238
|
||
+Node: Authors of get_date240602
|
||
+Node: Formats241354
|
||
+Node: Portability246070
|
||
+Node: Portable Names247370
|
||
+Node: dereference248075
|
||
+Node: old249468
|
||
+Node: ustar250545
|
||
+Node: gnu251135
|
||
+Node: posix252422
|
||
+Node: Checksumming253212
|
||
+Node: Large or Negative Values255136
|
||
+Node: Compression257122
|
||
+Node: gzip257434
|
||
+Node: sparse262322
|
||
+Ref: sparse-Footnote-1267602
|
||
+Node: Attributes267898
|
||
+Node: Standard274771
|
||
+Node: Extensions301343
|
||
+Node: cpio303895
|
||
+Node: Media308643
|
||
+Node: Device310604
|
||
+Node: Remote Tape Server315643
|
||
+Node: Common Problems and Solutions319468
|
||
+Node: Blocking319860
|
||
+Node: Format Variations326472
|
||
+Node: Blocking Factor327409
|
||
+Node: Many339089
|
||
+Node: Tape Positioning342883
|
||
+Node: mt344742
|
||
+Node: Using Multiple Tapes346582
|
||
+Node: Multi-Volume Archives351685
|
||
+Node: Tape Files355747
|
||
+Node: label357223
|
||
+Ref: label-Footnote-1361022
|
||
+Node: verify361257
|
||
+Node: Write Protection364636
|
||
+Node: Free Software Needs Free Documentation365466
|
||
+Node: Copying This Manual370435
|
||
+Node: GNU Free Documentation License370693
|
||
+Node: Index393099
|
||
|
||
End Tag Table
|
||
--- tar-1.15.1/lib/localedir.h.xattrs 2004-12-21 15:01:12.000000000 +0100
|
||
+++ tar-1.15.1/lib/localedir.h 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,4 +1,4 @@
|
||
#define LOCALEDIR "/usr/share/locale"
|
||
#ifndef DEFAULT_RMT_COMMAND
|
||
-# define DEFAULT_RMT_COMMAND "/etc/rmt"
|
||
+# define DEFAULT_RMT_COMMAND "/sbin/rmt"
|
||
#endif
|
||
--- tar-1.15.1/lib/Makefile.in.xattrs 2004-12-21 14:31:00.000000000 +0100
|
||
+++ tar-1.15.1/lib/Makefile.in 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,8 +1,8 @@
|
||
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||
# @configure_input@
|
||
|
||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||
-# 2003, 2004 Free Software Foundation, Inc.
|
||
+# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||
# This Makefile.in is free software; the Free Software Foundation
|
||
# gives unlimited permission to copy and/or distribute it,
|
||
# with or without modifications, as long as this notice is preserved.
|
||
@@ -20,8 +20,6 @@
|
||
# Free Software Foundation, Inc.
|
||
|
||
|
||
-SOURCES = $(libtar_a_SOURCES)
|
||
-
|
||
srcdir = @srcdir@
|
||
top_srcdir = @top_srcdir@
|
||
VPATH = @srcdir@
|
||
--- tar-1.15.1/rmt/Makefile.in.xattrs 2004-12-21 14:31:01.000000000 +0100
|
||
+++ tar-1.15.1/rmt/Makefile.in 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,8 +1,8 @@
|
||
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||
# @configure_input@
|
||
|
||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||
-# 2003, 2004 Free Software Foundation, Inc.
|
||
+# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||
# This Makefile.in is free software; the Free Software Foundation
|
||
# gives unlimited permission to copy and/or distribute it,
|
||
# with or without modifications, as long as this notice is preserved.
|
||
@@ -14,8 +14,6 @@
|
||
|
||
@SET_MAKE@
|
||
|
||
-SOURCES = $(rmt_SOURCES)
|
||
-
|
||
srcdir = @srcdir@
|
||
top_srcdir = @top_srcdir@
|
||
VPATH = @srcdir@
|
||
@@ -304,7 +302,8 @@
|
||
f=`echo "$$p" | \
|
||
sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||
for opt in --help --version; do \
|
||
- if "$(DESTDIR)$(rmtdir)/$$f" $$opt > c$${pid}_.out 2> c$${pid}_.err \
|
||
+ if "$(DESTDIR)$(rmtdir)/$$f" $$opt >c$${pid}_.out \
|
||
+ 2>c$${pid}_.err </dev/null \
|
||
&& test -n "`cat c$${pid}_.out`" \
|
||
&& test -z "`cat c$${pid}_.err`"; then :; \
|
||
else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
|
||
--- tar-1.15.1/src/list.c.xattrs 2006-10-04 11:52:36.000000000 +0200
|
||
+++ tar-1.15.1/src/list.c 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -563,6 +563,13 @@
|
||
stat_info->stat.st_atime = start_time;
|
||
stat_info->stat.st_ctime = start_time;
|
||
|
||
+ stat_info->acls_a_ptr = NULL;
|
||
+ stat_info->acls_a_len = 0;
|
||
+ stat_info->acls_d_ptr = NULL;
|
||
+ stat_info->acls_d_len = 0;
|
||
+ stat_info->cntx_name = NULL;
|
||
+ xheader_xattr_init(stat_info);
|
||
+
|
||
if (format == OLDGNU_FORMAT && incremental_option)
|
||
{
|
||
stat_info->stat.st_atime = TIME_FROM_HEADER (header->oldgnu_header.atime);
|
||
--- tar-1.15.1/src/extract.c.xattrs 2006-10-04 11:52:36.000000000 +0200
|
||
+++ tar-1.15.1/src/extract.c 2006-10-04 11:54:47.000000000 +0200
|
||
@@ -71,6 +71,13 @@
|
||
mode_t invert_permissions;
|
||
enum permstatus permstatus;
|
||
bool after_symlinks;
|
||
+ char *cntx_name;
|
||
+ char *acls_a_ptr;
|
||
+ size_t acls_a_len;
|
||
+ char *acls_d_ptr;
|
||
+ size_t acls_d_len;
|
||
+ size_t xattr_map_size; /* Size of the xattr map */
|
||
+ struct xattr_array *xattr_map;
|
||
char file_name[1];
|
||
};
|
||
|
||
@@ -95,6 +102,18 @@
|
||
hard-linked together. */
|
||
struct string_list *sources;
|
||
|
||
+ /* SELinux context */
|
||
+ char *cntx_name;
|
||
+
|
||
+ /* ACLs */
|
||
+ char *acls_a_ptr;
|
||
+ size_t acls_a_len;
|
||
+ char *acls_d_ptr;
|
||
+ size_t acls_d_len;
|
||
+
|
||
+ size_t xattr_map_size; /* Size of the xattr map */
|
||
+ struct xattr_array *xattr_map;
|
||
+
|
||
/* The desired target of the desired link. */
|
||
char target[1];
|
||
};
|
||
@@ -228,13 +247,13 @@
|
||
|
||
static void
|
||
set_stat (char const *file_name,
|
||
- struct stat const *stat_info,
|
||
+ struct tar_stat_info const *st,
|
||
struct stat const *cur_info,
|
||
mode_t invert_permissions, enum permstatus permstatus,
|
||
char typeflag)
|
||
{
|
||
struct utimbuf utimbuf;
|
||
-
|
||
+
|
||
if (typeflag != SYMTYPE)
|
||
{
|
||
/* We do the utime before the chmod because some versions of utime are
|
||
@@ -249,11 +268,11 @@
|
||
/* FIXME: incremental_option should set ctime too, but how? */
|
||
|
||
if (incremental_option)
|
||
- utimbuf.actime = stat_info->st_atime;
|
||
+ utimbuf.actime = st->stat.st_atime;
|
||
else
|
||
utimbuf.actime = start_time;
|
||
|
||
- utimbuf.modtime = stat_info->st_mtime;
|
||
+ utimbuf.modtime = st->stat.st_mtime;
|
||
|
||
if (utime (file_name, &utimbuf) < 0)
|
||
utime_error (file_name);
|
||
@@ -268,10 +287,14 @@
|
||
done, it is not possible anymore to change file permissions, so we
|
||
have to set permissions prior to possibly giving files away. */
|
||
|
||
- set_mode (file_name, stat_info, cur_info,
|
||
+ set_mode (file_name, &st->stat, cur_info,
|
||
invert_permissions, permstatus, typeflag);
|
||
}
|
||
|
||
+ xattrs_acls_set(st, file_name, typeflag);
|
||
+ xattrs_selinux_set(st, file_name, typeflag);
|
||
+ xattrs_xattrs_set(st, file_name, typeflag);
|
||
+
|
||
if (0 < same_owner_option && permstatus != INTERDIR_PERMSTATUS)
|
||
{
|
||
/* When lchown exists, it should be used to change the attributes of
|
||
@@ -282,22 +305,22 @@
|
||
if (typeflag == SYMTYPE)
|
||
{
|
||
#if HAVE_LCHOWN
|
||
- if (lchown (file_name, stat_info->st_uid, stat_info->st_gid) < 0)
|
||
+ if (lchown (file_name, st->stat.st_uid, st->stat.st_gid) < 0)
|
||
chown_error_details (file_name,
|
||
- stat_info->st_uid, stat_info->st_gid);
|
||
+ st->stat.st_uid, st->stat.st_gid);
|
||
#endif
|
||
}
|
||
else
|
||
{
|
||
- if (chown (file_name, stat_info->st_uid, stat_info->st_gid) < 0)
|
||
+ if (chown (file_name, st->stat.st_uid, st->stat.st_gid) < 0)
|
||
chown_error_details (file_name,
|
||
- stat_info->st_uid, stat_info->st_gid);
|
||
+ st->stat.st_uid, st->stat.st_gid);
|
||
|
||
/* On a few systems, and in particular, those allowing to give files
|
||
away, changing the owner or group destroys the suid or sgid bits.
|
||
So let's attempt setting these bits once more. */
|
||
- if (stat_info->st_mode & (S_ISUID | S_ISGID | S_ISVTX))
|
||
- set_mode (file_name, stat_info, 0,
|
||
+ if (st->stat.st_mode & (S_ISUID | S_ISGID | S_ISVTX))
|
||
+ set_mode (file_name, &st->stat, 0,
|
||
invert_permissions, permstatus, typeflag);
|
||
}
|
||
}
|
||
@@ -310,7 +333,7 @@
|
||
INVERT_PERMISSIONS bits from the file's current permissions.
|
||
PERMSTATUS specifies the status of the file's permissions. */
|
||
static void
|
||
-delay_set_stat (char const *file_name, struct stat const *stat_info,
|
||
+delay_set_stat (char const *file_name, struct tar_stat_info const *st,
|
||
mode_t invert_permissions, enum permstatus permstatus)
|
||
{
|
||
size_t file_name_len = strlen (file_name);
|
||
@@ -322,7 +345,24 @@
|
||
data->invert_permissions = invert_permissions;
|
||
data->permstatus = permstatus;
|
||
data->after_symlinks = 0;
|
||
- data->stat_info = *stat_info;
|
||
+ data->cntx_name = NULL;
|
||
+ assign_string (&data->cntx_name, st->cntx_name);
|
||
+ if (st->acls_a_ptr)
|
||
+ data->acls_a_ptr = xmemdup(st->acls_a_ptr, st->acls_a_len);
|
||
+ else
|
||
+ {
|
||
+ data->acls_a_ptr = NULL;
|
||
+ data->acls_a_len = 0;
|
||
+ }
|
||
+ if (st->acls_d_ptr)
|
||
+ data->acls_d_ptr = xmemdup(st->acls_d_ptr, st->acls_d_len);
|
||
+ else
|
||
+ {
|
||
+ data->acls_d_ptr = NULL;
|
||
+ data->acls_d_len = 0;
|
||
+ }
|
||
+ xheader_xattr_copy (st, &data->xattr_map, &data->xattr_map_size);
|
||
+ data->stat_info = st->stat;
|
||
data->next = delayed_set_stat_head;
|
||
delayed_set_stat_head = data;
|
||
}
|
||
@@ -404,7 +444,7 @@
|
||
invert_permissions is zero, because
|
||
repair_delayed_set_stat may need to update the struct. */
|
||
delay_set_stat (file_name,
|
||
- ¤t_stat_info.stat,
|
||
+ ¤t_stat_info,
|
||
invert_permissions, INTERDIR_PERMSTATUS);
|
||
|
||
print_for_mkdir (file_name, cursor - file_name, mode);
|
||
@@ -594,10 +634,27 @@
|
||
}
|
||
|
||
if (! skip_this_one)
|
||
- set_stat (data->file_name, &data->stat_info, cur_info,
|
||
- data->invert_permissions, data->permstatus, DIRTYPE);
|
||
+ {
|
||
+ struct tar_stat_info st1;
|
||
|
||
+ st1.stat = data->stat_info;
|
||
+ st1.cntx_name = data->cntx_name;
|
||
+ st1.acls_a_ptr = data->acls_a_ptr;
|
||
+ st1.acls_a_len = data->acls_a_len;
|
||
+ st1.acls_d_ptr = data->acls_d_ptr;
|
||
+ st1.acls_d_len = data->acls_d_len;
|
||
+ st1.xattr_map = data->xattr_map;
|
||
+ st1.xattr_map_size = data->xattr_map_size;
|
||
+
|
||
+ set_stat (data->file_name, &st1, cur_info,
|
||
+ data->invert_permissions, data->permstatus, DIRTYPE);
|
||
+ }
|
||
+
|
||
delayed_set_stat_head = data->next;
|
||
+ xheader_xattr_free (data->xattr_map, data->xattr_map_size);
|
||
+ free (data->cntx_name);
|
||
+ free (data->acls_a_ptr);
|
||
+ free (data->acls_d_ptr);
|
||
free (data);
|
||
}
|
||
}
|
||
@@ -800,7 +857,7 @@
|
||
undo_last_backup ();
|
||
}
|
||
|
||
- set_stat (file_name, ¤t_stat_info.stat, 0, 0,
|
||
+ set_stat (file_name, ¤t_stat_info, 0, 0,
|
||
(old_files_option == OVERWRITE_OLD_FILES
|
||
? UNKNOWN_PERMSTATUS
|
||
: ARCHIVED_PERMSTATUS),
|
||
@@ -822,7 +879,7 @@
|
||
break;
|
||
|
||
if (status == 0)
|
||
- set_stat (file_name, ¤t_stat_info.stat, 0, 0, 0, SYMTYPE);
|
||
+ set_stat (file_name, ¤t_stat_info, 0, 0, 0, SYMTYPE);
|
||
else
|
||
symlink_error (current_stat_info.link_name, file_name);
|
||
}
|
||
@@ -865,6 +922,14 @@
|
||
+ strlen (file_name) + 1);
|
||
p->sources->next = 0;
|
||
strcpy (p->sources->string, file_name);
|
||
+ p->cntx_name = NULL;
|
||
+ assign_string (&p->cntx_name, current_stat_info.cntx_name);
|
||
+ p->acls_a_ptr = NULL;
|
||
+ p->acls_a_len = 0;
|
||
+ p->acls_d_ptr = NULL;
|
||
+ p->acls_d_len = 0;
|
||
+ p->xattr_map = NULL;
|
||
+ p->xattr_map_size = 0;
|
||
strcpy (p->target, current_stat_info.link_name);
|
||
|
||
h = delayed_set_stat_head;
|
||
@@ -995,7 +1060,7 @@
|
||
undo_last_backup ();
|
||
break;
|
||
};
|
||
- set_stat (file_name, ¤t_stat_info.stat, 0, 0,
|
||
+ set_stat (file_name, ¤t_stat_info, 0, 0,
|
||
ARCHIVED_PERMSTATUS, typeflag);
|
||
break;
|
||
#endif
|
||
@@ -1011,7 +1076,7 @@
|
||
break;
|
||
|
||
if (status == 0)
|
||
- set_stat (file_name, ¤t_stat_info.stat, NULL, 0,
|
||
+ set_stat (file_name, ¤t_stat_info, NULL, 0,
|
||
ARCHIVED_PERMSTATUS, typeflag);
|
||
else
|
||
{
|
||
@@ -1090,11 +1155,11 @@
|
||
|| old_files_option == OVERWRITE_OLD_FILES)
|
||
{
|
||
if (status == 0)
|
||
- delay_set_stat (file_name, ¤t_stat_info.stat,
|
||
+ delay_set_stat (file_name, ¤t_stat_info,
|
||
MODE_RWX & (mode ^ current_stat_info.stat.st_mode),
|
||
ARCHIVED_PERMSTATUS);
|
||
else /* For an already existing directory, invert_perms must be 0 */
|
||
- delay_set_stat (file_name, ¤t_stat_info.stat,
|
||
+ delay_set_stat (file_name, ¤t_stat_info,
|
||
0,
|
||
UNKNOWN_PERMSTATUS);
|
||
}
|
||
@@ -1168,10 +1233,19 @@
|
||
symlink_error (ds->target, source);
|
||
else
|
||
{
|
||
+ struct tar_stat_info st1;
|
||
+
|
||
valid_source = source;
|
||
- st.st_uid = ds->uid;
|
||
- st.st_gid = ds->gid;
|
||
- set_stat (source, &st, 0, 0, 0, SYMTYPE);
|
||
+ st1.stat.st_uid = ds->uid;
|
||
+ st1.stat.st_gid = ds->gid;
|
||
+ st1.cntx_name = ds->cntx_name;
|
||
+ st1.acls_a_ptr = ds->acls_a_ptr;
|
||
+ st1.acls_a_len = ds->acls_a_len;
|
||
+ st1.acls_d_ptr = ds->acls_d_ptr;
|
||
+ st1.acls_d_len = ds->acls_d_len;
|
||
+ st1.xattr_map = ds->xattr_map;
|
||
+ st1.xattr_map_size = ds->xattr_map_size;
|
||
+ set_stat (source, &st1, 0, 0, 0, SYMTYPE);
|
||
}
|
||
}
|
||
}
|
||
--- tar-1.15.1/src/misc.c.xattrs 2004-09-13 10:12:05.000000000 +0200
|
||
+++ tar-1.15.1/src/misc.c 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -545,7 +545,7 @@
|
||
|
||
/* Report an error associated with the system call CALL and the
|
||
optional name NAME. */
|
||
-static void
|
||
+void
|
||
call_arg_error (char const *call, char const *name)
|
||
{
|
||
int e = errno;
|
||
@@ -563,7 +563,7 @@
|
||
|
||
/* Report a warning associated with the system call CALL and
|
||
the optional file name NAME. */
|
||
-static void
|
||
+void
|
||
call_arg_warn (char const *call, char const *name)
|
||
{
|
||
int e = errno;
|
||
--- /dev/null 2006-10-03 09:18:45.784834250 +0200
|
||
+++ tar-1.15.1/src/xattrs.h 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -0,0 +1,14 @@
|
||
+
|
||
+extern void xattrs_acls_get(struct tar_stat_info *st,
|
||
+ char const *file_name, int fd);
|
||
+extern void xattrs_selinux_get(struct tar_stat_info *st,
|
||
+ char const *file_name, int fd);
|
||
+extern void xattrs_xattrs_get(struct tar_stat_info *st,
|
||
+ char const *file_name, int fd);
|
||
+
|
||
+extern void xattrs_acls_set(struct tar_stat_info const *st,
|
||
+ char const *file_name, char typeflag);
|
||
+extern void xattrs_selinux_set(struct tar_stat_info const *st,
|
||
+ char const *file_name, char typeflag);
|
||
+extern void xattrs_xattrs_set(struct tar_stat_info const *st,
|
||
+ char const *file_name, char typeflag);
|
||
--- tar-1.15.1/src/Makefile.am.xattrs 2004-10-25 16:55:49.000000000 +0200
|
||
+++ tar-1.15.1/src/Makefile.am 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -20,7 +20,7 @@
|
||
|
||
bin_PROGRAMS = tar
|
||
|
||
-noinst_HEADERS = arith.h common.h tar.h
|
||
+noinst_HEADERS = arith.h common.h tar.h xattrs.h
|
||
tar_SOURCES = \
|
||
buffer.c\
|
||
compare.c\
|
||
@@ -37,7 +37,8 @@
|
||
system.c\
|
||
tar.c\
|
||
update.c\
|
||
- utf8.c
|
||
+ utf8.c\
|
||
+ xattrs.c
|
||
|
||
INCLUDES = -I$(top_srcdir)/lib -I../ -I../lib
|
||
|
||
@@ -45,4 +46,4 @@
|
||
|
||
LDADD = ../lib/libtar.a $(LIBINTL) $(LIBICONV)
|
||
|
||
-tar_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
|
||
+tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME)
|
||
--- /dev/null 2006-10-03 09:18:45.784834250 +0200
|
||
+++ tar-1.15.1/src/xattrs.c 2006-10-04 11:54:47.000000000 +0200
|
||
@@ -0,0 +1,402 @@
|
||
+/* Create a tar archive.
|
||
+
|
||
+ Copyright (C) 2006 Free Software Foundation, Inc.
|
||
+
|
||
+ Written by James Antill, on 2006-07-27.
|
||
+
|
||
+ This program is free software; you can redistribute it and/or modify it
|
||
+ under the terms of the GNU General Public License as published by the
|
||
+ Free Software Foundation; either version 2, or (at your option) any later
|
||
+ version.
|
||
+
|
||
+ This program is distributed in the hope that it will be useful, but
|
||
+ WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||
+ Public License for more details.
|
||
+
|
||
+ You should have received a copy of the GNU General Public License along
|
||
+ with this program; if not, write to the Free Software Foundation, Inc.,
|
||
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||
+
|
||
+#include <system.h>
|
||
+
|
||
+#include <quotearg.h>
|
||
+
|
||
+#include "common.h"
|
||
+
|
||
+
|
||
+#ifndef HAVE_SELINUX_SELINUX_H
|
||
+# undef HAVE_LIBSELINUX
|
||
+#endif
|
||
+
|
||
+#ifndef HAVE_ATTR_XATTR_H
|
||
+# undef HAVE_XATTRS
|
||
+#endif
|
||
+
|
||
+#ifndef HAVE_SYS_ACL_H
|
||
+# undef HAVE_LIBACL
|
||
+#endif
|
||
+
|
||
+#ifdef HAVE_SELINUX_SELINUX_H
|
||
+# include <selinux/selinux.h>
|
||
+#endif
|
||
+
|
||
+#ifdef HAVE_ATTR_XATTR_H
|
||
+# include <attr/xattr.h>
|
||
+#endif
|
||
+
|
||
+#ifdef HAVE_SYS_ACL_H
|
||
+# include <sys/acl.h>
|
||
+#endif
|
||
+
|
||
+
|
||
+#if 0 /* unused by xattr's atm. */
|
||
+static void xattrs__fd_get(struct tar_stat_info *st,
|
||
+ char const *file_name, int fd, const char *attr,
|
||
+ char **ret_ptr, size_t *ret_len)
|
||
+{
|
||
+#ifdef HAVE_XATTRS
|
||
+ static ssize_t asz = 1024;
|
||
+ ssize_t ret = 0;
|
||
+ static char *val = NULL;
|
||
+
|
||
+ if (!val) val = xmalloc (asz);
|
||
+
|
||
+ while (((ret = fgetxattr (fd, attr, val, asz)) == -1) &&
|
||
+ (errno == ERANGE))
|
||
+ {
|
||
+ asz <<= 1;
|
||
+ val = xrealloc (val, asz);
|
||
+ }
|
||
+
|
||
+ if (ret != -1)
|
||
+ {
|
||
+ *ret_ptr = xmemdup (val, ret);
|
||
+ *ret_len = ret;
|
||
+ }
|
||
+ else if (errno != ENOATTR)
|
||
+ call_arg_warn ("fgetxattr", file_name);
|
||
+#endif
|
||
+}
|
||
+#endif
|
||
+
|
||
+static void xattrs__acls_get_a(struct tar_stat_info *st,
|
||
+ char const *file_name, int fd,
|
||
+ char **ret_ptr, size_t *ret_len)
|
||
+{ /* "system.posix_acl_access" */
|
||
+#ifdef HAVE_LIBACL
|
||
+ char *val = NULL;
|
||
+ acl_t acl;
|
||
+
|
||
+ if (fd != -1)
|
||
+ {
|
||
+ if ((acl = acl_get_fd (fd)) == (acl_t)NULL)
|
||
+ {
|
||
+ if (errno != ENOTSUP)
|
||
+ call_arg_warn ("acl_get_fd", file_name);
|
||
+ return;
|
||
+ }
|
||
+ }
|
||
+ else if ((acl = acl_get_file (file_name, ACL_TYPE_ACCESS)) == (acl_t)NULL)
|
||
+ {
|
||
+ if (errno != ENOTSUP)
|
||
+ call_arg_warn ("acl_get_file", file_name);
|
||
+ return;
|
||
+ }
|
||
+
|
||
+
|
||
+ val = acl_to_text(acl, NULL);
|
||
+ acl_free (acl);
|
||
+
|
||
+ if (val == NULL)
|
||
+ {
|
||
+ call_arg_warn ("acl_to_text", file_name);
|
||
+ return;
|
||
+ }
|
||
+
|
||
+ *ret_ptr = xstrdup (val);
|
||
+ *ret_len = strlen (val);
|
||
+
|
||
+ acl_free (val);
|
||
+#endif
|
||
+}
|
||
+
|
||
+static void xattrs__acls_get_d(struct tar_stat_info *st,
|
||
+ char const *file_name,
|
||
+ char **ret_ptr, size_t *ret_len)
|
||
+{ /* "system.posix_acl_default" */
|
||
+#ifdef HAVE_LIBACL
|
||
+ char *val = NULL;
|
||
+ acl_t acl;
|
||
+
|
||
+ if ((acl = acl_get_file (file_name, ACL_TYPE_DEFAULT)) == (acl_t)NULL)
|
||
+ {
|
||
+ if (errno != ENOTSUP)
|
||
+ call_arg_warn ("acl_get_file", file_name);
|
||
+ return;
|
||
+ }
|
||
+
|
||
+ val = acl_to_text(acl, NULL);
|
||
+ acl_free (acl);
|
||
+
|
||
+ if (val == NULL)
|
||
+ {
|
||
+ call_arg_warn ("acl_to_text", file_name);
|
||
+ return;
|
||
+ }
|
||
+
|
||
+ *ret_ptr = xstrdup (val);
|
||
+ *ret_len = strlen (val);
|
||
+
|
||
+ acl_free (val);
|
||
+#endif
|
||
+}
|
||
+
|
||
+void xattrs_acls_get(struct tar_stat_info *st, char const *file_name, int fd)
|
||
+{
|
||
+ if (acls_option > 0)
|
||
+ {
|
||
+ xattrs__acls_get_a (st, file_name, fd,
|
||
+ &st->acls_a_ptr, &st->acls_a_len);
|
||
+ if (fd == -1) /* Hack: default is on directories only */
|
||
+ xattrs__acls_get_d (st, file_name,
|
||
+ &st->acls_d_ptr, &st->acls_d_len);
|
||
+ }
|
||
+}
|
||
+
|
||
+void xattrs_selinux_get(struct tar_stat_info *st, char const *file_name, int fd)
|
||
+{
|
||
+#ifdef HAVE_LIBSELINUX
|
||
+ if (selinux_context_option > 0)
|
||
+ if (fd == -1)
|
||
+ {
|
||
+ if (lgetfilecon (file_name, &st->cntx_name) == -1)
|
||
+ call_arg_warn ("lgetfilecon", file_name);
|
||
+ }
|
||
+ else if (fgetfilecon (fd, &st->cntx_name) == -1)
|
||
+ call_arg_warn ("fgetfilecon", file_name);
|
||
+#endif
|
||
+}
|
||
+
|
||
+void xattrs_xattrs_get(struct tar_stat_info *st, char const *file_name, int fd)
|
||
+{
|
||
+#ifdef HAVE_XATTRS
|
||
+ if (xattrs_option > 0)
|
||
+ { /* get all xattrs ... this include security.* and system.* if
|
||
+ available. We filter them here, but we have to filter them
|
||
+ in xattrs_xattrs_set() anyway.
|
||
+ */
|
||
+ static ssize_t xsz = 1024;
|
||
+ static char *xatrs = NULL;
|
||
+ ssize_t xret = -1;
|
||
+
|
||
+ if (!xatrs) xatrs = xmalloc (xsz);
|
||
+
|
||
+ while (((fd == -1) ?
|
||
+ ((xret = listxattr (file_name, xatrs, xsz)) == -1) :
|
||
+ ((xret = flistxattr (fd, xatrs, xsz)) == -1)) &&
|
||
+ (errno == ERANGE))
|
||
+ {
|
||
+ xsz <<= 1;
|
||
+ xatrs = xrealloc (xatrs, xsz);
|
||
+ }
|
||
+
|
||
+ if (xret == -1)
|
||
+ call_arg_warn ((fd == -1) ? "listxattrs" : "flistxattrs", file_name);
|
||
+ else
|
||
+ {
|
||
+ const char *attr = xatrs;
|
||
+ static ssize_t asz = 1024;
|
||
+ static char *val = NULL;
|
||
+
|
||
+ if (!val) val = xmalloc (asz);
|
||
+
|
||
+ while (xret > 0)
|
||
+ {
|
||
+ size_t len = strlen (attr);
|
||
+ ssize_t aret = 0;
|
||
+
|
||
+ if (strncmp (attr, "user.", strlen("user.")) &&
|
||
+ strncmp (attr, "root.", strlen("root.")))
|
||
+ goto next_attr; /* only store normal xattrs */
|
||
+
|
||
+ while (((fd == -1) ?
|
||
+ ((aret = getxattr (file_name, attr, val, asz)) == -1) :
|
||
+ ((aret = fgetxattr (fd, attr, val, asz)) == -1)) &&
|
||
+ (errno == ERANGE))
|
||
+ {
|
||
+ asz <<= 1;
|
||
+ val = xrealloc (val, asz);
|
||
+ }
|
||
+
|
||
+ if (aret != -1)
|
||
+ xheader_xattr_add (st, attr, val, aret);
|
||
+ else if (errno != ENOATTR)
|
||
+ call_arg_warn ("fgetxattr", file_name);
|
||
+
|
||
+ next_attr:
|
||
+ attr += len + 1;
|
||
+ xret -= len + 1;
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+#endif
|
||
+}
|
||
+
|
||
+static void xattrs__fd_set(struct tar_stat_info const *st,
|
||
+ char const *file_name, char typeflag,
|
||
+ const char *attr,
|
||
+ const char *ptr, size_t len)
|
||
+{
|
||
+#ifdef HAVE_XATTRS
|
||
+ if (ptr)
|
||
+ {
|
||
+ const char *sysname = "setxattr";
|
||
+ int ret = -1;
|
||
+
|
||
+ if (typeflag != SYMTYPE)
|
||
+ ret = setxattr (file_name, attr, ptr, len, 0);
|
||
+ else
|
||
+ {
|
||
+ sysname = "lsetxattr";
|
||
+ ret = lsetxattr (file_name, attr, ptr, len, 0);
|
||
+ }
|
||
+
|
||
+ if ((ret == -1) && (errno == EPERM))
|
||
+ call_arg_warn(sysname, file_name);
|
||
+ else if ((ret == -1) && (errno != EOPNOTSUPP))
|
||
+ call_arg_error(sysname, file_name);
|
||
+ }
|
||
+#endif
|
||
+}
|
||
+
|
||
+/* convert unix permissions into an ACL ... needed due to "default" ACLs */
|
||
+#ifdef HAVE_LIBACL
|
||
+static acl_t perms2acl(int perms)
|
||
+{
|
||
+ char val[] = "user::---,group::---,other::---";
|
||
+ /* 0123456789 123456789 123456789 123456789 */
|
||
+
|
||
+ /* user */
|
||
+ if (perms & 0400) val[ 6] = 'r';
|
||
+ if (perms & 0200) val[ 7] = 'w';
|
||
+ if (perms & 0100) val[ 8] = 'x';
|
||
+
|
||
+ /* group */
|
||
+ if (perms & 0040) val[17] = 'r';
|
||
+ if (perms & 0020) val[18] = 'w';
|
||
+ if (perms & 0010) val[19] = 'x';
|
||
+
|
||
+ /* other */
|
||
+ if (perms & 0004) val[28] = 'r';
|
||
+ if (perms & 0002) val[29] = 'w';
|
||
+ if (perms & 0001) val[30] = 'x';
|
||
+
|
||
+ return (acl_from_text (val));
|
||
+}
|
||
+#endif
|
||
+
|
||
+static void xattrs__acls_set(struct tar_stat_info const *st,
|
||
+ char const *file_name, int type,
|
||
+ const char *ptr, size_t len)
|
||
+{ /* "system.posix_acl_access" */
|
||
+#ifdef HAVE_LIBACL
|
||
+ acl_t acl;
|
||
+
|
||
+ if (ptr)
|
||
+ {
|
||
+ /* assert (strlen (ptr) == len); */
|
||
+ acl = acl_from_text (ptr);
|
||
+ acls_option = 1;
|
||
+ }
|
||
+ else if (acls_option > 0)
|
||
+ acl = perms2acl (st->stat.st_mode);
|
||
+ else
|
||
+ return; /* don't call acl functions unless we first hit an ACL, or
|
||
+ --acls was passed explicitly */
|
||
+
|
||
+ if (acl == (acl_t)NULL)
|
||
+ {
|
||
+ call_arg_warn ("acl_from_text", file_name);
|
||
+ return;
|
||
+ }
|
||
+
|
||
+ if (acl_set_file (file_name, type, acl) == -1)
|
||
+ {
|
||
+ if (errno != ENOTSUP)
|
||
+ call_arg_warn ("acl_set_file", file_name);
|
||
+ }
|
||
+ acl_free (acl);
|
||
+#endif
|
||
+}
|
||
+
|
||
+void xattrs_acls_set(struct tar_stat_info const *st,
|
||
+ char const *file_name, char typeflag)
|
||
+{
|
||
+ if ((acls_option >= 0) && (typeflag != SYMTYPE))
|
||
+ {
|
||
+#ifdef HAVE_LIBACL
|
||
+ xattrs__acls_set (st, file_name, ACL_TYPE_ACCESS,
|
||
+ st->acls_a_ptr, st->acls_a_len);
|
||
+ if (S_ISDIR (st->stat.st_mode))
|
||
+ xattrs__acls_set (st, file_name, ACL_TYPE_DEFAULT,
|
||
+ st->acls_d_ptr, st->acls_d_len);
|
||
+#endif
|
||
+ }
|
||
+}
|
||
+
|
||
+void xattrs_selinux_set(struct tar_stat_info const *st,
|
||
+ char const *file_name, char typeflag)
|
||
+{
|
||
+#ifdef HAVE_LIBSELINUX
|
||
+ if ((selinux_context_option >= 0) && st->cntx_name)
|
||
+ {
|
||
+ const char *sysname = "setfilecon";
|
||
+ int ret = -1;
|
||
+
|
||
+ if (typeflag != SYMTYPE)
|
||
+ ret = setfilecon (file_name, st->cntx_name);
|
||
+ else
|
||
+ {
|
||
+ sysname = "lsetfilecon";
|
||
+ ret = lsetfilecon (file_name, st->cntx_name);
|
||
+ }
|
||
+
|
||
+ if ((ret == -1) && (errno == EPERM))
|
||
+ call_arg_warn(sysname, file_name);
|
||
+ else if ((ret == -1) && (errno != EOPNOTSUPP))
|
||
+ call_arg_error(sysname, file_name);
|
||
+ }
|
||
+#endif
|
||
+}
|
||
+
|
||
+void xattrs_xattrs_set(struct tar_stat_info const *st,
|
||
+ char const *file_name, char typeflag)
|
||
+{
|
||
+#ifdef HAVE_XATTRS
|
||
+ if ((xattrs_option >= 0) && st->xattr_map_size)
|
||
+ {
|
||
+ size_t scan = 0;
|
||
+
|
||
+ while (scan < st->xattr_map_size)
|
||
+ {
|
||
+ char *keyword = st->xattr_map[scan].xkey;
|
||
+
|
||
+ /* assert (!memcpy (keyword, "SCHILY.xattr.", strlen("SCHILY.xattr."))); */
|
||
+ keyword += strlen("SCHILY.xattr.");
|
||
+
|
||
+ if (strncmp (keyword, "user.", strlen("user.")) &&
|
||
+ strncmp (keyword, "root.", strlen("root.")))
|
||
+ continue; /* don't try and set anything but normal xattrs */
|
||
+
|
||
+ /* should we ignore root.* EPERM errors when not root ? */
|
||
+ xattrs__fd_set (st, file_name, typeflag, keyword,
|
||
+ st->xattr_map[scan].xval_ptr,
|
||
+ st->xattr_map[scan].xval_len);
|
||
+
|
||
+ ++scan;
|
||
+ }
|
||
+ }
|
||
+#endif
|
||
+}
|
||
+
|
||
--- tar-1.15.1/src/Makefile.in.xattrs 2004-12-21 14:31:02.000000000 +0100
|
||
+++ tar-1.15.1/src/Makefile.in 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,8 +1,8 @@
|
||
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||
# @configure_input@
|
||
|
||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||
-# 2003, 2004 Free Software Foundation, Inc.
|
||
+# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||
# This Makefile.in is free software; the Free Software Foundation
|
||
# gives unlimited permission to copy and/or distribute it,
|
||
# with or without modifications, as long as this notice is preserved.
|
||
@@ -20,8 +20,6 @@
|
||
# Software Foundation, Inc.
|
||
|
||
|
||
-SOURCES = $(tar_SOURCES)
|
||
-
|
||
srcdir = @srcdir@
|
||
top_srcdir = @top_srcdir@
|
||
VPATH = @srcdir@
|
||
@@ -113,12 +111,14 @@
|
||
delete.$(OBJEXT) extract.$(OBJEXT) xheader.$(OBJEXT) \
|
||
incremen.$(OBJEXT) list.$(OBJEXT) mangle.$(OBJEXT) \
|
||
misc.$(OBJEXT) names.$(OBJEXT) sparse.$(OBJEXT) \
|
||
- system.$(OBJEXT) tar.$(OBJEXT) update.$(OBJEXT) utf8.$(OBJEXT)
|
||
+ system.$(OBJEXT) tar.$(OBJEXT) update.$(OBJEXT) utf8.$(OBJEXT) \
|
||
+ xattrs.$(OBJEXT)
|
||
tar_OBJECTS = $(am_tar_OBJECTS)
|
||
am__DEPENDENCIES_1 =
|
||
am__DEPENDENCIES_2 = ../lib/libtar.a $(am__DEPENDENCIES_1) \
|
||
$(am__DEPENDENCIES_1)
|
||
-tar_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
|
||
+tar_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
|
||
+ $(am__DEPENDENCIES_1)
|
||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||
am__depfiles_maybe = depfiles
|
||
@@ -246,7 +246,7 @@
|
||
sharedstatedir = @sharedstatedir@
|
||
sysconfdir = @sysconfdir@
|
||
target_alias = @target_alias@
|
||
-noinst_HEADERS = arith.h common.h tar.h
|
||
+noinst_HEADERS = arith.h common.h tar.h xattrs.h
|
||
tar_SOURCES = \
|
||
buffer.c\
|
||
compare.c\
|
||
@@ -263,11 +263,12 @@
|
||
system.c\
|
||
tar.c\
|
||
update.c\
|
||
- utf8.c
|
||
+ utf8.c\
|
||
+ xattrs.c
|
||
|
||
INCLUDES = -I$(top_srcdir)/lib -I../ -I../lib
|
||
LDADD = ../lib/libtar.a $(LIBINTL) $(LIBICONV)
|
||
-tar_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
|
||
+tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME)
|
||
all: all-am
|
||
|
||
.SUFFIXES:
|
||
@@ -333,7 +334,8 @@
|
||
f=`echo "$$p" | \
|
||
sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||
for opt in --help --version; do \
|
||
- if "$(DESTDIR)$(bindir)/$$f" $$opt > c$${pid}_.out 2> c$${pid}_.err \
|
||
+ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
|
||
+ 2>c$${pid}_.err </dev/null \
|
||
&& test -n "`cat c$${pid}_.out`" \
|
||
&& test -z "`cat c$${pid}_.err`"; then :; \
|
||
else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
|
||
@@ -364,6 +366,7 @@
|
||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tar.Po@am__quote@
|
||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update.Po@am__quote@
|
||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8.Po@am__quote@
|
||
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattrs.Po@am__quote@
|
||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xheader.Po@am__quote@
|
||
|
||
.c.o:
|
||
--- tar-1.15.1/src/xheader.c.xattrs 2006-10-04 11:52:36.000000000 +0200
|
||
+++ tar-1.15.1/src/xheader.c 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -414,6 +414,74 @@
|
||
global_header_count++;
|
||
}
|
||
|
||
+void xheader_xattr_init(struct tar_stat_info *st)
|
||
+{
|
||
+ st->xattr_map = NULL;
|
||
+ st->xattr_map_size = 0;
|
||
+}
|
||
+
|
||
+void xheader_xattr_free(struct xattr_array *xattr_map, size_t xattr_map_size)
|
||
+{
|
||
+ size_t scan = 0;
|
||
+
|
||
+ while (scan < xattr_map_size)
|
||
+ {
|
||
+ free (xattr_map[scan].xkey);
|
||
+ free (xattr_map[scan].xval_ptr);
|
||
+
|
||
+ ++scan;
|
||
+ }
|
||
+ free (xattr_map);
|
||
+}
|
||
+
|
||
+static void xheader_xattr__add(struct xattr_array **xattr_map,
|
||
+ size_t *xattr_map_size,
|
||
+ const char *key, const char *val, size_t len)
|
||
+{
|
||
+ size_t pos = (*xattr_map_size)++;
|
||
+
|
||
+ *xattr_map = xrealloc (*xattr_map,
|
||
+ *xattr_map_size * sizeof(struct xattr_array));
|
||
+ (*xattr_map)[pos].xkey = xstrdup (key);
|
||
+ (*xattr_map)[pos].xval_ptr = xmemdup (val, len);
|
||
+ (*xattr_map)[pos].xval_len = len;
|
||
+}
|
||
+
|
||
+void xheader_xattr_add(struct tar_stat_info *st,
|
||
+ const char *key, const char *val, size_t len)
|
||
+{
|
||
+ size_t klen = strlen (key);
|
||
+ char *xkey = xmalloc (strlen("SCHILY.xattr.") + klen + 1);
|
||
+ char *tmp = xkey;
|
||
+
|
||
+ tmp = stpcpy (tmp, "SCHILY.xattr.");
|
||
+ tmp = stpcpy (tmp, key);
|
||
+
|
||
+ xheader_xattr__add (&st->xattr_map, &st->xattr_map_size, xkey, val, len);
|
||
+
|
||
+ free (xkey);
|
||
+}
|
||
+
|
||
+void xheader_xattr_copy(const struct tar_stat_info *st,
|
||
+ struct xattr_array **xattr_map, size_t *xattr_map_size)
|
||
+{
|
||
+ size_t scan = 0;
|
||
+
|
||
+ *xattr_map = NULL;
|
||
+ *xattr_map_size = 0;
|
||
+
|
||
+ while (scan < st->xattr_map_size)
|
||
+ {
|
||
+ char *key = st->xattr_map[scan].xkey;
|
||
+ char *val = st->xattr_map[scan].xval_ptr;
|
||
+ size_t len = st->xattr_map[scan].xval_len;
|
||
+
|
||
+ xheader_xattr__add(xattr_map, xattr_map_size, key, val, len);
|
||
+
|
||
+ ++scan;
|
||
+ }
|
||
+}
|
||
+
|
||
|
||
/* General Interface */
|
||
|
||
@@ -421,9 +489,10 @@
|
||
{
|
||
char const *keyword;
|
||
void (*coder) (struct tar_stat_info const *, char const *,
|
||
- struct xheader *, void *data);
|
||
- void (*decoder) (struct tar_stat_info *, char const *);
|
||
+ struct xheader *, void const *data);
|
||
+ void (*decoder) (struct tar_stat_info *, char const *, char const *, size_t);
|
||
bool protect;
|
||
+ bool prefix;
|
||
};
|
||
|
||
/* This declaration must be extern, because ISO C99 section 6.9.2
|
||
@@ -440,8 +509,17 @@
|
||
struct xhdr_tab const *p;
|
||
|
||
for (p = xhdr_tab; p->keyword; p++)
|
||
- if (strcmp (p->keyword, keyword) == 0)
|
||
- return p;
|
||
+ if (p->prefix)
|
||
+ {
|
||
+ if (strncmp (p->keyword, keyword, strlen(p->keyword)) == 0)
|
||
+ return p;
|
||
+ }
|
||
+ else
|
||
+ {
|
||
+ if (strcmp (p->keyword, keyword) == 0)
|
||
+ return p;
|
||
+ }
|
||
+
|
||
return NULL;
|
||
}
|
||
|
||
@@ -451,7 +529,7 @@
|
||
struct xhdr_tab const *p;
|
||
|
||
for (p = xhdr_tab; p->keyword; p++)
|
||
- if (p->protect && fnmatch (pattern, p->keyword, 0) == 0)
|
||
+ if (!p->prefix && p->protect && fnmatch (pattern, p->keyword, 0) == 0)
|
||
return true;
|
||
return false;
|
||
}
|
||
@@ -462,7 +540,7 @@
|
||
struct xhdr_tab const *p;
|
||
|
||
for (p = xhdr_tab; p->keyword; p++)
|
||
- if (p->protect && strcmp (p->keyword, keyword) == 0)
|
||
+ if (!p->prefix && p->protect && strcmp (p->keyword, keyword) == 0)
|
||
return true;
|
||
return false;
|
||
}
|
||
@@ -522,7 +600,7 @@
|
||
{
|
||
struct xhdr_tab const *t = locate_handler (kp->pattern);
|
||
if (t)
|
||
- t->decoder (st, kp->value);
|
||
+ t->decoder (st, t->keyword, kp->value, strlen (kp->value));
|
||
}
|
||
}
|
||
|
||
@@ -538,7 +616,10 @@
|
||
|
||
t = locate_handler (keyword);
|
||
if (t)
|
||
- t->decoder (st, value);
|
||
+ t->decoder (st, keyword, value, strlen (value));
|
||
+ else
|
||
+ ERROR((0, 0, _("Ignoring unknown extended header keyword `%s'"),
|
||
+ keyword));
|
||
}
|
||
|
||
void
|
||
@@ -665,9 +746,10 @@
|
||
}
|
||
|
||
static void
|
||
-xheader_print (struct xheader *xhdr, char const *keyword, char const *value)
|
||
+xheader_print_n (struct xheader *xhdr, char const *keyword, char const *value,
|
||
+ size_t val_len)
|
||
{
|
||
- size_t len = strlen (keyword) + strlen (value) + 3; /* ' ' + '=' + '\n' */
|
||
+ size_t len = strlen (keyword) + val_len + 3; /* ' ' + '=' + '\n' */
|
||
size_t p, n = 0;
|
||
char nbuf[100];
|
||
|
||
@@ -683,10 +765,16 @@
|
||
obstack_1grow (xhdr->stk, ' ');
|
||
obstack_grow (xhdr->stk, keyword, strlen (keyword));
|
||
obstack_1grow (xhdr->stk, '=');
|
||
- obstack_grow (xhdr->stk, value, strlen (value));
|
||
+ obstack_grow (xhdr->stk, value, val_len);
|
||
obstack_1grow (xhdr->stk, '\n');
|
||
}
|
||
|
||
+static void
|
||
+xheader_print (struct xheader *xhdr, char const *keyword, char const *value)
|
||
+{
|
||
+ xheader_print_n (xhdr, keyword, value, strlen (value));
|
||
+}
|
||
+
|
||
void
|
||
xheader_finish (struct xheader *xhdr)
|
||
{
|
||
@@ -813,38 +901,44 @@
|
||
dummy_coder (struct tar_stat_info const *st __attribute__ ((unused)),
|
||
char const *keyword __attribute__ ((unused)),
|
||
struct xheader *xhdr __attribute__ ((unused)),
|
||
- void *data __attribute__ ((unused)))
|
||
+ const void *data __attribute__ ((unused)))
|
||
{
|
||
}
|
||
|
||
static void
|
||
dummy_decoder (struct tar_stat_info *st __attribute__ ((unused)),
|
||
- char const *arg __attribute__ ((unused)))
|
||
+ char const *keyword __attribute__ ((unused)),
|
||
+ char const *arg __attribute__ ((unused)),
|
||
+ size_t size __attribute__((unused)))
|
||
{
|
||
}
|
||
|
||
static void
|
||
atime_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data __attribute__ ((unused)))
|
||
+ struct xheader *xhdr, const void *data __attribute__ ((unused)))
|
||
{
|
||
code_time (st->stat.st_atime, st->atime_nsec, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-atime_decoder (struct tar_stat_info *st, char const *arg)
|
||
+atime_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)), char const *arg,
|
||
+ size_t size __attribute__((unused)))
|
||
{
|
||
decode_time (arg, &st->stat.st_atime, &st->atime_nsec);
|
||
}
|
||
|
||
static void
|
||
gid_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data __attribute__ ((unused)))
|
||
+ struct xheader *xhdr, const void *data __attribute__ ((unused)))
|
||
{
|
||
code_num (st->stat.st_gid, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-gid_decoder (struct tar_stat_info *st, char const *arg)
|
||
+gid_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)), char const *arg,
|
||
+ size_t size __attribute__((unused)))
|
||
{
|
||
uintmax_t u;
|
||
if (decode_num (&u, arg, TYPE_MAXIMUM (gid_t), "gid"))
|
||
@@ -853,65 +947,75 @@
|
||
|
||
static void
|
||
gname_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data __attribute__ ((unused)))
|
||
+ struct xheader *xhdr, const void *data __attribute__ ((unused)))
|
||
{
|
||
code_string (st->gname, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-gname_decoder (struct tar_stat_info *st, char const *arg)
|
||
+gname_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)), char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
decode_string (&st->gname, arg);
|
||
}
|
||
|
||
static void
|
||
linkpath_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data __attribute__ ((unused)))
|
||
+ struct xheader *xhdr, const void *data __attribute__ ((unused)))
|
||
{
|
||
code_string (st->link_name, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-linkpath_decoder (struct tar_stat_info *st, char const *arg)
|
||
+linkpath_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)), char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
decode_string (&st->link_name, arg);
|
||
}
|
||
|
||
static void
|
||
ctime_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data __attribute__ ((unused)))
|
||
+ struct xheader *xhdr, const void *data __attribute__ ((unused)))
|
||
{
|
||
code_time (st->stat.st_ctime, st->ctime_nsec, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-ctime_decoder (struct tar_stat_info *st, char const *arg)
|
||
+ctime_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)), char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
decode_time (arg, &st->stat.st_ctime, &st->ctime_nsec);
|
||
}
|
||
|
||
static void
|
||
mtime_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data __attribute__ ((unused)))
|
||
+ struct xheader *xhdr, const void *data __attribute__ ((unused)))
|
||
{
|
||
code_time (st->stat.st_mtime, st->mtime_nsec, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-mtime_decoder (struct tar_stat_info *st, char const *arg)
|
||
+mtime_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)), char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
decode_time (arg, &st->stat.st_mtime, &st->mtime_nsec);
|
||
}
|
||
|
||
static void
|
||
path_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data __attribute__ ((unused)))
|
||
+ struct xheader *xhdr, const void *data __attribute__ ((unused)))
|
||
{
|
||
code_string (st->file_name, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-path_decoder (struct tar_stat_info *st, char const *arg)
|
||
+path_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)), char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
decode_string (&st->orig_file_name, arg);
|
||
decode_string (&st->file_name, arg);
|
||
@@ -920,13 +1024,15 @@
|
||
|
||
static void
|
||
size_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data __attribute__ ((unused)))
|
||
+ struct xheader *xhdr, const void *data __attribute__ ((unused)))
|
||
{
|
||
code_num (st->stat.st_size, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-size_decoder (struct tar_stat_info *st, char const *arg)
|
||
+size_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)), char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
uintmax_t u;
|
||
if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "size"))
|
||
@@ -935,13 +1041,15 @@
|
||
|
||
static void
|
||
uid_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data __attribute__ ((unused)))
|
||
+ struct xheader *xhdr, const void *data __attribute__ ((unused)))
|
||
{
|
||
code_num (st->stat.st_uid, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-uid_decoder (struct tar_stat_info *st, char const *arg)
|
||
+uid_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)), char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
uintmax_t u;
|
||
if (decode_num (&u, arg, TYPE_MAXIMUM (uid_t), "uid"))
|
||
@@ -950,26 +1058,31 @@
|
||
|
||
static void
|
||
uname_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data __attribute__ ((unused)))
|
||
+ struct xheader *xhdr, const void *data __attribute__ ((unused)))
|
||
{
|
||
code_string (st->uname, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-uname_decoder (struct tar_stat_info *st, char const *arg)
|
||
+uname_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)), char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
decode_string (&st->uname, arg);
|
||
}
|
||
|
||
static void
|
||
sparse_size_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data)
|
||
+ struct xheader *xhdr, const void *data)
|
||
{
|
||
size_coder (st, keyword, xhdr, data);
|
||
}
|
||
|
||
static void
|
||
-sparse_size_decoder (struct tar_stat_info *st, char const *arg)
|
||
+sparse_size_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)),
|
||
+ char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
uintmax_t u;
|
||
if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.size"))
|
||
@@ -979,13 +1092,16 @@
|
||
static void
|
||
sparse_numblocks_coder (struct tar_stat_info const *st, char const *keyword,
|
||
struct xheader *xhdr,
|
||
- void *data __attribute__ ((unused)))
|
||
+ const void *data __attribute__ ((unused)))
|
||
{
|
||
code_num (st->sparse_map_avail, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-sparse_numblocks_decoder (struct tar_stat_info *st, char const *arg)
|
||
+sparse_numblocks_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)),
|
||
+ char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
uintmax_t u;
|
||
if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numblocks"))
|
||
@@ -998,14 +1114,17 @@
|
||
|
||
static void
|
||
sparse_offset_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data)
|
||
+ struct xheader *xhdr, const void *data)
|
||
{
|
||
size_t i = *(size_t*)data;
|
||
code_num (st->sparse_map[i].offset, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-sparse_offset_decoder (struct tar_stat_info *st, char const *arg)
|
||
+sparse_offset_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)),
|
||
+ char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
uintmax_t u;
|
||
if (decode_num (&u, arg, TYPE_MAXIMUM (off_t), "GNU.sparse.offset"))
|
||
@@ -1020,14 +1139,17 @@
|
||
|
||
static void
|
||
sparse_numbytes_coder (struct tar_stat_info const *st, char const *keyword,
|
||
- struct xheader *xhdr, void *data)
|
||
+ struct xheader *xhdr, const void *data)
|
||
{
|
||
size_t i = *(size_t*)data;
|
||
code_num (st->sparse_map[i].numbytes, keyword, xhdr);
|
||
}
|
||
|
||
static void
|
||
-sparse_numbytes_decoder (struct tar_stat_info *st, char const *arg)
|
||
+sparse_numbytes_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword __attribute__ ((unused)),
|
||
+ char const *arg,
|
||
+ size_t size __attribute__ ((unused)))
|
||
{
|
||
uintmax_t u;
|
||
if (decode_num (&u, arg, SIZE_MAX, "GNU.sparse.numbytes"))
|
||
@@ -1041,28 +1163,94 @@
|
||
}
|
||
}
|
||
|
||
+static void
|
||
+xattr_selinux_coder (struct tar_stat_info const *st, char const *keyword,
|
||
+ struct xheader *xhdr, void const *data)
|
||
+{
|
||
+ code_string (st->cntx_name, keyword, xhdr);
|
||
+}
|
||
+
|
||
+static void
|
||
+xattr_selinux_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword, char const *arg, size_t size)
|
||
+{
|
||
+ decode_string (&st->cntx_name, arg);
|
||
+}
|
||
+
|
||
+static void
|
||
+xattr_acls_a_coder (struct tar_stat_info const *st , char const *keyword,
|
||
+ struct xheader *xhdr, void const *data)
|
||
+{
|
||
+ xheader_print_n (xhdr, keyword, st->acls_a_ptr, st->acls_a_len);
|
||
+}
|
||
+
|
||
+static void
|
||
+xattr_acls_a_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword, char const *arg, size_t size)
|
||
+{
|
||
+ st->acls_a_ptr = xmemdup (arg, size);
|
||
+ st->acls_a_len = size;
|
||
+}
|
||
+
|
||
+static void
|
||
+xattr_acls_d_coder (struct tar_stat_info const *st , char const *keyword,
|
||
+ struct xheader *xhdr, void const *data)
|
||
+{
|
||
+ xheader_print_n (xhdr, keyword, st->acls_d_ptr, st->acls_d_len);
|
||
+}
|
||
+
|
||
+static void
|
||
+xattr_acls_d_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword, char const *arg, size_t size)
|
||
+{
|
||
+ st->acls_d_ptr = xmemdup (arg, size);
|
||
+ st->acls_d_len = size;
|
||
+}
|
||
+
|
||
+static void
|
||
+xattr_coder (struct tar_stat_info const *st , char const *keyword,
|
||
+ struct xheader *xhdr, void const *data)
|
||
+{
|
||
+ struct xattr_array *xattr_map = st->xattr_map;
|
||
+ const size_t *off = data;
|
||
+ xheader_print_n (xhdr, keyword,
|
||
+ xattr_map[*off].xval_ptr, xattr_map[*off].xval_len);
|
||
+}
|
||
+
|
||
+static void
|
||
+xattr_decoder (struct tar_stat_info *st,
|
||
+ char const *keyword, char const *arg, size_t size)
|
||
+{
|
||
+ char *xstr = NULL;
|
||
+
|
||
+ xstr = xmemdup(arg, size + 1);
|
||
+ xheader_xattr_add(st, keyword + strlen("SCHILY.xattr."), xstr, size);
|
||
+ free(xstr);
|
||
+}
|
||
+
|
||
+
|
||
struct xhdr_tab const xhdr_tab[] = {
|
||
- { "atime", atime_coder, atime_decoder, false },
|
||
- { "comment", dummy_coder, dummy_decoder, false },
|
||
- { "charset", dummy_coder, dummy_decoder, false },
|
||
- { "ctime", ctime_coder, ctime_decoder, false },
|
||
- { "gid", gid_coder, gid_decoder, false },
|
||
- { "gname", gname_coder, gname_decoder, false },
|
||
- { "linkpath", linkpath_coder, linkpath_decoder, false },
|
||
- { "mtime", mtime_coder, mtime_decoder, false },
|
||
- { "path", path_coder, path_decoder, false },
|
||
- { "size", size_coder, size_decoder, false },
|
||
- { "uid", uid_coder, uid_decoder, false },
|
||
- { "uname", uname_coder, uname_decoder, false },
|
||
+ { "atime", atime_coder, atime_decoder, false, false },
|
||
+ { "comment", dummy_coder, dummy_decoder, false, false },
|
||
+ { "charset", dummy_coder, dummy_decoder, false, false },
|
||
+ { "ctime", ctime_coder, ctime_decoder, false, false },
|
||
+ { "gid", gid_coder, gid_decoder, false, false },
|
||
+ { "gname", gname_coder, gname_decoder, false, false },
|
||
+ { "linkpath", linkpath_coder, linkpath_decoder, false, false },
|
||
+ { "mtime", mtime_coder, mtime_decoder, false, false },
|
||
+ { "path", path_coder, path_decoder, false, false },
|
||
+ { "size", size_coder, size_decoder, false, false },
|
||
+ { "uid", uid_coder, uid_decoder, false, false },
|
||
+ { "uname", uname_coder, uname_decoder, false, false },
|
||
|
||
/* Sparse file handling */
|
||
- { "GNU.sparse.size", sparse_size_coder, sparse_size_decoder, true },
|
||
+ { "GNU.sparse.size", sparse_size_coder, sparse_size_decoder, true, false },
|
||
{ "GNU.sparse.numblocks", sparse_numblocks_coder, sparse_numblocks_decoder,
|
||
- true },
|
||
+ true, false },
|
||
{ "GNU.sparse.offset", sparse_offset_coder, sparse_offset_decoder,
|
||
- true },
|
||
+ true, false },
|
||
{ "GNU.sparse.numbytes", sparse_numbytes_coder, sparse_numbytes_decoder,
|
||
- true },
|
||
+ true, false },
|
||
|
||
#if 0 /* GNU private keywords (not yet implemented) */
|
||
|
||
@@ -1086,5 +1274,21 @@
|
||
{ "GNU.volume.offset", volume_offset_coder, volume_offset_decoder, false },
|
||
#endif
|
||
|
||
+ /* SELinux, use the star format... */
|
||
+ { "SCHILY.xattr.security.selinux",
|
||
+ xattr_selinux_coder, xattr_selinux_decoder, false, false },
|
||
+
|
||
+ /* ACLs, use the star format... */
|
||
+ { "SCHILY.xattr.system.posix_acl_access",
|
||
+ xattr_acls_a_coder, xattr_acls_a_decoder, false, false },
|
||
+
|
||
+ { "SCHILY.xattr.system.posix_acl_default",
|
||
+ xattr_acls_d_coder, xattr_acls_d_decoder, false, false },
|
||
+
|
||
+ /* xattr's, use the star format note we only save the user/root varients... */
|
||
+ { "SCHILY.xattr.user", xattr_coder, xattr_decoder, false, true },
|
||
+ { "SCHILY.xattr.root", xattr_coder, xattr_decoder, false, true },
|
||
+ { "SCHILY.xattr", dummy_coder, dummy_decoder, false, true },
|
||
+
|
||
{ NULL, NULL, NULL, false }
|
||
};
|
||
--- tar-1.15.1/src/common.h.xattrs 2004-12-21 15:31:58.000000000 +0100
|
||
+++ tar-1.15.1/src/common.h 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -247,6 +247,15 @@
|
||
/* If positive, preserve permissions when extracting. */
|
||
GLOBAL int same_permissions_option;
|
||
|
||
+/* If positive, save the SELinux context. */
|
||
+GLOBAL int selinux_context_option;
|
||
+
|
||
+/* If positive, save the ACLs. */
|
||
+GLOBAL int acls_option;
|
||
+
|
||
+/* If positive, save the user and root xattrs. */
|
||
+GLOBAL int xattrs_option;
|
||
+
|
||
/* When set, strip the given number of file name components from the file name
|
||
before extracting */
|
||
GLOBAL size_t strip_name_components;
|
||
@@ -654,6 +663,9 @@
|
||
|
||
void update_archive (void);
|
||
|
||
+/* Module attrs.c. */
|
||
+#include "xattrs.h"
|
||
+
|
||
/* Module xheader.c. */
|
||
|
||
void xheader_decode (struct tar_stat_info *);
|
||
@@ -669,6 +681,12 @@
|
||
void xheader_write (char, char *, struct xheader *);
|
||
void xheader_write_global (void);
|
||
void xheader_set_option (char *string);
|
||
+void xheader_xattr_init(struct tar_stat_info *st);
|
||
+void xheader_xattr_free(struct xattr_array *vals, size_t sz);
|
||
+void xheader_xattr_copy(const struct tar_stat_info *st,
|
||
+ struct xattr_array **vals, size_t *sz);
|
||
+void xheader_xattr_add(struct tar_stat_info *st,
|
||
+ const char *key, const char *val, size_t len);
|
||
|
||
/* Module system.c */
|
||
|
||
@@ -703,3 +721,9 @@
|
||
/* Module utf8.c */
|
||
bool string_ascii_p (const char *str);
|
||
bool utf8_convert (bool to_utf, char const *input, char **output);
|
||
+
|
||
+/* backport externs ... */
|
||
+void
|
||
+call_arg_error (char const *call, char const *name);
|
||
+void
|
||
+call_arg_warn (char const *call, char const *name);
|
||
--- tar-1.15.1/src/tar.h.xattrs 2004-04-04 11:53:30.000000000 +0200
|
||
+++ tar-1.15.1/src/tar.h 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -265,6 +265,14 @@
|
||
size_t numbytes;
|
||
};
|
||
|
||
+/* Information about xattrs for a file. */
|
||
+struct xattr_array
|
||
+ {
|
||
+ char *xkey;
|
||
+ char *xval_ptr;
|
||
+ size_t xval_len;
|
||
+ };
|
||
+
|
||
struct tar_stat_info
|
||
{
|
||
char *orig_file_name; /* name of file read from the archive header */
|
||
@@ -278,6 +286,15 @@
|
||
unsigned int devmajor; /* device major number */
|
||
char *uname; /* user name of owner */
|
||
char *gname; /* group name of owner */
|
||
+
|
||
+ char *cntx_name; /* SELinux context for the current archive entry. */
|
||
+
|
||
+ char *acls_a_ptr; /* Access ACLs for the current archive entry. */
|
||
+ size_t acls_a_len; /* Access ACLs for the current archive entry. */
|
||
+
|
||
+ char *acls_d_ptr; /* Default ACLs for the current archive entry. */
|
||
+ size_t acls_d_len; /* Default ACLs for the current archive entry. */
|
||
+
|
||
struct stat stat; /* regular filesystem stat */
|
||
|
||
/* Nanosecond parts of file timestamps (if available) */
|
||
@@ -294,7 +311,10 @@
|
||
sparse_map array. Zero if the file is
|
||
not sparse */
|
||
size_t sparse_map_size; /* Size of the sparse map */
|
||
- struct sp_array *sparse_map;
|
||
+ struct sp_array *sparse_map;
|
||
+
|
||
+ size_t xattr_map_size; /* Size of the xattr map */
|
||
+ struct xattr_array *xattr_map;
|
||
};
|
||
|
||
union block
|
||
--- tar-1.15.1/src/create.c.xattrs 2006-10-04 11:52:36.000000000 +0200
|
||
+++ tar-1.15.1/src/create.c 2006-10-04 11:54:47.000000000 +0200
|
||
@@ -753,6 +753,30 @@
|
||
GNAME_TO_CHARS (st->gname, header->header.gname);
|
||
}
|
||
|
||
+ if (archive_format == POSIX_FORMAT)
|
||
+ {
|
||
+ if (acls_option > 0)
|
||
+ {
|
||
+ if (st->acls_a_ptr)
|
||
+ xheader_store ("SCHILY.xattr.system.posix_acl_access", st, NULL);
|
||
+ if (st->acls_d_ptr)
|
||
+ xheader_store ("SCHILY.xattr.system.posix_acl_default", st, NULL);
|
||
+ }
|
||
+ if ((selinux_context_option > 0) && st->cntx_name)
|
||
+ xheader_store ("SCHILY.xattr.security.selinux", st, NULL);
|
||
+ if (xattrs_option > 0)
|
||
+ {
|
||
+ size_t scan_xattr = 0;
|
||
+ struct xattr_array *xattr_map = st->xattr_map;
|
||
+
|
||
+ while (scan_xattr < st->xattr_map_size)
|
||
+ {
|
||
+ xheader_store (xattr_map[scan_xattr].xkey, st, &scan_xattr);
|
||
+ ++scan_xattr;
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+
|
||
return header;
|
||
}
|
||
|
||
@@ -980,6 +1004,10 @@
|
||
off_t block_ordinal = current_block_ordinal ();
|
||
st->stat.st_size = 0; /* force 0 size on dir */
|
||
|
||
+ xattrs_acls_get(st, st->orig_file_name, -1);
|
||
+ xattrs_selinux_get(st, st->orig_file_name, -1);
|
||
+ xattrs_xattrs_get(st, st->orig_file_name, -1);
|
||
+
|
||
blk = start_header (st);
|
||
if (!blk)
|
||
return;
|
||
@@ -1440,8 +1468,13 @@
|
||
}
|
||
}
|
||
else
|
||
- fd = -1;
|
||
+ fd = -1;
|
||
|
||
+ /* zero length files mean dumpable == no, *sigh* */
|
||
+ xattrs_acls_get(st, p, fd);
|
||
+ xattrs_selinux_get(st, p, fd);
|
||
+ xattrs_xattrs_get(st, p, fd);
|
||
+
|
||
if (fd != -1 && sparse_option && sparse_file_p (st))
|
||
{
|
||
status = sparse_dump_file (fd, st);
|
||
@@ -1500,6 +1533,7 @@
|
||
|
||
block_ordinal = current_block_ordinal ();
|
||
st->stat.st_size = 0; /* force 0 size on symlink */
|
||
+ xattrs_selinux_get(st, p, -1);
|
||
header = start_header (st);
|
||
if (!header)
|
||
return;
|
||
--- tar-1.15.1/src/tar.c.xattrs 2006-10-04 11:52:36.000000000 +0200
|
||
+++ tar-1.15.1/src/tar.c 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -180,7 +180,8 @@
|
||
|
||
enum
|
||
{
|
||
- ANCHORED_OPTION = CHAR_MAX + 1,
|
||
+ ACLS_OPTION = CHAR_MAX + 1,
|
||
+ ANCHORED_OPTION,
|
||
ATIME_PRESERVE_OPTION,
|
||
BACKUP_OPTION,
|
||
CHECKPOINT_OPTION,
|
||
@@ -197,14 +198,17 @@
|
||
LICENSE_OPTION,
|
||
MODE_OPTION,
|
||
NEWER_MTIME_OPTION,
|
||
+ NO_ACLS_OPTION,
|
||
NO_ANCHORED_OPTION,
|
||
NO_IGNORE_CASE_OPTION,
|
||
NO_OVERWRITE_DIR_OPTION,
|
||
NO_RECURSION_OPTION,
|
||
NO_SAME_OWNER_OPTION,
|
||
NO_SAME_PERMISSIONS_OPTION,
|
||
+ NO_SELINUX_CONTEXT_OPTION,
|
||
NO_WILDCARDS_OPTION,
|
||
NO_WILDCARDS_MATCH_SLASH_OPTION,
|
||
+ NO_XATTR_OPTION,
|
||
NULL_OPTION,
|
||
NUMERIC_OWNER_OPTION,
|
||
OCCURRENCE_OPTION,
|
||
@@ -222,6 +226,7 @@
|
||
RMT_COMMAND_OPTION,
|
||
RSH_COMMAND_OPTION,
|
||
SAME_OWNER_OPTION,
|
||
+ SELINUX_CONTEXT_OPTION,
|
||
SHOW_DEFAULTS_OPTION,
|
||
SHOW_OMITTED_DIRS_OPTION,
|
||
STRIP_COMPONENTS_OPTION,
|
||
@@ -233,7 +238,8 @@
|
||
VERSION_OPTION,
|
||
VOLNO_FILE_OPTION,
|
||
WILDCARDS_OPTION,
|
||
- WILDCARDS_MATCH_SLASH_OPTION
|
||
+ WILDCARDS_MATCH_SLASH_OPTION,
|
||
+ XATTR_OPTION
|
||
};
|
||
|
||
const char *argp_program_version = "tar (" PACKAGE_NAME ") " VERSION;
|
||
@@ -326,6 +332,10 @@
|
||
{NULL, 0, NULL, 0,
|
||
N_("Handling of file attributes:"), 30 },
|
||
|
||
+ {"acls", ACLS_OPTION, 0, 0,
|
||
+ N_("Save the ACLs to the archive"), 31 },
|
||
+ {"no-acls", NO_ACLS_OPTION, 0, 0,
|
||
+ N_("Don't extract the ACLs from the archive"), 31 },
|
||
{"owner", OWNER_OPTION, N_("NAME"), 0,
|
||
N_("force NAME as owner for added files"), 31 },
|
||
{"group", GROUP_OPTION, N_("NAME"), 0,
|
||
@@ -350,6 +360,14 @@
|
||
{"preserve-order", 's', 0, 0,
|
||
N_("sort names to extract to match archive"), 31 },
|
||
{"same-order", 0, 0, OPTION_ALIAS, NULL, 31 },
|
||
+ {"selinux", SELINUX_CONTEXT_OPTION, 0, 0,
|
||
+ N_("Save the SELinux context to the archive"), 31 },
|
||
+ {"no-selinux", NO_SELINUX_CONTEXT_OPTION, 0, 0,
|
||
+ N_("Don't extract the SELinux context from the archive"), 31 },
|
||
+ {"xattrs", XATTR_OPTION, 0, 0,
|
||
+ N_("Save the user/root xattrs to the archive"), 31 },
|
||
+ {"no-xattrs", NO_XATTR_OPTION, 0, 0,
|
||
+ N_("Don't extract the user/root xattrs from the archive"), 31 },
|
||
{"preserve", PRESERVE_OPTION, 0, 0,
|
||
N_("same as both -p and -s"), 31 },
|
||
|
||
@@ -1157,6 +1175,37 @@
|
||
same_permissions_option = -1;
|
||
break;
|
||
|
||
+ case ACLS_OPTION:
|
||
+ set_archive_format ("posix");
|
||
+ acls_option = 1;
|
||
+ break;
|
||
+
|
||
+ case NO_ACLS_OPTION:
|
||
+ acls_option = -1;
|
||
+ break;
|
||
+
|
||
+ case SELINUX_CONTEXT_OPTION:
|
||
+ set_archive_format ("posix");
|
||
+ selinux_context_option = 1;
|
||
+ break;
|
||
+
|
||
+ case NO_SELINUX_CONTEXT_OPTION:
|
||
+ selinux_context_option = -1;
|
||
+ break;
|
||
+
|
||
+ case XATTR_OPTION:
|
||
+ set_archive_format ("posix");
|
||
+ if (!acls_option) acls_option = 1;
|
||
+ if (!selinux_context_option) selinux_context_option = 1;
|
||
+ xattrs_option = 1;
|
||
+ break;
|
||
+
|
||
+ case NO_XATTR_OPTION:
|
||
+ if (!acls_option) acls_option = -1;
|
||
+ if (!selinux_context_option) selinux_context_option = -1;
|
||
+ xattrs_option = -1;
|
||
+ break;
|
||
+
|
||
case RECURSION_OPTION:
|
||
recursion_option = FNM_LEADING_DIR;
|
||
break;
|
||
@@ -1545,6 +1594,29 @@
|
||
|| subcommand_option != LIST_SUBCOMMAND))
|
||
USAGE_ERROR ((0, 0, _("--pax-option can be used only on POSIX archives")));
|
||
|
||
+ /* star create's non-POSIX typed archives with xattr support, so allow the
|
||
+ extra headers */
|
||
+ if ((acls_option > 0)
|
||
+ && archive_format != POSIX_FORMAT
|
||
+ && (subcommand_option != EXTRACT_SUBCOMMAND
|
||
+ || subcommand_option != DIFF_SUBCOMMAND
|
||
+ || subcommand_option != LIST_SUBCOMMAND))
|
||
+ USAGE_ERROR ((0, 0, _("--acls can be used only on POSIX archives")));
|
||
+
|
||
+ if ((selinux_context_option > 0)
|
||
+ && archive_format != POSIX_FORMAT
|
||
+ && (subcommand_option != EXTRACT_SUBCOMMAND
|
||
+ || subcommand_option != DIFF_SUBCOMMAND
|
||
+ || subcommand_option != LIST_SUBCOMMAND))
|
||
+ USAGE_ERROR ((0, 0, _("--selinux can be used only on POSIX archives")));
|
||
+
|
||
+ if ((xattrs_option > 0)
|
||
+ && archive_format != POSIX_FORMAT
|
||
+ && (subcommand_option != EXTRACT_SUBCOMMAND
|
||
+ || subcommand_option != DIFF_SUBCOMMAND
|
||
+ || subcommand_option != LIST_SUBCOMMAND))
|
||
+ USAGE_ERROR ((0, 0, _("--xattrs can be used only on POSIX archives")));
|
||
+
|
||
/* If ready to unlink hierarchies, so we are for simpler files. */
|
||
if (recursive_unlink_option)
|
||
old_files_option = UNLINK_FIRST_OLD_FILES;
|
||
@@ -1729,11 +1801,15 @@
|
||
void
|
||
tar_stat_destroy (struct tar_stat_info *st)
|
||
{
|
||
+ xheader_xattr_free (st->xattr_map, st->xattr_map_size);
|
||
free (st->orig_file_name);
|
||
free (st->file_name);
|
||
free (st->link_name);
|
||
free (st->uname);
|
||
free (st->gname);
|
||
+ free (st->cntx_name);
|
||
+ free (st->acls_a_ptr);
|
||
+ free (st->acls_d_ptr);
|
||
free (st->sparse_map);
|
||
memset (st, 0, sizeof (*st));
|
||
}
|
||
--- tar-1.15.1/scripts/Makefile.in.xattrs 2004-12-21 14:31:01.000000000 +0100
|
||
+++ tar-1.15.1/scripts/Makefile.in 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,8 +1,8 @@
|
||
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||
# @configure_input@
|
||
|
||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||
-# 2003, 2004 Free Software Foundation, Inc.
|
||
+# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||
# This Makefile.in is free software; the Free Software Foundation
|
||
# gives unlimited permission to copy and/or distribute it,
|
||
# with or without modifications, as long as this notice is preserved.
|
||
@@ -299,7 +299,8 @@
|
||
esac; \
|
||
f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
|
||
for opt in --help --version; do \
|
||
- if "$(DESTDIR)$(libexecdir)/$$f" $$opt > c$${pid}_.out 2> c$${pid}_.err \
|
||
+ if "$(DESTDIR)$(libexecdir)/$$f" $$opt >c$${pid}_.out \
|
||
+ 2>c$${pid}_.err </dev/null \
|
||
&& test -n "`cat c$${pid}_.out`" \
|
||
&& test -z "`cat c$${pid}_.err`"; then :; \
|
||
else echo "$$f does not support $$opt" 1>&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 </dev/null \
|
||
&& test -n "`cat c$${pid}_.out`" \
|
||
&& test -z "`cat c$${pid}_.err`"; then :; \
|
||
else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
|
||
--- tar-1.15.1/config.hin.xattrs 2004-12-21 14:33:11.000000000 +0100
|
||
+++ tar-1.15.1/config.hin 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -76,6 +76,9 @@
|
||
includes <alloca.h> only if HAVE_ALLOCA_H is defined. */
|
||
#undef HAVE_ALLOCA_H
|
||
|
||
+/* Define to 1 if you have the <attr/xattr.h> header file. */
|
||
+#undef HAVE_ATTR_XATTR_H
|
||
+
|
||
/* Define to 1 if you have the `btowc' function. */
|
||
#undef HAVE_BTOWC
|
||
|
||
@@ -222,9 +225,18 @@
|
||
/* Define to 1 if you have the <features.h> header file. */
|
||
#undef HAVE_FEATURES_H
|
||
|
||
+/* Define to 1 if you have the `fgetxattr' function. */
|
||
+#undef HAVE_FGETXATTR
|
||
+
|
||
+/* Define to 1 if you have the `flistxattr' function. */
|
||
+#undef HAVE_FLISTXATTR
|
||
+
|
||
/* Define to 1 if you have the `flockfile' function. */
|
||
#undef HAVE_FLOCKFILE
|
||
|
||
+/* Define to 1 if you have the `fsetxattr' function. */
|
||
+#undef HAVE_FSETXATTR
|
||
+
|
||
/* Define to 1 if you have the `fsync' function. */
|
||
#undef HAVE_FSYNC
|
||
|
||
@@ -252,6 +264,9 @@
|
||
/* Define to 1 if you have the `gettimeofday' function. */
|
||
#undef HAVE_GETTIMEOFDAY
|
||
|
||
+/* Define to 1 if you have the `getxattr' function. */
|
||
+#undef HAVE_GETXATTR
|
||
+
|
||
/* Define if you have the iconv() function. */
|
||
#undef HAVE_ICONV
|
||
|
||
@@ -280,12 +295,27 @@
|
||
/* Define to 1 if you have the `lchown' function. */
|
||
#undef HAVE_LCHOWN
|
||
|
||
+/* Define to 1 if you have the `lgetxattr' function. */
|
||
+#undef HAVE_LGETXATTR
|
||
+
|
||
+/* Define to 1 if you have the `acl' library (-lacl). */
|
||
+#undef HAVE_LIBACL
|
||
+
|
||
+/* Define to 1 if you have the `selinux' library (-lselinux). */
|
||
+#undef HAVE_LIBSELINUX
|
||
+
|
||
/* Define to 1 if you have the <linewrap.h> header file. */
|
||
#undef HAVE_LINEWRAP_H
|
||
|
||
/* Define to 1 if you have the <linux/fd.h> header file. */
|
||
#undef HAVE_LINUX_FD_H
|
||
|
||
+/* Define to 1 if you have the `listxattr' function. */
|
||
+#undef HAVE_LISTXATTR
|
||
+
|
||
+/* Define to 1 if you have the `llistxattr' function. */
|
||
+#undef HAVE_LLISTXATTR
|
||
+
|
||
/* Define to 1 if you have the <locale.h> header file. */
|
||
#undef HAVE_LOCALE_H
|
||
|
||
@@ -298,6 +328,9 @@
|
||
/* Define if you have the 'long long' type. */
|
||
#undef HAVE_LONG_LONG
|
||
|
||
+/* Define to 1 if you have the `lsetxattr' function. */
|
||
+#undef HAVE_LSETXATTR
|
||
+
|
||
/* Define to 1 if you have the `lstat' function. */
|
||
#undef HAVE_LSTAT
|
||
|
||
@@ -358,12 +391,18 @@
|
||
/* Define to 1 if you have the <search.h> header file. */
|
||
#undef HAVE_SEARCH_H
|
||
|
||
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
|
||
+#undef HAVE_SELINUX_SELINUX_H
|
||
+
|
||
/* Define to 1 if you have the `setenv' function. */
|
||
#undef HAVE_SETENV
|
||
|
||
/* Define to 1 if you have the `setlocale' function. */
|
||
#undef HAVE_SETLOCALE
|
||
|
||
+/* Define to 1 if you have the `setxattr' function. */
|
||
+#undef HAVE_SETXATTR
|
||
+
|
||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||
#undef HAVE_SGTTY_H
|
||
|
||
@@ -473,6 +512,9 @@
|
||
/* Define to 1 if you have the <sysexits.h> header file. */
|
||
#undef HAVE_SYSEXITS_H
|
||
|
||
+/* Define to 1 if you have the <sys/acl.h> header file. */
|
||
+#undef HAVE_SYS_ACL_H
|
||
+
|
||
/* Define to 1 if you have the <sys/buf.h> header file. */
|
||
#undef HAVE_SYS_BUF_H
|
||
|
||
@@ -580,6 +622,9 @@
|
||
/* Define to 1 if you have the `wmempcpy' function. */
|
||
#undef HAVE_WMEMPCPY
|
||
|
||
+/* Define if we have a working extended attributes */
|
||
+#undef HAVE_XATTRS
|
||
+
|
||
/* Define to 1 if the system has the type `_Bool'. */
|
||
#undef HAVE__BOOL
|
||
|
||
--- tar-1.15.1/configure.ac.xattrs 2004-12-21 14:29:02.000000000 +0100
|
||
+++ tar-1.15.1/configure.ac 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -40,6 +40,9 @@
|
||
sys/inet.h sys/io/trioctl.h \
|
||
sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \
|
||
unistd.h locale.h)
|
||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||
+AC_CHECK_HEADERS(attr/xattr.h)
|
||
+AC_CHECK_HEADERS(sys/acl.h)
|
||
|
||
AC_CHECK_HEADERS([sys/buf.h], [], [],
|
||
[#if HAVE_SYS_PARAM_H
|
||
@@ -110,6 +113,12 @@
|
||
LIBS=$tar_save_LIBS
|
||
|
||
AC_CHECK_FUNCS(fsync lstat mkfifo readlink strerror symlink setlocale utimes)
|
||
+AC_CHECK_FUNCS(getxattr fgetxattr lgetxattr \
|
||
+ setxattr fsetxattr lsetxattr \
|
||
+ listxattr flistxattr llistxattr,
|
||
+ AC_DEFINE(HAVE_XATTRS,,[Define if we have a working extended attributes]),)
|
||
+AC_CHECK_LIB(selinux, getfilecon)
|
||
+AC_CHECK_LIB(acl, acl_get_fd)
|
||
AC_CHECK_DECLS([getgrgid],,, [#include <grp.h>])
|
||
AC_CHECK_DECLS([getpwuid],,, [#include <pwd.h>])
|
||
AC_CHECK_DECLS([time],,, [#include <time.h>])
|
||
--- tar-1.15.1/configure.xattrs 2006-10-04 11:52:36.000000000 +0200
|
||
+++ tar-1.15.1/configure 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -5317,6 +5317,456 @@
|
||
done
|
||
|
||
|
||
+for ac_header in selinux/selinux.h
|
||
+do
|
||
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
+fi
|
||
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||
+else
|
||
+ # Is the header compilable?
|
||
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
|
||
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
|
||
+cat >conftest.$ac_ext <<_ACEOF
|
||
+/* confdefs.h. */
|
||
+_ACEOF
|
||
+cat confdefs.h >>conftest.$ac_ext
|
||
+cat >>conftest.$ac_ext <<_ACEOF
|
||
+/* end confdefs.h. */
|
||
+$ac_includes_default
|
||
+#include <$ac_header>
|
||
+_ACEOF
|
||
+rm -f conftest.$ac_objext
|
||
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||
+ (eval $ac_compile) 2>conftest.er1
|
||
+ ac_status=$?
|
||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||
+ rm -f conftest.er1
|
||
+ cat conftest.err >&5
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); } &&
|
||
+ { ac_try='test -z "$ac_c_werror_flag"
|
||
+ || test ! -s conftest.err'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; } &&
|
||
+ { ac_try='test -s conftest.$ac_objext'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; }; then
|
||
+ ac_header_compiler=yes
|
||
+else
|
||
+ echo "$as_me: failed program was:" >&5
|
||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||
+
|
||
+ac_header_compiler=no
|
||
+fi
|
||
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||
+echo "${ECHO_T}$ac_header_compiler" >&6
|
||
+
|
||
+# Is the header present?
|
||
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
|
||
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
|
||
+cat >conftest.$ac_ext <<_ACEOF
|
||
+/* confdefs.h. */
|
||
+_ACEOF
|
||
+cat confdefs.h >>conftest.$ac_ext
|
||
+cat >>conftest.$ac_ext <<_ACEOF
|
||
+/* end confdefs.h. */
|
||
+#include <$ac_header>
|
||
+_ACEOF
|
||
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||
+ ac_status=$?
|
||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||
+ rm -f conftest.er1
|
||
+ cat conftest.err >&5
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); } >/dev/null; then
|
||
+ if test -s conftest.err; then
|
||
+ ac_cpp_err=$ac_c_preproc_warn_flag
|
||
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||
+ else
|
||
+ ac_cpp_err=
|
||
+ fi
|
||
+else
|
||
+ ac_cpp_err=yes
|
||
+fi
|
||
+if test -z "$ac_cpp_err"; then
|
||
+ ac_header_preproc=yes
|
||
+else
|
||
+ echo "$as_me: failed program was:" >&5
|
||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||
+
|
||
+ ac_header_preproc=no
|
||
+fi
|
||
+rm -f conftest.err conftest.$ac_ext
|
||
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||
+echo "${ECHO_T}$ac_header_preproc" >&6
|
||
+
|
||
+# So? What about this header?
|
||
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
||
+ yes:no: )
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
|
||
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
|
||
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
|
||
+ ac_header_preproc=yes
|
||
+ ;;
|
||
+ no:yes:* )
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
|
||
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
|
||
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
|
||
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
|
||
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
|
||
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
|
||
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
|
||
+ (
|
||
+ cat <<\_ASBOX
|
||
+## ------------------------------ ##
|
||
+## Report this to bug-tar@gnu.org ##
|
||
+## ------------------------------ ##
|
||
+_ASBOX
|
||
+ ) |
|
||
+ sed "s/^/$as_me: WARNING: /" >&2
|
||
+ ;;
|
||
+esac
|
||
+echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
+else
|
||
+ eval "$as_ac_Header=\$ac_header_preproc"
|
||
+fi
|
||
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||
+
|
||
+fi
|
||
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
|
||
+ cat >>confdefs.h <<_ACEOF
|
||
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||
+_ACEOF
|
||
+
|
||
+fi
|
||
+
|
||
+done
|
||
+
|
||
+
|
||
+for ac_header in attr/xattr.h
|
||
+do
|
||
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
+fi
|
||
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||
+else
|
||
+ # Is the header compilable?
|
||
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
|
||
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
|
||
+cat >conftest.$ac_ext <<_ACEOF
|
||
+/* confdefs.h. */
|
||
+_ACEOF
|
||
+cat confdefs.h >>conftest.$ac_ext
|
||
+cat >>conftest.$ac_ext <<_ACEOF
|
||
+/* end confdefs.h. */
|
||
+$ac_includes_default
|
||
+#include <$ac_header>
|
||
+_ACEOF
|
||
+rm -f conftest.$ac_objext
|
||
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||
+ (eval $ac_compile) 2>conftest.er1
|
||
+ ac_status=$?
|
||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||
+ rm -f conftest.er1
|
||
+ cat conftest.err >&5
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); } &&
|
||
+ { ac_try='test -z "$ac_c_werror_flag"
|
||
+ || test ! -s conftest.err'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; } &&
|
||
+ { ac_try='test -s conftest.$ac_objext'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; }; then
|
||
+ ac_header_compiler=yes
|
||
+else
|
||
+ echo "$as_me: failed program was:" >&5
|
||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||
+
|
||
+ac_header_compiler=no
|
||
+fi
|
||
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||
+echo "${ECHO_T}$ac_header_compiler" >&6
|
||
+
|
||
+# Is the header present?
|
||
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
|
||
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
|
||
+cat >conftest.$ac_ext <<_ACEOF
|
||
+/* confdefs.h. */
|
||
+_ACEOF
|
||
+cat confdefs.h >>conftest.$ac_ext
|
||
+cat >>conftest.$ac_ext <<_ACEOF
|
||
+/* end confdefs.h. */
|
||
+#include <$ac_header>
|
||
+_ACEOF
|
||
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||
+ ac_status=$?
|
||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||
+ rm -f conftest.er1
|
||
+ cat conftest.err >&5
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); } >/dev/null; then
|
||
+ if test -s conftest.err; then
|
||
+ ac_cpp_err=$ac_c_preproc_warn_flag
|
||
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||
+ else
|
||
+ ac_cpp_err=
|
||
+ fi
|
||
+else
|
||
+ ac_cpp_err=yes
|
||
+fi
|
||
+if test -z "$ac_cpp_err"; then
|
||
+ ac_header_preproc=yes
|
||
+else
|
||
+ echo "$as_me: failed program was:" >&5
|
||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||
+
|
||
+ ac_header_preproc=no
|
||
+fi
|
||
+rm -f conftest.err conftest.$ac_ext
|
||
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||
+echo "${ECHO_T}$ac_header_preproc" >&6
|
||
+
|
||
+# So? What about this header?
|
||
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
||
+ yes:no: )
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
|
||
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
|
||
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
|
||
+ ac_header_preproc=yes
|
||
+ ;;
|
||
+ no:yes:* )
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
|
||
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
|
||
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
|
||
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
|
||
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
|
||
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
|
||
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
|
||
+ (
|
||
+ cat <<\_ASBOX
|
||
+## ------------------------------ ##
|
||
+## Report this to bug-tar@gnu.org ##
|
||
+## ------------------------------ ##
|
||
+_ASBOX
|
||
+ ) |
|
||
+ sed "s/^/$as_me: WARNING: /" >&2
|
||
+ ;;
|
||
+esac
|
||
+echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
+else
|
||
+ eval "$as_ac_Header=\$ac_header_preproc"
|
||
+fi
|
||
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||
+
|
||
+fi
|
||
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
|
||
+ cat >>confdefs.h <<_ACEOF
|
||
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||
+_ACEOF
|
||
+
|
||
+fi
|
||
+
|
||
+done
|
||
+
|
||
+
|
||
+for ac_header in sys/acl.h
|
||
+do
|
||
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
+fi
|
||
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||
+else
|
||
+ # Is the header compilable?
|
||
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
|
||
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
|
||
+cat >conftest.$ac_ext <<_ACEOF
|
||
+/* confdefs.h. */
|
||
+_ACEOF
|
||
+cat confdefs.h >>conftest.$ac_ext
|
||
+cat >>conftest.$ac_ext <<_ACEOF
|
||
+/* end confdefs.h. */
|
||
+$ac_includes_default
|
||
+#include <$ac_header>
|
||
+_ACEOF
|
||
+rm -f conftest.$ac_objext
|
||
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||
+ (eval $ac_compile) 2>conftest.er1
|
||
+ ac_status=$?
|
||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||
+ rm -f conftest.er1
|
||
+ cat conftest.err >&5
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); } &&
|
||
+ { ac_try='test -z "$ac_c_werror_flag"
|
||
+ || test ! -s conftest.err'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; } &&
|
||
+ { ac_try='test -s conftest.$ac_objext'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; }; then
|
||
+ ac_header_compiler=yes
|
||
+else
|
||
+ echo "$as_me: failed program was:" >&5
|
||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||
+
|
||
+ac_header_compiler=no
|
||
+fi
|
||
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||
+echo "${ECHO_T}$ac_header_compiler" >&6
|
||
+
|
||
+# Is the header present?
|
||
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
|
||
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
|
||
+cat >conftest.$ac_ext <<_ACEOF
|
||
+/* confdefs.h. */
|
||
+_ACEOF
|
||
+cat confdefs.h >>conftest.$ac_ext
|
||
+cat >>conftest.$ac_ext <<_ACEOF
|
||
+/* end confdefs.h. */
|
||
+#include <$ac_header>
|
||
+_ACEOF
|
||
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||
+ ac_status=$?
|
||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||
+ rm -f conftest.er1
|
||
+ cat conftest.err >&5
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); } >/dev/null; then
|
||
+ if test -s conftest.err; then
|
||
+ ac_cpp_err=$ac_c_preproc_warn_flag
|
||
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||
+ else
|
||
+ ac_cpp_err=
|
||
+ fi
|
||
+else
|
||
+ ac_cpp_err=yes
|
||
+fi
|
||
+if test -z "$ac_cpp_err"; then
|
||
+ ac_header_preproc=yes
|
||
+else
|
||
+ echo "$as_me: failed program was:" >&5
|
||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||
+
|
||
+ ac_header_preproc=no
|
||
+fi
|
||
+rm -f conftest.err conftest.$ac_ext
|
||
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||
+echo "${ECHO_T}$ac_header_preproc" >&6
|
||
+
|
||
+# So? What about this header?
|
||
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
||
+ yes:no: )
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
|
||
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
|
||
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
|
||
+ ac_header_preproc=yes
|
||
+ ;;
|
||
+ no:yes:* )
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
|
||
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
|
||
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
|
||
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
|
||
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
|
||
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
|
||
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
|
||
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
|
||
+ (
|
||
+ cat <<\_ASBOX
|
||
+## ------------------------------ ##
|
||
+## Report this to bug-tar@gnu.org ##
|
||
+## ------------------------------ ##
|
||
+_ASBOX
|
||
+ ) |
|
||
+ sed "s/^/$as_me: WARNING: /" >&2
|
||
+ ;;
|
||
+esac
|
||
+echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
+else
|
||
+ eval "$as_ac_Header=\$ac_header_preproc"
|
||
+fi
|
||
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||
+
|
||
+fi
|
||
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
|
||
+ cat >>confdefs.h <<_ACEOF
|
||
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||
+_ACEOF
|
||
+
|
||
+fi
|
||
+
|
||
+done
|
||
+
|
||
+
|
||
|
||
for ac_header in sys/buf.h
|
||
do
|
||
@@ -11470,20 +11920,20 @@
|
||
# dnl Persuade glibc <time.h> to declare these functions.
|
||
|
||
|
||
- # Solaris 2.5.1 needs -lposix4 to get the clock_gettyme function.
|
||
+ # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
||
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
||
|
||
# Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
|
||
# programs in the package would end up linked with that potentially-shared
|
||
# library, inducing unnecessary run-time overhead.
|
||
fetish_saved_libs=$LIBS
|
||
- echo "$as_me:$LINENO: checking for library containing clock_gettyme" >&5
|
||
-echo $ECHO_N "checking for library containing clock_gettyme... $ECHO_C" >&6
|
||
-if test "${ac_cv_search_clock_gettyme+set}" = set; then
|
||
+ echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5
|
||
+echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6
|
||
+if test "${ac_cv_search_clock_gettime+set}" = set; then
|
||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
else
|
||
ac_func_search_save_LIBS=$LIBS
|
||
-ac_cv_search_clock_gettyme=no
|
||
+ac_cv_search_clock_gettime=no
|
||
cat >conftest.$ac_ext <<_ACEOF
|
||
/* confdefs.h. */
|
||
_ACEOF
|
||
@@ -11497,11 +11947,11 @@
|
||
#endif
|
||
/* We use char because int might match the return type of a gcc2
|
||
builtin and then its argument prototype would still apply. */
|
||
-char clock_gettyme ();
|
||
+char clock_gettime ();
|
||
int
|
||
main ()
|
||
{
|
||
-clock_gettyme ();
|
||
+clock_gettime ();
|
||
;
|
||
return 0;
|
||
}
|
||
@@ -11528,7 +11978,7 @@
|
||
ac_status=$?
|
||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
(exit $ac_status); }; }; then
|
||
- ac_cv_search_clock_gettyme="none required"
|
||
+ ac_cv_search_clock_gettime="none required"
|
||
else
|
||
echo "$as_me: failed program was:" >&5
|
||
sed 's/^/| /' conftest.$ac_ext >&5
|
||
@@ -11536,7 +11986,7 @@
|
||
fi
|
||
rm -f conftest.err conftest.$ac_objext \
|
||
conftest$ac_exeext conftest.$ac_ext
|
||
-if test "$ac_cv_search_clock_gettyme" = no; then
|
||
+if test "$ac_cv_search_clock_gettime" = no; then
|
||
for ac_lib in rt posix4; do
|
||
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||
cat >conftest.$ac_ext <<_ACEOF
|
||
@@ -11552,11 +12002,11 @@
|
||
#endif
|
||
/* We use char because int might match the return type of a gcc2
|
||
builtin and then its argument prototype would still apply. */
|
||
-char clock_gettyme ();
|
||
+char clock_gettime ();
|
||
int
|
||
main ()
|
||
{
|
||
-clock_gettyme ();
|
||
+clock_gettime ();
|
||
;
|
||
return 0;
|
||
}
|
||
@@ -11583,7 +12033,7 @@
|
||
ac_status=$?
|
||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
(exit $ac_status); }; }; then
|
||
- ac_cv_search_clock_gettyme="-l$ac_lib"
|
||
+ ac_cv_search_clock_gettime="-l$ac_lib"
|
||
break
|
||
else
|
||
echo "$as_me: failed program was:" >&5
|
||
@@ -11596,18 +12046,18 @@
|
||
fi
|
||
LIBS=$ac_func_search_save_LIBS
|
||
fi
|
||
-echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettyme" >&5
|
||
-echo "${ECHO_T}$ac_cv_search_clock_gettyme" >&6
|
||
-if test "$ac_cv_search_clock_gettyme" != no; then
|
||
- test "$ac_cv_search_clock_gettyme" = "none required" || LIBS="$ac_cv_search_clock_gettyme $LIBS"
|
||
- test "$ac_cv_search_clock_gettyme" = "none required" ||
|
||
- LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettyme
|
||
+echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5
|
||
+echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6
|
||
+if test "$ac_cv_search_clock_gettime" != no; then
|
||
+ test "$ac_cv_search_clock_gettime" = "none required" || LIBS="$ac_cv_search_clock_gettime $LIBS"
|
||
+ test "$ac_cv_search_clock_gettime" = "none required" ||
|
||
+ LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
|
||
fi
|
||
|
||
|
||
|
||
|
||
-for ac_func in clock_gettyme clock_settime
|
||
+for ac_func in clock_gettime clock_settime
|
||
do
|
||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||
@@ -20541,17 +20991,17 @@
|
||
# programs in the package would end up linked with that potentially-shared
|
||
# library, inducing unnecessary run-time overhead.
|
||
|
||
-# Solaris 2.5.1 needs -lposix4 to get the clock_gettyme function.
|
||
+# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
||
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
||
tar_save_LIBS=$LIBS
|
||
LIB_CLOCK_GETTIME=
|
||
- echo "$as_me:$LINENO: checking for library containing clock_gettyme" >&5
|
||
-echo $ECHO_N "checking for library containing clock_gettyme... $ECHO_C" >&6
|
||
-if test "${ac_cv_search_clock_gettyme+set}" = set; then
|
||
+ echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5
|
||
+echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6
|
||
+if test "${ac_cv_search_clock_gettime+set}" = set; then
|
||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
else
|
||
ac_func_search_save_LIBS=$LIBS
|
||
-ac_cv_search_clock_gettyme=no
|
||
+ac_cv_search_clock_gettime=no
|
||
cat >conftest.$ac_ext <<_ACEOF
|
||
/* confdefs.h. */
|
||
_ACEOF
|
||
@@ -20565,11 +21015,11 @@
|
||
#endif
|
||
/* We use char because int might match the return type of a gcc2
|
||
builtin and then its argument prototype would still apply. */
|
||
-char clock_gettyme ();
|
||
+char clock_gettime ();
|
||
int
|
||
main ()
|
||
{
|
||
-clock_gettyme ();
|
||
+clock_gettime ();
|
||
;
|
||
return 0;
|
||
}
|
||
@@ -20596,7 +21046,7 @@
|
||
ac_status=$?
|
||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
(exit $ac_status); }; }; then
|
||
- ac_cv_search_clock_gettyme="none required"
|
||
+ ac_cv_search_clock_gettime="none required"
|
||
else
|
||
echo "$as_me: failed program was:" >&5
|
||
sed 's/^/| /' conftest.$ac_ext >&5
|
||
@@ -20604,7 +21054,7 @@
|
||
fi
|
||
rm -f conftest.err conftest.$ac_objext \
|
||
conftest$ac_exeext conftest.$ac_ext
|
||
-if test "$ac_cv_search_clock_gettyme" = no; then
|
||
+if test "$ac_cv_search_clock_gettime" = no; then
|
||
for ac_lib in rt posix4; do
|
||
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||
cat >conftest.$ac_ext <<_ACEOF
|
||
@@ -20620,11 +21070,11 @@
|
||
#endif
|
||
/* We use char because int might match the return type of a gcc2
|
||
builtin and then its argument prototype would still apply. */
|
||
-char clock_gettyme ();
|
||
+char clock_gettime ();
|
||
int
|
||
main ()
|
||
{
|
||
-clock_gettyme ();
|
||
+clock_gettime ();
|
||
;
|
||
return 0;
|
||
}
|
||
@@ -20651,7 +21101,7 @@
|
||
ac_status=$?
|
||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
(exit $ac_status); }; }; then
|
||
- ac_cv_search_clock_gettyme="-l$ac_lib"
|
||
+ ac_cv_search_clock_gettime="-l$ac_lib"
|
||
break
|
||
else
|
||
echo "$as_me: failed program was:" >&5
|
||
@@ -20664,19 +21114,19 @@
|
||
fi
|
||
LIBS=$ac_func_search_save_LIBS
|
||
fi
|
||
-echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettyme" >&5
|
||
-echo "${ECHO_T}$ac_cv_search_clock_gettyme" >&6
|
||
-if test "$ac_cv_search_clock_gettyme" != no; then
|
||
- test "$ac_cv_search_clock_gettyme" = "none required" || LIBS="$ac_cv_search_clock_gettyme $LIBS"
|
||
+echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5
|
||
+echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6
|
||
+if test "$ac_cv_search_clock_gettime" != no; then
|
||
+ test "$ac_cv_search_clock_gettime" = "none required" || LIBS="$ac_cv_search_clock_gettime $LIBS"
|
||
|
||
fi
|
||
|
||
- case "$ac_cv_search_clock_gettyme" in
|
||
- -l*) LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettyme;;
|
||
+ case "$ac_cv_search_clock_gettime" in
|
||
+ -l*) LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime;;
|
||
esac
|
||
|
||
|
||
-for ac_func in clock_gettyme
|
||
+for ac_func in clock_gettime
|
||
do
|
||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||
@@ -20888,6 +21338,270 @@
|
||
fi
|
||
done
|
||
|
||
+
|
||
+
|
||
+
|
||
+
|
||
+
|
||
+
|
||
+
|
||
+
|
||
+
|
||
+for ac_func in getxattr fgetxattr lgetxattr \
|
||
+ setxattr fsetxattr lsetxattr \
|
||
+ listxattr flistxattr llistxattr
|
||
+do
|
||
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||
+echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
|
||
+if eval "test \"\${$as_ac_var+set}\" = set"; then
|
||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
+else
|
||
+ cat >conftest.$ac_ext <<_ACEOF
|
||
+/* confdefs.h. */
|
||
+_ACEOF
|
||
+cat confdefs.h >>conftest.$ac_ext
|
||
+cat >>conftest.$ac_ext <<_ACEOF
|
||
+/* end confdefs.h. */
|
||
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
|
||
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
|
||
+#define $ac_func innocuous_$ac_func
|
||
+
|
||
+/* System header to define __stub macros and hopefully few prototypes,
|
||
+ which can conflict with char $ac_func (); below.
|
||
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||
+ <limits.h> exists even on freestanding compilers. */
|
||
+
|
||
+#ifdef __STDC__
|
||
+# include <limits.h>
|
||
+#else
|
||
+# include <assert.h>
|
||
+#endif
|
||
+
|
||
+#undef $ac_func
|
||
+
|
||
+/* Override any gcc2 internal prototype to avoid an error. */
|
||
+#ifdef __cplusplus
|
||
+extern "C"
|
||
+{
|
||
+#endif
|
||
+/* We use char because int might match the return type of a gcc2
|
||
+ builtin and then its argument prototype would still apply. */
|
||
+char $ac_func ();
|
||
+/* The GNU C library defines this for functions which it implements
|
||
+ to always fail with ENOSYS. Some functions are actually named
|
||
+ something starting with __ and the normal name is an alias. */
|
||
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||
+choke me
|
||
+#else
|
||
+char (*f) () = $ac_func;
|
||
+#endif
|
||
+#ifdef __cplusplus
|
||
+}
|
||
+#endif
|
||
+
|
||
+int
|
||
+main ()
|
||
+{
|
||
+return f != $ac_func;
|
||
+ ;
|
||
+ return 0;
|
||
+}
|
||
+_ACEOF
|
||
+rm -f conftest.$ac_objext conftest$ac_exeext
|
||
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||
+ (eval $ac_link) 2>conftest.er1
|
||
+ ac_status=$?
|
||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||
+ rm -f conftest.er1
|
||
+ cat conftest.err >&5
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); } &&
|
||
+ { ac_try='test -z "$ac_c_werror_flag"
|
||
+ || test ! -s conftest.err'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; } &&
|
||
+ { ac_try='test -s conftest$ac_exeext'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; }; then
|
||
+ eval "$as_ac_var=yes"
|
||
+else
|
||
+ echo "$as_me: failed program was:" >&5
|
||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||
+
|
||
+eval "$as_ac_var=no"
|
||
+fi
|
||
+rm -f conftest.err conftest.$ac_objext \
|
||
+ conftest$ac_exeext conftest.$ac_ext
|
||
+fi
|
||
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
|
||
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
|
||
+if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||
+ cat >>confdefs.h <<_ACEOF
|
||
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||
+_ACEOF
|
||
+
|
||
+cat >>confdefs.h <<\_ACEOF
|
||
+#define HAVE_XATTRS
|
||
+_ACEOF
|
||
+
|
||
+fi
|
||
+done
|
||
+
|
||
+
|
||
+echo "$as_me:$LINENO: checking for getfilecon in -lselinux" >&5
|
||
+echo $ECHO_N "checking for getfilecon in -lselinux... $ECHO_C" >&6
|
||
+if test "${ac_cv_lib_selinux_getfilecon+set}" = set; then
|
||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
+else
|
||
+ ac_check_lib_save_LIBS=$LIBS
|
||
+LIBS="-lselinux $LIBS"
|
||
+cat >conftest.$ac_ext <<_ACEOF
|
||
+/* confdefs.h. */
|
||
+_ACEOF
|
||
+cat confdefs.h >>conftest.$ac_ext
|
||
+cat >>conftest.$ac_ext <<_ACEOF
|
||
+/* end confdefs.h. */
|
||
+
|
||
+/* Override any gcc2 internal prototype to avoid an error. */
|
||
+#ifdef __cplusplus
|
||
+extern "C"
|
||
+#endif
|
||
+/* We use char because int might match the return type of a gcc2
|
||
+ builtin and then its argument prototype would still apply. */
|
||
+char getfilecon ();
|
||
+int
|
||
+main ()
|
||
+{
|
||
+getfilecon ();
|
||
+ ;
|
||
+ return 0;
|
||
+}
|
||
+_ACEOF
|
||
+rm -f conftest.$ac_objext conftest$ac_exeext
|
||
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||
+ (eval $ac_link) 2>conftest.er1
|
||
+ ac_status=$?
|
||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||
+ rm -f conftest.er1
|
||
+ cat conftest.err >&5
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); } &&
|
||
+ { ac_try='test -z "$ac_c_werror_flag"
|
||
+ || test ! -s conftest.err'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; } &&
|
||
+ { ac_try='test -s conftest$ac_exeext'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; }; then
|
||
+ ac_cv_lib_selinux_getfilecon=yes
|
||
+else
|
||
+ echo "$as_me: failed program was:" >&5
|
||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||
+
|
||
+ac_cv_lib_selinux_getfilecon=no
|
||
+fi
|
||
+rm -f conftest.err conftest.$ac_objext \
|
||
+ conftest$ac_exeext conftest.$ac_ext
|
||
+LIBS=$ac_check_lib_save_LIBS
|
||
+fi
|
||
+echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_getfilecon" >&5
|
||
+echo "${ECHO_T}$ac_cv_lib_selinux_getfilecon" >&6
|
||
+if test $ac_cv_lib_selinux_getfilecon = yes; then
|
||
+ cat >>confdefs.h <<_ACEOF
|
||
+#define HAVE_LIBSELINUX 1
|
||
+_ACEOF
|
||
+
|
||
+ LIBS="-lselinux $LIBS"
|
||
+
|
||
+fi
|
||
+
|
||
+
|
||
+echo "$as_me:$LINENO: checking for acl_get_fd in -lacl" >&5
|
||
+echo $ECHO_N "checking for acl_get_fd in -lacl... $ECHO_C" >&6
|
||
+if test "${ac_cv_lib_acl_acl_get_fd+set}" = set; then
|
||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||
+else
|
||
+ ac_check_lib_save_LIBS=$LIBS
|
||
+LIBS="-lacl $LIBS"
|
||
+cat >conftest.$ac_ext <<_ACEOF
|
||
+/* confdefs.h. */
|
||
+_ACEOF
|
||
+cat confdefs.h >>conftest.$ac_ext
|
||
+cat >>conftest.$ac_ext <<_ACEOF
|
||
+/* end confdefs.h. */
|
||
+
|
||
+/* Override any gcc2 internal prototype to avoid an error. */
|
||
+#ifdef __cplusplus
|
||
+extern "C"
|
||
+#endif
|
||
+/* We use char because int might match the return type of a gcc2
|
||
+ builtin and then its argument prototype would still apply. */
|
||
+char acl_get_fd ();
|
||
+int
|
||
+main ()
|
||
+{
|
||
+acl_get_fd ();
|
||
+ ;
|
||
+ return 0;
|
||
+}
|
||
+_ACEOF
|
||
+rm -f conftest.$ac_objext conftest$ac_exeext
|
||
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||
+ (eval $ac_link) 2>conftest.er1
|
||
+ ac_status=$?
|
||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||
+ rm -f conftest.er1
|
||
+ cat conftest.err >&5
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); } &&
|
||
+ { ac_try='test -z "$ac_c_werror_flag"
|
||
+ || test ! -s conftest.err'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; } &&
|
||
+ { ac_try='test -s conftest$ac_exeext'
|
||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||
+ (eval $ac_try) 2>&5
|
||
+ ac_status=$?
|
||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||
+ (exit $ac_status); }; }; then
|
||
+ ac_cv_lib_acl_acl_get_fd=yes
|
||
+else
|
||
+ echo "$as_me: failed program was:" >&5
|
||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||
+
|
||
+ac_cv_lib_acl_acl_get_fd=no
|
||
+fi
|
||
+rm -f conftest.err conftest.$ac_objext \
|
||
+ conftest$ac_exeext conftest.$ac_ext
|
||
+LIBS=$ac_check_lib_save_LIBS
|
||
+fi
|
||
+echo "$as_me:$LINENO: result: $ac_cv_lib_acl_acl_get_fd" >&5
|
||
+echo "${ECHO_T}$ac_cv_lib_acl_acl_get_fd" >&6
|
||
+if test $ac_cv_lib_acl_acl_get_fd = yes; then
|
||
+ cat >>confdefs.h <<_ACEOF
|
||
+#define HAVE_LIBACL 1
|
||
+_ACEOF
|
||
+
|
||
+ LIBS="-lacl $LIBS"
|
||
+
|
||
+fi
|
||
+
|
||
echo "$as_me:$LINENO: checking whether getgrgid is declared" >&5
|
||
echo $ECHO_N "checking whether getgrgid is declared... $ECHO_C" >&6
|
||
if test "${ac_cv_have_decl_getgrgid+set}" = set; then
|
||
--- tar-1.15.1/Makefile.in.xattrs 2004-12-21 14:31:04.000000000 +0100
|
||
+++ tar-1.15.1/Makefile.in 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,8 +1,8 @@
|
||
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||
# @configure_input@
|
||
|
||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||
-# 2003, 2004 Free Software Foundation, Inc.
|
||
+# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||
# This Makefile.in is free software; the Free Software Foundation
|
||
# gives unlimited permission to copy and/or distribute it,
|
||
# with or without modifications, as long as this notice is preserved.
|
||
@@ -311,7 +311,13 @@
|
||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||
# (2) otherwise, pass the desired values on the `make' command line.
|
||
$(RECURSIVE_TARGETS):
|
||
- @set fnord $$MAKEFLAGS; amf=$$2; \
|
||
+ @failcom='exit 1'; \
|
||
+ for f in x $$MAKEFLAGS; do \
|
||
+ case $$f in \
|
||
+ *=* | --[!k]*);; \
|
||
+ *k*) failcom='fail=yes';; \
|
||
+ esac; \
|
||
+ done; \
|
||
dot_seen=no; \
|
||
target=`echo $@ | sed s/-recursive//`; \
|
||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||
@@ -323,7 +329,7 @@
|
||
local_target="$$target"; \
|
||
fi; \
|
||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||
+ || eval $$failcom; \
|
||
done; \
|
||
if test "$$dot_seen" = "no"; then \
|
||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||
@@ -331,7 +337,13 @@
|
||
|
||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||
maintainer-clean-recursive:
|
||
- @set fnord $$MAKEFLAGS; amf=$$2; \
|
||
+ @failcom='exit 1'; \
|
||
+ for f in x $$MAKEFLAGS; do \
|
||
+ case $$f in \
|
||
+ *=* | --[!k]*);; \
|
||
+ *k*) failcom='fail=yes';; \
|
||
+ esac; \
|
||
+ done; \
|
||
dot_seen=no; \
|
||
case "$@" in \
|
||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||
@@ -352,7 +364,7 @@
|
||
local_target="$$target"; \
|
||
fi; \
|
||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||
+ || eval $$failcom; \
|
||
done && test -z "$$fail"
|
||
tags-recursive:
|
||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||
--- tar-1.15.1/aclocal.m4.xattrs 2004-12-21 14:29:44.000000000 +0100
|
||
+++ tar-1.15.1/aclocal.m4 2006-10-04 11:52:36.000000000 +0200
|
||
@@ -1,7 +1,7 @@
|
||
-# generated automatically by aclocal 1.9.3 -*- Autoconf -*-
|
||
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
|
||
|
||
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||
-# Free Software Foundation, Inc.
|
||
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||
+# 2005 Free Software Foundation, Inc.
|
||
# This file is free software; the Free Software Foundation
|
||
# gives unlimited permission to copy and/or distribute it,
|
||
# with or without modifications, as long as this notice is preserved.
|
||
@@ -11,23 +11,11 @@
|
||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||
# PARTICULAR PURPOSE.
|
||
|
||
-# -*- Autoconf -*-
|
||
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||
-# Generated from amversion.in; do not edit by hand.
|
||
-
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
# AM_AUTOMAKE_VERSION(VERSION)
|
||
# ----------------------------
|
||
@@ -40,26 +28,15 @@
|
||
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||
- [AM_AUTOMAKE_VERSION([1.9.3])])
|
||
-
|
||
-# AM_AUX_DIR_EXPAND
|
||
-
|
||
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||
+ [AM_AUTOMAKE_VERSION([1.9.6])])
|
||
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||
@@ -106,26 +83,16 @@
|
||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||
])
|
||
|
||
-# AM_CONDITIONAL -*- Autoconf -*-
|
||
-
|
||
-# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
|
||
+# AM_CONDITIONAL -*- Autoconf -*-
|
||
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
|
||
+# Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
-# serial 6
|
||
+# serial 7
|
||
|
||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||
# -------------------------------------
|
||
@@ -149,26 +116,15 @@
|
||
Usually this means the macro was only invoked conditionally.]])
|
||
fi])])
|
||
|
||
-# serial 7 -*- Autoconf -*-
|
||
|
||
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
|
||
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||
# Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
-
|
||
+# serial 8
|
||
|
||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||
# written in clear, in which case automake, when reading aclocal.m4,
|
||
@@ -177,7 +133,6 @@
|
||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||
|
||
|
||
-
|
||
# _AM_DEPENDENCIES(NAME)
|
||
# ----------------------
|
||
# See how the compiler implements dependency checking.
|
||
@@ -317,27 +272,16 @@
|
||
AC_SUBST([AMDEPBACKSLASH])
|
||
])
|
||
|
||
-# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||
+# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||
|
||
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
|
||
-# Free Software Foundation, Inc.
|
||
-
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||
+# Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
-#serial 2
|
||
+#serial 3
|
||
|
||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||
# ------------------------------
|
||
@@ -396,30 +340,19 @@
|
||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||
])
|
||
|
||
-# Do all the work for Automake. -*- Autoconf -*-
|
||
+# Do all the work for Automake. -*- Autoconf -*-
|
||
|
||
-# This macro actually does too much some checks are only needed if
|
||
-# your package does certain things. But this isn't really a big deal.
|
||
-
|
||
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||
# Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
+# serial 12
|
||
|
||
-# serial 11
|
||
+# This macro actually does too much. Some checks are only needed if
|
||
+# your package does certain things. But this isn't really a big deal.
|
||
|
||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||
@@ -521,51 +454,27 @@
|
||
done
|
||
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||
|
||
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
+
|
||
# AM_PROG_INSTALL_SH
|
||
# ------------------
|
||
# Define $install_sh.
|
||
-
|
||
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||
-
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
-
|
||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||
AC_SUBST(install_sh)])
|
||
|
||
-# -*- Autoconf -*-
|
||
-# Copyright (C) 2003 Free Software Foundation, Inc.
|
||
-
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
-# serial 1
|
||
+# serial 2
|
||
|
||
# Check whether the underlying file-system supports filenames
|
||
# with a leading dot. For instance MS-DOS doesn't.
|
||
@@ -580,26 +489,15 @@
|
||
rmdir .tst 2>/dev/null
|
||
AC_SUBST([am__leading_dot])])
|
||
|
||
-# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||
-
|
||
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
||
-
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
+# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
-# serial 2
|
||
+# serial 3
|
||
|
||
# AM_MAKE_INCLUDE()
|
||
# -----------------
|
||
@@ -643,27 +541,16 @@
|
||
rm -f confinc confmf
|
||
])
|
||
|
||
-# -*- Autoconf -*-
|
||
-
|
||
-
|
||
-# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
|
||
+# Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
-# serial 3
|
||
+# serial 4
|
||
|
||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||
# ------------------------------
|
||
@@ -689,27 +576,16 @@
|
||
fi
|
||
])
|
||
|
||
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
+
|
||
# AM_PROG_MKDIR_P
|
||
# ---------------
|
||
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
|
||
-
|
||
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||
-
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
-
|
||
+#
|
||
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
|
||
# created by `make install' are always world readable, even if the
|
||
# installer happens to have an overly restrictive umask (e.g. 077).
|
||
@@ -763,26 +639,15 @@
|
||
fi
|
||
AC_SUBST([mkdir_p])])
|
||
|
||
-# Helper functions for option handling. -*- Autoconf -*-
|
||
-
|
||
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
||
-
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
+# Helper functions for option handling. -*- Autoconf -*-
|
||
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
-# serial 2
|
||
+# serial 3
|
||
|
||
# _AM_MANGLE_OPTION(NAME)
|
||
# -----------------------
|
||
@@ -807,28 +672,16 @@
|
||
AC_DEFUN([_AM_IF_OPTION],
|
||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||
|
||
-#
|
||
-# Check to make sure that the build environment is sane.
|
||
-#
|
||
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||
|
||
-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||
-
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||
+# Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
-# serial 3
|
||
+# serial 4
|
||
|
||
# AM_SANITY_CHECK
|
||
# ---------------
|
||
@@ -871,25 +724,14 @@
|
||
fi
|
||
AC_MSG_RESULT(yes)])
|
||
|
||
-# AM_PROG_INSTALL_STRIP
|
||
-
|
||
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||
-
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
+# AM_PROG_INSTALL_STRIP
|
||
+# ---------------------
|
||
# One issue with vendor `install' (even GNU) is that you can't
|
||
# specify the program used to strip binaries. This is especially
|
||
# annoying in cross-compiling environments, where the build's strip
|
||
@@ -912,25 +754,13 @@
|
||
|
||
# Check how to create a tarball. -*- Autoconf -*-
|
||
|
||
-# Copyright (C) 2004 Free Software Foundation, Inc.
|
||
-
|
||
-# This program is free software; you can redistribute it and/or modify
|
||
-# it under the terms of the GNU General Public License as published by
|
||
-# the Free Software Foundation; either version 2, or (at your option)
|
||
-# any later version.
|
||
-
|
||
-# This program is distributed in the hope that it will be useful,
|
||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
-# GNU General Public License for more details.
|
||
-
|
||
-# You should have received a copy of the GNU General Public License
|
||
-# along with this program; if not, write to the Free Software
|
||
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||
-# 02111-1307, USA.
|
||
-
|
||
-# serial 1
|
||
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||
+#
|
||
+# This file is free software; the Free Software Foundation
|
||
+# gives unlimited permission to copy and/or distribute it,
|
||
+# with or without modifications, as long as this notice is preserved.
|
||
|
||
+# serial 2
|
||
|
||
# _AM_PROG_TAR(FORMAT)
|
||
# --------------------
|