diff options
author | Zack Welch <zwelch@gentoo.org> | 2003-05-21 10:15:11 +0000 |
---|---|---|
committer | Zack Welch <zwelch@gentoo.org> | 2003-05-21 10:15:11 +0000 |
commit | 1e40a4743ceb1656fbe185dd140f5ed09ab51064 (patch) | |
tree | b8b9ca27a2254b47151c373c49edef1f92c32571 /sys-devel | |
parent | Update to latest versions; updates to distcc-config; see changelog (diff) | |
download | gentoo-2-1e40a4743ceb1656fbe185dd140f5ed09ab51064.tar.gz gentoo-2-1e40a4743ceb1656fbe185dd140f5ed09ab51064.tar.bz2 gentoo-2-1e40a4743ceb1656fbe185dd140f5ed09ab51064.zip |
Update to latest versions; updates to distcc-config; see changelog
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/distcc/ChangeLog | 10 | ||||
-rw-r--r-- | sys-devel/distcc/Manifest | 8 | ||||
-rw-r--r-- | sys-devel/distcc/distcc-2.3.ebuild | 94 | ||||
-rw-r--r-- | sys-devel/distcc/distcc-2.4.ebuild | 95 | ||||
-rw-r--r-- | sys-devel/distcc/files/2.3/distcc-config | 322 | ||||
-rw-r--r-- | sys-devel/distcc/files/digest-distcc-2.3 | 1 | ||||
-rw-r--r-- | sys-devel/distcc/files/digest-distcc-2.4 | 1 |
7 files changed, 526 insertions, 5 deletions
diff --git a/sys-devel/distcc/ChangeLog b/sys-devel/distcc/ChangeLog index d7a476dac3e4..65e7105dc556 100644 --- a/sys-devel/distcc/ChangeLog +++ b/sys-devel/distcc/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-devel/distcc # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.41 2003/04/28 20:27:33 zwelch Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.42 2003/05/21 10:15:09 zwelch Exp $ + +*distcc-2.4 (21 May 2003) + + 21 May 2003; Zach Welch <zwelch@gentoo.org distcc-2.3.ebuild, + files/2.3/distcc-config, distcc-2.4.ebuild: + Update to latest versions; updates to distcc-config to use new + DISTCC_HOSTS configuration. May require some cleaning of previous + settings, notably DISTCC_HOSTS in /etc/env.d/02distcc *distcc-2.0.1 (31 Mar 2003) diff --git a/sys-devel/distcc/Manifest b/sys-devel/distcc/Manifest index 442a2ba5394e..12cddf84e20e 100644 --- a/sys-devel/distcc/Manifest +++ b/sys-devel/distcc/Manifest @@ -1,8 +1,8 @@ -MD5 beaf94fb8c123ee9f9249ee12fa3db1f ChangeLog 7519 +MD5 2e30e9bfdc5825058c780bb657e5c920 ChangeLog 7540 MD5 960b9f9b17b8f9dd99094d162362dd1b distcc-2.0.1-r1.ebuild 2892 MD5 da890f4d3d7a6c3cb65ad47f80feff6a distcc-2.0.1.ebuild 2895 -MD5 3fcafd04f65581988deafd21759bb7d2 distcc-2.3.ebuild 2594 -MD5 dd09049e3a6e094fa4f3d02556262604 distcc-2.4.ebuild 2605 +MD5 8df905f30d3f4bce8c31534396b66ec8 distcc-2.3.ebuild 2691 +MD5 c242a8c0ff4035a2c6a3ee0545691aed distcc-2.4.ebuild 2702 MD5 372827ac4fc6b9dae1d585934369ce8e distcc-1.2.3-r3.ebuild 2882 MD5 9a3a39b4f229559e6a855d777c6fe807 files/digest-distcc-2.0.1-r1 65 MD5 8aa55227d128b8ff22a8caf5d47db89c files/digest-distcc-2.3 63 @@ -12,6 +12,6 @@ MD5 9a3a39b4f229559e6a855d777c6fe807 files/digest-distcc-2.0.1 65 MD5 6bc82bf32667e5398497b2dae88f1033 files/1.2.3/wrapper.patch 5242 MD5 22c6ce6c5fde53bc04590015d9d82e50 files/1.2.3/distcc-config 6858 MD5 d4fd07d7d3d3e3952baef8c654d2715f files/1.2.3/info.patch 545 -MD5 dab20ce3090c3a545ae19d95b88b903d files/2.3/distcc-config 7179 +MD5 8c3dc0b31a65a4ca1b36e0d8d9234cfb files/2.3/distcc-config 7374 MD5 be559a3c08d73712aeac74b8991a9cb3 files/1.2/init 696 MD5 34d20e7bf223ac2f2ec61c5a7a9b2e3c files/1.2/conf 314 diff --git a/sys-devel/distcc/distcc-2.3.ebuild b/sys-devel/distcc/distcc-2.3.ebuild new file mode 100644 index 000000000000..ad44b655b85b --- /dev/null +++ b/sys-devel/distcc/distcc-2.3.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-2.3.ebuild,v 1.1 2003/05/21 10:15:09 zwelch Exp $ + +inherit eutils + +IUSE="" + +HOMEPAGE="http://distcc.samba.org/" +SRC_URI="http://distcc.samba.org/ftp/distcc/distcc-${PV}.tar.bz2" +DESCRIPTION="a program to distribute compilation of C code across several machines on a network" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~mips ~arm" + +OPV="1.2" + +DEPEND=">=sys-apps/portage-2.0.46-r11 + >=sys-devel/gcc-config-1.3.1 + sys-apps/shadow + dev-libs/popt" + +src_compile() { + econf || die "econf failed" + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D%/}" install + + insinto /usr/share/doc/${PN} + doins "${S}/survey.txt" + + exeinto /usr/bin + doexe "${FILESDIR}/${PV}/distcc-config" + + insinto /etc/conf.d + newins "${FILESDIR}/${OPV}/conf" distccd + + exeinto /etc/init.d + newexe "${FILESDIR}/${OPV}/init" distccd + + # create and keep the symlink dir + dodir /usr/lib/distcc/bin + keepdir /usr/lib/distcc/bin + + # create the distccd pid directory + dodir /var/run/distccd + keepdir /var/run/distccd +} + +pkg_preinst() { + # non-/ installs don't require us to do anything here + [ "${ROOT}" != "/" ] && return 0 + + # stop daemon since script is being updated + [ -n "$(pidof distccd)" -a -x /etc/init.d/distccd ] && \ + /etc/init.d/distccd stop + + # moved user creation and permissions to distcc-config script + # because of ROOT install requirements +} + +pkg_postinst() { + if [ "${ROOT}" = "/" ]; then + einfo "Installing links to native compilers..." + /usr/bin/distcc-config --install-user + /usr/bin/distcc-config --install-links + /usr/bin/distcc-config --install-links "${CHOST}" + else + # distcc-config can *almost* handle ROOT installs itself + # but for now, but user must finsh things off + ewarn "*** Installation is not complete ***" + ewarn "You must run the following as root:" + ewarn " /usr/bin/distcc-config --install" + ewarn "after booting or chrooting into ${ROOT}" + fi + + einfo "To use distcc with **non-Portage** C compiling, add" + einfo "/usr/lib/distcc/bin to your path before /usr/bin. If you're" + einfo "combining this with ccache, put the distcc dir AFTER ccache." + einfo "Portage 2.0.46-r11+ will take advantage of distcc if you put" + einfo "distcc into the FEATURES setting in make.conf (and define" + einfo "DISTCC_HOSTS as well). Do NOT set CC=distcc or similar." + ewarn "See http://cvs.gentoo.org/~zwelch/distcc.html for information." +} + +#pkg_prerm() { +# # ztw - not sure if this is the right place +# distcc-config --remove-links "${CHOST}" +# distcc-config --remove-links +#} + diff --git a/sys-devel/distcc/distcc-2.4.ebuild b/sys-devel/distcc/distcc-2.4.ebuild new file mode 100644 index 000000000000..e006be2b7b69 --- /dev/null +++ b/sys-devel/distcc/distcc-2.4.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-2.4.ebuild,v 1.1 2003/05/21 10:15:09 zwelch Exp $ + +inherit eutils + +IUSE="" + +HOMEPAGE="http://distcc.samba.org/" +SRC_URI="http://distcc.samba.org/ftp/distcc/distcc-${PV}.tar.bz2" +DESCRIPTION="a program to distribute compilation of C code across several machines on a network" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~mips ~arm" + +OPV="1.2" +LPV="2.3" + +DEPEND=">=sys-apps/portage-2.0.46-r11 + >=sys-devel/gcc-config-1.3.1 + sys-apps/shadow + dev-libs/popt" + +src_compile() { + econf || die "econf failed" + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D%/}" install + + insinto /usr/share/doc/${PN} + doins "${S}/survey.txt" + + exeinto /usr/bin + doexe "${FILESDIR}/${LPV}/distcc-config" + + insinto /etc/conf.d + newins "${FILESDIR}/${OPV}/conf" distccd + + exeinto /etc/init.d + newexe "${FILESDIR}/${OPV}/init" distccd + + # create and keep the symlink dir + dodir /usr/lib/distcc/bin + keepdir /usr/lib/distcc/bin + + # create the distccd pid directory + dodir /var/run/distccd + keepdir /var/run/distccd +} + +pkg_preinst() { + # non-/ installs don't require us to do anything here + [ "${ROOT}" != "/" ] && return 0 + + # stop daemon since script is being updated + [ -n "$(pidof distccd)" -a -x /etc/init.d/distccd ] && \ + /etc/init.d/distccd stop + + # moved user creation and permissions to distcc-config script + # because of ROOT install requirements +} + +pkg_postinst() { + if [ "${ROOT}" = "/" ]; then + einfo "Installing links to native compilers..." + /usr/bin/distcc-config --install-user + /usr/bin/distcc-config --install-links + /usr/bin/distcc-config --install-links "${CHOST}" + else + # distcc-config can *almost* handle ROOT installs itself + # but for now, but user must finsh things off + ewarn "*** Installation is not complete ***" + ewarn "You must run the following as root:" + ewarn " /usr/bin/distcc-config --install" + ewarn "after booting or chrooting into ${ROOT}" + fi + + einfo "To use distcc with **non-Portage** C compiling, add" + einfo "/usr/lib/distcc/bin to your path before /usr/bin. If you're" + einfo "combining this with ccache, put the distcc dir AFTER ccache." + einfo "Portage 2.0.46-r11+ will take advantage of distcc if you put" + einfo "distcc into the FEATURES setting in make.conf (and define" + einfo "DISTCC_HOSTS as well). Do NOT set CC=distcc or similar." + ewarn "See http://cvs.gentoo.org/~zwelch/distcc.html for information." +} + +#pkg_prerm() { +# # ztw - not sure if this is the right place +# distcc-config --remove-links "${CHOST}" +# distcc-config --remove-links +#} + diff --git a/sys-devel/distcc/files/2.3/distcc-config b/sys-devel/distcc/files/2.3/distcc-config new file mode 100644 index 000000000000..4ca40100953d --- /dev/null +++ b/sys-devel/distcc/files/2.3/distcc-config @@ -0,0 +1,322 @@ +#!/bin/bash +# +# distcc-config - helper script for distcc and distccd +# +# Copyright 2003 Superlucidity Services, LLC +# This program licensed under the GNU GPL version 2. +# +# This script developed by Zachary T Welch at Superlucidity Services, LLC +# based on ideas from irc discussion and the clear need for this support +# +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.3/distcc-config,v 1.1 2003/05/21 10:15:09 zwelch Exp $ + + +[ -z "${ROOT}" ] && ROOT=/ + +# distcc-config manges the DISTCC_{HOSTS,LOG,VERBOSE} settings here +# moved to accomodate 02ccache and leave 0[14]* free +DCCC_ENV_FILE="${ROOT}etc/env.d/02distcc" +DCCC_OLD_ENV="${ROOT}etc/env.d/04distcc" + +is_super_user() { + [ "$(id -u)" = 0 ] +} +# this should be getopt'd someday (override with DCCC_QUIET) +DCCC_VERBOSE=1 + +source /sbin/functions.sh + +dccc_echo() { + [ -z "${DCCC_QUIET}" -a -n "${DCCC_VERBOSE}" ] && echo "$*" +} +dccc_exit() { + dccc_echo "$*" + exit 1 +} + +# create the appropriate configuration directory +is_super_user && \ + DCCC_HOSTS_FILE="/etc/distcc/hosts" || \ + DCCC_HOSTS_FILE="${HOME}/.distcc/hosts" +mkdir -p $(dirname ${DCCC_HOSTS_FILE}) || \ + dccc_exit "unable to create configuration directory" + + +### +# the following functions manage the distcc symlinks +# they allow the user or other scripts (namely gcc-config) to +# automatically update distcc's links when upgrading toolchains +# +dccc_remove_link() { + local t="${ROOT}usr/lib/distcc/bin/${1}" + if [ -L ${t} ]; then + dccc_echo "Removing ${t}..." + rm -f "${t}" + fi +} +dccc_install_link() { + # Search the PATH for the specified compiler + # then create shadow link in ${ROOT}usr/lib/distcc/bin to distcc + # note: this `type' doesn't do the right thing if ROOT != / + if [ -n "$(type -p ${1})" ]; then + # first be sure any old link is removed + DCCC_QUIET=1 dccc_remove_link "${1}" + + # then create the new link + local t="${ROOT}usr/lib/distcc/bin/${1}" + dccc_echo "Creating distcc shadow link: ${t}..." + ln -s /usr/bin/distcc "${t}" + fi +} +dccc_links() { + local a + for a in gcc cc c++ g++ ; do + [ -n "${2}" ] && a="${2}-${a}" + eval "dccc_${1}_link" "${a}" + done +} + +dccc_install_user() { + # update or create, depending on whether user already exists + einfo "Updating or creating distcc user..." + local USERFIX + id distcc >/dev/null 2>&1 && USERFIX=usermod || USERFIX=useradd + USERFIX="/usr/sbin/${USERFIX}" + if [ -x "${USERFIX}" ] + then + if ! ${USERFIX} -g daemon -s /bin/false -d /dev/null \ + -c "distccd" distcc + then + dccc_exit "unable to create or modify user" + fi + elif [ "${USERFIX}" = "/usr/sbin/useradd" ] + then + ewarn "${USERFIX} not found: You need to add the distcc user" + ewarn "to /etc/passwd by hand. Add the following line:\n" + ewarn " distcc:x:240:2:distccd:/dev/null:/bin/false\n" + ewarn "and then run 'distcc-config --install' again root." + dccc_exit "Unable to create distcc user!" + fi + + for d in ${ROOT}usr/lib/distcc/bin ${ROOT}var/run/distccd ; do + einfo "Configuring $d..." + chown distcc:daemon $d && chmod 0755 $d || \ + dccc_exit "Unable to configure ${d}!" + done +} + +dccc_guess_chost() { + echo "$(grep CHOST /etc/make.conf | \ + grep -v '^#' | sed 's,^.*=\"\(.*\)\",\1,')" + +} + +###### +# routines for manipulating ${DCCC_ENV_FILE} + +dccc_install_env() { + [ -f ${DCCC_OLD_ENV} ] && mv ${DCCC_OLD_ENV} ${DCCC_ENV_FILE} + [ -f ${DCCC_ENV_FILE} ] && return + einfo "Creating ${DCCC_ENV_FILE}..." + cat <<_EOF_ > ${DCCC_ENV_FILE} || \ + dccc_exit "Unable to create ${DCCC_ENV_FILE}..." +# This file is managed by distcc-config; use it to change these settings. +DISTCC_HOSTS="localhost" +# DISTCC_VERBOSE is not set +# DISTCC_LOG is not set +# DCCC_PATH is not set +_EOF_ +} + +dccc_show_env() { + grep -v '^#' ${DCCC_ENV_FILE} | sed -e 's,^,export ,' +} + +dccc_test_env() { + dccc_show_env | grep "$1" | tail -1 | sed -e "s,${1}=,," +} + +dccc_load_defaults() { + rm -f ${DCCC_ENV_FILE} + dccc_install_env +} + +dccc_set_env() { + local xxENV="${1}" + shift + dccc_install_env + mv -f ${DCCC_ENV_FILE} ${DCCC_ENV_FILE}.tmp + if [ -n "${*}" ]; then + einfo "Setting ${xxENV}=\"${*}\"" + else + einfo "Clearing ${xxENV}" + fi + # redirect the following block to create new file + { + egrep -v "${xxENV}[= ]" ${DCCC_ENV_FILE}.tmp + if [ -n "${*}" ]; then + echo "${xxENV}=\"${*}\"" + else + echo "# ${xxENV} is not set" + fi + } >> ${DCCC_ENV_FILE} + rm -f ${DCCC_ENV_FILE}.tmp +} +dccc_regen_env() { + env-update + if [ -z "${DCCC_NO_WARN}" ]; then + einfo "If you want to use these new settings in an existing shell," + einfo "you need to 'source /etc/profile' to get the changes." + fi +} + +dccc_get_env() { + if [ -f ${DCCC_ENV_FILE} ]; then + local xxENV="$(grep ${1} ${DCCC_ENV_FILE} | \ + grep -v '^#' | tail -1)" + echo ${xxENV#*=} | sed -e 's,^",,;s,"$,,' + elif [ -n "${2}" ]; then + echo "${2}" + fi +} + +dccc_set_hosts() { + echo "${*}" > $DCCC_HOSTS_FILE +} +dccc_get_hosts() { + cat $DCCC_HOSTS_FILE +} + +dccc_set_verbose() { + dccc_set_env DISTCC_VERBOSE ${1} + dccc_regen_env +} +dccc_get_verbose() { + dccc_get_env DISTCC_VERBOSE +} + +dccc_set_log() { + dccc_set_env DISTCC_LOG ${1} + dccc_regen_env +} +dccc_get_log() { + dccc_get_env DISTCC_LOG +} + +dccc_set_j() { + local j="$(echo ${1} | sed -e 's,[^0-9],,g')" + [ -z "${j}" ] && \ + dccc_exit "$0: invalid -j option (must be a number)" + dccc_set_env MAKEOPTS "-j${j}" + dccc_regen_env +} +dccc_get_j() { + dccc_get_env MAKEOPTS +} + +#### +# main install routine + +dccc_install() { + local xxCHOST + dccc_install_user + dccc_links install "" + for f in make.conf make.globals make.profile/make.defaults + do + xxCHOST="$(dccc_guess_chost /etc/${f})" + if [ -n "${xxCHOST}" ]; then + dccc_links install "${xxCHOST}" + break + fi + done + + dccc_install_env +} + + +### +# main routine + +# helper checks that user has privs +must_be_root() { + if ! is_super_user + then + [ -n "${1}" -a "${1}" = "${2}" ] && return + dccc_exit "$0 $1 must be run by root" + fi +} + + +# The --no-profile-warning option is meant to be used with +# the following helper function (add to ~/.bashrc) +# +# distcc-config() { +# command distcc-config --no-profile-warning "$@" && \ +# source /etc/profile +# } + +if [ "${1}" = "--no-profile-warning" ]; then + DCCC_NO_WARN=1 + shift +fi + +case "${1}" in + --get-* ) + eval "dccc_$(echo ${1} | sed -e 's/^--//;s/-/_/g')" + ;; + --set-* ) + must_be_root "--set-hosts" "${1}" + SET_FUNC="$(echo ${1} | sed -e 's/^--//;s/-/_/g')" + shift + [ "${#}" -eq 0 ] && dccc_exit "argument required" + eval "dccc_${SET_FUNC} ${*}" + ;; + --has-path ) + dccc_test_env DCCC_PATH + ;; + --add-path ) + must_be_root + dccc_set_env DCCC_PATH "/usr/lib/distcc/bin" + dccc_regen_env + if [ -z "${DCCC_NO_WARN}" ]; then + einfo "You must then set PATH=\"${DCCC_PATH}/\${PATH}\"" + fi + ;; + --no-path ) + must_be_root + dccc_set_env DCCC_PATH "" + dccc_regen_env + ;; + --show-env ) + dccc_show_env + ;; + --load-defaults ) + must_be_root + dccc_load_defaults + ;; + --install ) + must_be_root + dccc_install + ;; + --install-user ) + must_be_root + dccc_install_user + ;; + --install-links ) + must_be_root + dccc_links install "${2}" + ;; + --remove-links ) + must_be_root + dccc_links remove "${2}" + ;; + * ) + echo "usage: ${0} --set-hosts DISTCC_HOSTS | --get-hosts" + echo " ${0} --set-verbose { 0 | 1 } | --get-verbose" + echo " ${0} --set-log FILE | --get-log" + echo " ${0} --add-path | --no-path" +# echo " ${0} --install-links | --remove-links } [ CHOST ]" + exit 1 + ;; +esac + diff --git a/sys-devel/distcc/files/digest-distcc-2.3 b/sys-devel/distcc/files/digest-distcc-2.3 new file mode 100644 index 000000000000..3759c5ab4330 --- /dev/null +++ b/sys-devel/distcc/files/digest-distcc-2.3 @@ -0,0 +1 @@ +MD5 ead898174612b959141e56f0202afb1b distcc-2.3.tar.bz2 211626 diff --git a/sys-devel/distcc/files/digest-distcc-2.4 b/sys-devel/distcc/files/digest-distcc-2.4 new file mode 100644 index 000000000000..3fdb1f001cdf --- /dev/null +++ b/sys-devel/distcc/files/digest-distcc-2.4 @@ -0,0 +1 @@ +MD5 e996c2dd500c3d693f507c88b3c565bb distcc-2.4.tar.bz2 216087 |