parent
0ceb886e2e
commit
0d822aabe1
@ -0,0 +1,37 @@
|
||||
# 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 setting and storing the user account in the domain"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
DEPEND="~sys-apps/calculate-desktop-3.1.3_beta1
|
||||
!<sys-apps/calculate-client-3.1.0_beta1
|
||||
>=dev-python/python-ldap-2.0[ssl]
|
||||
>=sys-auth/pam_ldap-180[ssl]
|
||||
>=sys-auth/nss_ldap-239
|
||||
>=sys-apps/keyexec-0.1.2
|
||||
sys-apps/keyutils
|
||||
sys-auth/pam_keystore
|
||||
dev-lang/swig"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-client-3.1.3_beta1-r1.patch"
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
diff --git client/cl_client.py client/cl_client.py
|
||||
index 5b0bd7e..2cf6d12 100644
|
||||
--- client/cl_client.py
|
||||
+++ client/cl_client.py
|
||||
@@ -1893,7 +1893,12 @@ class Client(commandServer, encrypt):
|
||||
if "." in domainName:
|
||||
domain = domainName
|
||||
else:
|
||||
+ import socket
|
||||
domain = "%s.%s" %(domainName,netDomain)
|
||||
+ try:
|
||||
+ gethostbyname(domain)
|
||||
+ except socket.gaierror as e:
|
||||
+ domain = domainName
|
||||
# check domain by ping
|
||||
for i in range(0,1):
|
||||
try:
|
@ -0,0 +1,35 @@
|
||||
# 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.1.3_beta1-r3.patch"
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
|
||||
index 8c6fb2e..66391bb 100644
|
||||
--- calculate/lib/cl_template.py
|
||||
+++ calculate/lib/cl_template.py
|
||||
@@ -2542,6 +2542,7 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction):
|
||||
"-r\d+)?)?$",re.S)
|
||||
|
||||
currentBelong = ""
|
||||
+ alreadyInformed = []
|
||||
|
||||
def __init__(self, objVar):
|
||||
# Если не определен словарь функций шаблона
|
||||
@@ -3487,10 +3488,13 @@ class templateFunction(_error, _warning, _shareTemplate, _shareTermsFunction):
|
||||
funcPkg = "%s/%s"%(category,pkgName)
|
||||
try:
|
||||
if not self.checkCorrectPkgName(funcPkg):
|
||||
- self.printWARNING(
|
||||
- _("Package {pkgName} specified in the merge() into "
|
||||
+ message = _("Package {pkgName} specified in the merge() into "
|
||||
"{templName} template is not found").format(
|
||||
- pkgName=funcPkg,templName=self.nameTemplate))
|
||||
+ pkgName=funcPkg,templName=self.nameTemplate)
|
||||
+ hashMessage = hashlib.md5(message).digest()
|
||||
+ if not hashMessage in self.alreadyInformed:
|
||||
+ self.printWARNING(message)
|
||||
+ self.alreadyInformed.append(hashMessage)
|
||||
return textTemplateTmp[:resS.start()] + \
|
||||
textTemplateTmp[resS.end():]
|
||||
except TemplatesError as e:
|
||||
@@ -5017,9 +5021,12 @@ gettext -d cl_template "$*"
|
||||
if not pkg:
|
||||
return pathFile
|
||||
if checkContents("{CATEGORY}/{PF}".format(**pkg[-1]),
|
||||
- pathFile,
|
||||
- prefix=chrootPath):
|
||||
- return pathFile
|
||||
+ pathFile,
|
||||
+ prefix=chrootPath,
|
||||
+ reservedFile='/var/lib/calculate/-CONTENTS-{PN}'.format(**pkg[-1]) \
|
||||
+ if self.objVar.Get('cl_ebuild_phase') == 'postinst' \
|
||||
+ else None):
|
||||
+ return pathFile
|
||||
real_filename = os.path.basename(pathFile)
|
||||
real_dirname = os.path.dirname(pathFile)
|
||||
self.configMode = T_NEWCFG
|
||||
@@ -5498,8 +5505,8 @@ gettext -d cl_template "$*"
|
||||
def fileIsUtf(self, fileName):
|
||||
"""Проверяет файл на кодировку UTF-8"""
|
||||
if os.path.isfile(fileName):
|
||||
- FD = open(os.path.abspath(fileName))
|
||||
- newTemplate = FD.read()
|
||||
+ FD = open(os.path.abspath(fileName),'r')
|
||||
+ newTemplate = FD.read(1)+FD.read()
|
||||
FD.close()
|
||||
try:
|
||||
newTemplate.decode("UTF-8")
|
||||
diff --git calculate/lib/utils/content.py calculate/lib/utils/content.py
|
||||
index 2bec6e0..7d2d62d 100644
|
||||
--- calculate/lib/utils/content.py
|
||||
+++ calculate/lib/utils/content.py
|
||||
@@ -126,7 +126,29 @@ class PkgContents:
|
||||
elif path.isfile(newfilename):
|
||||
self.addFile(filename)
|
||||
|
||||
-def checkContents(pkg,fileName,prefix='/'):
|
||||
+def checkReserved(fileName,contentFile):
|
||||
+ """
|
||||
+ Check contents with newContent
|
||||
+ """
|
||||
+ TYPE,FILENAME,MD5,MTIME=0,1,2,3
|
||||
+ obj = filter(lambda x:x[1] == fileName,
|
||||
+ map(lambda x:x.split(' '),
|
||||
+ filter(lambda x:x.startswith('obj'),
|
||||
+ readLinesFile(contentFile))))
|
||||
+ # if pkg not content filename
|
||||
+ if not obj:
|
||||
+ return True
|
||||
+ # if file is not exists
|
||||
+ if not path.exists(fileName):
|
||||
+ return True
|
||||
+ contentMD5 = hashlib.md5(readFile(fileName)).hexdigest().strip()
|
||||
+ configMD5 = obj[0][MD5].strip()
|
||||
+ # if content was not changed
|
||||
+ if contentMD5 == configMD5:
|
||||
+ return True
|
||||
+ return False
|
||||
+
|
||||
+def checkContents(pkg,fileName,prefix='/',reservedFile=None):
|
||||
"""
|
||||
Check contents with newContent
|
||||
"""
|
||||
@@ -143,10 +165,18 @@ def checkContents(pkg,fileName,prefix='/'):
|
||||
readLinesFile(contentFile))))
|
||||
# if pkg not content filename
|
||||
if not obj:
|
||||
- return True
|
||||
+ # for using reserved -CONTENTS file on postinst
|
||||
+ if not reservedFile or checkReserved(fileName,reservedFile):
|
||||
+ return True
|
||||
+ else:
|
||||
+ return False
|
||||
# if file is not exists
|
||||
if not path.exists(fileName):
|
||||
- return True
|
||||
+ # for using reserved -CONTENTS file on postinst
|
||||
+ if not reservedFile or checkReserved(fileName,reservedFile):
|
||||
+ return True
|
||||
+ else:
|
||||
+ return False
|
||||
contentMD5 = hashlib.md5(readFile(fileName)).hexdigest().strip()
|
||||
configMD5 = obj[0][MD5].strip()
|
||||
# if content was not changed
|
@ -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.1.3_beta1-r2
|
||||
=sys-apps/calculate-i18n-3.1.3_beta1
|
||||
=sys-apps/calculate-lib-3.1.3_beta1-r3
|
||||
=sys-apps/calculate-core-3.1.3_beta1-r1
|
||||
=sys-apps/calculate-update-3.1.3_beta1
|
||||
cl_client? ( =sys-apps/calculate-client-3.1.3_beta1-r1 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.1.3_beta1-r1 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.1.3_beta1 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.1.3_beta1 )
|
||||
"
|
Loading…
Reference in new issue