parent
ef1ed0a479
commit
df2f4bba03
@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The program of 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-core-3.2.0_beta1
|
||||
!<sys-apps/calculate-install-2.2.29
|
||||
app-portage/layman
|
||||
>=virtual/udev-197
|
||||
!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 )"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-install-3.2.0_beta1-r5.patch"
|
||||
}
|
@ -0,0 +1,166 @@
|
||||
diff --git install/variables/disk.py install/variables/disk.py
|
||||
index e65eac1..827081b 100644
|
||||
--- install/variables/disk.py
|
||||
+++ install/variables/disk.py
|
||||
@@ -1856,6 +1856,20 @@ class VariableOsInstallRootDev(ReadonlyVariable):
|
||||
else:
|
||||
return self.Get('os_root_dev')
|
||||
|
||||
+class VariableOsInstallRootUuid(ReadonlyVariable):
|
||||
+ def get(self):
|
||||
+ """UUID корневого устройства"""
|
||||
+ if self.Get('cl_action') == 'system':
|
||||
+ root_dev = self.Get('os_install_root_dev')
|
||||
+ return self.Select('os_install_disk_uuid',
|
||||
+ where='os_install_disk_dev',
|
||||
+ eq=root_dev,limit=1) or ''
|
||||
+ else:
|
||||
+ root_dev = self.Get('os_root_dev')
|
||||
+ return self.Select('os_disk_uuid',
|
||||
+ where='os_disk_dev',
|
||||
+ eq=root_dev,limit=1) or ''
|
||||
+
|
||||
class VariableOsInstallFstabMountConf(ReadonlyVariable,DeviceHelper):
|
||||
"""
|
||||
FStab.conf contains for mount and bind points
|
||||
diff --git install/variables/distr.py install/variables/distr.py
|
||||
index 2e0d32c..4da8e26 100644
|
||||
--- install/variables/distr.py
|
||||
+++ install/variables/distr.py
|
||||
@@ -505,9 +505,12 @@ class VariableClTarget(ReadonlyVariable):
|
||||
elif self.Get('os_install_pxe') == "on":
|
||||
return PxeDistributive(self.Get('os_install_pxe_path'))
|
||||
elif self.Get('os_install_root_type')=="flash":
|
||||
+ flashLabel = "{short}-{build}".format(
|
||||
+ short="CL", build=self.Get('os_install_linux_build'))
|
||||
return FlashDistributive(disk,mdirectory="/mnt/install",
|
||||
check=True, fileSystem=fileSystem,
|
||||
isFormat=isFormat, systemId=systemId,
|
||||
+ rootLabel=flashLabel,
|
||||
partitionTable=partTable)
|
||||
else:
|
||||
target = PartitionDistributive(disk,mdirectory='/mnt/install',
|
||||
diff --git install/variables/kernel.py install/variables/kernel.py
|
||||
index 926df72..2cf87fd 100644
|
||||
--- install/variables/kernel.py
|
||||
+++ install/variables/kernel.py
|
||||
@@ -104,13 +104,17 @@ class VariableOsInstallKernelAttr(Variable):
|
||||
def get(self):
|
||||
# on usb-hdd install must be "delay=5"
|
||||
attr = ""
|
||||
+ rdauto = ""
|
||||
if self.Get('os_install_root_type') == 'usb-hdd':
|
||||
attr = " scandelay=5"
|
||||
if self.Get('os_install_mdadm_set') == 'on':
|
||||
attr += " domdadm"
|
||||
+ rdauto = " rd.auto"
|
||||
if self.Get('os_install_lvm_set') == 'on':
|
||||
attr += " dolvm"
|
||||
- return attr
|
||||
+ if not rdauto:
|
||||
+ rdauto = " rd.auto"
|
||||
+ return attr + rdauto
|
||||
|
||||
class VariableOsInstallKernelResume(ReadonlyVariable):
|
||||
"""
|
||||
diff --git install/variables/net.py install/variables/net.py
|
||||
index 01b0032..a07cfe3 100644
|
||||
--- install/variables/net.py
|
||||
+++ install/variables/net.py
|
||||
@@ -34,6 +34,7 @@ from calculate.lib.utils import ip
|
||||
from calculate.lib.utils.portage import isPkgInstalled
|
||||
from operator import itemgetter
|
||||
from itertools import *
|
||||
+from functools import partial
|
||||
import hashlib
|
||||
from calculate.install.distr import DistributiveError
|
||||
|
||||
@@ -92,18 +93,24 @@ class VariableOsInstallNetInterfacesOrig(NetHelper,ReadonlyVariable):
|
||||
"""
|
||||
type = "list"
|
||||
|
||||
+ def is_classic_interface_name(self):
|
||||
+ hashsum = lambda x: hashlib.md5(readFile(x)).digest()
|
||||
+ chroot_path = self.Get('cl_chroot_path')
|
||||
+ etc_path_join = partial(path.join,
|
||||
+ chroot_path, 'etc/udev/rules.d')
|
||||
+ lib_path_join = partial(path.join,
|
||||
+ chroot_path, 'lib/udev/rules.d')
|
||||
+ udev_files = ('70-persistent-net.rules',
|
||||
+ '80-net-name-slot.rules',
|
||||
+ '80-net-setup-link.rules')
|
||||
+ for etc_file, lib_file in izip(map(etc_path_join,udev_files),
|
||||
+ map(lib_path_join,udev_files)):
|
||||
+ if path.exists(etc_file) and hashsum(etc_file) != hashsum(lib_file):
|
||||
+ return True
|
||||
+ return False
|
||||
+
|
||||
def get(self):
|
||||
- chrootPath = self.Get('cl_chroot_path')
|
||||
- pathOldUdevNet = path.join(chrootPath,
|
||||
- 'etc/udev/rules.d/70-persistent-net.rules')
|
||||
- pathNewUdevNet = path.join(chrootPath,
|
||||
- 'etc/udev/rules.d/80-net-name-slot.rules')
|
||||
- pathOrigUdevNet = path.join(chrootPath,
|
||||
- 'lib/udev/rules.d/80-net-name-slot.rules')
|
||||
- if path.exists(pathOldUdevNet) or \
|
||||
- (path.exists(pathNewUdevNet) and
|
||||
- hashlib.md5(readFile(pathNewUdevNet)).digest() != \
|
||||
- hashlib.md5(readFile(pathOrigUdevNet)).digest()):
|
||||
+ if self.is_classic_interface_name():
|
||||
return self.Get('os_install_net_interfaces')
|
||||
def getOrig(x):
|
||||
try:
|
||||
diff --git install/wsdl_install.py install/wsdl_install.py
|
||||
index bff5954..0fca47d 100644
|
||||
--- install/wsdl_install.py
|
||||
+++ install/wsdl_install.py
|
||||
@@ -65,7 +65,8 @@ class Wsdl(WsdlBase):
|
||||
normal=('os_install_locale_lang','os_install_clock_timezone')),
|
||||
lambda group:group(_("Distribution"),
|
||||
normal=('cl_image_filename',),
|
||||
- hide=('cl_image_linux_shortname','cl_image_arch_machine'),
|
||||
+ hide=('cl_image_linux_shortname','cl_image_arch_machine',
|
||||
+ 'cl_image_new_only'),
|
||||
expert=('cl_image_linux_shortname', 'cl_image_arch_machine',
|
||||
'cl_image_new_only')),
|
||||
lambda group:group(_("Allocate drive space"),
|
||||
@@ -95,8 +96,6 @@ class Wsdl(WsdlBase):
|
||||
expert=('cl_install_home_crypt_set',),
|
||||
hide=('cl_migrate_data',),
|
||||
brief=('cl_migrate_user',)),
|
||||
- lambda group:group(_("Audio"),
|
||||
- normal=('os_audio_default',)),
|
||||
lambda group:group(_("Video"),
|
||||
normal=('os_install_x11_video_drv','os_install_x11_composite',
|
||||
'os_install_x11_resolution','os_install_fb_resolution',
|
||||
@@ -154,28 +153,8 @@ class Wsdl(WsdlBase):
|
||||
expert=('os_install_pxe_path',
|
||||
'os_install_pxe_ip'),
|
||||
next_label=_("Install"))]},
|
||||
- # настройка аудио
|
||||
- {
|
||||
- 'method_name':"setup_audio",
|
||||
- 'category':__("Configuration"),
|
||||
- 'title':__("Audio"),
|
||||
- 'image':'audio-card',
|
||||
- 'command':'cl-setup-audio',
|
||||
- 'gui':True,
|
||||
- 'rights':['setupaudio'],
|
||||
- 'logic':{'Install':install.Install},
|
||||
- 'action':ClSetupAudioAction,
|
||||
- 'datavars':"install",
|
||||
- 'native_error':(VariableError,DataVarsError,install.InstallError),
|
||||
- 'setvars':{'cl_action!':'merge','cl_merge_pkg!':[None],
|
||||
- 'cl_merge_set!':"on",'cl_setup':'audio'},
|
||||
- 'groups':[
|
||||
- lambda group:group(_("Audio"),
|
||||
- normal=('os_audio_default',),
|
||||
- expert=('cl_templates_locate',"cl_dispatch_conf","cl_verbose_set"),
|
||||
- next_label=_("Save"))]},
|
||||
- {
|
||||
# настройка загрузки системы
|
||||
+ {
|
||||
'method_name':"setup_boot",
|
||||
'category':__("Configuration"),
|
||||
'title':__("Boot"),
|
@ -0,0 +1,37 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The library for Calculate 3"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="minimal"
|
||||
DEPEND="!minimal? ( dev-python/py-smbpasswd )
|
||||
>=dev-python/pyxml-0.8
|
||||
sys-apps/iproute2
|
||||
sys-apps/pciutils
|
||||
dev-python/progressbar
|
||||
sys-fs/lvm2
|
||||
sys-fs/mdadm
|
||||
dev-python/pyinotify
|
||||
sys-apps/file[python]"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-lib-3.2.0_beta1-r2.patch"
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
diff --git calculate/lib/cl_template.py calculate/lib/cl_template.py
|
||||
index fe055a8..ab79671 100644
|
||||
--- calculate/lib/cl_template.py
|
||||
+++ calculate/lib/cl_template.py
|
||||
@@ -4516,6 +4516,9 @@ gettext -d cl_template "$*"
|
||||
if self.objVar.Get('cl_verbose_set') == 'on' and \
|
||||
self.filesApply:
|
||||
self.verboseOutput(self.filesApply)
|
||||
+ self.objVar.Set('cl_merge_pkg_pass',[],force=True)
|
||||
+ self.objVar.Set('cl_merge_pkg_new',[],force=True)
|
||||
+ self.objVar.Set('cl_merge_pkg',[],force=True)
|
||||
return (self.createdDirs, self.filesApply)
|
||||
|
||||
def verboseOutput(self,filesApply):
|
||||
diff --git calculate/lib/variables/__init__.py calculate/lib/variables/__init__.py
|
||||
index 9d3cf79..a8e307b 100644
|
||||
--- calculate/lib/variables/__init__.py
|
||||
+++ calculate/lib/variables/__init__.py
|
||||
@@ -41,4 +41,4 @@ class VariableClVer(ReadonlyVariable):
|
||||
"""
|
||||
Package version
|
||||
"""
|
||||
- value = "3.2.0.1"
|
||||
+ value = "3.2.0.2"
|
@ -0,0 +1,38 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The program of update Calculate Linux"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="~sys-apps/calculate-core-3.2.0_beta1
|
||||
~sys-apps/calculate-install-3.2.0_beta1
|
||||
dev-python/pexpect"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_preinst() {
|
||||
dosym /usr/sbin/cl-core /usr/sbin/cl-update
|
||||
dosym /usr/sbin/cl-core /usr/sbin/cl-update-profile
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-update-3.2.0_beta1-r2.patch"
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
diff --git update/utils/cl_update.py update/utils/cl_update.py
|
||||
index 0a815ff..50e8ae2 100644
|
||||
--- update/utils/cl_update.py
|
||||
+++ update/utils/cl_update.py
|
||||
@@ -277,13 +277,6 @@ class ClUpdateAction(Action):
|
||||
'condition': lambda Get: (Get('cl_update_rev_set') == 'on' or
|
||||
Get('cl_rebuild_world_set') == 'on')
|
||||
},
|
||||
- {'name': 'world',
|
||||
- 'message': __("Updating the list of system packages"),
|
||||
- 'method': 'Update.applyTemplates(install.cl_source,'
|
||||
- 'cl_template_clt_set,True,None,False)',
|
||||
- 'condition': lambda Get: (Get('cl_update_rev_set') == 'on' or
|
||||
- Get('cl_rebuild_world_set') == 'on')
|
||||
- },
|
||||
{'name': 'dispatch_conf',
|
||||
'message': __("Updating configuration files"),
|
||||
'method':'Update.dispatchConf()',
|
||||
diff --git update/utils/cl_update_profile.py update/utils/cl_update_profile.py
|
||||
index 20121a1..74ddaf7 100644
|
||||
--- update/utils/cl_update_profile.py
|
||||
+++ update/utils/cl_update_profile.py
|
||||
@@ -39,8 +39,6 @@ class ClUpdateProfileAction(Action):
|
||||
|
||||
# список задач для дейсвия
|
||||
tasks = [
|
||||
- {'name': 'check_run',
|
||||
- 'method': 'Update.checkRun(cl_update_wait_another_set)'},
|
||||
{'name': 'migrate_repository',
|
||||
'method': 'Update.migrateCacheRepository('
|
||||
'cl_update_profile_rep,cl_update_profile_branch)',
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="Calculate Utilities meta package"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="cl_consolegui cl_client cl_desktop cl_console"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
=sys-apps/calculate-install-3.2.0_beta1-r5
|
||||
=sys-apps/calculate-i18n-3.2.0_beta1
|
||||
=sys-apps/calculate-lib-3.2.0_beta1-r2
|
||||
=sys-apps/calculate-core-3.2.0_beta1-r1
|
||||
=sys-apps/calculate-update-3.2.0_beta1-r2
|
||||
cl_client? ( =sys-apps/calculate-client-3.2.0_beta1 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.2.0_beta1 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.2.0_beta1 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.2.0_beta1 )
|
||||
"
|
Loading…
Reference in new issue