parent
2a7fad4793
commit
1e9c064894
@ -0,0 +1,45 @@
|
||||
# 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=""
|
||||
IUSE="pxe minimal"
|
||||
|
||||
DEPEND="~sys-apps/calculate-core-3.1.5_alpha2
|
||||
!<sys-apps/calculate-install-2.2.29
|
||||
app-portage/layman
|
||||
>=sys-fs/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 )"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-install-3.1.5_alpha2-r2.patch"
|
||||
}
|
@ -0,0 +1,179 @@
|
||||
diff --git install/cl_distr.py install/cl_distr.py
|
||||
index f88801f..8c9fe53 100644
|
||||
--- install/cl_distr.py
|
||||
+++ install/cl_distr.py
|
||||
@@ -34,7 +34,8 @@ from calculate.lib.utils.files import (runOsCommand,isMount,removeDir,
|
||||
readLinesFile,getProgPath,listDirectory,checkUtils)
|
||||
from calculate.lib.utils.common import getTupleVersion,cmpVersion
|
||||
from calculate.lib.utils.device import (detectDeviceForPartition,
|
||||
- getUdevDeviceInfo, countPartitions)
|
||||
+ getUdevDeviceInfo, countPartitions,
|
||||
+ refreshUdev)
|
||||
from calculate.lib.variables.linux import LinuxDataVars,Linux
|
||||
from calculate.lib.cl_vars_share import varsShare
|
||||
from calculate.lib.cl_template import _terms
|
||||
diff --git install/cl_install.py install/cl_install.py
|
||||
index c55644a..f179743 100644
|
||||
--- install/cl_install.py
|
||||
+++ install/cl_install.py
|
||||
@@ -616,7 +616,8 @@ class Install(color_print):
|
||||
if self.clVars.Get('cl_setup') == 'boot' and \
|
||||
self.clVars.Get('os_root_type') != 'livecd':
|
||||
target = self.clVars.Get('cl_image')
|
||||
- if self.clVars.Get('os_install_mbr'):
|
||||
+ if self.clVars.Get('os_install_mbr') or \
|
||||
+ self.clVars.Get('os_install_uefi_set') == 'on':
|
||||
self.startTask(_("Installing the bootloader"))
|
||||
self.prepareBoot(target)
|
||||
self.endTask()
|
||||
@@ -679,7 +680,7 @@ class Install(color_print):
|
||||
self.clVars.Get('cl_autopartition_disk_data'),
|
||||
self.clVars.GetBool('cl_autopartition_lvm_set'),
|
||||
self.clVars.Get('cl_autopartition_lvm_vgname'),
|
||||
- self.clVars.Get('cl_autopartition_bios_grub_set'))
|
||||
+ self.clVars.Get('cl_autopartition_bios_grub_set')=="on")
|
||||
self.endTask()
|
||||
self.targetDistr = self.clVars.Get('cl_target')
|
||||
self.sourceDistr = self.clVars.Get('cl_image')
|
||||
@@ -723,7 +724,8 @@ class Install(color_print):
|
||||
self.endTask()
|
||||
self.closeClTemplate()
|
||||
# change boot config
|
||||
- if self.clVars.Get('os_install_mbr') and \
|
||||
+ if (self.clVars.Get('os_install_mbr') or
|
||||
+ self.clVars.Get('os_install_uefi_set') == 'on') and \
|
||||
self.clVars.Get('os_install_pxe') == "off":
|
||||
self.startTask(_("Preparing the system for reboot"))
|
||||
self.prepareBoot(self.targetDistr)
|
||||
diff --git install/variables/autopartition.py install/variables/autopartition.py
|
||||
index 016fb07..3111141 100644
|
||||
--- install/variables/autopartition.py
|
||||
+++ install/variables/autopartition.py
|
||||
@@ -24,7 +24,7 @@ from calculate.lib.datavars import TableVariable,Variable,VariableError, \
|
||||
from calculate.lib.utils.device import (getUdevDeviceInfo,getDeviceType,
|
||||
getPartitionType,getPartitionDevice,getRaidPartitions,
|
||||
getLvmPartitions,getPartitionSize,getUUIDDict,
|
||||
- humanreadableSize)
|
||||
+ humanreadableSize,refreshUdev)
|
||||
from calculate.lib.utils.files import (listDirectory,pathJoin,readFile,FStab,
|
||||
readLinesFile,process,getProgPath)
|
||||
from calculate.install.cl_distr import PartitionDistributive
|
||||
@@ -80,8 +80,9 @@ class AutoPartition:
|
||||
self.recreateLvm(table,device,data,vgname,bios_grub)
|
||||
else:
|
||||
self.recreatePartitionTable(table,device,data,bios_grub)
|
||||
+ refreshUdev()
|
||||
|
||||
- def recreatePartitionTable(self,table,device,data):
|
||||
+ def recreatePartitionTable(self,table,device,data,bios_grub):
|
||||
"""
|
||||
"""
|
||||
mapDispatch = {'dos':self.recreatePartitionTableDos,
|
||||
@@ -145,7 +146,7 @@ class AutoPartition:
|
||||
for size in map(lambda x:str(Sizes().to_K(int(x))) \
|
||||
if x.isdigit() else x,
|
||||
map(operator.itemgetter(3),data)):
|
||||
- if num == BIOS_BOOT_PART_NUM:
|
||||
+ if num == BIOS_BOOT_PART_NUM and not biosBootCreated:
|
||||
fdisk.write(NEW_BIOSBOOT_PARTITION%
|
||||
("+%s"%BIOS_BOOT_PART_SIZE))
|
||||
biosBootCreated = True
|
||||
@@ -250,7 +251,7 @@ class AutoPartition:
|
||||
'--zero-superblock',disk_dev)
|
||||
return not failed
|
||||
|
||||
- def recreateLvm(self,table,devices,data,vgname):
|
||||
+ def recreateLvm(self,table,devices,data,vgname,bios_grub):
|
||||
"""
|
||||
Create GPT partition table by /sbin/gdisk
|
||||
"""
|
||||
@@ -259,10 +260,10 @@ class AutoPartition:
|
||||
DEV,MP,FS,SIZE,TABLE=0,1,2,3,4
|
||||
notInLvm = filter(lambda x:"boot" in x[MP],data)
|
||||
self.recreatePartitionTable(table,
|
||||
- [device],notInLvm+[['','','','allfree']])
|
||||
+ [device],notInLvm+[['','','','allfree']],bios_grub)
|
||||
else:
|
||||
self.recreatePartitionTable(table,
|
||||
- [device],[['','','','allfree']])
|
||||
+ [device],[['','','','allfree']],bios_grub)
|
||||
|
||||
lvmPartOffset = 1 + len(notInLvm)
|
||||
iPart = [lvmPartOffset]+[1]*(len(devices)-1)
|
||||
@@ -487,6 +488,7 @@ class VariableClAutopartitionScheme(AutopartitionHelper,Variable,AutoPartition):
|
||||
element = "selecttable"
|
||||
opt = ["--auto-scheme"]
|
||||
metavalue = "AUTOPARTOPTS"
|
||||
+ check_after = ["cl_autopartition_table"]
|
||||
|
||||
def init(self):
|
||||
self.help = _("autopartition options")
|
||||
@@ -524,13 +526,14 @@ class VariableClAutopartitionScheme(AutopartitionHelper,Variable,AutoPartition):
|
||||
if self.Get('cl_autopartition_table') != 'gpt':
|
||||
raise VariableError(
|
||||
_("Partition table must be GPT for using UEFI bootloader"))
|
||||
+ else:
|
||||
+ if self.Get('cl_autopartition_table') == 'gpt' and not "grub" in value:
|
||||
+ raise VariableError(
|
||||
+ _("For grub installation need bios_grub partition"))
|
||||
if "grub" in value:
|
||||
if self.Get('cl_autopartition_table') != 'gpt':
|
||||
raise VariableError(
|
||||
_("Partition table must be GPT for bios_grub partition"))
|
||||
- if self.Get('cl_autopartition_table') != 'gpt' and not "grub" in value:
|
||||
- raise VariableError(
|
||||
- _("For grub installation need bios_grub partition"))
|
||||
|
||||
|
||||
class VariableClAutopartitionRootSize(AutopartitionHelper,Variable):
|
||||
@@ -670,7 +673,7 @@ class VariableClAutopartitionDiskDev(ReadonlyVariable,AutopartitionHelper):
|
||||
for line in self.deviceOpts(scheme):
|
||||
# for dos 4 - extension
|
||||
# for gpt 4 - for bios_boot
|
||||
- if number == 4:
|
||||
+ if number == 4 and self.Get('cl_autopartition_bios_grub_set')=='on':
|
||||
number += 1
|
||||
yield "%s%d"%(devices[0],number)
|
||||
number += 1
|
||||
@@ -682,7 +685,8 @@ class VariableClAutopartitionDiskDev(ReadonlyVariable,AutopartitionHelper):
|
||||
'root2':'root'}.get(x,x),
|
||||
self.deviceOpts(scheme)):
|
||||
if line in ("boot","uefi"):
|
||||
- if number == 4:
|
||||
+ if number == 4 and \
|
||||
+ self.Get('cl_autopartition_bios_grub_set')=='on':
|
||||
number += 1
|
||||
yield "%s%d"%(devices[0],number)
|
||||
number += 1
|
||||
diff --git install/variables/disk.py install/variables/disk.py
|
||||
index 92f275f..d2d2ba9 100644
|
||||
--- install/variables/disk.py
|
||||
+++ install/variables/disk.py
|
||||
@@ -986,8 +986,8 @@ class VariableOsLocationFormat(LocationHelper,Variable):
|
||||
return "vfat"
|
||||
if dev in diskFormat and diskFormat[dev] in availFS:
|
||||
if mount.count('/') == 1:
|
||||
- if FileSystemManager.checkFSForType(diskFormat[dev],
|
||||
- osInstallRootType):
|
||||
+ if FileSystemManager.checkFSForTypeMount(diskFormat[dev],
|
||||
+ osInstallRootType,mount):
|
||||
return diskFormat[dev]
|
||||
else:
|
||||
return diskFormat[dev]
|
||||
diff --git install/variables/kernel.py install/variables/kernel.py
|
||||
index ae2a8f0..0de0cd5 100644
|
||||
--- install/variables/kernel.py
|
||||
+++ install/variables/kernel.py
|
||||
@@ -93,7 +93,11 @@ class VariableOsInstallKernelResume(ReadonlyVariable):
|
||||
for dev, install in zip(self.Get('os_install_disk_use'),
|
||||
self.Get('os_install_disk_mount')):
|
||||
if install == "swap":
|
||||
- return "real_resume=%s"%dev
|
||||
+ if self.Get('os_install_linux_system') == 'desktop':
|
||||
+ return \
|
||||
+ "tuxonice tuxonice_resume=%s real_resume=%s"%(dev,dev)
|
||||
+ else:
|
||||
+ return "real_resume=%s"%dev
|
||||
return ""
|
||||
|
||||
class KernelHelper:
|
@ -0,0 +1,35 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
PYTHON_DEPEND="2:2.7"
|
||||
RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.*"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
SRC_URI="ftp://ftp.calculate.ru/pub/calculate/calculate3/${PN}/${P}.tar.bz2"
|
||||
|
||||
DESCRIPTION="The library for Calculate 3"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate2"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS=""
|
||||
IUSE="minimal"
|
||||
DEPEND="!minimal? ( dev-python/py-smbpasswd )
|
||||
>=dev-python/pyxml-0.8
|
||||
sys-apps/iproute2
|
||||
sys-apps/pciutils
|
||||
sys-fs/lvm2
|
||||
sys-fs/mdadm
|
||||
dev-python/pyinotify
|
||||
sys-apps/file[python]"
|
||||
RDEPEND="${DEPEND}"
|
||||
src_unpack() {
|
||||
unpack "${A}"
|
||||
cd "${S}"
|
||||
|
||||
# apply revision changes
|
||||
epatch "${FILESDIR}/calculate-lib-3.1.5_alpha2-r1.patch"
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
diff --git calculate/lib/utils/device.py calculate/lib/utils/device.py
|
||||
index 4f89891..d9eeee6 100644
|
||||
--- calculate/lib/utils/device.py
|
||||
+++ calculate/lib/utils/device.py
|
||||
@@ -405,7 +405,7 @@ def refreshUdev(onlyTrigger=False):
|
||||
"""Run command which refresh information about device in udev"""
|
||||
if not onlyTrigger:
|
||||
getUdevDeviceInfo.clearCache()
|
||||
- udevadm = getProgPath('/sbin/udevadm')
|
||||
+ udevadm = getProgPath('/bin/udevadm')
|
||||
if udevadm:
|
||||
blkidFile = '/etc/blkid.tab'
|
||||
try:
|
||||
@@ -414,6 +414,7 @@ def refreshUdev(onlyTrigger=False):
|
||||
except:
|
||||
pass
|
||||
process(udevadm,"trigger","--subsystem-match","block").success()
|
||||
+ process(udevadm,"settle","--timeout=15").success()
|
||||
|
||||
def getCommonDeviceName(dev):
|
||||
"""
|
@ -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=""
|
||||
IUSE="cl_consolegui cl_client cl_desktop cl_console"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
=sys-apps/calculate-install-3.1.5_alpha2-r2
|
||||
=sys-apps/calculate-i18n-3.1.5_alpha2
|
||||
=sys-apps/calculate-lib-3.1.5_alpha2-r1
|
||||
=sys-apps/calculate-core-3.1.5_alpha2
|
||||
=sys-apps/calculate-update-3.1.5_alpha2
|
||||
cl_client? ( =sys-apps/calculate-client-3.1.5_alpha2 )
|
||||
cl_desktop? ( =sys-apps/calculate-desktop-3.1.5_alpha2 )
|
||||
cl_consolegui? ( =sys-apps/calculate-console-gui-3.1.5_alpha2 )
|
||||
cl_console? ( =sys-apps/calculate-console-3.1.5_alpha2 )
|
||||
"
|
Loading…
Reference in new issue