summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/gateone
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
commit1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch)
treea21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-connectivity/gateone
downloadmeta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-connectivity/gateone')
-rw-r--r--meta-oe/recipes-connectivity/gateone/gateone/0001-configuration.py-Hack-around-broken-gethostname-thin.patch26
-rw-r--r--meta-oe/recipes-connectivity/gateone/gateone/80oe.conf23
-rw-r--r--meta-oe/recipes-connectivity/gateone/gateone/gateone-avahi.service10
-rw-r--r--meta-oe/recipes-connectivity/gateone/gateone/gateone-init47
-rw-r--r--meta-oe/recipes-connectivity/gateone/gateone/gateone.service10
-rw-r--r--meta-oe/recipes-connectivity/gateone/gateone_git.bb82
6 files changed, 198 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/gateone/gateone/0001-configuration.py-Hack-around-broken-gethostname-thin.patch b/meta-oe/recipes-connectivity/gateone/gateone/0001-configuration.py-Hack-around-broken-gethostname-thin.patch
new file mode 100644
index 000000000..5f5fa9117
--- /dev/null
+++ b/meta-oe/recipes-connectivity/gateone/gateone/0001-configuration.py-Hack-around-broken-gethostname-thin.patch
@@ -0,0 +1,26 @@
1From d811d3bdf06d78c93c48bef762c19c392c879077 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 26 Nov 2013 15:54:10 +0100
4Subject: [PATCH] configuration.py: Hack around broken gethostname thingy
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 gateone/core/configuration.py | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/gateone/core/configuration.py b/gateone/core/configuration.py
12index da41cbd..d1c8222 100644
13--- a/gateone/core/configuration.py
14+++ b/gateone/core/configuration.py
15@@ -162,7 +162,7 @@ def define_options(installed=True):
16 ]
17 # Used both http and https above to demonstrate that both are acceptable
18 try:
19- additional_origins = socket.gethostbyname_ex(socket.gethostname())
20+ additional_origins = [] # additional_origins = socket.gethostbyname_ex(socket.gethostname())
21 except socket.gaierror:
22 # Couldn't get any IPs from the hostname
23 additional_origins = []
24--
251.8.4.2
26
diff --git a/meta-oe/recipes-connectivity/gateone/gateone/80oe.conf b/meta-oe/recipes-connectivity/gateone/gateone/80oe.conf
new file mode 100644
index 000000000..cde98bc10
--- /dev/null
+++ b/meta-oe/recipes-connectivity/gateone/gateone/80oe.conf
@@ -0,0 +1,23 @@
1// Some custom Gate One settings for OpenEmbedded
2{
3 "*": {
4 "gateone": { // These settings apply to all of Gate One
5 "log_file_max_size": 5242880, // 5 megabyte logs for OE by default (default would normally be 100Mb)
6 "log_file_num_backups": 2, // Default is normally 10
7 "origins": ["*"], // Every device has a unique origin
8 "logging": "info",
9 "pid_file": "/var/run/gateone.pid",
10 "session_dir": "/tmp/gateone",
11 "user_dir": "/var/lib/gateone/users"
12 },
13 "terminal": {
14 // Disabling session logging for embedded devices is a good idea (limited/slow storage)
15 "session_logging": false,
16 "syslog_session_logging": false
17// "commands": {
18// // For some reason this doesn't work (never asks for the password)
19// "login": "setsid /bin/login" // Normally this would emulate logging into the host console
20// }
21 }
22 }
23}
diff --git a/meta-oe/recipes-connectivity/gateone/gateone/gateone-avahi.service b/meta-oe/recipes-connectivity/gateone/gateone/gateone-avahi.service
new file mode 100644
index 000000000..0f613d18e
--- /dev/null
+++ b/meta-oe/recipes-connectivity/gateone/gateone/gateone-avahi.service
@@ -0,0 +1,10 @@
1<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
2<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
3
4<service-group>
5 <name replace-wildcards="yes">GateOne on %h</name>
6 <service>
7 <type>_https._tcp</type>
8 <port>443</port>
9 </service>
10</service-group>
diff --git a/meta-oe/recipes-connectivity/gateone/gateone/gateone-init b/meta-oe/recipes-connectivity/gateone/gateone/gateone-init
new file mode 100644
index 000000000..a1cf5ce7e
--- /dev/null
+++ b/meta-oe/recipes-connectivity/gateone/gateone/gateone-init
@@ -0,0 +1,47 @@
1#!/bin/sh -e
2### BEGIN INIT INFO
3# Provides: gateone
4# Required-Start: networking
5# Default-Start: 2 3 4 5
6# Default-Stop: 0 1 6
7# Short-Description: Gateone HTML5 ssh client
8# Description: Gateone HTML5 terminal emulator and SSH client.
9### END INIT INFO
10
11. /etc/init.d/functions
12
13NAME=gateone
14DAEMON=/var/lib/gateone/gateone.py
15PIDFILE=/var/run/gateone.pid
16WORKDIR=/var/lib/gateone
17
18do_start() {
19 cd $WORKDIR
20 /usr/bin/python $DAEMON > /dev/null 2>&1 &
21 cd $OLDPWD
22}
23
24do_stop() {
25 kill -TERM `cat $PIDFILE`
26}
27
28case "$1" in
29 start)
30 echo "Starting gateone"
31 do_start
32 ;;
33 stop)
34 echo "Stopping gateone"
35 do_stop
36 ;;
37 restart|force-reload)
38 echo "Restart gateone"
39 do_stop
40 sleep 1
41 do_start
42 ;;
43 *)
44 echo "Usage: $0 {start|stop|restart|force-reload}" >&2
45 exit 1
46 ;;
47esac
diff --git a/meta-oe/recipes-connectivity/gateone/gateone/gateone.service b/meta-oe/recipes-connectivity/gateone/gateone/gateone.service
new file mode 100644
index 000000000..7b14d3e6d
--- /dev/null
+++ b/meta-oe/recipes-connectivity/gateone/gateone/gateone.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=GateOne daemon
3ConditionPathExists=|/var/lib/gateone
4
5[Service]
6WorkingDirectory=/var/lib/gateone
7ExecStart=/usr/bin/python /usr/bin/gateone
8
9[Install]
10WantedBy=multi-user.target
diff --git a/meta-oe/recipes-connectivity/gateone/gateone_git.bb b/meta-oe/recipes-connectivity/gateone/gateone_git.bb
new file mode 100644
index 000000000..edc997721
--- /dev/null
+++ b/meta-oe/recipes-connectivity/gateone/gateone_git.bb
@@ -0,0 +1,82 @@
1SUMMARY = "HTML5 (plugin-free) web-based terminal emulator and SSH client"
2LICENSE = "AGPL-3.0"
3LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=834cbc6995db88433db17cdf8953a428"
4HOMEPAGE = "http://liftoffsoftware.com/Products/GateOne"
5
6PV = "1.2"
7SRCREV = "1528d324088fc1c180b7fdf50f5b5c1af057eef6"
8SRC_URI = "git://github.com/liftoff/GateOne.git \
9 file://0001-configuration.py-Hack-around-broken-gethostname-thin.patch \
10 file://gateone-avahi.service \
11 file://80oe.conf \
12 file://gateone.service \
13 file://gateone-init \
14"
15
16S = "${WORKDIR}/git"
17
18inherit distutils python-dir systemd update-rc.d
19export prefix = "${localstatedir}"
20
21DISTUTILS_INSTALL_ARGS = "--root=${D} \
22 --prefix=${prefix} \
23 --install-lib=${PYTHON_SITEPACKAGES_DIR} \
24 --install-data=${PYTHON_SITEPACKAGES_DIR} \
25 --install-scripts=${bindir} \
26 --skip_init_scripts"
27
28do_install_append() {
29
30 # fix up hardcoded paths
31 sed -i -e s:/usr/bin:${bindir}:g ${WORKDIR}/gateone.service
32
33 install -d ${D}${systemd_unitdir}/system
34 install -m 0644 ${WORKDIR}/gateone.service ${D}${systemd_unitdir}/system
35
36 install -d ${D}${sysconfdir}/init.d
37 install -m 0755 ${WORKDIR}/gateone-init ${D}${sysconfdir}/init.d/gateone
38
39 install -m 0755 -d ${D}${sysconfdir}/avahi/services/
40 install -m 0644 ${WORKDIR}/gateone-avahi.service ${D}${sysconfdir}/avahi/services/
41
42 install -m 0755 -d ${D}${sysconfdir}/gateone/conf.d/
43 install -m 0644 ${WORKDIR}/80oe.conf ${D}${sysconfdir}/gateone/conf.d/80oe.conf
44
45 install -d ${D}${localstatedir}/lib/gateone
46}
47
48FILES_${PN} = "${localstatedir}/lib ${bindir} ${base_libdir} ${sysconfdir} ${PYTHON_SITEPACKAGES_DIR}"
49RDEPENDS_${PN} = "mime-support \
50 openssh-ssh \
51 python-compression \
52 python-crypt \
53 python-datetime \
54 python-email \
55 python-fcntl \
56 python-futures \
57 python-html \
58 python-imaging \
59 python-io \
60 python-json \
61 python-logging \
62 python-misc \
63 python-multiprocessing \
64 python-netclient \
65 python-pkgutil \
66 python-pyopenssl \
67 python-re \
68 python-readline \
69 python-setuptools \
70 python-shell \
71 python-simplejson \
72 python-subprocess \
73 python-syslog \
74 python-terminal \
75 python-textutils \
76 python-tornado \
77 python-unixadmin \
78 python-xml \
79"
80
81SYSTEMD_SERVICE_${PN} = "gateone.service"
82INITSCRIPT_NAME = "gateone"