autoconfiscate misc-functions.sh and PORTAGE_INST_{UID,GID}. Add svn path check.
authorKito <kito@gentoo.org>
Sat, 11 Mar 2006 19:16:46 +0000 (19:16 -0000)
committerKito <kito@gentoo.org>
Sat, 11 Mar 2006 19:16:46 +0000 (19:16 -0000)
svn path=/main/branches/prefix/; revision=2853

bin/misc-functions.sh
cnf/make.globals
configure.in
subst-install.vars.in.in

index 8ae5149fe807a085b967dc24b6598e1c8671c577..9cd614491485e9076708c09ab4f831110d03f1d9 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header$
@@ -14,7 +14,7 @@
 # XXX hack: clear the args so ebuild.sh doesn't see them
 MISC_FUNCTIONS_ARGS="$@"
 shift $#
-source /usr/lib/portage/bin/ebuild.sh
+source @PORTAGE_BASE@/bin/ebuild.sh
 
 install_qa_check() {
 
@@ -195,14 +195,14 @@ install_qa_check() {
                                        python -c "import os,stat; print '%o' % os.stat('$1')[stat.ST_MODE]"
                                }
                        else
-                               if [ "${USERLAND}" == "BSD" ] || [ "${USERLAND}" == "Darwin" ]; then
+                               if [ "${USERLAND}" == "BSD" ]; then
                                        do_stat() {
                                                # BSD version -- Octal result
                                                $(type -p stat) -f '%p' "$1"
                                        }
                                else
                                        do_stat() {
-                                               # Linux version -- Hex result converted to Octal
+                                               # GNU version -- Hex result converted to Octal
                                                f=$($(type -p stat) -c '%f' "$1") || return $?
                                                printf '%o' "0x$f"
                                        }
@@ -217,7 +217,7 @@ install_qa_check() {
 
        local file s
        local count=0
-       find "${D}/" -user  portage | while read file; do
+       find "${D}/" -user  @portageuser@ | while read file; do
                count=$(( $count + 1 ))
                if [ -L "${file}" ]; then
                        lchown ${PORTAGE_INST_UID} "${file}"
@@ -232,11 +232,11 @@ install_qa_check() {
                fi
        done
        if (( $count > 0 )); then
-               ewarn "$count files were installed with user portage!"
+               ewarn "$count files were installed with user @portageuser@!"
        fi
 
        count=0
-       find "${D}/" -group portage | while read file; do
+       find "${D}/" -group @portagegroup@ | while read file; do
                count=$(( $count + 1 ))
                if [ -L "${file}" ]; then
                        lchgrp ${PORTAGE_INST_GID} "${file}"
@@ -251,7 +251,7 @@ install_qa_check() {
                fi
        done
        if (( $count > 0 )); then
-               ewarn "$count files were installed with group portage!"
+               ewarn "$count files were installed with group @portagegroup@!"
        fi
 
        unset -f stat_perms
@@ -261,7 +261,7 @@ install_qa_check() {
                rm -f "${D}/usr/share/info/dir.gz"
        fi
 
-       if hasq multilib-strict ${FEATURES} && [ -x /usr/bin/file -a -x /usr/bin/find -a \
+       if hasq multilib-strict ${FEATURES} && [ -x file -a -x find -a \
             -n "${MULTILIB_STRICT_DIRS}" -a -n "${MULTILIB_STRICT_DENY}" ]; then
                MULTILIB_STRICT_EXEMPT=$(echo ${MULTILIB_STRICT_EXEMPT:-"(perl5|gcc|gcc-lib|debug|portage)"} | sed -e 's:\([(|)]\):\\\1:g')
                for dir in ${MULTILIB_STRICT_DIRS}; do
@@ -301,11 +301,13 @@ preinst_mask() {
        if [ -z "$IMAGE" ]; then
                 eerror "${FUNCNAME}: IMAGE is unset"
                 return 1
+       else
+               IMAGE="${IMAGE}/${PREFIX}"
        fi
        # remove man pages, info pages, docs if requested
        for f in man info doc; do
                if hasq no${f} $FEATURES; then
-                       INSTALL_MASK="${INSTALL_MASK} /usr/share/${f}"
+                       INSTALL_MASK="${INSTALL_MASK} ${PREFIX}/usr/share/${f}"
                fi
        done
 
@@ -344,7 +346,7 @@ preinst_suid_scan() {
        fi
        # total suid control.
        if hasq suidctl $FEATURES; then
-               sfconf=/etc/portage/suidctl.conf
+               sfconf=${PREFIX}/etc/portage/suidctl.conf
                echo ">>> Preforming suid scan in ${IMAGE}"
                for i in $(find ${IMAGE}/ -type f \( -perm -4000 -o -perm -2000 \) ); do
                        if [ -s "${sfconf}" ]; then
@@ -385,15 +387,15 @@ preinst_selinux_labels() {
                # SELinux file labeling (needs to always be last in dyn_preinst)
                # only attempt to label if setfiles is executable
                # and 'context' is available on selinuxfs.
-               if [ -f /selinux/context -a -x /usr/sbin/setfiles -a -x /usr/sbin/selinuxconfig ]; then
+               if [ -f /selinux/context -a -x ${PREFIX}/usr/sbin/setfiles -a -x ${PREFIX}/usr/sbin/selinuxconfig ]; then
                        echo ">>> Setting SELinux security labels"
                        (
-                               eval "$(/usr/sbin/selinuxconfig)" || \
+                               eval "$(${PREFIX}/usr/sbin/selinuxconfig)" || \
                                        die "Failed to determine SELinux policy paths.";
        
                                addwrite /selinux/context;
        
-                               /usr/sbin/setfiles "${file_contexts_path}" -r "${IMAGE}" "${IMAGE}";
+                               ${PREFIX}/usr/sbin/setfiles "${file_contexts_path}" -r "${IMAGE}" "${IMAGE}";
                        ) || die "Failed to set SELinux security labels."
                else
                        # nonfatal, since merging can happen outside a SE kernel
index d530a8dc2c5da1addf7abb9fb012214020870869..1224e37689df1aff7794cc54e465e2c2ed8a5585 100644 (file)
@@ -61,8 +61,8 @@ CONFIG_PROTECT="@DOMAIN_PREFIX@/etc"
 USE_ORDER="env:pkg:conf:defaults"
 
 # Default ownership of installed files.
-PORTAGE_INST_UID="0"
-PORTAGE_INST_GID="0"
+PORTAGE_INST_UID="@rootuid@"
+PORTAGE_INST_GID="@wheelgid@"
 
 #            *****************************
 #            **  DO NOT EDIT THIS FILE  **
index e3a3ff13f195fefd24aec55e4b16e59744a974b0..50582a59b6c15f64437067f550ff4bf0aed91ec6 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(portage, 2.0.53_rc4-prefix-02, ferringb@gentoo.org)
+AC_INIT(portage, 2.1.5-prefix, kito@gentoo.org)
 
 case "${prefix}" in
        '')     AC_MSG_ERROR([bad value ${prefix} for --prefix, must not be empty]) ;;
@@ -89,6 +89,7 @@ AC_PATH_PROG(SANDBOX, sandbox, /usr/bin/sandbox)
 AC_PATH_PROG(PRELINK, prelink, /usr/sbin/prelink)
 AC_PATH_PROG(RSYNC, rsync, /usr/bin/rsync)
 AC_PATH_PROG(CVS, cvs, /usr/bin/cvs)
+AC_PATH_PROG(SVN, svn, /usr/bin/svn)
 AC_PATH_PROGS(GPG, [gpg pgp], /usr/bin/gpg)
 AC_PATH_PROG(INSTALL_INFO, install-info, /usr/bin/install-info)
 AC_PATH_PROG(MD5SUM, md5sum, /usr/bin/md5sum)
index c4fdda295e5db5fe3dc02d46a135048ed3d6cab9..10099c636c327c49f1adfa094607ac6b1e453745 100644 (file)
@@ -94,6 +94,7 @@ SANDBOX=@SANDBOX@
 PRELINK=@PRELINK@
 RSYNC=@RSYNC@
 CVS=@CVS@
+SVN=@SVN@
 GPG=@GPG@
 MD5SUM=@MD5SUM@
 LOGGER=@LOGGER@