diff options
author | Ben Widawsky | 2015-06-11 18:14:23 -0700 |
---|---|---|
committer | Ben Widawsky | 2015-06-11 18:14:41 -0700 |
commit | 1e04d1482bf63d555ecc060532013bd27bfd9651 (patch) | |
tree | 0071e9fe3ff6ebce698985774e77ca6e9fcaa3e2 | |
download | aur-1e04d1482bf63d555ecc060532013bd27bfd9651.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | icecream-scheduler.service | 10 | ||||
-rw-r--r-- | icecream-schedulerd | 15 | ||||
-rw-r--r-- | icecream.conf | 83 | ||||
-rw-r--r-- | icecream.install | 18 | ||||
-rw-r--r-- | icecream.service | 10 | ||||
-rw-r--r-- | icecreamd | 35 | ||||
-rw-r--r-- | ld-icecream.conf | 1 |
9 files changed, 269 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..02878ccd2d37 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = icecream + pkgdesc = Icecream takes compile jobs from your build and distributes it to remote machines allowing a parallel build on several machines. + pkgver = 1.1rc1 + pkgrel = 2 + url = http://en.opensuse.org/Icecream + install = icecream.install + arch = i686 + arch = x86_64 + license = GPL2 + depends = gcc + depends = bash + depends = libcap-ng + optdepends = iceberg-git: A QT based monitor for icecream nodes + optdepends = ccache: ccache enabled remote builds. + provides = icecream + conflicts = icecream-git + backup = etc/icecream.conf + source = https://github.com/icecc/icecream/archive/1.1rc1/icecream-1.1rc1.tar.gz + source = icecream.conf + source = icecream.service + source = icecream-scheduler.service + source = icecreamd + source = icecream-schedulerd + source = ld-icecream.conf + sha256sums = 95bdb66228cc8f5d97a829f1ee4e3f2d32caf064e9614919e8af0f708a13c654 + sha256sums = a170a26e8e12181bf491cfc238e60158088b660ce6139faca502a400365a3632 + sha256sums = 538797a229695d4c36e83c78c712b300bbc294238ec7964f427a73ecdf23aadc + sha256sums = 81a549dcf071cef98ea8a0fdab1aee0686555eb3c67c709a9d90c1e2c9e4b685 + sha256sums = e9bf8f0bb2b32c34fe99786fe82a058c4a326149d5f58dd1e3dc8f26e7d2fa04 + sha256sums = 461c8445438cf9688684ef547cad61f3c389dbc160086e214a28adba97d5afa1 + sha256sums = 2221f16c3293dfd86e4d0442745b104380a4a1623ca3c9eb6bfe5771552fac65 + +pkgname = icecream + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..09e65ccb9496 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Ben Widawsky <ben@bwidawsk.net> +# Contributor: Isaac C. Aronson <isaac@pingas.org> (original PKGBUILD) +# Contributor: Sergio Correia <sergio@correia.cc> (modifications derived from icecream-git package) + +# This package is currently under version control here: +# https://gitlab.com/bwidawsk/pkgbuild-icecream +# +# It is "built" against: +# 7b4c22ce2e99c6e18c986bd28d31e9e17c85d5ea + +pkgname=icecream +pkgver=1.1rc1 +pkgrel=2 +pkgdesc="Icecream takes compile jobs from your build and distributes it to remote machines allowing a parallel build on several machines." +url="http://en.opensuse.org/Icecream" +license="GPL2" +builddepends=('docbook2x') +depends=('gcc' 'bash' 'libcap-ng') +provides=('icecream') +optdepends=('iceberg-git: A QT based monitor for icecream nodes' + 'ccache: ccache enabled remote builds.') +conflicts=('icecream-git') +backup=('etc/icecream.conf') +arch=('i686' 'x86_64') +install=icecream.install +source=("https://github.com/icecc/$pkgname/archive/1.1rc1/$pkgname-$pkgver.tar.gz" + icecream.conf + icecream.service + icecream-scheduler.service + icecreamd + icecream-schedulerd + ld-icecream.conf) +sha256sums=('95bdb66228cc8f5d97a829f1ee4e3f2d32caf064e9614919e8af0f708a13c654' + 'a170a26e8e12181bf491cfc238e60158088b660ce6139faca502a400365a3632' + '538797a229695d4c36e83c78c712b300bbc294238ec7964f427a73ecdf23aadc' + '81a549dcf071cef98ea8a0fdab1aee0686555eb3c67c709a9d90c1e2c9e4b685' + 'e9bf8f0bb2b32c34fe99786fe82a058c4a326149d5f58dd1e3dc8f26e7d2fa04' + '461c8445438cf9688684ef547cad61f3c389dbc160086e214a28adba97d5afa1' + '2221f16c3293dfd86e4d0442745b104380a4a1623ca3c9eb6bfe5771552fac65') +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./autogen.sh + ./configure --prefix=/usr/lib/icecream --enable-shared --disable-static --without-man + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir" install + install -D -m755 "$srcdir"/icecream.conf "$pkgdir/etc/icecream.conf" + install -D -m755 "$srcdir"/icecreamd "$pkgdir/usr/lib/icecream/icecreamd" + install -D -m755 "$srcdir"/icecream-schedulerd "$pkgdir/usr/lib/icecream/icecream-schedulerd" + install -D -m644 "$srcdir"/icecream-scheduler.service "$pkgdir/usr/lib/systemd/system/icecream-scheduler.service" + install -D -m644 "$srcdir"/icecream.service "$pkgdir/usr/lib/systemd/system/icecream.service" + install -D -m644 "$srcdir"/ld-icecream.conf "${pkgdir}/etc/ld.so.conf.d/icecream.conf" + + # moving pkg-config file to its usual place + install -D -m644 "${pkgdir}/usr/lib/icecream/lib/pkgconfig/icecc.pc" "${pkgdir}/usr/lib/pkgconfig/icecc.pc" + rm -rf "${pkgdir}/usr/lib/icecream/lib/pkgconfig" +} +# vim:set ts=2 sw=2 et: diff --git a/icecream-scheduler.service b/icecream-scheduler.service new file mode 100644 index 000000000000..eda4c204ac95 --- /dev/null +++ b/icecream-scheduler.service @@ -0,0 +1,10 @@ +[Unit] +Description=icecream scheduler +Wants=network.target + +[Service] +Type=forking +ExecStart=/usr/lib/icecream/icecream-schedulerd + +[Install] +Alias=multi-user.target.wants/icecream-scheduler.service diff --git a/icecream-schedulerd b/icecream-schedulerd new file mode 100644 index 000000000000..6e28204f45d0 --- /dev/null +++ b/icecream-schedulerd @@ -0,0 +1,15 @@ +#!/bin/bash +. /etc/icecream.conf + +netname= +if test -n "${ICECREAM_NETNAME}"; then + netname="-n ${ICECREAM_NETNAME}" +fi +logfile="" +if test -n "${ICECREAM_LOG_FILE}"; then + touch ${ICECREAM_LOG_FILE} + chown icecc:icecc ${ICECREAM_LOG_FILE} + logfile="-l ${ICECREAM_LOG_FILE}" +fi + +/usr/lib/icecream/sbin/icecc-scheduler -d ${netname} ${logfile} &>/dev/null diff --git a/icecream.conf b/icecream.conf new file mode 100644 index 000000000000..1e7bc7e0c79b --- /dev/null +++ b/icecream.conf @@ -0,0 +1,83 @@ +# +## Type: integer(0:19) +## Path: Applications/icecream +## Description: Icecream settings +## ServiceRestart: icecream +## Default: 5 +# +# Nice level of running compilers +# +ICECREAM_NICE_LEVEL="5" + +# +## Type: string +## Path: Applications/icecream +## Defaut: /var/log/iceccd +# +# icecream daemon log file +# +ICECREAM_LOG_FILE="/var/log/iceccd" + +# +## Type: string +## Path: Applications/icecream +## Defaut: /var/log/icecc_scheduler +# +# icecream scheduler log file +# +ICECREAM_SCHEDULER_LOG_FILE="/var/log/icecc_scheduler" + +# +## Type: string +## Path: Applications/icecream +## Defaut: "" +# +# Identification for the network the scheduler and daemon run on. +# You can have several distinct icecream networks in the same LAN +# for whatever reason. +# +ICECREAM_NETNAME="" + +# +## Type: string +## Path: Applications/icecream +## Defaut: "" +# +# If the daemon can't find the scheduler by broadcast (e.g. because +# of a firewall) you can specify it. +# +ICECREAM_SCHEDULER_HOST="" + +# +## Type: integer +## Path: Applications/icecream +## Defaut: "" +# +# You can overwrite here the number of jobs to run in parallel. Per +# default this depends on the number of (virtual) CPUs installed. +# +# Note: a value of "0" is actually interpreted as "1", however it +# also sets ICECREAM_ALLOW_REMOTE="no". +# +ICECREAM_MAX_JOBS="" + +# +## Type: yesno +## Path: Applications/icecream +## Defaut: "yes" +# +# Specifies whether jobs submitted by other nodes are allowed to run on +# this one. +# +ICECREAM_ALLOW_REMOTE="yes" + +# +## Type: string +## Path: Applications/icecream +## Default: "/var/cache/icecream" +# +# This is the directory where the icecream daemon stores the environments +# it compiles in. In a big network this can grow quite a bit, so use some +# path if your /tmp is small - but the user icecream has to write to it. +# +ICECREAM_BASEDIR="/var/cache/icecream" diff --git a/icecream.install b/icecream.install new file mode 100644 index 000000000000..b2c5b4b54615 --- /dev/null +++ b/icecream.install @@ -0,0 +1,18 @@ +post_install() { + getent group icecc &>/dev/null || groupadd -r icecc >/dev/null + getent passwd icecc &>/dev/null || useradd -r -g icecc -s /bin/false -c "Icecream Daemon" -d /var/cache/icecream icecc 2>/dev/null + mkdir -p /var/cache/icecream + touch /var/log/icecc_scheduler + touch /var/log/iceccd + chown -R icecc:icecc /var/cache/icecream /var/log/icecc_scheduler /var/log/iceccd +} + +post_upgrade() { + post_install +} + +post_remove() { + getent passwd icecc &>/dev/null && userdel icecc >/dev/null + getent group icecc &>/dev/null && groupdel icecc >/dev/null + true +} diff --git a/icecream.service b/icecream.service new file mode 100644 index 000000000000..b5e464f0c4f9 --- /dev/null +++ b/icecream.service @@ -0,0 +1,10 @@ +[Unit] +Description=icecream worker +Wants=network.target + +[Service] +Type=forking +ExecStart=/usr/lib/icecream/icecreamd + +[Install] +Alias=multi-user.target.wants/icecream.service diff --git a/icecreamd b/icecreamd new file mode 100644 index 000000000000..8659713f03d3 --- /dev/null +++ b/icecreamd @@ -0,0 +1,35 @@ +#!/bin/bash +. /etc/icecream.conf + +if test -n "${ICECREAM_NETNAME}"; then + netname="-n ${ICECREAM_NETNAME}" +fi +logfile="" +if test -n "${ICECREAM_LOG_FILE}"; then + touch ${ICECREAM_LOG_FILE} + chown icecc:icecc ${ICECREAM_LOG_FILE} + logfile="-l ${ICECREAM_LOG_FILE}" +fi +nice="" +if test -n "${ICECREAM_NICE_LEVEL}"; then + nice="--nice ${ICECREAM_NICE_LEVEL}" +fi +scheduler="" +if test -n "${ICECREAM_SCHEDULER_HOST}"; then + scheduler="-s ${ICECREAM_SCHEDULER_HOST}" +fi +noremote="" +if test "${ICECREAM_ALLOW_REMOTE}" = "no" 2> /dev/null; then + noremote="--no-remote" +fi +maxjobs="" +if test -n "${ICECREAM_MAX_JOBS}"; then + if test "${ICECREAM_MAX_JOBS}" -eq 0 2> /dev/null; then + maxjobs="-m 1" + noremote="--no-remote" + else + maxjobs="-m ${ICECREAM_MAX_JOBS}" + fi +fi + +/usr/lib/icecream/sbin/iceccd -d ${logfile} ${nice} ${scheduler} ${netname} -b "${ICECREAM_BASEDIR}" ${maxjobs} ${noremote} &>/dev/null diff --git a/ld-icecream.conf b/ld-icecream.conf new file mode 100644 index 000000000000..e720df327df9 --- /dev/null +++ b/ld-icecream.conf @@ -0,0 +1 @@ +/usr/lib/icecream/lib |