forked from shaba/openuds
* Fixed version
* Moved actors to python3
This commit is contained in:
parent
a47df49ca8
commit
d5be31f1d9
@ -1,3 +1,9 @@
|
|||||||
|
udsactor (2.2.1) stable; urgency=medium
|
||||||
|
|
||||||
|
* Upgraded to 2.2.1 release
|
||||||
|
|
||||||
|
-- Adolfo Gómez García <agomez@virtualcable.es> Thu, 2 Oct 2018 12:44:12 +0200
|
||||||
|
|
||||||
udsactor (2.2.0) stable; urgency=medium
|
udsactor (2.2.0) stable; urgency=medium
|
||||||
|
|
||||||
* Upgraded to 2.2.0 release
|
* Upgraded to 2.2.0 release
|
||||||
|
@ -10,22 +10,7 @@ Package: udsactor
|
|||||||
Section: admin
|
Section: admin
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: policykit-1(>=0.100), python-requests (>=0.8.2), python-qt4 (>=4.9), python-six(>=1.1), python-prctl(>=1.1.1), python (>=2.7), libxss1, xscreensaver, ${misc:Depends}
|
Depends: policykit-1(>=0.100), python3-requests (>=0.8.2), python3-qt4 (>=4.9), python3-six(>=1.1), python3-prctl(>=1.1.1), python3 (>=3.4), libxss1, xscreensaver, ${misc:Depends}
|
||||||
Description: Actor for Universal Desktop Services (UDS) Broker
|
Description: Actor for Universal Desktop Services (UDS) Broker
|
||||||
This package provides the required components to allow this machine to work on an environment managed by UDS Broker.
|
This package provides the required components to allow this machine to work on an environment managed by UDS Broker.
|
||||||
|
|
||||||
Package: udsactor-xrdp
|
|
||||||
Section: x11
|
|
||||||
Priority: optional
|
|
||||||
Architecture: all
|
|
||||||
Depends: xrdp (>= 0.5.0), udsactor (>= ${binary:Version}), libpam-modules-bin (>=1.0), ${misc:Depends}
|
|
||||||
Description: UDS Actor component for xrdp
|
|
||||||
This package provides connection between uds actor and xrdp
|
|
||||||
|
|
||||||
Package: udsactor-nx
|
|
||||||
Section: x11
|
|
||||||
Priority: optional
|
|
||||||
Architecture: all
|
|
||||||
Depends: nxnode (>= 3.5.0), udsactor (>= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: UDS Actor component for nx
|
|
||||||
This package provides connection between uds actor and nx
|
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
FOLDER=/usr/share/UDSActor
|
FOLDER=/usr/share/UDSActor
|
||||||
|
|
||||||
cd $FOLDER
|
cd $FOLDER
|
||||||
python2.7 -m udsactor.linux.UDSActorService $@
|
exec python3 -m udsactor.linux.UDSActorService $@
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 Virtual Cable S.L.
|
# Copyright (c) 2014 Virtual Cable S.L.
|
||||||
@ -93,6 +93,7 @@ class UDSConfigDialog(QtGui.QDialog):
|
|||||||
store.writeConfig(cfg)
|
store.writeConfig(cfg)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
# If to be run as "sudo" on linux, we will need this to avoid problems
|
# If to be run as "sudo" on linux, we will need this to avoid problems
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 Virtual Cable S.L.
|
# Copyright (c) 2014 Virtual Cable S.L.
|
||||||
@ -39,6 +39,7 @@ import pickle
|
|||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
import signal
|
import signal
|
||||||
|
import six
|
||||||
from udsactor import ipc
|
from udsactor import ipc
|
||||||
from udsactor import utils
|
from udsactor import utils
|
||||||
from udsactor.log import logger
|
from udsactor.log import logger
|
||||||
@ -90,8 +91,8 @@ class UDSMessageDialog(QtGui.QDialog):
|
|||||||
class MessagesProcessor(QtCore.QThread):
|
class MessagesProcessor(QtCore.QThread):
|
||||||
|
|
||||||
logoff = QtCore.pyqtSignal(name='logoff')
|
logoff = QtCore.pyqtSignal(name='logoff')
|
||||||
displayMessage = QtCore.pyqtSignal(QtCore.QString, name='displayMessage')
|
displayMessage = QtCore.pyqtSignal(six.text_type, name='displayMessage')
|
||||||
script = QtCore.pyqtSignal(QtCore.QString, name='script')
|
script = QtCore.pyqtSignal(six.text_type, name='script')
|
||||||
exit = QtCore.pyqtSignal(name='exit')
|
exit = QtCore.pyqtSignal(name='exit')
|
||||||
information = QtCore.pyqtSignal(dict, name='information')
|
information = QtCore.pyqtSignal(dict, name='information')
|
||||||
|
|
||||||
@ -147,11 +148,11 @@ class MessagesProcessor(QtCore.QThread):
|
|||||||
msgId, data = msg
|
msgId, data = msg
|
||||||
logger.debug('Got Message on User Space: {}:{}'.format(msgId, data))
|
logger.debug('Got Message on User Space: {}:{}'.format(msgId, data))
|
||||||
if msgId == ipc.MSG_MESSAGE:
|
if msgId == ipc.MSG_MESSAGE:
|
||||||
self.displayMessage.emit(QtCore.QString.fromUtf8(data))
|
self.displayMessage.emit(data)
|
||||||
elif msgId == ipc.MSG_LOGOFF:
|
elif msgId == ipc.MSG_LOGOFF:
|
||||||
self.logoff.emit()
|
self.logoff.emit()
|
||||||
elif msgId == ipc.MSG_SCRIPT:
|
elif msgId == ipc.MSG_SCRIPT:
|
||||||
self.script.emit(QtCore.QString.fromUtf8(data))
|
self.script.emit(data)
|
||||||
elif msgId == ipc.MSG_INFORMATION:
|
elif msgId == ipc.MSG_INFORMATION:
|
||||||
self.information.emit(pickle.loads(data))
|
self.information.emit(pickle.loads(data))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -101,6 +101,7 @@ def ensureResultIsOk(result):
|
|||||||
|
|
||||||
|
|
||||||
class Api(object):
|
class Api(object):
|
||||||
|
|
||||||
def __init__(self, host, masterKey, ssl):
|
def __init__(self, host, masterKey, ssl):
|
||||||
self.host = host
|
self.host = host
|
||||||
self.masterKey = masterKey
|
self.masterKey = masterKey
|
||||||
@ -201,6 +202,8 @@ class Api(object):
|
|||||||
raise ConnectionError('REST api has not been initialized')
|
raise ConnectionError('REST api has not been initialized')
|
||||||
|
|
||||||
if processData:
|
if processData:
|
||||||
|
if not isinstance(data, six.text_type):
|
||||||
|
data = data.decode('utf8')
|
||||||
data = json.dumps({'data': data})
|
data = json.dumps({'data': data})
|
||||||
url = self._getUrl('/'.join([self.uuid, msg]))
|
url = self._getUrl('/'.join([self.uuid, msg]))
|
||||||
return self._request(url, data)['result']
|
return self._request(url, data)['result']
|
||||||
|
@ -34,21 +34,22 @@ from __future__ import unicode_literals
|
|||||||
# On centos, old six release does not includes byte2int, nor six.PY2
|
# On centos, old six release does not includes byte2int, nor six.PY2
|
||||||
import six
|
import six
|
||||||
|
|
||||||
VERSION = '2.2.0'
|
VERSION = '2.2.1'
|
||||||
|
|
||||||
__title__ = 'udsactor'
|
__title__ = 'udsactor'
|
||||||
__version__ = VERSION
|
__version__ = VERSION
|
||||||
__build__ = 0x010755
|
__build__ = 0x010756
|
||||||
__author__ = 'Adolfo Gómez <dkmaster@dkmon.com>'
|
__author__ = 'Adolfo Gómez <dkmaster@dkmon.com>'
|
||||||
__license__ = "BSD 3-clause"
|
__license__ = "BSD 3-clause"
|
||||||
__copyright__ = "Copyright 2014-2017 VirtualCable S.L.U."
|
__copyright__ = "Copyright 2014-2018 VirtualCable S.L.U."
|
||||||
|
|
||||||
|
|
||||||
if not hasattr(six, 'byte2int'):
|
if not hasattr(six, 'byte2int'):
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
import operator
|
import operator
|
||||||
six.byte2int = operator.itemgetter(0)
|
six.byte2int = operator.itemgetter(0)
|
||||||
else:
|
else:
|
||||||
|
|
||||||
def _byte2int(bs):
|
def _byte2int(bs):
|
||||||
return ord(bs[0])
|
return ord(bs[0])
|
||||||
|
|
||||||
six.byte2int = _byte2int
|
six.byte2int = _byte2int
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 Virtual Cable S.L.
|
# Copyright (c) 2014-2018 Virtual Cable S.L.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without modification,
|
# Redistribution and use in source and binary forms, with or without modification,
|
||||||
@ -46,6 +46,7 @@ class Daemon:
|
|||||||
|
|
||||||
Usage: subclass the Daemon class and override the run() method
|
Usage: subclass the Daemon class and override the run() method
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):
|
def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):
|
||||||
self.stdin = stdin
|
self.stdin = stdin
|
||||||
self.stdout = stdout
|
self.stdout = stdout
|
||||||
@ -88,8 +89,8 @@ class Daemon:
|
|||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
si = open(self.stdin, 'r')
|
si = open(self.stdin, 'r')
|
||||||
so = open(self.stdout, 'a+')
|
so = open(self.stdout, 'ab+')
|
||||||
se = open(self.stderr, 'a+', 0)
|
se = open(self.stderr, 'ab+', 0)
|
||||||
os.dup2(si.fileno(), sys.stdin.fileno())
|
os.dup2(si.fileno(), sys.stdin.fileno())
|
||||||
os.dup2(so.fileno(), sys.stdout.fileno())
|
os.dup2(so.fileno(), sys.stdout.fileno())
|
||||||
os.dup2(se.fileno(), sys.stderr.fileno())
|
os.dup2(se.fileno(), sys.stderr.fileno())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user