summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-block/vblade
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-block/vblade')
-rw-r--r--sys-block/vblade/Manifest3
-rw-r--r--sys-block/vblade/files/conf.d-vblade26
-rw-r--r--sys-block/vblade/files/init.d-vblade.vblade0120
-rw-r--r--sys-block/vblade/files/vbladed20
-rw-r--r--sys-block/vblade/metadata.xml8
-rw-r--r--sys-block/vblade/vblade-19.ebuild38
-rw-r--r--sys-block/vblade/vblade-20.ebuild37
-rw-r--r--sys-block/vblade/vblade-21.ebuild36
8 files changed, 288 insertions, 0 deletions
diff --git a/sys-block/vblade/Manifest b/sys-block/vblade/Manifest
new file mode 100644
index 000000000000..d100ac97039a
--- /dev/null
+++ b/sys-block/vblade/Manifest
@@ -0,0 +1,3 @@
+DIST vblade-19.tgz 25539 SHA256 779c8c9e80ce09e8ef1737216c8438c6e614d7001e1a6f312e4a82191e34870e
+DIST vblade-20.tgz 26689 SHA256 c8fe2fc4f2fba8e07e5cfdf17335982584eef2cd5c78bf8b1db93f2b56e7121d
+DIST vblade-21.tgz 26434 SHA256 b5740bb7d57141769ba77baa3c690f134dd62069f1df310debc2520d416a1b92 SHA512 cf2826fd40a5c1377dd65149581b10460a55eb17f480a7fd3bdd35fbe8066a8c571b62ebb93dbfadad3aac569a03b142bff1df2c4a49efff98ad5ed084739d14 WHIRLPOOL e9555817ccaad19a3d36824efcb3339d67f5e5dbb6a39a5980eb2b17282a4ea173907d3917d98fb991b6816aac065ec36f6be6079d55b2786bfa22d03f35d16c
diff --git a/sys-block/vblade/files/conf.d-vblade b/sys-block/vblade/files/conf.d-vblade
new file mode 100644
index 000000000000..c8fb6cde4a69
--- /dev/null
+++ b/sys-block/vblade/files/conf.d-vblade
@@ -0,0 +1,26 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# If you intent to run only one vblade, you should edit config_vblade0
+# SYNTAX: SHELF SLOT NETIF SOURCE
+config_vblade0="0 0 eth0 /root/test.img"
+
+# SHELF is a numeric value >= 0
+# SLOT is a numeric value 0 <= X <= 15
+# NETIF is a network interface name
+# SOURCE is a file or block device
+
+# For additional vblades, run:
+# ln -s /etc/init.d/vblade.vblade0 /etc/init.d/vblade.$NAME
+# and define config_$NAME in this file.
+
+# Note that the combination of SHELF:SLOT:NETIF should be unique for your
+# network.
+
+# Some additional examples
+# config_vblade1="0 1 eth0 /root/test2.img"
+# config_foobar="0 1 eth1 /dev/md0"
+
+# vim: ft=filetype=gentoo-conf-d syntax=filetype=gentoo-conf-d :
+# vim: ai sw=2 sts=2 ts=2 :
diff --git a/sys-block/vblade/files/init.d-vblade.vblade0 b/sys-block/vblade/files/init.d-vblade.vblade0
new file mode 100644
index 000000000000..e29ccb19a6b8
--- /dev/null
+++ b/sys-block/vblade/files/init.d-vblade.vblade0
@@ -0,0 +1,120 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_commands="checkconfig"
+
+depend() {
+ need net
+}
+
+# bug #218043
+if [ ! -f /etc/init.d/sysfs ]; then
+ conf="$(add_suffix /etc/conf.d/vblade)"
+ [[ -e "${conf}" ]] && source "${conf}"
+ vblade_name="${myservice#*.}"
+else
+ conf="/etc/conf.d/vblade"
+ [[ -e "${conf}" ]] && source "${conf}"
+ vblade_name="${RC_SVCNAME#*.}"
+fi
+
+vblade_conf_variable="config_${vblade_name}"
+vblade_conf="${!vblade_conf_variable}"
+pidfile="/var/run/vblade-${vblade_name}.pid"
+srvname="vblade.${vblade_name}"
+
+getconfig() {
+ tmp="${vblade_conf}"
+ shelf="${tmp/ *}"
+ tmp="${tmp#* }"
+ slot="${tmp/ *}"
+ tmp="${tmp#* }"
+ netif="${tmp/ *}"
+ tmp="${tmp#* }"
+ src="${tmp}"
+ export shelf slot netif src
+}
+
+checkconfig() {
+ if [ -z "${vblade_conf}" ]; then
+ eerror "vblade configuration not specified for ${vblade_name}"
+ return 1
+ fi
+ getconfig
+
+ is_valid_numeric "${shelf}" 0
+ if [[ $? -ne 0 ]]; then
+ eerror "Shelf '${shelf}' is non-numeric or less than zero."
+ return 1
+ fi
+ is_valid_numeric "${slot}" 0 15
+ if [[ $? -ne 0 ]]; then
+ eerror "Slot '${slot}' is outside the valid range [0..15]."
+ return 1
+ fi
+
+ sysfs_base="/sys/class/net/"
+ procfs_base="/proc/sys/net/ipv4/conf/"
+ if test ! \( -e "${sysfs_base}${netif}" -o -e "${procfs_base}${netif}" \); then
+ eerror "Network interface '${netif}' does not exist"
+ return 1
+ fi
+
+ if test ! \( -f "${src}" -o -b "${src}" \) ; then
+ eerror "Source '${src}' must be a file or block device"
+ return 1
+ fi
+
+ if test ! \( -e "${src}" -a -r "${src}" \) ; then
+ eerror "Source '${src}' is not readable."
+ return 1
+ fi
+
+ return 0
+}
+
+is_valid_numeric() {
+ num="${1}"
+ min="${2}"
+ max="${3}"
+ # non-numeric
+ test "$num" -ge "0" 2>/dev/null
+ rc=$?
+ test "$rc" -eq 2 && return 2
+ # check for min
+ test -z "$min" && return 0
+ test "$num" -lt "$min" && return 1
+ # check for max
+ test -z "$max" && return 0
+ test "$num" -gt "$max" && return 1
+ # done
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ getconfig
+ ebegin "Starting ${srvname}: e${shelf}.${slot} on ${netif} using '${src}'"
+ export LOGTAG="${srvname}"
+ start-stop-daemon --start --quiet \
+ --pidfile ${pidfile} --background \
+ --make-pidfile --exec /usr/sbin/vbladed -- \
+ ${shelf} ${slot} ${netif} "${src}"
+ eend $?
+
+ #${shelf} ${slot} ${netif} "${src}" 2>&1 | logger -t ${srvname} &
+}
+
+stop() {
+ ebegin "Stopping ${srvname}"
+ #start-stop-daemon --stop --quiet --pidfile ${pidfile}
+ getconfig
+ ps -Ao pid,args | egrep "^[[:space:]]*[[:digit:]]+ /usr/sbin/vbladed? ${shelf} ${slot}" | awk '{print $1}' | xargs kill
+ eend $?
+
+ #start-stop-daemon --stop --quiet --exec /usr/sbin/vblade
+}
+
+# vim: ft=gentoo-init-d syntax=gentoo-init-d :
+# vim: ai sw=4 sts=4 ts=4 :
diff --git a/sys-block/vblade/files/vbladed b/sys-block/vblade/files/vbladed
new file mode 100644
index 000000000000..7fdf8fb9f57d
--- /dev/null
+++ b/sys-block/vblade/files/vbladed
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+#
+# run a vblade daemon using a logger process
+# output is directed to syslogd
+#
+# Although logging goes to syslog, let's going to
+# protect ourselves against the most common way or
+# calling vbladed: without arguments.
+if [ -z "$*" ]
+then
+ echo "Usage: vbladed <shelf> <slot> <ethn> <device>" >&2
+ exit 1
+fi
+
+[ -z "${LOGTAG}" ] && LOGTAG=vbladed
+
+/usr/sbin/vblade "${@}" </dev/null 2>&1 | /usr/bin/logger -t "${LOGTAG}"
diff --git a/sys-block/vblade/metadata.xml b/sys-block/vblade/metadata.xml
new file mode 100644
index 000000000000..1154867b1dab
--- /dev/null
+++ b/sys-block/vblade/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <upstream>
+ <remote-id type="sourceforge">aoetools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/vblade/vblade-19.ebuild b/sys-block/vblade/vblade-19.ebuild
new file mode 100644
index 000000000000..35766c1b2d71
--- /dev/null
+++ b/sys-block/vblade/vblade-19.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="vblade exports a block device using AoE"
+HOMEPAGE="http://sf.net/projects/aoetools/"
+#SRC_URI="mirror://sourceforge/aoetools/${P}.tar.gz"
+SRC_URI="mirror://sourceforge/aoetools/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+DEPEND=""
+RDEPEND="${DEPEND}
+ sys-apps/util-linux"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # messy tarball
+ make clean || die "Failed to clean up source"
+ sed -i 's,^CFLAGS.*,CFLAGS += -Wall,' makefile || die "Failed to clean up makefile"
+}
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ into /usr
+ doman vblade.8
+ dodoc HACKING NEWS README
+ dosbin vblade
+ dosbin "${FILESDIR}"/vbladed
+ newconfd "${FILESDIR}"/conf.d-vblade vblade
+ newinitd "${FILESDIR}"/init.d-vblade.vblade0 vblade.vblade0
+}
diff --git a/sys-block/vblade/vblade-20.ebuild b/sys-block/vblade/vblade-20.ebuild
new file mode 100644
index 000000000000..4dee0adaf132
--- /dev/null
+++ b/sys-block/vblade/vblade-20.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="vblade exports a block device using AoE"
+HOMEPAGE="http://sf.net/projects/aoetools/"
+SRC_URI="mirror://sourceforge/aoetools/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+RDEPEND="sys-apps/util-linux"
+
+src_prepare() {
+ sed -i -e 's,^CFLAGS.*,CFLAGS += -Wall,' \
+ -e 's:-o vblade:${LDFLAGS} \0:' \
+ makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin vblade
+ dosbin "${FILESDIR}"/vbladed
+ doman vblade.8
+ dodoc HACKING NEWS README
+ newconfd "${FILESDIR}"/conf.d-vblade vblade
+ newinitd "${FILESDIR}"/init.d-vblade.vblade0 vblade.vblade0
+}
diff --git a/sys-block/vblade/vblade-21.ebuild b/sys-block/vblade/vblade-21.ebuild
new file mode 100644
index 000000000000..0c0607311ff6
--- /dev/null
+++ b/sys-block/vblade/vblade-21.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="vblade exports a block device using AoE"
+HOMEPAGE="http://sf.net/projects/aoetools/"
+SRC_URI="mirror://sourceforge/aoetools/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="sys-apps/util-linux"
+
+src_prepare() {
+ sed -i -e 's,^CFLAGS.*,CFLAGS += -Wall,' \
+ -e 's:-o vblade:${LDFLAGS} \0:' \
+ makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin vblade
+ dosbin "${FILESDIR}"/vbladed
+ doman vblade.8
+ dodoc HACKING NEWS README
+ newconfd "${FILESDIR}"/conf.d-vblade vblade
+ newinitd "${FILESDIR}"/init.d-vblade.vblade0 vblade.vblade0
+}