Ticket #2905: no_same_owner.patch

File no_same_owner.patch, 6.7 KB (added by danielluke (Daniel J. Luke), 20 years ago)

new autoconf test for tar --no-same-owner support

  • aclocal.m4

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/aclocal.m4,v
    retrieving revision 1.27
    diff -u -d -r1.27 aclocal.m4
     
    428428        prefix=$oldprefix
    429429])
    430430
     431dnl This macro tests for tar support of --no-same-owner
     432AC_DEFUN([OD_TAR_NO_SAME_OWNER],[
     433        AC_CHECK_PROG(TAR_CMD, [gnutar], [gnutar], [tar])
     434        AC_MSG_CHECKING([for tar --no-same-owner support])
     435        [no_same_owner_support=`$TAR_CMD --help 2>&1 | grep no-same-owner`]
     436        if test -z "$no_same_owner_support" ; then
     437                AC_MSG_RESULT([no])
     438        else
     439                AC_MSG_RESULT([yes])
     440                TAR_CMD="$TAR_CMD --no-same-owner"
     441        fi
     442])
     443
  • configure

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/configure,v
    retrieving revision 1.45
    diff -u -d -r1.45 configure
     
    312312# include <unistd.h>
    313313#endif"
    314314
    315 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LN_S CURL CVS CFLAGS_QUICHEEATERS MTREE subdirs REPLACEMENT_PROGS DPORTSDIR PORTCONFIGDIR DSTUSR DSTGRP DSTMODE CPP EGREP MD5_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDES TCLSH TCL_PACKAGE_DIR INCLUDES CFLAGS_DEBUG CFLAGS_OPTIMIZE TCL_DEFS STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LDFLAGS SHLIB_SUFFIX TCL_CC prefix_expanded PORTCONFIGDIR_EXPANDED localstatedir_expanded LIBOBJS LTLIBOBJS'
     315ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LN_S CURL CVS TAR_CMD CFLAGS_QUICHEEATERS MTREE subdirs REPLACEMENT_PROGS DPORTSDIR PORTCONFIGDIR DSTUSR DSTGRP DSTMODE CPP EGREP MD5_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDES TCLSH TCL_PACKAGE_DIR INCLUDES CFLAGS_DEBUG CFLAGS_OPTIMIZE TCL_DEFS STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LDFLAGS SHLIB_SUFFIX TCL_CC prefix_expanded PORTCONFIGDIR_EXPANDED localstatedir_expanded LIBOBJS LTLIBOBJS'
    316316ac_subst_files=''
    317317
    318318# Initialize some variables set by options.
     
    24982498fi
    24992499
    25002500
     2501
     2502
     2503        # Extract the first word of "gnutar", so it can be a program name with args.
     2504set dummy gnutar; ac_word=$2
     2505echo "$as_me:$LINENO: checking for $ac_word" >&5
     2506echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     2507if test "${ac_cv_prog_TAR_CMD+set}" = set; then
     2508  echo $ECHO_N "(cached) $ECHO_C" >&6
     2509else
     2510  if test -n "$TAR_CMD"; then
     2511  ac_cv_prog_TAR_CMD="$TAR_CMD" # Let the user override the test.
     2512else
     2513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     2514for as_dir in $PATH
     2515do
     2516  IFS=$as_save_IFS
     2517  test -z "$as_dir" && as_dir=.
     2518  for ac_exec_ext in '' $ac_executable_extensions; do
     2519  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     2520    ac_cv_prog_TAR_CMD="gnutar"
     2521    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     2522    break 2
     2523  fi
     2524done
     2525done
     2526
     2527  test -z "$ac_cv_prog_TAR_CMD" && ac_cv_prog_TAR_CMD="tar"
     2528fi
     2529fi
     2530TAR_CMD=$ac_cv_prog_TAR_CMD
     2531if test -n "$TAR_CMD"; then
     2532  echo "$as_me:$LINENO: result: $TAR_CMD" >&5
     2533echo "${ECHO_T}$TAR_CMD" >&6
     2534else
     2535  echo "$as_me:$LINENO: result: no" >&5
     2536echo "${ECHO_T}no" >&6
     2537fi
     2538
     2539        echo "$as_me:$LINENO: checking for tar --no-same-owner support" >&5
     2540echo $ECHO_N "checking for tar --no-same-owner support... $ECHO_C" >&6
     2541        no_same_owner_support=`$TAR_CMD --help 2>&1 | grep no-same-owner`
     2542        if test -z "$no_same_owner_support" ; then
     2543                echo "$as_me:$LINENO: result: no" >&5
     2544echo "${ECHO_T}no" >&6
     2545        else
     2546                echo "$as_me:$LINENO: result: yes" >&5
     2547echo "${ECHO_T}yes" >&6
     2548                TAR_CMD="$TAR_CMD --no-same-owner"
     2549        fi
     2550
     2551
    25012552# Quiche eaters options.
    25022553if test x$GCC = xyes; then
    25032554        CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
     
    76447695s,@LN_S@,$LN_S,;t t
    76457696s,@CURL@,$CURL,;t t
    76467697s,@CVS@,$CVS,;t t
     7698s,@TAR_CMD@,$TAR_CMD,;t t
    76477699s,@CFLAGS_QUICHEEATERS@,$CFLAGS_QUICHEEATERS,;t t
    76487700s,@MTREE@,$MTREE,;t t
    76497701s,@subdirs@,$subdirs,;t t
  • configure.ac

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/configure.ac,v
    retrieving revision 1.36
    diff -u -d -r1.36 configure.ac
     
    1616AC_PATH_PROG(CURL, [curl], [])
    1717AC_PATH_PROG(CVS, [cvs], [])
    1818
     19AC_SUBST(TAR_CMD)
     20OD_TAR_NO_SAME_OWNER
     21
    1922# Quiche eaters options.
    2023if test x$GCC = xyes; then
    2124        CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
  • src/port1.0/port_autoconf.tcl.in

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/port_autoconf.tcl.in,v
    retrieving revision 1.1
    diff -u -d -r1.1 port_autoconf.tcl.in
     
    3232namespace eval portutil::autoconf {
    3333        variable curl_path "@CURL@"
    3434        variable cvs_path "@CVS@"
     35        variable tar_command "@TAR_CMD@"
    3536}
  • src/port1.0/portextract.tcl

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portextract.tcl,v
    retrieving revision 1.39
    diff -u -d -r1.39 portextract.tcl
     
    5050default extract.dir {${workpath}}
    5151default extract.cmd gzip
    5252default extract.pre_args -dc
    53 default extract.post_args {{| tar --no-same-owner -xf -}}
     53default extract.post_args {"| ${portutil::autoconf::tar_command} -xf -"}
    5454
    5555set_ui_prefix
    5656