parent
da740e3c56
commit
ed9b855443
@ -0,0 +1,28 @@
|
||||
# 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/calculate3/${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="3"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND=">=sys-apps/calculate-lib-3.0.0_beta3"
|
||||
|
||||
DEPEND="sys-devel/gettext
|
||||
${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# fix translate
|
||||
epatch "${FILESDIR}/calculate-i18n-3.0.0_beta3-r2.patch"
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
diff --git ru/cl_install3.po ru/cl_install3.po
|
||||
index 57201f6..2c91b64 100644
|
||||
--- ru/cl_install3.po
|
||||
+++ ru/cl_install3.po
|
||||
@@ -735,7 +735,7 @@ msgid "user settings"
|
||||
msgstr "настройки пользователей"
|
||||
|
||||
msgid "Boot configuration is not available on LiveCD"
|
||||
-msgstr "Разметка не доступна при авторазметке"
|
||||
+msgstr "Настройка загрузки не доступна на LiveCD"
|
||||
|
||||
msgid "Configure only mutable parameters"
|
||||
msgstr "Конфигурировать только изменяемые параметры"
|
||||
@@ -1084,3 +1084,27 @@ msgstr "Конфигурировать только динамические п
|
||||
|
||||
msgid "configure only dynamic parameters"
|
||||
msgstr "конфигурировать только динамические параметры"
|
||||
+
|
||||
+msgid "Network interface, DHCP, IP address and network mask (example:%s)"
|
||||
+msgstr "Сетевой интерфейс, HDCP, IP-адрес и маска сети (пример:%s)"
|
||||
+
|
||||
+msgid "select location templates %s"
|
||||
+msgstr "выбор местонахождения шаблонов %s"
|
||||
+
|
||||
+msgid "locate must be from list 'overlay','local','remote','clt'"
|
||||
+msgstr "местонахождение шаблонов должно быть из списка 'overlay','local','remote','clt'"
|
||||
+
|
||||
+msgid "Location templates"
|
||||
+msgstr "Местонахождение шаблонов"
|
||||
+
|
||||
+msgid "Overlay templates"
|
||||
+msgstr "Overlay шаблоны"
|
||||
+
|
||||
+msgid "Local templates"
|
||||
+msgstr "Локальные шаблоны"
|
||||
+
|
||||
+msgid "Remote templates"
|
||||
+msgstr "Удалённые шаблоны"
|
||||
+
|
||||
+msgid "clt templates"
|
||||
+msgstr "clt шаблоны"
|
@ -0,0 +1,48 @@
|
||||
# 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/calculate3/${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="3"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="pxe minimal"
|
||||
|
||||
DEPEND="~sys-apps/calculate-lib-3.0.0_beta3
|
||||
!<sys-apps/calculate-install-2.2.29
|
||||
app-portage/layman
|
||||
!app-misc/livecd-tools
|
||||
sys-apps/iproute2[-minimal]
|
||||
!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}"
|
||||
|
||||
# locate tamplates
|
||||
epatch "${FILESDIR}/calculate-install-3.0.0_beta3-locate_templates.patch"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "For install wsdl for calculate-install perform:"
|
||||
einfo " cl-core --append-variable cl_wsdl=calculate-install"
|
||||
einfo " cl-core --append-variable cl_merges=calculate-install"
|
||||
}
|
@ -0,0 +1,218 @@
|
||||
diff --git data/calculate data/calculate
|
||||
index 23aaee8..70b2ad8 100644
|
||||
--- data/calculate
|
||||
+++ data/calculate
|
||||
@@ -111,10 +111,10 @@ configure_users() {
|
||||
|
||||
start() {
|
||||
/usr/sbin/cl-core --append-variable cl_wsdl=calculate-install
|
||||
- /usr/sbin/cl-core --append-variable cl_merge=calculate-install
|
||||
+ /usr/sbin/cl-core --append-variable cl_merges=calculate-install
|
||||
install_video_driver
|
||||
LANG=C create_nonroot_user
|
||||
- LANG=C /usr/sbin/cl-core --method configure_system --no-progress --live
|
||||
+ LANG=C /usr/sbin/cl-core --method setup_system --no-progress --live
|
||||
LANG=C configure_users
|
||||
|
||||
/usr/sbin/env-update
|
||||
diff --git install/cl_install.py install/cl_install.py
|
||||
index a5f53ef..59665ac 100644
|
||||
--- install/cl_install.py
|
||||
+++ install/cl_install.py
|
||||
@@ -181,14 +181,60 @@ class Install(color_print):
|
||||
"""Apply templates for root of system."""
|
||||
#self.clVars.Set("cl_root_path","/", True)
|
||||
self.clVars.Set("cl_chroot_path","/", True)
|
||||
- self.clTempl = ProgressTemplate(self.setProgress,self.clVars,
|
||||
- cltFilter=False)
|
||||
- dirsFiles = self.clTempl.applyTemplates()
|
||||
- if self.clTempl.getError():
|
||||
- self.printERROR(self.clTempl.getError())
|
||||
- return False
|
||||
- else:
|
||||
- return dirsFiles
|
||||
+ templates_locate = self.clVars.Get('cl_templates_locate')
|
||||
+
|
||||
+# cltObj = True if 'clt' in templates_locate else False
|
||||
+ dirs_list, files_list = ([],[])
|
||||
+ listTemplatePaths = self.clVars.Get("cl_template_path")
|
||||
+ for location in templates_locate:
|
||||
+ if location in ("overlay", "local", "remote", "clt"):
|
||||
+ if len(listTemplatePaths) != 3:
|
||||
+ self.printERROR(\
|
||||
+ _("Error in template variable 'cl_template_path=%s'")\
|
||||
+ %str(listTemplatePaths))
|
||||
+ return False
|
||||
+ elif location == "local":
|
||||
+ self.clVars.Set("cl_template_path",
|
||||
+ [listTemplatePaths[1]], True)
|
||||
+ elif location == "remote":
|
||||
+ self.clVars.Set("cl_template_path",
|
||||
+ [listTemplatePaths[2]], True)
|
||||
+ elif location == "overlay":
|
||||
+ self.clVars.Set("cl_template_path",
|
||||
+ [listTemplatePaths[0]], True)
|
||||
+ elif location == "clt":
|
||||
+# list_paths = ['/etc'] + \
|
||||
+# os.environ.get('CONFIG_PROTECT').split()
|
||||
+# for template_path in list_paths:
|
||||
+# if not os.path.isdir(template_path):
|
||||
+# continue
|
||||
+# print template_path
|
||||
+# self.clVars.Set("cl_template_path",
|
||||
+# [template_path], True)
|
||||
+# self.clTempl = ProgressTemplate(self.setProgress,
|
||||
+# self.clVars,cltObj=True,
|
||||
+# cltFilter=True)
|
||||
+#
|
||||
+# dirsFiles = self.clTempl.applyTemplates()
|
||||
+# # cltObj = False
|
||||
+# print dirsFiles
|
||||
+# dirs_list += (dirsFiles[0])
|
||||
+# files_list += (dirsFiles[1])
|
||||
+ continue
|
||||
+
|
||||
+ self.clTempl = ProgressTemplate(self.setProgress, self.clVars,
|
||||
+ cltFilter=False)
|
||||
+
|
||||
+ dirsFiles = self.clTempl.applyTemplates()
|
||||
+ dirs_list += (dirsFiles[0])
|
||||
+ files_list += (dirsFiles[1])
|
||||
+ try:
|
||||
+ if self.clTempl.getError():
|
||||
+ self.printERROR(self.clTempl.getError())
|
||||
+ return False
|
||||
+ except AttributeError:
|
||||
+ pass
|
||||
+ return (dirs_list, files_list)
|
||||
|
||||
def applyTemplatesFlash(self,directory):
|
||||
"""Apply templates for root of system."""
|
||||
@@ -940,9 +986,8 @@ class Install(color_print):
|
||||
self.applyTemplatesFlash('/')
|
||||
else:
|
||||
self.startTask(
|
||||
- _("Configuring flash installation"))
|
||||
- self.applyTemplatesFlash(targetDistr.getDirectory(),
|
||||
- progress=True)
|
||||
+ _("Configuring flash installation"),progress=True)
|
||||
+ self.applyTemplatesFlash(targetDistr.getDirectory())
|
||||
self.endTask()
|
||||
self.closeClTemplate()
|
||||
# change boot config
|
||||
diff --git install/cl_wsdl_install.py install/cl_wsdl_install.py
|
||||
index 3cb6710..27bba63 100644
|
||||
--- install/cl_wsdl_install.py
|
||||
+++ install/cl_wsdl_install.py
|
||||
@@ -76,6 +76,7 @@ class InstallInfo(ClassSerializer):
|
||||
cl_autopartition_root_size = String
|
||||
|
||||
cl_live = Boolean
|
||||
+ cl_templates_locate = Array(String)
|
||||
|
||||
os_install_pxe = Boolean
|
||||
os_install_pxe_path = String
|
||||
@@ -154,7 +155,8 @@ class Wsdl:
|
||||
|
||||
@rpc(Integer, InstallInfo, _returns = Array(ReturnedMessage))
|
||||
@core_method(category=__('Installation'),title=__('System installation'),
|
||||
- image='system-installer,applications-other,drive-harddisk',
|
||||
+ image='calculate-install,system-installer,applications-other,'
|
||||
+ 'drive-harddisk',
|
||||
gui=True,command='cl-install',
|
||||
rights=['install'])
|
||||
def install ( self, sid, info):
|
||||
@@ -476,6 +478,7 @@ class Wsdl:
|
||||
dv.Set('cl_action','merge',True)
|
||||
dv.addGroup(None,
|
||||
normal=("cl_live",),
|
||||
+ expert=('cl_templates_locate',),
|
||||
next_label=_("Reconfigure"))
|
||||
return dv
|
||||
|
||||
diff --git install/variables/disk.py install/variables/disk.py
|
||||
index a2e8078..39be7f5 100644
|
||||
--- install/variables/disk.py
|
||||
+++ install/variables/disk.py
|
||||
@@ -1639,5 +1639,6 @@ class VariableOsInstallDiskSingle(Variable):
|
||||
self.Get('os_disk_parent')))
|
||||
deviceParentMap = dict(self.ZipVars('os_device_dev','os_device_name'))
|
||||
return map(lambda x:(x,"%s (%s)"%(x,
|
||||
- deviceParentMap.get(diskParentMap.get(x,x),_("Unknown")))),
|
||||
+ deviceParentMap.get(diskParentMap.get(x,x),
|
||||
+ _("Unknown")))),
|
||||
self.availDevs())+[("","")]
|
||||
diff --git install/variables/net.py install/variables/net.py
|
||||
index df2ae35..306a396 100644
|
||||
--- install/variables/net.py
|
||||
+++ install/variables/net.py
|
||||
@@ -118,7 +118,9 @@ class VariableOsInstallNetData(NetHelper,TableVariable):
|
||||
|
||||
def init(self):
|
||||
self.label = _("Addresses")
|
||||
- self.help = _("IP address with network (example:%s)")%"192.168.1.1/24"
|
||||
+# self.help = _("IP address with network (example:%s)")%"192.168.1.1/24"
|
||||
+ self.help = _("Network interface, DHCP, IP address and network mask "
|
||||
+ "(example:%s)")%" --ip eth0:off:192.168.1.1:24"
|
||||
|
||||
class VariableOsInstallNetHostname(NetHelper,Variable):
|
||||
"""
|
||||
@@ -585,12 +587,13 @@ class VariableOsInstallNetConf(NetHelper,Variable):
|
||||
if filter(lambda x:x.lower() == ("networkmanager"),
|
||||
listDirectory('/etc/runlevels/boot')+
|
||||
listDirectory('/etc/runlevels/default')) \
|
||||
- or self.Get('os_install_root_type') == "livecd":
|
||||
+ or self.Get('os_root_type') == "livecd":
|
||||
nm = "networkmanager"
|
||||
else:
|
||||
nm = ""
|
||||
for val,comment in self.Get('os_install_net_conf_available'):
|
||||
- if nm == val:
|
||||
+ if nm == val and not (self.Get('os_root_dev') == '/dev/nfs' and \
|
||||
+ self.Get('os_install_root_type') == "livecd"):
|
||||
return nm
|
||||
else:
|
||||
return "openrc"
|
||||
diff --git install/variables/system.py install/variables/system.py
|
||||
index 1efd0a8..76c6665 100644
|
||||
--- install/variables/system.py
|
||||
+++ install/variables/system.py
|
||||
@@ -458,6 +458,29 @@ class VariableClLive(Variable):
|
||||
self.label = _("Configure only dynamic parameters")
|
||||
self.help = _("configure only dynamic parameters")
|
||||
|
||||
+class VariableClTemplatesLocate(Variable):
|
||||
+ """
|
||||
+ Location templates
|
||||
+ """
|
||||
+ type = "choice-list"
|
||||
+ value = ['overlay','local','remote','clt']
|
||||
+ element = "selecttable"
|
||||
+ opt = ["-l","--locate"]
|
||||
+ metavalue = "TEMPLATES"
|
||||
+ untrusted = True
|
||||
+
|
||||
+ def init(self):
|
||||
+ self.label = _("Location templates")
|
||||
+ self.help = _("select location templates %s") \
|
||||
+ %"'overlay','local','remote','clt'"
|
||||
+
|
||||
+ def choice(self):
|
||||
+ return [
|
||||
+ ('overlay',_('Overlay templates')),
|
||||
+ ('local',_('Local templates')),
|
||||
+ ('remote',_('Remote templates')),
|
||||
+ ('clt',_('clt templates'))]
|
||||
+
|
||||
class VariableOsInstallPxe(ReadonlyVariable):
|
||||
"""
|
||||
Installation for PXE loading
|
||||
@@ -473,7 +496,7 @@ class VariableOsInstallPxe(ReadonlyVariable):
|
||||
for pkg in ['net-misc/dhcp','net-ftp/tftp-hpa','net-fs/nfs-utils']:
|
||||
if not isPkgInstalled(pkg):
|
||||
raise VariableError(
|
||||
- _("You must to install %s package for PXE installation")
|
||||
+ _("You must to install %s package for PXE installation")
|
||||
%pkg)
|
||||
try:
|
||||
config = cl_template.iniParser('/etc/calculate/calculate.env')
|
@ -0,0 +1,24 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="Calculate Utilities meta package"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="cl_consolegui cl_console"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
=sys-apps/calculate-install-3.0.0_beta3-r5
|
||||
=sys-apps/calculate-i18n-3.0.0_beta3-r2
|
||||
=sys-apps/calculate-lib-3.0.0_beta3-r1
|
||||
=sys-apps/calculate-core-3.0.0_beta3-r4
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.0.0_beta3-r2 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.0.0_beta3-r1 )
|
||||
"
|
||||
|
Loading…
Reference in new issue