Skip to content

Commit

Permalink
Update docs, add gentoo packaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
pbhenson committed Mar 26, 2019
1 parent a045a1a commit 7fd4ca9
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 27 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,20 @@ activity logging, and some other minor improvements.
Kevan's fork was re-forked by EMC Isilon to address bugs as we began using
it heavily in our environment once more.

EMC's fork was integrated into Kevan's repo, which was eventually handed
off to Paul B. Henson (https://github.com/pbhenson) to maintain.

# Requirements

Python 2.5 or better is required, due to use of the 'with' statement and
other syntax that was introduced in Python 2.5. It's being developed against
Python 2.6, however, since that's the currently-shipping version for
RHEL/CentOS 6.
other syntax that was introduced in Python 2.5. Upstream development
is currently under Gentoo Linux with python 2.7.

Due to the use of epoll in the server implementation, Linux is required.
There may be other issues associated with using vSPC.py on other OSs, as
large parts of vSPC.py were only developed & tested on Linux.

VMWare ESXi 4.1 through 5.5 are supported.
vSPC has been deployed on VMWare ESXi 4.1 through 6.7.

# Configuring VMs to connect to the concentrator

Expand Down Expand Up @@ -153,3 +155,4 @@ rpmbuild -ta vSPC-<version>.tar.gz
- Dave Johnson (fixes for missing getopt modules and missing shelf.sync() calls)
- Fabien Wernli (add options to configure listen interface, fix broken -f option, packaging improvements)
- Casey Peel (simplified backend argument parsing, fix connection leaks, and improved logging performance)
- Paul B. Henson (minor fixes and maintenance)
29 changes: 29 additions & 0 deletions contrib/gentoo/vspc-0.6.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

EAPI=5

PYTHON_COMPAT=( python2_7 )
inherit distutils-r1

DESCRIPTION="A VMware virtual serial port concentrator written in python"
HOMEPAGE="https://github.com/pbhenson/vSPC.py"
SRC_URI="https://github.com/pbhenson/vSPC.py/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD-2"
SLOT="0"
IUSE=""
KEYWORDS="amd64"

DEPEND="dev-python/setuptools"
RDEPEND=""

src_unpack() {
unpack ${A}
mv vSPC.py-* ${P} || die
}

src_install() {
distutils-r1_src_install

newinitd contrib/gentoo/vspc-init vspc
newconfd contrib/gentoo/vspc-conf vspc
}
9 changes: 9 additions & 0 deletions contrib/gentoo/vspc-conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Config file for vspc

# enable SSL
VSPC_SSL="--ssl --cert=/etc/stunnel/stunnel.pem"

# chose a different backend
VSPC_BACKEND="--backend Logging -l /var/log/consoles -m 0644"

VSPC_OPTS="--no-vm-port $VSPC_SSL $VSPC_BACKEND"
30 changes: 30 additions & 0 deletions contrib/gentoo/vspc-init
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/sbin/openrc-run

extra_started_commands="reload"

depend() {
need net
}

start() {
ebegin "Starting vSPC.py Virtual Serial Port Concentrator"
local pidfile=/var/run/vspc/vspc.pid
mkdir -p "$(dirname ${pidfile})"
start-stop-daemon --start --quiet --pidfile=${pidfile} \
--exec /usr/bin/vSPCServer -- --pidfile=${pidfile} $VSPC_OPTS
eend $?
}

reload() {
ebegin "Reloading vSPC.py Virtual Serial Port Concentrator"
local pidfile=/var/run/vspc/vspc.pid
kill -HUP $(cat ${pidfile})
eend $?
}

stop() {
local pidfile=/var/run/vspc/vspc.pid
ebegin "Shutting down vSPC.py Virtual Serial Port Concentrator"
start-stop-daemon --stop --quiet --pidfile=${pidfile}
eend $?
}
8 changes: 4 additions & 4 deletions contrib/redhat/vSPC.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%define name vSPC
%define version 0.2
%define unmangled_version 0.2
%define release 2.%{dist}
%define version 0.6
%define unmangled_version 0.6
%define release 6.%{dist}

Summary: vSPC is a virtual Serial Port Concentrator for VMware virtual serial ports,available in ESXi 4.1+.
Name: %{name}
Expand All @@ -14,7 +14,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Zach Loafman <zmerlynn@sf.net>
Url: https://github.com/isnotajoke/vSPC.py
Url: https://github.com/pbhenson/vSPC.py
Requires: python26
BuildRequires: python26
BuildRequires: python26-distribute
Expand Down
File renamed without changes.
23 changes: 4 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ def read(fname):
"available in ESXi 4.1+."),
license = "BSD",
keywords = "ESX VMWare serial port concentrator",
url = "https://github.com/isnotajoke/vSPC.py",
url = "https://github.com/pbhenson/vSPC.py",
package_dir = {'vSPC': 'lib'},
scripts = [ 'vSPCClient', 'vSPCServer' ],
data_files = [('/etc/init.d', ['util/sysvinit/vSPCServer'])],
# Don't blindly install Red Hat specific files
# Python-fu welcomed to make this only run on Red Hat boxes
#data_files = [('/etc/init.d', ['util/sysvinit/vSPCServer'])],
packages=['vSPC'],
#apparently this doesn't always work need to look into this
#long_description=read('README.md'),
Expand All @@ -29,20 +31,3 @@ def read(fname):
"License :: OSI Approved :: BSD License",
],
)

















0 comments on commit 7fd4ca9

Please sign in to comment.