From 9cbba797445a2c8bc55b2d91833a06b7caa26783 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Tue, 14 Aug 2018 00:10:54 +0000 Subject: Tue Aug 14 00:10:54 UTC 2018 a/etc-15.0-x86_64-8.txz: Rebuilt. /etc/passwd: Added icecc (UID 49). /etc/group: Added icecc (GID 49). a/pciutils-3.6.2-x86_64-1.txz: Upgraded. a/sysvinit-scripts-2.1-noarch-17.txz: Rebuilt. rc.M: start rc.icecc-scheduler and rc.iceccd. d/icecream-1.1-x86_64-1.txz: Added. Thanks to Heinz Wiesinger for the SBo reference build script. n/libmbim-1.16.2-x86_64-1.txz: Upgraded. n/libqmi-1.20.2-x86_64-1.txz: Upgraded. n/p11-kit-0.23.13-x86_64-1.txz: Upgraded. x/xterm-334-x86_64-1.txz: Upgraded. --- source/d/icecream/doinst.sh | 33 ++++++++ source/d/icecream/icecream.SlackBuild | 137 ++++++++++++++++++++++++++++++++++ source/d/icecream/icecream.csh | 19 +++++ source/d/icecream/icecream.sh | 10 +++ source/d/icecream/rc.icecc-scheduler | 43 +++++++++++ source/d/icecream/rc.iceccd | 43 +++++++++++ source/d/icecream/rc.icecream.conf | 15 ++++ source/d/icecream/slack-desc | 19 +++++ 8 files changed, 319 insertions(+) create mode 100644 source/d/icecream/doinst.sh create mode 100755 source/d/icecream/icecream.SlackBuild create mode 100644 source/d/icecream/icecream.csh create mode 100644 source/d/icecream/icecream.sh create mode 100644 source/d/icecream/rc.icecc-scheduler create mode 100644 source/d/icecream/rc.iceccd create mode 100644 source/d/icecream/rc.icecream.conf create mode 100644 source/d/icecream/slack-desc (limited to 'source/d/icecream') diff --git a/source/d/icecream/doinst.sh b/source/d/icecream/doinst.sh new file mode 100644 index 000000000..073dffa10 --- /dev/null +++ b/source/d/icecream/doinst.sh @@ -0,0 +1,33 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname ${NEW})/$(basename ${NEW} .new)" + if [ -e ${OLD} ]; then + cp -a ${OLD} ${NEW}.incoming + cat ${NEW} > ${NEW}.incoming + mv ${NEW}.incoming ${NEW} + fi + config ${NEW} +} + +preserve_perms etc/rc.d/rc.iceccd.new +preserve_perms etc/rc.d/rc.icecc-scheduler.new +config etc/rc.d/rc.icecream.conf.new + +if ! grep -q "^icecc:" etc/passwd ; then + echo "icecc:x:49:49:User for Icecream distributed compiler:/var/cache/icecream:/bin/false" >> etc/passwd +fi +if ! grep -q "^icecc:" etc/group ; then + echo "icecc:x:49:" >> etc/group +fi diff --git a/source/d/icecream/icecream.SlackBuild b/source/d/icecream/icecream.SlackBuild new file mode 100755 index 000000000..f3c25d73b --- /dev/null +++ b/source/d/icecream/icecream.SlackBuild @@ -0,0 +1,137 @@ +#!/bin/sh + +# Copyright 2009-2018 Heinz Wiesinger, Amsterdam, The Netherlands +# Copyright 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=icecream +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +NUMJOBS=${NUMJOBS:-" -j7 "} + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.lz || exit 1 +cd $PKGNAM-$VERSION || exit 1 + +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +./autogen.sh || exit 1 + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --enable-clang-rewrite-includes \ + --enable-clang-wrappers \ + --enable-shared \ + --disable-static \ + --build=$ARCH-slackware-linux || exit 1 + +make $NUMJOBS || make || exit 1 +make install-strip DESTDIR=$PKG || exit 1 + +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +mkdir -p $PKG/etc/profile.d/ +cp -a $CWD/icecream.{csh,sh} $PKG/etc/profile.d/ +chown root:root $PKG/etc/profile.d/* +chmod 755 $PKG/etc/profile.d/* + +# Install init scripts and config file: +mkdir -p $PKG/etc/rc.d +cp -a $CWD/rc.iceccd $PKG/etc/rc.d/rc.iceccd.new +cp -a $CWD/rc.icecc-scheduler $PKG/etc/rc.d/rc.icecc-scheduler.new +cp -a $CWD/rc.icecream.conf $PKG/etc/rc.d/rc.icecream.conf.new +chown root:root $PKG/etc/rc.d/* +chmod 644 $PKG/etc/rc.d/* + +# Add Slackware compiler symlinks: +for i in $ARCH-slackware-linux-c++ $ARCH-slackware-linux-g++ \ + $ARCH-slackware-linux-gcc $ARCH-slackware-linux-clang \ + $ARCH-slackware-linux-clang++; do + ln -s /usr/bin/icecc $PKG/usr/libexec/icecc/bin/$i +done + +mkdir -p $PKG/var/{cache,log}/icecream +chown icecc:icecc $PKG/var/{cache,log}/icecream + +find $PKG/usr/man -type f -exec gzip -9 {} \; + +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a \ + BENCH* COPYING* NEWS* README* TODO* \ + $PKG/usr/doc/$PKGNAM-$VERSION + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PKGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/source/d/icecream/icecream.csh b/source/d/icecream/icecream.csh new file mode 100644 index 000000000..6c558d615 --- /dev/null +++ b/source/d/icecream/icecream.csh @@ -0,0 +1,19 @@ +#!/bin/csh +# Only add the icecream directory to the PATH if we see that icecc-scheduler +# and/or iceccd are running on this machine: + +setenv ICECC_PRESENT false +/usr/bin/pgrep --ns $$ -f "^/usr/sbin/icecc-scheduler" > /dev/null +if ( $? == 0 ) then + setenv ICECC_PRESENT true +endif + +/usr/bin/pgrep --ns $$ -f "^/usr/sbin/iceccd" > /dev/null +if ( $? == 0 ) then + setenv ICECC_PRESENT true +endif + +if ( $ICECC_PRESENT == true ) then + setenv PATH /usr/libexec/icecc/bin:${PATH} +endif + diff --git a/source/d/icecream/icecream.sh b/source/d/icecream/icecream.sh new file mode 100644 index 000000000..5e0afd573 --- /dev/null +++ b/source/d/icecream/icecream.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Only add the icecream directory to the PATH if we see that icecc-scheduler +# and/or iceccd are running on this machine: + +if /usr/bin/pgrep --ns $$ -f "^/usr/sbin/icecc-scheduler" > /dev/null ; then + export PATH=/usr/libexec/icecc/bin:$PATH +elif /usr/bin/pgrep --ns $$ -f "^/usr/sbin/iceccd" > /dev/null ; then + export PATH=/usr/libexec/icecc/bin:$PATH +fi + diff --git a/source/d/icecream/rc.icecc-scheduler b/source/d/icecream/rc.icecc-scheduler new file mode 100644 index 000000000..b407f26e7 --- /dev/null +++ b/source/d/icecream/rc.icecc-scheduler @@ -0,0 +1,43 @@ +#!/bin/sh +# Start/stop/restart scheduler. +# $Id: rc.scheduler,v 1.0 2009/04/18 +# Author: Heinz Wiesinger +# --------------------------------------------------------------------------- + +# Get the configuration information from /etc/rc.d/rc.icecream.conf: +. /etc/rc.d/rc.icecream.conf + +# Start scheduler: +scheduler_start() { + if [ -x /usr/sbin/icecc-scheduler ]; then + echo "Starting distributed compiler scheduler: /usr/sbin/icecc-scheduler $ICECC_SCHEDULER_OPTIONS" + /usr/sbin/icecc-scheduler $ICECC_SCHEDULER_OPTIONS + fi +} + +# Stop scheduler: +scheduler_stop() { + echo "Stopping icecc-scheduler." + killall icecc-scheduler +} + +# Restart scheduler: +scheduler_restart() { + scheduler_stop + sleep 1 + scheduler_start +} + +case "$1" in +'start') + scheduler_start + ;; +'stop') + scheduler_stop + ;; +'restart') + scheduler_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac diff --git a/source/d/icecream/rc.iceccd b/source/d/icecream/rc.iceccd new file mode 100644 index 000000000..93b4d1702 --- /dev/null +++ b/source/d/icecream/rc.iceccd @@ -0,0 +1,43 @@ +#!/bin/sh +# Start/stop/restart iceccd. +# $Id: rc.iceccd,v 1.0 2009/04/18 +# Author: Heinz Wiesinger +# --------------------------------------------------------------------------- + +# Get the configuration information from /etc/rc.d/rc.icecream.conf: +. /etc/rc.d/rc.icecream.conf + +# Start iceccd: +iceccd_start() { + if [ -x /usr/sbin/iceccd ]; then + echo "Starting distributed compiler daemon: /usr/sbin/iceccd $ICECCD_OPTIONS" + /usr/sbin/iceccd $ICECCD_OPTIONS + fi +} + +# Stop iceccd: +iceccd_stop() { + echo "Stopping iceccd." + killall iceccd +} + +# Restart iceccd: +iceccd_restart() { + iceccd_stop + sleep 1 + iceccd_start +} + +case "$1" in +'start') + iceccd_start + ;; +'stop') + iceccd_stop + ;; +'restart') + iceccd_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac diff --git a/source/d/icecream/rc.icecream.conf b/source/d/icecream/rc.icecream.conf new file mode 100644 index 000000000..ce91ce65a --- /dev/null +++ b/source/d/icecream/rc.icecream.conf @@ -0,0 +1,15 @@ +# /etc/rc.d/rc.icecream.conf +# +# This file contains the configuration settings for both iceccd and scheduler + +# Defines the network name used to determine which nodes can be used for +# the compile processes. That way you can have several icecream clusters +# in the same network. +ICECC_NETWORK=$(hostname -d) + +# Defines the options passed to icecc-scheduler: +ICECC_SCHEDULER_OPTIONS="-n $ICECC_NETWORK -d -l /var/log/icecream/icecc-scheduler.log" + +# Defines the options passed to iceccd: +ICECCD_OPTIONS="-n $ICECC_NETWORK -d -b /var/cache/icecream -l /var/log/icecream/iceccd.log" + diff --git a/source/d/icecream/slack-desc b/source/d/icecream/slack-desc new file mode 100644 index 000000000..379654cd0 --- /dev/null +++ b/source/d/icecream/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +icecream: icecream (distributed C/C++ compiler daemon/scheduler) +icecream: +icecream: Icecream is a distributed compile system. Icecream was created by SUSE +icecream: based on distcc. Like distcc, Icecream takes compile jobs from a build +icecream: and distributes it among remote machines allowing a parallel build. +icecream: But unlike distcc, Icecream uses a central server that dynamically +icecream: schedules the compile jobs to the fastest free server. +icecream: +icecream: Homepage: https://github.com/icecc/icecream +icecream: +icecream: -- cgit v1.2.3