parent
42ff5721c8
commit
98076d35b3
@ -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.4_beta1
|
||||
!<sys-apps/calculate-client-3.1.0
|
||||
>=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.4_beta1-r1.patch"
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
diff --git client/cl_client.py client/cl_client.py
|
||||
index 2cf6d12..1d1a1d2 100644
|
||||
--- client/cl_client.py
|
||||
+++ client/cl_client.py
|
||||
@@ -1148,7 +1148,7 @@ class Client(commandServer, encrypt):
|
||||
if self.domain:
|
||||
foundMountRemote = isMount("/var/calculate/remote")
|
||||
if not foundMountRemote:
|
||||
- self.mountRemote();
|
||||
+ self.mountRemote(byUserSync=True);
|
||||
# check on two session user login
|
||||
if self.isTwoSessionsUser(self.userName):
|
||||
return False
|
||||
@@ -2108,7 +2108,7 @@ class Client(commandServer, encrypt):
|
||||
os.rmdir(previousHome)
|
||||
return True
|
||||
|
||||
- def mountRemote(self):
|
||||
+ def mountRemote(self,byUserSync=False):
|
||||
"""
|
||||
Mount remote domain resource for domain workstation.
|
||||
|
||||
@@ -2145,8 +2145,10 @@ class Client(commandServer, encrypt):
|
||||
os.makedirs(pathRemote)
|
||||
if self.mountSambaRes(domain,"client",pwdRemote,
|
||||
0,0,"remote",pathRemote) is False:
|
||||
- self.printWARNING(_("Failed to mount Samba resource [%s]")%\
|
||||
- "remote" + " ...")
|
||||
+ if not byUserSync:
|
||||
+ self.printWARNING(
|
||||
+ _("Failed to mount Samba resource [%s]")%\
|
||||
+ "remote" + " ...")
|
||||
beforeRemoteAuth = self.clVars.Get('os_remote_auth')
|
||||
# apply templates if current up-to-date
|
||||
if not self.applyRelevanceTemplates():
|
@ -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.4_beta1-r5.patch"
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
|
||||
index 2790486..634ebcd 100644
|
||||
--- calculate/lib/cl_template.py
|
||||
+++ calculate/lib/cl_template.py
|
||||
@@ -2221,7 +2221,7 @@ class _file(_error):
|
||||
return F_CONF
|
||||
|
||||
|
||||
- def openFiles(self, nameFileTemplate, nameFileConfig):
|
||||
+ def openFiles(self, nameFileTemplate, nameFileConfig, typeFormat=None):
|
||||
"""Открывает шаблон и конфигурационный файл"""
|
||||
self.textConfig = ""
|
||||
self.textTemplate = ""
|
||||
@@ -2231,7 +2231,7 @@ class _file(_error):
|
||||
self.nameFileConfig = os.path.abspath(nameFileConfig)
|
||||
self.nameFileTemplate = os.path.abspath(nameFileTemplate)
|
||||
self.F_TEMPL = self.openTemplFile(self.nameFileTemplate)
|
||||
- if not self.executeType:
|
||||
+ if not self.executeType and typeFormat != "diff":
|
||||
self.F_CONF = self.__openConfFile(self.nameFileConfig)
|
||||
if self.F_TEMPL and self.F_CONF:
|
||||
self.textTemplate = self.F_TEMPL.read()
|
||||
@@ -4572,8 +4572,11 @@ gettext -d cl_template "$*"
|
||||
pkgContents.writeContents()
|
||||
self.filesApply = map(lambda x:autoUpdateDict.get(x,x),self.filesApply)
|
||||
if filter(lambda x:"._cfg" in x, self.filesApply):
|
||||
- self.printWARNING(_("Some config files need updating. Perform dispatch-conf."))
|
||||
- if self.dispatchConf and self.objVar.Get('cl_dispatch_conf') == 'dispatch':
|
||||
+ self.printWARNING(_("Some config files need updating. "
|
||||
+ "Perform dispatch-conf."))
|
||||
+ if self.dispatchConf and \
|
||||
+ self.objVar.Get('cl_dispatch_conf') == 'dispatch' and \
|
||||
+ self.objVar.Get('cl_ebuild_phase') == '':
|
||||
self.dispatchConf(self.filesApply)
|
||||
|
||||
def scanningTemplates(self, scanDir, prefix=None, flagDir=False,
|
||||
@@ -4610,7 +4613,7 @@ gettext -d cl_template "$*"
|
||||
if stat.S_ISREG(statInfo):
|
||||
if not self.processingFile(absPath, prefix, optDir):
|
||||
ret = False
|
||||
- break
|
||||
+ continue
|
||||
elif stat.S_ISDIR(statInfo):
|
||||
# Обработка директории
|
||||
retDir = self.processingDirectory(absPath, prefix,
|
||||
@@ -4639,6 +4642,7 @@ gettext -d cl_template "$*"
|
||||
self.stop = e.status()
|
||||
return False
|
||||
else:
|
||||
+ self.clearErrors()
|
||||
self.printWARNING(str(e))
|
||||
finally:
|
||||
self.objVar.defaultModule = prevModule
|
||||
@@ -4984,7 +4988,7 @@ gettext -d cl_template "$*"
|
||||
passwdFile = os.path.join(self._baseDir,'etc/passwd')
|
||||
if os.path.exists(passwdFile):
|
||||
mapUid = dict(
|
||||
- filter(lambda x:x[0] and x[1],
|
||||
+ filter(lambda x:x and len(x)>1 and x[0] and x[1],
|
||||
map(lambda x:x.split(':')[0:3:2],
|
||||
filter(lambda x:not x.startswith('#'),
|
||||
open(passwdFile,'r')))))
|
||||
@@ -4997,7 +5001,7 @@ gettext -d cl_template "$*"
|
||||
groupFile = os.path.join(self._baseDir,'etc/group')
|
||||
if os.path.exists(groupFile):
|
||||
mapGid = dict(
|
||||
- filter(lambda x:x[0] and x[1],
|
||||
+ filter(lambda x:x and len(x)>1 and x[0] and x[1],
|
||||
map(lambda x:x.split(':')[0:3:2],
|
||||
filter(lambda x:not x.startswith('#'),
|
||||
open(groupFile,'r')))))
|
||||
@@ -5431,7 +5435,7 @@ gettext -d cl_template "$*"
|
||||
preReturn(pathProg)
|
||||
return ([], False)
|
||||
if not flagSymlink:
|
||||
- self.openFiles(nameFileTemplate, pathOldFile)
|
||||
+ self.openFiles(nameFileTemplate, pathOldFile,objHeadNew.fileType)
|
||||
if self.getError():
|
||||
return ([], False)
|
||||
if not objHeadNew.params.has_key("chown"):
|
||||
@@ -5656,9 +5660,8 @@ gettext -d cl_template "$*"
|
||||
self.textTemplate = objTempl.processingFile(self.textConfig,
|
||||
self.objVar.Get('cl_root_path'))
|
||||
if objTempl.getError():
|
||||
- self.setError(_("Failed to use patch ") + \
|
||||
+ raise TemplatesError(_("Failed to use patch ") + \
|
||||
nameFileTemplate)
|
||||
- return False
|
||||
elif formatTemplate == 'diff':
|
||||
self.printSUCCESS(_("Applying patch")+ " " + \
|
||||
os.path.basename(nameFileTemplate))
|
||||
@@ -5979,6 +5982,7 @@ class scanDirectoryClt:
|
||||
self.stop = e.status()
|
||||
return False
|
||||
else:
|
||||
+ self.clearErrors()
|
||||
self.printWARNING(str(e))
|
||||
return True
|
||||
|
||||
diff --git calculate/lib/format/diff.py calculate/lib/format/diff.py
|
||||
index 1f45e8e..210f7ec 100644
|
||||
--- calculate/lib/format/diff.py
|
||||
+++ calculate/lib/format/diff.py
|
||||
@@ -43,6 +43,11 @@ class diff(_error):
|
||||
patchDryRun.write(self.text)
|
||||
if patchDryRun.success():
|
||||
break
|
||||
+ patchDryRun = process('/usr/bin/patch','-R','--dry-run',
|
||||
+ '-p%d'%i,cwd=rootPath,)
|
||||
+ patchDryRun.write(self.text)
|
||||
+ if patchDryRun.success():
|
||||
+ return ""
|
||||
else:
|
||||
self.setError(_("Patching failed"))
|
||||
return False
|
||||
diff --git calculate/lib/utils/device.py calculate/lib/utils/device.py
|
||||
index 1ae7a07..34d00ca 100644
|
||||
--- calculate/lib/utils/device.py
|
||||
+++ calculate/lib/utils/device.py
|
||||
@@ -23,9 +23,9 @@ from os import path
|
||||
from calculate.lib.cl_lang import setLocalTranslate
|
||||
setLocalTranslate('cl_lib3',sys.modules[__name__])
|
||||
|
||||
-def getUUIDDict(revers=False):
|
||||
+def getUUIDDict(revers=False,devs=[]):
|
||||
"""Get dict UUID -> dev"""
|
||||
- blkidProcess = process("/sbin/blkid","-s","UUID","-c","/dev/null")
|
||||
+ blkidProcess = process("/sbin/blkid","-s","UUID","-c","/dev/null",*devs)
|
||||
if revers:
|
||||
datafunc = lambda x,y: (y,x)
|
||||
else:
|
||||
@@ -166,6 +166,8 @@ class getUdevDeviceInfo:
|
||||
typeQuery = "--name" if name else "--path"
|
||||
value = name or os.path.realpath(path)
|
||||
keyCache = "%s=%s"%(typeQuery,value)
|
||||
+ if not self.cache:
|
||||
+ refreshUdev(onlyTrigger=True)
|
||||
if not keyCache in self.cache:
|
||||
if not self.udevadmCmd:
|
||||
self.udevadmCmd = getProgPath('/sbin/udevadm')
|
||||
@@ -391,9 +393,10 @@ def refreshLVM():
|
||||
process(lvchange,'-ay',group).success()
|
||||
process(lvchange,'--refresh',group).success()
|
||||
|
||||
-def refreshUdev():
|
||||
+def refreshUdev(onlyTrigger=False):
|
||||
"""Run command which refresh information about device in udev"""
|
||||
- getUdevDeviceInfo.clearCache()
|
||||
+ if not onlyTrigger:
|
||||
+ getUdevDeviceInfo.clearCache()
|
||||
udevadm = getProgPath('/sbin/udevadm')
|
||||
if udevadm:
|
||||
blkidFile = '/etc/blkid.tab'
|
||||
diff --git calculate/lib/utils/files.py calculate/lib/utils/files.py
|
||||
index a61deb9..cd94e92 100644
|
||||
--- calculate/lib/utils/files.py
|
||||
+++ calculate/lib/utils/files.py
|
||||
@@ -722,12 +722,12 @@ class FStab(object):
|
||||
fstab_file = '/etc/fstab'
|
||||
NAME, DIR, TYPE, OPTS, FREQ, PASSNO = range(0,6)
|
||||
|
||||
- def __init__(self,fstab_file=None):
|
||||
+ def __init__(self,fstab_file=None,devs=[]):
|
||||
if fstab_file:
|
||||
self.fstab_file = fstab_file
|
||||
self.cache = []
|
||||
self.rotateCache = []
|
||||
- self.dictUUID = getUUIDDict()
|
||||
+ self.dictUUID = getUUIDDict(devs=devs)
|
||||
self.rebuildCache()
|
||||
|
||||
def rebuildCache(self):
|
@ -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.4_beta1-r3
|
||||
=sys-apps/calculate-i18n-3.1.4_beta1
|
||||
=sys-apps/calculate-lib-3.1.4_beta1-r5
|
||||
=sys-apps/calculate-core-3.1.4_beta1-r3
|
||||
=sys-apps/calculate-update-3.1.4_beta1
|
||||
cl_client? ( =sys-apps/calculate-client-3.1.4_beta1-r1 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.1.4_beta1-r1 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.1.4_beta1 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.1.4_beta1 )
|
||||
"
|
Loading…
Reference in new issue