diff options
author | Zack Welch <zwelch@gentoo.org> | 2003-03-12 05:32:40 +0000 |
---|---|---|
committer | Zack Welch <zwelch@gentoo.org> | 2003-03-12 05:32:40 +0000 |
commit | f02e0ff07936661fd282b3896b9071a0b7e60ead (patch) | |
tree | 3a2206546ac93b5b520095a84723e378b612a40f /sys-devel | |
parent | removed crusty ebuilds (diff) | |
download | gentoo-2-f02e0ff07936661fd282b3896b9071a0b7e60ead.tar.gz gentoo-2-f02e0ff07936661fd282b3896b9071a0b7e60ead.tar.bz2 gentoo-2-f02e0ff07936661fd282b3896b9071a0b7e60ead.zip |
add shadow as DEPEND, fix distcc-config if shadow tools not installed
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/distcc/ChangeLog | 7 | ||||
-rw-r--r-- | sys-devel/distcc/distcc-1.2.3.ebuild | 3 | ||||
-rw-r--r-- | sys-devel/distcc/files/1.2.1/distcc-config | 29 |
3 files changed, 33 insertions, 6 deletions
diff --git a/sys-devel/distcc/ChangeLog b/sys-devel/distcc/ChangeLog index c52003a8b060..a53f899f8be6 100644 --- a/sys-devel/distcc/ChangeLog +++ b/sys-devel/distcc/ChangeLog @@ -1,9 +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.31 2003/03/07 21:09:17 zwelch Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.32 2003/03/12 05:32:40 zwelch Exp $ *distcc-1.2.3 (03 Mar 2003) + 11 Mar 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.3.ebuild, + files/1.2.1/distcc-config: + add shadow as DEPEND (for now), fix distcc-config if shadow tools not + installed (for later) + 07 Mar 2003; Zach Welch <zwelch@gentoo.org> distcc-1.2.3.ebuild: mark distcc-1.2.3 as stable on x86 and ppc diff --git a/sys-devel/distcc/distcc-1.2.3.ebuild b/sys-devel/distcc/distcc-1.2.3.ebuild index 7cbe9a4c369c..58c7571e5df6 100644 --- a/sys-devel/distcc/distcc-1.2.3.ebuild +++ b/sys-devel/distcc/distcc-1.2.3.ebuild @@ -1,6 +1,6 @@ # 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-1.2.3.ebuild,v 1.2 2003/03/07 21:09:17 zwelch Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-1.2.3.ebuild,v 1.3 2003/03/12 05:32:40 zwelch Exp $ inherit eutils @@ -19,6 +19,7 @@ LPV="1.2.1" DEPEND=">=sys-apps/portage-2.0.46-r11 >=sys-devel/gcc-config-1.3.1 + sys-apps/shadow dev-libs/popt" src_unpack() { diff --git a/sys-devel/distcc/files/1.2.1/distcc-config b/sys-devel/distcc/files/1.2.1/distcc-config index 4f0e23b64722..f056dc63a45c 100644 --- a/sys-devel/distcc/files/1.2.1/distcc-config +++ b/sys-devel/distcc/files/1.2.1/distcc-config @@ -10,6 +10,7 @@ # # Additional features to come; this provides a starting point + [ -z "${ROOT}" ] && ROOT=/ source /sbin/functions.sh @@ -20,6 +21,12 @@ DCCC_VERBOSE=1 dccc_echo() { [ -n "${DCCC_VERBOSE}" ] && echo "$*" } +dccc_exit() { + dccc_echo "$*" + exit 1 +} + +[ "$(id -u)" != 0 ] && dccc_exit "$0 must be run by root" ### # the following functions manage the distcc symlinks @@ -60,13 +67,27 @@ dccc_install_user() { einfo "Updating or creating distcc user..." local USERFIX id distcc >/dev/null 2>&1 && USERFIX=usermod || USERFIX=useradd - ${USERFIX} -g daemon -s /bin/false -d /dev/null \ - -c "distccd" distcc || die + 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 + chown distcc:daemon $d && chmod 0755 $d || \ + dccc_exit "Unable to configure ${d}!" done } |