diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-python/recipes-connectivity/gateone | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-python/recipes-connectivity/gateone')
5 files changed, 178 insertions, 0 deletions
diff --git a/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/80oe.conf.in b/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/80oe.conf.in new file mode 100644 index 0000000000..4503da4221 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/80oe.conf.in @@ -0,0 +1,24 @@ +// Some custom Gate One settings for OpenEmbedded +{ + "*": { + "gateone": { // These settings apply to all of Gate One + "log_file_prefix": "@localstate@/log/gateone.log", // default would be /var/log/gateone/gateone.log + "log_file_max_size": 5242880, // 5 megabyte logs for OE by default (default would normally be 100Mb) + "log_file_num_backups": 2, // Default is normally 10 + "origins": ["*"], // Every device has a unique origin + "logging": "info", + "pid_file": "/run/gateone.pid", + "session_dir": "/tmp/gateone", + "user_dir": "@localstate@/lib/gateone/users" + }, + "terminal": { + // Disabling session logging for embedded devices is a good idea (limited/slow storage) + "session_logging": false, + "syslog_session_logging": false +// "commands": { +// // For some reason this doesn't work (never asks for the password) +// "login": "setsid /bin/login" // Normally this would emulate logging into the host console +// } + } + } +} diff --git a/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/gateone-avahi.service b/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/gateone-avahi.service new file mode 100644 index 0000000000..0f613d18e8 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/gateone-avahi.service @@ -0,0 +1,10 @@ +<?xml version="1.0" standalone='no'?><!--*-nxml-*--> +<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> + +<service-group> + <name replace-wildcards="yes">GateOne on %h</name> + <service> + <type>_https._tcp</type> + <port>443</port> + </service> +</service-group> diff --git a/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/gateone-init.in b/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/gateone-init.in new file mode 100644 index 0000000000..86d655c94d --- /dev/null +++ b/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/gateone-init.in @@ -0,0 +1,47 @@ +#!/bin/sh -e +### BEGIN INIT INFO +# Provides: gateone +# Required-Start: networking +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Gateone HTML5 ssh client +# Description: Gateone HTML5 terminal emulator and SSH client. +### END INIT INFO + +. /etc/init.d/functions + +NAME=gateone +DAEMON=@bindir@/gateone +PIDFILE=/run/gateone.pid +WORKDIR=@localstate@/lib/gateone + +do_start() { + cd $WORKDIR + @bindir@/python $DAEMON > /dev/null 2>&1 & + cd $OLDPWD +} + +do_stop() { + kill -TERM `cat $PIDFILE` +} + +case "$1" in + start) + echo "Starting gateone" + do_start + ;; + stop) + echo "Stopping gateone" + do_stop + ;; + restart|force-reload) + echo "Restart gateone" + do_stop + sleep 1 + do_start + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac diff --git a/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/gateone.service.in b/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/gateone.service.in new file mode 100644 index 0000000000..44667275a2 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone/gateone.service.in @@ -0,0 +1,10 @@ +[Unit] +Description=GateOne daemon +ConditionPathExists=|@localstate@/lib/gateone + +[Service] +WorkingDirectory=@localstate@/lib/gateone +ExecStart=@bindir@/python @bindir@/gateone + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone_git.bb b/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone_git.bb new file mode 100644 index 0000000000..4577873ded --- /dev/null +++ b/meta-openembedded/meta-python/recipes-connectivity/gateone/gateone_git.bb @@ -0,0 +1,87 @@ +SUMMARY = "HTML5 (plugin-free) web-based terminal emulator and SSH client" +LICENSE = "AGPL-3.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=834cbc6995db88433db17cdf8953a428" +HOMEPAGE = "http://liftoffsoftware.com/Products/GateOne" + +PV = "1.2+git${SRCPV}" +SRCREV = "f7a9be46cb90f57459ebd363d24702de0e651034" +SRC_URI = "git://github.com/liftoff/GateOne.git;branch=master \ + file://gateone-avahi.service \ + file://80oe.conf.in \ + file://gateone.service.in \ + file://gateone-init.in \ +" + +S = "${WORKDIR}/git" + +inherit setuptools python-dir systemd update-rc.d + +DISTUTILS_INSTALL_ARGS = "--root=${D} \ + --prefix=${prefix} \ + --install-lib=${PYTHON_SITEPACKAGES_DIR} \ + --install-data=${PYTHON_SITEPACKAGES_DIR} \ + --install-scripts=${bindir} \ + --skip_init_scripts" + +do_install_append() { + + # fix up hardcoded paths + for file in gateone.service gateone-init 80oe.conf; do + sed -e s:@bindir@:${bindir}:g \ + -e s:@localstate@:${localstatedir}:g \ + < ${WORKDIR}/$file.in \ + > ${WORKDIR}/$file + done + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/gateone.service ${D}${systemd_unitdir}/system + + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/gateone-init ${D}${sysconfdir}/init.d/gateone + + install -m 0755 -d ${D}${sysconfdir}/avahi/services/ + install -m 0644 ${WORKDIR}/gateone-avahi.service ${D}${sysconfdir}/avahi/services/ + + install -m 0755 -d ${D}${sysconfdir}/gateone/conf.d/ + install -m 0644 ${WORKDIR}/80oe.conf ${D}${sysconfdir}/gateone/conf.d/80oe.conf + + install -d ${D}${localstatedir}/lib/gateone +} + +FILES_${PN} = "${localstatedir}/lib ${bindir} ${base_libdir} ${sysconfdir} ${PYTHON_SITEPACKAGES_DIR}" +RDEPENDS_${PN} = "mime-support \ + openssh-ssh \ + python-compression \ + python-contextlib \ + python-crypt \ + python-datetime \ + python-email \ + python-fcntl \ + python-futures \ + python-html \ + python-imaging \ + python-io \ + python-json \ + python-logging \ + python-misc \ + python-multiprocessing \ + python-netclient \ + python-pkgutil \ + python-pyopenssl \ + python-re \ + python-setuptools \ + python-shell \ + python-simplejson \ + python-subprocess \ + python-syslog \ + python-terminal \ + python-textutils \ + python-tornado \ + python-unixadmin \ + python-xml \ + python-html5lib \ + bash \ +" + +SYSTEMD_SERVICE_${PN} = "gateone.service" +INITSCRIPT_NAME = "gateone" |