summaryrefslogtreecommitdiff
path: root/net-misc/termpkg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/termpkg
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/termpkg')
-rw-r--r--net-misc/termpkg/Manifest12
-rw-r--r--net-misc/termpkg/files/termnetd.confd14
-rw-r--r--net-misc/termpkg/files/termnetd.initd51
-rw-r--r--net-misc/termpkg/files/termpkg-3.3-ttydforfax.diff28
-rw-r--r--net-misc/termpkg/files/termpkg-3.3.9.1-gcc43.diff11
-rw-r--r--net-misc/termpkg/files/ttyd.confd63
-rw-r--r--net-misc/termpkg/files/ttyd.initd95
-rw-r--r--net-misc/termpkg/metadata.xml17
-rw-r--r--net-misc/termpkg/termpkg-3.3.9.1-r2.ebuild64
9 files changed, 355 insertions, 0 deletions
diff --git a/net-misc/termpkg/Manifest b/net-misc/termpkg/Manifest
new file mode 100644
index 000000000000..e7d5e39ae713
--- /dev/null
+++ b/net-misc/termpkg/Manifest
@@ -0,0 +1,12 @@
+AUX termnetd.confd 347 SHA256 700809ffcaacb4debdaa4cf6b437a4284aee71a6ba383388ad8fdf49d412876a SHA512 7d872b40c3d3372538ad87d554d181a7fd0e153143c1741d6b0098dca6c691c0f103b6013289a49c801664f7347da25c3910b109fdd3cc890fea2e4b00aa278b WHIRLPOOL e45c00442c2149f95120da761d07421f041292a21495dcae5deb24cb4cbbf806012740d00620144eba1dbec7acb22d178227e0e151c4106ce167ec4c716f0c89
+AUX termnetd.initd 1327 SHA256 1420b9b6eab143910545db50a4375d6847dd4732e431d429e822d43de71a83a2 SHA512 e52af8ca5452b3cb5790a021597b97109872dab3871374669c36bbb71b44b9f86d31846c8a5dd52844607f50f609464916b0db7dc83d6b025deeee6ec1cd1eb8 WHIRLPOOL 72f135a5d8d390c20abf80f47b52609ba2e8b44b3a981a1a77e9851335c6c99447c6f926dce6fb26c691ed13554e0956750465651911c688ca7eac484c6c0d58
+AUX termpkg-3.3-ttydforfax.diff 1076 SHA256 33162e2c3ef11200e90fecdc21dbcf4daa472157e627bf30a2fab9a2d6f7b7b7 SHA512 8c9eb065cc0e9bb9709750b71dd22ee8da1f7945f23ac5a9d419b08e4d9168111b812767341e3bdaf86c0e2edd2fc0ad18500b4a68dd2b74aba426f4d189c176 WHIRLPOOL 48ae22a8351b72373abd4a9553dbdde29c53ff00378287557a649c14a9db076e1e160afe647d25fce17bb5a726ded2ed40b0c0d2f9d8b7d80ac653741d1c9825
+AUX termpkg-3.3.9.1-gcc43.diff 379 SHA256 40d52ff971cd72e3062d33632d29a767810ee9aed529bb51897b39db9fd097dc SHA512 73154f1ad78a4afd4a2d2289e2f6e36f23f76accd18b70a94212bf535dbbad1b072ec6e86f39f7d0c06252ef417c73c55a0b1d6d1d79bd239c95aed3f71074e4 WHIRLPOOL cfba55eb3700ec19bd0f9e1effefae2e09ca30e9328e1efcf2a13a2c12e24af7e6445f260bd980347a5845fab7e9ef51d695bcbbab104c05ac1c5e61d8dd26f7
+AUX ttyd.confd 1894 SHA256 5f93f41220aeff6510afc74b7d6afdf2bee22c92f9bc0e29ff206db10f5bfde6 SHA512 17f13c9191858f3b620a84f91b3596fcd29ef8706064ff18d8e44b50adccb5d91494b61417e296da59671d78465b324cf5c12538c70e8fd783f2c86de8ef779e WHIRLPOOL f9084cacc6f49697e4355d988a92ae25973a6bd3e72575d168e2cfe72ffeb45f0e0cf705418d4b7c2ea340d7191c741e69a88569824be87fee9cf16646d739d4
+AUX ttyd.initd 2222 SHA256 d413721cc65fe8b2a208ca99eb855a4d35303fbd71005876ae2c4d5d47835807 SHA512 d778644393722fa00837f542bbbd772afc86801bf875430321d287adb7129b605bd12d8dd3a49a79795b58b188b4e7febc13546e7181a1ede278f9fbb40e47bd WHIRLPOOL cffb6ce26fb7287e6194922d3c69c3db7b6d096861586691dbd693a888a810b26679080079f69f27d3e5e598a9a984cbefae4d38d026bf77e387e6c47dff8ca8
+DIST termpkg_3.3-9.1.diff.gz 6759 SHA256 3ece3bc9ae469c45a8eba24ccd46c9460e2f03a215e4ec5f7c8fb0d41598b211 SHA512 dbcba1bc020ead0ef5e4f2fb2e7ee50937dbd6d614e53547bf2473dc3cbf0f4f3100a15bcd200b815a4fcbfd454a08a3185cdb305c4f3bde389070b5545293d4 WHIRLPOOL 87cb0182b4ff5124e43d3fcc16557a7d0dbd888a3d89b466f8b89b785073eb383b29d78ad28bdcdf4f0fa36c1a4353a1dc5a5b82c970d4bc2f3fc53e2c734a4b
+DIST termpkg_3.3.orig.tar.gz 65807 SHA256 0497f30d3fdac114080b65476d2757211a21276ae32c269d91314e3d54b9eff0 SHA512 4dc1152af27af5edda66622435f5c5d46e9bbba9dc3e9e0d6349792efef9488993d9ea02eb8780bc05a0a29756a0ba3cf45bf8d1799906b55d166c287432c22c WHIRLPOOL 0a5f789d2521e3b460fd174bc647efef00d89ea2e53668002ac210ee859e810cb04d8ab7bd0b41e653d2d4a105566fa045ced92231ca6e0b8567c4efa049ca0b
+EBUILD termpkg-3.3.9.1-r2.ebuild 1327 SHA256 f5ab2cbb5fa8b75ddcc7238cf9c21bb71d86f20fb1a53bf1d8ebc3c86cac0a16 SHA512 cb038190abf59b53f32b563a3bf7aefe8dd8652fdc5ed5f2521d94428e77fdd2dc7236830215add79abc2f943e19b019c6202e84d8fa19f04d16d4faae9f5b8a WHIRLPOOL b4c6aad89851c97835f2a297ae05aca94636eb00e7f1cad42ff1911976c84c821ef5731f7dd90bbf67535a61e66ee61c39d9544fd9c57ba3944328f0cc379850
+MISC ChangeLog 3536 SHA256 2c27fba6afef293a149df2d7d5594fb4bddd3ff0ef86293f5d0fe0872eaeb74e SHA512 b6b5a94ba0e23ac2642e3fe20e4b3873853b1cb448a0a6c8c33520aa2aae16b2553b898d0d2942a150b67ad1c26ed2dd6f3652714a6512444e852c441de37d30 WHIRLPOOL 539d840c061e521f320ead3b4d767f0be050295643b4e9a60e6342b9c53437ade7ad8dbbd542fa7c66ef896e724f1765a64a97b2e3349fa4fc9d022bbdebbf44
+MISC ChangeLog-2015 1007 SHA256 1ca8c24fdaafdab217e04f2f0603e4211e64cd2f3cab2486c2297907624f4a5f SHA512 e298d53d09e07870edc7b78afa32ff48b6c84a077dc4492868ae2e906646e60ea4607998e13333c46c223cde04adb02e9a8fede6313dad4262f551573da83a31 WHIRLPOOL 60f3377cc460af8c8d8477b2d45cdb7cdd9fe678a04e69cd63776139480865aec5993dd1097cad336dcc90859201e837eadcab64cbc6e7e13d29f5350f3a8770
+MISC metadata.xml 618 SHA256 72102dd4e1e5d85cca4d0c5323091083caa423270ab092a8bd683cc016429fc9 SHA512 b82080f75078bb82c6ba021c631e8ddd4af719a523a70b1f921e3221a37b1e766918680cb77f9fbc9af74aacf9c196c3264720a95cbdd902f042b88f1c21f75f WHIRLPOOL d3862250a4f090074ca925aaf8152e4906fa39797309f7eb9d932448b5effe1a35fc7c61222567f463424065886a78abcba9d4f664cf97affe31d1f16b0f632e
diff --git a/net-misc/termpkg/files/termnetd.confd b/net-misc/termpkg/files/termnetd.confd
new file mode 100644
index 000000000000..4eb95a989d41
--- /dev/null
+++ b/net-misc/termpkg/files/termnetd.confd
@@ -0,0 +1,14 @@
+# Config file for /etc/init.d/termnetd
+
+# Set the configuration file to one other than the default of /etc/termnetd.conf
+#
+#CONFIG_FILE="/etc/termnetd.conf"
+
+# Sets the IP port to listen to for the control port (default = none).
+#
+#CONTROL_PORT=""
+
+# see the termnetd(1) manual page for additional options you can configure here
+#
+#EXTRA_OPTS=""
+
diff --git a/net-misc/termpkg/files/termnetd.initd b/net-misc/termpkg/files/termnetd.initd
new file mode 100644
index 000000000000..dfc422be6671
--- /dev/null
+++ b/net-misc/termpkg/files/termnetd.initd
@@ -0,0 +1,51 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Terminal Server daemon (${RC_SVCNAME#*.})"
+command="/usr/sbin/termnetd"
+name="${RC_SVCNAME}"
+
+extra_started_commands="reload"
+description_reload="Reread configuration file and make the appropriate changes"
+start_stop_daemon_args="--quiet --exec ${command} --name ${name}"
+
+depend() {
+ use logger
+ need net
+}
+
+config_check() {
+ command_args="${EXTRA_OPTS}"
+ CONFIG_FILE_DEFAULT="/etc/termnetd.conf"
+
+ [ -z "${CONFIG_FILE}" ] && CONFIG_FILE="${CONFIG_FILE_DEFAULT}"
+ [ -n "${CONTROL_PORT}" ] && command_args="${command_args} -s ${CONTROL_PORT}"
+ [ "${CONFIG_FILE}" != "${CONFIG_FILE_DEFAULT}" ] && command_args="${command_args} -c ${CONFIG_FILE}"
+
+ if [ ! -f "${CONFIG_FILE}" ]; then
+ eerror "Please create ${CONFIG_FILE}"
+ eerror "Sample conf: ${CONFIG_FILE_DEFAULT}.dist"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ config_check || return ${?}
+ ebegin "Starting ${description}"
+ start-stop-daemon --start ${start_stop_daemon_args} -- ${command_args}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${description}"
+ start-stop-daemon --stop ${start_stop_daemon_args}
+ eend ${?}
+}
+
+reload() {
+ ebegin "Reloading ${description}"
+ start-stop-daemon --signal HUP ${start_stop_daemon_args}
+ eend ${?}
+}
diff --git a/net-misc/termpkg/files/termpkg-3.3-ttydforfax.diff b/net-misc/termpkg/files/termpkg-3.3-ttydforfax.diff
new file mode 100644
index 000000000000..0471fde13154
--- /dev/null
+++ b/net-misc/termpkg/files/termpkg-3.3-ttydforfax.diff
@@ -0,0 +1,28 @@
+--- termpkg-3.3/termnet/ttyd.c.orig 2005-09-29 08:59:05.000000000 -1000
++++ termpkg-3.3/termnet/ttyd.c 2005-09-29 08:51:33.000000000 -1000
+@@ -340,7 +340,10 @@
+ char *cp;
+ int x;
+ for (cp = commbuf, x = 0; x < cnt; x++, cp++)
++if (isprint(*cp))
+ syslog(LOG_DEBUG, "ttyd: Have net char 0x%x, |%c|", *cp, *cp);
++else
++syslog(LOG_DEBUG, "ttyd: Have net char 0x%x", *cp);
+ }
+ write(fd, commbuf, cnt);
+ }
+@@ -366,9 +369,13 @@
+ char *cp;
+ int x;
+ for (cp = commbuf, x = 0; x < cnt; x++, cp++)
++if (isprint(*cp))
+ syslog(LOG_DEBUG, "ttyd: Have key char 0x%x, |%c|", *cp, *cp);
++else
++syslog(LOG_DEBUG, "ttyd: Have key char 0x%x", *cp);
+ }
+- inputTerminal(commbuf, cnt);
++// inputTerminal(commbuf, cnt);
++write(fileno(tnlout), commbuf, cnt);
+ }
+ else
+ break;
diff --git a/net-misc/termpkg/files/termpkg-3.3.9.1-gcc43.diff b/net-misc/termpkg/files/termpkg-3.3.9.1-gcc43.diff
new file mode 100644
index 000000000000..8d17fc5dd8b9
--- /dev/null
+++ b/net-misc/termpkg/files/termpkg-3.3.9.1-gcc43.diff
@@ -0,0 +1,11 @@
+diff -Naur termpkg-3.3.orig/libtn/SocketIO.c termpkg-3.3/libtn/SocketIO.c
+--- termpkg-3.3.orig/libtn/SocketIO.c 2008-09-03 18:21:28.881220673 +0200
++++ termpkg-3.3/libtn/SocketIO.c 2008-09-03 18:23:29.106343243 +0200
+@@ -25,6 +25,7 @@
+ #endif
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <arpa/inet.h>
+ #include <fcntl.h>
+ #include <string.h>
+ #include <stdlib.h>
diff --git a/net-misc/termpkg/files/ttyd.confd b/net-misc/termpkg/files/ttyd.confd
new file mode 100644
index 000000000000..5b0e2b8c0002
--- /dev/null
+++ b/net-misc/termpkg/files/ttyd.confd
@@ -0,0 +1,63 @@
+# Configfile for /etc/init.d/ttyd
+
+# HINT: if you only need one virtual TTY, then you can use this config.
+# Otherwise you should use it as a template for specific configurations.
+# Just copy /etc/conf.d/ttyd to /etc/conf.d/ttyd.<foo> and symlink
+# /etc/init.d/ttyd to /etc/init.d/ttyd.<foo>
+
+
+# Master pseudo tty device to open and wait for a connection on.
+# For reference, in Linux the master pseudo tty devices are the
+# devices /dev/pty[a-ep-z][0-9a-f] and the slave devices are
+# /dev/tty[a-ep-z][0-9a-f].
+#
+PTY="/dev/ptyp0"
+
+# The host and port parameters specify the host and IP port to
+# connect to when the slave pseudo device is opened.
+#
+HOST="host.example.com"
+PORT=3000
+
+# The optional mode and user options specify the filesystem
+# permissions of the slave pseudo device. We set them right
+# after the ttyd daemon has started. After stopping, we reset
+# them to the permissions of the master pseudo device.
+#
+#MODE=660
+#USER="root:uucp"
+
+# Sets the initial baud-rate of the device (optional).
+#
+#BAUDRATE=115200
+
+# Optional port settings. Specified by a string of one of
+# more of the following concatenated together with no
+# intervening spaces:
+#
+# 8: 8 bits/character
+# 7: 7 bits/character
+# 6: 6 bits/character
+# 5: 5 bits/character
+# N: No parity
+# E: Even parity
+# O: Odd parity
+# C0: No hardware flow control
+# C1: Hardware flow control
+# S0: No software flow control
+# S1: Software flow control
+#
+#PORT_SETTINGS="8NC0"
+
+# You can create symlinks to the slave pseudo device, so you
+# have an easy to remember name for your virtual device. You
+# can add as many links as you want, if you blank-seperate the
+# names. All links *must* be relative and beneath to /dev.
+#
+#SYMLINK="ttyd/modem ttyNET0"
+
+# Some odd programs just don't work with symlinks, so you
+# can also create hardlinks (even in addition to symlinks).
+# Same rules apply as for symlinks.
+#
+#HARDLINK="ttyS5"
diff --git a/net-misc/termpkg/files/ttyd.initd b/net-misc/termpkg/files/ttyd.initd
new file mode 100644
index 000000000000..971789047a3d
--- /dev/null
+++ b/net-misc/termpkg/files/ttyd.initd
@@ -0,0 +1,95 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Remote Modem Utility (${RC_SVCNAME#*.})"
+command="/usr/sbin/ttyd"
+name="${RC_SVCNAME}"
+
+start_stop_daemon_args="--quiet --exec ${command} --name ${name}"
+
+depend() {
+ use logger
+ need net
+}
+
+config_check() {
+ # sanitize PTY/TTY names
+ DEV_PTY="/dev/${PTY/\/dev\/}"
+ DEV_TTY="${DEV_PTY/\/pty//tty}"
+
+ # create command args
+ command_args="-d ${DEV_PTY}"
+ [ -n "${BAUDRATE}" ] && command_args="${command_args} -b ${BAUDRATE}"
+ [ -n "${PORT_SETTINGS}" ] && command_args="${command_args} -p ${PORT_SETTINGS}"
+ command_args="${command_args} ${HOST} ${PORT}"
+}
+
+device_check() {
+ if [ ! -e "${DEV_PTY}" ]; then
+ eerror "PTY doesn't exist: ${DEV_PTY}"
+ return 1
+ fi
+ if [ ! -e "${DEV_TTY}" ]; then
+ eerror "TTY doesn't exist: ${DEV_TTY}"
+ return 1
+ fi
+ return 0
+}
+
+linkrel() { # <from> <to>
+ local LINK="${1%/*}/${2/\/dev\/}"
+ echo "${LINK/\/dev\/}" | sed "s:[^/]\+/:../:g"
+}
+
+setup_links() {
+ local LINK NODE
+ for LINK in ${SYMLINK}; do
+ NODE="/dev/${LINK/\/dev\/}"
+ mkdir -p -- "${NODE%/*}" && ln -snf -- $(linkrel "${NODE}" "${DEV_TTY}") "${NODE}"
+ done
+ for LINK in ${HARDLINK}; do
+ NODE="/dev/${LINK/\/dev\/}"
+ mkdir -p -- "${NODE%/*}" && ln -nf -- "${DEV_TTY}" "${NODE}"
+ done
+}
+
+unset_links() {
+ local LINK LIST=""
+ for LINK in ${SYMLINK} ${HARDLINK}; do
+ LIST="${LIST} /dev/${LINK/\/dev\/}"
+ done
+ [ -n "${LIST}" ] && rm -f -- ${LIST}
+}
+
+setup_perms() {
+ [ -n "${MODE}" ] && chmod "${MODE}" -- "${DEV_TTY}"
+ [ -n "${USER}" ] && chown "${USER}" -- "${DEV_TTY}"
+}
+
+unset_perms() {
+ [ -n "${USER}" ] && chown --reference "${DEV_PTY}" -- "${DEV_TTY}"
+ [ -n "${MODE}" ] && chmod --reference "${DEV_PTY}" -- "${DEV_TTY}"
+}
+
+start() {
+ config_check || return ${?}
+ device_check || return ${?}
+ ebegin "Starting ${description}"
+ start-stop-daemon --start ${start_stop_daemon_args} -- ${command_args}
+ if eend ${?}; then
+ setup_perms
+ setup_links
+ return 0 # from here we never fail
+ fi
+}
+
+stop() {
+ config_check || return ${?}
+ ebegin "Stopping ${description}"
+ start-stop-daemon --stop ${start_stop_daemon_args}
+ eend ${?}
+ unset_links
+ unset_perms
+ return 0 # never fail
+}
diff --git a/net-misc/termpkg/metadata.xml b/net-misc/termpkg/metadata.xml
new file mode 100644
index 000000000000..e8581ff71c57
--- /dev/null
+++ b/net-misc/termpkg/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ Termpkg is a terminal server daemon and simple telnet like client.
+ Allows access to one or more serial ports through the telnet protocol.
+ Can be configured to connect in a one to one relation of telnet ports
+ to serial ports or in a round-robin fashion where one telnet port
+ serves many serial ports.
+ </longdescription>
+ <use>
+ <flag name="uucp">
+ Adds support for uucp style device locking
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/termpkg/termpkg-3.3.9.1-r2.ebuild b/net-misc/termpkg/termpkg-3.3.9.1-r2.ebuild
new file mode 100644
index 000000000000..9b4e786d429a
--- /dev/null
+++ b/net-misc/termpkg/termpkg-3.3.9.1-r2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit base versionator
+
+MY_PV=$(get_version_component_range 1-2)
+MY_PF=$(replace_version_separator 2 '-')
+
+DESCRIPTION="Termpkg, the Poor Man's Terminal Server"
+HOMEPAGE="http://www.linuxlots.com/~termpkg/"
+SRC_URI="mirror://debian/pool/main/t/termpkg/${PN}_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/t/termpkg/${PN}_${MY_PF}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+uucp"
+
+DEPEND="sys-devel/flex"
+RDEPEND=""
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+DOCS=(
+ "README"
+ "CHANGES"
+ "termpkg.lsm"
+)
+
+PATCHES=(
+ # debian patches
+ "${WORKDIR}/${PN}_${MY_PF}.diff"
+
+ # gentoo patches
+ "${FILESDIR}/${P}-gcc43.diff"
+
+ # iaxmodem patches
+ "${FILESDIR}/${PN}-${MY_PV}-ttydforfax.diff"
+)
+
+src_configure() {
+ ./configure LINUX $(use uucp && echo UUCP_LOCKING)
+}
+
+src_compile() {
+ emake -C linux CC=$(tc-getCC) LIBS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ local X
+ base_src_install_docs
+ dobin linux/bin/termnet
+ dosbin linux/bin/{termnetd,ttyd}
+ newdoc debian/changelog ChangeLog.debian
+ doman doc/*.1
+ insinto /etc
+ newins debian/termnetd.conf termnetd.conf.dist
+ for X in termnetd ttyd; do
+ newinitd "${FILESDIR}/${X}.initd" "${X}"
+ newconfd "${FILESDIR}/${X}.confd" "${X}"
+ done
+}