Remove utils 2.2.24 2.2.25 2.2.26 2.2.27

atratsevskiy
parent aee8cbf93a
commit e70b8e06a1

@ -1,27 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.24"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Using hardened stages
epatch "${FILESDIR}/calculate-assemble-2.2.24-r1.patch"
}

@ -1,27 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.25"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Fix module-rebuild
epatch "${FILESDIR}/calculate-assemble-2.2.25-r1.patch"
}

@ -1,27 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.25"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Fix module-rebuild, combine two action to one
epatch "${FILESDIR}/calculate-assemble-2.2.25-r2.patch"
}

@ -1,28 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.25"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Fix module-rebuild, combine two action to one
# improve cl-make -D
epatch "${FILESDIR}/calculate-assemble-2.2.25-r3.patch"
}

@ -1,28 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.25"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Fix module-rebuild, combine two action to one
# improve cl-make -D, support git portages
epatch "${FILESDIR}/calculate-assemble-2.2.25-r4.patch"
}

@ -1,28 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.25"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Fix module-rebuild, combine two action to one
# improve cl-make -D, support git portages
epatch "${FILESDIR}/calculate-assemble-2.2.25-r5.patch"
}

@ -1,28 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.25"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Fix module-rebuild, combine two action to one
# improve cl-make -D, support git portages
epatch "${FILESDIR}/calculate-assemble-2.2.25-r6.patch"
}

@ -1,28 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.25"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Fix module-rebuild, combine two action to one
# improve cl-make -D, support git portages
epatch "${FILESDIR}/calculate-assemble-2.2.25-r7.patch"
}

@ -1,28 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.25"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Fix module-rebuild, combine two action to one
# improve cl-make -D, support git portages
epatch "${FILESDIR}/calculate-assemble-2.2.25-r8.patch"
}

@ -1,19 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.25"
RDEPEND="${DEPEND}"

@ -1,27 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.26"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix default filesystem
epatch "${FILESDIR}/calculate-assemble-2.2.26-r1.patch"
}

@ -1,27 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.26"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix default filesystem, discard creating mask,unmask,use
epatch "${FILESDIR}/calculate-assemble-2.2.26-r2.patch"
}

@ -1,19 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.26"
RDEPEND="${DEPEND}"

@ -1,27 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.27"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix busy devs
epatch "${FILESDIR}/calculate-assemble-2.2.27-r1.patch"
}

@ -1,27 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.27"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix busy devs, fix assemble from stage3
epatch "${FILESDIR}/calculate-assemble-2.2.27-r2.patch"
}

@ -1,29 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.27"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix busy devs, fix assemble from stage3
epatch "${FILESDIR}/calculate-assemble-2.2.27-r2.patch"
# fix branch rename
epatch "${FILESDIR}/calculate-assemble-2.2.27-fix_branch_rename.patch"
}

@ -1,19 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="~sys-apps/calculate-builder-2.2.27"
RDEPEND="${DEPEND}"

@ -1,25 +0,0 @@
diff --git pym/cl_fill_assemble.py pym/cl_fill_assemble.py
index b729ca3..5a7baa1 100644
--- pym/cl_fill_assemble.py
+++ pym/cl_fill_assemble.py
@@ -120,7 +120,10 @@ class fillVars(installFillVars):
distRep = DistributiveRepository(self.Get('cl_assemble_image_path'))
shortname = self.Get('cl_assemble_source').lower()
if shortname == "stage":
- return distRep.getBestStage(march=archMachine)
+ hardened = None \
+ if "hardened" in self.Get('os_assemble_profile') \
+ else False
+ return distRep.getBestStage(march=archMachine,hardened=hardened)
else:
return distRep.getBestDistributive(march=archMachine,
shortname=shortname,
@@ -147,7 +150,7 @@ class fillVars(installFillVars):
if image:
if image.endswith('.iso'):
return "iso"
- elif re.match(r'^.*/stage\d-[^-]+-\d+.tar.(bz2|gz|lzma|7z)$',image):
+ elif re.match(r'^.*/stage\d-[^-]+(-hardened)?-\d+.tar.(bz2|gz|lzma|7z)$',image):
return "stage"
return ""

@ -1,38 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index 7b88b52..f24359d 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -152,9 +152,10 @@ class cl_assemble(color_print):
{'command':'emerge --depclean',
'step':'depclean'},
# module rebuild
- {'command':'module-rebuild -X rebuild',
+ {'command':'modulesRebuild()',
'step':'module',
'condition':'sys-kernel/.*source.*',
+ 'message':_("Executing '%s'")%'module-rebuild -X rebuild',
'progname':'module-rebuild'},
# xorg module rebuild
{'command':'emerge @x11-module-rebuild',
@@ -1267,6 +1268,21 @@ class cl_assemble(color_print):
_("An error occurred when executing the command")+
":\n %s"%self._getCommand(cmd.command))
+ def modulesRebuild(self):
+ """Run revdep-rebuild and check result"""
+ if not self.assemblePath:
+ self.assemblePath = \
+ self.clVars.Get('cl_assemble_path')
+ modulesFile = path.join(self.assemblePath,
+ "var/lib/module-rebuild/moduledb")
+ # if file exists and not empty
+ if path.exists(modulesFile) and open(modulesFile,'r').read().strip():
+ cmd = self.runChroot("module-rebuild -X rebuild", showProcess=True)
+ if cmd.failed():
+ raise AssembleError(
+ _("An error occurred when executing the command")+
+ ":\n %s"%self._getCommand(cmd.command))
+
def setProfile(self,newprofile,isconfigure):
"""Set profile for assembling system"""
newprofile = newprofile or ""

@ -1,50 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index 7b88b52..6ff06e4 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -143,18 +143,19 @@ class cl_assemble(color_print):
{'command':'emerge --noreplace calculate-meta',
'step':'meta'},
# update packages with fix newuse
- {'command':'emerge -D --newuse world',
- 'step':'newuse'},
+ #{'command':'emerge -D --newuse world',
+ # 'step':'newuse'},
# update world
- {'command':'emerge -uD world',
+ {'command':'emerge -uDN world',
'step':'update'},
# depclean
{'command':'emerge --depclean',
'step':'depclean'},
# module rebuild
- {'command':'module-rebuild -X rebuild',
+ {'command':'modulesRebuild()',
'step':'module',
'condition':'sys-kernel/.*source.*',
+ 'message':_("Executing '%s'")%'module-rebuild -X rebuild',
'progname':'module-rebuild'},
# xorg module rebuild
{'command':'emerge @x11-module-rebuild',
@@ -1267,6 +1268,21 @@ class cl_assemble(color_print):
_("An error occurred when executing the command")+
":\n %s"%self._getCommand(cmd.command))
+ def modulesRebuild(self):
+ """Run revdep-rebuild and check result"""
+ if not self.assemblePath:
+ self.assemblePath = \
+ self.clVars.Get('cl_assemble_path')
+ modulesFile = path.join(self.assemblePath,
+ "var/lib/module-rebuild/moduledb")
+ # if file exists and not empty
+ if path.exists(modulesFile) and open(modulesFile,'r').read().strip():
+ cmd = self.runChroot("module-rebuild -X rebuild", showProcess=True)
+ if cmd.failed():
+ raise AssembleError(
+ _("An error occurred when executing the command")+
+ ":\n %s"%self._getCommand(cmd.command))
+
def setProfile(self,newprofile,isconfigure):
"""Set profile for assembling system"""
newprofile = newprofile or ""

@ -1,59 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index 7b88b52..3cb212f 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -143,18 +143,19 @@ class cl_assemble(color_print):
{'command':'emerge --noreplace calculate-meta',
'step':'meta'},
# update packages with fix newuse
- {'command':'emerge -D --newuse world',
- 'step':'newuse'},
+ #{'command':'emerge -D --newuse world',
+ # 'step':'newuse'},
# update world
- {'command':'emerge -uD world',
+ {'command':'emerge -uDN world',
'step':'update'},
# depclean
{'command':'emerge --depclean',
'step':'depclean'},
# module rebuild
- {'command':'module-rebuild -X rebuild',
+ {'command':'modulesRebuild()',
'step':'module',
'condition':'sys-kernel/.*source.*',
+ 'message':_("Executing '%s'")%'module-rebuild -X rebuild',
'progname':'module-rebuild'},
# xorg module rebuild
{'command':'emerge @x11-module-rebuild',
@@ -838,7 +839,7 @@ class cl_assemble(color_print):
% "Calculate Linux")
self.printConfInfo()
- command = "emerge -pv %s"%(self.clVars.Get('cl_assemble_meta') or
+ command = "emerge -puNv %s %s"%(self.clVars.Get('cl_assemble_meta'),
"world")
self.printSUCCESS(_("Checking dependencies")+ " ...")
if self.runChroot(command, showProcess=True,
@@ -1267,6 +1268,21 @@ class cl_assemble(color_print):
_("An error occurred when executing the command")+
":\n %s"%self._getCommand(cmd.command))
+ def modulesRebuild(self):
+ """Run revdep-rebuild and check result"""
+ if not self.assemblePath:
+ self.assemblePath = \
+ self.clVars.Get('cl_assemble_path')
+ modulesFile = path.join(self.assemblePath,
+ "var/lib/module-rebuild/moduledb")
+ # if file exists and not empty
+ if path.exists(modulesFile) and open(modulesFile,'r').read().strip():
+ cmd = self.runChroot("module-rebuild -X rebuild", showProcess=True)
+ if cmd.failed():
+ raise AssembleError(
+ _("An error occurred when executing the command")+
+ ":\n %s"%self._getCommand(cmd.command))
+
def setProfile(self,newprofile,isconfigure):
"""Set profile for assembling system"""
newprofile = newprofile or ""

@ -1,332 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index 7b88b52..2ca1e8a 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -25,7 +25,8 @@ from os import path
from cl_template import template,iniParser
from cl_utils import process,pathJoin,getRunCommands,getTupleVersion,isMount,\
isFstabMount,childMounts,_toUNICODE,cmpVersion, \
- listDirectory
+ listDirectory, readFile, removeDir, getPkgInstalled, \
+ getTupleVersion, isPkgInstalled,reVerSplitToPV
from subprocess import STDOUT,PIPE
from cl_print import color_print
from cl_datavars import DataVars
@@ -122,6 +123,12 @@ class cl_assemble(color_print):
'hideout':True,
'message':_("Configuring with %s templates")% "assemble"
},
+ {'command':"_migratePortage()",
+ 'foraction':('syncupdate',),
+ 'step':"migrate",
+ 'hideout':True,
+ 'message':_("Checking portage repository")
+ },
{'command':'eix-sync',
'progname':'eix-sync',
'message':_("Updating portages"),
@@ -143,18 +150,19 @@ class cl_assemble(color_print):
{'command':'emerge --noreplace calculate-meta',
'step':'meta'},
# update packages with fix newuse
- {'command':'emerge -D --newuse world',
- 'step':'newuse'},
+ #{'command':'emerge -D --newuse world',
+ # 'step':'newuse'},
# update world
- {'command':'emerge -uD world',
+ {'command':'emerge -uDN world',
'step':'update'},
# depclean
{'command':'emerge --depclean',
'step':'depclean'},
# module rebuild
- {'command':'module-rebuild -X rebuild',
+ {'command':'modulesRebuild()',
'step':'module',
'condition':'sys-kernel/.*source.*',
+ 'message':_("Executing '%s'")%'module-rebuild -X rebuild',
'progname':'module-rebuild'},
# xorg module rebuild
{'command':'emerge @x11-module-rebuild',
@@ -329,11 +337,12 @@ class cl_assemble(color_print):
self.printSUCCESS(_("File system: %s")%
self.clVars.Get('os_assemble_root_format'))
if self.clVars.Get('cl_assemble_sync'):
- self.printSUCCESS(_("Portage rsync mirror: %s")%
+ self.printSUCCESS(_("Portage mirror: %s")%
self.clVars.Get('cl_assemble_sync'))
self.printSUCCESS(_("Stage for assembling: %s")%
(self.clVars.Get('cl_assemble_image') or _("none")))
- if self.clVars.Get('cl_assemble_image_type') == "stage":
+ if self.clVars.Get('cl_assemble_image_type') == "stage" and \
+ self.clVars.Get('cl_assemble_branch') == '':
self.printSUCCESS(_("Portage snapshot for assemble: %s")%
(self.clVars.Get('cl_assemble_snapshot_portage') or _("none")))
self.defaultPrint("%s\n"%_("Checking up before assemble"))
@@ -463,6 +472,7 @@ class cl_assemble(color_print):
'os_assemble_root_dev',
'cl_assemble_path',
'cl_assemble_sync',
+ 'cl_assemble_branch',
'cl_assemble_buildpkg_set',
'cl_assemble_pkgdir')
@@ -509,8 +519,79 @@ class cl_assemble(color_print):
DirectoryDistributive(target,parent=self.targetDistr)
self.printByResult(True)
+ def _migratePortage(self):
+ if self.clVars.Get('cl_assemble_branch'):
+ if not isPkgInstalled('dev-vcs/git'):
+ self.printMessageForTest(_("Installing %s")%'dev-vcs/git')
+ self.runChroot("emerge -1 git")
+ portagePath = pathJoin(self.assemblePath,'usr/portage')
+ gitConfig = pathJoin(portagePath, '.git/config')
+ # check for repository contains .git and
+ # this git from cl_assemble_sync url
+ reUrl = re.compile('url\s*=\s*(.*)')
+ gitUrl = reUrl.search(readFile(gitConfig))
+ # need remove portage and reget from sync address
+ self.printMessageForTest(_("Fetching portages"))
+ if not gitUrl or \
+ gitUrl.group(1).strip() != self.clVars.Get('cl_assemble_sync'):
+ if path.exists(portagePath):
+ removeDir(portagePath)
+ getPortage = "git clone --depth 1 -n {gitrep} {portage}".format(
+ gitrep=self.clVars.Get('cl_assemble_sync'),
+ portage='/usr/portage')
+ self.runChroot(getPortage)
+ else:
+ getPortage = "cd {portage};git fetch".format(
+ gitrep=self.clVars.Get('cl_assemble_sync'),
+ portage='/usr/portage')
+ self.runChroot(getPortage)
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/usr/portage',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
+
+ portagePkg = getPkgInstalled('sys-apps/portage',
+ prefix=self.assemblePath)
+ portageMinVer = getTupleVersion('2.2.0_alpha72')
+ if portagePkg and \
+ getTupleVersion(portagePkg[0]['PVR']) < portageMinVer:
+ lastEbuild = \
+ sorted(
+ map(lambda x:(x['P'],
+ getTupleVersion(x['PVR'])),
+ map(lambda x:reVerSplitToPV(x),
+ filter(lambda x:x.endswith('ebuild'),
+ listDirectory(pathJoin(self.assemblePath,
+ 'usr/portage/sys-apps/portage'))
+ ))),key=lambda x:x[1])
+ if len(lastEbuild) > 1:
+ lastEbuild = lastEbuild[-2][0]
+ else:
+ return
+ self.printMessageForTest(_("Installing %s")%"portage")
+ emergePortage = \
+ 'ebuild /usr/portage/sys-apps/portage/%s digest merge'% \
+ lastEbuild
+ self.runChroot(emergePortage)
+ restoreManifest = \
+ 'cd /usr/portage;git checkout sys-apps'
+ self.runChroot(restoreManifest)
+ else:
+ portagePath = pathJoin(self.assemblePath,'usr/portage')
+ gitConfig = pathJoin(portagePath, '.git/config')
+ if path.exists(gitConfig):
+ removeDir(portagePath)
+ if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ pathOverlay = pathJoin(self.assemblePath,'var/lib/layman/calculate')
+ if path.exists(pathOverlay):
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/var/lib/layman/calculate',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
+
def _updatePackages(self):
"""Update portage and calculate overlay"""
+ self._migratePortage()
emergeSync = "emerge --sync"
self.printMessageForTest(_("Updating portages"))
self.runChroot(emergeSync)
@@ -525,6 +606,11 @@ class cl_assemble(color_print):
else:
self.runChroot("layman -L")
self.runChroot("layman -a calculate")
+ if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/var/lib/layman/calculate',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
def _updateMan(self):
"""Remove man, install man-db"""
@@ -610,7 +696,8 @@ class cl_assemble(color_print):
pathAppMisc = pathJoin(self.assemblePath,'/var/db/pkg/app-misc')
metaPackage = self.clVars.Get('cl_assemble_meta').rpartition('/')[2]
- if not isinstance(self.sourceDistr,IsoDistributive):
+ if not isinstance(self.sourceDistr,IsoDistributive) and \
+ self.clVars.Get('cl_assemble_branch') == '':
self._unpackPortage()
self._prepareMount()
@@ -738,10 +825,14 @@ class cl_assemble(color_print):
def setSyncMirror(self,mirror):
"""Set sync mirror"""
- reMirror = re.compile("^(rsync:)?/?/?([^:]+)$",re.S)
+ reMirror = re.compile("^(rsync:|git:)?/?/?([^:]+)$",re.S)
res = reMirror.search(mirror)
if res:
- self.clVars.Set('cl_assemble_sync',"//%s"%res.groups()[1],True)
+ if res.groups()[0] == "git:":
+ self.clVars.Set('cl_assemble_sync',"git://%s"%res.groups()[1],True)
+ else:
+ self.clVars.Set('cl_assemble_sync',"//%s"%res.groups()[1],True)
+ self.clVars.Set('cl_assemble_branch','',True)
return True
else:
return False
@@ -838,7 +929,7 @@ class cl_assemble(color_print):
% "Calculate Linux")
self.printConfInfo()
- command = "emerge -pv %s"%(self.clVars.Get('cl_assemble_meta') or
+ command = "emerge -puNv %s %s"%(self.clVars.Get('cl_assemble_meta'),
"world")
self.printSUCCESS(_("Checking dependencies")+ " ...")
if self.runChroot(command, showProcess=True,
@@ -1267,6 +1358,21 @@ class cl_assemble(color_print):
_("An error occurred when executing the command")+
":\n %s"%self._getCommand(cmd.command))
+ def modulesRebuild(self):
+ """Run revdep-rebuild and check result"""
+ if not self.assemblePath:
+ self.assemblePath = \
+ self.clVars.Get('cl_assemble_path')
+ modulesFile = path.join(self.assemblePath,
+ "var/lib/module-rebuild/moduledb")
+ # if file exists and not empty
+ if path.exists(modulesFile) and open(modulesFile,'r').read().strip():
+ cmd = self.runChroot("module-rebuild -X rebuild", showProcess=True)
+ if cmd.failed():
+ raise AssembleError(
+ _("An error occurred when executing the command")+
+ ":\n %s"%self._getCommand(cmd.command))
+
def setProfile(self,newprofile,isconfigure):
"""Set profile for assembling system"""
newprofile = newprofile or ""
diff --git pym/cl_assemble_cmd.py pym/cl_assemble_cmd.py
index 046a2d5..64ea758 100644
--- pym/cl_assemble_cmd.py
+++ pym/cl_assemble_cmd.py
@@ -34,7 +34,7 @@ DESCRIPTION = _("Configure for assembling Calculate Linux")
CMD_OPTIONS = [{'shortOption':"d",
'longOption':"disk",
'optVal':"DISK",
- 'help':_("partition intended for assemble")
+ 'help':_("partition or directory intended for assemble")
},
{'shortOption':"p",
'longOption':"profile",
@@ -65,10 +65,10 @@ CMD_OPTIONS = [{'shortOption':"d",
},
{'longOption':"sync",
'optVal':"RSYNC",
- 'help':_("set the preferred rsync mirror for Portage")
+ 'help':_("set the preferred mirror for Portage")
},
- {'longOption':"no-unmount",
- 'help':_("do not unmount the partition where the system"
+ {'longOption':"unmount",
+ 'help':_("unmount the partition where the system"
" is being assembled, when an error occurs")
},
{'longOption':"no-buildpkg",
@@ -126,7 +126,7 @@ class assemble_cmd(share_cmd):
rootDev in self.logicObj.clVars.Get('cl_assemble_dev')) and \
not self.logicObj.tryUseAvailable():
self.optobj.error(
- _("disk must be specified with the '-d' option"))
+ _("partition must be specified with the '-d' option"))
if values.d:
self.logicObj.clVars.Set('os_assemble_root_dev',values.d,True)
if values.sync:
diff --git pym/cl_fill_assemble.py pym/cl_fill_assemble.py
index 98dcc12..a3f254d 100644
--- pym/cl_fill_assemble.py
+++ pym/cl_fill_assemble.py
@@ -339,6 +339,15 @@ class fillVars(installFillVars):
val = self.getValueFromConfig(makepath,"SYNC")
if val != False:
return val[6:]
+ return "git://git.calculate.ru/dev/portage.git"
+
+ def get_cl_assemble_branch(self):
+ """Preferred branch of git portage mirror"""
+ fromEnv = self._getFromEnv('cl_assemble_branch')
+ if fromEnv:
+ return fromEnv
+ if self.Get('cl_assemble_sync').startswith('git:'):
+ return "master"
return ""
def get_cl_assemble_source(self):
diff --git pym/cl_make_cmd.py pym/cl_make_cmd.py
index 63aa9c3..2728edd 100644
--- pym/cl_make_cmd.py
+++ pym/cl_make_cmd.py
@@ -55,6 +55,10 @@ CMD_OPTIONS = [{'shortOption':"D",
'optVal':"PROFILE",
'help':_("system profile ('list' to display all)")
},
+ {'longOption':"sync",
+ 'optVal':"PORTAGE",
+ 'help':_("set the preferred mirror for Portage")
+ },
{'longOption':"skipfirst",
'help':_("skip the first package when resuming the assemble")
},
@@ -123,6 +127,10 @@ class make_cmd(assemble_cmd):
_("action must be specified: make (-m), break (--break),"
" update (-u|-U), apply templates (-T)"
" or check dependencies (-D)"))
+ if values.sync:
+ if not self.logicObj.setSyncMirror(values.sync):
+ self.optobj.error(
+ _("wrong rsync mirror '%s'")%values.sync)
return (values, args)
def setAction(self):
diff --git pym/cl_vars_assemble.py pym/cl_vars_assemble.py
index 84592ac..693c5d5 100644
--- pym/cl_vars_assemble.py
+++ pym/cl_vars_assemble.py
@@ -54,6 +54,9 @@ class Data:
# preferred rsync mirror for portages
cl_assemble_sync = {}
+ # preferred git branch for portages
+ cl_assemble_branch = {'mode':'w'}
+
# type of source (stage of system name)
cl_assemble_source = {}
diff --git scripts/cl-assemble scripts/cl-assemble
index 0f15f75..201fada 100644
--- scripts/cl-assemble
+++ scripts/cl-assemble
@@ -52,6 +52,6 @@ if __name__ == "__main__":
sys.exit(0)
if assemble.isScratch():
sys.exit(1)
- if not assemble.configureSystem(options.f,options.no_unmount):
+ if not assemble.configureSystem(options.f,not options.unmount):
sys.exit(1)
sys.exit(0)

@ -1,363 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index 7b88b52..6b15e73 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -25,7 +25,8 @@ from os import path
from cl_template import template,iniParser
from cl_utils import process,pathJoin,getRunCommands,getTupleVersion,isMount,\
isFstabMount,childMounts,_toUNICODE,cmpVersion, \
- listDirectory
+ listDirectory, readFile, removeDir, getPkgInstalled, \
+ getTupleVersion, isPkgInstalled,reVerSplitToPV
from subprocess import STDOUT,PIPE
from cl_print import color_print
from cl_datavars import DataVars
@@ -122,6 +123,12 @@ class cl_assemble(color_print):
'hideout':True,
'message':_("Configuring with %s templates")% "assemble"
},
+ {'command':"_migratePortage()",
+ 'foraction':('syncupdate',),
+ 'step':"migrate",
+ 'hideout':True,
+ 'message':_("Checking portage repository")
+ },
{'command':'eix-sync',
'progname':'eix-sync',
'message':_("Updating portages"),
@@ -143,18 +150,19 @@ class cl_assemble(color_print):
{'command':'emerge --noreplace calculate-meta',
'step':'meta'},
# update packages with fix newuse
- {'command':'emerge -D --newuse world',
- 'step':'newuse'},
+ #{'command':'emerge -D --newuse world',
+ # 'step':'newuse'},
# update world
- {'command':'emerge -uD world',
+ {'command':'emerge -uDN world',
'step':'update'},
# depclean
{'command':'emerge --depclean',
'step':'depclean'},
# module rebuild
- {'command':'module-rebuild -X rebuild',
+ {'command':'modulesRebuild()',
'step':'module',
'condition':'sys-kernel/.*source.*',
+ 'message':_("Executing '%s'")%'module-rebuild -X rebuild',
'progname':'module-rebuild'},
# xorg module rebuild
{'command':'emerge @x11-module-rebuild',
@@ -329,11 +337,12 @@ class cl_assemble(color_print):
self.printSUCCESS(_("File system: %s")%
self.clVars.Get('os_assemble_root_format'))
if self.clVars.Get('cl_assemble_sync'):
- self.printSUCCESS(_("Portage rsync mirror: %s")%
+ self.printSUCCESS(_("Portage mirror: %s")%
self.clVars.Get('cl_assemble_sync'))
self.printSUCCESS(_("Stage for assembling: %s")%
(self.clVars.Get('cl_assemble_image') or _("none")))
- if self.clVars.Get('cl_assemble_image_type') == "stage":
+ if self.clVars.Get('cl_assemble_image_type') == "stage" and \
+ self.clVars.Get('cl_assemble_branch') == '':
self.printSUCCESS(_("Portage snapshot for assemble: %s")%
(self.clVars.Get('cl_assemble_snapshot_portage') or _("none")))
self.defaultPrint("%s\n"%_("Checking up before assemble"))
@@ -382,6 +391,8 @@ class cl_assemble(color_print):
return True
def preassembleCheckups(self):
+ rsyncServer = self.clVars.Get('cl_assemble_sync')
+ self.setSyncMirror(rsyncServer)
if re.match(r'^i.86$',self.clVars.Get('os_arch_machine'),re.S):
if self.clVars.Get('os_assemble_arch_machine') in ('x86_64','ia64'):
self.printERROR(
@@ -463,6 +474,7 @@ class cl_assemble(color_print):
'os_assemble_root_dev',
'cl_assemble_path',
'cl_assemble_sync',
+ 'cl_assemble_branch',
'cl_assemble_buildpkg_set',
'cl_assemble_pkgdir')
@@ -509,8 +521,79 @@ class cl_assemble(color_print):
DirectoryDistributive(target,parent=self.targetDistr)
self.printByResult(True)
+ def _migratePortage(self):
+ if self.clVars.Get('cl_assemble_branch'):
+ if not isPkgInstalled('dev-vcs/git'):
+ self.printMessageForTest(_("Installing %s")%'dev-vcs/git')
+ self.runChroot("emerge -1 git")
+ portagePath = pathJoin(self.assemblePath,'usr/portage')
+ gitConfig = pathJoin(portagePath, '.git/config')
+ # check for repository contains .git and
+ # this git from cl_assemble_sync url
+ reUrl = re.compile('url\s*=\s*(.*)')
+ gitUrl = reUrl.search(readFile(gitConfig))
+ # need remove portage and reget from sync address
+ self.printMessageForTest(_("Fetching portages"))
+ if not gitUrl or \
+ gitUrl.group(1).strip() != self.clVars.Get('cl_assemble_sync'):
+ if path.exists(portagePath):
+ removeDir(portagePath)
+ getPortage = "git clone --depth 1 -n {gitrep} {portage}".format(
+ gitrep=self.clVars.Get('cl_assemble_sync'),
+ portage='/usr/portage')
+ self.runChroot(getPortage)
+ else:
+ getPortage = "cd {portage};git fetch".format(
+ gitrep=self.clVars.Get('cl_assemble_sync'),
+ portage='/usr/portage')
+ self.runChroot(getPortage)
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/usr/portage',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
+
+ portagePkg = getPkgInstalled('sys-apps/portage',
+ prefix=self.assemblePath)
+ portageMinVer = getTupleVersion('2.2.0_alpha72')
+ if portagePkg and \
+ getTupleVersion(portagePkg[0]['PVR']) < portageMinVer:
+ lastEbuild = \
+ sorted(
+ map(lambda x:(x['P'],
+ getTupleVersion(x['PVR'])),
+ map(lambda x:reVerSplitToPV(x),
+ filter(lambda x:x.endswith('ebuild'),
+ listDirectory(pathJoin(self.assemblePath,
+ 'usr/portage/sys-apps/portage'))
+ ))),key=lambda x:x[1])
+ if len(lastEbuild) > 1:
+ lastEbuild = lastEbuild[-2][0]
+ else:
+ return
+ self.printMessageForTest(_("Installing %s")%"portage")
+ emergePortage = \
+ 'ebuild /usr/portage/sys-apps/portage/%s digest merge'% \
+ lastEbuild
+ self.runChroot(emergePortage)
+ restoreManifest = \
+ 'cd /usr/portage;git checkout sys-apps'
+ self.runChroot(restoreManifest)
+ else:
+ portagePath = pathJoin(self.assemblePath,'usr/portage')
+ gitConfig = pathJoin(portagePath, '.git/config')
+ if path.exists(gitConfig):
+ removeDir(portagePath)
+ if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ pathOverlay = pathJoin(self.assemblePath,'var/lib/layman/calculate')
+ if path.exists(pathOverlay):
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/var/lib/layman/calculate',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
+
def _updatePackages(self):
"""Update portage and calculate overlay"""
+ self._migratePortage()
emergeSync = "emerge --sync"
self.printMessageForTest(_("Updating portages"))
self.runChroot(emergeSync)
@@ -525,6 +608,11 @@ class cl_assemble(color_print):
else:
self.runChroot("layman -L")
self.runChroot("layman -a calculate")
+ if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/var/lib/layman/calculate',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
def _updateMan(self):
"""Remove man, install man-db"""
@@ -610,7 +698,8 @@ class cl_assemble(color_print):
pathAppMisc = pathJoin(self.assemblePath,'/var/db/pkg/app-misc')
metaPackage = self.clVars.Get('cl_assemble_meta').rpartition('/')[2]
- if not isinstance(self.sourceDistr,IsoDistributive):
+ if not isinstance(self.sourceDistr,IsoDistributive) and \
+ self.clVars.Get('cl_assemble_branch') == '':
self._unpackPortage()
self._prepareMount()
@@ -738,10 +827,14 @@ class cl_assemble(color_print):
def setSyncMirror(self,mirror):
"""Set sync mirror"""
- reMirror = re.compile("^(rsync:)?/?/?([^:]+)$",re.S)
+ reMirror = re.compile("^(rsync:|git:)?/?/?([^:]+)$",re.S)
res = reMirror.search(mirror)
if res:
- self.clVars.Set('cl_assemble_sync',"//%s"%res.groups()[1],True)
+ if res.groups()[0] == "git:":
+ self.clVars.Set('cl_assemble_sync',"git://%s"%res.groups()[1],True)
+ else:
+ self.clVars.Set('cl_assemble_sync',"//%s"%res.groups()[1],True)
+ self.clVars.Set('cl_assemble_branch','',True)
return True
else:
return False
@@ -838,7 +931,7 @@ class cl_assemble(color_print):
% "Calculate Linux")
self.printConfInfo()
- command = "emerge -pv %s"%(self.clVars.Get('cl_assemble_meta') or
+ command = "emerge -puNv %s %s"%(self.clVars.Get('cl_assemble_meta'),
"world")
self.printSUCCESS(_("Checking dependencies")+ " ...")
if self.runChroot(command, showProcess=True,
@@ -932,6 +1025,10 @@ class cl_assemble(color_print):
self.printSUCCESS(_("Compiling %s assemble") % "Calculate Linux")
else:
self.printSUCCESS(_("Updating %s assemble") % "Calculate Linux")
+
+ rsyncServer = self.clVars.Get('cl_assemble_sync')
+ self.setSyncMirror(rsyncServer)
+
self.printConfInfo()
self.defaultPrint("%s\n"%_("Checking up before compilation"))
@@ -1267,6 +1364,21 @@ class cl_assemble(color_print):
_("An error occurred when executing the command")+
":\n %s"%self._getCommand(cmd.command))
+ def modulesRebuild(self):
+ """Run revdep-rebuild and check result"""
+ if not self.assemblePath:
+ self.assemblePath = \
+ self.clVars.Get('cl_assemble_path')
+ modulesFile = path.join(self.assemblePath,
+ "var/lib/module-rebuild/moduledb")
+ # if file exists and not empty
+ if path.exists(modulesFile) and open(modulesFile,'r').read().strip():
+ cmd = self.runChroot("module-rebuild -X rebuild", showProcess=True)
+ if cmd.failed():
+ raise AssembleError(
+ _("An error occurred when executing the command")+
+ ":\n %s"%self._getCommand(cmd.command))
+
def setProfile(self,newprofile,isconfigure):
"""Set profile for assembling system"""
newprofile = newprofile or ""
@@ -1434,6 +1546,10 @@ class cl_assemble(color_print):
chrootPath = self.clVars.Get('cl_assemble_path')
distDir = '/usr/portage/distfiles'
pathDistDir = pathJoin(chrootPath,distDir)
+ if not path.exists(pathDistDir):
+ os.mkdir(pathDistDir)
+ os.chmod(pathDistDir,02775)
+ os.chown(pathDistDir,0,250)
if self.startMessage:
self.startMessage = ""
self.defaultPrint("\n")
diff --git pym/cl_assemble_cmd.py pym/cl_assemble_cmd.py
index 046a2d5..64ea758 100644
--- pym/cl_assemble_cmd.py
+++ pym/cl_assemble_cmd.py
@@ -34,7 +34,7 @@ DESCRIPTION = _("Configure for assembling Calculate Linux")
CMD_OPTIONS = [{'shortOption':"d",
'longOption':"disk",
'optVal':"DISK",
- 'help':_("partition intended for assemble")
+ 'help':_("partition or directory intended for assemble")
},
{'shortOption':"p",
'longOption':"profile",
@@ -65,10 +65,10 @@ CMD_OPTIONS = [{'shortOption':"d",
},
{'longOption':"sync",
'optVal':"RSYNC",
- 'help':_("set the preferred rsync mirror for Portage")
+ 'help':_("set the preferred mirror for Portage")
},
- {'longOption':"no-unmount",
- 'help':_("do not unmount the partition where the system"
+ {'longOption':"unmount",
+ 'help':_("unmount the partition where the system"
" is being assembled, when an error occurs")
},
{'longOption':"no-buildpkg",
@@ -126,7 +126,7 @@ class assemble_cmd(share_cmd):
rootDev in self.logicObj.clVars.Get('cl_assemble_dev')) and \
not self.logicObj.tryUseAvailable():
self.optobj.error(
- _("disk must be specified with the '-d' option"))
+ _("partition must be specified with the '-d' option"))
if values.d:
self.logicObj.clVars.Set('os_assemble_root_dev',values.d,True)
if values.sync:
diff --git pym/cl_fill_assemble.py pym/cl_fill_assemble.py
index 98dcc12..a3f254d 100644
--- pym/cl_fill_assemble.py
+++ pym/cl_fill_assemble.py
@@ -339,6 +339,15 @@ class fillVars(installFillVars):
val = self.getValueFromConfig(makepath,"SYNC")
if val != False:
return val[6:]
+ return "git://git.calculate.ru/dev/portage.git"
+
+ def get_cl_assemble_branch(self):
+ """Preferred branch of git portage mirror"""
+ fromEnv = self._getFromEnv('cl_assemble_branch')
+ if fromEnv:
+ return fromEnv
+ if self.Get('cl_assemble_sync').startswith('git:'):
+ return "master"
return ""
def get_cl_assemble_source(self):
diff --git pym/cl_make_cmd.py pym/cl_make_cmd.py
index 63aa9c3..2728edd 100644
--- pym/cl_make_cmd.py
+++ pym/cl_make_cmd.py
@@ -55,6 +55,10 @@ CMD_OPTIONS = [{'shortOption':"D",
'optVal':"PROFILE",
'help':_("system profile ('list' to display all)")
},
+ {'longOption':"sync",
+ 'optVal':"PORTAGE",
+ 'help':_("set the preferred mirror for Portage")
+ },
{'longOption':"skipfirst",
'help':_("skip the first package when resuming the assemble")
},
@@ -123,6 +127,10 @@ class make_cmd(assemble_cmd):
_("action must be specified: make (-m), break (--break),"
" update (-u|-U), apply templates (-T)"
" or check dependencies (-D)"))
+ if values.sync:
+ if not self.logicObj.setSyncMirror(values.sync):
+ self.optobj.error(
+ _("wrong rsync mirror '%s'")%values.sync)
return (values, args)
def setAction(self):
diff --git pym/cl_vars_assemble.py pym/cl_vars_assemble.py
index 84592ac..693c5d5 100644
--- pym/cl_vars_assemble.py
+++ pym/cl_vars_assemble.py
@@ -54,6 +54,9 @@ class Data:
# preferred rsync mirror for portages
cl_assemble_sync = {}
+ # preferred git branch for portages
+ cl_assemble_branch = {'mode':'w'}
+
# type of source (stage of system name)
cl_assemble_source = {}
diff --git scripts/cl-assemble scripts/cl-assemble
index 0f15f75..201fada 100644
--- scripts/cl-assemble
+++ scripts/cl-assemble
@@ -52,6 +52,6 @@ if __name__ == "__main__":
sys.exit(0)
if assemble.isScratch():
sys.exit(1)
- if not assemble.configureSystem(options.f,options.no_unmount):
+ if not assemble.configureSystem(options.f,not options.unmount):
sys.exit(1)
sys.exit(0)

@ -1,367 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index 7b88b52..9f70954 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -25,7 +25,8 @@ from os import path
from cl_template import template,iniParser
from cl_utils import process,pathJoin,getRunCommands,getTupleVersion,isMount,\
isFstabMount,childMounts,_toUNICODE,cmpVersion, \
- listDirectory
+ listDirectory, readFile, removeDir, getPkgInstalled, \
+ getTupleVersion, isPkgInstalled,reVerSplitToPV
from subprocess import STDOUT,PIPE
from cl_print import color_print
from cl_datavars import DataVars
@@ -122,6 +123,12 @@ class cl_assemble(color_print):
'hideout':True,
'message':_("Configuring with %s templates")% "assemble"
},
+ {'command':"_migratePortage()",
+ 'foraction':('syncupdate',),
+ 'step':"migrate",
+ 'hideout':True,
+ 'message':_("Checking portage repository")
+ },
{'command':'eix-sync',
'progname':'eix-sync',
'message':_("Updating portages"),
@@ -141,20 +148,23 @@ class cl_assemble(color_print):
'progname':'perl-cleaner'},
# install meta package
{'command':'emerge --noreplace calculate-meta',
+ 'checkcommand':'find /var/db/pkg/app-misc -name "calculate-meta*"',
+ 'condition':'^$',
'step':'meta'},
# update packages with fix newuse
- {'command':'emerge -D --newuse world',
- 'step':'newuse'},
+ #{'command':'emerge -D --newuse world',
+ # 'step':'newuse'},
# update world
- {'command':'emerge -uD world',
+ {'command':'emerge -uDN world',
'step':'update'},
# depclean
{'command':'emerge --depclean',
'step':'depclean'},
# module rebuild
- {'command':'module-rebuild -X rebuild',
+ {'command':'modulesRebuild()',
'step':'module',
'condition':'sys-kernel/.*source.*',
+ 'message':_("Executing '%s'")%'module-rebuild -X rebuild',
'progname':'module-rebuild'},
# xorg module rebuild
{'command':'emerge @x11-module-rebuild',
@@ -329,11 +339,12 @@ class cl_assemble(color_print):
self.printSUCCESS(_("File system: %s")%
self.clVars.Get('os_assemble_root_format'))
if self.clVars.Get('cl_assemble_sync'):
- self.printSUCCESS(_("Portage rsync mirror: %s")%
+ self.printSUCCESS(_("Portage mirror: %s")%
self.clVars.Get('cl_assemble_sync'))
self.printSUCCESS(_("Stage for assembling: %s")%
(self.clVars.Get('cl_assemble_image') or _("none")))
- if self.clVars.Get('cl_assemble_image_type') == "stage":
+ if self.clVars.Get('cl_assemble_image_type') == "stage" and \
+ self.clVars.Get('cl_assemble_branch') == '':
self.printSUCCESS(_("Portage snapshot for assemble: %s")%
(self.clVars.Get('cl_assemble_snapshot_portage') or _("none")))
self.defaultPrint("%s\n"%_("Checking up before assemble"))
@@ -382,6 +393,8 @@ class cl_assemble(color_print):
return True
def preassembleCheckups(self):
+ rsyncServer = self.clVars.Get('cl_assemble_sync')
+ self.setSyncMirror(rsyncServer)
if re.match(r'^i.86$',self.clVars.Get('os_arch_machine'),re.S):
if self.clVars.Get('os_assemble_arch_machine') in ('x86_64','ia64'):
self.printERROR(
@@ -463,6 +476,7 @@ class cl_assemble(color_print):
'os_assemble_root_dev',
'cl_assemble_path',
'cl_assemble_sync',
+ 'cl_assemble_branch',
'cl_assemble_buildpkg_set',
'cl_assemble_pkgdir')
@@ -509,8 +523,79 @@ class cl_assemble(color_print):
DirectoryDistributive(target,parent=self.targetDistr)
self.printByResult(True)
+ def _migratePortage(self):
+ if self.clVars.Get('cl_assemble_branch'):
+ if not isPkgInstalled('dev-vcs/git'):
+ self.printMessageForTest(_("Installing %s")%'dev-vcs/git')
+ self.runChroot("emerge -1 git")
+ portagePath = pathJoin(self.assemblePath,'usr/portage')
+ gitConfig = pathJoin(portagePath, '.git/config')
+ # check for repository contains .git and
+ # this git from cl_assemble_sync url
+ reUrl = re.compile('url\s*=\s*(.*)')
+ gitUrl = reUrl.search(readFile(gitConfig))
+ # need remove portage and reget from sync address
+ self.printMessageForTest(_("Fetching portages"))
+ if not gitUrl or \
+ gitUrl.group(1).strip() != self.clVars.Get('cl_assemble_sync'):
+ if path.exists(portagePath):
+ removeDir(portagePath)
+ getPortage = "git clone --depth 1 -n {gitrep} {portage}".format(
+ gitrep=self.clVars.Get('cl_assemble_sync'),
+ portage='/usr/portage')
+ self.runChroot(getPortage)
+ else:
+ getPortage = "cd {portage};git fetch".format(
+ gitrep=self.clVars.Get('cl_assemble_sync'),
+ portage='/usr/portage')
+ self.runChroot(getPortage)
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/usr/portage',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
+
+ portagePkg = getPkgInstalled('sys-apps/portage',
+ prefix=self.assemblePath)
+ portageMinVer = getTupleVersion('2.2.0_alpha72')
+ if portagePkg and \
+ getTupleVersion(portagePkg[0]['PVR']) < portageMinVer:
+ lastEbuild = \
+ sorted(
+ map(lambda x:(x['P'],
+ getTupleVersion(x['PVR'])),
+ map(lambda x:reVerSplitToPV(x),
+ filter(lambda x:x.endswith('ebuild'),
+ listDirectory(pathJoin(self.assemblePath,
+ 'usr/portage/sys-apps/portage'))
+ ))),key=lambda x:x[1])
+ if len(lastEbuild) > 1:
+ lastEbuild = lastEbuild[-2][0]
+ else:
+ return
+ self.printMessageForTest(_("Installing %s")%"portage")
+ emergePortage = \
+ 'ebuild /usr/portage/sys-apps/portage/%s digest merge'% \
+ lastEbuild
+ self.runChroot(emergePortage)
+ restoreManifest = \
+ 'cd /usr/portage;git checkout sys-apps'
+ self.runChroot(restoreManifest)
+ else:
+ portagePath = pathJoin(self.assemblePath,'usr/portage')
+ gitConfig = pathJoin(portagePath, '.git/config')
+ if path.exists(gitConfig):
+ removeDir(portagePath)
+ if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ pathOverlay = pathJoin(self.assemblePath,'var/lib/layman/calculate')
+ if path.exists(pathOverlay):
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/var/lib/layman/calculate',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
+
def _updatePackages(self):
"""Update portage and calculate overlay"""
+ self._migratePortage()
emergeSync = "emerge --sync"
self.printMessageForTest(_("Updating portages"))
self.runChroot(emergeSync)
@@ -525,6 +610,11 @@ class cl_assemble(color_print):
else:
self.runChroot("layman -L")
self.runChroot("layman -a calculate")
+ if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/var/lib/layman/calculate',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
def _updateMan(self):
"""Remove man, install man-db"""
@@ -610,7 +700,8 @@ class cl_assemble(color_print):
pathAppMisc = pathJoin(self.assemblePath,'/var/db/pkg/app-misc')
metaPackage = self.clVars.Get('cl_assemble_meta').rpartition('/')[2]
- if not isinstance(self.sourceDistr,IsoDistributive):
+ if not isinstance(self.sourceDistr,IsoDistributive) and \
+ self.clVars.Get('cl_assemble_branch') == '':
self._unpackPortage()
self._prepareMount()
@@ -738,10 +829,14 @@ class cl_assemble(color_print):
def setSyncMirror(self,mirror):
"""Set sync mirror"""
- reMirror = re.compile("^(rsync:)?/?/?([^:]+)$",re.S)
+ reMirror = re.compile("^(rsync:|git:)?/?/?([^:]+)$",re.S)
res = reMirror.search(mirror)
if res:
- self.clVars.Set('cl_assemble_sync',"//%s"%res.groups()[1],True)
+ if res.groups()[0] == "git:":
+ self.clVars.Set('cl_assemble_sync',"git://%s"%res.groups()[1],True)
+ else:
+ self.clVars.Set('cl_assemble_sync',"//%s"%res.groups()[1],True)
+ self.clVars.Set('cl_assemble_branch','',True)
return True
else:
return False
@@ -838,7 +933,7 @@ class cl_assemble(color_print):
% "Calculate Linux")
self.printConfInfo()
- command = "emerge -pv %s"%(self.clVars.Get('cl_assemble_meta') or
+ command = "emerge -puNv %s %s"%(self.clVars.Get('cl_assemble_meta'),
"world")
self.printSUCCESS(_("Checking dependencies")+ " ...")
if self.runChroot(command, showProcess=True,
@@ -932,6 +1027,10 @@ class cl_assemble(color_print):
self.printSUCCESS(_("Compiling %s assemble") % "Calculate Linux")
else:
self.printSUCCESS(_("Updating %s assemble") % "Calculate Linux")
+
+ rsyncServer = self.clVars.Get('cl_assemble_sync')
+ self.setSyncMirror(rsyncServer)
+
self.printConfInfo()
self.defaultPrint("%s\n"%_("Checking up before compilation"))
@@ -1267,6 +1366,21 @@ class cl_assemble(color_print):
_("An error occurred when executing the command")+
":\n %s"%self._getCommand(cmd.command))
+ def modulesRebuild(self):
+ """Run revdep-rebuild and check result"""
+ if not self.assemblePath:
+ self.assemblePath = \
+ self.clVars.Get('cl_assemble_path')
+ modulesFile = path.join(self.assemblePath,
+ "var/lib/module-rebuild/moduledb")
+ # if file exists and not empty
+ if path.exists(modulesFile) and open(modulesFile,'r').read().strip():
+ cmd = self.runChroot("module-rebuild -X rebuild", showProcess=True)
+ if cmd.failed():
+ raise AssembleError(
+ _("An error occurred when executing the command")+
+ ":\n %s"%self._getCommand(cmd.command))
+
def setProfile(self,newprofile,isconfigure):
"""Set profile for assembling system"""
newprofile = newprofile or ""
@@ -1434,6 +1548,10 @@ class cl_assemble(color_print):
chrootPath = self.clVars.Get('cl_assemble_path')
distDir = '/usr/portage/distfiles'
pathDistDir = pathJoin(chrootPath,distDir)
+ if not path.exists(pathDistDir):
+ os.mkdir(pathDistDir)
+ os.chmod(pathDistDir,02775)
+ os.chown(pathDistDir,0,250)
if self.startMessage:
self.startMessage = ""
self.defaultPrint("\n")
diff --git pym/cl_assemble_cmd.py pym/cl_assemble_cmd.py
index 046a2d5..64ea758 100644
--- pym/cl_assemble_cmd.py
+++ pym/cl_assemble_cmd.py
@@ -34,7 +34,7 @@ DESCRIPTION = _("Configure for assembling Calculate Linux")
CMD_OPTIONS = [{'shortOption':"d",
'longOption':"disk",
'optVal':"DISK",
- 'help':_("partition intended for assemble")
+ 'help':_("partition or directory intended for assemble")
},
{'shortOption':"p",
'longOption':"profile",
@@ -65,10 +65,10 @@ CMD_OPTIONS = [{'shortOption':"d",
},
{'longOption':"sync",
'optVal':"RSYNC",
- 'help':_("set the preferred rsync mirror for Portage")
+ 'help':_("set the preferred mirror for Portage")
},
- {'longOption':"no-unmount",
- 'help':_("do not unmount the partition where the system"
+ {'longOption':"unmount",
+ 'help':_("unmount the partition where the system"
" is being assembled, when an error occurs")
},
{'longOption':"no-buildpkg",
@@ -126,7 +126,7 @@ class assemble_cmd(share_cmd):
rootDev in self.logicObj.clVars.Get('cl_assemble_dev')) and \
not self.logicObj.tryUseAvailable():
self.optobj.error(
- _("disk must be specified with the '-d' option"))
+ _("partition must be specified with the '-d' option"))
if values.d:
self.logicObj.clVars.Set('os_assemble_root_dev',values.d,True)
if values.sync:
diff --git pym/cl_fill_assemble.py pym/cl_fill_assemble.py
index 98dcc12..a3f254d 100644
--- pym/cl_fill_assemble.py
+++ pym/cl_fill_assemble.py
@@ -339,6 +339,15 @@ class fillVars(installFillVars):
val = self.getValueFromConfig(makepath,"SYNC")
if val != False:
return val[6:]
+ return "git://git.calculate.ru/dev/portage.git"
+
+ def get_cl_assemble_branch(self):
+ """Preferred branch of git portage mirror"""
+ fromEnv = self._getFromEnv('cl_assemble_branch')
+ if fromEnv:
+ return fromEnv
+ if self.Get('cl_assemble_sync').startswith('git:'):
+ return "master"
return ""
def get_cl_assemble_source(self):
diff --git pym/cl_make_cmd.py pym/cl_make_cmd.py
index 63aa9c3..2728edd 100644
--- pym/cl_make_cmd.py
+++ pym/cl_make_cmd.py
@@ -55,6 +55,10 @@ CMD_OPTIONS = [{'shortOption':"D",
'optVal':"PROFILE",
'help':_("system profile ('list' to display all)")
},
+ {'longOption':"sync",
+ 'optVal':"PORTAGE",
+ 'help':_("set the preferred mirror for Portage")
+ },
{'longOption':"skipfirst",
'help':_("skip the first package when resuming the assemble")
},
@@ -123,6 +127,10 @@ class make_cmd(assemble_cmd):
_("action must be specified: make (-m), break (--break),"
" update (-u|-U), apply templates (-T)"
" or check dependencies (-D)"))
+ if values.sync:
+ if not self.logicObj.setSyncMirror(values.sync):
+ self.optobj.error(
+ _("wrong rsync mirror '%s'")%values.sync)
return (values, args)
def setAction(self):
diff --git pym/cl_vars_assemble.py pym/cl_vars_assemble.py
index 84592ac..693c5d5 100644
--- pym/cl_vars_assemble.py
+++ pym/cl_vars_assemble.py
@@ -54,6 +54,9 @@ class Data:
# preferred rsync mirror for portages
cl_assemble_sync = {}
+ # preferred git branch for portages
+ cl_assemble_branch = {'mode':'w'}
+
# type of source (stage of system name)
cl_assemble_source = {}
diff --git scripts/cl-assemble scripts/cl-assemble
index 0f15f75..201fada 100644
--- scripts/cl-assemble
+++ scripts/cl-assemble
@@ -52,6 +52,6 @@ if __name__ == "__main__":
sys.exit(0)
if assemble.isScratch():
sys.exit(1)
- if not assemble.configureSystem(options.f,options.no_unmount):
+ if not assemble.configureSystem(options.f,not options.unmount):
sys.exit(1)
sys.exit(0)

@ -1,377 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index 7b88b52..9187bda 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -25,7 +25,8 @@ from os import path
from cl_template import template,iniParser
from cl_utils import process,pathJoin,getRunCommands,getTupleVersion,isMount,\
isFstabMount,childMounts,_toUNICODE,cmpVersion, \
- listDirectory
+ listDirectory, readFile, removeDir, getPkgInstalled, \
+ getTupleVersion, isPkgInstalled,reVerSplitToPV
from subprocess import STDOUT,PIPE
from cl_print import color_print
from cl_datavars import DataVars
@@ -122,6 +123,12 @@ class cl_assemble(color_print):
'hideout':True,
'message':_("Configuring with %s templates")% "assemble"
},
+ {'command':"_migratePortage()",
+ 'foraction':('syncupdate',),
+ 'step':"migrate",
+ 'hideout':True,
+ 'message':_("Checking portage repository")
+ },
{'command':'eix-sync',
'progname':'eix-sync',
'message':_("Updating portages"),
@@ -141,20 +148,23 @@ class cl_assemble(color_print):
'progname':'perl-cleaner'},
# install meta package
{'command':'emerge --noreplace calculate-meta',
+ 'checkcommand':'find /var/db/pkg/app-misc -name "calculate-meta*"',
+ 'condition':'^$',
'step':'meta'},
# update packages with fix newuse
- {'command':'emerge -D --newuse world',
- 'step':'newuse'},
+ #{'command':'emerge -D --newuse world',
+ # 'step':'newuse'},
# update world
- {'command':'emerge -uD world',
+ {'command':'emerge -uDN world',
'step':'update'},
# depclean
{'command':'emerge --depclean',
'step':'depclean'},
# module rebuild
- {'command':'module-rebuild -X rebuild',
+ {'command':'modulesRebuild()',
'step':'module',
'condition':'sys-kernel/.*source.*',
+ 'message':_("Executing '%s'")%'module-rebuild -X rebuild',
'progname':'module-rebuild'},
# xorg module rebuild
{'command':'emerge @x11-module-rebuild',
@@ -329,11 +339,12 @@ class cl_assemble(color_print):
self.printSUCCESS(_("File system: %s")%
self.clVars.Get('os_assemble_root_format'))
if self.clVars.Get('cl_assemble_sync'):
- self.printSUCCESS(_("Portage rsync mirror: %s")%
+ self.printSUCCESS(_("Portage mirror: %s")%
self.clVars.Get('cl_assemble_sync'))
self.printSUCCESS(_("Stage for assembling: %s")%
(self.clVars.Get('cl_assemble_image') or _("none")))
- if self.clVars.Get('cl_assemble_image_type') == "stage":
+ if self.clVars.Get('cl_assemble_image_type') == "stage" and \
+ self.clVars.Get('cl_assemble_branch') == '':
self.printSUCCESS(_("Portage snapshot for assemble: %s")%
(self.clVars.Get('cl_assemble_snapshot_portage') or _("none")))
self.defaultPrint("%s\n"%_("Checking up before assemble"))
@@ -382,6 +393,8 @@ class cl_assemble(color_print):
return True
def preassembleCheckups(self):
+ rsyncServer = self.clVars.Get('cl_assemble_sync')
+ self.setSyncMirror(rsyncServer)
if re.match(r'^i.86$',self.clVars.Get('os_arch_machine'),re.S):
if self.clVars.Get('os_assemble_arch_machine') in ('x86_64','ia64'):
self.printERROR(
@@ -463,6 +476,7 @@ class cl_assemble(color_print):
'os_assemble_root_dev',
'cl_assemble_path',
'cl_assemble_sync',
+ 'cl_assemble_branch',
'cl_assemble_buildpkg_set',
'cl_assemble_pkgdir')
@@ -509,8 +523,80 @@ class cl_assemble(color_print):
DirectoryDistributive(target,parent=self.targetDistr)
self.printByResult(True)
+ def _migratePortage(self):
+ if self.clVars.Get('cl_assemble_branch'):
+ if not isPkgInstalled('dev-vcs/git'):
+ self.printMessageForTest(_("Installing %s")%'dev-vcs/git')
+ self.runChroot("emerge -1 git")
+ portagePath = pathJoin(self.assemblePath,'usr/portage')
+ gitConfig = pathJoin(portagePath, '.git/config')
+ # check for repository contains .git and
+ # this git from cl_assemble_sync url
+ reUrl = re.compile('url\s*=\s*(.*)')
+ gitUrl = reUrl.search(readFile(gitConfig))
+ # need remove portage and reget from sync address
+ self.printMessageForTest(_("Fetching portages"))
+ if not gitUrl or \
+ gitUrl.group(1).strip() != self.clVars.Get('cl_assemble_sync'):
+ if path.exists(portagePath):
+ removeDir(portagePath)
+ getPortage = "git clone --depth 1 -n {gitrep} {portage}".format(
+ gitrep=self.clVars.Get('cl_assemble_sync'),
+ portage='/usr/portage')
+ self.runChroot(getPortage)
+ else:
+ getPortage = "cd {portage};git fetch".format(
+ gitrep=self.clVars.Get('cl_assemble_sync'),
+ portage='/usr/portage')
+ self.runChroot(getPortage)
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/usr/portage',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
+
+ portagePkg = getPkgInstalled('sys-apps/portage',
+ prefix=self.assemblePath)
+ portageMinVer = getTupleVersion('2.2.0_alpha72')
+ if portagePkg and \
+ getTupleVersion(portagePkg[0]['PVR']) < portageMinVer:
+ lastEbuild = \
+ sorted(
+ map(lambda x:(x['P'],
+ getTupleVersion(x['PVR'])),
+ map(lambda x:reVerSplitToPV(x),
+ filter(lambda x:x.endswith('ebuild'),
+ listDirectory(pathJoin(self.assemblePath,
+ 'usr/portage/sys-apps/portage'))
+ ))),key=lambda x:x[1])
+ if len(lastEbuild) > 1:
+ lastEbuild = lastEbuild[-2][0]
+ else:
+ return
+ self.printMessageForTest(_("Installing %s")%"portage")
+ emergePortage = \
+ 'ebuild /usr/portage/sys-apps/portage/%s digest merge'% \
+ lastEbuild
+ self.runChroot(emergePortage)
+ restoreManifest = \
+ 'cd /usr/portage;git checkout sys-apps'
+ self.runChroot(restoreManifest)
+ else:
+ portagePath = pathJoin(self.assemblePath,'usr/portage')
+ gitConfig = pathJoin(portagePath, '.git/config')
+ if path.exists(gitConfig):
+ removeDir(portagePath)
+ if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ pathOverlay = pathJoin(self.assemblePath,'var/lib/layman/calculate')
+ if path.exists(pathOverlay):
+ updateBranch= \
+ "cd {portage};git pull;git checkout {branch}".format(
+ portage='/var/lib/layman/calculate',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
+
def _updatePackages(self):
"""Update portage and calculate overlay"""
+ self._migratePortage()
emergeSync = "emerge --sync"
self.printMessageForTest(_("Updating portages"))
self.runChroot(emergeSync)
@@ -525,6 +611,11 @@ class cl_assemble(color_print):
else:
self.runChroot("layman -L")
self.runChroot("layman -a calculate")
+ if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/var/lib/layman/calculate',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
def _updateMan(self):
"""Remove man, install man-db"""
@@ -610,7 +701,8 @@ class cl_assemble(color_print):
pathAppMisc = pathJoin(self.assemblePath,'/var/db/pkg/app-misc')
metaPackage = self.clVars.Get('cl_assemble_meta').rpartition('/')[2]
- if not isinstance(self.sourceDistr,IsoDistributive):
+ if not isinstance(self.sourceDistr,IsoDistributive) and \
+ self.clVars.Get('cl_assemble_branch') == '':
self._unpackPortage()
self._prepareMount()
@@ -738,10 +830,14 @@ class cl_assemble(color_print):
def setSyncMirror(self,mirror):
"""Set sync mirror"""
- reMirror = re.compile("^(rsync:)?/?/?([^:]+)$",re.S)
+ reMirror = re.compile("^(rsync:|git:)?/?/?([^:]+)$",re.S)
res = reMirror.search(mirror)
if res:
- self.clVars.Set('cl_assemble_sync',"//%s"%res.groups()[1],True)
+ if res.groups()[0] == "git:":
+ self.clVars.Set('cl_assemble_sync',"git://%s"%res.groups()[1],True)
+ else:
+ self.clVars.Set('cl_assemble_sync',"//%s"%res.groups()[1],True)
+ self.clVars.Set('cl_assemble_branch','',True)
return True
else:
return False
@@ -838,7 +934,7 @@ class cl_assemble(color_print):
% "Calculate Linux")
self.printConfInfo()
- command = "emerge -pv %s"%(self.clVars.Get('cl_assemble_meta') or
+ command = "emerge -puNv %s %s"%(self.clVars.Get('cl_assemble_meta'),
"world")
self.printSUCCESS(_("Checking dependencies")+ " ...")
if self.runChroot(command, showProcess=True,
@@ -932,6 +1028,10 @@ class cl_assemble(color_print):
self.printSUCCESS(_("Compiling %s assemble") % "Calculate Linux")
else:
self.printSUCCESS(_("Updating %s assemble") % "Calculate Linux")
+
+ rsyncServer = self.clVars.Get('cl_assemble_sync')
+ self.setSyncMirror(rsyncServer)
+
self.printConfInfo()
self.defaultPrint("%s\n"%_("Checking up before compilation"))
@@ -1096,7 +1196,7 @@ class cl_assemble(color_print):
command = command % tuple(map(lambda x:self.clVars.Get(x),
action["args"]))
suffix = ""
- if "condition" in action and not "checkcommand" in action:
+ if "condition" in action:
suffix += "*"
showLegend = True
if dontRepeatCompleted and action["step"] in stepWorld:
@@ -1267,6 +1367,21 @@ class cl_assemble(color_print):
_("An error occurred when executing the command")+
":\n %s"%self._getCommand(cmd.command))
+ def modulesRebuild(self):
+ """Run revdep-rebuild and check result"""
+ if not self.assemblePath:
+ self.assemblePath = \
+ self.clVars.Get('cl_assemble_path')
+ modulesFile = path.join(self.assemblePath,
+ "var/lib/module-rebuild/moduledb")
+ # if file exists and not empty
+ if path.exists(modulesFile) and open(modulesFile,'r').read().strip():
+ cmd = self.runChroot("module-rebuild -X rebuild", showProcess=True)
+ if cmd.failed():
+ raise AssembleError(
+ _("An error occurred when executing the command")+
+ ":\n %s"%self._getCommand(cmd.command))
+
def setProfile(self,newprofile,isconfigure):
"""Set profile for assembling system"""
newprofile = newprofile or ""
@@ -1434,6 +1549,10 @@ class cl_assemble(color_print):
chrootPath = self.clVars.Get('cl_assemble_path')
distDir = '/usr/portage/distfiles'
pathDistDir = pathJoin(chrootPath,distDir)
+ if not path.exists(pathDistDir):
+ os.mkdir(pathDistDir)
+ os.chmod(pathDistDir,02775)
+ os.chown(pathDistDir,0,250)
if self.startMessage:
self.startMessage = ""
self.defaultPrint("\n")
diff --git pym/cl_assemble_cmd.py pym/cl_assemble_cmd.py
index 046a2d5..64ea758 100644
--- pym/cl_assemble_cmd.py
+++ pym/cl_assemble_cmd.py
@@ -34,7 +34,7 @@ DESCRIPTION = _("Configure for assembling Calculate Linux")
CMD_OPTIONS = [{'shortOption':"d",
'longOption':"disk",
'optVal':"DISK",
- 'help':_("partition intended for assemble")
+ 'help':_("partition or directory intended for assemble")
},
{'shortOption':"p",
'longOption':"profile",
@@ -65,10 +65,10 @@ CMD_OPTIONS = [{'shortOption':"d",
},
{'longOption':"sync",
'optVal':"RSYNC",
- 'help':_("set the preferred rsync mirror for Portage")
+ 'help':_("set the preferred mirror for Portage")
},
- {'longOption':"no-unmount",
- 'help':_("do not unmount the partition where the system"
+ {'longOption':"unmount",
+ 'help':_("unmount the partition where the system"
" is being assembled, when an error occurs")
},
{'longOption':"no-buildpkg",
@@ -126,7 +126,7 @@ class assemble_cmd(share_cmd):
rootDev in self.logicObj.clVars.Get('cl_assemble_dev')) and \
not self.logicObj.tryUseAvailable():
self.optobj.error(
- _("disk must be specified with the '-d' option"))
+ _("partition must be specified with the '-d' option"))
if values.d:
self.logicObj.clVars.Set('os_assemble_root_dev',values.d,True)
if values.sync:
diff --git pym/cl_fill_assemble.py pym/cl_fill_assemble.py
index 98dcc12..a3f254d 100644
--- pym/cl_fill_assemble.py
+++ pym/cl_fill_assemble.py
@@ -339,6 +339,15 @@ class fillVars(installFillVars):
val = self.getValueFromConfig(makepath,"SYNC")
if val != False:
return val[6:]
+ return "git://git.calculate.ru/dev/portage.git"
+
+ def get_cl_assemble_branch(self):
+ """Preferred branch of git portage mirror"""
+ fromEnv = self._getFromEnv('cl_assemble_branch')
+ if fromEnv:
+ return fromEnv
+ if self.Get('cl_assemble_sync').startswith('git:'):
+ return "master"
return ""
def get_cl_assemble_source(self):
diff --git pym/cl_make_cmd.py pym/cl_make_cmd.py
index 63aa9c3..2728edd 100644
--- pym/cl_make_cmd.py
+++ pym/cl_make_cmd.py
@@ -55,6 +55,10 @@ CMD_OPTIONS = [{'shortOption':"D",
'optVal':"PROFILE",
'help':_("system profile ('list' to display all)")
},
+ {'longOption':"sync",
+ 'optVal':"PORTAGE",
+ 'help':_("set the preferred mirror for Portage")
+ },
{'longOption':"skipfirst",
'help':_("skip the first package when resuming the assemble")
},
@@ -123,6 +127,10 @@ class make_cmd(assemble_cmd):
_("action must be specified: make (-m), break (--break),"
" update (-u|-U), apply templates (-T)"
" or check dependencies (-D)"))
+ if values.sync:
+ if not self.logicObj.setSyncMirror(values.sync):
+ self.optobj.error(
+ _("wrong rsync mirror '%s'")%values.sync)
return (values, args)
def setAction(self):
diff --git pym/cl_vars_assemble.py pym/cl_vars_assemble.py
index 84592ac..693c5d5 100644
--- pym/cl_vars_assemble.py
+++ pym/cl_vars_assemble.py
@@ -54,6 +54,9 @@ class Data:
# preferred rsync mirror for portages
cl_assemble_sync = {}
+ # preferred git branch for portages
+ cl_assemble_branch = {'mode':'w'}
+
# type of source (stage of system name)
cl_assemble_source = {}
diff --git scripts/cl-assemble scripts/cl-assemble
index 0f15f75..201fada 100644
--- scripts/cl-assemble
+++ scripts/cl-assemble
@@ -52,6 +52,6 @@ if __name__ == "__main__":
sys.exit(0)
if assemble.isScratch():
sys.exit(1)
- if not assemble.configureSystem(options.f,options.no_unmount):
+ if not assemble.configureSystem(options.f,not options.unmount):
sys.exit(1)
sys.exit(0)

@ -1,386 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index 7b88b52..5815fa3 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -25,7 +25,8 @@ from os import path
from cl_template import template,iniParser
from cl_utils import process,pathJoin,getRunCommands,getTupleVersion,isMount,\
isFstabMount,childMounts,_toUNICODE,cmpVersion, \
- listDirectory
+ listDirectory, readFile, removeDir, getPkgInstalled, \
+ getTupleVersion, isPkgInstalled,reVerSplitToPV
from subprocess import STDOUT,PIPE
from cl_print import color_print
from cl_datavars import DataVars
@@ -122,6 +123,12 @@ class cl_assemble(color_print):
'hideout':True,
'message':_("Configuring with %s templates")% "assemble"
},
+ {'command':"_migratePortage()",
+ 'foraction':('syncupdate',),
+ 'step':"migrate",
+ 'hideout':True,
+ 'message':_("Checking portage repository")
+ },
{'command':'eix-sync',
'progname':'eix-sync',
'message':_("Updating portages"),
@@ -141,20 +148,23 @@ class cl_assemble(color_print):
'progname':'perl-cleaner'},
# install meta package
{'command':'emerge --noreplace calculate-meta',
+ 'checkcommand':'find /var/db/pkg/app-misc -name "calculate-meta*"',
+ 'condition':'^$',
'step':'meta'},
# update packages with fix newuse
- {'command':'emerge -D --newuse world',
- 'step':'newuse'},
+ #{'command':'emerge -D --newuse world',
+ # 'step':'newuse'},
# update world
- {'command':'emerge -uD world',
+ {'command':'emerge -uDN world',
'step':'update'},
# depclean
{'command':'emerge --depclean',
'step':'depclean'},
# module rebuild
- {'command':'module-rebuild -X rebuild',
+ {'command':'modulesRebuild()',
'step':'module',
'condition':'sys-kernel/.*source.*',
+ 'message':_("Executing '%s'")%'module-rebuild -X rebuild',
'progname':'module-rebuild'},
# xorg module rebuild
{'command':'emerge @x11-module-rebuild',
@@ -329,11 +339,12 @@ class cl_assemble(color_print):
self.printSUCCESS(_("File system: %s")%
self.clVars.Get('os_assemble_root_format'))
if self.clVars.Get('cl_assemble_sync'):
- self.printSUCCESS(_("Portage rsync mirror: %s")%
+ self.printSUCCESS(_("Portage mirror: %s")%
self.clVars.Get('cl_assemble_sync'))
self.printSUCCESS(_("Stage for assembling: %s")%
(self.clVars.Get('cl_assemble_image') or _("none")))
- if self.clVars.Get('cl_assemble_image_type') == "stage":
+ if self.clVars.Get('cl_assemble_image_type') == "stage" and \
+ self.clVars.Get('cl_assemble_branch') == '':
self.printSUCCESS(_("Portage snapshot for assemble: %s")%
(self.clVars.Get('cl_assemble_snapshot_portage') or _("none")))
self.defaultPrint("%s\n"%_("Checking up before assemble"))
@@ -382,6 +393,8 @@ class cl_assemble(color_print):
return True
def preassembleCheckups(self):
+ rsyncServer = self.clVars.Get('cl_assemble_sync')
+ self.setSyncMirror(rsyncServer)
if re.match(r'^i.86$',self.clVars.Get('os_arch_machine'),re.S):
if self.clVars.Get('os_assemble_arch_machine') in ('x86_64','ia64'):
self.printERROR(
@@ -463,6 +476,7 @@ class cl_assemble(color_print):
'os_assemble_root_dev',
'cl_assemble_path',
'cl_assemble_sync',
+ 'cl_assemble_branch',
'cl_assemble_buildpkg_set',
'cl_assemble_pkgdir')
@@ -509,8 +523,80 @@ class cl_assemble(color_print):
DirectoryDistributive(target,parent=self.targetDistr)
self.printByResult(True)
+ def _migratePortage(self):
+ if self.clVars.Get('cl_assemble_branch'):
+ if not isPkgInstalled('dev-vcs/git'):
+ self.printMessageForTest(_("Installing %s")%'dev-vcs/git')
+ self.runChroot("emerge -1 git")
+ portagePath = pathJoin(self.assemblePath,'usr/portage')
+ gitConfig = pathJoin(portagePath, '.git/config')
+ # check for repository contains .git and
+ # this git from cl_assemble_sync url
+ reUrl = re.compile('url\s*=\s*(.*)')
+ gitUrl = reUrl.search(readFile(gitConfig))
+ # need remove portage and reget from sync address
+ self.printMessageForTest(_("Fetching portages"))
+ if not gitUrl or \
+ gitUrl.group(1).strip() != self.clVars.Get('cl_assemble_sync'):
+ if path.exists(portagePath):
+ removeDir(portagePath)
+ getPortage = "git clone --depth 1 -n {gitrep} {portage}".format(
+ gitrep=self.clVars.Get('cl_assemble_sync'),
+ portage='/usr/portage')
+ self.runChroot(getPortage)
+ else:
+ getPortage = "cd {portage};git fetch".format(
+ gitrep=self.clVars.Get('cl_assemble_sync'),
+ portage='/usr/portage')
+ self.runChroot(getPortage)
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/usr/portage',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
+
+ portagePkg = getPkgInstalled('sys-apps/portage',
+ prefix=self.assemblePath)
+ portageMinVer = getTupleVersion('2.2.0_alpha72')
+ if portagePkg and \
+ getTupleVersion(portagePkg[0]['PVR']) < portageMinVer:
+ lastEbuild = \
+ sorted(
+ map(lambda x:(x['P'],
+ getTupleVersion(x['PVR'])),
+ map(lambda x:reVerSplitToPV(x),
+ filter(lambda x:x.endswith('ebuild'),
+ listDirectory(pathJoin(self.assemblePath,
+ 'usr/portage/sys-apps/portage'))
+ ))),key=lambda x:x[1])
+ if len(lastEbuild) > 1:
+ lastEbuild = lastEbuild[-2][0]
+ else:
+ return
+ self.printMessageForTest(_("Installing %s")%"portage")
+ emergePortage = \
+ 'ebuild /usr/portage/sys-apps/portage/%s digest merge'% \
+ lastEbuild
+ self.runChroot(emergePortage)
+ restoreManifest = \
+ 'cd /usr/portage;git checkout sys-apps'
+ self.runChroot(restoreManifest)
+ else:
+ portagePath = pathJoin(self.assemblePath,'usr/portage')
+ gitConfig = pathJoin(portagePath, '.git/config')
+ if path.exists(gitConfig):
+ removeDir(portagePath)
+ if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ pathOverlay = pathJoin(self.assemblePath,'var/lib/layman/calculate')
+ if path.exists(pathOverlay):
+ updateBranch= \
+ "cd {portage};git pull;git checkout {branch}".format(
+ portage='/var/lib/layman/calculate',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
+
def _updatePackages(self):
"""Update portage and calculate overlay"""
+ self._migratePortage()
emergeSync = "emerge --sync"
self.printMessageForTest(_("Updating portages"))
self.runChroot(emergeSync)
@@ -525,6 +611,11 @@ class cl_assemble(color_print):
else:
self.runChroot("layman -L")
self.runChroot("layman -a calculate")
+ if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ updateBranch= "cd {portage};git checkout {branch}".format(
+ portage='/var/lib/layman/calculate',
+ branch=self.clVars.Get('cl_assemble_branch'))
+ self.runChroot(updateBranch)
def _updateMan(self):
"""Remove man, install man-db"""
@@ -610,7 +701,8 @@ class cl_assemble(color_print):
pathAppMisc = pathJoin(self.assemblePath,'/var/db/pkg/app-misc')
metaPackage = self.clVars.Get('cl_assemble_meta').rpartition('/')[2]
- if not isinstance(self.sourceDistr,IsoDistributive):
+ if not isinstance(self.sourceDistr,IsoDistributive) and \
+ self.clVars.Get('cl_assemble_branch') == '':
self._unpackPortage()
self._prepareMount()
@@ -738,10 +830,14 @@ class cl_assemble(color_print):
def setSyncMirror(self,mirror):
"""Set sync mirror"""
- reMirror = re.compile("^(rsync:)?/?/?([^:]+)$",re.S)
+ reMirror = re.compile("^(rsync:|git:)?/?/?([^:]+)$",re.S)
res = reMirror.search(mirror)
if res:
- self.clVars.Set('cl_assemble_sync',"//%s"%res.groups()[1],True)
+ if res.groups()[0] == "git:":
+ self.clVars.Set('cl_assemble_sync',"git://%s"%res.groups()[1],True)
+ else:
+ self.clVars.Set('cl_assemble_sync',"//%s"%res.groups()[1],True)
+ self.clVars.Set('cl_assemble_branch','',True)
return True
else:
return False
@@ -838,7 +934,7 @@ class cl_assemble(color_print):
% "Calculate Linux")
self.printConfInfo()
- command = "emerge -pv %s"%(self.clVars.Get('cl_assemble_meta') or
+ command = "emerge -puNv %s %s"%(self.clVars.Get('cl_assemble_meta'),
"world")
self.printSUCCESS(_("Checking dependencies")+ " ...")
if self.runChroot(command, showProcess=True,
@@ -932,6 +1028,10 @@ class cl_assemble(color_print):
self.printSUCCESS(_("Compiling %s assemble") % "Calculate Linux")
else:
self.printSUCCESS(_("Updating %s assemble") % "Calculate Linux")
+
+ rsyncServer = self.clVars.Get('cl_assemble_sync')
+ self.setSyncMirror(rsyncServer)
+
self.printConfInfo()
self.defaultPrint("%s\n"%_("Checking up before compilation"))
@@ -1096,7 +1196,7 @@ class cl_assemble(color_print):
command = command % tuple(map(lambda x:self.clVars.Get(x),
action["args"]))
suffix = ""
- if "condition" in action and not "checkcommand" in action:
+ if "condition" in action:
suffix += "*"
showLegend = True
if dontRepeatCompleted and action["step"] in stepWorld:
@@ -1267,6 +1367,21 @@ class cl_assemble(color_print):
_("An error occurred when executing the command")+
":\n %s"%self._getCommand(cmd.command))
+ def modulesRebuild(self):
+ """Run revdep-rebuild and check result"""
+ if not self.assemblePath:
+ self.assemblePath = \
+ self.clVars.Get('cl_assemble_path')
+ modulesFile = path.join(self.assemblePath,
+ "var/lib/module-rebuild/moduledb")
+ # if file exists and not empty
+ if path.exists(modulesFile) and open(modulesFile,'r').read().strip():
+ cmd = self.runChroot("module-rebuild -X rebuild", showProcess=True)
+ if cmd.failed():
+ raise AssembleError(
+ _("An error occurred when executing the command")+
+ ":\n %s"%self._getCommand(cmd.command))
+
def setProfile(self,newprofile,isconfigure):
"""Set profile for assembling system"""
newprofile = newprofile or ""
@@ -1434,6 +1549,10 @@ class cl_assemble(color_print):
chrootPath = self.clVars.Get('cl_assemble_path')
distDir = '/usr/portage/distfiles'
pathDistDir = pathJoin(chrootPath,distDir)
+ if not path.exists(pathDistDir):
+ os.mkdir(pathDistDir)
+ os.chmod(pathDistDir,02775)
+ os.chown(pathDistDir,0,250)
if self.startMessage:
self.startMessage = ""
self.defaultPrint("\n")
@@ -1492,7 +1611,7 @@ class cl_assemble(color_print):
_("Fetching %s")%"%s-%s"%(verName,nvidiaVersions))
# run verbose package emergin for get version
fetchprocess = self.runChroot(
- "emerge -f %s"%
+ "emerge -f --quiet-build=n %s"%
drvVer, raiseError=False,joinErr=True)
rePackage = re.compile(
"(?:^ \* (.*?) RMD160 SHA1|File.*is already locked)")
diff --git pym/cl_assemble_cmd.py pym/cl_assemble_cmd.py
index 046a2d5..64ea758 100644
--- pym/cl_assemble_cmd.py
+++ pym/cl_assemble_cmd.py
@@ -34,7 +34,7 @@ DESCRIPTION = _("Configure for assembling Calculate Linux")
CMD_OPTIONS = [{'shortOption':"d",
'longOption':"disk",
'optVal':"DISK",
- 'help':_("partition intended for assemble")
+ 'help':_("partition or directory intended for assemble")
},
{'shortOption':"p",
'longOption':"profile",
@@ -65,10 +65,10 @@ CMD_OPTIONS = [{'shortOption':"d",
},
{'longOption':"sync",
'optVal':"RSYNC",
- 'help':_("set the preferred rsync mirror for Portage")
+ 'help':_("set the preferred mirror for Portage")
},
- {'longOption':"no-unmount",
- 'help':_("do not unmount the partition where the system"
+ {'longOption':"unmount",
+ 'help':_("unmount the partition where the system"
" is being assembled, when an error occurs")
},
{'longOption':"no-buildpkg",
@@ -126,7 +126,7 @@ class assemble_cmd(share_cmd):
rootDev in self.logicObj.clVars.Get('cl_assemble_dev')) and \
not self.logicObj.tryUseAvailable():
self.optobj.error(
- _("disk must be specified with the '-d' option"))
+ _("partition must be specified with the '-d' option"))
if values.d:
self.logicObj.clVars.Set('os_assemble_root_dev',values.d,True)
if values.sync:
diff --git pym/cl_fill_assemble.py pym/cl_fill_assemble.py
index 98dcc12..1ebebae 100644
--- pym/cl_fill_assemble.py
+++ pym/cl_fill_assemble.py
@@ -339,6 +339,15 @@ class fillVars(installFillVars):
val = self.getValueFromConfig(makepath,"SYNC")
if val != False:
return val[6:]
+ return "git://git.calculate.ru/calculate/portage.git"
+
+ def get_cl_assemble_branch(self):
+ """Preferred branch of git portage mirror"""
+ fromEnv = self._getFromEnv('cl_assemble_branch')
+ if fromEnv:
+ return fromEnv
+ if self.Get('cl_assemble_sync').startswith('git:'):
+ return "master"
return ""
def get_cl_assemble_source(self):
diff --git pym/cl_make_cmd.py pym/cl_make_cmd.py
index 63aa9c3..2728edd 100644
--- pym/cl_make_cmd.py
+++ pym/cl_make_cmd.py
@@ -55,6 +55,10 @@ CMD_OPTIONS = [{'shortOption':"D",
'optVal':"PROFILE",
'help':_("system profile ('list' to display all)")
},
+ {'longOption':"sync",
+ 'optVal':"PORTAGE",
+ 'help':_("set the preferred mirror for Portage")
+ },
{'longOption':"skipfirst",
'help':_("skip the first package when resuming the assemble")
},
@@ -123,6 +127,10 @@ class make_cmd(assemble_cmd):
_("action must be specified: make (-m), break (--break),"
" update (-u|-U), apply templates (-T)"
" or check dependencies (-D)"))
+ if values.sync:
+ if not self.logicObj.setSyncMirror(values.sync):
+ self.optobj.error(
+ _("wrong rsync mirror '%s'")%values.sync)
return (values, args)
def setAction(self):
diff --git pym/cl_vars_assemble.py pym/cl_vars_assemble.py
index 84592ac..693c5d5 100644
--- pym/cl_vars_assemble.py
+++ pym/cl_vars_assemble.py
@@ -54,6 +54,9 @@ class Data:
# preferred rsync mirror for portages
cl_assemble_sync = {}
+ # preferred git branch for portages
+ cl_assemble_branch = {'mode':'w'}
+
# type of source (stage of system name)
cl_assemble_source = {}
diff --git scripts/cl-assemble scripts/cl-assemble
index 0f15f75..201fada 100644
--- scripts/cl-assemble
+++ scripts/cl-assemble
@@ -52,6 +52,6 @@ if __name__ == "__main__":
sys.exit(0)
if assemble.isScratch():
sys.exit(1)
- if not assemble.configureSystem(options.f,options.no_unmount):
+ if not assemble.configureSystem(options.f,not options.unmount):
sys.exit(1)
sys.exit(0)

@ -1,38 +0,0 @@
diff --git pym/cl_fill_assemble.py pym/cl_fill_assemble.py
index 29b543a..6947d0d 100644
--- pym/cl_fill_assemble.py
+++ pym/cl_fill_assemble.py
@@ -25,7 +25,7 @@ from cl_template import iniParser
from cl_fill_install import fillVars as installFillVars
from cl_vars import Data as libData
from cl_utils import (_toUNICODE,isMount,pathJoin,listDirectory,readFile,
- readLinesFile)
+ readLinesFile,getProgPath)
from datetime import datetime
class fillVars(installFillVars):
@@ -374,3 +374,11 @@ class fillVars(installFillVars):
if profile and profile.endswith(discardName):
return profile[:-len(discardName)]
return profile
+
+ def get_os_assemble_root_format(self):
+ """Get default file system format"""
+ for fs in ['ext4','reiserfs','ext3']:
+ mkfsUtil = "/sbin/mkfs.%s"%fs
+ if getProgPath(mkfsUtil):
+ return fs
+ return "ext2"
diff --git pym/cl_vars_assemble.py pym/cl_vars_assemble.py
index 693c5d5..0659b90 100644
--- pym/cl_vars_assemble.py
+++ pym/cl_vars_assemble.py
@@ -142,7 +142,7 @@ class Data:
os_assemble_root_dev = {}
# filesystem format of assemble partition
- os_assemble_root_format = {'mode':'w', 'value':'reiserfs'}
+ os_assemble_root_format = {'mode':'w'}
# infomation about disk in hash
os_device_hash = {'hide':True}

@ -1,59 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index f318460..91cc740 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -203,11 +203,11 @@ class cl_assemble(color_print):
'hideout':True
},
# creating mask,unmask list
- {'command':'createMaskUnmaskList()',
- 'step':'maskunmask',
- 'message':_("Creating mask/unmask/use lists"),
- 'hideout':True
- },
+ #{'command':'createMaskUnmaskList()',
+ # 'step':'maskunmask',
+ # 'message':_("Creating mask/unmask/use lists"),
+ # 'hideout':True
+ #},
# update eix base
{'command':'eix-update',
'step':'eixupdate',
diff --git pym/cl_fill_assemble.py pym/cl_fill_assemble.py
index 29b543a..6947d0d 100644
--- pym/cl_fill_assemble.py
+++ pym/cl_fill_assemble.py
@@ -25,7 +25,7 @@ from cl_template import iniParser
from cl_fill_install import fillVars as installFillVars
from cl_vars import Data as libData
from cl_utils import (_toUNICODE,isMount,pathJoin,listDirectory,readFile,
- readLinesFile)
+ readLinesFile,getProgPath)
from datetime import datetime
class fillVars(installFillVars):
@@ -374,3 +374,11 @@ class fillVars(installFillVars):
if profile and profile.endswith(discardName):
return profile[:-len(discardName)]
return profile
+
+ def get_os_assemble_root_format(self):
+ """Get default file system format"""
+ for fs in ['ext4','reiserfs','ext3']:
+ mkfsUtil = "/sbin/mkfs.%s"%fs
+ if getProgPath(mkfsUtil):
+ return fs
+ return "ext2"
diff --git pym/cl_vars_assemble.py pym/cl_vars_assemble.py
index 693c5d5..0659b90 100644
--- pym/cl_vars_assemble.py
+++ pym/cl_vars_assemble.py
@@ -142,7 +142,7 @@ class Data:
os_assemble_root_dev = {}
# filesystem format of assemble partition
- os_assemble_root_format = {'mode':'w', 'value':'reiserfs'}
+ os_assemble_root_format = {'mode':'w'}
# infomation about disk in hash
os_device_hash = {'hide':True}

@ -1,41 +0,0 @@
commit 6442ff44c2667dc161588704138157927247423b
Author: Mike Hiretsky <mh@calculate.ru>
Date: Tue Jan 31 11:19:15 2012 +0400
Rename branch develop to update.
diff --git a/pym/cl_assemble.py b/pym/cl_assemble.py
index 55f3e68..68ccab1 100644
--- a/pym/cl_assemble.py
+++ b/pym/cl_assemble.py
@@ -585,7 +585,7 @@ class cl_assemble(color_print):
gitConfig = pathJoin(portagePath, '.git/config')
if path.exists(gitConfig):
removeDir(portagePath)
- if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ if self.clVars.Get('cl_assemble_branch') in ('master','update'):
pathOverlay = pathJoin(self.assemblePath,'var/lib/layman/calculate')
if path.exists(pathOverlay):
updateBranch= \
@@ -616,7 +616,7 @@ class cl_assemble(color_print):
else:
self.runChroot("layman -L")
self.runChroot("layman -a calculate")
- if self.clVars.Get('cl_assemble_branch') in ('master','develop'):
+ if self.clVars.Get('cl_assemble_branch') in ('master','update'):
updateBranch= "cd {portage};git checkout {branch}".format(
portage='/var/lib/layman/calculate',
branch=self.clVars.Get('cl_assemble_branch'))
diff --git a/pym/cl_fill_assemble.py b/pym/cl_fill_assemble.py
index 6947d0d..8467c6c 100644
--- a/pym/cl_fill_assemble.py
+++ b/pym/cl_fill_assemble.py
@@ -224,7 +224,7 @@ class fillVars(installFillVars):
return convert.get(arch,arch)
def get_os_assemble_system_profile(self):
- """Detect developer or stable profile"""
+ """Detect update or stable profile"""
makeProfileFile = '/etc/make.profile'
if self.Get('cl_action') in ('configure','setup') \
and path.exists(makeProfileFile):

@ -1,43 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index 4f7c5f8..f4bf767 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -388,7 +388,7 @@ class cl_assemble(color_print):
":\n")
for system in self.clVars.Get('cl_assemble_distro'):
self.printSUCCESS(self.__profileShortname(system))
- self.removeDistroInfo()
+ self.removeDistroInfo()
return False
return True
@@ -686,6 +686,7 @@ class cl_assemble(color_print):
self.sourceDistr = distRep.getDistributiveByFile(distName)
if not self._askUser(force, _("Continue system assemble")):
self.printERROR(_("Assemble interrupted"))
+ self.removeDistroInfo()
return False
self.writeVar('cl_assemble_make','configure')
# test /mnt
@@ -1504,10 +1505,11 @@ class cl_assemble(color_print):
assembleEnv = iniParser(self.assembleEnvFile)
discardEmpty = lambda x : filter(lambda y:y,x)
busyDevs = \
+ map(lambda x:x.encode('utf-8') if type(x) == unicode else x,
discardEmpty(
map(lambda x:assembleEnv.getVar(x,'os_assemble_root_dev'),
- distros))
- discardBusy = lambda x : filter(lambda y:not (x in busyDevs
+ distros)))
+ discardBusy = lambda x : filter(lambda y:not (y in busyDevs
or isMount(y)),x)
availableDev = self.clVars.Get('cl_assemble_available_dev').split(',')
availableDev = discardEmpty(availableDev)
@@ -1515,6 +1517,7 @@ class cl_assemble(color_print):
if freeDev:
rootDev = random.choice(freeDev)
self.clVars.Set('os_assemble_root_dev',rootDev,True)
+ self.saveVars('os_assemble_root_dev')
return True
return False

@ -1,66 +0,0 @@
diff --git pym/cl_assemble.py pym/cl_assemble.py
index 4f7c5f8..55f3e68 100644
--- pym/cl_assemble.py
+++ pym/cl_assemble.py
@@ -388,7 +388,7 @@ class cl_assemble(color_print):
":\n")
for system in self.clVars.Get('cl_assemble_distro'):
self.printSUCCESS(self.__profileShortname(system))
- self.removeDistroInfo()
+ self.removeDistroInfo()
return False
return True
@@ -605,6 +605,11 @@ class cl_assemble(color_print):
self.printMessageForTest(_("Installing %s")%"layman")
self.runChroot(emergeLayman)
+ # stage3 contains python-2.7 without USE="xml" need for layman
+ emergePython = "USE='xml' emerge -1 python:2.7"
+ self.printMessageForTest(_("Installing %s")%"python")
+ self.runChroot(emergePython)
+
self.printMessageForTest(_("Loading calculate overlay"))
if filter(lambda x:"calculate" in x,self.runChroot("layman -l")):
self.runChroot("layman -s calculate")
@@ -686,6 +691,7 @@ class cl_assemble(color_print):
self.sourceDistr = distRep.getDistributiveByFile(distName)
if not self._askUser(force, _("Continue system assemble")):
self.printERROR(_("Assemble interrupted"))
+ self.removeDistroInfo()
return False
self.writeVar('cl_assemble_make','configure')
# test /mnt
@@ -720,6 +726,10 @@ class cl_assemble(color_print):
self.printMessageForTest(
_("Enabling calculate-install to configure packages"))
if "calculate" in self.clVars.Get('os_assemble_system_profile'):
+ # emerge sys-apps/iproute2, because calculate-install
+ # need emerge with USE="minimal", but emerging
+ # will install iproute2 with USE="minimal" also
+ self.runChroot("emerge -1 sys-apps/iproute2")
self.runChroot("USE='minimal -pxe' emerge "
'sys-apps/calculate-install')
self.runChroot("cl-install --install")
@@ -1504,10 +1514,11 @@ class cl_assemble(color_print):
assembleEnv = iniParser(self.assembleEnvFile)
discardEmpty = lambda x : filter(lambda y:y,x)
busyDevs = \
+ map(lambda x:x.encode('utf-8') if type(x) == unicode else x,
discardEmpty(
map(lambda x:assembleEnv.getVar(x,'os_assemble_root_dev'),
- distros))
- discardBusy = lambda x : filter(lambda y:not (x in busyDevs
+ distros)))
+ discardBusy = lambda x : filter(lambda y:not (y in busyDevs
or isMount(y)),x)
availableDev = self.clVars.Get('cl_assemble_available_dev').split(',')
availableDev = discardEmpty(availableDev)
@@ -1515,6 +1526,7 @@ class cl_assemble(color_print):
if freeDev:
rootDev = random.choice(freeDev)
self.clVars.Set('os_assemble_root_dev',rootDev,True)
+ self.saveVars('os_assemble_root_dev')
return True
return False

@ -1,32 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.24
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix run chroot command, add ability use kernel config
# by profile suffix, fix creating iso by builder livecd
epatch "${FILESDIR}/calculate-builder-2.2.24-r4.patch"
}

@ -1,31 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.25
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Auto run cl-make -T
epatch "${FILESDIR}/calculate-builder-2.2.25-r1.patch"
}

@ -1,31 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.25
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Auto run cl-make -T, support git portages
epatch "${FILESDIR}/calculate-builder-2.2.25-r2.patch"
}

@ -1,31 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.25
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Auto run cl-make -T, support git portages
epatch "${FILESDIR}/calculate-builder-2.2.25-r3.patch"
}

@ -1,31 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.25
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Auto run cl-make -T, support git portages
epatch "${FILESDIR}/calculate-builder-2.2.25-r4.patch"
}

@ -1,31 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.25
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Auto run cl-make -T, support git portages
epatch "${FILESDIR}/calculate-builder-2.2.25-r5.patch"
}

@ -1,23 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.25
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"

@ -1,31 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.26
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# change init.d/calculate-builder
epatch "${FILESDIR}/calculate-builder-2.2.26-r1.patch"
}

@ -1,23 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.26
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"

@ -1,31 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.27
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix rescratch
epatch "${FILESDIR}/calculate-builder-2.2.27-r1.patch"
}

@ -1,31 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.27
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix rescratch, change update portage
epatch "${FILESDIR}/calculate-builder-2.2.27-r2.patch"
}

@ -1,31 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.27
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix rescratch, change update portage
epatch "${FILESDIR}/calculate-builder-2.2.27-r3.patch"
}

@ -1,31 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.27
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix rescratch, change update portage
epatch "${FILESDIR}/calculate-builder-2.2.27-r4.patch"
}

@ -1,33 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.27
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix rescratch, change update portage
epatch "${FILESDIR}/calculate-builder-2.2.27-r4.patch"
# fix remove --notree
epatch "${FILESDIR}/calculate-builder-2.2.27-fix_notree.patch"
}

@ -1,35 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.27
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix rescratch, change update portage
epatch "${FILESDIR}/calculate-builder-2.2.27-r4.patch"
# fix remove --notree
epatch "${FILESDIR}/calculate-builder-2.2.27-fix_notree.patch"
# fix branch rename
epatch "${FILESDIR}/calculate-builder-2.2.27-fix_branch_rename.patch"
}

@ -1,37 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.27
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix rescratch, change update portage
epatch "${FILESDIR}/calculate-builder-2.2.27-r4.patch"
# fix remove --notree
epatch "${FILESDIR}/calculate-builder-2.2.27-fix_notree.patch"
# fix branch rename
epatch "${FILESDIR}/calculate-builder-2.2.27-fix_branch_rename.patch"
# change branch for non binary distros
epatch "${FILESDIR}/calculate-builder-2.2.27-master_branch.patch"
}

@ -1,23 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for builder tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND=">=sys-kernel/calckernel-3.4.18
~sys-apps/calculate-install-2.2.27
!<sys-apps/calculate-1.4.0_p20100921
app-cdr/cdrkit
sys-fs/squashfs-tools"
RDEPEND="${DEPEND}"

@ -1,66 +0,0 @@
diff --git pym/cl_builder.py pym/cl_builder.py
index 4745b47..bece647 100644
--- pym/cl_builder.py
+++ pym/cl_builder.py
@@ -188,7 +188,11 @@ class cl_builder(color_print):
envdict.update(os.environ)
commandLine = ["chroot",chroot,
"/bin/bash","-c",command]
- chrootCommand = process(*commandLine,stderr=PIPE,
+ if self.clVars.Get('os_builder_arch_machine') != \
+ self.clVars.Get('os_arch_machine') and \
+ self.clVars.Get('os_arch_machine') == 'x86_64':
+ commandLine = ["linux32"]+commandLine
+ chrootCommand = process(*commandLine,stderr=STDOUT,
stdout=PIPE,envdict=envdict)
except KeyboardInterrupt:
chrootCommand.kill()
@@ -275,7 +279,6 @@ class cl_builder(color_print):
os.unlink(curProfileFile)
os.symlink(newProfile,curProfileFile)
-
def restoreProfile(self):
"""Restore profile"""
if not self.curProfile:
diff --git pym/cl_fill_builder.py pym/cl_fill_builder.py
index cb6744d..939be17 100644
--- pym/cl_fill_builder.py
+++ pym/cl_fill_builder.py
@@ -121,11 +121,26 @@ class fillVars(object, varsShare):
shortVer = shortVerSearch.group()
else:
return ""
+ # find best config
+ makeProfile = '/etc/make.profile'
+ profileSpec = ''
+ if path.islink(makeProfile):
+ linkTarget = os.readlink('/etc/make.profile')
+ parentDir, profileSpecification = path.split(linkTarget)
+ if parentDir.endswith('x86') or parentDir.endswith('amd64'):
+ profileSpec = profileSpecification
configName = "config-%(system)s-%(march)s-%(ver)s" % \
{'system':self.Get('os_linux_system'),
'march':self.Get('os_arch_machine'),
'ver':shortVer}
- if path.exists(path.join(kernelDirs,configName)):
+ configNameSpec = "config-%(system)s-%(march)s-%(ver)s-%(spec)s" % \
+ {'system':self.Get('os_linux_system'),
+ 'march':self.Get('os_arch_machine'),
+ 'ver':shortVer,
+ 'spec':profileSpec}
+ if profileSpec and path.exists(path.join(kernelDirs,configNameSpec)):
+ return path.join(kernelDirs,configNameSpec)
+ elif path.exists(path.join(kernelDirs,configName)):
return path.join(kernelDirs,configName)
return ""
@@ -328,7 +343,7 @@ class fillVars(object, varsShare):
"""
oldSquash = self.Get('cl_builder_old_squash')
reOldSquash = Distributive.reLive.search(oldSquash)
- if reOldSquash:
+ if self.Get('ac_builder_squash') == 'up' and reOldSquash:
newNum = self.getSquashNum(reOldSquash)+1
return "livecd.squashfs.%d"%newNum
else:

@ -1,15 +0,0 @@
diff --git pym/cl_builder.py pym/cl_builder.py
index 7a72d81..d4078a2 100644
--- pym/cl_builder.py
+++ pym/cl_builder.py
@@ -666,9 +666,7 @@ class cl_builder(color_print):
return False
self.printSUCCESS(_("System built successfully"))
if self.assembleIso:
- self.printWARNING(_("If you want to emerge packages manually "
- "on the system you are assembling, please execute:"))
- self.printWARNING(" cl-make -p %s -T"%
+ os.system("cl-make -p %s -fT"%
self.clVars.Get('os_builder_profile'))
return True

@ -1,50 +0,0 @@
diff --git pym/cl_builder.py pym/cl_builder.py
index 7a72d81..e0d71f9 100644
--- pym/cl_builder.py
+++ pym/cl_builder.py
@@ -25,7 +25,8 @@ import traceback
from os import path
from cl_utils import process,pathJoin,getRunCommands,getTupleVersion,\
childMounts,_toUNICODE,isMount,typeFile, \
- removeDir, pathJoin,listDirectory, getSquashList
+ removeDir, pathJoin,listDirectory, getSquashList, \
+ readFile
from subprocess import STDOUT,PIPE
from cl_print import color_print
from cl_datavars import DataVars
@@ -262,9 +263,23 @@ class cl_builder(color_print):
updateLayman = self.runChroot(distrPath,"layman -s calculate")
self.printByResult(updateLayman.success())
+ self.printByResult(True)
+
+ builderPath = self.clVars.Get('cl_builder_path')
+ for gitName,gitDir in (('portage','/usr/portage'),
+ ('overlay','/var/lib/layman/calculate')):
+ gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
+ if "heads/develop" in readFile(gitHead):
+ self.printMessageForTest(
+ _("Changing {repname} repository branch to '{branch}'").
+ format(repname=gitName,
+ branch='master'))
+ changeBranch = self.runChroot(distrPath,
+ "cd %s;git fetch;git checkout master"%gitDir)
+ self.printByResult(changeBranch.success())
+
self.applyTemplatesForSquash(distrPath)
# change make.profile
- builderPath = self.clVars.Get('cl_builder_path')
curProfileFile = pathJoin(builderPath,"etc/make.profile")
self.curProfile = os.readlink(curProfileFile)
profile = self.clVars.Get('os_builder_profile')
@@ -666,9 +681,7 @@ class cl_builder(color_print):
return False
self.printSUCCESS(_("System built successfully"))
if self.assembleIso:
- self.printWARNING(_("If you want to emerge packages manually "
- "on the system you are assembling, please execute:"))
- self.printWARNING(" cl-make -p %s -T"%
+ os.system("cl-make -p %s -fT"%
self.clVars.Get('os_builder_profile'))
return True

@ -1,50 +0,0 @@
diff --git pym/cl_builder.py pym/cl_builder.py
index 7a72d81..4406fe9 100644
--- pym/cl_builder.py
+++ pym/cl_builder.py
@@ -25,7 +25,8 @@ import traceback
from os import path
from cl_utils import process,pathJoin,getRunCommands,getTupleVersion,\
childMounts,_toUNICODE,isMount,typeFile, \
- removeDir, pathJoin,listDirectory, getSquashList
+ removeDir, pathJoin,listDirectory, getSquashList, \
+ readFile
from subprocess import STDOUT,PIPE
from cl_print import color_print
from cl_datavars import DataVars
@@ -262,9 +263,23 @@ class cl_builder(color_print):
updateLayman = self.runChroot(distrPath,"layman -s calculate")
self.printByResult(updateLayman.success())
+ self.printByResult(True)
+
+ builderPath = self.clVars.Get('cl_builder_path')
+ for gitName,gitDir in (('portage','/usr/portage'),
+ ('overlay','/var/lib/layman/calculate')):
+ gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
+ if "heads/develop" in readFile(gitHead):
+ self.printMessageForTest(
+ _("Changing {repname} repository branch to '{branch}'").
+ format(repname=gitName,
+ branch='master'))
+ changeBranch = self.runChroot(distrPath,
+ "cd %s;git fetch;git checkout master"%gitDir)
+ self.printByResult(changeBranch.success())
+
self.applyTemplatesForSquash(distrPath)
# change make.profile
- builderPath = self.clVars.Get('cl_builder_path')
curProfileFile = pathJoin(builderPath,"etc/make.profile")
self.curProfile = os.readlink(curProfileFile)
profile = self.clVars.Get('os_builder_profile')
@@ -666,9 +681,7 @@ class cl_builder(color_print):
return False
self.printSUCCESS(_("System built successfully"))
if self.assembleIso:
- self.printWARNING(_("If you want to emerge packages manually "
- "on the system you are assembling, please execute:"))
- self.printWARNING(" cl-make -p %s -T"%
+ os.system("cl-make -p %s -fT &>/dev/null"%
self.clVars.Get('os_builder_profile'))
return True

@ -1,50 +0,0 @@
diff --git pym/cl_builder.py pym/cl_builder.py
index 7a72d81..eaca33e 100644
--- pym/cl_builder.py
+++ pym/cl_builder.py
@@ -25,7 +25,8 @@ import traceback
from os import path
from cl_utils import process,pathJoin,getRunCommands,getTupleVersion,\
childMounts,_toUNICODE,isMount,typeFile, \
- removeDir, pathJoin,listDirectory, getSquashList
+ removeDir, pathJoin,listDirectory, getSquashList, \
+ readFile
from subprocess import STDOUT,PIPE
from cl_print import color_print
from cl_datavars import DataVars
@@ -262,9 +263,23 @@ class cl_builder(color_print):
updateLayman = self.runChroot(distrPath,"layman -s calculate")
self.printByResult(updateLayman.success())
+ self.printByResult(True)
+
+ builderPath = self.clVars.Get('cl_builder_path')
+ for gitName,gitDir in (('portage','/usr/portage'),
+ ('overlay','/var/lib/layman/calculate')):
+ gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
+ if "heads/develop" in readFile(gitHead):
+ self.printMessageForTest(
+ _("Changing {repname} repository branch to '{branch}'").
+ format(repname=gitName,
+ branch='master'))
+ changeBranch = self.runChroot(distrPath,
+ "cd %s;git fetch;git checkout master;git pull"%gitDir)
+ self.printByResult(changeBranch.success())
+
self.applyTemplatesForSquash(distrPath)
# change make.profile
- builderPath = self.clVars.Get('cl_builder_path')
curProfileFile = pathJoin(builderPath,"etc/make.profile")
self.curProfile = os.readlink(curProfileFile)
profile = self.clVars.Get('os_builder_profile')
@@ -666,9 +681,7 @@ class cl_builder(color_print):
return False
self.printSUCCESS(_("System built successfully"))
if self.assembleIso:
- self.printWARNING(_("If you want to emerge packages manually "
- "on the system you are assembling, please execute:"))
- self.printWARNING(" cl-make -p %s -T"%
+ os.system("cl-make -p %s -fT &>/dev/null"%
self.clVars.Get('os_builder_profile'))
return True

@ -1,57 +0,0 @@
diff --git pym/cl_builder.py pym/cl_builder.py
index 7a72d81..6bed2fb 100644
--- pym/cl_builder.py
+++ pym/cl_builder.py
@@ -25,7 +25,8 @@ import traceback
from os import path
from cl_utils import process,pathJoin,getRunCommands,getTupleVersion,\
childMounts,_toUNICODE,isMount,typeFile, \
- removeDir, pathJoin,listDirectory, getSquashList
+ removeDir, pathJoin,listDirectory, getSquashList, \
+ readFile
from subprocess import STDOUT,PIPE
from cl_print import color_print
from cl_datavars import DataVars
@@ -262,9 +263,30 @@ class cl_builder(color_print):
updateLayman = self.runChroot(distrPath,"layman -s calculate")
self.printByResult(updateLayman.success())
+ self.printByResult(True)
+
+ builderPath = self.clVars.Get('cl_builder_path')
+ updateMeta = False
+ for gitName,gitDir in (('portage','/usr/portage'),
+ ('overlay','/var/lib/layman/calculate')):
+ gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
+ if "heads/develop" in readFile(gitHead):
+ self.printMessageForTest(
+ _("Changing {repname} repository branch to '{branch}'").
+ format(repname=gitName,
+ branch='master'))
+ changeBranch = self.runChroot(distrPath,
+ "cd %s;git fetch;git checkout master;git pull"%gitDir)
+ self.printByResult(changeBranch.success())
+ updateMeta = True
+
+ if updateMeta:
+ self.printMessageForTest(_("Updating portage metadata"))
+ updateMeta = self.runChroot(distrPath,"emerge --metadata")
+ self.printByResult(updateMeta.success())
+
self.applyTemplatesForSquash(distrPath)
# change make.profile
- builderPath = self.clVars.Get('cl_builder_path')
curProfileFile = pathJoin(builderPath,"etc/make.profile")
self.curProfile = os.readlink(curProfileFile)
profile = self.clVars.Get('os_builder_profile')
@@ -666,9 +688,7 @@ class cl_builder(color_print):
return False
self.printSUCCESS(_("System built successfully"))
if self.assembleIso:
- self.printWARNING(_("If you want to emerge packages manually "
- "on the system you are assembling, please execute:"))
- self.printWARNING(" cl-make -p %s -T"%
+ os.system("cl-make -p %s -fT &>/dev/null"%
self.clVars.Get('os_builder_profile'))
return True

@ -1,13 +0,0 @@
diff --git data/calculate-builder data/calculate-builder
index 944ecb7..b05fb1f 100644
--- data/calculate-builder
+++ data/calculate-builder
@@ -7,7 +7,7 @@ depend() {
KERNEL_VERSION=`uname -r`
KERNEL_VERSION_CONF=${KERNEL_VERSION//./_}
-KERNEL_VERSION_CONF="modules_${KERNEL_VERSION_CONF//-/_}"
+KERNEL_VERSION_CONF="modules_3"
MODULES_PATH="/lib/modules/${KERNEL_VERSION}"
CONF_FILE="/etc/conf.d/modules"

@ -1,20 +0,0 @@
commit 27053f1a7ebac04d56e282f21e7e0d10187ba1a7
Author: Mike Hiretsky <mh@calculate.ru>
Date: Tue Jan 31 11:17:12 2012 +0400
Add update branch for overlays.
diff --git a/pym/cl_builder.py b/pym/cl_builder.py
index 34cd1d5..583daa7 100644
--- a/pym/cl_builder.py
+++ b/pym/cl_builder.py
@@ -265,7 +265,8 @@ class cl_builder(color_print):
for gitName,gitDir in (('portage','/usr/portage'),
('overlay','/var/lib/layman/calculate')):
gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
- if "heads/develop" in readFile(gitHead):
+ if "heads/develop" in readFile(gitHead) or \
+ "heads/update" in readFile(gitHead):
self.printMessageForTest(
_("Changing {repname} repository branch to '{branch}'").
format(repname=gitName,

@ -1,20 +0,0 @@
commit 8b036a688338a0d1420b0b2bd74ce7fdce2fb4ca
Author: Mike Hiretsky <mh@calculate.ru>
Date: Tue Jan 31 08:46:41 2012 +0400
Fix remove notree.
diff --git pym/cl_image_cmd.py pym/cl_image_cmd.py
index 2029c03..f05ac27 100644
--- pym/cl_image_cmd.py
+++ pym/cl_image_cmd.py
@@ -167,9 +167,6 @@ class image_cmd(share_cmd):
if not self.isRoot() or not self.isScratch(True):
sys.exit(1)
- if values.notree:
- self.logicObj.clVars.Set('cl_builder_tree','off',True)
-
if values.noisohybrid:
self.logicObj.clVars.Set('cl_builder_isohybrid_set','off',True)

@ -1,20 +0,0 @@
commit 73ec2ff5ea6032b940b7806be4e047653fa47adb
Author: Mike Hiretsky <mh@calculate.ru>
Date: Wed Feb 1 13:04:41 2012 +0400
Change branch to master for non binary distros.
diff --git a/pym/cl_builder.py b/pym/cl_builder.py
index 583daa7..3dddb71 100644
--- a/pym/cl_builder.py
+++ b/pym/cl_builder.py
@@ -260,8 +260,7 @@ class cl_builder(color_print):
self.dispatchConf(distrPath)
builderPath = self.clVars.Get('cl_builder_path')
- if self.assembleIso and \
- self.clVars.Get('os_builder_profile').endswith('binary'):
+ if self.assembleIso:
for gitName,gitDir in (('portage','/usr/portage'),
('overlay','/var/lib/layman/calculate')):
gitHead = pathJoin(builderPath,gitDir,".git/HEAD")

@ -1,22 +0,0 @@
diff --git pym/cl_builder.py pym/cl_builder.py
index 8070896..aac5474 100644
--- pym/cl_builder.py
+++ pym/cl_builder.py
@@ -140,7 +140,7 @@ class cl_builder(color_print):
#self.clVars.Set("cl_root_path","/", True)
self.clVars.Set("cl_action","iso", True)
chrootPath=pathJoin(directory,
- self.clVars.Get('cl_builder_squash_path'))
+ self.clVars.Get('cl_builder_squash_path'))
self.clVars.Set("cl_chroot_path",chrootPath, True)
self.clVars.Set("cl_root_path","..", True)
self.clTempl = template(self.clVars)
@@ -254,6 +254,8 @@ class cl_builder(color_print):
raise BuilderError(_("Failed to unmount %s")%target)
self.printByResult(True)
distrPath = distr.convertToDirectory().getDirectory()
+ self.clVars.Set('cl_builder_squash_path',
+ os.path.basename(os.path.normpath(distrPath)))
self.cleanNeedlessKernelData(distrPath)
self.dispatchConf(distrPath)

@ -1,66 +0,0 @@
diff --git pym/cl_builder.py pym/cl_builder.py
index 8070896..2a03d22 100644
--- pym/cl_builder.py
+++ pym/cl_builder.py
@@ -140,7 +140,7 @@ class cl_builder(color_print):
#self.clVars.Set("cl_root_path","/", True)
self.clVars.Set("cl_action","iso", True)
chrootPath=pathJoin(directory,
- self.clVars.Get('cl_builder_squash_path'))
+ self.clVars.Get('cl_builder_squash_path'))
self.clVars.Set("cl_chroot_path",chrootPath, True)
self.clVars.Set("cl_root_path","..", True)
self.clTempl = template(self.clVars)
@@ -254,35 +254,28 @@ class cl_builder(color_print):
raise BuilderError(_("Failed to unmount %s")%target)
self.printByResult(True)
distrPath = distr.convertToDirectory().getDirectory()
+ self.clVars.Set('cl_builder_squash_path',
+ os.path.basename(os.path.normpath(distrPath)))
self.cleanNeedlessKernelData(distrPath)
self.dispatchConf(distrPath)
if self.assembleIso and \
self.clVars.Get('os_builder_profile').endswith('binary'):
- self.printMessageForTest(_("Updating calculate overlay"))
- updateLayman = self.runChroot(distrPath,"layman -s calculate")
- self.printByResult(updateLayman.success())
-
- self.printByResult(True)
-
- builderPath = self.clVars.Get('cl_builder_path')
- updateMeta = False
- for gitName,gitDir in (('portage','/usr/portage'),
- ('overlay','/var/lib/layman/calculate')):
- gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
- if "heads/develop" in readFile(gitHead):
- self.printMessageForTest(
- _("Changing {repname} repository branch to '{branch}'").
- format(repname=gitName,
- branch='master'))
- changeBranch = self.runChroot(distrPath,
- "cd %s;git fetch;git checkout master;git pull"%gitDir)
- self.printByResult(changeBranch.success())
- updateMeta = True
-
- if updateMeta:
- self.printMessageForTest(_("Updating portage metadata"))
- updateMeta = self.runChroot(distrPath,"emerge --metadata")
+ builderPath = self.clVars.Get('cl_builder_path')
+ for gitName,gitDir in (('portage','/usr/portage'),
+ ('overlay','/var/lib/layman/calculate')):
+ gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
+ if "heads/develop" in readFile(gitHead):
+ self.printMessageForTest(
+ _("Changing {repname} repository branch to '{branch}'").
+ format(repname=gitName,
+ branch='master'))
+ changeBranch = self.runChroot(distrPath,
+ "cd %s;git fetch;git checkout master"%gitDir)
+ self.printByResult(changeBranch.success())
+
+ self.printMessageForTest(_("Updating portage"))
+ updateMeta = self.runChroot(distrPath,"emerge --sync")
self.printByResult(updateMeta.success())
self.applyTemplatesForSquash(distrPath)

@ -1,66 +0,0 @@
diff --git pym/cl_builder.py pym/cl_builder.py
index 8070896..a14c8ff 100644
--- pym/cl_builder.py
+++ pym/cl_builder.py
@@ -140,7 +140,7 @@ class cl_builder(color_print):
#self.clVars.Set("cl_root_path","/", True)
self.clVars.Set("cl_action","iso", True)
chrootPath=pathJoin(directory,
- self.clVars.Get('cl_builder_squash_path'))
+ self.clVars.Get('cl_builder_squash_path'))
self.clVars.Set("cl_chroot_path",chrootPath, True)
self.clVars.Set("cl_root_path","..", True)
self.clTempl = template(self.clVars)
@@ -254,35 +254,28 @@ class cl_builder(color_print):
raise BuilderError(_("Failed to unmount %s")%target)
self.printByResult(True)
distrPath = distr.convertToDirectory().getDirectory()
+ self.clVars.Set('cl_builder_squash_path',
+ os.path.basename(os.path.normpath(distrPath)))
self.cleanNeedlessKernelData(distrPath)
self.dispatchConf(distrPath)
+ builderPath = self.clVars.Get('cl_builder_path')
if self.assembleIso and \
self.clVars.Get('os_builder_profile').endswith('binary'):
- self.printMessageForTest(_("Updating calculate overlay"))
- updateLayman = self.runChroot(distrPath,"layman -s calculate")
- self.printByResult(updateLayman.success())
-
- self.printByResult(True)
-
- builderPath = self.clVars.Get('cl_builder_path')
- updateMeta = False
- for gitName,gitDir in (('portage','/usr/portage'),
- ('overlay','/var/lib/layman/calculate')):
- gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
- if "heads/develop" in readFile(gitHead):
- self.printMessageForTest(
- _("Changing {repname} repository branch to '{branch}'").
- format(repname=gitName,
- branch='master'))
- changeBranch = self.runChroot(distrPath,
- "cd %s;git fetch;git checkout master;git pull"%gitDir)
- self.printByResult(changeBranch.success())
- updateMeta = True
-
- if updateMeta:
- self.printMessageForTest(_("Updating portage metadata"))
- updateMeta = self.runChroot(distrPath,"emerge --metadata")
+ for gitName,gitDir in (('portage','/usr/portage'),
+ ('overlay','/var/lib/layman/calculate')):
+ gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
+ if "heads/develop" in readFile(gitHead):
+ self.printMessageForTest(
+ _("Changing {repname} repository branch to '{branch}'").
+ format(repname=gitName,
+ branch='master'))
+ changeBranch = self.runChroot(distrPath,
+ "cd %s;git fetch;git checkout master"%gitDir)
+ self.printByResult(changeBranch.success())
+
+ self.printMessageForTest(_("Updating portage"))
+ updateMeta = self.runChroot(distrPath,"emerge --sync")
self.printByResult(updateMeta.success())
self.applyTemplatesForSquash(distrPath)

@ -1,143 +0,0 @@
diff --git data/calculate-builder data/calculate-builder
index b05fb1f..40a7414 100644
--- data/calculate-builder
+++ data/calculate-builder
@@ -11,6 +11,7 @@ KERNEL_VERSION_CONF="modules_3"
MODULES_PATH="/lib/modules/${KERNEL_VERSION}"
CONF_FILE="/etc/conf.d/modules"
+# get variable value from cl-install
variable_value()
{
local varname=$1
@@ -18,10 +19,13 @@ variable_value()
awk "{ if (\$1 == \"$varname\") print \$3 }"
}
+# detect modules for cpu freq
get_cpufreq_modules(){
MODULES_STRING=""
+ # find all cpufreq modules
for path in $(find $MODULES_PATH -name cpufreq)
do
+ # load each module and chech it
for module_path in $(find $path -name *.ko | sort)
do
module_name=${module_path##\/*\/}
@@ -39,6 +43,7 @@ get_cpufreq_modules(){
done
}
+# find cpu freq modules autoload string
find_string_modules(){
find_string=$(awk "/^\s*[^#]*\s*${KERNEL_VERSION_CONF}/ {print}" < ${CONF_FILE})
if [[ -n $find_string ]];
@@ -48,14 +53,20 @@ find_string_modules(){
return 1
}
+# add cpu freq modules to modules autoload file
add_autoload_modules(){
+ # get root type
local roottype=`variable_value os_root_type`
+ # if modules have not added yet
if ! find_string_modules;
then
ebegin "Added rules for cpu frequency"
+ # detect cpufreq modules
get_cpufreq_modules
+ # if root type is hdd
if [[ $roottype == "hdd" ]]
then
+ # append config string to conf file
echo ${KERNEL_VERSION_CONF}=\"${MODULES_STRING}\" >> ${CONF_FILE}
fi
else
@@ -69,6 +80,7 @@ start() {
}
stop() {
+ # remove calculate-builder from autorun
local roottype=`variable_value os_root_type`
if [[ $roottype == "hdd" ]] && rc-config list boot | grep -q calculate-builder
then
diff --git pym/cl_builder.py pym/cl_builder.py
index 8070896..34cd1d5 100644
--- pym/cl_builder.py
+++ pym/cl_builder.py
@@ -140,7 +140,7 @@ class cl_builder(color_print):
#self.clVars.Set("cl_root_path","/", True)
self.clVars.Set("cl_action","iso", True)
chrootPath=pathJoin(directory,
- self.clVars.Get('cl_builder_squash_path'))
+ self.clVars.Get('cl_builder_squash_path'))
self.clVars.Set("cl_chroot_path",chrootPath, True)
self.clVars.Set("cl_root_path","..", True)
self.clTempl = template(self.clVars)
@@ -254,35 +254,28 @@ class cl_builder(color_print):
raise BuilderError(_("Failed to unmount %s")%target)
self.printByResult(True)
distrPath = distr.convertToDirectory().getDirectory()
+ self.clVars.Set('cl_builder_squash_path',
+ os.path.basename(os.path.normpath(distrPath)))
self.cleanNeedlessKernelData(distrPath)
self.dispatchConf(distrPath)
+ builderPath = self.clVars.Get('cl_builder_path')
if self.assembleIso and \
self.clVars.Get('os_builder_profile').endswith('binary'):
- self.printMessageForTest(_("Updating calculate overlay"))
- updateLayman = self.runChroot(distrPath,"layman -s calculate")
- self.printByResult(updateLayman.success())
-
- self.printByResult(True)
-
- builderPath = self.clVars.Get('cl_builder_path')
- updateMeta = False
- for gitName,gitDir in (('portage','/usr/portage'),
- ('overlay','/var/lib/layman/calculate')):
- gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
- if "heads/develop" in readFile(gitHead):
- self.printMessageForTest(
- _("Changing {repname} repository branch to '{branch}'").
- format(repname=gitName,
- branch='master'))
- changeBranch = self.runChroot(distrPath,
- "cd %s;git fetch;git checkout master;git pull"%gitDir)
- self.printByResult(changeBranch.success())
- updateMeta = True
-
- if updateMeta:
- self.printMessageForTest(_("Updating portage metadata"))
- updateMeta = self.runChroot(distrPath,"emerge --metadata")
+ for gitName,gitDir in (('portage','/usr/portage'),
+ ('overlay','/var/lib/layman/calculate')):
+ gitHead = pathJoin(builderPath,gitDir,".git/HEAD")
+ if "heads/develop" in readFile(gitHead):
+ self.printMessageForTest(
+ _("Changing {repname} repository branch to '{branch}'").
+ format(repname=gitName,
+ branch='master'))
+ changeBranch = self.runChroot(distrPath,
+ "cd %s;git pull;git checkout master;git pull"%gitDir)
+ self.printByResult(changeBranch.success())
+
+ self.printMessageForTest(_("Updating portage"))
+ updateMeta = self.runChroot(distrPath,"emerge --sync")
self.printByResult(updateMeta.success())
self.applyTemplatesForSquash(distrPath)
diff --git pym/cl_image_cmd.py pym/cl_image_cmd.py
index deef6c6..2029c03 100644
--- pym/cl_image_cmd.py
+++ pym/cl_image_cmd.py
@@ -55,9 +55,6 @@ CMD_OPTIONS = [{'shortOption':"p",
if len(COMPRESS_METHODS)>1
else _("only {0}").format(COMPRESS_METHODS[0]))
},
- {'longOption':'notree',
- 'help':_("exclude the portage tree from the image")
- },
{'longOption':'live',
'help':_("use only live templates on startup")
},

@ -1,42 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${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="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-desktop-2.2.24
>=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
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# Fix resolve domain names
epatch "${FILESDIR}/calculate-client-2.2.24-r1.patch"
}
pkg_postinst() {
einfo "For configure calculate-client perform:"
einfo " cl-client --install"
}

@ -1,34 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${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="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-desktop-2.2.25
>=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
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
pkg_postinst() {
einfo "For configure calculate-client perform:"
einfo " cl-client --install"
}

@ -1,35 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${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="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-desktop-2.2.26
>=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
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
pkg_postinst() {
einfo "For configure calculate-client perform:"
einfo " cl-client --install"
}

@ -1,34 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${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="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-desktop-2.2.26
>=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
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
pkg_postinst() {
einfo "For configure calculate-client perform:"
einfo " cl-client --install"
}

@ -1,43 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${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="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-desktop-2.2.27
>=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
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix domain install
epatch "${FILESDIR}/calculate-client-2.2.27-r1.patch"
}
pkg_postinst() {
einfo "For configure calculate-client perform:"
einfo " cl-client --install"
}

@ -1,43 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${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="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-desktop-2.2.27
>=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
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix domain install, add tar symlinks
epatch "${FILESDIR}/calculate-client-2.2.27-r2.patch"
}
pkg_postinst() {
einfo "For configure calculate-client perform:"
einfo " cl-client --install"
}

@ -1,43 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${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="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-desktop-2.2.27
>=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
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix domain install, add tar symlinks
epatch "${FILESDIR}/calculate-client-2.2.27-r3.patch"
}
pkg_postinst() {
einfo "For configure calculate-client perform:"
einfo " cl-client --install"
}

@ -1,35 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${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="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-desktop-2.2.27
>=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
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
pkg_postinst() {
einfo "For configure calculate-client perform:"
einfo " cl-client --install"
}

@ -1,40 +0,0 @@
diff --git pym/cl_client.py pym/cl_client.py
index f3499c3..9d14a4e 100644
--- pym/cl_client.py
+++ pym/cl_client.py
@@ -43,6 +43,7 @@ from convertenv import convertEnv
from encrypt import encrypt
from cl_client_cache import userCache
from shutil import copy2
+from socket import gethostbyname
lang().setLanguage(sys.modules[__name__])
@@ -218,6 +219,13 @@ class ldapData(ldapUser):
return resSearch
return False
+ def _gethostbyname(self,hostname):
+ try:
+ return gethostbyname(hostname)
+ except:
+ pass
+ return None
+
def getNameRemoteServer(self,userName, osLinuxShort, curHost):
"""Если профиль на удаленном сервере, то выдать DNS имя этого сервера
"""
@@ -226,9 +234,12 @@ class ldapData(ldapUser):
prevHost = searchPrevHost[0][0][1]['host'][0]
else:
prevHost = None
+ # get ip address of previous server and current server
+ prevIp = self._gethostbyname(prevHost)
+ curIp = self._gethostbyname(curHost)
# если местоположение актуального профиля найти не удалось
# или его местоположение не на локальном сервере
- if not prevHost or prevHost == curHost:
+ if not prevHost or curIp and prevIp == curIp:
return False
else:
return prevHost

@ -1,36 +0,0 @@
diff --git pym/cl_client.py pym/cl_client.py
index eea7ccc..ca2e11d 100644
--- pym/cl_client.py
+++ pym/cl_client.py
@@ -1807,6 +1807,13 @@ class client(share, commandServer, encrypt):
if not self.addDaemonAutostart("client"):
return False
if onlyEnv:
+ # apply templates (this appling client templates need
+ # for safety executing cl-install --startup for
+ # already domained computers
+ if self.clVars.Get("os_remote_auth") and \
+ not self.applyTemplatesFromSystem():
+ self.printERROR(_("Failed to apply install templates"))
+ return False
return True
if domain and not self.mountRemote():
return False
@@ -2187,7 +2194,7 @@ class client(share, commandServer, encrypt):
if not pathUserList:
continue
pathUser = "/".join(pathUserList[1:])
- srcDir = pathJoin(previousHome, pathUser)
+ srcDir = pathJoin(previousHome, pathUser)
if os.path.exists(srcDir) and not os.path.exists(homeDir):
flagMovedUsers = True
destDir = os.path.dirname(homeDir)
@@ -2195,7 +2202,7 @@ class client(share, commandServer, encrypt):
%{"src":srcDir,"dest":homeDir})
if not self.copyTemplateDir(srcDir, destDir):
return False
- if flagMovedUsers and not os.listdir(previousHome):
+ if flagMovedUsers and not os.listdir(previousHome):
os.rmdir(previousHome)
return True

@ -1,105 +0,0 @@
diff --git pym/cl_client.py pym/cl_client.py
index eea7ccc..011e8e5 100644
--- pym/cl_client.py
+++ pym/cl_client.py
@@ -37,13 +37,15 @@ from cl_print import color_print
from cl_ldap import ldapUser
from client.progressbar import ProgressBar
from cl_utils import runOsCommand, getpathenv, getModeFile, removeDir, isMount,\
- appendProgramToEnvFile, removeProgramToEnvFile, pathJoin
+ appendProgramToEnvFile, removeProgramToEnvFile, pathJoin, \
+ tarLinks
from _cl_keys import getKey, clearKey
from convertenv import convertEnv
from encrypt import encrypt
from cl_client_cache import userCache
from shutil import copy2
from socket import gethostbyname
+import tarfile
lang().setLanguage(sys.modules[__name__])
@@ -1335,6 +1337,8 @@ class client(share, commandServer, encrypt):
# Отмонтируем пользовательские ресурсы в случае ошибки
self.umountUserRes(homeDir)
return False
+
+ self.unpackLinks(homeDir)
if sync:
logOutFile = os.path.join(homeDir,self.logOutFile)
@@ -1366,6 +1370,33 @@ class client(share, commandServer, encrypt):
break
return xSession
+ def tarSymLinks(self,userHome,uid,gid):
+ """Create tar archive of symlinks"""
+ linkArch = pathJoin(userHome,".calculate/links.tar.bz2")
+ try:
+ for filename in tarLinks(userHome,linkArch,
+ skip=self.clVars.Get("cl_sync_del_path")+
+ self.clVars.Get("cl_sync_skip_path")):
+ try:
+ os.unlink(filename)
+ except OSError:
+ self.printWARNING(_("Failed to remove %s")%filename)
+ except:
+ self.printWARNING(_("Failed to make links archive"))
+ if os.path.exists(linkArch):
+ os.chown(uid,gid)
+
+ def unpackLinks(self,userHome):
+ """Unpack archive of symlinks"""
+ linksArch = pathJoin(userHome,".calculate/links.tar.bz2")
+ try:
+ if os.path.exists(linksArch):
+ tf = tarfile.open(linksArch)
+ tf.extractall(userHome)
+ tf.close()
+ except:
+ self.printWARNING(_("Failed to unpack links archive"))
+
def moveHomeDir(self, userHome):
"""Переносим файлы пользователя в Home/Moved"""
# Находим директории и файлы в домашней директории
@@ -1644,6 +1675,8 @@ class client(share, commandServer, encrypt):
configFileName, uid, gid)
if os.path.exists(homeDir):
self.moveHomeDir(homeDir)
+ if sync:
+ self.tarSymLinks(homeDir,uid,gid)
else:
# Отмонтируем пользовательские ресурсы в случае ошибки
self.printERROR(_("Directory %s not found") % homeDir)
@@ -1807,6 +1840,13 @@ class client(share, commandServer, encrypt):
if not self.addDaemonAutostart("client"):
return False
if onlyEnv:
+ # apply templates (this appling client templates need
+ # for safety executing cl-install --startup for
+ # already domained computers
+ if self.clVars.Get("os_remote_auth") and \
+ not self.applyTemplatesFromSystem():
+ self.printERROR(_("Failed to apply install templates"))
+ return False
return True
if domain and not self.mountRemote():
return False
@@ -2187,7 +2227,7 @@ class client(share, commandServer, encrypt):
if not pathUserList:
continue
pathUser = "/".join(pathUserList[1:])
- srcDir = pathJoin(previousHome, pathUser)
+ srcDir = pathJoin(previousHome, pathUser)
if os.path.exists(srcDir) and not os.path.exists(homeDir):
flagMovedUsers = True
destDir = os.path.dirname(homeDir)
@@ -2195,7 +2235,7 @@ class client(share, commandServer, encrypt):
%{"src":srcDir,"dest":homeDir})
if not self.copyTemplateDir(srcDir, destDir):
return False
- if flagMovedUsers and not os.listdir(previousHome):
+ if flagMovedUsers and not os.listdir(previousHome):
os.rmdir(previousHome)
return True

@ -1,121 +0,0 @@
diff --git data/client data/client
index 4dbf7a5..c4ac330 100644
--- data/client
+++ data/client
@@ -46,7 +46,7 @@ start() {
done
if [[ -z $SERVER ]]
then
- cl-client $SERVERLIVE && cl-template -l remote
+ cl-client $SERVERLIVE && cl-template -l remote &>/dev/null
else
cl-client --mount
fi
diff --git pym/cl_client.py pym/cl_client.py
index eea7ccc..1811a41 100644
--- pym/cl_client.py
+++ pym/cl_client.py
@@ -37,13 +37,15 @@ from cl_print import color_print
from cl_ldap import ldapUser
from client.progressbar import ProgressBar
from cl_utils import runOsCommand, getpathenv, getModeFile, removeDir, isMount,\
- appendProgramToEnvFile, removeProgramToEnvFile, pathJoin
+ appendProgramToEnvFile, removeProgramToEnvFile, pathJoin, \
+ tarLinks
from _cl_keys import getKey, clearKey
from convertenv import convertEnv
from encrypt import encrypt
from cl_client_cache import userCache
from shutil import copy2
from socket import gethostbyname
+import tarfile
lang().setLanguage(sys.modules[__name__])
@@ -1335,6 +1337,8 @@ class client(share, commandServer, encrypt):
# Отмонтируем пользовательские ресурсы в случае ошибки
self.umountUserRes(homeDir)
return False
+
+ self.unpackLinks(homeDir)
if sync:
logOutFile = os.path.join(homeDir,self.logOutFile)
@@ -1366,6 +1370,36 @@ class client(share, commandServer, encrypt):
break
return xSession
+ def tarSymLinks(self,userHome,uid,gid):
+ """Create tar archive of symlinks"""
+ linkArch = pathJoin(userHome,".calculate/links.tar.bz2")
+ try:
+ for filename in tarLinks(userHome,linkArch,
+ skip=self.clVars.Get("cl_sync_del_path")+
+ self.clVars.Get("cl_sync_skip_path")):
+ try:
+ os.unlink(filename)
+ except OSError:
+ self.printWARNING(_("Failed to remove %s")%filename)
+ except:
+ self.printWARNING(_("Failed to make links archive"))
+ try:
+ if os.path.exists(linkArch):
+ os.chown(linkArch,uid,gid)
+ except:
+ self.printWARNING(_("Failed to make links archive"))
+
+ def unpackLinks(self,userHome):
+ """Unpack archive of symlinks"""
+ linksArch = pathJoin(userHome,".calculate/links.tar.bz2")
+ try:
+ if os.path.exists(linksArch):
+ tf = tarfile.open(linksArch)
+ tf.extractall(userHome)
+ tf.close()
+ except:
+ self.printWARNING(_("Failed to unpack links archive"))
+
def moveHomeDir(self, userHome):
"""Переносим файлы пользователя в Home/Moved"""
# Находим директории и файлы в домашней директории
@@ -1644,6 +1678,8 @@ class client(share, commandServer, encrypt):
configFileName, uid, gid)
if os.path.exists(homeDir):
self.moveHomeDir(homeDir)
+ if sync:
+ self.tarSymLinks(homeDir,uid,gid)
else:
# Отмонтируем пользовательские ресурсы в случае ошибки
self.printERROR(_("Directory %s not found") % homeDir)
@@ -1807,6 +1843,13 @@ class client(share, commandServer, encrypt):
if not self.addDaemonAutostart("client"):
return False
if onlyEnv:
+ # apply templates (this appling client templates need
+ # for safety executing cl-install --startup for
+ # already domained computers
+ if self.clVars.Get("os_remote_auth") and \
+ not self.applyTemplatesFromSystem():
+ self.printERROR(_("Failed to apply install templates"))
+ return False
return True
if domain and not self.mountRemote():
return False
@@ -2187,7 +2230,7 @@ class client(share, commandServer, encrypt):
if not pathUserList:
continue
pathUser = "/".join(pathUserList[1:])
- srcDir = pathJoin(previousHome, pathUser)
+ srcDir = pathJoin(previousHome, pathUser)
if os.path.exists(srcDir) and not os.path.exists(homeDir):
flagMovedUsers = True
destDir = os.path.dirname(homeDir)
@@ -2195,7 +2238,7 @@ class client(share, commandServer, encrypt):
%{"src":srcDir,"dest":homeDir})
if not self.copyTemplateDir(srcDir, destDir):
return False
- if flagMovedUsers and not os.listdir(previousHome):
+ if flagMovedUsers and not os.listdir(previousHome):
os.rmdir(previousHome)
return True

@ -1,42 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of the desktop configuration Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-templates-2.2.24
>=dev-python/python-ldap-2.0[ssl]
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# discard --live option
epatch "${FILESDIR}/calculate-desktop-2.2.24-r2.patch"
}
pkg_postinst() {
#${EROOT}/usr/lib/calculate-2.2/calculate-desktop/bin/install
einfo "For configure calculate-desktop perform:"
einfo " cl-desktop --install"
if use kde || use xfce || use gnome
then
einfo " /etc/init.d/xdm restart"
fi
}

@ -1,34 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of the desktop configuration Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-templates-2.2.25
>=dev-python/python-ldap-2.0[ssl]
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
pkg_postinst() {
#${EROOT}/usr/lib/calculate-2.2/calculate-desktop/bin/install
einfo "For configure calculate-desktop perform:"
einfo " cl-desktop --install"
if use kde || use xfce || use gnome
then
einfo " /etc/init.d/xdm restart"
fi
}

@ -1,34 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of the desktop configuration Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-templates-2.2.26
>=dev-python/python-ldap-2.0[ssl]
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
pkg_postinst() {
#${EROOT}/usr/lib/calculate-2.2/calculate-desktop/bin/install
einfo "For configure calculate-desktop perform:"
einfo " cl-desktop --install"
if use kde || use xfce || use gnome
then
einfo " /etc/init.d/xdm restart"
fi
}

@ -1,34 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of the desktop configuration Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="kde xfce gnome"
DEPEND="~sys-apps/calculate-templates-2.2.27
>=dev-python/python-ldap-2.0[ssl]
xfce? ( x11-misc/xdialog )
gnome? ( x11-misc/xdialog )
kde? ( kde-base/kdialog )"
RDEPEND="${DEPEND}"
pkg_postinst() {
#${EROOT}/usr/lib/calculate-2.2/calculate-desktop/bin/install
einfo "For configure calculate-desktop perform:"
einfo " cl-desktop --install"
if use kde || use xfce || use gnome
then
einfo " /etc/init.d/xdm restart"
fi
}

@ -1,171 +0,0 @@
diff --git data/login.d/20desktop data/login.d/20desktop
index 43a0138..c55f333 100644
--- data/login.d/20desktop
+++ data/login.d/20desktop
@@ -27,24 +27,16 @@ then
[[ -z "`ls ${userHome}`" ]] ||
diff -uq <(ls -A1 /etc/skel | wc) <(ls -A1 ${userHome} | sort) &>/dev/null
then
- APPENDCMD=""
- # run configure only mutable params of user profile if it is live system
- # and profile already configured
- elif [[ "`desktop_variable_value os_root_type`" != "hdd" ]]
- then
- APPENDCMD="--live"
- else
- exit 0
- fi
- ERRORLOG=`/usr/bin/cl-desktop $APPENDCMD --progress --color=never $USER 2>&1`
- # raise xmessage error if cl-desktop failed
- if [ "$?" -gt "0" ];
- then
- # write error message to logfile
- echo "$ERRORLOG" >> $FILE_LOG
- # display error by xmessage
- xmes cl-desktop "$ERRORLOG"
- exit 1
+ ERRORLOG=`/usr/bin/cl-desktop --progress --color=never $USER 2>&1`
+ # raise xmessage error if cl-desktop failed
+ if [ "$?" -gt "0" ];
+ then
+ # write error message to logfile
+ echo "$ERRORLOG" >> $FILE_LOG
+ # display error by xmessage
+ xmes cl-desktop "$ERRORLOG"
+ exit 1
+ fi
fi
fi
exit 0
diff --git pym/cl_desktop.py pym/cl_desktop.py
index 321f90a..3c8fdd4 100644
--- pym/cl_desktop.py
+++ pym/cl_desktop.py
@@ -196,7 +196,7 @@ class desktop(share):
self.displayTemplatesApplied(dirsFiles)
return dirsFiles
- def createHome(self, progress=False, live=False, verbose=False):
+ def createHome(self, progress=False, verbose=False):
"""Создание профиля пользователя (пользовательской директории)"""
# Имя пользователя
self.verbose = verbose
@@ -240,12 +240,8 @@ class desktop(share):
if not os.path.exists(homeDir):
flagHomeExists = False
self.createUserDir(uid, gid, homeDir)
- # if live action then action update mutable params of profile (live)
- # else action is update user profile
- if live:
- self.clVars.Set("cl_action", "live", True)
- else:
- self.clVars.Set("cl_action", "desktop", True)
+ # Действие - шаблоны пользователя
+ self.clVars.Set("cl_action", "desktop", True)
# Применяем профили для пользователя
dirsAndFiles = self.applyTemplatesFromUser(progress)
if not dirsAndFiles:
diff --git pym/cl_desktop_cmd.py pym/cl_desktop_cmd.py
index 0dab534..c5ff655 100644
--- pym/cl_desktop_cmd.py
+++ pym/cl_desktop_cmd.py
@@ -35,9 +35,7 @@ EXAMPLES = _("%prog user_name")
DESCRIPTION = _("Create home directory for the new user account")
# Опции командной строки
-CMD_OPTIONS = [{'longOption':"live",
- 'help':_("update only mutable parameters of user profile")},
- {'longOption':"verbose",
+CMD_OPTIONS = [{'longOption':"verbose",
'help':_("display the template is applied")},
{'longOption':"set"},
{'longOption':"install",
@@ -145,8 +143,7 @@ class desktop_cmd(share_cmd):
def createHome(self, optObj):
"""Создание домашней директории"""
- return self.logicObj.createHome(optObj.progress,optObj.live,
- optObj.verbose)
+ return self.logicObj.createHome(optObj.progress, optObj.verbose)
def install(self):
"""Инсталяция программы"""
diff --git pym/cl_fill_desktop.py pym/cl_fill_desktop.py
index 8b3a753..9637744 100644
--- pym/cl_fill_desktop.py
+++ pym/cl_fill_desktop.py
@@ -34,9 +34,7 @@ class fillVars():
return ""
def get_ac_desktop_install(self):
- """
- Trigger for templates of package installation and uninstallation
- """
+ """переключатель для шаблонов инсталяции и удаления программы"""
ret = ""
action = self.Get("cl_action")
if action in ("install","merge"):
@@ -46,9 +44,7 @@ class fillVars():
return ret
def get_ac_desktop_merge(self):
- """
- Trigger for the merge templates
- """
+ """переключатель для шаблонов merge"""
ret = ""
action = self.Get("cl_action")
if action in ("install","merge"):
@@ -56,25 +52,13 @@ class fillVars():
return ret
def get_ac_desktop_desktop(self):
- """
- Trigger for templates of user profile creating
- """
+ """переключатель для шаблонов создания пользовательского профиля"""
ret = ""
action = self.Get("cl_action")
if action in ("desktop",):
ret = "up"
return ret
- def get_ac_desktop_live(self):
- """
- Trigger for templates update live configuration of profile
- """
- ret = ""
- action = self.Get("cl_action")
- if action in ("desktop","live"):
- ret = "up"
- return ret
-
def get_ur_domain_set(self):
'''доменный пользователь "on", "off"'''
ret = "off"
diff --git pym/cl_vars_desktop.py pym/cl_vars_desktop.py
index 8d19381..bcd6715 100644
--- pym/cl_vars_desktop.py
+++ pym/cl_vars_desktop.py
@@ -54,18 +54,15 @@ class Data:
# Host Jabber пользователя
ur_jid_host = {'mode':"w"}
- # trigger for the merge templates
+ # переключатель для шаблонов merge
ac_desktop_merge = {}
- # trigger for templates of package installation and uninstallation
+ # переключатель для шаблонов инсталяции и удаления программы
ac_desktop_install = {}
- # trigger for templates of user profile creating
+ # переключатель для шаблонов создания пользовательского профиля
ac_desktop_desktop = {}
- # trigger for templates update live configuration of profile
- ac_desktop_live = {}
-
# доменный пользователь "on", "off"
ur_domain_set = {}

@ -1,33 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
RDEPEND=">=sys-apps/calculate-lib-2.2.19
!<sys-apps/calculate-install-2.2.19
!<sys-apps/calculate-client-2.2.19
!<sys-apps/calculate-desktop-2.2.19
!<sys-apps/calculate-builder-2.2.19
!<sys-apps/calculate-assemble-2.2.19"
DEPEND="sys-devel/gettext
${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# update translate
epatch "${FILESDIR}/calculate-i18n-2.2.24-r1.patch"
}

@ -1,33 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
RDEPEND=">=sys-apps/calculate-lib-2.2.19
!<sys-apps/calculate-install-2.2.19
!<sys-apps/calculate-client-2.2.19
!<sys-apps/calculate-desktop-2.2.19
!<sys-apps/calculate-builder-2.2.19
!<sys-apps/calculate-assemble-2.2.19"
DEPEND="sys-devel/gettext
${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# update for builder and assemble
epatch "${FILESDIR}/calculate-i18n-2.2.25-r1.patch"
}

@ -1,25 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
RDEPEND=">=sys-apps/calculate-lib-2.2.25
!<sys-apps/calculate-install-2.2.19
!<sys-apps/calculate-client-2.2.19
!<sys-apps/calculate-desktop-2.2.19
!<sys-apps/calculate-builder-2.2.19
!<sys-apps/calculate-assemble-2.2.19"
DEPEND="sys-devel/gettext
${DEPEND}"

@ -1,33 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
RDEPEND=">=sys-apps/calculate-lib-2.2.19
!<sys-apps/calculate-install-2.2.19
!<sys-apps/calculate-client-2.2.19
!<sys-apps/calculate-desktop-2.2.19
!<sys-apps/calculate-builder-2.2.19
!<sys-apps/calculate-assemble-2.2.19"
DEPEND="sys-devel/gettext
${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# update for install
epatch "${FILESDIR}/calculate-i18n-2.2.26-r1.patch"
}

@ -1,25 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
RDEPEND=">=sys-apps/calculate-lib-2.2.26
!<sys-apps/calculate-install-2.2.19
!<sys-apps/calculate-client-2.2.19
!<sys-apps/calculate-desktop-2.2.19
!<sys-apps/calculate-builder-2.2.19
!<sys-apps/calculate-assemble-2.2.19"
DEPEND="sys-devel/gettext
${DEPEND}"

@ -1,33 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
RDEPEND=">=sys-apps/calculate-lib-2.2.19
!<sys-apps/calculate-install-2.2.19
!<sys-apps/calculate-client-2.2.19
!<sys-apps/calculate-desktop-2.2.19
!<sys-apps/calculate-builder-2.2.19
!<sys-apps/calculate-assemble-2.2.19"
DEPEND="sys-devel/gettext
${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# update translate
epatch "${FILESDIR}/calculate-i18n-2.2.27-r1.patch"
}

@ -1,33 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
RDEPEND=">=sys-apps/calculate-lib-2.2.19
!<sys-apps/calculate-install-2.2.19
!<sys-apps/calculate-client-2.2.19
!<sys-apps/calculate-desktop-2.2.19
!<sys-apps/calculate-builder-2.2.19
!<sys-apps/calculate-assemble-2.2.19"
DEPEND="sys-devel/gettext
${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# update translate
epatch "${FILESDIR}/calculate-i18n-2.2.27-r2.patch"
}

@ -1,25 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The utilities for assembling tasks of Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
RDEPEND=">=sys-apps/calculate-lib-2.2.19
!<sys-apps/calculate-install-2.2.19
!<sys-apps/calculate-client-2.2.19
!<sys-apps/calculate-desktop-2.2.19
!<sys-apps/calculate-builder-2.2.19
!<sys-apps/calculate-assemble-2.2.19"
DEPEND="sys-devel/gettext
${DEPEND}"

@ -1,76 +0,0 @@
diff --git ru/cl_builder_ru.po ru/cl_builder_ru.po
index 729d7d3..6c9623a 100644
--- ru/cl_builder_ru.po
+++ ru/cl_builder_ru.po
@@ -441,3 +441,6 @@ msgstr "Выполнение '%s'"
msgid "use only live templates on startup"
msgstr "при первой загрузке использовать только live шаблоны"
+
+msgid "Create cache for %s home directory"
+msgstr "Создание кэша для домашней директории пользователя %s"
diff --git ru/cl_desktop_ru.po ru/cl_desktop_ru.po
index bb46f45..2f1ecc4 100644
--- ru/cl_desktop_ru.po
+++ ru/cl_desktop_ru.po
@@ -112,3 +112,39 @@ msgstr "показать применнные шаблоны"
msgid "Following files were changed"
msgstr "Следующие файлы были изменены"
+
+msgid "create cache of user home directory"
+msgstr "создать кэш пользовательсокй домашней директории"
+
+msgid "Can not create cache for user %s"
+msgstr "Не удалось создать кэш для пользователя %s"
+
+msgid "because home directory exists"
+msgstr "так как домашняя директория уже существует"
+
+msgid "Can not create cache"
+msgstr "Не удалось создать кэш"
+
+msgid "Cache for user %s home directory is created"
+msgstr "Кэш для домашней директории пользователя %s создан"
+
+msgid "Can not create user home directory from cache"
+msgstr "Не удалось создать домашнюю директорию из кэша"
+
+msgid "Created home dir %s from cache"
+msgstr "Домашняя директория %s создана из кэша"
+
+msgid "Can not remove user home directory %s"
+msgstr "Не удалось удалить пользовательскую домашнюю директорию %s"
+
+msgid "Can not remove cache file %s"
+msgstr "Не удалось удалить файл кэша %s"
+
+msgid "Can not create %s directory"
+msgstr "Не удалось создать %s директорию"
+
+msgid "Write permission denied for %s directory"
+msgstr "Нет прав на запись в директорию %s"
+
+msgid "Can not create %s cache archive"
+msgstr "Не удалось создать архив %s для кэша"
diff --git ru/cl_install_ru.po ru/cl_install_ru.po
index ef5104a..b5440b1 100644
--- ru/cl_install_ru.po
+++ ru/cl_install_ru.po
@@ -854,9 +854,6 @@ msgstr ""
"Legacy grub не поддерживает загрузки с raid или lvm без выделенного /boot "
"раздела"
-msgid "Disk '%s' without partition table cann't contains boot record"
-msgstr "Диск '%s' без таблицы разделов не может содержать загрузчик"
-
msgid "For creating bind mount point need specify source directory as DISK"
msgstr ""
"Для создания bind точки монтирования необходимо указать исходную директорию "
@@ -1033,3 +1030,6 @@ msgstr "Пользователь с автовходом не может быт
msgid "User %s is not exists"
msgstr "Пользователь %s не существует"
+
+msgid "Disk '%s' without partition table can't contains boot record"
+msgstr "Диск '%s' без таблицы разделов не может содержать загрузчик"

@ -1,58 +0,0 @@
diff --git ru/cl_assemble_ru.po ru/cl_assemble_ru.po
index 01c273c..112d9cb 100644
--- ru/cl_assemble_ru.po
+++ ru/cl_assemble_ru.po
@@ -362,9 +362,6 @@ msgstr "базовый образ для сборки"
msgid "break system assemble"
msgstr "прервать сборку системы"
-msgid "partition intended for assemble"
-msgstr "раздел для сборки системы"
-
msgid "check dependencies"
msgstr "проверить зависимости"
@@ -516,3 +513,29 @@ msgstr "При установке '%s' будут устанавливаться
msgid "Directory for assembling: %s"
msgstr "Директория для сборки: %s"
+
+msgid "partition or directory intended for assemble"
+msgstr "раздел или директория для сборки системы"
+
+msgid "partition must be specified with the '-d' option"
+msgstr "не задан раздел, опция '-d'"
+
+msgid "partition intended for assemble"
+msgstr "раздел для сборки системы"
+
+msgid "Checking portage repository"
+msgstr "Проверка репозитория портежей"
+
+msgid "Portage mirror: %s"
+msgstr "Зеркало для портежей: %s"
+
+msgid "Fetching portages"
+msgstr "Получение портежей"
+
+msgid "set the preferred mirror for Portage"
+msgstr "установить предпочитаемое зеркало для портежей"
+
+msgid ""
+"unmount the partition where the system is being assembled, when an error "
+"occurs"
+msgstr "отключить раздел с собираемой системой, если произошла ошибка"
diff --git ru/cl_builder_ru.po ru/cl_builder_ru.po
index df088ca..21184c0 100644
--- ru/cl_builder_ru.po
+++ ru/cl_builder_ru.po
@@ -446,3 +446,9 @@ msgstr "при первой загрузке использовать тольк
msgid "Create cache for %s's home directory"
msgstr "Создание кэша для домашней директории пользователя %s"
+
+msgid "Changing repository branch to '%s'"
+msgstr "Изменение ветки репозитория на '%s'"
+
+msgid "Changing {repname} repository branch to '{branch}'"
+msgstr "Изменение ветки репозитория {repname} на '{branch}'"

@ -1,22 +0,0 @@
diff --git ru/cl_builder_ru.po ru/cl_builder_ru.po
index 21184c0..d7d4e69 100644
--- ru/cl_builder_ru.po
+++ ru/cl_builder_ru.po
@@ -452,3 +452,6 @@ msgstr "Изменение ветки репозитория на '%s'"
msgid "Changing {repname} repository branch to '{branch}'"
msgstr "Изменение ветки репозитория {repname} на '{branch}'"
+
+msgid "Updating portage metadata"
+msgstr "Обновление метаданных портежей"
diff --git ru/cl_install_ru.po ru/cl_install_ru.po
index b5428e9..6565aa8 100644
--- ru/cl_install_ru.po
+++ ru/cl_install_ru.po
@@ -1036,3 +1036,6 @@ msgstr "Диск '%s' без таблицы разделов не может с
msgid "{0} or {1}"
msgstr "{0} или {1}"
+
+msgid "set I/O scheduler"
+msgstr "установить I/O планировщик"

@ -1,14 +0,0 @@
diff --git ru/cl_install_ru.po ru/cl_install_ru.po
index 4647d79..9a12e30 100644
--- ru/cl_install_ru.po
+++ ru/cl_install_ru.po
@@ -1051,3 +1051,9 @@ msgstr "Конфигурирование PXE установки"
msgid "You must to install %s package for PXE installation"
msgstr "Для PXE установки Вы должны установить %s пакет"
+
+msgid "PXE installation directory"
+msgstr "Директория PXE установки"
+
+msgid "Failed to found partition %s after changing the activity"
+msgstr "Не удалось найти раздел %s после смены флага активности"

@ -1,39 +0,0 @@
diff --git ru/cl_builder_ru.po ru/cl_builder_ru.po
index ad15205..7f9b170 100644
--- ru/cl_builder_ru.po
+++ ru/cl_builder_ru.po
@@ -473,3 +473,6 @@ msgstr "Язык по умолчанию"
msgid "Timezone by default"
msgstr "Часовой пояс по умолчанию"
+
+msgid "Updating portage"
+msgstr "Обновление портежей"
diff --git ru/cl_client_ru.po ru/cl_client_ru.po
index 1cce959..eb5fba6 100644
--- ru/cl_client_ru.po
+++ ru/cl_client_ru.po
@@ -407,3 +407,9 @@ msgstr "используется с параметром '-v'"
msgid "variable %s not found"
msgstr "переменная %s не найдена"
+
+msgid "Failed to make links archive"
+msgstr "Не удалось создать архив с сиволическими ссылками"
+
+msgid "Failed to unpack links archive"
+msgstr "Не удалось распаковать архив символических ссылок"
diff --git ru/cl_install_ru.po ru/cl_install_ru.po
index 4647d79..9a12e30 100644
--- ru/cl_install_ru.po
+++ ru/cl_install_ru.po
@@ -1051,3 +1051,9 @@ msgstr "Конфигурирование PXE установки"
msgid "You must to install %s package for PXE installation"
msgstr "Для PXE установки Вы должны установить %s пакет"
+
+msgid "PXE installation directory"
+msgstr "Директория PXE установки"
+
+msgid "Failed to found partition %s after changing the activity"
+msgstr "Не удалось найти раздел %s после смены флага активности"

@ -1,43 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of installation Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="minimal"
DEPEND="~sys-apps/calculate-templates-2.2.24
~sys-apps/calculate-lib-2.2.24
app-portage/layman
!app-misc/livecd-tools
!minimal? ( sys-boot/grub
sys-apps/gptfdisk
>=sys-apps/util-linux-2.19.1
sys-fs/dosfstools
sys-fs/squashfs-tools
sys-block/parted )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# support auto march, re-fix detect current version
# some fixes, fix sleep in xautologin, modify func for assemble
epatch "${FILESDIR}/calculate-install-2.2.24-r8.patch"
}
pkg_postinst() {
einfo "For configure calculate-install perform:"
einfo " cl-install --install"
}

@ -1,34 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of installation Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="minimal"
DEPEND="~sys-apps/calculate-templates-2.2.25
~sys-apps/calculate-lib-2.2.25
app-portage/layman
!app-misc/livecd-tools
!minimal? ( sys-boot/grub
sys-apps/gptfdisk
>=sys-apps/util-linux-2.19.1
sys-fs/dosfstools
sys-fs/squashfs-tools
sys-block/parted )"
RDEPEND="${DEPEND}"
pkg_postinst() {
einfo "For configure calculate-install perform:"
einfo " cl-install --install"
}

@ -1,42 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of installation Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="minimal"
DEPEND="~sys-apps/calculate-templates-2.2.26
~sys-apps/calculate-lib-2.2.26
app-portage/layman
!app-misc/livecd-tools
!minimal? ( sys-boot/grub
sys-apps/gptfdisk
>=sys-apps/util-linux-2.19.1
sys-fs/dosfstools
sys-fs/squashfs-tools
sys-block/parted )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# select scheduler
epatch "${FILESDIR}/calculate-install-2.2.26-r1.patch"
}
pkg_postinst() {
einfo "For configure calculate-install perform:"
einfo " cl-install --install"
}

@ -1,42 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of installation Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="minimal"
DEPEND="~sys-apps/calculate-templates-2.2.26
~sys-apps/calculate-lib-2.2.26
app-portage/layman
!app-misc/livecd-tools
!minimal? ( sys-boot/grub
sys-apps/gptfdisk
>=sys-apps/util-linux-2.19.1
sys-fs/dosfstools
sys-fs/squashfs-tools
sys-block/parted )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# select scheduler, fix set X and fbres
epatch "${FILESDIR}/calculate-install-2.2.26-r2.patch"
}
pkg_postinst() {
einfo "For configure calculate-install perform:"
einfo " cl-install --install"
}

@ -1,42 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of installation Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="minimal"
DEPEND="~sys-apps/calculate-templates-2.2.26
~sys-apps/calculate-lib-2.2.26
app-portage/layman
!app-misc/livecd-tools
!minimal? ( sys-boot/grub
sys-apps/gptfdisk
>=sys-apps/util-linux-2.19.1
sys-fs/dosfstools
sys-fs/squashfs-tools
sys-block/parted )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# add new variable
epatch "${FILESDIR}/calculate-install-2.2.26-r3.patch"
}
pkg_postinst() {
einfo "For configure calculate-install perform:"
einfo " cl-install --install"
}

@ -1,34 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of installation Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="minimal"
DEPEND="~sys-apps/calculate-templates-2.2.26
~sys-apps/calculate-lib-2.2.26
app-portage/layman
!app-misc/livecd-tools
!minimal? ( sys-boot/grub
sys-apps/gptfdisk
>=sys-apps/util-linux-2.19.1
sys-fs/dosfstools
sys-fs/squashfs-tools
sys-block/parted )"
RDEPEND="${DEPEND}"
pkg_postinst() {
einfo "For configure calculate-install perform:"
einfo " cl-install --install"
}

@ -1,46 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of installation Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="minimal pxe"
DEPEND="~sys-apps/calculate-templates-2.2.27
~sys-apps/calculate-lib-2.2.27
app-portage/layman
!app-misc/livecd-tools
!minimal? ( sys-boot/grub
sys-apps/gptfdisk
>=sys-apps/util-linux-2.19.1
sys-fs/dosfstools
sys-fs/squashfs-tools
sys-block/parted )
pxe? ( sys-apps/calculate-server
net-ftp/tftp-hpa
net-misc/dhcp
net-fs/nfs-utils )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix activity,boot nfs,install handbook
epatch "${FILESDIR}/calculate-install-2.2.27-r1.patch"
}
pkg_postinst() {
einfo "For configure calculate-install perform:"
einfo " cl-install --install"
}

@ -1,46 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
inherit distutils eutils
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate2/${PN}/${P}.tar.bz2"
DESCRIPTION="The program of installation Calculate Linux"
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="minimal pxe"
DEPEND="~sys-apps/calculate-templates-2.2.27
~sys-apps/calculate-lib-2.2.27
app-portage/layman
!app-misc/livecd-tools
!minimal? ( sys-boot/grub
sys-apps/gptfdisk
>=sys-apps/util-linux-2.19.1
sys-fs/dosfstools
sys-fs/squashfs-tools
sys-block/parted )
pxe? ( sys-apps/calculate-server
net-ftp/tftp-hpa
net-misc/dhcp
net-fs/nfs-utils )"
RDEPEND="${DEPEND}"
src_unpack() {
unpack "${A}"
cd "${S}"
# fix activity,boot nfs,install handbook
epatch "${FILESDIR}/calculate-install-2.2.27-r2.patch"
}
pkg_postinst() {
einfo "For configure calculate-install perform:"
einfo " cl-install --install"
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save