Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Eric Sandall (1f02fff1333a3ba67aaae622d71819df4411f137)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Eric Sandall <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Eric Sandall (1f02fff1333a3ba67aaae622d71819df4411f137)
  • Date: Wed, 27 May 2015 17:08:46 +0000

GIT changes to master grimoire by Eric Sandall <sandalle AT sourcemage.org>:

ChangeLog | 4
devel/go/10-disable-ping-test.patch | 16 +++
devel/go/BUILD | 11 +-
devel/go/DEPENDS | 1
devel/go/DETAILS | 8 -
devel/go/DOWNLOAD | 31 ------
devel/go/HISTORY | 9 +
devel/go/PRE_BUILD | 4
devel/go/go1.4.2.src.tar.gz.sig |binary
groups | 1
libs/libcgroup/DETAILS | 4
libs/libcgroup/HISTORY | 5 +
libs/libcgroup/INSTALL | 21 ++++
libs/libcgroup/conf/cgconfig.conf | 61 +++++++++++++
libs/libcgroup/init.d/cgconfig | 139
++++++++++++++++++++++++++++++
libs/libcgroup/init.d/cgconfig.conf | 12 ++
libs/libcgroup/init.d/cgred | 119 +++++++++++++++++++++++++
libs/libcgroup/init.d/cgred.conf | 27 +++++
libs/libcgroup/libcgroup-0.41.tar.bz2.sig |binary
utils/dockerio/BUILD | 9 +
utils/dockerio/CONFIGURE | 1
utils/dockerio/DEPENDS | 28 ++++++
utils/dockerio/DETAILS | 15 +++
utils/dockerio/HISTORY | 4
utils/dockerio/INSTALL | 32 ++++++
utils/dockerio/PRE_BUILD | 42 +++++++++
utils/dockerio/dockerio-1.6.2.tar.gz.sig |binary
utils/dockerio/init.d/docker | 81 +++++++++++++++++
utils/dockerio/init.d/docker.conf | 7 +
29 files changed, 649 insertions(+), 43 deletions(-)

New commits:
commit ac3c03648d70a172cbf915ce825ff26a3b263437
Author: Eric Sandall <sandalle AT sourcemage.org>
Commit: Eric Sandall <sandalle AT sourcemage.org>

dockerio: Added Docker container package
Added docker:205 group for dockerio.

commit c8d1150ff9ac42e7e0c9ccac7b0e47b489f45dd7
Author: Eric Sandall <sandalle AT sourcemage.org>
Commit: Eric Sandall <sandalle AT sourcemage.org>

libcgroup: Updated to 0.41
Install sample configuration file
Install missing init scripts, mostly useless without these

commit 36b0cf6765ac90c4fe06ff26948a38c3059e205a
Author: Eric Sandall <sandalle AT sourcemage.org>
Commit: Eric Sandall <sandalle AT sourcemage.org>

go: Updated to stable release 1.4.2.
SOURCE GPG matches upstream SHA1 460caac03379f746c473814a65223397e9c9a2f6
.
No longer using mercurial for download.
Add GOROOT_FINAL to point to final destination, not build directory.
Work around https://github.com/golang/go/issues/10730 .

diff --git a/ChangeLog b/ChangeLog
index e7a847d..dee3d66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-05-26 Eric Sandall <sandalle AT sourcemage.org>
+ * groups: Added docker:205 group for dockerio.
+ * utils/dockerio: Added Docker container package
+
2015-05-25 Thomas Orgis <sobukus AT sourcemage.org>
* KDE5_DEPENDS, QT5_DEPENDS: directly depend -sub CXX gcc
(to make up_triggers from ABI updates work)
diff --git a/devel/go/10-disable-ping-test.patch
b/devel/go/10-disable-ping-test.patch
new file mode 100644
index 0000000..d7bb462
--- /dev/null
+++ b/devel/go/10-disable-ping-test.patch
@@ -0,0 +1,16 @@
+# Updated from
https://github.com/golang/go/commit/f97f876125f72f543a14f57fb6570dee6bfa2c6f
+# to fix https://github.com/golang/go/issues/10730
+
+diff -Naur go.orig/src/net/file_test.go go/src/net/file_test.go
+--- go.orig/src/net/file_test.go 2015-02-17 20:38:34.000000000 -0800
++++ go/src/net/file_test.go 2015-05-26 20:49:02.517759670 -0700
+@@ -174,7 +174,8 @@
+
+ {net: "udp6", addr: "[::1]", ipv6: true},
+
+- {net: "ip4:icmp", addr: "127.0.0.1"},
++ // TODO(mikioh,bradfitz): renable once 10730 is fixed
++ // {net: "ip4:icmp", addr: "127.0.0.1"},
+
+ {net: "unixgram", addr: "@gotest3/net", linux: true},
+ }
diff --git a/devel/go/BUILD b/devel/go/BUILD
index 7bd6b99..4aa3020 100755
--- a/devel/go/BUILD
+++ b/devel/go/BUILD
@@ -1,6 +1,7 @@
-export GOROOT=${SOURCE_DIRECTORY} &&
-export GOARCH &&
-export GOOS=linux &&
-export GOBIN=${INSTALL_ROOT}/usr/bin/ &&
-cd ${SOURCE_DIRECTORY}/src &&
+export GOROOT=${SOURCE_DIRECTORY} &&
+export GOROOT_FINAL=${TARGET_ROOT}/opt/go &&
+export GOARCH &&
+export GOOS=linux &&
+export GOBIN=${INSTALL_ROOT}/usr/bin/ &&
+cd ${SOURCE_DIRECTORY}/src &&
./all.bash
diff --git a/devel/go/DEPENDS b/devel/go/DEPENDS
index 6f28c8d..3299982 100755
--- a/devel/go/DEPENDS
+++ b/devel/go/DEPENDS
@@ -1,5 +1,4 @@
depends SYSTEM-LOGGER &&
-depends mercurial &&
depends bison &&
depends gcc &&
depends AWK &&
diff --git a/devel/go/DETAILS b/devel/go/DETAILS
index 838d133..6acafc4 100755
--- a/devel/go/DETAILS
+++ b/devel/go/DETAILS
@@ -1,8 +1,8 @@
SPELL="go"
- VERSION="release"
- SOURCE="${SPELL}-${VERSION}.tgz"
- SOURCE_URL[0]="https://go.googlecode.com/hg/";
- SOURCE_IGNORE=volatile
+ VERSION='1.4.2'
+ SOURCE="${SPELL}${VERSION}.src.tar.gz"
+ SOURCE_GPG="gurus.gpg:${SOURCE}.sig:UPSTREAM_HASH"
+ SOURCE_URL[0]="https://storage.googleapis.com/golang/${SOURCE}";
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}"
WEB_SITE="http://golang.org";
ENTERED="20100509"
diff --git a/devel/go/DOWNLOAD b/devel/go/DOWNLOAD
deleted file mode 100755
index 3a714ea..0000000
--- a/devel/go/DOWNLOAD
+++ /dev/null
@@ -1,31 +0,0 @@
-function url_hg_crack() {
-
- URL=${SOURCE_URL}
- HG_MODULE=${SPELL}
- HG_TAG=${VERSION}
-
-}
-url_hg_crack
-message "${MESSAGE_COLOR}Starting Mercurial checkout of" \
- "${FILE_COLOR}${SOURCE}${MESSAGE_COLOR}...${DEFAULT_COLOR}" &&
-if [[ -f $SOURCE_CACHE/${SOURCE} ]]
-then
- message "${MESSAGE_COLOR}Previous source found
unpacking...${DEFAULT_COLOR}" &&
- tar -jxf $SOURCE_CACHE/${SOURCE} &&
- cd ${HG_MODULE} &&
- message "${MESSAGE_COLOR}Running Mercurial update...${DEFAULT_COLOR}" &&
- hg pull -u -r ${HG_TAG}
- cd ..
- message "${MESSAGE_COLOR}Done...${DEFAULT_COLOR}"
-else
- message "${MESSAGE_COLOR}Running initial Mercurial
clone...${DEFAULT_COLOR}" &&
- hg clone -r${HG_TAG} ${URL} ${HG_MODULE}
- message "${MESSAGE_COLOR}Done...${DEFAULT_COLOR}"
-fi &&
-message "${MESSAGE_COLOR}Generating tarball...${DEFAULT_COLOR}" &&
-tar -jcf \
- ${SOURCE} \
- ${HG_MODULE} &&
-cp ${SOURCE} ${SOURCE_CACHE}/${SOURCE} &&
-rm ${SOURCE} &&
-message "${MESSAGE_COLOR}Mercurial checkout complete...${DEFAULT_COLOR}"
diff --git a/devel/go/HISTORY b/devel/go/HISTORY
index 4e396cf..60918ee 100644
--- a/devel/go/HISTORY
+++ b/devel/go/HISTORY
@@ -1,3 +1,12 @@
+2015-05-26 Eric Sandall <sandalle AT sourcemage.org>
+ * DETAILS: Updated to stable release 1.4.2.
+ SOURCE GPG matches upstream SHA1
460caac03379f746c473814a65223397e9c9a2f6 .
+ * DEPENDS: No longer using mercurial for download.
+ * DOWNLOAD: Removed, no longer using mercurial.
+ * PRE_BUILD: Apply 10-disable-ping-test.patch.
+ * BUILD: Add GOROOT_FINAL to point to final destination, not build
directory.
+ * 10-disable-ping-test.patch: Work around
https://github.com/golang/go/issues/10730 .
+
2010-05-09 Mathieu Lonjaret <lejatorn AT sourcemage.org>
* BUILD, CONFIGURE, DEPENDS, DETAILS, DOWNLOAD, HISTORY, INSTALL:
created this spell

diff --git a/devel/go/PRE_BUILD b/devel/go/PRE_BUILD
new file mode 100755
index 0000000..dc72792
--- /dev/null
+++ b/devel/go/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+message "${MESSAGE_COLOR}Disabling ping test to work around Go bug #10730
...${DEFAULT_COLOR}" &&
+patch -p1 < "${SCRIPT_DIRECTORY}"/10-disable-ping-test.patch
diff --git a/devel/go/go1.4.2.src.tar.gz.sig b/devel/go/go1.4.2.src.tar.gz.sig
new file mode 100644
index 0000000..e64ae88
Binary files /dev/null and b/devel/go/go1.4.2.src.tar.gz.sig differ
diff --git a/groups b/groups
index 0803b72..03f5c6c 100755
--- a/groups
+++ b/groups
@@ -129,5 +129,6 @@ gnarwl:201:
sddm:202:
input:203:
rpc:204:
+docker:205:
users:1000:
nogroup:65534:
diff --git a/libs/libcgroup/DETAILS b/libs/libcgroup/DETAILS
index 7a174bf..a818b4a 100755
--- a/libs/libcgroup/DETAILS
+++ b/libs/libcgroup/DETAILS
@@ -1,7 +1,7 @@
SPELL=libcgroup
- VERSION=0.36.2
-
SOURCE_HASH=sha512:e2b14b73346cca5eedfdbd80cb46a1e8636f9a99c7d065a9b94d0a94a80facf71c659b86ca85ebc683788e23e2766f3f2dbd34718b822395d46a706030fe0462
+ VERSION=0.41
SOURCE=$SPELL-$VERSION.tar.bz2
+ SOURCE_GPG="gurus.gpg:${SOURCE}.sig:WORKS_FOR_ME"
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION

SOURCE_URL[0]=http://downloads.sourceforge.net/sourceforge/libcg/$SPELL/v$VERSION/$SOURCE
WEB_SITE=http://libcg.sourceforge.net/
diff --git a/libs/libcgroup/HISTORY b/libs/libcgroup/HISTORY
index a02def2..6a5f06f 100644
--- a/libs/libcgroup/HISTORY
+++ b/libs/libcgroup/HISTORY
@@ -1,3 +1,8 @@
+2015-05-26 Eric Sandall <sandalle AT sourcemage.org>
+ * DETAILS: Updated to 0.41
+ * INSTALL: Install sample configuration file
+ * init.d: Install missing init scripts, mostly useless without these
+
2015-05-25 Thomas Orgis <sobukus AT sourcemage.org>
* DETAILS: remove SOURCEFORGE_URL usage (automated)

diff --git a/libs/libcgroup/INSTALL b/libs/libcgroup/INSTALL
new file mode 100755
index 0000000..39ac495
--- /dev/null
+++ b/libs/libcgroup/INSTALL
@@ -0,0 +1,21 @@
+default_install &&
+
+# Install configuration files
+install -d -m 0755 "${INSTALL_ROOT}"/etc/cgconfig.d/ &&
+install_config_file "${SOURCE_DIRECTORY}"/samples/cgrules.conf \
+ "${INSTALL_ROOT}"/etc/cgrules.conf &&
+
+install_config_file "${SOURCE_DIRECTORY}"/samples/cgconfig.conf \
+ "${INSTALL_ROOT}"/etc/cgconfig.conf &&
+
+install_config_file "${SOURCE_DIRECTORY}"/samples/cgsnapshot_blacklist.conf
\
+ "${INSTALL_ROOT}"/etc/cgsnapshot_blacklist.conf
&&
+
+install_config_file "${SCRIPT_DIRECTORY}"/conf/cgconfig.conf \
+ "${INSTALL_ROOT}"/etc/cgconfig.conf &&
+
+# Install SysConfig files as Sorcery doesn't seem to want to pick up the
init.d/*.conf files
+for SYSCONF in cgconfig cgred; do
+ install_config_file "${SPELL_DIRECTORY}"/init.d/${SYSCONF}.conf \
+ "${INSTALL_ROOT}"/etc/sysconfig/${SYSCONF}
+done
diff --git a/libs/libcgroup/conf/cgconfig.conf
b/libs/libcgroup/conf/cgconfig.conf
new file mode 100644
index 0000000..c5f50f0
--- /dev/null
+++ b/libs/libcgroup/conf/cgconfig.conf
@@ -0,0 +1,61 @@
+#
+# Copyright IBM Corporation. 2007
+#
+# Authors: Balbir Singh <balbir AT linux.vnet.ibm.com>
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2.1 of the GNU Lesser General Public License
+# as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+#group daemons/www {
+# perm {
+# task {
+# uid = root;
+# gid = webmaster;
+# }
+# admin {
+# uid = root;
+# gid = root;
+# }
+# }
+# cpu {
+# cpu.shares = 1000;
+# }
+#}
+#
+#group daemons/ftp {
+# perm {
+# task {
+# uid = root;
+# gid = ftpmaster;
+# }
+# admin {
+# uid = root;
+# gid = root;
+# }
+# }
+# cpu {
+# cpu.shares = 500;
+# }
+#}
+#
+#mount {
+# cpu = /mnt/cgroups/cpu;
+# cpuacct = /mnt/cgroups/cpuacct;
+#}
+
+# From
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/ch-Using_Control_Groups.html#The_cgconfig.conf_File
+# Setup some default groups otherwise cgconfig does nothing
+mount {
+ cpuset = /cgroup/cpuset;
+ cpu = /cgroup/cpu;
+ cpuacct = /cgroup/cpuacct;
+ memory = /cgroup/memory;
+ devices = /cgroup/devices;
+ freezer = /cgroup/freezer;
+ net_cls = /cgroup/net_cls;
+ blkio = /cgroup/blkio;
+}
diff --git a/libs/libcgroup/init.d/cgconfig b/libs/libcgroup/init.d/cgconfig
new file mode 100644
index 0000000..b0dccb1
--- /dev/null
+++ b/libs/libcgroup/init.d/cgconfig
@@ -0,0 +1,139 @@
+#!/bin/bash
+#
+# Start/Stop the workload manager
+#
+# Copyright IBM Corporation. 2008
+#
+# Authors: Balbir Singh <balbir AT linux.vnet.ibm.com>
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2.1 of the GNU Lesser General Public License
+# as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# cgconfig Control Groups Configuration Startup
+# chkconfig: - 5 95
+# description: This script runs the cgconfigparser utility to parse and setup
+# the control group filesystem. It uses /etc/cgconfig.conf
+# and parses the configuration specified in there.
+
+### BEGIN INIT INFO
+# Short-Description: Create and setup control group filesystem(s)
+# Description: Create and setup control group filesystem(s)
+# Should-Start: ypbind
+# Should-Stop: ypbind
+PIDFILE=/var/run/${servicename}
+RUNLEVEL=S
+NEEDS="+local_fs +syslog"
+### END INIT INFO
+
+. /etc/init.d/smgl_init
+
+# get correct location of binaries from configure
+prefix=/usr/;exec_prefix=${prefix};sbindir=${exec_prefix}/sbin
+servicename=cgconfig
+PROGRAM=$sbindir/cgconfigparser
+CONFIG_FILE=/etc/cgconfig.conf
+lockfile=/var/lock/${servicename}
+
+# read the config
+CREATE_DEFAULT=yes
+if [ -e /etc/sysconfig/cgconfig ]; then
+ . /etc/sysconfig/cgconfig
+fi
+
+create_default_groups() {
+ defaultcgroup=
+
+ if [ -f /etc/cgrules.conf ]; then
+ read user ctrl defaultcgroup <<< \
+ $(grep -m1 '^\*[[:space:]]\+' /etc/cgrules.conf)
+ if [ -n "$defaultcgroup" -a "$defaultcgroup" = "*" ]; then
+ print_status warning "/etc/cgrules.conf incorrect"
+ print_status warning "Overriding it"
+ defaultcgroup=
+ fi
+ fi
+
+ if [ -z $defaultcgroup ]
+ then
+ defaultcgroup=sysdefault/
+ fi
+
+ #
+ # Find all mounted subsystems and create comma-separated list
+ # of controllers.
+ #
+ controllers=`lssubsys 2>/dev/null | tr '\n' ',' | sed s/.$//`
+
+ #
+ # Create the default group, ignore errors when the default group
+ # already exists.
+ #
+ cgcreate -f 664 -d 775 -g $controllers:$defaultcgroup 2>/dev/null
+
+ #
+ # special rule for cpusets
+ #
+ if echo $controllers | grep -q -w cpuset; then
+ cpus=`cgget -nv -r cpuset.cpus /`
+ cgset -r cpuset.cpus=$cpus $defaultcgroup
+ mems=`cgget -nv -r cpuset.mems /`
+ cgset -r cpuset.mems=$mems $defaultcgroup
+ fi
+
+ #
+ # Classify everything to default cgroup. Ignore errors, some
processes
+ # may exit after ps is run and before cgclassify moves them.
+ #
+ cgclassify -g $controllers:$defaultcgroup `ps --no-headers -eL o
tid` \
+ 2>/dev/null || :
+}
+
+start() {
+ echo -n "Starting cgconfig service: "
+ if [ -f "$lockfile" ]; then
+ print_status warning "lock file already exists"
+ return 0
+ fi &&
+
+ if [ ! -s $CONFIG_FILE ]; then
+ print_status failure "$CONFIG_FILE is not configured"
+ return 6
+ fi &&
+
+ $PROGRAM -l $CONFIG_FILE
+ evaluate_retval || ( print_status failure "Failed to parse
$CONFIG_FILE" && return 1 )
+
+ if [ $CREATE_DEFAULT = "yes" ]; then
+ create_default_groups
+ fi
+
+ touch "$lockfile" || ( print_status failure "Failed to touch
$lockfile" && return 1 )
+}
+
+stop() {
+ echo -n "Stopping cgconfig service: "
+ cgclear
+ rm -f "$lockfile"
+ evaluate_retval
+}
+
+status() {
+ if [ -f "$lockfile" ]; then
+ print_status success "${servicename} already started" &&
+ return 0
+ else
+ print_status failure "${servicename} not started" &&
+ return 0
+ fi
+}
+
+restart() {
+ stop
+ sleep 1
+ start
+}
+
diff --git a/libs/libcgroup/init.d/cgconfig.conf
b/libs/libcgroup/init.d/cgconfig.conf
new file mode 100644
index 0000000..5a61bf6
--- /dev/null
+++ b/libs/libcgroup/init.d/cgconfig.conf
@@ -0,0 +1,12 @@
+# Service cgconfig can create a default group in all mounted hierarchies and
+# move all processes there on boot. If no default rule is specified in
+# /etc/cgrules.conf, the default group is named '/sysdefault'.
+# This automatically created group(s) can be useful e.g. when using 'cpu'
+# controller to limit cpu.shares of this default group and allowing some more
+# important group take most of the CPU.
+#
+# By default, create these groups:
+CREATE_DEFAULT=yes
+
+# Uncomment following line to disable creation of the default group on
startup:
+# CREATE_DEFAULT=no
diff --git a/libs/libcgroup/init.d/cgred b/libs/libcgroup/init.d/cgred
new file mode 100644
index 0000000..f77ec1d
--- /dev/null
+++ b/libs/libcgroup/init.d/cgred
@@ -0,0 +1,119 @@
+#!/bin/bash
+#
+# Start/Stop the CGroups Rules Engine Daemon
+#
+# Copyright Red Hat Inc. 2008
+#
+# Authors: Steve Olivieri <sjo AT redhat.com>
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2.1 of the GNU Lesser General Public License
+# as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# cgred CGroups Rules Engine Daemon
+# chkconfig: - 14 86
+# description: This is a daemon for automatically classifying processes \
+# into cgroups based on UID/GID.
+#
+
+. /etc/init.d/smgl_init
+
+### BEGIN INIT INFO
+# Short-Description: start and stop the cgroups rules engine daemon
+# Description: CGroup Rules Engine is a tool for automatically using
\
+# cgroups to classify processes
+# processname: cgrulesengd
+# pidfile: /var/run/cgred.pid
+# Provides: cgrulesengd
+DESC='CGroup Rules Engine is a tool for automatically using cgroups to
classify processes'
+RUNLEVEL=S
+NEEDS="+local_fs +syslog cgconfig"
+### END INIT INFO
+
+# For convenience
+processname=cgrulesengd
+servicename=cgred
+prefix=/usr;exec_prefix=${prefix};sbindir=${exec_prefix}/sbin
+PROGRAM=$sbindir/cgrulesengd
+CGRED_CONF=/etc/cgrules.conf
+lockfile="/var/lock/${servicename}"
+pidfile=/var/run/cgred.pid
+
+
+# Sanity checks
+[ -x $PROGRAM ] || exit 1
+
+# Read in configuration options.
+if [ -f "/etc/sysconfig/cgred.conf" ] ; then
+ . /etc/sysconfig/cgred.conf
+ OPTIONS="$NODAEMON $LOG"
+ if [ -n "$LOG_FILE" ]; then
+ OPTIONS="$OPTIONS --logfile=$LOG_FILE"
+ fi
+ if [ -n "$SOCKET_USER" ]; then
+ OPTIONS="$OPTIONS -u $SOCKET_USER"
+ fi
+ if [ -n "$SOCKET_GROUP" ]; then
+ OPTIONS="$OPTIONS -g $SOCKET_GROUP"
+ fi
+else
+ OPTIONS=""
+fi
+
+start()
+{
+ echo -n $"Starting CGroup Rules Engine Daemon: "
+ if [ -f "$lockfile" ]; then
+ print_status failure "${servicename} is already running with
PID `cat ${pidfile}`"
+ return 0
+ fi
+ num=`grep "cgroup" /proc/mounts | awk '$3=="cgroup"' | wc -l`
+ if [ $num -eq 0 ]; then
+ echo
+ print_status failure $"Cannot find cgroups, is cgconfig
service running?"
+ return 1
+ fi
+ loadproc ${PROGRAM} ${OPTIONS}
+
+ touch "$lockfile"
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+ echo "`pidof $processname`" > $pidfile
+ return 0
+}
+
+stop()
+{
+ echo -n $"Stopping CGroup Rules Engine Daemon..."
+ if [ ! -f $pidfile ]; then
+ print_status success
+ return 0
+ fi
+ killproc "${PROGRAM}" 'SIGTERM' || return 1
+
+ rm -f "$lockfile" "$pidfile"
+ return 0
+}
+
+status()
+{
+ statusproc ${PROGRAM}
+}
+
+restart()
+{
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ echo "Restarting $DESC: $servicename"
+ stop
+ sleep 1
+ start
+}
+
diff --git a/libs/libcgroup/init.d/cgred.conf
b/libs/libcgroup/init.d/cgred.conf
new file mode 100644
index 0000000..edd0dc7
--- /dev/null
+++ b/libs/libcgroup/init.d/cgred.conf
@@ -0,0 +1,27 @@
+# /etc/sysconfig/cgred.conf - CGroup Rules Engine Daemon configuration file
+#
+# The four options listed below (CONFIG_FILE, LOG_FILE, NODAEMON, LOG) are
+# the only valid ones. Defining anything else in this file will cause the
+# CGroup Rules Engine program to fail. So, don't do it.
+
+# The pathname to the configuration file for CGroup Rules Engine
+CONFIG_FILE="/etc/cgrules.conf"
+
+# Uncomment the following line to log to specified file instead of syslog
+#LOG_FILE="/var/log/cgrulesengd.log"
+
+# Uncomment the second line to run CGroup Rules Engine in non-daemon mode
+NODAEMON=""
+#NODAEMON="--nodaemon"
+
+# Set owner of cgred socket. 'cgexec' tool should have write access there
+# (either using suid and/or sgid permissions or Linux capabilities).
+SOCKET_USER=""
+SOCKET_GROUP="cgred"
+
+# Uncomment the second line to disable logging for CGroup Rules Engine
+# Uncomment the third line to enable more verbose logging.
+LOG=""
+#LOG="--nolog"
+#LOG="-v"
+
diff --git a/libs/libcgroup/libcgroup-0.41.tar.bz2.sig
b/libs/libcgroup/libcgroup-0.41.tar.bz2.sig
new file mode 100644
index 0000000..1827401
Binary files /dev/null and b/libs/libcgroup/libcgroup-0.41.tar.bz2.sig differ
diff --git a/utils/dockerio/BUILD b/utils/dockerio/BUILD
new file mode 100755
index 0000000..4628bb0
--- /dev/null
+++ b/utils/dockerio/BUILD
@@ -0,0 +1,9 @@
+[[ "x${DOCKER_CLIENT}" == "xy" ]] && export DOCKER_CLIENTONLY=1
+
+export DOCKER_GITCOMMIT &&
+export DOCKER_BUILDTAGS="${OPTS}" &&
+
+# Auto-discover Go
+export AUTO_GOPATH=1 &&
+
+./hack/make.sh dynbinary
diff --git a/utils/dockerio/CONFIGURE b/utils/dockerio/CONFIGURE
new file mode 100755
index 0000000..b75cadb
--- /dev/null
+++ b/utils/dockerio/CONFIGURE
@@ -0,0 +1 @@
+config_query DOCKER_CLIENT 'Build Docker client only?' n
diff --git a/utils/dockerio/DEPENDS b/utils/dockerio/DEPENDS
new file mode 100755
index 0000000..3f3c911
--- /dev/null
+++ b/utils/dockerio/DEPENDS
@@ -0,0 +1,28 @@
+depends go &&
+depends sqlite &&
+
+runtime_depends git &&
+runtime_depends iptables &&
+runtime_depends libcgroup &&
+runtime_depends LZMA &&
+runtime_depends procps &&
+
+optional_depends bash-completion \
+ '' \
+ '' \
+ 'for BASH command completion (recommended)' &&
+
+optional_depends lvm \
+ 'include_graphdriver_devicemapper' \
+ 'exclude_graphdriver_devicemapper' \
+ 'for device mapper support (recommended)' &&
+
+optional_depends lxc \
+ '' \
+ '' \
+ 'for Linux Container support' &&
+
+optional_depends btrfs-progs \
+ 'include_graphdriver_btrfs' \
+ 'exclude_graphdriver_btrfs' \
+ 'for BTRFS filesystem support'
diff --git a/utils/dockerio/DETAILS b/utils/dockerio/DETAILS
new file mode 100755
index 0000000..d96cbc0
--- /dev/null
+++ b/utils/dockerio/DETAILS
@@ -0,0 +1,15 @@
+ SPELL=dockerio
+ VERSION=1.6.2
+ SOURCE="${SPELL}-${VERSION}.tar.gz"
+ SOURCE_GPG="gurus.gpg:${SOURCE}.sig"
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL/io/}-${VERSION}"
+DOCKER_GITCOMMIT='7c8fca2' # Because Docker building is dumb
+ SOURCE_URL[0]="http://github.com/docker/docker/archive/v${VERSION}.tar.gz";
+ WEB_SITE='https://github.com/docker/docker'
+ ENTERED='20150526'
+ LICENSE[0]='APACHE2'
+ KEYWORDS='utils emulation container'
+ SHORT=''
+ DOCS='AUTHORS CONTRIBUTING.md CHANGELOG.md NOTICE README.md'
+cat << EOF
+EOF
diff --git a/utils/dockerio/HISTORY b/utils/dockerio/HISTORY
new file mode 100644
index 0000000..3cbbbbc
--- /dev/null
+++ b/utils/dockerio/HISTORY
@@ -0,0 +1,4 @@
+2015-05-26 Eric Sandall <sandalle AT sourcemage.org>
+ * Created based on
https://github.com/tianon/docker-overlay/blob/master/app-emulation/docker/docker-1.6.2.ebuild
+ * init.d/* modified from contrib/init/sysvinit-redhat/
+
diff --git a/utils/dockerio/INSTALL b/utils/dockerio/INSTALL
new file mode 100755
index 0000000..a45bd8c
--- /dev/null
+++ b/utils/dockerio/INSTALL
@@ -0,0 +1,32 @@
+# Make sure group exists
+create_group docker &&
+
+# Install Docker
+install -m 0755
"${SOURCE_DIRECTORY}"/bundles/${VERSION}/dynbinary/docker-${VERSION} \
+ "${INSTALL_ROOT}"/usr/bin/docker &&
+install -d -m 0755 "${INSTALL_ROOT}"/usr/libexec/docker &&
+install -m 0755
"${SOURCE_DIRECTORY}"/bundles/${VERSION}/dynbinary/dockerinit-${VERSION} \
+ "${INSTALL_ROOT}"/usr/libexec/docker/dockerinit &&
+
+# Install udev rules
+[[ -d "${INSTALL_ROOT}"/etc/udev/rules.d/ ]] || install -d -m 0755
"${INSTALL_ROOT}"/etc/udev/rules.d/ &&
+install -m 0644 "${SOURCE_DIRECTORY}"/contrib/udev/80-docker.rules \
+ "${INSTALL_ROOT}"/etc/udev/rules.d/80-docker.rules &&
+
+# Install BASH completion
+[[ -d "${INSTALL_ROOT}"/etc/bash_completion.d/ ]] || install -d -m 0755
"${INSTALL_ROOT}"/etc/bash_completion.d/ &&
+install -m 0644 "${SOURCE_DIRECTORY}"/contrib/completion/bash/docker \
+ "${INSTALL_ROOT}"/etc/bash_completion.d/docker &&
+
+# Install VIm Syntax
+for VIMDIR in vimfiles vimfiles/ftdetect vimfiles/syntax; do
+ [[ -d "${INSTALL_ROOT}"/usr/share/vim/"${VIMDIR}"/ ]] || install -d -m
0755 "${INSTALL_ROOT}"/usr/share/vim/"${VIMDIR}"
+done &&
+install -m 0644
"${SOURCE_DIRECTORY}"/contrib/syntax/vim/ftdetect/dockerfile.vim \
+ "${INSTALL_ROOT}"/usr/share/vim/vimfiles/ftdetect/dockerfile.vim &&
+install -m 0644
"${SOURCE_DIRECTORY}"/contrib/syntax/vim/syntax/dockerfile.vim \
+ "${INSTALL_ROOT}"/usr/share/vim/vimfiles/syntax/dockerfile.vim &&
+
+# Install SysConfig file as Sorcery seems to ignore this
+install_config_file "${SCRIPT_DIRECTORY}"/init.d/docker.conf \
+ "${INSTALL_ROOT}"/etc/sysconfig/docker
diff --git a/utils/dockerio/PRE_BUILD b/utils/dockerio/PRE_BUILD
new file mode 100755
index 0000000..93d5de6
--- /dev/null
+++ b/utils/dockerio/PRE_BUILD
@@ -0,0 +1,42 @@
+local DOCKERIO_KERNEL_OK=0 &&
+
+
+if [[ $(get_kernel_version | cut -d. -f1 | sed -e 's/\.//g') -le 3 ]] &&
+ [[ $(get_kernel_version | cut -d. -f2 | sed -e 's/\.//g') -lt 10 ]]; then
+ message "${PROBLEM_COLOR}Requires Linux kernel 3.10+${DEFAULT_COLOR}" &&
+ return 1
+fi &&
+
+for KERNELPARAM in CGROUPS CGROUP_CPUACCT CGROUP_DEVICE CGROUP_FREEZER
\
+ CGROUP_SCHED CPUSETS DEVPTS_MULTIPLE_INSTANCES DM_THIN_PROVISIONING
MACVLAN \
+ VETH BRIDGE NAMESPACES NET_NS PID_NS IPC_NS UTS_NS NETFILTER_ADVANCED
\
+ NETFILTER_XT_MATCH_ADDRTYPE NETFILTER_XT_MATCH_CONNTRACK NF_NAT
\
+ NF_NAT_NEEDED NF_NAT_IPV4 IP_NF_FILTER IP_NF_TARGET_MASQUERADE POSIX_MQUEUE
+do
+ local DOCKERIO_KERNEL_CHECK=$(get_kernel_config CONFIG_${KERNELPARAM}) &&
+
+ if [[ "${DOCKERIO_KERNEL_CHECK}" != "y" && "${DOCKERIO_KERNEL_CHECK}" !=
"m" ]]; then
+ message "${PROBLEM_COLOR}You don't have CONFIG_${KERNELPARAM}" \
+ "enabled in your kernel configuration, cannot build" \
+ "${SPELL_COLOR}$SPELL${MESSAGE_COLOR}.${DEFAULT_COLOR}" &&
+ DOCKERIO_KERNEL_OK=1 # There is an error!
+ else
+ message "${MESSAGE_COLOR}Checking for CONFIG_${KERNELPARAM} in your
kernel...${SPELL_COLOR}OK${DEFAULT_COLOR}"
+ fi
+done &&
+
+if is_depends_enabled "${SPELL}" 'btrfs-progs'; then
+ DOCKERIO_KERNEL_BTRFS=$(get_kernel_config CONFIG_BTRFS_FS) &&
+ if [[ "${DOCKERIO_KERNEL_BTRFS}" != "y" && "${DOCKERIO_KERNEL_BTRFS}" !=
"m" ]]; then
+ message "${PROBLEM_COLOR}You don't have CONFIG_BTRFS_FS" \
+ "enabled in your kernel configuration, cannot build" \
+ "${SPELL_COLOR}$SPELL${MESSAGE_COLOR}.${DEFAULT_COLOR}" &&
+ DOCKERIO_KERNEL_OK=1 # There is an error!
+ else
+ message "${MESSAGE_COLOR}Checking for CONFIG_BTRFS_FS in your
kernel...${SPELL_COLOR}OK${DEFAULT_COLOR}"
+ fi
+fi &&
+
+[[ ${DOCKERIO_KERNEL_OK} -eq 0 ]] || return 1 && # There was at least one
error
+
+default_pre_build
diff --git a/utils/dockerio/dockerio-1.6.2.tar.gz.sig
b/utils/dockerio/dockerio-1.6.2.tar.gz.sig
new file mode 100644
index 0000000..b8b3fc2
Binary files /dev/null and b/utils/dockerio/dockerio-1.6.2.tar.gz.sig differ
diff --git a/utils/dockerio/init.d/docker b/utils/dockerio/init.d/docker
new file mode 100755
index 0000000..51381bd
--- /dev/null
+++ b/utils/dockerio/init.d/docker
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+# Modified from contrib/init/sysvinit-redhat/docker
+# Source function library.
+. /etc/init.d/smgl_init
+
+servicename='docker'
+PROGRAM="/usr/bin/${servicename}"
+UNSHARE='/usr/bin/unshare'
+PIDFILE="/var/run/${servicename}.pid"
+LOCKFILE="/var/lock/${servicename}"
+LOGFILE="/var/log/${servicename}"
+### BEGIN INIT INFO
+# Provides: docker
+# Short-Description: start and stop docker
+# Description: Daemon for docker.com
+RUNLEVEL=3
+NEEDS="+network +remote_fs cgconfig"
+### END INIT INFO
+
+[ -e /etc/sysconfig/${servicename} ] && . /etc/sysconfig/${servicename}
+
+prestart() {
+ telinit run cgconfig status &> /dev/null
+
+ if [[ $? != 0 ]]; then
+ telinit run cgconfig start
+ fi
+}
+
+
+start() {
+ [ -x ${PROGRAM} ] || exit 5
+
+ check_for_cleanup
+
+ if ! [ -f ${PIDFILE} ]; then
+ prestart
+ printf "Starting ${servicename}:\t"
+ echo "\n$(date)\n" >> ${LOGFILE}
+ "${UNSHARE}" -m -- ${PROGRAM} -d ${SYSCONF_ARGS} &>> ${LOGFILE} &
+ pid=$!
+ touch ${LOCKFILE}
+ # wait up to 10 seconds for the PIDFILE to exist. see
+ # https://github.com/docker/docker/issues/5359
+ tries=0
+ while [ ! -f ${PIDFILE} -a $tries -lt 10 ]; do
+ sleep 1
+ tries=$((tries + 1))
+ done
+ print_status success
+ echo
+ else
+ print_status failure
+ echo
+ printf "${PIDFILE} still exists...\n"
+ exit 7
+ fi
+}
+
+stop() {
+ echo -n $"Stopping ${servicename}: "
+ killproc ${PROGRAM} && rm -f ${LOCKFILE}
+}
+
+restart() {
+ stop
+ sleep 1
+ start
+}
+
+reload() {
+ restart
+}
+
+check_for_cleanup() {
+ if [ -f ${PIDFILE} ]; then
+ /bin/ps -fp $(cat ${PIDFILE}) > /dev/null || rm ${PIDFILE}
+ fi
+}
+
diff --git a/utils/dockerio/init.d/docker.conf
b/utils/dockerio/init.d/docker.conf
new file mode 100644
index 0000000..81994b1
--- /dev/null
+++ b/utils/dockerio/init.d/docker.conf
@@ -0,0 +1,7 @@
+# /etc/sysconfig/docker
+#
+# Other arguments to pass to the docker daemon process
+# These will be parsed by the sysv initscript and appended
+# to the arguments list passed to docker -d
+
+SYSCONF_ARGS=""



  • [SM-Commit] GIT changes to master grimoire by Eric Sandall (1f02fff1333a3ba67aaae622d71819df4411f137), Eric Sandall, 05/27/2015

Archive powered by MHonArc 2.6.24.

Top of Page