parent
6b919803f9
commit
a7977b0091
@ -0,0 +1,31 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Qt gui console client for WSDL Calculate 3"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS=""
|
||||
|
||||
DEPEND="~sys-apps/calculate-core-3.1.1_alpha2
|
||||
dev-python/dbus-python
|
||||
dev-python/imaging
|
||||
dev-python/pyside[script]"
|
||||
RDEPEND="${DEPEND}"
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-console-gui-3.1.1_alpha2-r1.patch"
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
diff --git consolegui/application/Box.py consolegui/application/Box.py
|
||||
index be9f763..632768a 100755
|
||||
--- consolegui/application/Box.py
|
||||
+++ consolegui/application/Box.py
|
||||
@@ -464,4 +464,4 @@ class MainWgt(QtGui.QMainWindow):
|
||||
if e.key() == QtCore.Qt.Key_Return:
|
||||
self.control_button.keyPressEvent(e)
|
||||
else:
|
||||
- QtGui.QMainWindow.keyPressEvent(self, e)
|
||||
\ No newline at end of file
|
||||
+ QtGui.QMainWindow.keyPressEvent(self, e)
|
||||
diff --git consolegui/application/DisplayMethod.py consolegui/application/DisplayMethod.py
|
||||
index 34a5059..7b2e31a 100755
|
||||
--- consolegui/application/DisplayMethod.py
|
||||
+++ consolegui/application/DisplayMethod.py
|
||||
@@ -210,6 +210,7 @@ class DisplayMethod(QtGui.QWidget):
|
||||
|
||||
self.ClientObj.MainWidget.left_frame.cur_palette = \
|
||||
self._parent.main_frame.viewport().palette()
|
||||
+ self.ClientObj._parent.setWindowTitle(_("Calculate Console"))
|
||||
|
||||
def onActivated(self):
|
||||
# Call server method
|
||||
diff --git consolegui/application/more.py consolegui/application/more.py
|
||||
index 546c151..ee821d9 100755
|
||||
--- consolegui/application/more.py
|
||||
+++ consolegui/application/more.py
|
||||
@@ -203,7 +203,7 @@ class ButtonMenu(QtGui.QPushButton):
|
||||
for image in images:
|
||||
icon = QtGui.QIcon.fromTheme(image)
|
||||
if not icon.isNull():
|
||||
- pm2 = icon.pixmap(32)
|
||||
+ pm2 = icon.pixmap(128)
|
||||
icon_flag = False
|
||||
break
|
||||
elif os.path.isfile(image):
|
@ -0,0 +1,49 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The WSDL core for Calculate 3"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS=""
|
||||
IUSE="minimal"
|
||||
|
||||
DEPEND="~sys-apps/calculate-lib-3.1.1_alpha2
|
||||
>=dev-python/soaplib-1.0
|
||||
!minimal? ( dev-python/sudsds
|
||||
net-libs/dslib
|
||||
dev-python/pyopenssl
|
||||
dev-libs/openssl
|
||||
dev-python/m2crypto
|
||||
dev-python/cherrypy )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_preinst() {
|
||||
dosym /usr/sbin/cl-core /usr/sbin/cl-core-setup
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "For autoconfigure calculate-core for adminuser perform:"
|
||||
einfo " cl-core --bootstrap <username>"
|
||||
einfo "For run calculate-core perform:"
|
||||
einfo " /etc/init.d/calculate-core start"
|
||||
einfo "Add calcualte core to autorun:"
|
||||
einfo " rc-update add calculate-core boot"
|
||||
}
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-core-3.1.1_alpha2-r4.patch"
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
diff --git core/server/methods_func.py core/server/methods_func.py
|
||||
index 59d1b5e..16b66b5 100644
|
||||
--- core/server/methods_func.py
|
||||
+++ core/server/methods_func.py
|
||||
@@ -204,6 +204,8 @@ def get_method_argparser(view, args, cl_core = False):
|
||||
else field.name.upper()
|
||||
#if ':' in data['metavar']:
|
||||
# data['metavar'] = field.name.upper()
|
||||
+ if field.element in ['check']:
|
||||
+ data['metavar'] = "ON/OFF"
|
||||
try:
|
||||
opts = filter(None,[opt.shortopt,opt.longopt])
|
||||
if any(not "-" in x for x in opts):
|
||||
diff --git core/server/setup_package.py core/server/setup_package.py
|
||||
index 2111b8d..022adaa 100644
|
||||
--- core/server/setup_package.py
|
||||
+++ core/server/setup_package.py
|
||||
@@ -184,7 +184,7 @@ class updateUserConfigs(shareUpdateConfigs):
|
||||
clVars.Set("cl_root_path", '/', True)
|
||||
clVars.Set("ur_login", userName, True)
|
||||
clVars.Set("cl_action", "desktop", True)
|
||||
- clVars.Set("cl_merge_pkg", [nameProgram], True)
|
||||
+ clVars.Set("cl_merge_pkg", ["%s/%s"%(category,nameProgram)], True)
|
||||
clTempl = ChainProgressTemplate( self.startTask,
|
||||
self.endTask,
|
||||
self.setProgress,
|
||||
@@ -350,7 +350,7 @@ class updateSystemConfigs(shareUpdateConfigs):
|
||||
clVars.Set("cl_root_path", configPath, True)
|
||||
if variables.Get('cl_core_pkg_root_set') == 'on':
|
||||
clVars.Set("cl_root_path_next", '/', True)
|
||||
- clVars.Set("cl_merge_pkg", [nameProgram], True)
|
||||
+ clVars.Set("cl_merge_pkg", ["%s/%s"%(category,nameProgram)], True)
|
||||
clVars.Set("cl_action", 'merge', True)
|
||||
configFiles = []
|
||||
nameProg = clVars.Get("cl_name")
|
||||
@@ -380,9 +380,8 @@ class updateSystemConfigs(shareUpdateConfigs):
|
||||
for pkg in clTempl.changedFiles.getPkgs():
|
||||
category = isPkgInstalled(pkg)
|
||||
if category:
|
||||
- category = category[0].rpartition('/')[2]
|
||||
pkgContents = PkgContents("{CATEGORY}/{PF}".format(
|
||||
- **isPkgInstalled("%s/%s"%(category,pkg))[0]))
|
||||
+ **category[0]))
|
||||
for filename,action in clTempl.changedFiles.getPkgFiles(pkg):
|
||||
if filename in clTempl.protectedFiles:
|
||||
pkgContents.removeObject(filename)
|
||||
@@ -456,7 +455,7 @@ class updateSystemConfigs(shareUpdateConfigs):
|
||||
self.copyConfigFiles(configPath,variables.Get('cl_config_protect'))
|
||||
if clTempl and clTempl.getWarning():
|
||||
for warn in clTempl.getWarning().split("\n"):
|
||||
- self.SUCCESS(warn)
|
||||
+ self.WARNING(warn)
|
||||
return True
|
||||
|
||||
class PackageUpdater(updateSystemConfigs,updateUserConfigs):
|
||||
diff --git core/variables/certificate.py core/variables/certificate.py
|
||||
index df3468a..32aefbe 100644
|
||||
--- core/variables/certificate.py
|
||||
+++ core/variables/certificate.py
|
||||
@@ -22,7 +22,11 @@
|
||||
from calculate.lib.datavars import Variable,ReadonlyVariable,VariableError
|
||||
import os, glob, sys
|
||||
from os import path
|
||||
-import OpenSSL
|
||||
+
|
||||
+try:
|
||||
+ import OpenSSL
|
||||
+except:
|
||||
+ OpenSSL = None
|
||||
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
from calculate.lib.utils.files import readLinesFile
|
||||
@@ -222,6 +226,8 @@ class VariableClCertGroups(Variable):
|
||||
data_path = self.Get('cl_core_data')
|
||||
cert_dir = os.path.join(data_path, 'client_certs')
|
||||
cert_file = os.path.join(cert_dir, '%s.crt' %cert_id)
|
||||
+ if OpenSSL is None:
|
||||
+ return []
|
||||
|
||||
try:
|
||||
cert = open(cert_file, 'r').read()
|
||||
diff --git core/variables/request.py core/variables/request.py
|
||||
index d008fdd..6e90fe3 100644
|
||||
--- core/variables/request.py
|
||||
+++ core/variables/request.py
|
||||
@@ -21,7 +21,10 @@
|
||||
|
||||
from calculate.lib.datavars import Variable,ReadonlyVariable,VariableError
|
||||
import os, glob, sys
|
||||
-import OpenSSL
|
||||
+try:
|
||||
+ import OpenSSL
|
||||
+except:
|
||||
+ OpenSSL = None
|
||||
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
from calculate.lib.utils.files import readLinesFile
|
||||
@@ -151,7 +154,7 @@ class VariableClReqData(Variable):
|
||||
data_path = self.Get('cl_core_data')
|
||||
|
||||
req_file = data_path + '/client_certs/%s.csr' %req_id
|
||||
- if os.path.exists(req_file):
|
||||
+ if OpenSSL and os.path.exists(req_file):
|
||||
fp = open(req_file, 'r')
|
||||
request = fp.read()
|
||||
fp.close()
|
||||
@@ -279,6 +282,8 @@ class VariableClReqGroup(Variable):
|
||||
data_path = self.Get('cl_core_data')
|
||||
|
||||
cert_file = data_path + '/client_certs/%s.crt' %req_id
|
||||
+ if OpenSSL is None:
|
||||
+ return ""
|
||||
try:
|
||||
fp = open(cert_file, 'r')
|
||||
cert = fp.read()
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="Calculate Utilities meta package"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS=""
|
||||
IUSE="cl_consolegui cl_client cl_desktop cl_console"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
=sys-apps/calculate-install-3.1.1_alpha2-r4
|
||||
=sys-apps/calculate-i18n-3.1.1_alpha2-r1
|
||||
=sys-apps/calculate-lib-3.1.1_alpha2-r13
|
||||
=sys-apps/calculate-core-3.1.1_alpha2-r4
|
||||
=sys-apps/calculate-update-3.1.1_alpha2-r3
|
||||
cl_client? ( =sys-apps/calculate-client-3.1.1_alpha2 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.1.1_alpha2-r2 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.1.1_alpha2-r1 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.1.1_alpha2 )
|
||||
"
|
Loading…
Reference in new issue