Исправления для calculate-utilities-3.2.0_alpha1

mhiretskiy
Mike khiretskiy 10 years ago
parent 33ff3c4810
commit 91f1ad4d6d

@ -1,2 +1,4 @@
AUX calculate-core-3.2.0_alpha1-r1.patch 3909 SHA256 95338af9088ff7a8b535836c542c73aaaaeda2ae51c4fc070dee64ca015d65fe SHA512 743627d58a4c0c1ec0b57753fa5df320bbdec9102d4e6e3df63abe4e55323e4fac2de26ea22f69cb348f50070618eff5fb9b6848df0679bf73260a238507f4e0 WHIRLPOOL b186232ae83f4b40156bae4a0a66e1cde6b25768a329f7d7144cf4a4c6eee92e11319849cacb0ec2689a1f9801a96c1ae621505143c6bbc6979dd23c6fb4cade
DIST calculate-core-3.2.0_alpha1.tar.bz2 83658 SHA256 780a4107fcf2d6ee84be721e571f595ae8eb6cebf313cf6feef9c1d64d3a6575 SHA512 906a653de9286cd4d1d922937aa6afafef9a854ebf49f0636a4ad7e5e7ae136d353fe4b8c196c037688f8df7fd3df213800d184734193058df0ebb42090866d0 WHIRLPOOL ca8fe5f238111d78a65f2d42e8f3c169b7074cd5ebd7b8a653824b23d59cdcbfbfc7146ab7d96cc34300a7d418a036729a8c7931fd020c993e97103440e90c4c
EBUILD calculate-core-3.2.0_alpha1-r1.ebuild 1271 SHA256 e3b37d23b8ef1fc577cbf737f081bc9fe610fe02c2a061b6bb0b6db68ec042e8 SHA512 e8eda7dba5d3fd90fcbe08643e6bf60ed4368bb2afffe9c74da1dea2bdc02e0a11c9acabd073bc2871efbfeee721bbe143eca186a65aee496ffc08fd78eba22b WHIRLPOOL 968f4a01b58dc287d2d928ea6448b84e928ea1f34b1a1fe82d5bc6166e1abd3ccfc0319399ca1e09307867fde8e9548588692f9ee805863c117854bdb8fb7454
EBUILD calculate-core-3.2.0_alpha1.ebuild 1129 SHA256 6157885be140f43eb9b64d463b469441690325a95f1188ec75d3351e89f0b0b7 SHA512 ad826d96ca70b846e83f23388c83fcec3d1d2cb5994a07bad13b5841ccf4882647d83cffc635c281d94fb6615d178521dc374141241ab24cf9cce2c9ec66ff91 WHIRLPOOL 92750d20b4d204de5413c4f5a06f026e9499a370ca0dc9206ec5f5efe7de6e16d6a495ac5ae9e5a6445411e7df90cf2bd49b979d279f4fceec3c6b1ee0a8c1a2

@ -0,0 +1,51 @@
# 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="amd64 x86"
IUSE="minimal"
DEPEND="~sys-apps/calculate-lib-3.2.0_alpha1
>=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
dosym /usr/sbin/cl-core /usr/sbin/cl-core-patch
}
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.2.0_alpha1-r1.patch"
}

@ -0,0 +1,100 @@
diff --git core/server/cl_server.py core/server/cl_server.py
index a62d8cd..abd555f 100644
--- core/server/cl_server.py
+++ core/server/cl_server.py
@@ -75,12 +75,13 @@ def main(*args, **keywords):
cl_ver = ob.Get('cl_ver')
log_path_var = ob.Get('cl_log_path')
cl_core_port = ob.GetInteger('cl_core_port')
+ file_logger = None
if args.version:
print cl_ver
return 0
- if ob.Get('cl_ebuild_phase') == '':
+ if ob.Get('cl_ebuild_phase') == '' and os.getuid() == 0:
import logging
import logging.handlers
@@ -149,9 +150,10 @@ def main(*args, **keywords):
serv_certbase, certbase, data_path)
return 0
except URLError, e:
- fd = open(LOG_FILENAME,'a')
- file_logger.debug(print_exc(file=fd))
- fd.close()
+ if file_logger:
+ fd = open(LOG_FILENAME,'a')
+ file_logger.debug(print_exc(file=fd))
+ fd.close()
print e
params_list = ["start", "create_symlink", "method",
"list_methods"]
@@ -262,9 +264,10 @@ def main(*args, **keywords):
print _("No socket could be created")
print _('Port %d already in use') %port
else:
- fd = open(LOG_FILENAME,'a')
- file_logger.debug(print_exc(file=fd))
- fd.close()
+ if file_logger:
+ fd = open(LOG_FILENAME,'a')
+ file_logger.debug(print_exc(file=fd))
+ fd.close()
print e
except SSLError, e:
print '\n',_('Server certificate not found')#, e
@@ -273,9 +276,10 @@ def main(*args, **keywords):
except KeyboardInterrupt:
pass
except Exception, e:
- fd = open(LOG_FILENAME,'a')
- file_logger.debug(print_exc(file=fd))
- fd.close()
+ if file_logger:
+ fd = open(LOG_FILENAME,'a')
+ file_logger.debug(print_exc(file=fd))
+ fd.close()
server.stop()
if args.pidfile:
diff --git core/server/func.py core/server/func.py
index 190a066..ae0c88f 100644
--- core/server/func.py
+++ core/server/func.py
@@ -815,8 +815,8 @@ def shortTraceback(e1,e2,e3):
Return short traceback
"""
frame = e3
- #for i in apply(traceback.format_exception, (e1,e2,e3)):
- # print i,
+ for i in apply(traceback.format_exception, (e1,e2,e3)):
+ print i,
while(frame.tb_next):
frame = frame.tb_next
module,part = os.path.split(frame.tb_frame.f_code.co_filename)
diff --git core/server/server_class.py core/server/server_class.py
index 13157ec..43f9ffb 100644
--- core/server/server_class.py
+++ core/server/server_class.py
@@ -360,7 +360,8 @@ class ClApplication(Application):
certobj = OpenSSL.crypto.load_certificate \
(OpenSSL.SSL.FILETYPE_PEM, curThread.client_cert)
finger = certobj.digest('SHA1')
- self.log.debug('%s %s %s forbidden %s' \
+ if self.log:
+ self.log.debug('%s %s %s forbidden %s' \
%(datetime.datetime.now().__str__(), finger, ip, \
method_name[5:]))
resp = "Permission denied: " + method_name
@@ -375,7 +376,8 @@ class ClApplication(Application):
finger = certobj.digest('SHA1')
if not method_name[5:] in not_log_list and \
not method_name[5:].endswith('_view'):
- self.log.debug('%s %s %s allowed %s' \
+ if self.log:
+ self.log.debug('%s %s %s allowed %s' \
%(datetime.datetime.now().__str__(), finger, ip, \
method_name[5:]))

@ -1,2 +1,4 @@
AUX calculate-lib-3.2.0_alpha1-r1.patch 1248 SHA256 6b1b3d062a082ca34c708d9700d0501225cd18a6a255ed16517b3815e619f536 SHA512 d77196c708e76fd2cb261fe6ac6d66249ceffd567a730a51b075a667c416e6c481302917874cc4dc2b982b0495695486580e79af0fa96ed54bada581badd6a37 WHIRLPOOL 0fe7e95183e80c5bd1e62b6615f7ed022ef9edd077ab6dc8c75b41afcee451544de3b653436d68b41e5ed30e29621697c5a739ca4c355e0a4c7abc2862f083ab
DIST calculate-lib-3.2.0_alpha1.tar.bz2 121698 SHA256 a1c605690dbb8c9fa6bcccd1a3bd1ff6500e4566e9d9a8ddc1ef4967ea38fbb8 SHA512 30196b7cba04f218c2e3105951fdaaa1a8c916d5b2265a4a09d1cce7b317f7ec501cd2edb70ecb41f25a1ee4ecfa89e23e3255a4adbfbf3ba7715c384171d0a3 WHIRLPOOL 0e9525e2b728a98c02b0a11f70dc13fb3922fd7e5ac01b168d9aeaa8c2544707533a1ecbd6aea4dd28a7836288efd8a8393216a68176c32615af8417e1acd4fc
EBUILD calculate-lib-3.2.0_alpha1-r1.ebuild 831 SHA256 a0822dc9b2a6196d950c824d08e166058c43a516b4b71f17646aa4c2100b36eb SHA512 5c439363f3f1b4f1092e76584878b82e75a10cf26b487f4fddae7980d0b14259fe8438d37c44c7601d2fa3c7323ca1234ee128c1b8e9ac4e5c452d6f47639508 WHIRLPOOL 2fc191fb9bee248bbfe0c7d60560e55f4cba29de40b1888475dbce4eeecd41459b421bc8d1e85f12fb88d97bd8c63e11d9c5dd7463fe5d4a7dd045e4922a4b51
EBUILD calculate-lib-3.2.0_alpha1.ebuild 690 SHA256 c89c29f5de3f70146e98f15035366506933f03e8a5066b1ad55aeccbebdeae2c SHA512 a7277c2e5fa64a5e5840be7fc8d3df9a31f41926386c5fe6a9bed31eeed6321af5881c218d9ce7eeb12aee518edb682b438e10397dcb815cc63645100430e43e WHIRLPOOL 8f19e4d46381e26fec81e20fa35599f4658b3891d6372c921a8b1354ad3b1821ea9c78f71caebf54610e0b5aacfb6e6ded018e155e1979322406a0ac1e823d09

@ -0,0 +1,36 @@
# 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 library for Calculate 3"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="3"
KEYWORDS="amd64 x86"
IUSE="minimal"
DEPEND="!minimal? ( dev-python/py-smbpasswd )
>=dev-python/pyxml-0.8
sys-apps/iproute2
sys-apps/pciutils
sys-fs/lvm2
sys-fs/mdadm
dev-python/pyinotify
sys-apps/file[python]"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# apply revision changes
epatch "${FILESDIR}/calculate-lib-3.2.0_alpha1-r1.patch"
}

@ -0,0 +1,27 @@
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
index d5d7cdf..7363a50 100644
--- calculate/lib/cl_template.py
+++ calculate/lib/cl_template.py
@@ -4956,7 +4956,12 @@ gettext -d cl_template "$*"
if not crDirs is True:
createdDirs += crDirs
else:
- os.chmod(applyDir, mode)
+ try:
+ os.chmod(applyDir, mode)
+ except:
+ self.setError(
+ _("Failed to change mode for directory: ") +\
+ applyDir)
else:
self.setError(_("Wrong value 'chmod' in the template") + ": " +\
templateDirFile)
@@ -5127,7 +5132,7 @@ gettext -d cl_template "$*"
# Создание файла
FD = open(nameFileConfig, "w")
FD.close()
- os.chown(nameFileConfig, uid, gid)
+ os.lchown(nameFileConfig, uid, gid)
except Exception as e:
if hasattr(e,'errno') and e.errno == 13 and \
"var/calculate/remote" in nameFileConfig:

@ -1,2 +1,4 @@
AUX calculate-update-3.2.0_alpha1-r1.patch 683 SHA256 39edbee7b73bbb34d31ce88170e5624c956f99f2535346ae4572f5b293610485 SHA512 6a9f5dd2f66fe7cbd21073b676a29ae8bb8a5884822d2ddc99321637f4475aa1ed8eda10a7ee80b7bcab4bb711bc1d2d0d44f526ee300a0fda4e2a25c0ffafb3 WHIRLPOOL 3cceb6d5a53126d7cb14ca412b48985ed235f1de898e7e304fbb12b21deaa2c0934554b121fa165f2be1ec18443279c103d99f3f5e53c07d343da291132cb0f5
DIST calculate-update-3.2.0_alpha1.tar.bz2 14159 SHA256 6c5e73041029e93f04fe897447984c1f52f66f3486309d4e3bb741c0151dc44d SHA512 aac77b42e51f3be5f266bc3a7c233d2fa443b6316a7a618c61ef07be8e25704322bec6c39352184ee8fae227e4b2bbf276dfa038d4006be12079c71e983d16d4 WHIRLPOOL 8f395718c3332286ce47783fc42601f3dea9b9f7fd7225e5549ff8d04013a4d6a2208f103fde112b6ebf6791650a61aa5974dbfa435aecfd7d8e7b2d7ff9ae8b
EBUILD calculate-update-3.2.0_alpha1-r1.ebuild 747 SHA256 758df870a3b2cc3b6529107951e865547259502434ef5c8c5b5c6b48c9079cd0 SHA512 fcd2c99f30389b02060238b9423bf638da6d1039c2fa7c096f19a28a4e9590424a22a5a4e4b32fa72e718b3923afcf8fb7067d0ddd8d9d8cf9fee11ed17742f6 WHIRLPOOL 416767c021c45ea5d647ed094d9bf4351c428604fda39fb135cfb75f6047f0db7484bf1ea6f12e7cd59b7d408d6fa938e4be6bab6756ce0f226fe782e0fa6640
EBUILD calculate-update-3.2.0_alpha1.ebuild 603 SHA256 d9000ce6457c66e254093a9ac83b162f1d0cc507ff2894debdcff722b0ae08f2 SHA512 29cf3c4098dbd1ef9aaa21ca5d52b6ccada34916f875b45a732679a2ae1b7247aa182754ecae8b7c526de29507d883c6a0be1d22484233b325ca5733dfdf8450 WHIRLPOOL 6f944310e7fe59b4f51e3a1020e78e1662cab877f34d876e7a4666174e2c14c7e79624c32255d3207c14304ae30dbee40826ce361040fc0b7fc0319b109231c4

@ -0,0 +1,32 @@
# 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 program of update Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="3"
KEYWORDS="amd64 x86"
IUSE=""
DEPEND="~sys-apps/calculate-core-3.2.0_alpha1
~sys-apps/calculate-install-3.2.0_alpha1"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# apply revision changes
epatch "${FILESDIR}/calculate-update-3.2.0_alpha1-r1.patch"
}

@ -0,0 +1,17 @@
diff --git update/update.py update/update.py
index ef6fe02..a9b3588 100644
--- update/update.py
+++ update/update.py
@@ -514,7 +514,11 @@ class Update:
self.printWARNING(str(e))
self.printWARNING(_("Re-fetch {name} repository"
).format(name=repname))
- removeDir(rpath)
+ try:
+ removeDir(rpath)
+ except OSError as e:
+ raise UpdateError(_("Permission denied to change "
+ "{repname} repository").format(repname=repname))
self._syncRepository(name,url,rpath,revision,branch)
return True

@ -1 +1,2 @@
EBUILD calculate-utilities-3.2.0_alpha1-r1.ebuild 821 SHA256 85f6bcdbe77b73f1a0c82f2652f49dd92668c060a4cc1807e7355bf192ddf5c8 SHA512 7789e94c057ffe35020712833edf9e6548b9080273398dda887f6fe55d566f547b7013e4697ad881aadcff90025ec6e99db0156947860851100fa3d3ea1f894a WHIRLPOOL 6f9add40409b7d49d4c9b80b760e27b4965e5045167618ab073f85fb519e79713f0bd0704493f05b8281d754d6ef8d35ef3d22bbb10ea6dd1cc553ffee1bb8b9
EBUILD calculate-utilities-3.2.0_alpha1.ebuild 812 SHA256 071147df50799142c686c4e90ae04bbd58f1939dd4de7f5152cc169ebc5a7cfd SHA512 0289587199af8c5c8be685c8aa314d1b68e122f996f4d90fa3f90ddc9ba4ee080c9482a9f27f068caf7256ade5d7a57a837b659a1e9048c256b7416f573144c7 WHIRLPOOL c5fcc6efc2bc4bfd552d253f10689a2acbfe76b222f95a9c66db8ae651e2a2097551b6e84010d898bd506dd9f531e7ef909d48463f922fa94fd57fef6ad3b01d

@ -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="amd64 x86"
IUSE="cl_consolegui cl_client cl_desktop cl_console"
RDEPEND="${RDEPEND}
=sys-apps/calculate-install-3.2.0_alpha1
=sys-apps/calculate-i18n-3.2.0_alpha1
=sys-apps/calculate-lib-3.2.0_alpha1-r1
=sys-apps/calculate-core-3.2.0_alpha1-r1
=sys-apps/calculate-update-3.2.0_alpha1-r1
cl_client? ( =sys-apps/calculate-client-3.2.0_alpha1 )
cl_desktop? ( =sys-apps/calculate-desktop-3.2.0_alpha1 )
cl_consolegui? ( =sys-apps/calculate-console-gui-3.2.0_alpha1 )
cl_console? ( =sys-apps/calculate-console-3.2.0_alpha1 )
"
Loading…
Cancel
Save