diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-cluster/util-vserver | |
download | gentoo-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-cluster/util-vserver')
-rw-r--r-- | sys-cluster/util-vserver/Manifest | 2 | ||||
-rw-r--r-- | sys-cluster/util-vserver/files/bash_completion | 300 | ||||
-rw-r--r-- | sys-cluster/util-vserver/files/util-vserver-0.30.216-varlock.patch | 19 | ||||
-rw-r--r-- | sys-cluster/util-vserver/metadata.xml | 13 | ||||
-rw-r--r-- | sys-cluster/util-vserver/util-vserver-0.30.216_pre3025.ebuild | 100 | ||||
-rw-r--r-- | sys-cluster/util-vserver/util-vserver-0.30.216_pre3062.ebuild | 96 |
6 files changed, 530 insertions, 0 deletions
diff --git a/sys-cluster/util-vserver/Manifest b/sys-cluster/util-vserver/Manifest new file mode 100644 index 000000000000..38bea4643943 --- /dev/null +++ b/sys-cluster/util-vserver/Manifest @@ -0,0 +1,2 @@ +DIST util-vserver-0.30.216-pre3025.tar.bz2 760763 SHA256 6b6df2e96105361e7ede644d522e1cee60fd71ef72715b82e40a4a93ce7ea949 SHA512 5d799a19c8c78b7c2222e0d17490010d065e02e2a49020fb4766a98fb85a59d889881d231a279012935ff3d108706edf71c1e8736390cb9a7ce9af969a716a56 WHIRLPOOL 06e30603ead7d6835b3f70fb2491698619d82b898980529e9190818df76a4a2575f28fc82bc18cda67def2ae43c0e8c4b8038b10f37caf29f41fd029cce8124c +DIST util-vserver-0.30.216-pre3062.tar.bz2 768055 SHA256 efecefa1dbe6abba85c23822916aa67f2a740c66dfd6559f8a2d0afc2fcfb671 SHA512 1002a5d8f0d622445df73908f5f2ef5fab8424ff7134cd58b30680c03eddaacdebda47520c833434dfa6d3750cee79ac03ae9ee1b7f17a305b7ab2672d4f84d3 WHIRLPOOL 28c01f99e7dde6c4f47c23e51e83ea115665fd7ee523b873f12c325bdababea812d7053529c5fe361c1fdd4c726c41ab8ab058cb30bcda5eea29503a160b0b9c diff --git a/sys-cluster/util-vserver/files/bash_completion b/sys-cluster/util-vserver/files/bash_completion new file mode 100644 index 000000000000..73a9fef89f85 --- /dev/null +++ b/sys-cluster/util-vserver/files/bash_completion @@ -0,0 +1,300 @@ +# Completion for the vserver command. Source this file (or on some systems +# add it to ~/.bash_completion and start a new shell) and bash's completion +# mechanism will know all about vserver's options! +# +# Copyright (C) Thomas Champagne <lafeuil@gmail.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The latest version of this software can be obtained here: +# +# http://linux-vserver.org/Vserver+Completion +# +# version 0.4.0 + +have vserver-info && { +: ${UTIL_VSERVER_VARS:=$(vserver-info - SYSINFO |grep prefix: | awk '{ print $2}')/lib/util-vserver/util-vserver-vars} + +test -e "$UTIL_VSERVER_VARS" && { + +. "$UTIL_VSERVER_VARS" +. "$_LIB_FUNCTIONS" + +_vserver() { + local cur cmds cmdOpts cmdMethodOpts helpCmds names names_pipe func i j method + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + + # find available vServers: + # call function getAllVservers in vserver library + getAllVservers names + names_pipe=`echo ${names[@]} | sed 's/ /|/g'` + + # available commands + cmds='start stop restart condrestart suexec exec enter chkconfig \ + running status unify pkg apt-get apt-config apt-cache \ + rpm pkgmgmt delete' + + # options (long and short name) + cmdOpts='--help --version --debug --defaulttty -s --sync -v \ + --verbose --silent --' + + cmdMethodOpts='-m -n --context --confdir --lockfile \ + --hostname --netdev --netbcast --netmask \ + --netprefix --interface --cpuset \ + --cpusetcpus --cpusetmems --cpusetvirt \ + --initstyle --flags --help --' + + # if the previous option is a single option + helpCmds='--help|--version' + if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then + return 0 + fi + + # lookup the vServer name + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then + # found it! + break + fi + done + + #a vserver has been found + if (( $i < ${#COMP_WORDS[@]}-1 )) ; then + # Show the vserver command without build + case "${COMP_WORDS[i+1]}" in + start) + COMPREPLY=( $( compgen -W "--rescue --rescue-cmd" -- $cur ) ) + ;; + # No completion for apt-config + stop|restart|condrestart|enter|running|status|apt-config|delete) + ;; + suexec) + # I don't know how to do + COMPREPLY=( $( compgen -W -- $cur ) ) + ;; + exec) + #I don't know how to do + COMPREPLY=( $( compgen -W "" -- $cur ) ) + ;; + unify) + COMPREPLY=( $( compgen -W "-R" -- $cur ) ) + ;; + apt-get|apt-cache) + func=${COMP_WORDS[i+1]} + COMP_WORDS=( ${COMP_WORDS[@]:$((i+1))} ) + COMP_CWORD=$((COMP_CWORD-i-1)) + declare -f _${func//-/_} > /dev/null && _${func//-/_} + ;; + *) + COMPREPLY=( $( compgen -W "$cmds" -- $cur ) ) + ;; + esac + return 0 + else + #no vserver name found + prev=${COMP_WORDS[COMP_CWORD-1]} + + #search the new name of vserver + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do + if [[ ${COMP_WORDS[i]} == !(vserver|-*) ]] ; then + # found it! + break + fi + done + + if (( $i < ${#COMP_WORDS[@]}-1 )) ; then + j=$i + i=${#COMP_WORDS[@]} + for (( ; j < ${#COMP_WORDS[@]}-1; j++ )) ; do + if [[ ${COMP_WORDS[j]} == "--" ]]; then + # method's parameter + case "$method" in + legacy|copy) + ;; + apt-rpm) + COMPREPLY=( $( compgen -W "-d" -- $cur ) ) + ;; + yum) + COMPREPLY=( $( compgen -W "-d" -- $cur ) ) + ;; + rpm) + COMPREPLY=( $( compgen -W "-d --empty --force --nodeps" -- $cur ) ) + ;; + skeleton) + ;; + debootstrap) + COMPREPLY=( $( compgen -W "-d -m -s --" -- $cur ) ) + ;; + *) + ;; + esac + return 0 + break + fi + + if [[ ${COMP_WORDS[j]} == @(build|-m) ]]; then + i=$j + if (( $j+1 < ${#COMP_WORDS[@]}-1 )) ; then + method=${COMP_WORDS[j+1]} + fi + fi + done + + if (( $i < ${#COMP_WORDS[@]}-1 )) ; then + case $prev in + --help) + ;; + -n|--context|--confdir|--lockfile|--hostname|--netdev|--netbcast|--netmask|--netprefix|--interface|--cpuset|--cpusetcpus|--cpusetmems|--cpusetvirt|--initstyle|--flags) + COMPREPLY=( $( compgen -W "" -- $cur ) ) + ;; + -m) + COMPREPLY=( $( compgen -W "legacy copy apt-rpm yum rpm skeleton debootstrap" -- $cur ) ) + ;; + *) + COMPREPLY=( $( compgen -W "$cmdMethodOpts" -- $cur ) ) + ;; + esac + else + COMPREPLY=( $( compgen -W "build" -- $cur ) ) + fi + else + COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) + fi + + return 0 + fi + + return 0 +} + +complete -F _vserver vserver + +_vapt_rpm_yum() +{ + local cur cmds cmdOpts helpCmds names func i + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + + # options (long and short name) + cmdOpts='--help --version --quiet -q --all' + + # if the previous option is a single option + helpCmds='--help|--version' + + if [[ "${COMP_WORDS[1]}" == "@($helpCmds)" ]] ; then + return 0 + fi + + # search -- + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do + if [[ ${COMP_WORDS[i]} = "--" ]] ; then + # found it! + break + fi + done + + # find available vServers + # call function getAllVservers in vserver library + getAllVservers names + names_pipe=`echo ${names[@]}" --all" | sed 's/ /|/g'` + + if (( $i < ${#COMP_WORDS[@]}-1 )) && (( $i < $COMP_CWORD )) ; then + func=${COMP_WORDS[0]:1} + COMP_WORDS=( $func ${COMP_WORDS[@]:$((i+1))} ) + COMP_CWORD=$((COMP_CWORD-i)) + declare -f _${func//-/_} > /dev/null && _${func//-/_} + else + # search vServer name + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do + if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then + # found it! + break + fi + done + + if (( $i < ${#COMP_WORDS[@]}-1 )) ; then + if [[ "${COMP_WORDS[i]}" = "--all" ]] ; then + cmdOpts='--' + COMPREPLY=( $( compgen -W "$cmdOpts" -- $cur ) ) + else + cmdOpts='--' + COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) + fi + else + COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) + fi + fi + + return 0 +} + +_vserver_copy() +{ + local cur prev cmdOpts helpCmds confCmds names names_pipe i + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + + # find available vServers + # call function getAllVservers in vserver library + getAllVservers names + names_pipe=`echo ${names[@]} | sed 's/ /|/g'` + + # options (long and short name) + cmdOpts='--help -h --version -V --verbose -v --quiet -q \ + --vsroot -r --rsh -R --stopstart -s \ + --domain -d --ip -i' + + # if the previous option is a single option + helpCmds='--help|-h|--version|-V' + + if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then + return 0 + fi + + confCmds='--ip|-i|--domain|-d' + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [[ $prev == @($confCmds) ]] ; then + return 0 + fi + + # search a vServer name + for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then + # found it! + break + fi + done + + if (( $i < ${#COMP_WORDS[@]}-1 )) ; then + return 0 + else + COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) + fi + + return 0 +} + +complete -F _vapt_rpm_yum vapt-get +complete -F _vapt_rpm_yum vrpm +complete -F _vapt_rpm_yum vyum +complete -F _vserver_copy vserver-copy + +} +} diff --git a/sys-cluster/util-vserver/files/util-vserver-0.30.216-varlock.patch b/sys-cluster/util-vserver/files/util-vserver-0.30.216-varlock.patch new file mode 100644 index 000000000000..2597ff5a63a0 --- /dev/null +++ b/sys-cluster/util-vserver/files/util-vserver-0.30.216-varlock.patch @@ -0,0 +1,19 @@ +commit 13a83fe9e08e8667ee42c62d0631ca8ebbed7e89 +Author: Benedikt Böhm <bb@xnull.de> +Date: Sun Feb 10 20:35:06 2013 +0100 + + gentoo: use /var/run for new /run compatibility + +diff --git a/scripts/vserver-init.functions b/scripts/vserver-init.functions +index fef3c82..7feb27d 100755 +--- a/scripts/vserver-init.functions ++++ b/scripts/vserver-init.functions +@@ -27,7 +27,7 @@ elif test -e /etc/gentoo-release; then + success() { eend 0; } + passed() { eend 0; } + failure() { eend 1; } +- lockfile=/var/lock/vservers/$LOCKFILE ++ lockfile=/var/run/$LOCKFILE + else + _beginResult() { echo -n "$@..."; } + _postResult() { :; } diff --git a/sys-cluster/util-vserver/metadata.xml b/sys-cluster/util-vserver/metadata.xml new file mode 100644 index 000000000000..54abb527103a --- /dev/null +++ b/sys-cluster/util-vserver/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer><email>maintainer-needed@gentoo.org</email></maintainer> + <longdescription> + util-vserver is a Linux virtual server utility framework, + allowing an administrator to set up multiple, isolated + virtual servers. It can be used to run various services + securely separated, without requiring special configuration. + Virtual servers are unable to interact with each other, or + the main server. + </longdescription> +</pkgmetadata> diff --git a/sys-cluster/util-vserver/util-vserver-0.30.216_pre3025.ebuild b/sys-cluster/util-vserver/util-vserver-0.30.216_pre3025.ebuild new file mode 100644 index 000000000000..95aa23308726 --- /dev/null +++ b/sys-cluster/util-vserver/util-vserver-0.30.216_pre3025.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils bash-completion-r1 + +MY_P=${P/_/-} +S="${WORKDIR}"/${MY_P} + +DESCRIPTION="Linux-VServer admin utilities" +HOMEPAGE="http://www.nongnu.org/util-vserver/" +SRC_URI="http://people.linux-vserver.org/~dhozac/t/uv-testing/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~sparc x86" + +IUSE="" + +CDEPEND="dev-libs/beecrypt + net-firewall/iptables + net-misc/vconfig + sys-apps/iproute2 + || ( >=sys-apps/coreutils-6.10-r1 sys-apps/mktemp )" + +DEPEND=">=dev-libs/dietlibc-0.33_pre20110403 + ${CDEPEND}" + +RDEPEND="${CDEPEND}" + +pkg_setup() { + if [[ -z "${VDIRBASE}" ]]; then + einfo + einfo "You can change the default vserver base directory (/vservers)" + einfo "by setting the VDIRBASE environment variable." + fi + + : ${VDIRBASE:=/vservers} + + einfo + einfo "Using \"${VDIRBASE}\" as vserver base directory" + einfo +} + +src_test() { + # do not use $D from portage by accident (#297982) + sed -i -e 's/^\$D //' "${S}"/src/testsuite/vunify-test.sh + default +} + +src_configure() { + econf --with-vrootdir=${VDIRBASE} \ + --with-initscripts=gentoo \ + --localstatedir=/var +} + +src_compile() { + emake -j1 || die "emake failed!" +} + +src_install() { + make DESTDIR="${D}" install install-distribution \ + || die "make install failed!" + + # keep dirs + keepdir /var/run/vservers + keepdir /var/run/vservers.rev + keepdir /var/run/vshelper + keepdir /var/lock/vservers + keepdir /var/cache/vservers + keepdir "${VDIRBASE}" + keepdir "${VDIRBASE}"/.pkg + + # bash-completion + newbashcomp "${FILESDIR}"/bash_completion ${PN} + + dodoc README ChangeLog NEWS AUTHORS THANKS util-vserver.spec +} + +pkg_postinst() { + # Create VDIRBASE in postinst, so it is (a) not unmerged and (b) also + # present when merging. + + mkdir -p "${VDIRBASE}" + setattr --barrier "${VDIRBASE}" + + rm /etc/vservers/.defaults/vdirbase + ln -sf "${VDIRBASE}" /etc/vservers/.defaults/vdirbase + + elog + elog "You have to run the vprocunhide command after every reboot" + elog "in order to setup /proc permissions correctly for vserver" + elog "use. An init script has been installed by this package." + elog "To use it you should add it to a runlevel:" + elog + elog " rc-update add vprocunhide default" + elog +} diff --git a/sys-cluster/util-vserver/util-vserver-0.30.216_pre3062.ebuild b/sys-cluster/util-vserver/util-vserver-0.30.216_pre3062.ebuild new file mode 100644 index 000000000000..96af5e621952 --- /dev/null +++ b/sys-cluster/util-vserver/util-vserver-0.30.216_pre3062.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils bash-completion-r1 + +MY_P=${P/_/-} +S="${WORKDIR}"/${MY_P} + +DESCRIPTION="Linux-VServer admin utilities" +HOMEPAGE="http://www.nongnu.org/util-vserver/" +SRC_URI="http://people.linux-vserver.org/~dhozac/t/uv-testing/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~sparc ~x86" + +IUSE="" + +CDEPEND="dev-libs/beecrypt + net-firewall/iptables + net-misc/vconfig + sys-apps/iproute2 + sys-apps/coreutils" + +DEPEND=">dev-libs/dietlibc-0.33 + ${CDEPEND}" + +RDEPEND="${CDEPEND}" + +pkg_setup() { + if [[ -z "${VDIRBASE}" ]]; then + einfo + einfo "You can change the default vserver base directory (/vservers)" + einfo "by setting the VDIRBASE environment variable." + fi + + : ${VDIRBASE:=/vservers} + + einfo + einfo "Using \"${VDIRBASE}\" as vserver base directory" + einfo +} + +src_test() { + # do not use $D from portage by accident (#297982) + sed -i -e 's/^\$D //' "${S}"/src/testsuite/vunify-test.sh + default +} + +src_configure() { + econf --with-vrootdir=${VDIRBASE} \ + --with-initscripts=gentoo \ + --localstatedir=/var +} + +src_compile() { + emake -j1 || die "emake failed!" +} + +src_install() { + make DESTDIR="${D}" install install-distribution \ + || die "make install failed!" + + # keep dirs + keepdir /var/cache/vservers + keepdir "${VDIRBASE}" + keepdir "${VDIRBASE}"/.pkg + + # bash-completion + newbashcomp "${FILESDIR}"/bash_completion ${PN} + + dodoc README ChangeLog NEWS AUTHORS THANKS util-vserver.spec +} + +pkg_postinst() { + # Create VDIRBASE in postinst, so it is (a) not unmerged and (b) also + # present when merging. + + mkdir -p "${VDIRBASE}" + setattr --barrier "${VDIRBASE}" + + rm /etc/vservers/.defaults/vdirbase + ln -sf "${VDIRBASE}" /etc/vservers/.defaults/vdirbase + + elog + elog "You have to run the vprocunhide command after every reboot" + elog "in order to setup /proc permissions correctly for vserver" + elog "use. An init script has been installed by this package." + elog "To use it you should add it to a runlevel:" + elog + elog " rc-update add vprocunhide default" + elog +} |