diff options
author | 2007-03-25 22:15:41 +0000 | |
---|---|---|
committer | 2007-03-25 22:15:41 +0000 | |
commit | dbcfff61c5932c84d6eec296f4a2556c594f4072 (patch) | |
tree | df324ad45b39eb3f6ba0d835ad8df6ee29c9d75b | |
parent | fix boot device detection. was only looking at drives with mounts b4. untested. (diff) | |
parent | force bootloader choice to grub in networkless mode. this is 0.5.1 (diff) | |
download | gli-dbcfff61c5932c84d6eec296f4a2556c594f4072.tar.gz gli-dbcfff61c5932c84d6eec296f4a2556c594f4072.tar.bz2 gli-dbcfff61c5932c84d6eec296f4a2556c594f4072.zip |
copying the overhaul branch into trunk.overhaul-merged
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1832 f8877401-5920-0410-a79b-8e2d7e04ca0d
166 files changed, 18189 insertions, 18514 deletions
@@ -2,21 +2,54 @@ # Copyright 2005-2006 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo/src/installer/ChangeLog,v 1.686 2006/09/15 16:37:11 agaffney Exp $ + 04 Jan 2007; Preston Cody <codeman@gentoo.org> + ClientController: + took out the preinstall steps. these will now be handled by the frontends. + The actual code for the steps can be put in GLIUtility if necessary. + IP: + Took out partitioning. Added mounts. + Moved root mount point over from CF + Removed RP-PPPoE. was never used. + AT: + reordered functions. removed references to the client-config + fixed fstab and other locations that used mountpoints to use the new mounts. + removed unused rc.conf function. + other smaller touchups. + gli-dialog: + install_profile() to self._install_profile + fix reference to arch instaed of self._arch + x86AT: + fixed code to use mounts instead of partitioning. + 01 Jan 2007; Preston Cody <codeman@gentoo.org> fixing all instances of WINDOWSKEYS to WINDOWKEYS added space in AT debug line. - - 20 Dec 2006; Chris Gianelloni <wolf31o2@gentoo.org> bin/installer-dialog, - bin/installer-gtk: - Added code to check the latest version of the Installer and ask the user if - they would wish to upgrade if a newer version is found. I still haven't - tested it, but I'd like to know if it works. - - 16 Dec 2006; Andrew Gaffney <agaffney@gentoo.org> - src/GLIPortage.py: - detect blockers in emerge output and throw exception - fix warnings from pychecker - fix blocker exception output + more general updates in an effort to get the code functional + + 29 Oct 2006; Preston Cody <codeman@gentoo.org> + gli-dialog: + more rearranging of code. Tossed the review menu and not calling show_settings + not sure how those are going to turn out just yet. + + 22 Oct 2006; Andrew Gaffney <agaffney@gentoo.org> + src/Partitioning.py: + first round of refactoring for Partitioning.py (was GLISD) + + 22 Oct 2006; Preston Cody <codeman@gentoo.org> + gli-dialog: + added in the rest of the code from GLIGenDialog. + will start picking at it now. + moved the early questions such as advanced_mode/networkless + into functions in the GLIDialog class. + + 21 Oct 2006; Preston Cody <codeman@gentoo.org> + ClientController and gli-dialog and GLIGenDialog: + removing GenDialog, this code will be put into gli-dialog + moving some ClientController code into gli-dialog as well. + this is only the beginning :) + +#------------------------------------------ +# GLI SWITCHES TO SVN. 15 Sep 2006; Andrew Gaffney <agaffney@gentoo.org> src/GLIArchitectureTemplate.py: @@ -16,16 +16,17 @@ Things still needing to be done for the BETA release: ???add distcc support (UNTESTED) add r_pppoe configuration stuff. network mounts into the fstab - gtkFE: - listed in fe/gtk/TODO - add Other sources option (textbox). - webgli: - Restrict portage snapshot if doing dynamic stage3 - default the snapshot uri to the cdrom one. - load values for client-configuration + gli-dialog: - - +--testing fix up uri browser + uri stage3 ONLY files. +--not important load network interface info for active interfaces. + FIX no-network + test network-mounts + test reiser + fix bootloader drive list + spit out xml profile when failing for debugging purposes. + livecd: nox MOTD change for installer command. keep terminal open for command-line installer icon. @@ -45,27 +46,3 @@ Robbat's thing: Done: -read-only saving locations (codeman) -if you chose to emerge X, have it configured and set to start on bootup (codeman) -lilo fixup (codeman) -Add custom kernel code. (codeman) -Fix bootloader code for udev. (codeman) -Add rest of add_users and fix overwriting user info bug (codeman and agaffney) -Switch most outputs to tty8 (codeman) -custom kernel and kernel bootsplash options. (codeman) -i gotta check for dhcp in the network stuff and emerge it if it is? (codeman) -so 'PORTAGE_TMPDIR="/mnt/gentoo/var/tmp" - PKGDIR="/mnt/gentoo/usr/portage/packages" quickpkg xorg-x11' then - emerge -K xorg-x11 (agaffney) -Add networking setup for CC (samyron!) -dialog progres bar (codeman) -Progress bar. (agaffney) -services step.add coldplug and hotplug when doing genkernel. (codeman) -setting gateway and DNS servers. (codeman) -Make sure partitioning somewhat works. (agaffney) -update partitioning stuff (agaffney) (thank you!) -rewrite install_filesystem_tools() (codeman) -DHCP client-controller side doesn't work. (kindof fixed?) -add steps descriptions and a way for the FEs to show them (agaffney) -Add add_groups to ALL the files (codeman) -Fix the hacked up exception code. diff --git a/bin/installer b/bin/installer index ded6b0f..f0a2d92 100755 --- a/bin/installer +++ b/bin/installer @@ -106,7 +106,7 @@ then # Try to run the gtk installer try_run /usr/bin/installer-gtk ${*} status=${?} - if [ ${status} -eq 1 ] + if [ ${status} -ge 1 ] then try_run /usr/bin/installer-dialog ${*} || { if [ ${status} -ne 2 ] diff --git a/bin/installer-dialog b/bin/installer-dialog index cf92ec1..e6bbc7d 100755 --- a/bin/installer-dialog +++ b/bin/installer-dialog @@ -1,27 +1,8 @@ #!/bin/bash INSTALL_DIR=/opt/installer - -DIALOG="dialog" - -VERSION=$(cat ${INSTALL_DIR}/version-stamp) -LATEST_VERSION=$(wget -O - http://dev.gentoo.org/~agaffney/gli/releases/ 2>/dev/null | grep -e 'installer-' | sed -e 's:^.\+>installer-::' -e 's:\.tar\.bz2.\+$::' | sort -r | head -n 1) - -[ -z ${LATEST_VERSION} ] && LATEST_VERSION=0 - -if [ ${VERSION} -lt ${LATEST_VERSION} ] -then - if $(${DIALOG} --title "Upgrade Installer" --yesno "Would you like to upgrade the Gentoo Linux Installer to the latest version before running?" 0 0) - then - ${INSTALL_DIR}/misc/updateglid && exit 0 - fi -fi - export PYTHONPATH="${INSTALL_DIR}" -# To avoid GPM issues we will touch a file to fake it here. -touch /dev/gpmctl - cd ${INSTALL_DIR}/fe/dialog ./gli-dialog.py diff --git a/bin/installer-gtk b/bin/installer-gtk index 0782a86..8c1ce25 100755 --- a/bin/installer-gtk +++ b/bin/installer-gtk @@ -1,23 +1,9 @@ #!/bin/bash INSTALL_DIR=/opt/installer - -DIALOG="Xdialog" - -VERSION=$(cat ${INSTALL_DIR}/version-stamp) -LATEST_VERSION=$(wget -O - http://dev.gentoo.org/~agaffney/gli/releases/ 2>/dev/null | grep -e 'installer-' | sed -e 's:^.\+>installer-::' -e 's:\.tar\.bz2.\+$::' | sort -r | head -n 1) - -[ -z ${LATEST_VERSION} ] && LATEST_VERSION=0 - -if [ ${VERSION} -lt ${LATEST_VERSION} ] -then - if $(${DIALOG} --title "Upgrade Installer" --yesno "Would you like to upgrade the Gentoo Linux Installer to the latest version before running?" 0 0) - then - ${INSTALL_DIR}/misc/updategtkfe && exit 0 - fi -fi - export PYTHONPATH="${INSTALL_DIR}" cd ${INSTALL_DIR}/fe/gtk ./gtkfe.py + + diff --git a/src/GLIArchitectureTemplate.py b/src/GLIArchitectureTemplate.py index 3ff8326..86aea1d 100644 --- a/src/GLIArchitectureTemplate.py +++ b/src/GLIArchitectureTemplate.py @@ -17,31 +17,30 @@ The only definitions that are filled in here are architecture independent. import GLIUtility, GLILogger, os, string, sys, shutil, re, time import GLIPortage from GLIException import * -import parted -import GLIStorageDevice +import Partitioning MEGABYTE = 1024 * 1024 +LOGFILE = '/var/log/installer.log' +COMPILE_LOGFILE = '/tmp/compile_output.log' class ArchitectureTemplate: ## # Initialization of the ArchitectureTemplate. Called from some other arch template. - # @param selfconfiguration=None A Client Configuration # @param install_profile=None An Install Profile # @param client_controller=None Client Controller. not same as configuration. - def __init__(self,configuration=None, install_profile=None, client_controller=None): - self._client_configuration = configuration + def __init__(self,install_profile=None, client_controller=None): self._install_profile = install_profile self._cc = client_controller # This will get used a lot, so it's probably # better to store it in a variable than to call # this method 100000 times. - self._chroot_dir = self._client_configuration.get_root_mount_point() - self._logger = GLILogger.Logger(self._client_configuration.get_log_file()) - self._compile_logfile = "/tmp/compile_output.log" - self._debug = self._client_configuration.get_verbose() + self._chroot_dir = self._install_profile.get_root_mount_point() + self._logger = GLILogger.Logger(LOGFILE) + self._compile_logfile = COMPILE_LOGFILE + self._debug = self._install_profile.get_verbose() - self._portage = GLIPortage.GLIPortage(self._chroot_dir, self._install_profile.get_grp_install(), self._logger, self._debug, self._cc, self._compile_logfile) + self._portage = GLIPortage.GLIPortage(self._chroot_dir, self._logger, self._debug, self._cc, self._compile_logfile) # This will cleanup the logfile if it's a dead link (pointing # to the chroot logfile when partitions aren't mounted, else @@ -63,40 +62,39 @@ class ArchitectureTemplate: # Of course, steps will be different depending on the install_profile self._architecture_name = "generic" - self._install_steps = [ - { 'function': self.partition, 'name': "Partition", 'modes': ("normal", "stage4") }, - { 'function': self.mount_local_partitions, 'name': "Mount local partitions", 'modes': ("normal", "stage4") }, - { 'function': self.mount_network_shares, 'name': "Mount network (NFS) shares", 'modes': ("normal", "stage4") }, - { 'function': self.unpack_stage_tarball, 'name': "Unpack stage tarball", 'modes': ("normal", "stage4", "chroot") }, - { 'function': self.update_config_files, 'name': "Updating config files", 'modes': ("normal", "chroot") }, - { 'function': self.configure_make_conf, 'name': "Configure /etc/make.conf", 'modes': ("normal", "chroot") }, - { 'function': self.prepare_chroot, 'name': "Preparing chroot", 'modes': ("normal", "stage4", "chroot") }, - { 'function': self.install_portage_tree, 'name': "Syncing the Portage tree", 'modes': ("normal", "chroot") }, - { 'function': self.stage1, 'name': "Performing bootstrap", 'modes': ("normal", "chroot") }, - { 'function': self.stage2, 'name': "Performing 'emerge system'", 'modes': ("normal", "chroot") }, - { 'function': self.set_root_password, 'name': "Set the root password", 'modes': ("normal", "chroot") }, - { 'function': self.set_timezone, 'name': "Setting timezone", 'modes': ("normal", "chroot") }, - { 'function': self.emerge_kernel_sources, 'name': "Emerge kernel sources", 'modes': ("normal", "chroot") }, - { 'function': self.build_kernel, 'name': "Building kernel", 'modes': ("normal", "chroot") }, - { 'function': self.install_distcc, 'name': "Install distcc", 'modes': ("normal", "chroot") }, - { 'function': self.install_mta, 'name': "Installing MTA", 'modes': ("normal", "chroot") }, - { 'function': self.install_logging_daemon, 'name': "Installing system logger", 'modes': ("normal", "chroot") }, - { 'function': self.install_cron_daemon, 'name': "Installing Cron daemon", 'modes': ("normal", "chroot") }, - { 'function': self.install_filesystem_tools, 'name': "Installing filesystem tools", 'modes': ("normal", "chroot") }, - { 'function': self.setup_network_post, 'name': "Configuring post-install networking", 'modes': ("normal", "chroot") }, - { 'function': self.install_bootloader, 'name': "Configuring and installing bootloader", 'modes': ("normal", "chroot") }, - { 'function': self.setup_and_run_bootloader, 'name': "Setting up and running bootloader", 'modes': ( "normal", "stage4") }, - { 'function': self.update_config_files, 'name': "Re-Updating config files", 'modes': ("normal", "chroot") }, -# { 'function': self.configure_rc_conf, 'name': "Updating /etc/rc.conf", 'modes': ("normal", "stage4", "chroot") }, - { 'function': self.set_users, 'name': "Add additional users.", 'modes': ("normal", "chroot") }, - { 'function': self.install_packages, 'name': "Installing additional packages.", 'modes': ("normal", "chroot") }, + self._install_steps = { + 'do_recommended_partitioning': "Automatically partition the drive", + 'mount_local_partitions': "Mount local partitions", + 'mount_network_shares': "Mount network (NFS) shares", + 'unpack_stage_tarball': "Unpack stage tarball", + 'update_config_files': "Updating config files", + 'configure_make_conf': "Configure /etc/make.conf", + 'prepare_chroot': "Preparing chroot", + 'install_portage_tree': "Syncing the Portage tree", + 'stage1': "Performing bootstrap", + 'stage2': "Performing 'emerge system'", + 'set_root_password': "Set the root password", + 'set_timezone': "Setting timezone", + 'emerge_kernel_sources': "Emerge kernel sources", + 'build_kernel': "Building kernel", + 'install_distcc': "Install distcc", + 'install_mta': "Installing MTA", + 'install_logging_daemon': "Installing system logger", + 'install_cron_daemon': "Installing Cron daemon", + 'install_filesystem_tools': "Installing filesystem tools", + 'setup_network_post': "Configuring post-install networking", + 'install_bootloader': "Configuring and installing bootloader", + 'setup_and_run_bootloader': "Setting up and running bootloader", +# 'update_config_files': "Re-Updating config files", #second run. + 'set_users': "Add additional users.", + 'install_packages': "Installing additional packages.", # services for startup need to come after installing extra packages # otherwise some of the scripts will not exist. - { 'function': self.set_services, 'name': "Setting up services for startup", 'modes': ("normal", "chroot") }, - { 'function': self.run_post_install_script, 'name': "Running custom post-install script", 'modes': ("normal", "stage4", "chroot") }, - { 'function': self.finishing_cleanup, 'name': "Cleanup and unmounting local filesystems.", 'modes': ("normal", "stage4", "chroot") } - ] - + 'set_services': "Setting up services for startup", + 'run_post_install_script': "Running custom post-install script", + 'finishing_cleanup': "Cleanup and unmounting local filesystems.", + 'install_failed_cleanup': "Cleaning up after a failed install" + } ## # Returns the steps and their comments in an array @@ -113,6 +111,7 @@ class ArchitectureTemplate: # It is possible to override these methods in each Arch Template. # It might be necessary to do so, if the arch needs something 'weird'. +######################## Private Functions ######################## ## # Private function to add a /etc/init.d/ script to the given runlevel in the chroot environement # @param script_name the script to be added @@ -216,209 +215,110 @@ class ArchitectureTemplate: self._logger.log("Edited Config file "+filename) ## - # Stage 1 install -- bootstraping the system - # If we are doing a stage 1 install, then bootstrap - def stage1(self): - if self._install_profile.get_install_stage() == 1: - self._logger.mark() - self._logger.log("Starting bootstrap.") - pkgs = self._get_packages_to_emerge("/usr/portage/scripts/bootstrap.sh --pretend") - if self._debug: self._logger.log("DEBUG: Packages to emerge: "+str(pkgs)+". Now running bootstrap.sh") - exitstatus = GLIUtility.spawn("env-update && source /etc/profile && /usr/portage/scripts/bootstrap.sh", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) - if not GLIUtility.exitsuccess(exitstatus): - raise GLIException("Stage1Error", 'fatal','stage1', "Bootstrapping failed!") - self._logger.log("Bootstrap complete.") - - ## - # Stage 2 install -- emerge -e system - # If we are doing a stage 1 or 2 install, then emerge system - def stage2(self): - if self._install_profile.get_install_stage() in [ 1, 2 ]: - self._logger.mark() - self._logger.log("Starting emerge system.") - pkgs = self._get_packages_to_emerge("emerge -p system") #currently quite the useless - if self._debug: self._logger.log("DEBUG: Packages to emerge: "+str(pkgs)+"/ Now running emerge --emptytree system") -# exitstatus = self._emerge("--emptytree system") - exitstatus = GLIUtility.spawn("env-update && source /etc/profile && emerge -e system", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) - if not GLIUtility.exitsuccess(exitstatus): - raise GLIException("Stage2Error", 'fatal','stage2', "Building the system failed!") - self._logger.log("Emerge system complete.") - - ## - # Unpacks the stage tarball that has been specified in the profile (it better be there!) - def unpack_stage_tarball(self): - if not os.path.isdir(self._chroot_dir): - if self._debug: self._logger.log("DEBUG: making the chroot dir:"+self._chroot_dir) - os.makedirs(self._chroot_dir) - if self._install_profile.get_install_stage() == 3 and self._install_profile.get_dynamic_stage3(): - # stage3 generation code here - if not GLIUtility.is_file("/usr/livecd/systempkgs.txt"): - raise GLIException("CreateStage3Error", "fatal", "unpack_stage_tarball", "Required file /usr/livecd/systempkgs.txt does not exist") - try: - syspkgs = open("/usr/livecd/systempkgs.txt", "r") - systempkgs = syspkgs.readlines() - syspkgs.close() - except: - raise GLIException("CreateStage3Error", "fatal", "unpack_stage_tarball", "Could not open /usr/livecd/systempkgs.txt") - - # Pre-create /lib (and possibly /lib32 and /lib64) - for libdir in ("/lib", "/usr/lib"): - if os.path.islink(libdir) and os.readlink(libdir).endswith("64"): - if self._debug: self._logger.log("DEBUG: unpack_stage_tarball(): precreating " + libdir + "64 dir and " + libdir + " -> lib64 symlink because glibc/portage sucks") - if not GLIUtility.exitsuccess(GLIUtility.spawn("mkdir -p " + self._chroot_dir + libdir + "64 && ln -sf lib64 " + self._chroot_dir + libdir)): - raise GLIException("CreateStage3Error", "fatal", "unpack_stage_tarball", "Could not precreate " + libdir + "64 dir and " + libdir + " -> lib64 symlink") - - syspkglen = len(systempkgs) - for i, pkg in enumerate(systempkgs): - pkg = pkg.strip() - self.notify_frontend("progress", (float(i) / (syspkglen+1), "Copying " + pkg + " (" + str(i+1) + "/" + str(syspkglen) + ")")) - self._portage.copy_pkg_to_chroot(pkg, True, ignore_missing=True) - self.notify_frontend("progress", (float(syspkglen) / (syspkglen+1), "Finishing")) - GLIUtility.spawn("cp /etc/make.conf " + self._chroot_dir + "/etc/make.conf") - GLIUtility.spawn("ln -s `readlink /etc/make.profile` " + self._chroot_dir + "/etc/make.profile") - GLIUtility.spawn("cp -f /etc/inittab.old " + self._chroot_dir + "/etc/inittab") - - # Nasty, nasty, nasty hack because vapier is a tool - for tmpfile in ("/etc/passwd", "/etc/group", "/etc/shadow"): - GLIUtility.spawn("grep -ve '^gentoo' " + tmpfile + " > " + self._chroot_dir + tmpfile) - - chrootscript = r""" - #!/bin/bash - - source /etc/make.conf - export LDPATH="/usr/lib/gcc-lib/${CHOST}/$(cd /usr/lib/gcc-lib/${CHOST} && ls -1 | head -n 1)" - - ldconfig $LDPATH - gcc-config 1 - env-update - source /etc/profile - modules-update - [ -f /usr/bin/binutils-config ] && binutils-config 1 - source /etc/profile - #mount -t proc none /proc - #cd /dev - #/sbin/MAKEDEV generic-i386 - #umount /proc - [ -f /lib/udev-state/devices.tar.bz2 ] && tar -C /dev -xjf /lib/udev-state/devices.tar.bz2 - """ - script = open(self._chroot_dir + "/tmp/extrastuff.sh", "w") - script.write(chrootscript) - script.close() - GLIUtility.spawn("chmod 755 /tmp/extrastuff.sh && /tmp/extrastuff.sh", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) - GLIUtility.spawn("rm -rf /var/tmp/portage/* /usr/portage /tmp/*", chroot=self._chroot_dir) - self.notify_frontend("progress", (1, "Done")) - self._logger.log("Stage3 was generated successfully") - else: - self._logger.log("Fetching and unpacking tarball: "+self._install_profile.get_stage_tarball_uri()) - GLIUtility.fetch_and_unpack_tarball(self._install_profile.get_stage_tarball_uri(), self._chroot_dir, temp_directory=self._chroot_dir, keep_permissions=True, cc=self._cc) - self._logger.log(self._install_profile.get_stage_tarball_uri()+" was fetched and unpacked.") - - ## - # Prepares the Chroot environment by copying /etc/resolv.conf and mounting proc and dev - def prepare_chroot(self): - # Copy resolv.conf to new env + # Configures /etc/fstab on the new envorinment + def _configure_fstab(self): + newfstab = "" + mounts = self._install_profile.get_mounts() + for mount in mounts: + if mount['type'] == "linux-swap": + newfstab += mount['devnode']+"\t none swap sw 0 0\n" + continue #Stop here and move on. + if not mount['mountopts'].strip(): mount['mountopts'] = "defaults" + if mount['mountpoint']: + if not GLIUtility.is_file(self._chroot_dir+mount['mountpoint']): + if self._debug: self._logger.log("DEBUG: making mountpoint: "+mount['mountpoint']) + exitstatus = GLIUtility.spawn("mkdir -p " + self._chroot_dir + mount['mountpoint']) + if not GLIUtility.exitsuccess(exitstatus): + raise GLIException("MkdirError", 'fatal','configure_fstab', "Making the mount point failed!") + newfstab += mount['devnode']+"\t "+mount['mountpoint']+"\t "+mount['type']+"\t "+mount['mountopts']+"\t\t " + #Now figure out the last 2 numbers depending on the mountpoint. + if mount['mountpoint'] == "/boot": + newfstab += "1 2\n" + elif mount['mountpoint'] == "/": + newfstab += "0 1\n" + else: + newfstab += "0 0\n" + + newfstab += "none /proc proc defaults 0 0\n" + newfstab += "none /dev/shm tmpfs defaults 0 0\n" + if GLIUtility.is_device("/dev/cdroms/cdrom0"): + newfstab += "/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0\n" + + for netmount in self._install_profile.get_network_mounts(): + if netmount['type'] == "nfs": + newfstab += netmount['host'] + ":" + netmount['export'] + "\t" + netmount['mountpoint'] + "\tnfs\t" + netmount['mountopts'] + "\t0 0\n" + + file_name = self._chroot_dir + "/etc/fstab" try: - if self._debug: self._logger.log("DEBUG: copying /etc/resolv.conf over.") - shutil.copy("/etc/resolv.conf", self._chroot_dir + "/etc/resolv.conf") + if self._debug: self._logger.log("DEBUG: backing up original fstab") + shutil.move(file_name, file_name + ".OLDdefault") except: - pass - if self._debug: self._logger.log("DEBUG: mounting proc") - ret = GLIUtility.spawn("mount -t proc none "+self._chroot_dir+"/proc") - if not GLIUtility.exitsuccess(ret): - raise GLIException("MountError", 'fatal','prepare_chroot','Could not mount /proc') - else: - self._mounted_devices.append("/proc") - bind_mounts = [ '/dev' ] - uname = os.uname() - if uname[0] == 'Linux' and uname[2].split('.')[1] == '6': - bind_mounts.append('/sys') - if self._debug: self._logger.log("DEBUG: bind-mounting " + ", ".join(bind_mounts)) - for mount in bind_mounts: - ret = GLIUtility.spawn('mount -o bind %s %s%s' % (mount,self._chroot_dir,mount)) - if not GLIUtility.exitsuccess(ret): - raise GLIException("MountError", 'fatal','prepare_chroot','Could not mount '+mount) - else: - self._mounted_devices.append(mount) - if self._debug: self._logger.log("DEBUG: copying logfile to new system!") - GLIUtility.spawn("mv " + self._compile_logfile + " " + self._chroot_dir + self._compile_logfile + " && ln -s " + self._chroot_dir + self._compile_logfile + " " + self._compile_logfile) - self._logger.log("Chroot environment ready.") - - ## - # Installs a list of packages specified in the profile. Will install any extra software! - # In the future this function will lead to better things. It may even wipe your ass for you. - def install_packages(self): - installpackages = self._install_profile.get_install_packages() - if installpackages: -# pkglist = self._portage.get_deps(" ".join(installpackages)) -# if self._debug: self._logger.log("install_packages(): pkglist is " + str(pkglist)) -# for i, pkg in enumerate(pkglist): -# if self._debug: self._logger.log("install_packages(): processing package " + pkg) -# self.notify_frontend("progress", (float(i) / len(pkglist), "Emerging " + pkg + " (" + str(i) + "/" + str(len(pkglist)) + ")")) -# if not self._portage.get_best_version_vdb("=" + pkg): -# status = self._emerge("=" + pkg) -# if not GLIUtility.exitsuccess(status): -# raise GLIException("ExtraPackagesError", "fatal", "install_packages", "Could not emerge " + pkg + "!") -# else: -# try: -# self._portage.copy_pkg_to_chroot(pkg) -# except: -# raise GLIException("ExtraPackagesError", "fatal", "install_packages", "Could not emerge " + pkg + "!") - self._portage.emerge(installpackages) - - if GLIUtility.is_file(self._chroot_dir + "/etc/X11"): - # Copy the xorg.conf from the LiveCD if they installed xorg-x11 - exitstatus = GLIUtility.spawn("cp /etc/X11/xorg.conf " + self._chroot_dir + "/etc/X11/xorg.conf") - if not GLIUtility.exitsuccess(exitstatus): - self._logger.log("Could NOT copy the xorg configuration from the livecd to the new system!") - else: - self._logger.log("xorg.conf copied to new system. X should be ready to roll!") - if GLIUtility.is_file(self._chroot_dir + "/etc/X11/gdm/gdm.conf"): - GLIUtility.spawn("cp -f /etc/X11/gdm/gdm.conf.old " + self._chroot_dir + "/etc/X11/gdm/gdm.conf") - if GLIUtility.is_file(self._chroot_dir + "/etc/X11/gdm/custom.conf"): - GLIUtility.spawn("cp -f /etc/X11/gdm/custom.conf.old " + self._chroot_dir + "/etc/X11/gdm/custom.conf") - - ## - # Will set the list of services to runlevel default. This is a temporary solution! - def set_services(self): - services = self._install_profile.get_services() - for service in services: - if service: - self._add_to_runlevel(service) + self._logger.log("ERROR: could not backup original fstab.") + if self._debug: self._logger.log("DEBUG: Contents of new fstab: "+newfstab) + f = open(file_name, 'w') + f.writelines(newfstab) + f.close() + self._logger.log("fstab configured.") + +##################################################################### +##################################################################### +########################## Installation Functions ################### + + ## + # Will automatically partition the hard drive if both paramaters + # in the install_profile are correctly set. This in turn will + # appropriately set the mountpoints for the rest of the install. + # This function is to be called only for fully-automated installs. + def do_recommended_partitioning(self): + drive = self._install_profile.get_do_recommended_partitioning() #returns drive name. + second_check = self._install_profile.get_yes_iam_sure() + if drive and second_check: + try: + self._logger.log("Creating the drive object for drive %s for do_recommended" % drive) + driveobject = Partitioning.Device(drive, self._architecture_name, self._install_profile) + self._logger.log("Running do_recommended!") + driveobject.do_recommended() + self._logger.log("do_recommended complete! mountpoints should now be set.") + except: + raise GLIException("DoRecommendedError", 'fatal','do_recommended_partitioning', "An Error occurred while trying to run do_recommended!") + ## # Will grab partition info from the profile and mount all partitions with a specified mountpoint (and swap too) def mount_local_partitions(self): - parts = self._install_profile.get_partition_tables() + #Temporary hack here to update the debug value. + self._debug = self._install_profile.get_verbose() + + mounts = self._install_profile.get_mounts() + mount_progress = 1 + self.notify_frontend("progress", (float(mount_progress) / (len(mounts)+1), "Generating mount list")) parts_to_mount = {} - for device in parts: - tmp_partitions = parts[device] #.get_install_profile_structure() - tmp_minor = -1 - for minor in tmp_partitions: #.get_ordered_partition_list(): - if not tmp_partitions[minor]['type'] in ("free", "extended"): - tmp_minor = minor - break - time.sleep(1) - if tmp_minor == -1: continue - self._wait_for_device_node(tmp_partitions[minor]['devnode']) - for partition in tmp_partitions: #.get_ordered_partition_list(): - mountpoint = tmp_partitions[partition]['mountpoint'] - mountopts = tmp_partitions[partition]['mountopts'] - minor = str(int(tmp_partitions[partition]['minor'])) - partition_type = tmp_partitions[partition]['type'] - if mountpoint: - if mountopts: - mountopts = "-o " + mountopts + " " - if partition_type: - if partition_type == "fat32" or partition_type == "fat16": partition_type = "vfat" - partition_type = "-t " + partition_type + " " - parts_to_mount[mountpoint] = (mountopts, partition_type, tmp_partitions[partition]['devnode']) - - if partition_type == "linux-swap": - ret = GLIUtility.spawn("swapon " + tmp_partitions[partition]['devnode']) - if not GLIUtility.exitsuccess(ret): - self._logger.log("ERROR! : Could not activate swap (" + tmp_partitions[partition]['devnode'] + ")!") - else: - self._swap_devices.append(tmp_partitions[partition]['devnode']) + for mount in mounts: + Partitioning.wait_for_device_node(mount['devnode']) + mountpoint = mount['mountpoint'] + mountopts = mount['mountopts'] + partition_type = mount['type'] + if not mountpoint: + continue #Skip this. Probably should be an error. but should NEVER happen. + if mountopts: + mountopts = "-o " + mountopts + " " + if partition_type in ("linux-swap", "swap"): + mount_progress += 1 + self.notify_frontend("progress", (float(mount_progress) / (len(mounts)+1), "Activating swap on " + mount['devnode'])) + ret = GLIUtility.spawn("swapon " + mount['devnode']) + if not GLIUtility.exitsuccess(ret): + self._logger.log("ERROR! : Could not activate swap (" + mount['devnode'] + ")!") + else: + self._swap_devices.append(mount['devnode']) + continue + elif partition_type: + if partition_type == "fat32" or partition_type == "fat16": + partition_type = "vfat" + partition_type = "-t " + partition_type + " " + else: #Unknown partition type!!! + self._logger.log("ERROR! : Unknown partition type for mountpoint %s which is device %s" % (mountpoint, mount['devnode'])) + parts_to_mount[mountpoint] = (mountopts, partition_type, mount['devnode']) + sorted_list = parts_to_mount.keys() sorted_list.sort() @@ -429,10 +329,12 @@ class ArchitectureTemplate: raise GLIException("MkdirError", 'fatal','mount_local_partitions', "Making the ROOT mount point failed!") else: self._logger.log("Created root mount point") - for mountpoint in sorted_list: + for i, mountpoint in enumerate(sorted_list): mountopts = parts_to_mount[mountpoint][0] partition_type = parts_to_mount[mountpoint][1] partition = parts_to_mount[mountpoint][2] + mount_progress += 1 + self.notify_frontend("progress", (float(mount_progress) / (len(mounts)+1), "Mounting %s at %s" % (partition, mountpoint))) if not GLIUtility.is_file(self._chroot_dir + mountpoint): if self._debug: self._logger.log("DEBUG: making mountpoint: "+mountpoint) exitstatus = GLIUtility.spawn("mkdir -p " + self._chroot_dir + mountpoint) @@ -440,6 +342,7 @@ class ArchitectureTemplate: raise GLIException("MkdirError", 'fatal','mount_local_partitions', "Making the mount point failed!") else: self._logger.log("Created mountpoint " + mountpoint) + if self._debug: self._logger.log("DEBUG: running mount "+ partition_type + mountopts + partition + " " + self._chroot_dir + mountpoint) ret = GLIUtility.spawn("mount " + partition_type + mountopts + partition + " " + self._chroot_dir + mountpoint, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) if not GLIUtility.exitsuccess(ret): raise GLIException("MountError", 'fatal','mount_local_partitions','Could not mount a partition') @@ -451,7 +354,7 @@ class ArchitectureTemplate: #if output.strip() != "Found": # raise GLIException("MountError", 'fatal','mount_local_partitions','Could not mount a partition (failed in double-check)') self._logger.log("Mounted mountpoint: " + mountpoint) - + if self._debug: self._logger.log("DEBUG: mounted_devices is %s" % str(self._mounted_devices)) ## # Mounts all network shares to the local machine def mount_network_shares(self): @@ -484,6 +387,102 @@ class ArchitectureTemplate: else: self._logger.log("Netmount type " + netmount['type'] + " not supported...skipping " + netmount['mountpoint']) + ## + # Unpacks the stage tarball that has been specified in the profile (it better be there!) + def unpack_stage_tarball(self): + if not os.path.isdir(self._chroot_dir): + if self._debug: self._logger.log("DEBUG: making the chroot dir:"+self._chroot_dir) + os.makedirs(self._chroot_dir) + if self._install_profile.get_install_stage() == 3 and self._install_profile.get_dynamic_stage3(): + # stage3 generation code here + if not GLIUtility.is_file("/usr/livecd/systempkgs.txt"): + raise GLIException("CreateStage3Error", "fatal", "unpack_stage_tarball", "Required file /usr/livecd/systempkgs.txt does not exist") + try: + syspkgs = open("/usr/livecd/systempkgs.txt", "r") + systempkgs = [line for line in syspkgs.readlines() if line.strip()] + syspkgs.close() + except: + raise GLIException("CreateStage3Error", "fatal", "unpack_stage_tarball", "Could not open /usr/livecd/systempkgs.txt") + + # Pre-create /lib (and possibly /lib32 and /lib64) + for libdir in ("/lib", "/usr/lib"): + if os.path.islink(libdir) and os.readlink(libdir).endswith("64"): + if self._debug: self._logger.log("DEBUG: unpack_stage_tarball(): precreating " + libdir + "64 dir and " + libdir + " -> lib64 symlink because glibc/portage sucks") + if not GLIUtility.exitsuccess(GLIUtility.spawn("mkdir -p " + self._chroot_dir + libdir + "64 && ln -sf lib64 " + self._chroot_dir + libdir)): + raise GLIException("CreateStage3Error", "fatal", "unpack_stage_tarball", "Could not precreate " + libdir + "64 dir and " + libdir + " -> lib64 symlink") + + syspkglen = len(systempkgs) + for i, pkg in enumerate(systempkgs): + pkg = pkg.strip() + self.notify_frontend("progress", (float(i) / (syspkglen+1), "Copying " + pkg + " (" + str(i+1) + "/" + str(syspkglen) + ")")) + self._portage.copy_pkg_to_chroot(pkg, True, ignore_missing=True) + self.notify_frontend("progress", (float(syspkglen) / (syspkglen+1), "Finishing")) + GLIUtility.spawn("cp /etc/make.conf " + self._chroot_dir + "/etc/make.conf") + GLIUtility.spawn("ln -s `readlink /etc/make.profile` " + self._chroot_dir + "/etc/make.profile") + GLIUtility.spawn("cp -f /etc/inittab.old " + self._chroot_dir + "/etc/inittab") + + # Nasty, nasty, nasty hack because vapier is a tool + for tmpfile in ("/etc/passwd", "/etc/group", "/etc/shadow"): + GLIUtility.spawn("grep -ve '^gentoo' " + tmpfile + " > " + self._chroot_dir + tmpfile) + + chrootscript = r""" + #!/bin/bash + source /etc/make.conf + export LDPATH="/usr/lib/gcc-lib/${CHOST}/$(cd /usr/lib/gcc-lib/${CHOST} && ls -1 | head -n 1)" + ldconfig $LDPATH + gcc-config 1 + env-update + source /etc/profile + modules-update + [ -f /usr/bin/binutils-config ] && binutils-config 1 + source /etc/profile + cd /dev + rm console null + mknod console c 5 1 + mknod null c 1 3 + mkdir -m 755 /mnt + mkdir -m 700 /mnt/cdrom + mkdir -m 700 /mnt/floppy + [ -f /usr/sbin/create-cracklib-dict ] && /usr/sbin/create-cracklib-dict /usr/share/dict/* > /dev/null + # [ -f /lib/udev-state/devices.tar.bz2 ] && tar -C /dev -xjf /lib/udev-state/devices.tar.bz2 + """ + + script = open(self._chroot_dir + "/tmp/extrastuff.sh", "w") + script.write(chrootscript) + script.close() + GLIUtility.spawn("chmod 755 /tmp/extrastuff.sh && /tmp/extrastuff.sh", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) + GLIUtility.spawn("rm -rf /var/tmp/portage/* /usr/portage /tmp/*", chroot=self._chroot_dir) + self.notify_frontend("progress", (1, "Done")) + self._logger.log("Stage3 was generated successfully") + else: + self._logger.log("Fetching and unpacking tarball: "+self._install_profile.get_stage_tarball_uri()) + GLIUtility.fetch_and_unpack_tarball(self._install_profile.get_stage_tarball_uri(), self._chroot_dir, temp_directory=self._chroot_dir, keep_permissions=True, cc=self._cc) + self._logger.log(self._install_profile.get_stage_tarball_uri()+" was fetched and unpacked.") + + ## + # This runs etc-update and then re-overwrites the files by running the configure_*'s to keep our values. + def update_config_files(self): + "Runs etc-update (overwriting all config files), then re-configures the modified ones" + # Run etc-update overwriting all config files + if self._debug: self._logger.log("DEBUG: update_config_files(): running: "+'echo "-5" | chroot '+self._chroot_dir+' etc-update') + status = GLIUtility.spawn('echo "-5" | chroot '+self._chroot_dir+' etc-update', display_on_tty8=True, logfile=self._compile_logfile, append_log=True) + if not GLIUtility.exitsuccess(status): + self._logger.log("ERROR! : Could not update the config files!") + else: + self._configure_fstab() + etc_files = self._install_profile.get_etc_files() + for etc_file in etc_files: + # Skip entries with blank filenames + if not etc_file: continue + if self._debug: self._logger.log("DEBUG: update_config_files(): updating config file: "+etc_file) + if isinstance(etc_files[etc_file], dict): + self._edit_config(self._chroot_dir + "/etc/" + etc_file, etc_files[etc_file]) + else: + for entry in etc_files[etc_file]: + # Skip blank entries + if not entry: continue + self._edit_config(self._chroot_dir + "/etc/" + etc_file, { "0": entry }, only_value=True) + self._logger.log("Config files updated using etc-update. make.conf/fstab/rc.conf restored.") ## # Configures the new /etc/make.conf @@ -526,16 +525,47 @@ class ArchitectureTemplate: GLIUtility.spawn("mkdir -p " + self._chroot_dir + PORTDIR_OVERLAY, logfile=self._compile_logfile, append_log=True) ## + # Prepares the Chroot environment by copying /etc/resolv.conf and mounting proc and dev + def prepare_chroot(self): + # Copy resolv.conf to new env + try: + if self._debug: self._logger.log("DEBUG: copying /etc/resolv.conf over.") + shutil.copy("/etc/resolv.conf", self._chroot_dir + "/etc/resolv.conf") + except: + pass + if self._debug: self._logger.log("DEBUG: mounting proc") + if not os.path.isdir(self._chroot_dir+"/proc"): + if self._debug: self._logger.log("DEBUG: making the proc dir in chroot") + os.makedirs(self._chroot_dir+"/proc") + ret = GLIUtility.spawn("mount -t proc none "+self._chroot_dir+"/proc") + if not GLIUtility.exitsuccess(ret): + raise GLIException("MountError", 'fatal','prepare_chroot','Could not mount /proc') + else: + self._mounted_devices.append("/proc") + bind_mounts = [ '/dev' ] + uname = os.uname() + if uname[0] == 'Linux' and uname[2].split('.')[1] == '6': + bind_mounts.append('/sys') + if self._debug: self._logger.log("DEBUG: bind-mounting " + ", ".join(bind_mounts)) + for mount in bind_mounts: + if not os.path.isdir(self._chroot_dir+mount): + if self._debug: self._logger.log("DEBUG: making the %s dir in chroot" % mount) + os.makedirs(self._chroot_dir+mount) + ret = GLIUtility.spawn('mount -o bind %s %s%s' % (mount,self._chroot_dir,mount)) + if not GLIUtility.exitsuccess(ret): + raise GLIException("MountError", 'fatal','prepare_chroot','Could not mount '+mount) + else: + self._mounted_devices.append(mount) + if self._debug: self._logger.log("DEBUG: copying logfile to new system!") + GLIUtility.spawn("mv " + self._compile_logfile + " " + self._chroot_dir + self._compile_logfile + " && ln -s " + self._chroot_dir + self._compile_logfile + " " + self._compile_logfile) + self._logger.log("Chroot environment ready.") + + ## # This will get/update the portage tree. If you want to snapshot or mount /usr/portage use "custom". def install_portage_tree(self): # Check the type of portage tree fetching we'll do # If it is custom, follow the path to the custom tarball and unpack it - # This is a hack to copy the LiveCD's rsync into the chroot since it has the sigmask patch - if self._debug: self._logger.log("DEBUG: Doing the hack where we copy the LiveCD's rsync into the chroot since it has the sigmask patch") - GLIUtility.spawn("cp -a /usr/bin/rsync " + self._chroot_dir + "/usr/bin/rsync") - GLIUtility.spawn("cp -a /usr/lib/libpopt* " + self._chroot_dir + "/usr/lib") - sync_type = self._install_profile.get_portage_tree_sync_type() if sync_type == "snapshot" or sync_type == "custom": # Until this is finalized @@ -548,7 +578,7 @@ class ArchitectureTemplate: if GLIUtility.is_file("/usr/livecd/metadata.tar.bz2"): GLIUtility.fetch_and_unpack_tarball("/usr/livecd/metadata.tar.bz2", self._chroot_dir + "/", self._chroot_dir + "/", cc=self._cc) self._logger.log("Portage tree install was custom.") - elif sync_type == "sync": + if sync_type == "sync": if self._debug: self._logger.log("DEBUG: starting emerge sync") exitstatus = GLIUtility.spawn("emerge sync", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) if not GLIUtility.exitsuccess(exitstatus): @@ -557,16 +587,55 @@ class ArchitectureTemplate: else: self._logger.log("Portage tree sync'd") # If the type is webrsync, then run emerge-webrsync - elif sync_type == "webrsync": + if sync_type == "webrsync": if self._debug: self._logger.log("DEBUG: starting emerge webrsync") exitstatus = GLIUtility.spawn("emerge-webrsync", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) if not GLIUtility.exitsuccess(exitstatus): raise GLIException("EmergeWebRsyncError", 'fatal','install_portage_tree', "Failed to retrieve portage tree using webrsync!") self._logger.log("Portage tree sync'd using webrsync") # Otherwise, spit out a message because its probably a bad thing. - else: - self._logger.log("NOTICE! No valid portage tree sync method was selected. This will most likely result in a failed installation unless the tree is mounted.") - + #else: + # self._logger.log("NOTICE! No valid portage tree sync method was selected. This will most likely result in a failed installation unless the tree is mounted.") + + + ## + # Stage 1 install -- bootstraping the system + # If we are doing a stage 1 install, then bootstrap + def stage1(self): + if self._install_profile.get_install_stage() == 1: + self._logger.mark() + self._logger.log("Starting bootstrap.") + pkgs = self._get_packages_to_emerge("/usr/portage/scripts/bootstrap.sh --pretend") + if self._debug: self._logger.log("DEBUG: Packages to emerge: "+str(pkgs)+". Now running bootstrap.sh") + exitstatus = GLIUtility.spawn("env-update && source /etc/profile && /usr/portage/scripts/bootstrap.sh", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) + if not GLIUtility.exitsuccess(exitstatus): + raise GLIException("Stage1Error", 'fatal','stage1', "Bootstrapping failed!") + self._logger.log("Bootstrap complete.") + + ## + # Stage 2 install -- emerge -e system + # If we are doing a stage 1 or 2 install, then emerge system + def stage2(self): + if self._install_profile.get_install_stage() in [ 1, 2 ]: + self._logger.mark() + self._logger.log("Starting emerge system.") + pkgs = self._get_packages_to_emerge("emerge -p system") #currently quite the useless + if self._debug: self._logger.log("DEBUG: Packages to emerge: "+str(pkgs)+"/ Now running emerge --emptytree system") +# exitstatus = self._emerge("--emptytree system") + exitstatus = GLIUtility.spawn("env-update && source /etc/profile && emerge -e system", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) + if not GLIUtility.exitsuccess(exitstatus): + raise GLIException("Stage2Error", 'fatal','stage2', "Building the system failed!") + self._logger.log("Emerge system complete.") + + ## + # Sets the root password + def set_root_password(self): + if self._debug: self._logger.log("DEBUG: set_root_password(): running: "+ 'echo \'root:' + self._install_profile.get_root_pass_hash() + '\' | chroot '+self._chroot_dir+' chpasswd -e') + status = GLIUtility.spawn('echo \'root:' + self._install_profile.get_root_pass_hash() + '\' | chroot '+self._chroot_dir+' chpasswd -e') + if not GLIUtility.exitsuccess(status): + raise GLIException("SetRootPasswordError", 'fatal', 'set_root_password', "Failure to set root password!") + self._logger.log("Root Password set on the new system.") + ## # Sets the timezone for the new environment def set_timezone(self): @@ -583,59 +652,10 @@ class ArchitectureTemplate: self._logger.log("Timezone set.") ## - # Configures /etc/fstab on the new envorinment - def configure_fstab(self): - newfstab = "" - parts = self._install_profile.get_partition_tables() - for device in parts: - tmp_partitions = parts[device] #.get_install_profile_structure() - for partition in tmp_partitions: #.get_ordered_partition_list(): - mountpoint = tmp_partitions[partition]['mountpoint'] - minor = str(int(tmp_partitions[partition]['minor'])) - partition_type = tmp_partitions[partition]['type'] - mountopts = tmp_partitions[partition]['mountopts'] - if not mountopts.strip(): mountopts = "defaults" - if mountpoint: - if not GLIUtility.is_file(self._chroot_dir+mountpoint): - if self._debug: self._logger.log("DEBUG: making mountpoint: "+mountpoint) - exitstatus = GLIUtility.spawn("mkdir -p " + self._chroot_dir + mountpoint) - if not GLIUtility.exitsuccess(exitstatus): - raise GLIException("MkdirError", 'fatal','configure_fstab', "Making the mount point failed!") - newfstab += tmp_partitions[partition]['devnode']+"\t "+mountpoint+"\t "+partition_type+"\t "+mountopts+"\t\t " - if mountpoint == "/boot": - newfstab += "1 2\n" - elif mountpoint == "/": - newfstab += "0 1\n" - else: - newfstab += "0 0\n" - if partition_type == "linux-swap": - newfstab += tmp_partitions[partition]['devnode']+"\t none swap sw 0 0\n" - newfstab += "none /proc proc defaults 0 0\n" - newfstab += "none /dev/shm tmpfs defaults 0 0\n" - if GLIUtility.is_device("/dev/cdroms/cdrom0"): - newfstab += "/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0\n" - - for netmount in self._install_profile.get_network_mounts(): - if netmount['type'] == "nfs": - newfstab += netmount['host'] + ":" + netmount['export'] + "\t" + netmount['mountpoint'] + "\tnfs\t" + netmount['mountopts'] + "\t0 0\n" - - file_name = self._chroot_dir + "/etc/fstab" - try: - if self._debug: self._logger.log("DEBUG: backing up original fstab") - shutil.move(file_name, file_name + ".OLDdefault") - except: - self._logger.log("ERROR: could not backup original fstab.") - if self._debug: self._logger.log("DEBUG: Contents of new fstab: "+newfstab) - f = open(file_name, 'w') - f.writelines(newfstab) - f.close() - self._logger.log("fstab configured.") - - ## # Fetches desired kernel sources, unless you're using a livecd-kernel in which case it does freaky stuff. def emerge_kernel_sources(self): - self._logger.log("Starting emerge_kernel") kernel_pkg = self._install_profile.get_kernel_source_pkg() + self._logger.log("Starting emerge_kernel, package is %s" % kernel_pkg) # if kernel_pkg: # Special case, no kernel installed if kernel_pkg == "none": @@ -643,13 +663,65 @@ class ArchitectureTemplate: # Special case, livecd kernel elif kernel_pkg == "livecd-kernel": if self._debug: self._logger.log("DEBUG: starting livecd-kernel setup") - self.notify_frontend("progress", (0, "Copying livecd-kernel to chroot")) - self._portage.copy_pkg_to_chroot(self._portage.get_best_version_vdb("livecd-kernel")) + self.notify_frontend("progress", (0, "Determining files to copy")) + GLIUtility.spawn(r"find /var/db/pkg -type f -name CONTENTS | xargs awk '/^obj \/lib\/modules\// { print $2; }' > /tmp/kernel_modules") + files = GLIUtility.spawn('ls -1 --color=no /boot/System* /boot/kernel* /boot/initr* $(for i in $(find "/lib/modules/" -type f); do grep --quiet "^${i}$" /tmp/kernel_modules || echo ${i}; done); rm /tmp/kernel_modules 2>/dev/null', return_output=True)[1].strip().split("\n") + if not files: + raise GLIException("LiveCDKernelError", 'fatal','emerge_kernel_sources', "Could not determine files to copy for livecd-kernel") + self.notify_frontend("progress", (0.2, "Copying kernel, initramfs, and modules")) + if not GLIUtility.exitsuccess(GLIUtility.spawn("cp -p --parents %s %s/" % (" ".join(files), self._chroot_dir), logfile=self._compile_logfile, append_log=True)): + raise GLIException("LiveCDKernelError", 'fatal','emerge_kernel_sources', "Could not copy kernel, initramfs, or modules") + self.notify_frontend("progress", (0.4, "Generating module dependencies")) + GLIUtility.spawn("depmod -a", logfile=self._compile_logfile, append_log=True) + self.notify_frontend("progress", (0.6, "Gathering portage configuration")) + portage_info = {} + for line in GLIUtility.spawn(r"emerge --info 2>/dev/null | grep '^[A-Z0-9_]\+=' | sed -e 's:\" \([A-Z]\):\"\n\1:g'", chroot=self._chroot_dir, return_output=True)[1].strip().split("\n"): + parts = line.split("=", 1) + portage_info[parts[0]] = parts[1].strip("'\"") + arch = portage_info["ACCEPT_KEYWORDS"].split(" ")[0].strip("~") + values = { + 'CATEGORY': "sys-kernel", + 'CBUILD': portage_info['CHOST'], + 'CFLAGS': portage_info['CFLAGS'], + 'CHOST': portage_info['CHOST'], + 'CONTENTS': "", +# 'COUNTER': "0", + 'CXXFLAGS': portage_info.get("CXXFLAGS", ""), + 'DEPEND': "", + 'DESCRIPTION': "LiveCD kernel as installed by GLI", + 'EAPI': "0", + 'FEATURES': "", + 'HOMEPAGE': "http://www.gentoo.org/proj/en/releng/installer/", + 'INHERITED': "eutils", + 'KEYWORDS': arch, + 'LICENSE': "", + 'NEEDED': "", + 'PDEPEND': "", + 'PF': "livecd-kernel-1", + 'PROVIDE': "virtual/alsa", + 'RDEPEND': "", + 'SLOT': "0", + 'USE': arch + } + self.notify_frontend("progress", (0.8, "Creating VDB entry for livecd-kernel")) + vdbdir = self._chroot_dir + "/var/db/pkg/sys-kernel/livecd-kernel-1" + os.mkdir(vdbdir) + for tmpfile in values: + fileout = open(vdbdir + "/" + tmpfile, "w") + fileout.write(values[tmpfile] + "\n") + fileout.close() + fileout = open(vdbdir + "/livecd-kernel-1.ebuild", "w") + fileout.write("inherit eutils\n\nDESCRIPTION=\"LiveCD kernel as installed by GLI\"\nHOMEPAGE=\"http://www.gentoo.org/proj/en/releng/installer/\"\nSRC_URI=\nLICENSE=\nSLOT=0\nKEYWORDS=\"%s\"\nIUSE=\nDEPEND=\nPROVIDE=virtual/alsa\n" % arch) + fileout.close() + counter = self._portage.update_counter() + counter_f = open(self._chroot_dir + "/var/db/pkg/sys-kernel/livecd-kernel-1/COUNTER", "w") + counter_f.write(str(counter)) + counter_f.close() self.notify_frontend("progress", (1, "Done copying livecd-kernel to chroot")) - exitstatus = self._portage.emerge("coldplug") - self._logger.log("Coldplug emerged. Now they should be added to the boot runlevel.") - self._add_to_runlevel("coldplug", runlevel="boot") +# exitstatus = self._portage.emerge("coldplug", self._install_profile.get_grp_install()) +# self._logger.log("Coldplug emerged. Now they should be added to the boot runlevel.") +# self._add_to_runlevel("coldplug", runlevel="boot") if self._install_profile.get_kernel_bootsplash(): self._logger.log("Bootsplash enabled for livecd-kernel...this is currently broken, so we're skipping the package install") @@ -672,7 +744,7 @@ class ArchitectureTemplate: # normal case else: - exitstatus = self._portage.emerge(kernel_pkg) + exitstatus = self._portage.emerge(kernel_pkg, self._install_profile.get_grp_install()) # if not GLIUtility.exitsuccess(exitstatus): # raise GLIException("EmergeKernelSourcesError", 'fatal','emerge_kernel_sources',"Could not retrieve kernel sources!") try: @@ -763,7 +835,7 @@ class ArchitectureTemplate: # Genkernel mode, including custom kernel_config. Initrd always on. elif build_mode == "genkernel": if self._debug: self._logger.log("DEBUG: build_kernel(): starting emerge genkernel") - exitstatus = self._portage.emerge("genkernel") + exitstatus = self._portage.emerge("genkernel", self._install_profile.get_grp_install()) # if not GLIUtility.exitsuccess(exitstatus): # raise GLIException("EmergeGenKernelError", 'fatal','build_kernel', "Could not emerge genkernel!") self._logger.log("Genkernel emerged. Beginning kernel compile.") @@ -783,6 +855,7 @@ class ArchitectureTemplate: genkernel_options = genkernel_options + " --no-gensplash" # Run genkernel in chroot #print "genkernel all " + genkernel_options + self.notify_frontend("progress", (0, "Compiling kernel. Please be patient!")) if self._debug: self._logger.log("DEBUG: build_kernel(): running: genkernel all " + genkernel_options + " in chroot.") exitstatus = GLIUtility.spawn("genkernel all " + genkernel_options, chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) if not GLIUtility.exitsuccess(exitstatus): @@ -792,17 +865,17 @@ class ArchitectureTemplate: # if not GLIUtility.exitsuccess(exitstatus): # raise GLIException("EmergeHotplugError", 'fatal','build_kernel', "Could not emerge hotplug!") # self._logger.log("Hotplug emerged.") - exitstatus = self._portage.emerge("coldplug") +# exitstatus = self._portage.emerge("coldplug", self._install_profile.get_grp_install()) # if not GLIUtility.exitsuccess(exitstatus): # raise GLIException("EmergeColdplugError", 'fatal','build_kernel', "Could not emerge coldplug!") self._logger.log("Coldplug emerged. Now they should be added to the default runlevel.") # self._add_to_runlevel("hotplug") - self._add_to_runlevel("coldplug", runlevel="boot") +# self._add_to_runlevel("coldplug", runlevel="boot") if self._install_profile.get_kernel_bootsplash(): self._logger.log("Bootsplash enabled...emerging necessary packages") - self._portage.emerge(["splashutils", "splash-themes-livecd"]) + self._portage.emerge(["splashutils", "splash-themes-livecd"], self._install_profile.get_grp_install()) self._logger.log("Genkernel complete.") elif build_mode == "custom": #CUSTOM CONFIG @@ -810,11 +883,11 @@ class ArchitectureTemplate: kernel_compile_script += " && make && make modules && make modules_install" #Ok now that it's built, copy it to /boot/kernel-* for bootloader code to find it - if self._client_configuration.get_architecture_template() == "x86": + if self._architecture_name == "x86": kernel_compile_script += " && cp /usr/src/linux/arch/i386/boot/bzImage /boot/kernel-custom\n" - elif self._client_configuration.get_architecture_template() == "amd64": + elif self._architecture_name == "amd64": kernel_compile_script += " && cp /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel-custom\n" - elif self._client_configuration.get_architecture_template() == "ppc": + elif self._architecture_name == "ppc": kernel_compile_script += " && cp /usr/src/linux/vmlinux /boot/kernel-custom\n" if self._debug: self._logger.log("DEBUG: build_kernel(): writing custom kernel script: "+kernel_compile_script) f = open(self._chroot_dir+"/var/tmp/kernel_script", 'w') @@ -837,7 +910,7 @@ class ArchitectureTemplate: if self._install_profile.get_kernel_bootsplash(): self._logger.log("Bootsplash enabled...emerging necessary packages") - self._portage.emerge(["splashutils", "splash-themes-livecd"]) + self._portage.emerge(["splashutils", "splash-themes-livecd"], self._install_profile.get_grp_install()) self._logger.log("Custom kernel complete") @@ -861,7 +934,7 @@ class ArchitectureTemplate: if mta_pkg: # Emerge MTA if self._debug: self._logger.log("DEBUG: install_mta(): installing mta: "+mta_pkg) - exitstatus = self._portage.emerge(mta_pkg) + exitstatus = self._portage.emerge(mta_pkg, self._install_profile.get_grp_install()) # if not GLIUtility.exitsuccess(exitstatus): # raise GLIException("MTAError", 'fatal','install_mta', "Could not emerge " + mta_pkg + "!") self._logger.log("MTA installed: "+mta_pkg) @@ -871,7 +944,7 @@ class ArchitectureTemplate: for pkg in installpackages: if pkg in ['esmtp', 'exim', 'msmtp', 'nbsmtp', 'nullmailer', 'sendmail', 'ssmtp', 'xmail']: self._logger.log("Found an mta in the package list: "+pkg+". Installing early.") - exitstatus = self._portage.emerge(pkg) + exitstatus = self._portage.emerge(pkg, self._install_profile.get_grp_install()) self._logger.log("MTA installed.") break # We only want to install one @@ -883,7 +956,7 @@ class ArchitectureTemplate: if logging_daemon_pkg: # Emerge Logging Daemon if self._debug: self._logger.log("DEBUG: install_logging_daemon: emerging "+logging_daemon_pkg) - exitstatus = self._portage.emerge(logging_daemon_pkg) + exitstatus = self._portage.emerge(logging_daemon_pkg, self._install_profile.get_grp_install()) # if not GLIUtility.exitsuccess(exitstatus): # raise GLIException("LoggingDaemonError", 'fatal','install_logging_daemon', "Could not emerge " + logging_daemon_pkg + "!") @@ -900,12 +973,12 @@ class ArchitectureTemplate: # Get cron daemon info cron_daemon_pkg = self._install_profile.get_cron_daemon_pkg() if cron_daemon_pkg: - if cron_daemon_pkg == "none": + if cron_daemon_pkg in ("none", "None"): self._logger.log("Skipping installation of cron daemon") else: # Emerge Cron Daemon if self._debug: self._logger.log("DEBUG: install_cron_daemon: emerging "+cron_daemon_pkg) - exitstatus = self._portage.emerge(cron_daemon_pkg) + exitstatus = self._portage.emerge(cron_daemon_pkg, self._install_profile.get_grp_install()) # if not GLIUtility.exitsuccess(exitstatus): # raise GLIException("CronDaemonError", 'fatal', 'install_cron_daemon', "Could not emerge " + cron_daemon_pkg + "!") @@ -917,7 +990,7 @@ class ArchitectureTemplate: self._add_to_runlevel(initscript) # If the Cron Daemon is not vixie-cron, run crontab - if "vixie-cron" not in cron_daemon_pkg: + if cron_daemon_pkg != "vixie-cron": if self._debug: self._logger.log("DEBUG: install_cron_daemon: running: crontab /etc/crontab in chroot.") exitstatus = GLIUtility.spawn("crontab /etc/crontab", chroot=self._chroot_dir, display_on_tty8=True) if not GLIUtility.exitsuccess(exitstatus): @@ -929,15 +1002,13 @@ class ArchitectureTemplate: def install_filesystem_tools(self): "Installs and sets up fstools" # Get the list of file system tools to be installed - parts = self._install_profile.get_partition_tables() + mounts = self._install_profile.get_mounts() # don't use an array, use a set instead filesystem_types = [] - for device in parts: - tmp_partitions = parts[device] #.get_install_profile_structure() - for partition in tmp_partitions: #.get_ordered_partition_list(): - partition_type = tmp_partitions[partition]['type'].lower() - if tmp_partitions[partition]['mountpoint'] and partition_type not in filesystem_types: - filesystem_types.append(partition_type) + for mount in mounts: + partition_type = mount['type'].lower() + if mount['mountpoint'] and partition_type not in filesystem_types: + filesystem_types.append(partition_type) package_list = [] for filesystem in filesystem_types: @@ -960,7 +1031,7 @@ class ArchitectureTemplate: failed_list = [] for package in package_list: if self._debug: self._logger.log("DEBUG: install_filesystem_tools(): emerging "+package) - exitstatus = self._portage.emerge(package) + exitstatus = self._portage.emerge(package, self._install_profile.get_grp_install()) # if not GLIUtility.exitsuccess(exitstatus): # self._logger.log("ERROR! : Could not emerge "+package+"!") # failed_list.append(package) @@ -970,27 +1041,12 @@ class ArchitectureTemplate: if len(failed_list) > 0: raise GLIException("InstallFileSystemToolsError", 'warning', 'install_filesystem_tools', "Could not emerge " + failed_list + "!") - ## - # Installs rp-pppoe but does not configure it. This function is quite the unknown. - def install_rp_pppoe(self): - # If user wants us to install rp-pppoe, then do so - if self._install_profile.get_install_rp_pppoe(): - if self._debug: self._logger.log("DEBUG: install_rp_pppoe: emerging rp-pppoe") - exitstatus = self._portage.emerge("rp-pppoe") -# if not GLIUtility.exitsuccess(exitstatus): -# self._logger.log("ERROR! : Could not emerge rp-pppoe!") - # raise GLIException("RP_PPPOEError", 'warning', 'install_rp_pppoe', "Could not emerge rp-pppoe!") -# else: - self._logger.log("rp-pppoe emerged but not set up.") - # Should we add a section here to automatically configure rp-pppoe? - # I think it should go into the setup_network_post section - # What do you guys think? <-- said by unknown. samyron or npmcallum ## - # Installs and sets up pcmcia-cs if selected in the profile + # Installs and sets up pcmcia-cs if selected in the profile IS THIS USED AT ALL???? def install_pcmcia_cs(self): if self._debug: self._logger.log("DEBUG: install_pcmcia_cs(): emerging pcmcia-cs") - exitstatus = self._portage.emerge("pcmcia-cs") + exitstatus = self._portage.emerge("pcmcia-cs", self._install_profile.get_grp_install()) # if not GLIUtility.exitsuccess(exitstatus): # self._logger.log("ERROR! : Could not emerge pcmcia-cs!") @@ -999,48 +1055,6 @@ class ArchitectureTemplate: self._add_to_runlevel('pcmcia') self._logger.log("PCMCIA_CS emerged and configured.") - ## - # This runs etc-update and then re-overwrites the files by running the configure_*'s to keep our values. - def update_config_files(self): - "Runs etc-update (overwriting all config files), then re-configures the modified ones" - # Run etc-update overwriting all config files - if self._debug: self._logger.log("DEBUG: update_config_files(): running: "+'echo "-5" | chroot '+self._chroot_dir+' etc-update') - status = GLIUtility.spawn('echo "-5" | chroot '+self._chroot_dir+' etc-update', display_on_tty8=True, logfile=self._compile_logfile, append_log=True) - if not GLIUtility.exitsuccess(status): - self._logger.log("ERROR! : Could not update the config files!") - else: -# self.configure_make_conf() - self.configure_fstab() -# self.configure_rc_conf() - etc_files = self._install_profile.get_etc_files() - for etc_file in etc_files: - # Skip entries with blank filenames - if not etc_file: continue - if self._debug: self._logger.log("DEBUG: update_config_files(): updating config file: "+etc_file) - if isinstance(etc_files[etc_file], dict): - self._edit_config(self._chroot_dir + "/etc/" + etc_file, etc_files[etc_file]) - else: - for entry in etc_files[etc_file]: - # Skip blank entries - if not entry: continue - self._edit_config(self._chroot_dir + "/etc/" + etc_file, { "0": entry }, only_value=True) - self._logger.log("Config files updated using etc-update. make.conf/fstab/rc.conf restored.") - - ## - # Configures /etc/rc.conf (deprecated by above code) - def configure_rc_conf(self): - - # Get make.conf options - options = self._install_profile.get_rc_conf() - - # For each configuration option... - filename = self._chroot_dir + "/etc/rc.conf" -# self._edit_config(filename, {"COMMENT": "GLI additions ===>"}) - for key in options.keys(): - # Add/Edit it into rc.conf - self._edit_config(filename, {key: options[key]}) -# self._edit_config(filename, {"COMMENT": "<=== End GLI additions"}) - self._logger.log("rc.conf configured.") ## # Sets up the network for the first boot @@ -1210,21 +1224,20 @@ class ArchitectureTemplate: emerge_dhcp = True if emerge_dhcp: if self._debug: self._logger.log("DEBUG: setup_network_post(): emerging dhcpcd.") - exitstatus = self._portage.emerge("dhcpcd") + exitstatus = self._portage.emerge("dhcpcd", self._install_profile.get_grp_install()) # if not GLIUtility.exitsuccess(exitstatus): # self._logger.log("ERROR! : Could not emerge dhcpcd!") # else: self._logger.log("dhcpcd emerged.") + ## - # Sets the root password - def set_root_password(self): - if self._debug: self._logger.log("DEBUG: set_root_password(): running: "+ 'echo \'root:' + self._install_profile.get_root_pass_hash() + '\' | chroot '+self._chroot_dir+' chpasswd -e') - status = GLIUtility.spawn('echo \'root:' + self._install_profile.get_root_pass_hash() + '\' | chroot '+self._chroot_dir+' chpasswd -e') - if not GLIUtility.exitsuccess(status): - raise GLIException("SetRootPasswordError", 'fatal', 'set_root_password', "Failure to set root password!") - self._logger.log("Root Password set on the new system.") - + # This is a stub function to be done by the individual arch. I don't think it's even needed here. + # but it's nice having it just incase. + def install_bootloader(self): + "THIS FUNCTION MUST BE DONE BY THE INDIVIDUAL ARCH" + pass + ## # Sets up the new users for the system def set_users(self): @@ -1291,7 +1304,65 @@ class ArchitectureTemplate: # raise GLIException("AddUserError", 'warning', 'set_users', "Failure to add user " + username) else: self._logger.log("User " + username + " was added.") - + + ## + # Installs a list of packages specified in the profile. Will install any extra software! + # In the future this function will lead to better things. It may even wipe your ass for you. + def install_packages(self): + installpackages = self._install_profile.get_install_packages() + if installpackages: +# pkglist = self._portage.get_deps(" ".join(installpackages)) +# if self._debug: self._logger.log("install_packages(): pkglist is " + str(pkglist)) +# for i, pkg in enumerate(pkglist): +# if self._debug: self._logger.log("install_packages(): processing package " + pkg) +# self.notify_frontend("progress", (float(i) / len(pkglist), "Emerging " + pkg + " (" + str(i) + "/" + str(len(pkglist)) + ")")) +# if not self._portage.get_best_version_vdb("=" + pkg): +# status = self._emerge("=" + pkg) +# if not GLIUtility.exitsuccess(status): +# raise GLIException("ExtraPackagesError", "fatal", "install_packages", "Could not emerge " + pkg + "!") +# else: +# try: +# self._portage.copy_pkg_to_chroot(pkg) +# except: +# raise GLIException("ExtraPackagesError", "fatal", "install_packages", "Could not emerge " + pkg + "!") + self._portage.emerge(installpackages, self._install_profile.get_grp_install()) + + if GLIUtility.is_file(self._chroot_dir + "/etc/X11"): + # Copy the xorg.conf from the LiveCD if they installed xorg-x11 + exitstatus = GLIUtility.spawn("cp /etc/X11/xorg.conf " + self._chroot_dir + "/etc/X11/xorg.conf") + if not GLIUtility.exitsuccess(exitstatus): + self._logger.log("Could NOT copy the xorg configuration from the livecd to the new system!") + else: + self._logger.log("xorg.conf copied to new system. X should be ready to roll!") + if GLIUtility.is_file(self._chroot_dir + "/etc/X11/gdm/gdm.conf"): + GLIUtility.spawn("cp -f /etc/X11/gdm/gdm.conf.old " + self._chroot_dir + "/etc/X11/gdm/gdm.conf") + if GLIUtility.is_file(self._chroot_dir + "/etc/X11/gdm/custom.conf"): + GLIUtility.spawn("cp -f /etc/X11/gdm/custom.conf.old " + self._chroot_dir + "/etc/X11/gdm/custom.conf") + + ## + # Will set the list of services to runlevel default. This is a temporary solution! + def set_services(self): + services = self._install_profile.get_services() + for service in services: + if service: + runlevel = "default" + if "|" in service: + service, runlevel = service.split("|", 1) + self._add_to_runlevel(service, runlevel) + + ## + # Will execute any arbritraially defined script here for post-install customization. + def run_post_install_script(self): + if self._install_profile.get_post_install_script_uri(): + try: + if self._debug: self._logger.log("DEBUG: run_post_install_script(): getting script: "+self._install_profile.get_post_install_script_uri()) + GLIUtility.get_uri(self._install_profile.get_post_install_script_uri(), self._chroot_dir + "/var/tmp/post-install") + if self._debug: self._logger.log("DEBUG: run_post_install_script(): running: chmod a+x /var/tmp/post-install && /var/tmp/post-install in chroot") + GLIUtility.spawn("chmod a+x /var/tmp/post-install && /var/tmp/post-install", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) + except: + raise GLIException("RunPostInstallScriptError", 'fatal', 'run_post_install_script', "Failed to retrieve and/or execute post-install script") + + ## # This function will handle the various cleanup tasks as well as unmounting the filesystems for reboot. def finishing_cleanup(self): @@ -1299,7 +1370,7 @@ class ArchitectureTemplate: #get rid of the compile_output file so the symlink doesn't get screwed up. #we copy the log over to the new system. - install_logfile = self._client_configuration.get_log_file() + install_logfile = LOGFILE try: if self._debug: self._logger.log("DEBUG: finishing_cleanup(): copying logfile over to new system's root.") shutil.copy(install_logfile, self._chroot_dir + install_logfile) @@ -1307,10 +1378,11 @@ class ArchitectureTemplate: if self._debug: self._logger.log("DEBUG: finishing_cleanup(): ERROR! could not copy logfile over to /root.") #Now we're done logging as far as the new system is concerned. GLIUtility.spawn("cp /tmp/installprofile.xml " + self._chroot_dir + "/root/installprofile.xml") - GLIUtility.spawn("cp /tmp/clientconfiguration.xml " + self._chroot_dir + "/root/clientconfiguration.xml") + #Unmount mounted fileystems in preparation for reboot #mounts = GLIUtility.spawn(r"mount | sed -e 's:^.\+ on \(.\+\) type .\+$:\1:' | grep -e '^" + self._chroot_dir + "' | sort -r", return_output=True)[1].split("\n") + if self._debug: self._logger.log("DEBUG: mounted_devices is %s" % str(self._mounted_devices)) mounted_devices = self._mounted_devices mounted_devices.sort() mounted_devices.reverse() @@ -1328,43 +1400,32 @@ class ArchitectureTemplate: if not GLIUtility.exitsuccess(ret): self._logger.log("ERROR! : Could not deactivate swap ("+swap_device+")!") - #OLD WAY: Unmount the /proc and /dev that we mounted in prepare_chroot - #There really isn't a reason to log errors here. - #ret = GLIUtility.spawn("umount "+self._chroot_dir+"/proc", display_on_tty8=True, logfile=self._compile_logfile, append_log=True) - #ret = GLIUtility.spawn("umount "+self._chroot_dir+"/dev", display_on_tty8=True, logfile=self._compile_logfile, append_log=True) - #temp hack to unmount the new root. - #ret = GLIUtility.spawn("umount "+self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) - #insert code here to unmount the swap partition, if there is one. - GLIUtility.spawn("rm /tmp/compile_output.log && rm " + install_logfile) - ## - # This is a stub function to be done by the individual arch. I don't think it's even needed here. - # but it's nice having it just incase. - def install_bootloader(self): - "THIS FUNCTION MUST BE DONE BY THE INDIVIDUAL ARCH" - pass - def run_post_install_script(self): - if self._install_profile.get_post_install_script_uri(): - try: - if self._debug: self._logger.log("DEBUG: run_post_install_script(): getting script: "+self._install_profile.get_post_install_script_uri()) - GLIUtility.get_uri(self._install_profile.get_post_install_script_uri(), self._chroot_dir + "/var/tmp/post-install") - if self._debug: self._logger.log("DEBUG: run_post_install_script(): running: chmod a+x /var/tmp/post-install && /var/tmp/post-install in chroot") - GLIUtility.spawn("chmod a+x /var/tmp/post-install && /var/tmp/post-install", chroot=self._chroot_dir, display_on_tty8=True, logfile=self._compile_logfile, append_log=True) - except: - raise GLIException("RunPostInstallScriptError", 'fatal', 'run_post_install_script', "Failed to retrieve and/or execute post-install script") ## # This function should only be called in the event of an install failure. It performs # general cleanup to prepare the system for another installer run. def install_failed_cleanup(self): + steps = len(self._mounted_devices) + len(self._swap_devices) + 2 + + if self._debug: self._logger.log("DEBUG: install_failed_cleanup(): running: mv /tmp/compile_output.log /tmp/compile_output.log.failed") + self.notify_frontend("progress", (float(1) / (steps), "Moving compile output logfile")) + GLIUtility.spawn("cp " + self._compile_logfile + " " + self._compile_logfile + ".failed && rm " + self._compile_logfile) + self.notify_frontend("progress", (float(2) / (steps), "Moving install logfile")) + GLIUtility.spawn("mv " + LOGFILE + " " + LOGFILE + ".failed") + cur_step = 2 + if self._debug: self._logger.log("DEBUG: install_failed_cleanup(): gathering mounts to unmount") #mounts = GLIUtility.spawn(r"mount | sed -e 's:^.\+ on \(.\+\) type .\+$:\1:' | grep -e '^" + self._chroot_dir + "' | sort -r", return_output=True)[1].split("\n") + if self._debug: self._logger.log("DEBUG: mounted_devices is %s" % str(self._mounted_devices)) mounted_devices = self._mounted_devices mounted_devices.sort() mounted_devices.reverse() for mount in mounted_devices: + cur_step += 1 + self.notify_frontend("progress", (float(cur_step) / (steps), "Unmounting " + mount)) if self._debug: self._logger.log("DEBUG: install_failed_cleanup(): running: umount -l " + mount) ret = GLIUtility.spawn("umount -l " + self._chroot_dir + mount) if not GLIUtility.exitsuccess(ret): @@ -1373,441 +1434,9 @@ class ArchitectureTemplate: # now turn off all swap as well. # we need to find the swap devices for swap_device in self._swap_devices: + cur_step += 1 + self.notify_frontend("progress", (float(cur_step) / (steps), "Deactivating swap on " + swap_device)) if self._debug: self._logger.log("DEBUG: install_failed_cleanup(): running: swapoff "+swap_device) ret = GLIUtility.spawn("swapoff "+swap_device) if not GLIUtility.exitsuccess(ret): self._logger.log("ERROR! : Could not deactivate swap ("+swap_device+")!") - - if self._debug: self._logger.log("DEBUG: install_failed_cleanup(): running: cp /tmp/compile_output.log /tmp/compile_output.log.failed then removing /tmp/compile_output.log") - GLIUtility.spawn("mv " + self._compile_logfile + " " + self._compile_logfile + ".failed") -# GLIUtility.spawn("rm /tmp/compile_output.log") - GLIUtility.spawn("mv " + self._client_configuration.get_log_file() + " " + self._client_configuration.get_log_file() + ".failed") -# GLIUtility.spawn("rm /var/log/installer.log") - - def _sectors_to_megabytes(self, sectors, sector_bytes=512): - return float((float(sectors) * sector_bytes)/ float(MEGABYTE)) - - def _wait_for_device_node(self, devnode): - if GLIUtility.is_file("/sbin/udevsettle"): - GLIUtility.spawn("/sbin/udevsettle") - if not GLIUtility.is_file(devnode): - GLIUtility.spawn("/sbin/udevsettle") - else: - for i in range(0, 10): - if GLIUtility.is_file(devnode): - break - time.sleep(1) - time.sleep(1) - for i in range(0, 10): - if GLIUtility.is_file(devnode): - break - time.sleep(1) - - def _add_partition(self, disk, start, end, type, fs, name="", strict_start=False, strict_end=False): - if self._debug: self._logger.log("_add_partition(): type=%s, fstype=%s" % (type, fs)) - types = { 'primary': parted.PARTITION_PRIMARY, 'extended': parted.PARTITION_EXTENDED, 'logical': parted.PARTITION_LOGICAL } - fsTypes = {} - fs_type = parted.file_system_type_get_next () - while fs_type: - fsTypes[fs_type.name] = fs_type - fs_type = parted.file_system_type_get_next (fs_type) - fstype = None - if fs == "apple_bootstrap": - fs = "hfs" - if fs: fstype = fsTypes[fs] - newpart = disk.partition_new(types[type], fstype, start, end) - constraint = disk.dev.constraint_any() - if strict_start: - constraint.start_range.set_start(start) - constraint.start_range.set_end(start) - constraint.end_range.set_start(end) - if strict_end: - constraint.start_range.set_start(start) - constraint.end_range.set_start(end) - constraint.end_range.set_end(end) - disk.add_partition(newpart, constraint) - if self._debug: self._logger.log("_add_partition(): partition added") - - def _delete_partition(self, parted_disk, minor): - try: - parted_disk.delete_partition(parted_disk.get_partition(minor)) - except: - self._logger.log("_delete_partition(): could not delete partition...ignoring (for now)") - - def _check_table_changed(self, oldparts, newparts): - for part in newparts: - oldpart = oldparts[part] - newpart = newparts[part] - if not newparts[part]['origminor'] or not oldparts.get_partition(part): - return True - if oldpart['type'] == newpart['type'] and long(oldpart['mb']) == long(newpart['mb']) and not newpart['resized'] and not newpart['format']: - continue - else: - return True - return False - - def _check_table_layout_changed(self, oldparts, newparts): - # This function is similar to the above function except it will see it as un-changed even if a partition is just being reformatted - for part in newparts: - oldpart = oldparts[part] - newpart = newparts[part] - if not newparts[part]['origminor'] or not oldparts.get_partition(part): - return True - if oldpart['type'] == newpart['type'] and long(oldpart['mb']) == long(newpart['mb']) and not newpart['resized']: - continue - else: - return True - return False - - def _find_existing_in_new(self, oldminor, newparts): - for part in newparts: - if newparts[part]['origminor'] == oldminor: - return part - return 0 - - def _check_keeping_any_existing(self, newparts): - for part in newparts: - if newparts[part]['origminor']: return True - return False - - def _find_next_partition(self, curminor, parts): - foundmyself = False - for part in parts: - if not part == curminor and not foundmyself: continue - if part == curminor: - foundmyself = True - continue - if foundmyself: - return part - return 0 - - def _find_current_minor_for_part(self, device, start): - tmp_oldparts = GLIStorageDevice.Device(device, arch=self._client_configuration.get_architecture_template()) - tmp_oldparts.set_partitions_from_disk() - for tmp_oldpart in tmp_oldparts: - self._logger.log("_find_current_minor_for_part(): looking at minor %s...start sector is %s...looking for %s" % (str(tmp_oldpart), str(tmp_oldparts[tmp_oldpart]['start']), str(start))) - if tmp_oldparts[tmp_oldpart]['start'] == start: - return tmp_oldparts[tmp_oldpart]['minor'] - else: - raise GLIException("PartitionResizeError", 'fatal', '_find_current_minor_for_part', "Could not determine the new devnode for partition starting at sector " + str(start)) - - def _partition_delete_step(self, parted_disk, oldparts, newparts): - self._logger.log("_partition_delete_step(): Deleting partitions that aren't being resized") - for oldpart in list(oldparts)[::-1]: - tmppart_old = oldparts[oldpart] - if oldparts.get_disklabel() != "mac" and tmppart_old['type'] == "free": continue - if tmppart_old['type'] == "extended": - # Iterate through logicals to see if any are being resized - self._logger.log("_partition_delete_step(): logicals for extended part %d: %s" % (tmppart_old['minor'], str(tmppart_old.get_logicals()))) - for logpart in tmppart_old.get_logicals(): - newminor = self._find_existing_in_new(logpart, newparts) - self._logger.log("_partition_delete_step(): newminor is " + str(newminor)) - if newminor and newparts[newminor]['resized']: - self._logger.log(" Logical partition " + str(logpart) + " to be resized...can't delete extended") - break - else: - self._logger.log(" No logical partitions are being resized...deleting extended") - self._delete_partition(parted_disk, oldpart) - else: - newminor = self._find_existing_in_new(oldpart, newparts) - if newminor and not newparts[newminor]['format']: - if newparts[newminor]['resized']: - self._logger.log(" Ignoring old minor " + str(oldpart) + " to resize later") - continue - else: - self._logger.log(" Deleting old minor " + str(oldpart) + " to be recreated later") - else: - self._logger.log(" No match in new layout for old minor " + str(oldpart) + "...deleting") - self._delete_partition(parted_disk, oldpart) - parted_disk.commit() - - def _partition_resize_step(self, parted_disk, device, oldparts, newparts): - self._logger.log("_partition_resize_step(): Resizing partitions") - device_sectors = newparts.get_num_sectors() - for oldpart in oldparts: - tmppart_old = oldparts[oldpart] - newminor = self._find_existing_in_new(oldpart, newparts) - if not newminor or not newparts[newminor]['resized'] or newparts[newminor]['type'] in ("extended", "free"): - continue - tmppart_new = newparts[newminor] - type = tmppart_new['type'] - start = tmppart_new['start'] - end = start + (long(tmppart_new['mb']) * MEGABYTE / 512) - 1 - - # Make sure calculated end sector doesn't overlap start sector of next partition - nextminor = self._find_next_partition(newminor, newparts) - if nextminor: - if newparts[nextminor]['start'] and end >= newparts[nextminor]['start']: - self._logger.log(" End sector for growing partition overlaps with start of next partition...fixing") - end = newparts[nextminor]['start'] - 1 - - # cap to end of device - if end >= device_sectors: - end = device_sectors - 1 - - total_sectors = end - start + 1 - total_bytes = long(total_sectors) * 512 - - # Delete partition and recreate at same start point with new size if growing - if tmppart_new['mb'] > tmppart_old['mb']: - curminor = self._find_current_minor_for_part(device, start) - self._delete_partition(parted_disk, curminor) - if tmppart_new.is_logical(): - tmptype = "logical" - else: - tmptype = "primary" - self._add_partition(parted_disk, start, end, tmptype, tmppart_new['type'], strict_start=True) - parted_disk.commit() - - curminor = self._find_current_minor_for_part(device, start) - devnode = device + str(curminor) - - self._wait_for_device_node(devnode) - - if type in ("ext2", "ext3"): - resizecmd = "resize2fs %s %sK" % (devnode, str(int((total_bytes - (2 * MEGABYTE)) / 1024))) - self._logger.log("_partition_resize_step(): running: " + resizecmd) - ret = GLIUtility.spawn(resizecmd, logfile=self._compile_logfile, append_log=True) - if not GLIUtility.exitsuccess(ret): - raise GLIException("PartitionResizeError", 'fatal', 'partition', "could not resize ext2/3 filesystem on " + devnode) - elif type == "ntfs": - ret = GLIUtility.spawn("yes | ntfsresize -v --size " + str(total_bytes) + " " + devnode, logfile=self._compile_logfile, append_log=True) - if not GLIUtility.exitsuccess(ret): - raise GLIException("PartitionResizeError", 'fatal', 'partition', "could not resize NTFS filesystem on " + devnode) - elif type in ("linux-swap", "fat32", "fat16"): - parted_fs = parted_disk.get_partition(curminor).geom.file_system_open() - resize_constraint = parted_fs.get_resize_constraint() - if total_sectors < resize_constraint.min_size or start != resize_constraint.start_range.start: - raise GLIException("PartitionError", 'fatal', 'partition', "New size specified for " + devnode + " is not within allowed boundaries (blame parted)") - new_geom = resize_constraint.start_range.duplicate() - new_geom.set_start(start) - new_geom.set_end(end) - try: - parted_fs.resize(new_geom) - except: - raise GLIException("PartitionResizeError", 'fatal', 'partition', "could not resize " + devnode) - self._logger.log(" Deleting old minor " + str(oldpart) + " to be recreated in next pass") -# self._delete_partition(parted_disk, oldpart) - parted_disk.delete_all() - parted_disk.commit() - - def _partition_recreate_step(self, parted_disk, newparts): - self._logger.log("_partition_recreate_step(): Recreating partitions") - start = 0 - end = 0 - extended_start = 0 - extended_end = 0 - device_sectors = newparts.get_num_sectors() - self._logger.log(" Drive has " + str(device_sectors) + " sectors") - for part in newparts: - strict_start = False - strict_end = False - newpart = newparts[part] - self._logger.log(" Partition " + str(part) + " has " + str(newpart['mb']) + "MB") - if newpart['start']: - self._logger.log(" Old start sector " + str(newpart['start']) + " retrieved") - if start != newpart['start']: - self._logger.log(" Retrieved start sector is not the same as the calculated next start sector (usually not an issue)") - start = newpart['start'] - strict_start = True - else: - if newpart.is_logical() and start > extended_end: - start = extended_start + 1 - self._logger.log(" Start sector calculated to be " + str(start)) - if extended_end and not newpart.is_logical() and start <= extended_end: - self._logger.log(" Start sector for primary is less than the end sector for previous extended") - start = extended_end + 1 - if newpart['end']: - self._logger.log(" Old end sector " + str(newpart['end']) + " retrieved") - end = newpart['end'] - part_sectors = end - start + 1 - strict_end = True - else: - part_sectors = long(newpart['mb']) * MEGABYTE / 512 - end = start + part_sectors - if newpart.is_logical() and end > extended_end: - end = extended_end - self._logger.log(" End sector calculated to be " + str(end)) - # Make sure end doesn't overlap next partition's existing start sector - nextminor = self._find_next_partition(newpart, newparts) - if nextminor: - if newparts[nextminor]['start'] and end >= newparts[nextminor]['start']: - self._logger.log(" End sector for partition overlaps with start of next partition...fixing") - end = newparts[nextminor]['start'] - 1 - strict_end = True - # cap to end of device - if end >= device_sectors: - end = device_sectors - 1 - # now the actual creation - if newpart['type'] == "free": - if newparts.get_disklabel() == "mac": - # Create a dummy partition to be removed later because parted sucks - self._logger.log(" Adding dummy partition to fool parted " + str(part) + " from " + str(start) + " to " + str(end)) - self._add_partition(parted_disk, start, end, "primary", "ext2", "free", strict_start=strict_start, strict_end=strict_end) - elif newpart['type'] == "extended": - self._logger.log(" Adding extended partition " + str(part) + " from " + str(start) + " to " + str(end)) - self._add_partition(parted_disk, start, end, "extended", "", strict_start=strict_start, strict_end=strict_end) - extended_start = start - extended_end = end - elif not newpart.is_logical(): - self._logger.log(" Adding primary partition " + str(part) + " from " + str(start) + " to " + str(end)) - self._add_partition(parted_disk, start, end, "primary", newpart['type'], strict_start=strict_start, strict_end=strict_end) - elif newpart.is_logical(): - if start >= extended_end: - start = extended_start + 1 - end = start + part_sectors - if nextminor and not newparts[nextminor].is_logical() and end > extended_end: - end = extended_end - self._logger.log(" Adding logical partition " + str(part) + " from " + str(start) + " to " + str(end)) - self._add_partition(parted_disk, start, end, "logical", newpart['type'], strict_start=strict_start, strict_end=strict_end) - if self._debug: self._logger.log("partition(): flags: " + str(newpart['flags'])) - for flag in newpart['flags']: - if parted_disk.get_partition(part).is_flag_available(flag): - parted_disk.get_partition(part).set_flag(flag, True) - if newpart['name'] and parted_disk.type.check_feature(parted.DISK_TYPE_PARTITION_NAME): - parted_disk.set_name(newpart['name']) - # write to disk - if self._debug: self._logger.log("partition(): committing change to disk") - parted_disk.commit() - if self._debug: self._logger.log("partition(): committed change to disk") - start = end + 1 - - def _partition_format_step(self, parted_disk, device, newparts): - self._logger.log("_partition_format_step(): Formatting new partitions") - for part in newparts: - newpart = newparts[part] - devnode = newpart['devnode'] - # This little hack is necessary because parted sucks goat nuts - if newparts.get_disklabel() == "mac" and newpart['type'] == "free": - self._delete_partition(parted_disk, newpart) - continue - if newpart['format'] and newpart['type'] not in ('extended', 'free'): -# devnode = device + str(int(part)) - if self._debug: self._logger.log("_partition_format_step(): devnode is %s in formatting code" % devnode) - # if you need a special command and - # some base options, place it here. - format_cmds = { 'linux-swap': "mkswap", 'fat16': "mkfs.vfat -F 16", 'fat32': "mkfs.vfat -F 32", - 'ntfs': "mkntfs", 'xfs': "mkfs.xfs -f", 'jfs': "mkfs.jfs -f", - 'reiserfs': "mkfs.reiserfs -f", 'ext2': "mkfs.ext2", 'ext3': "mkfs.ext3", - 'hfs': "hformat", 'apple_bootstrap': "hformat" - } - if newpart['type'] in format_cmds: - cmdname = format_cmds[newpart['type']] - else: # this should catch everything else - raise GLIException("PartitionFormatError", 'fatal', '_partition_format_step', "Unknown partition type " + newpart['type']) - # sleep a bit first - time.sleep(1) - for tries in range(10): - cmd = "%s %s %s" % (cmdname, newpart['mkfsopts'], devnode) - self._logger.log(" Formatting partition %s as %s with: %s" % (str(part),newpart['type'],cmd)) - ret = GLIUtility.spawn(cmd, logfile=self._compile_logfile, append_log=True) - if not GLIUtility.exitsuccess(ret): - self._logger.log("Try %d failed formatting partition %s...waiting 5 seconds" % (tries+1, devnode)) - time.sleep(5) - else: - break - else: - raise GLIException("PartitionFormatError", 'fatal', '_partition_format_step', "Could not create %s filesystem on %s" % (newpart['type'], devnode)) - - def partition(self): - """ - TODO: - skip fixed partitions in all passes (in GLISD maybe?) - """ - parts_old = {} - parts_new = self._install_profile.get_partition_tables() - for device in GLIStorageDevice.detect_devices(): - parts_old[device] = GLIStorageDevice.Device(device, arch=self._client_configuration.get_architecture_template()) - parts_old[device].set_partitions_from_disk() - - self.notify_frontend("progress", (0, "Examining partitioning data")) - total_steps = float(len(parts_new) * 4) # 4 for the number of passes over each device - cur_progress = 0 - for device in parts_new: - # Skip this device in parts_new if device isn't detected on current system - if not device in parts_old: - self._logger.log("There is no physical device " + device + " detected to match the entry in the install profile...skipping") - continue - - # This just makes things simpler in the code - newparts = parts_new[device] - oldparts = parts_old[device] - - # Check to see if the old and new partition table structures are the same...skip if they are - if not self._check_table_changed(oldparts, newparts): - self._logger.log("Partition table for " + device + " is unchanged...skipping") - continue - - self._logger.log("partition(): Processing " + device + "...") - - # Commit ritual sepuku if there are any mounted filesystems on this device - if GLIUtility.spawn("mount | grep '^" + device + "'", return_output=True)[1].strip(): - raise GLIException("PartitionsMountedError", 'fatal', 'partition', "Cannot partition " + device + " due to filesystems being mounted") - - # We also can't handle "unknown" partitions - for part in newparts: - if newparts[part]['type'] == "unknown": - raise GLIException("UnknownPartitionTypeError", 'fatal', 'partition', "Refusing to partition this drive due to the presence of an unknown type of partition") - - # Create pyparted objects for this device - parted_dev = parted.PedDevice.get(device) - try: - parted_disk = parted.PedDisk.new(parted_dev) - except: - if self._debug: self._logger.log("partition(): could not load existing disklabel...creating new one") - parted_disk = parted_dev.disk_new_fresh(parted.disk_type_get((newparts.get_disklabel() or GLIStorageDevice.archinfo[self._architecture_name]))) - - # Iterate through new partitions and check for 'origminor' and 'format' == False - for part in newparts: - tmppart_new = newparts[part] - if not tmppart_new['origminor'] or tmppart_new['format']: continue - if not tmppart_new['origminor'] in oldparts: - raise GLIException("MissingPartitionsError", 'fatal', 'partition', "Cannot find the existing partition that a new one refers to. This is not a bug. This is in fact your (the user's) fault. You should not reuse the installprofile.xml from a previous install that started the partitioning step.") - tmppart_old = oldparts[tmppart_new['origminor']] - if parted_disk.type.check_feature(parted.DISK_TYPE_PARTITION_NAME): - tmppart_new['name'] = tmppart_old['name'] - tmppart_new['flags'] = tmppart_old['flags'] - if tmppart_new['resized']: - # Partition is being resized in the new layout - self._logger.log(" Partition " + str(part) + " has origminor " + str(tmppart_new['origminor']) + " and it being resized...saving start sector " + str(tmppart_old['start'])) - tmppart_new['start'] = tmppart_old['start'] - tmppart_new['end'] = 0 - else: - # Partition is untouched in the new layout - self._logger.log(" Partition " + str(part) + " has origminor " + str(tmppart_new['origminor']) + "...saving start sector " + str(tmppart_old['start']) + " and end sector " + str(tmppart_old['end'])) - tmppart_new['start'] = tmppart_old['start'] - tmppart_new['end'] = tmppart_old['end'] - - if self._check_table_layout_changed(parts_old[device], parts_new[device]): - # First pass to delete old partitions that aren't resized - self.notify_frontend("progress", (cur_progress / total_steps, "Deleting partitioning that aren't being resized for " + device)) - cur_progress += 1 - self._partition_delete_step(parted_disk, oldparts, newparts) - - # Second pass to resize old partitions that need to be resized - self.notify_frontend("progress", (cur_progress / total_steps, "Resizing remaining partitions for " + device)) - cur_progress += 1 - self._partition_resize_step(parted_disk, device, oldparts, newparts) - - # Wiping disk and creating blank disklabel - try: - parted_disk = parted_dev.disk_new_fresh(parted.disk_type_get(newparts.get_disklabel())) - parted_disk.commit() - except: - raise GLIException("DiskLabelCreationError", 'fatal', 'partition', "Could not create a blank disklabel!") - - # Third pass to create new partition table - self.notify_frontend("progress", (cur_progress / total_steps, "Recreating partition table for " + device)) - cur_progress += 1 - self._partition_recreate_step(parted_disk, newparts) - else: - cur_progress += 3 - - # Fourth pass to format partitions - self.notify_frontend("progress", (cur_progress / total_steps, "Formatting partitions for " + device)) - cur_progress += 1 - self._partition_format_step(parted_disk, device, newparts) - - # All done for this device - self.notify_frontend("progress", (cur_progress / total_steps, "Done with partitioning for " + device)) - cur_progress += 1 diff --git a/src/GLIClientConfiguration.py b/src/GLIClientConfiguration.py deleted file mode 100644 index bc80105..0000000 --- a/src/GLIClientConfiguration.py +++ /dev/null @@ -1,554 +0,0 @@ -""" -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. -Gentoo Linux Installer - -$Id: GLIClientConfiguration.py,v 1.45 2006/07/30 20:01:14 codeman Exp $ -Copyright 2004 Gentoo Technologies Inc. - -The GLIClientConfiguration module contains the ClientConfiguration class -which is a singleton class that represents configuration data that is -used by the installer client during installation. Data that is part of -the actual install is contained in GLIInstallProfile. - -Usage: - from GLIClientConfiguration import ClientConfiguration - - PROCEDURE TO ADD NEW VARIABLES: (PLEASE KEEP IN ALPHABETICAL ORDER) - 1. Add a handler to the list. If the variable has children make sure you do it right. - Look at the existing structure to get an idea. - 2. Create a section for the two or three functions. - 3. Create the get_variable_name and set_variable_name functions. - Ensure the set function has correct error checking. - 4. If a simple value, add to the list in the general serialize() function. - If more complex add a serialize_variable_name to the list of special cases. - Then add the serialize_variable_name function to the section for the variable. -""" - -import string, re, GLIUtility, SimpleXMLParser, os.path -import xml.dom.minidom -from GLIException import * - -class ClientConfiguration: - - ## - # Initializes the ClientConfiguration. - def __init__(self): - self._architecture_template = "x86" - self._profile_uri = "" - - # This is the full path to the logfile - self._log_file = "/var/log/installer.log" - - # This is the root mount point - self._root_mount_point = "/mnt/gentoo" - - # Initialize some variables so we never reference a variable that never exists. - self._dns_servers = () - self._network_type = None - self._network_interface = "" - self._network_ip = "" - self._network_broadcast = "" - self._network_dhcp_options = "" - self._network_netmask = "" - self._network_gateway = "" - self._enable_ssh = False - self._root_passwd = "" - self._interactive = True - self._kernel_modules = () - self._ftp_proxy = "" - self._http_proxy = "" - self._rsync_proxy = "" - self._verbose = False - self._install_mode = "normal" - self.data = "" # used for serialization - - self._parser = SimpleXMLParser.SimpleXMLParser() - - self._parser.addHandler('client-configuration/architecture-template', self.set_architecture_template) - self._parser.addHandler('client-configuration/dns-servers', self.set_dns_servers) - self._parser.addHandler('client-configuration/enable-ssh', self.set_enable_ssh) - self._parser.addHandler('client-configuration/ftp-proxy', self.set_ftp_proxy) - self._parser.addHandler('client-configuration/http-proxy', self.set_http_proxy) - self._parser.addHandler('client-configuration/install-mode', self.set_install_mode) - self._parser.addHandler('client-configuration/interactive', self.set_interactive) - self._parser.addHandler('client-configuration/kernel-modules', self.set_kernel_modules) - self._parser.addHandler('client-configuration/log-file', self.set_log_file) - self._parser.addHandler('client-configuration/network-interface', self.set_network_interface) - self._parser.addHandler('client-configuration/network-ip', self.set_network_ip) - self._parser.addHandler('client-configuration/network-broadcast', self.set_network_broadcast) - self._parser.addHandler('client_configuration/network-dhcp-options', self.set_network_dhcp_options) - self._parser.addHandler('client-configuration/network-netmask', self.set_network_netmask) - self._parser.addHandler('client-configuration/network-gateway', self.set_network_gateway) - self._parser.addHandler('client-configuration/network-type', self.set_network_type) - self._parser.addHandler('client-configuration/profile-uri', self.set_profile_uri) - self._parser.addHandler('client-configuration/root-mount-point', self.set_root_mount_point) - self._parser.addHandler('client-configuration/root-passwd', self.set_root_passwd) - self._parser.addHandler('client-configuration/rsync-proxy', self.set_rsync_proxy) - self._parser.addHandler('client-configuration/verbose', self.set_verbose) - ## - # Parses the given filename populating the client_configuration. - # @param filename the file to be parsed. This should be a URI actually. - def parse(self, filename): - self._parser.parse(filename) - - ## - # Serializes the Client Configuration into an XML format that is returned. - def serialize(self): - fntable ={ 'architecture-template': self.get_architecture_template, - 'enable-ssh': self.get_enable_ssh, - 'ftp-proxy': self.get_ftp_proxy, - 'http-proxy': self.get_http_proxy, - 'install-mode': self.get_install_mode, - 'interactive': self.get_interactive, - 'log-file': self.get_log_file, - 'network-broadcast': self.get_network_broadcast, - 'network-dhcp-options': self.get_network_dhcp_options, - 'network-gateway': self.get_network_gateway, - 'network-interface': self.get_network_interface, - 'network-ip': self.get_network_ip, - 'network-netmask': self.get_network_netmask, - 'network-type': self.get_network_type, - 'profile-uri': self.get_profile_uri, - 'root-mount-point': self.get_root_mount_point, - 'root-passwd': self.get_root_passwd, - 'rsync-proxy': self.get_rsync_proxy, - 'verbose': self.get_verbose, - } - self.data = "<client-configuration>" - - for key in fntable.keys(): - self.data += "<%s>%s</%s>" % (key, fntable[key](), key) - - # Serialize the special cases. - self.serialize_dns_servers() - self.serialize_kernel_modules() - - # Add closing tag - self.data += "</client-configuration>" - - #Finish by putting it all in nice XML. - dom = xml.dom.minidom.parseString(self.data) - return dom.toprettyxml() - - ############################################################################ - #### Architecture Template - - ## - # Sets the architecture to be used for the install. - # @param xml_path not used here. - # @param architecture_template the architecture to be installed - # @param xml_attr not used here. - def set_architecture_template(self, xml_path, architecture_template, xml_attr): - if not architecture_template in ["x86", "amd64", "ppc", "sparc", "hppa", "alpha"]: - raise GLIException("UnsupportedArchitectureTemplateError", 'fatal','set_architecture_template', 'Architecture Template specified is not supported!') - self._architecture_template = architecture_template - ## - # Returns the architecture_template - def get_architecture_template(self): - return self._architecture_template - - # This variable has a simple serialize function. - - ############################################################################ - #### DNS Servers List - - ## - # Sets the dns servers - # @param xml_path not used here. - # @param nameservers space-separated list of nameservers - # @param xml_attr not used here. - def set_dns_servers(self, xml_path, nameservers, xml_attr): - if type(nameservers) == str: - nameservers = nameservers.split(" ") - dns = [] - for server in nameservers: - dns.append(server) - self._dns_servers = tuple(dns) - - ## - # Returns the list of dns servers - # @param self Parameter description - def get_dns_servers(self): - return self._dns_servers - - ## - # Serialization for the DNS servers - def serialize_dns_servers(self): - # Special Case the kernel modules - self.data += "<dns-servers>%s</dns-servers>" % " ".join(self.get_dns_servers()) - - # This variable has a simple serialize function. - - ############################################################################ - #### Enable SSH Decision for livecd environment - - ## - # Choose whether or not to enable SSH. - # @param xml_path not used here. - # @param enable_ssh a True/False bool value here or a string - # @param xml_attr not used here. - def set_enable_ssh(self, xml_path, enable_ssh, xml_attr): - if type(enable_ssh) == str: - enable_ssh = GLIUtility.strtobool(enable_ssh) - self._enable_ssh = enable_ssh - - ## - # Returns the choice of whether or not to enable SSH (True/False) - # @param self Parameter description - def get_enable_ssh(self): - return self._enable_ssh - - # This variable has a simple serialize function. - - ############################################################################ - #### FTP Proxy Address Information for livecd environment - - ## - # Sets the FTP proxy URI - # @param xml_path not used here. - # @param proxy a URI - # @param xml_attr not used here. - def set_ftp_proxy(self, xml_path, proxy, xml_attr): - self._ftp_proxy = proxy - - ## - # Returns the FTP proxy. - # @param self Parameter description - def get_ftp_proxy(self): - return self._ftp_proxy - - # This variable has a simple serialize function. - - ############################################################################ - #### HTTP Proxy Address Information for livecd environment - - ## - # Sets the HTTP proxy URI - # @param xml_path not used here. - # @param proxy a URI - # @param xml_attr not used here. - def set_http_proxy(self, xml_path, proxy, xml_attr): - self._http_proxy = proxy - - ## - # Returns the HTTP proxy - def get_http_proxy(self): - return self._http_proxy - - # This variable has a simple serialize function. - - ############################################################################ - #### Install Mode - - ## - # Sets the install mode. (currently "normal", "stage4", or "chroot") - # @param xml_path not used here. - # @param install_mode Install mode - # @param xml_attr not used here. - def set_install_mode(self, xml_path, install_mode, xml_attr): - self._install_mode = install_mode - - ## - # Returns install mode - # @param self Parameter description - def get_install_mode(self): - return self._install_mode - - # This variable has a simple serialize function. - - ############################################################################ - #### Interactive Install - - ## - # Sets whether or not to be an interactive install. (boolean) - # @param xml_path not used here. - # @param interactive True/False bool value or a string. - # @param xml_attr not used here. - def set_interactive(self, xml_path, interactive, xml_attr): - if type(interactive) != bool: - interactive = GLIUtility.strtobool(interactive) - self._interactive = interactive - - ## - # Returns bool value on interactive install choice. - # @param self Parameter description - def get_interactive(self): - return self._interactive - - # This variable has a simple serialize function. - - ############################################################################ - #### Set Kernel Modules to be loaded for the livecd environment - - ## - # Sets a list of modules to load on the livecd environment. - # @param xml_path not used here. - # @param modules string of modules - # @param xml_attr not used here. - def set_kernel_modules(self, xml_path, modules, xml_attr): - self._kernel_modules = tuple(string.split(modules)) - - ## - # Returns the list of kernel modules to load on the livecd environment. - def get_kernel_modules(self): - return self._kernel_modules - - ## - # Serialization for the kernel module list. joins together the modules. - def serialize_kernel_modules(self): - # Special Case the kernel modules - self.data += "<kernel-modules>%s</kernel-modules>" % " ".join(self.get_kernel_modules()) - - ############################################################################ - #### Log File Location - - ## - # Sets the log filename. - # @param xml_path not used here. - # @param log_file the name of the logfile for the CC to use. - # @param xml_attr not used here. - def set_log_file(self, xml_path, log_file, xml_attr): - self._log_file = log_file - - ## - # Returns the log filename - def get_log_file(self): - return self._log_file - - # This variable has a simple serialize function. - - ############################################################################ - #### Network Broadcast Address for livecd environment - - ## - # Sets the network broadcast address for the livecd environment - # @param xml_path not used here. - # @param broadcast the network broadcast address - # @param xml_attr= None - def set_network_broadcast(self, xml_path, broadcast, xml_attr=None): - if not GLIUtility.is_ip(broadcast): - raise GLIException("IPAddressError", 'fatal','set_network_broadcast', 'The specified broadcast is not a valid IP Address!') - self._network_broadcast = broadcast - - ## - # Returns the network broadcast address - def get_network_broadcast(self): - return self._network_broadcast - - # This variable has a simple serialize function. - - ############################################################################ - #### Network DHCP Options for livecd environment - - ## - # Sets the network dhcp options for the livecd environment - # @param xml_path not used here. - # @param broadcast the dhcp options - # @param xml_attr= None - def set_network_dhcp_options(self, xml_path, options, xml_attr=None): - if not GLIUtility.is_realstring(options): - raise GLIException("BadDHCPOptionsError", 'fatal','set_network_dhcp_options', 'The specified dhcp_optioons is not a valid string!') - self._network_dhcp_options = options - - ## - # Returns the network dhcp options - def get_network_dhcp_options(self): - return self._network_dhcp_options - - # This variable has a simple serialize function. - - ############################################################################ - #### Network Gateway Address for livecd environment - - ## - # Sets the network gateway for the livecd environment - # @param xml_path not used here. - # @param gateway the network gateway - # @param xml_attr= None - def set_network_gateway(self, xml_path, gateway, xml_attr=None): - if not GLIUtility.is_ip(gateway): - raise GLIException("IPAddressError", 'fatal', 'set_network_gateway', "The gateway IP provided is not a valid gateway!!") - self._network_gateway = gateway - - ## - # Returns the network gateway - def get_network_gateway(self): - return self._network_gateway - - # This variable has a simple serialize function. - - ############################################################################ - #### Network Interface Information for livecd environment - - ## - # Sets the network interface configuration info for the livecd environment - # @param xml_path not used here. - # @param interface the interface to talk over - # @param xml_attr= None - def set_network_interface(self, xml_path, interface, xml_attr=None): - if not GLIUtility.is_eth_device(interface): - raise GLIException("InterfaceError", 'fatal', 'set_network_interface', "Interface " + interface + " must be a valid device!") - self._network_interface = interface - - ## - # Returns the network interface - def get_network_interface(self): - return self._network_interface - - # This variable has a simple serialize function. - - ############################################################################ - #### Network IP Address for livecd environment - - ## - # Sets the network ip address for the livecd environment - # @param xml_path not used here. - # @param ip the ip address - # @param xml_attr= None - def set_network_ip(self, xml_path, ip, xml_attr=None): - if not GLIUtility.is_ip(ip): - raise GLIException("IPAddressError", 'fatal', 'set_network_ip', 'The specified IP ' + ip + ' is not a valid IP Address!') - self._network_ip = ip - - ## - # Returns the network ip address - def get_network_ip(self): - return self._network_ip - - # This variable has a simple serialize function. - - ############################################################################ - #### Network Netmask Address for livecd environment - - ## - # Sets the network netmask for the livecd environment - # @param xml_path not used here. - # @param netmask the network netmask - # @param xml_attr= None - def set_network_netmask(self, xml_path, netmask, xml_attr=None): - if not GLIUtility.is_ip(netmask): - raise GLIException("IPAddressError", 'fatal','set_network_netmask', 'The specified netmask is not a valid IP Address!') - else: - # Need to guess the netmask... just in case (probably need the gateway..) - pass - - self._network_netmask = netmask - - ## - # Returns the network netmask - def get_network_netmask(self): - return self._network_netmask - - # This variable has a simple serialize function. - - - ############################################################################ - #### Network Type Information for livecd environment (static or dhcp) - - ## - # Sets the network configuration info for the livecd environment - # @param xml_path not used here. - # @param network_type the network type, either static or dhcp - # @param xml_attr=None - def set_network_type(self, xml_path, network_type, xml_attr): - if not network_type in ('static', 'dhcp', 'null', 'none', 'None'): - raise GLIException("NoSuchTypeError", 'fatal','set_network_type',"You can only have a static or dhcp network!") - - self._network_type = network_type - - ## - # Returns the network type - def get_network_type(self): - return self._network_type - - # This variable has a simple serialize function. - - ############################################################################ - #### Install Profile URI - - ## - # Sets the profile_uri for use in non-interactive installs - # @param xml_path not used here. - # @param profile_uri location of the profile - # @param xml_attr not used here. - def set_profile_uri(self, xml_path, profile_uri, xml_attr): - if profile_uri != None and not GLIUtility.is_uri(profile_uri): - raise GLIException("URIError", 'fatal', 'set_profile_uri',"The URI specified is not valid!") - self._profile_uri = profile_uri - - ## - # Returns the profile_uri - def get_profile_uri(self): - return self._profile_uri - - # This variable has a simple serialize function. - - ############################################################################ - #### Root Mount Point For New System - - ## - # Sets the root_mount_point for the new system to be installed to - # @param xml_path not used here. - # @param root_mount_point new location for the root mount point - # @param xml_attr not used here. - def set_root_mount_point(self, xml_path, root_mount_point, xml_attr): - self._root_mount_point = root_mount_point - - ## - # Returns the root_mount_point - def get_root_mount_point(self): - return self._root_mount_point - - # This variable has a simple serialize function. - - ############################################################################ - #### Root Password Selection for livecd environment - - ## - # Sets the root password on the livecd. This is supposed to be given a hash. - # @param xml_path not used here. - # @param passwd a hashed password to be set on the livecd environment. - # @param xml_attr not used here. - def set_root_passwd(self, xml_path, passwd, xml_attr): - self._root_passwd = passwd - - ## - # Returns the hash of the root password for the livecd environment - def get_root_passwd(self): - return self._root_passwd - - # This variable has a simple serialize function. - - ############################################################################ - #### RSYNC Proxy Address Information for livecd environment - - ## - # Sets the RSYNC proxy URI - # @param xml_path not used here. - # @param proxy a URI - # @param xml_attr not used here. - def set_rsync_proxy(self, xml_path, proxy, xml_attr): - self._rsync_proxy = proxy - - ## - # Returns the RSYNC proxy - def get_rsync_proxy(self): - return self._rsync_proxy - - ## - # Sets the Verbose mode (DEBUG mode) - # @param xml_path not used here. - # @param verbose flag. boolean. - # @param xml_attr not used here. - def set_verbose(self, xml_path, verbose, xml_attr): - if type(verbose) == str: - verbose = GLIUtility.strtobool(verbose) - self._verbose = verbose - - ## - # Returns the verbose (DEBUG) flag - def get_verbose(self): - return self._verbose diff --git a/src/GLIClientController.py b/src/GLIClientController.py index 1505020..2644810 100644 --- a/src/GLIClientController.py +++ b/src/GLIClientController.py @@ -18,15 +18,17 @@ Steps (based on the ClientConfiguration): """ -import os, GLIClientConfiguration, GLIInstallProfile, GLIUtility, GLILogger, sys, signal, Queue, GLIArchitectureTemplate, GLINotification, traceback -from GLIException import * +import os, sys, Queue, traceback, platform from threading import Thread, Event +import GLILogger +import GLINotification +from GLIException import * # Global constants for notifications NEXT_STEP_READY = 1 -INSTALL_DONE = 2 TEMPLATE_DIR = 'templates' +LOGFILE = '/var/log/installer.log' ## # This class provides an interface between the backend and frontend @@ -34,27 +36,29 @@ class GLIClientController(Thread): ## # Initialization function for the GLIClientController class - # @param configuration=None GLIClientConfiguration object # @param install_profile=None GLIInstallProfile object # @param pretend=False Pretend mode. If pretending, no steps will actually be performed - def __init__(self,configuration=None,install_profile=None,pretend=False): + def __init__(self,install_profile=None,pretend=False,verbose=True): Thread.__init__(self) - - if configuration == None and os.path.isfile('/etc/gli.conf'): - self.output("Using /etc/gli.conf...") - configuration = GLIClientConfiguration.ClientConfiguration() - configuration.parse('/etc/gli.conf') - + self.set_install_profile(install_profile) - self.set_configuration(configuration) self._install_event = Event() self._notification_queue = Queue.Queue(50) - self._install_mode = None - self._install_step = -1 + self._next_install_step = "" self._install_steps = None + self._verbose = verbose self._pretend = pretend self._thread_pid = 0 self.setDaemon(True) + self._logger = GLILogger.Logger(LOGFILE) + self._arch_template = None + + subarches = { 'i386': 'x86', 'i486': 'x86', 'i586': 'x86', 'i686': 'x86', 'x86_64': 'amd64', 'parisc': 'hppa' } + self.arch = platform.machine() + if self.arch in subarches: + self.arch = subarches[self.arch] + + self.start() ## # Sets the GLIInstallProfile object @@ -68,142 +72,60 @@ class GLIClientController(Thread): return self._install_profile ## - # Sets the GLIClientConfiguration object - # @param configuration GLIClientConfiguration object - def set_configuration(self, configuration): - self._configuration = configuration - if self._configuration != None: - self._logger = GLILogger.Logger(self._configuration.get_log_file()) - - ## - # Returns the GLIClientConfiguration object - def get_configuration(self): - return self._configuration + # Returns the architecture we're running on + def get_arch(self): + return self.arch ## # This function runs as a second thread to do the actual installation (only used internally) def run(self): self._thread_pid = os.getpid() - if self._configuration.get_verbose(): self._logger.log("DEBUG: secondary thread PID is " + str(self._thread_pid)) - - interactive = self._configuration.get_interactive() - - if self._configuration == None and not interactive and not self._pretend: - print "You can not do a non-interactive install without a ClientConfiguration!" - sys.exit(1) - - # Write client configuration profile to disk for debugging purposes - configuration = open("/tmp/clientconfiguration.xml", "w") - configuration.write(self._configuration.serialize()) - configuration.close() + if self._install_profile.get_verbose(): self._logger.log("DEBUG: secondary thread PID is " + str(self._thread_pid)) # Log installer version version_file = os.path.abspath(os.path.dirname(__file__)) + "/version-stamp" - installer_version = open(version_file, "r").readline().strip() + try: + installer_version = open(version_file, "r").readline().strip() + except: + installer_version = "(unknown)" self._logger.log("Gentoo Linux Installer version " + installer_version) - steps = [self.load_kernel_modules, self.set_proxys, self.set_root_passwd, self.configure_networking, self.enable_ssh, self.start_portmap] - # Do Pre-install client-specific things here. - while len(steps) > 0: - try: - step = steps.pop(0) - if not self._pretend: - step() - except GLIException, error: - etype, value, tb = sys.exc_info() - s = traceback.format_exception(etype, value, tb) - self._logger.log("Exception received during pre-install function '" + repr(step) + "': " + str(error)) - for line in s: - line = line.strip() - self._logger.log(line) - self.addNotification("exception", error) - self._install_event.clear() - break - except Exception, error: - # Something very bad happened - etype, value, tb = sys.exc_info() - s = traceback.format_exception(etype, value, tb) - self._logger.log("This is a bad thing. An exception occured outside of the normal install errors. The error was: '" + str(error) + "'") - for line in s: - line = line.strip() - self._logger.log(line) - self.addNotification("exception", error) - self._install_event.clear() - break -# except GLIException, error: -# self.output("Non-fatal error... continuing...") -# if error.get_error_level() != 'fatal': -# self._logger.log("Error: "+ error.get_function_name() + ": " + error.get_error_msg()) -# else: -# self._logger.log("Pre-install step error: "+ error.get_function_name() + ": " + error.get_error_msg()) -# raise error - else: - self._logger.log("Completed pre_install steps") - - # Wait for the self._install_event to be set before starting the installation. - # start_install() is called to pass here - self._install_event.wait() - self._install_event.clear() - - if self._install_profile == None and not interactive: - print "You can not do a non-interactive install without an InstallProfile!" - sys.exit(1) - - #self.output("Starting install now...") - - templates = { 'x86': 'x86ArchitectureTemplate', - 'sparc': 'sparcArchitectureTemplate', - 'amd64': 'amd64ArchitectureTemplate', - 'mips': 'mipsArchitectureTemplate', - 'hppa': 'hppaArchitectureTemplate', - 'alpha': 'alphaArchitectureTemplate', - 'ppc': 'ppcArchitectureTemplate', - 'ppc64': 'ppc64ArchitectureTemplate' - } - - if self._configuration.get_architecture_template() not in templates.keys(): - self.addNotification("exception", GLIException("UnsupportedArchitectureError", "fatal", "run", self._configuration.get_architecture_template() + ' is not supported by the Gentoo Linux Installer!')) + templates = { + 'x86': 'x86ArchitectureTemplate', + 'sparc': 'sparcArchitectureTemplate', + 'amd64': 'amd64ArchitectureTemplate', + 'mips': 'mipsArchitectureTemplate', + 'hppa': 'hppaArchitectureTemplate', + 'alpha': 'alphaArchitectureTemplate', + 'ppc': 'ppcArchitectureTemplate', + 'ppc64': 'ppc64ArchitectureTemplate' + } + if self._install_profile.get_verbose(): self._logger.log("DEBUG: arch is %s" % self.arch) + if self.arch not in templates: + self.addNotification("exception", GLIException("UnsupportedArchitectureError", "fatal", "run", self.arch + ' is not supported by the Gentoo Linux Installer!')) try: - template = __import__(TEMPLATE_DIR + '/' + templates[self._configuration.get_architecture_template()]) - self._arch_template = getattr(template, templates[self._configuration.get_architecture_template()])(self._configuration, self._install_profile, self) + template = __import__(TEMPLATE_DIR + '/' + templates[self.arch]) + self._arch_template = getattr(template, templates[self.arch])(self._install_profile, self) except ImportError: self.addNotification("exception", GLIException("UnsupportedArchitectureError", 'fatal', 'run', 'The Gentoo Linux Installer could not import the install template for this architecture!')) except AttributeError: self.addNotification("exception", GLIException("UnsupportedArchitectureError", 'fatal', 'run', 'This architecture template was not defined properly!')) - self._install_mode = self._configuration.get_install_mode() - tmp_install_steps = self._arch_template.get_install_steps() - self._install_steps = [step for step in tmp_install_steps if self._install_mode in step['modes']] - - if self._configuration.get_verbose(): self._logger.log("DEBUG: install_steps: " + str(self._install_steps)) - - self.addNotification("int", NEXT_STEP_READY) -# self._install_event.wait() - - # Write install profile to disk for debugging purposes - configuration = open("/tmp/installprofile.xml", "w") - configuration.write(self._install_profile.serialize()) - configuration.close() + self._install_steps = self._arch_template.get_install_steps() while 1: - if self._install_step >= len(self._install_steps): break - if self._configuration.get_verbose(): self._logger.log("DEBUG: waiting at top of 'while' loop in CC in secondary thread...waiting to start step " + str(self._install_step+1) + ", " + self._install_steps[(self._install_step+1)]['name']) self._install_event.wait() - if self._configuration.get_verbose(): self._logger.log("DEBUG: Event() cleared at top of 'while' loop in CC in secondary thread...starting step " + str(self._install_step) + ", " + self._install_steps[(self._install_step)]['name']) -# if self._install_step <= (len(self._install_steps) - 1): try: if not self._pretend: - self._install_steps[self._install_step]['function']() + func = getattr(self._arch_template, self._next_install_step) + func() self._install_event.clear() - if self.has_more_steps(): - self.addNotification("int", NEXT_STEP_READY) - else: - self.addNotification("int", INSTALL_DONE) + self.addNotification("int", NEXT_STEP_READY) except GLIException, error: etype, value, tb = sys.exc_info() s = traceback.format_exception(etype, value, tb) - self._logger.log("Exception received during '" + self._install_steps[self._install_step]['name'] + "': " + str(error)) + self._logger.log("Exception received during '%s': %s" % (self._install_steps[self._next_install_step], str(error))) for line in s: line = line.strip() self._logger.log(line) @@ -213,224 +135,30 @@ class GLIClientController(Thread): # Something very bad happened etype, value, tb = sys.exc_info() s = traceback.format_exception(etype, value, tb) - self._logger.log("This is a bad thing. An exception occured outside of the normal install errors. The error was: '" + str(error) + "'") + self._logger.log("This is a bad thing. An exception occured outside of the normal install errors. The error was: '%s'" % str(error)) for line in s: line = line.strip() self._logger.log(line) self.addNotification("exception", error) self._install_event.clear() -# else: -# break # This keeps the thread running until the FE exits self._install_event.clear() self._install_event.wait() ## - # Returns the number of steps in the install process - def get_num_steps(self): - return len(self._install_steps) - - ## # Returns information about the next install step - def get_next_step_info(self): - return self._install_steps[(self._install_step + 1)]['name'] + def get_step_info(self, step): + return self._install_steps[step] ## # Performs the next install step - def next_step(self): - self._install_step = self._install_step + 1 - if self._configuration.get_verbose(): self._logger.log("DEBUG: next_step(): setting Event() flag...starting step " + str(self._install_step) + ", " + self._install_steps[(self._install_step)]['name']) - self._install_event.set() - - ## - # Retries the current install step - def retry_step(self): - self._install_event.set() - - ## - # Returns True if there are more install steps remaining - def has_more_steps(self): - return (self._install_step < (len(self._install_steps) - 1)) - - ## - # Sets proxy information from the environment - def set_proxys(self): - if self._configuration.get_verbose(): self._logger.log("DEBUG: beginning of set_proxys()") - if self._configuration.get_ftp_proxy() != "": - os.environ['ftp_proxy'] = "ftp://"+self._configuration.get_ftp_proxy() - - if self._configuration.get_http_proxy() != "": - os.environ['http_proxy'] = "http://"+self._configuration.get_http_proxy() - - if self._configuration.get_rsync_proxy() != "": - os.environ['RSYNC_PROXY'] = "rsync://"+self._configuration.get_rsync_proxy() - if self._configuration.get_verbose(): self._logger.log("DEBUG: end of set_proxys()") - - ## - # Loads kernel modules specified in the GLIClientConfiguration object - def load_kernel_modules(self): - if self._configuration.get_verbose(): self._logger.log("DEBUG: beginning of load_kernel_modules()") - modules = self._configuration.get_kernel_modules() - if self._configuration.get_verbose(): self._logger.log("DEBUG: load_kernel_modules(): modules are " + str(modules)) - for module in modules: - try: - if self._configuration.get_verbose(): self._logger.log("DEBUG: load_kernel_modules(): trying to load module " + module) - ret = GLIUtility.spawn('modprobe ' + module) - if not GLIUtility.exitsuccess(ret): - self._logger.log("ERROR! : Could not load module: "+module) - # raise GLIException("KernelModuleError", 'warning', 'load_kernel_modules', 'Could not load module: ' + module) - else: - self._logger.log('kernel module: ' + module + ' loaded.') - except KernelModuleError, error: - self.output(error) - self._logger.log(error.get_error_level() + '! ' + error.get_error_msg()) - - ## - # Sets the root password specified in the GLIClientConfiguration object - def set_root_passwd(self): - self._logger.log("Setting root password.") - if self._configuration.get_root_passwd() != "": - # The password specified in the configuration is encrypted. - status = GLIUtility.spawn("echo 'root:" + self._configuration.get_root_passwd() + "' | chpasswd -e") - - if not GLIUtility.exitsuccess(status): - self._logger.log("ERROR! : Could not set the root password on the livecd environment!") - # raise GLIException("PasswordError", 'warning', 'set_root_passwd', "Could not set the root password!") - else: - self._logger.log("Livecd root password set.") - - ## - # Starts portmap if specified in the GLIClientConfiguration object - def start_portmap(self): - if self._configuration.get_verbose(): self._logger.log("DEBUG: beginning of start_portmap()") - status = GLIUtility.spawn('/etc/init.d/portmap start') #, display_on_tty8=True) - if not GLIUtility.exitsuccess(status): - self._logger.log("ERROR! : Could not start the portmap service!") - # raise GLIException("PortmapError", 'warning', 'start_portmap', "Could not start the portmap service!") - else: - self._logger.log("Portmap started.") - - ## - # Configures networking as specified in the GLIClientConfiguration object - def configure_networking(self): - if self._configuration.get_verbose(): self._logger.log("DEBUG: beginning of configure_networking()") - # Do networking setup right here. - if self._configuration.get_network_type() != None: - type = self._configuration.get_network_type() - if type == "null" or type == "none": - # don't do anything, it's not our problem if the user specifies this. - return - elif type == "dhcp": - if self._configuration.get_verbose(): self._logger.log("DEBUG: configure_networking(): DHCP selected") - # Run dhcpcd. - try: - interface = self._configuration.get_network_interface() - dhcp_options = self._configuration.get_network_dhcp_options() - except: - self._logger.log("No interface found.. defaulting to eth0.") - interface = "eth0" - dhcp_options = "" - - if interface and not dhcp_options: - if self._configuration.get_verbose(): self._logger.log("DEBUG: configure_networking(): running '/sbin/dhcpcd -n " + interface + "'") - status = GLIUtility.spawn("/sbin/dhcpcd -t 15 -n " + interface) - elif interface and dhcp_options: - if self._configuration.get_verbose(): self._logger.log("DEBUG: configure_networking(): running '/sbin/dhcpcd " + dhcp_options + " " + interface + "'") - status = GLIUtility.spawn("/sbin/dhcpcd -t 15 " + dhcp_options + " " + interface) - else: - if self._configuration.get_verbose(): self._logger.log("DEBUG: configure_networking(): running '/sbin/dhcpcd -n'") - status = GLIUtility.spawn("/sbin/dhcpcd -t 15 -n") - if self._configuration.get_verbose(): self._logger.log("DEBUG: configure_networking(): call to /sbin/dhcpcd complete") - - if not GLIUtility.exitsuccess(status): - raise GLIException("DHCPError", 'fatal', 'configure_networking', "Failed to get a dhcp address for " + interface + ".") - - elif type == "manual" and self._configuration.get_interactive(): - # Drop to bash shell and let them configure it themselves - print "Please configure & test your network device." - GLIUtility.spawn_bash() - elif type == "manual" and not self._interactive.get_interactive(): - print "You cannot manually configure the network in non-interactive mode!" - print "Please fix either the network settings or the interactive mode!" - sys.exit(1) - elif type == "static": - if self._configuration.get_verbose(): self._logger.log("DEBUG: configure_networking(): setting static IP") - # Configure the network from the settings they gave. - net_interface = self._configuration.get_network_interface() - net_ip = self._configuration.get_network_ip() - net_broadcast = self._configuration.get_network_broadcast() - net_netmask = self._configuration.get_network_netmask() - if not GLIUtility.set_ip(net_interface, net_ip, net_broadcast, net_netmask): - raise GLIException("SetIPError", 'fatal', 'configure_networking', "Could not set the IP address!") - - route = self._configuration.get_network_gateway() - if not GLIUtility.set_default_route(route): - raise GLIException("DefaultRouteError", 'fatal','configure_networking', "Could not set the default route!") - - dns_servers = self._configuration.get_dns_servers() - if dns_servers: - try: - resolv_conf = open("/etc/resolv.conf", "w") - for dns_server in dns_servers: - resolv_conf.write("nameserver " + dns_server + "\n") - resolv_conf.close() - except: - raise GLIException("DNSServerError", 'fatal','configure_networking', "Could not set the DNS servers!") - - if self._configuration.get_verbose(): self._logger.log("DEBUG: configure_networking(): done setting static IP") - - ## - # Enables SSH if specified in the GLIClientConfiguration object - def enable_ssh(self): - if self._configuration.get_verbose(): self._logger.log("DEBUG: beginning of enable_ssh()") - if self._configuration.get_enable_ssh(): - status = GLIUtility.spawn("/etc/init.d/sshd start") - if not GLIUtility.exitsuccess(status): - self._logger.log("ERROR! : Could not start the SSH daemon!") - # raise GLIException("SSHError", 'warning','enable_ssh',"Could not start SSH daemon!") - else: - self._logger.log("SSH Started.") - - ## - # Loads the install profile - def load_install_profile(self): - install_profile=None - if self._install_profile == None: - if self._configuration != None: - success = GLIUtility.get_uri(self._configuration.get_profile_uri(),'/tmp/install_profile.xml') - if success: - self._logger.log("Profile downloaded succesfully, loading it now.") - self.output("Profile downloaded... loading it now...") - install_profile = GLIInstallProfile.InstallProfile() - install_profile.parse('/tmp/install_profile.xml') - else: - raise GLIException("InstallProfileError", 'fatal', 'get_install_profile', 'Could not download/copy the install profile from: ' + self._configuration.get_profile_uri()) - - self._install_profile = install_profile - - ## - # Starts the install - def start_install(self): + def run_step(self, step): + self._next_install_step = step + if self._install_profile.get_verbose(): self._logger.log("DEBUG: next_step(): setting Event() flag...starting step %s, %s" % (self._next_install_step, self._install_steps[self._next_install_step])) self._install_event.set() ## - # Starts the secondary thread running. The thread will wait to continue until start_install() is called - def start_pre_install(self): - self.start() - - ## - # Cleans up after a failed install - def start_failure_cleanup(self): - self._arch_template.install_failed_cleanup() - - ## - # Displays specified output - # @param str String to display - def output(self, str): - print str - - ## # Returns a notification object from the queue def getNotification(self): notification = None diff --git a/src/GLIGenDialog.py b/src/GLIGenDialog.py deleted file mode 100644 index abf6eb0..0000000 --- a/src/GLIGenDialog.py +++ /dev/null @@ -1,1875 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. -import dialog, platform, string, os, glob, copy, re -import GLIInstallProfile -import GLIClientConfiguration -import GLIStorageDevice -import GLIUtility -from GLIException import GLIException -import gettext -try: - gettext.install('gli-dialog', './languages') - translator = gettext.translation('gli-dialog', './languages') - _ = translator.gettext -except: - _ = gettext.gettext -#This is a parent class to centralize the code between UserGenCC and UserGenIP - -class GLIGen(object): - def __init__(self): - self._d = dialog.Dialog() - self._DLG_OK = 0 - self._DLG_YES = 0 - self._DLG_CANCEL = 1 - self._DLG_NO = 1 - self._DLG_ESC = 2 - self._DLG_ERROR = 3 - self._DLG_EXTRA = 4 - self._DLG_HELP = 5 - - def _dmenu_list_to_choices(self, list): - choices = [] - for i in range(0, len(list)): - choices.append((str(i + 1), list[i])) - - return choices - - def client_profile(self): - return self._client_profile - - def install_profile(self): - return self._install_profile - -#This class will generate a client config and return it as a xml string -class GLIGenCF(GLIGen): - def __init__(self, client_profile, local_install=True, advanced_mode=True, networkless=False): - GLIGen.__init__(self) - self._client_profile = client_profile - self.local_install = local_install - self.advanced_mode = advanced_mode - self._networkless = networkless - - def serialize(self): - return self._client_profile.serialize() - #----------------------------------------------- - #Functions for generating a client configuration - #----------------------------------------------- - def set_arch_template(self): - subarches = { 'i386': 'x86', 'i486': 'x86', 'i586': 'x86', 'i686': 'x86', 'x86_64': 'amd64', 'parisc': 'hppa' } - arch = platform.machine() - if arch in subarches: - arch = subarches[arch] - if self.local_install: - try: - self._client_profile.set_architecture_template(None, arch, None) - except: - self._d.msgbox(_(u"Error! Undefined architecture template specified or found on the current machine")) - else: - template_choices = ["x86", "amd64", "sparc", "alpha", "hppa", "ppc"] - arch_template_string = _(u"Please select the architecture of the computer that gentoo will be installed on. For pentium and AMD 32-bit processors, choose x86. If you don't know your architecture, you should consider another Linux distribution.") - code, menuitem = self._d.menu(arch_template_string, choices=self._dmenu_list_to_choices(template_choices), default_item=str(template_choices.index(arch)+1), height=20) - if code == self._DLG_OK: - menuitem = template_choices[int(menuitem)-1] - try: - self._client_profile.set_architecture_template(None, menuitem, None) - except: - self._d.msgbox(_(u"Error! Undefined architecture template specified or found on the current machine")) - def set_verbose(self): - #Don't show unless advanced. - if self.advanced_mode: - #Change the Yes/No buttons back. - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - if self._d.yesno(_(u"Do you want debugging output enabled during the install? This is mainly meant to help the developers debug any bugs."), width=60) == self._DLG_YES: - self._client_profile.set_verbose(None, True, None) - else: - self._client_profile.set_verbose(None, False, None) - - def set_logfile(self): - #If not advanced, the default will suffice. - if self.advanced_mode: - logfile_string = _(u"""The installer logs all important events during the install process to a logfile for debugging purposes. -The file gets copied to the new system once the install is complete. -Enter the desired filename and path for the install log (the default is recommended):""") - initval = self._client_profile.get_log_file() - code, logfile = self._d.inputbox(logfile_string, init=initval, width=60, height=15) - if code == self._DLG_OK: - self._client_profile.set_log_file(None, logfile, None) - - def set_root_mount_point(self): - #If not advanced, the default will suffice. - if self.advanced_mode: - root_mount_point_string = _(u"Enter the mount point to be used to mount the partition(s) where the new system will be installed. The default is /mnt/gentoo and is greatly recommended, but any mount point will do.") - initval = self._client_profile.get_root_mount_point() - code, rootmountpoint = self._d.inputbox(root_mount_point_string, init=initval, width=60, height=11) - if code == self._DLG_OK: - self._client_profile.set_root_mount_point(None, rootmountpoint, None) - - def set_client_networking(self): - if self._networkless: return - if GLIUtility.ping("www.gentoo.org") and self.local_install: #If an active connection exists, ignore this step if doing a local install. - return - if self.local_install: - device_list = GLIUtility.get_eth_devices() - else: - device_list = [] - choice_list = [] - for device in device_list: - choice_list.append((device, GLIUtility.get_interface_realname(device))) - choice_list.append((_(u"Other"),_(u"Type your own."))) - cnet_string1 = _(u"In order to complete most installs, an active Internet connection is required. Listed are the network devices already detected. In this step you will need to setup one network connection for GLI to use to connect to the Internet. If your desired device does not show up in the list, you can select Other and input the device name manually.") - code, interface = self._d.menu(cnet_string1, width=75, height=20, choices=choice_list) - if code != self._DLG_OK: - return - if interface == _(u"Other"): - code, interface = self._d.inputbox(_(u"Enter the interface (NIC) you would like to use for installation (e.g. eth0):")) - if code != self._DLG_OK: - return - - dhcp_options = "" - - #Change the Yes/No buttons to new labels for this question. - self._d.add_persistent_args(["--yes-label", _(u"DHCP")]) - self._d.add_persistent_args(["--no-label", _(u"Static IP/Manual")]) - cnet_string2 = _(u"To setup your network interface, you can either use DHCP if enabled, or manually enter your network information.\n DHCP (Dynamic Host Configuration Protocol) makes it possible to automatically receive networking information (IP address, netmask, broadcast address, gateway, nameservers etc.). This only works if you have a DHCP server in your network (or if your provider provides a DHCP service). If you do not, you must enter the information manually. Please select your networking configuration method:") - if self._d.yesno(cnet_string2, height=15, width=60) == self._DLG_YES: #DHCP - network_type = 'dhcp' - code, dhcp_options = self._d.inputbox(_(u"If you have any additional DHCP options to pass, type them here in a space-separated list. If you have none, just press Enter."), height=13, width=50) - else: - network_type = 'static' - code, data = self._d.form(_(u'Enter your networking information: (See Chapter 3 of the Handbook for more information) Your broadcast address is probably your IP address with 255 as the last tuple. Do not press Enter until all fields you intend to fill out are complete!'), - ((_(u'Enter your IP address:'), 15), - (_(u'Enter your Broadcast address:'), 15), - (_(u'Enter your Netmask:'),15,'255.255.255.0'), - (_(u'Enter your default gateway:'),15), - (_(u'Enter a DNS server:'),15,'128.118.25.3'), - (_(u'Enter a HTTP Proxy IP: http://'), 55,self._client_profile.get_http_proxy()), - (_(u'Enter a FTP Proxy IP: ftp://'), 55, self._client_profile.get_ftp_proxy()), - (_(u'Enter a RSYNC Proxy: rsync://'),55,self._client_profile.get_rsync_proxy()) - )) - (ip_address, broadcast, netmask, gateway, dnsservers, http_proxy, ftp_proxy, rsync_proxy) = data[:-1].split('\n') - if code != self._DLG_OK: - return - #Set the info now that it's all gathered. - try: - self._client_profile.set_network_type(None, network_type, None) - self._client_profile.set_network_interface(None, interface, None) - if not network_type == 'dhcp': - self._client_profile.set_network_ip(None, ip_address, None) - self._client_profile.set_network_broadcast(None, broadcast, None) - self._client_profile.set_network_netmask(None, netmask, None) - self._client_profile.set_network_gateway(None, gateway, None) - self._client_profile.set_dns_servers(None, dnsservers, None) - else: - if dhcp_options: - self._client_profile.set_network_dhcp_options(None, dhcp_options, None) - if http_proxy: - self._client_profile.set_http_proxy(None, http_proxy, None) - if ftp_proxy: - self._client_profile.set_ftp_proxy(None, ftp_proxy, None) - if rsync_proxy: - self._client_profile.set_rsync_proxy(None, rsync_proxy, None) - - except: - self._d.msgbox(_(u"ERROR! Could not set networking information!")) - - def set_enable_ssh(self): - #Change the Yes/No buttons back. - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - if self.advanced_mode and not self._networkless: - if self._d.yesno(_(u"Do you want SSH enabled during the install? This will allow you to login remotely during the installation process. If choosing Yes, be sure you select a new LiveCD root password!"), width=60) == self._DLG_YES: - self._client_profile.set_enable_ssh(None, True, None) - else: - self._client_profile.set_enable_ssh(None, False, None) - - def set_livecd_password(self): - # The root password will be set here only if in advanced mode. Otherwise it is auto-scrambled. - if self.advanced_mode: - match = False; - while not match: - livecd_password_string = _(u"""If you want to be able to login to your machine from another console during the installation, -you will want to enter a new root password for the LIVECD. -Note that this can be different from your new system's root password. -Presss Enter twice to skip this step. -Enter the new LIVECD root password (will not be echoed): """) - code, passwd1 = self._d.passwordbox(livecd_password_string, width=60, height=16) - if code != self._DLG_OK: - return - code, passwd2 = self._d.passwordbox(_(u"Enter the new LIVECD root password again to verify:")) - if code != self._DLG_OK: - return - if passwd1 != passwd2: - self._d.msgbox(_(u"The passwords do not match. Please try again.")) - return - else: - match = True; - if passwd1 != "": #don't want to hash an empty password. - try: - self._client_profile.set_root_passwd(None, GLIUtility.hash_password(passwd1), None) - except: - d.msgbox(_(u"ERROR! Could not set the root password on the LiveCD!")) - self._d.msgbox(_(u"Password saved. Press Enter to continue.")) - - def set_client_kernel_modules(self): - if self.advanced_mode: - status, output = GLIUtility.spawn("lsmod", return_output=True) - cmodules_string1 = _(u"Here is a list of modules currently loaded on your machine.\n Please look through and see if any modules are missing\n that you would like loaded.\n\n") - self._d.add_persistent_args(["--exit-label", _(u"Continue")]) - self._d.scrollbox(cmodules_string1+output, height=20, width=70, title=_(u"Loaded Modules")) - cmodules_string2 = _(u"If you have additional modules you would like loaded before the installation begins (ex. a network driver), enter them in a space-separated list.") - code, kernel_modules_list = self._d.inputbox(cmodules_string2, init="", width=60, height=12) - if code == self._DLG_OK: - try: - self._client_profile.set_kernel_modules(None, kernel_modules_list, None) - except: - d.msgbox(_(u"ERROR! Could not set the list of kernel modules!")) - - def save_client_profile(self, xmlfilename="", askforfilename=True): - code = 0 - filename = xmlfilename - if askforfilename: - code, filename = self._d.inputbox(_(u"Enter a filename for the XML file. Use the full path!"), init=xmlfilename) - if code != self._DLG_OK or not filename: - return - if GLIUtility.is_file(filename): - #Change the Yes/No buttons back. - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - if not self._d.yesno(_(u"The file %s already exists. Do you want to overwrite it?") % filename) == self._DLG_YES: - return - try: - configuration = open(filename ,"w") - configuration.write(self._client_profile.serialize()) - configuration.close() - except: - self._d.msgbox(_(u"Error. File couldn't be saved. It will be saved automatically to /tmp before the install.")) - -class GLIGenIP(GLIGen): - def __init__(self, client_profile, install_profile, local_install=True, advanced_mode=True, networkless=False): - GLIGen.__init__(self) - self._client_profile = client_profile - self._install_profile = install_profile - self._networkless = networkless - self.local_install = local_install - self.advanced_mode = advanced_mode - if self._networkless: - try: - self._install_profile.set_grp_install(None, True, None) - self._install_profile.set_install_stage(None, "3", None) - self._install_profile.set_dynamic_stage3(None, True, None) - self._install_profile.set_portage_tree_sync_type(None,"snapshot", None) - cd_snapshot_uri = GLIUtility.get_cd_snapshot_uri() - self._install_profile.set_portage_tree_snapshot_uri(None, cd_snapshot_uri, None) - self._install_profile.set_kernel_source_pkg(None, "livecd-kernel", None) - self._install_profile.set_cron_daemon_pkg(None, "vixie-cron", None) - self._install_profile.set_logging_daemon_pkg(None,"syslog-ng", None) - except: - self._d.msgbox(_(u"ERROR: Could not set networkless information in the profile")) - - def serialize(self): - return self._install_profile.serialize() - #--------------------------------------- - #Functions to generate a install profile - #--------------------------------------- - - def set_partitions(self): - partitions_string1 = _(u"""The first thing on the new system to setup is the partitoning. -You will first select a drive and then edit its partitions. -No changes will be saved until the end of the step. -No changes to your disk will be made until the installation. -NOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION "/" -If your drive is pre-partitioned, just select the mountpoints and make -sure that the format option is set to FALSE or it will erase your data. -The installer does not yet support resizing of partitions (its not safe). -Please refer to the Gentoo Installation Handbook for more information -on partitioning and the various filesystem types available in Linux.""") - self._d.msgbox(partitions_string1, height=17, width=78) - devices = self._install_profile.get_partition_tables() - drives = devices.keys() - drives.sort() - choice_list = [] - if not devices: - tmp_drives = GLIStorageDevice.detect_devices() - tmp_drives.sort() - for drive in tmp_drives: - devices[drive] = GLIStorageDevice.Device(drive) - #if self.local_install: #when uncommenting please indent the next line. - devices[drive].set_partitions_from_disk() - drives.append(drive) - choice_list.append((drive, devices[drive].get_model())) - else: - for drive in drives: - choice_list.append((drive, devices[drive].get_model())) - #choice_list.append(("Other", "Type your own drive name)) # I DONT THINK GLISD CAN DO NONEXISTANT DRIVES - while 1: - code, drive_to_partition = self._d.menu(_(u"Which drive would you like to partition?\n Info provided: Type, mkfs Options, Mountpoint, Mountopts, Size in MB"), choices=choice_list, cancel=_(u"Save and Continue")) - if code != self._DLG_OK: break - while 1: -# partitions = devices[drive_to_partition].get_partitions() - partlist = devices[drive_to_partition].get_ordered_partition_list() - tmpparts = devices[drive_to_partition] #.get_partitions() - partsmenu = [] - for part in partlist: - tmppart = tmpparts[part] - entry = "" - if tmppart.get_type() == "free": - #partschoice = "New" - entry = _(u" - Unallocated space (") - if tmppart.is_logical(): - entry += _(u"logical, ") - entry += str(tmppart.get_mb()) + "MB)" - elif tmppart.get_type() == "extended": - entry = str(int(tmppart.get_minor())) - entry += _(u" - Extended Partition (") + str(tmppart.get_mb()) + "MB)" - else: - entry = str(int(tmppart.get_minor())) + " - " - # Type: " + tmppart.get_type() + ", Mountpoint: " + tmppart.get_mountpoint() + ", Mountopts: " + tmppart.get_mountopts() + "(" - if tmppart.is_logical(): - entry += _(u"Logical (") - else: - entry += _(u"Primary (") - entry += tmppart.get_type() + ", " - entry += (tmppart.get_mkfsopts() or "none") + ", " - entry += (tmppart.get_mountpoint() or "none") + ", " - entry += (tmppart.get_mountopts() or "none") + ", " - entry += str(tmppart.get_mb()) + "MB)" - partsmenu.append(entry) - #Add recommended partitioning option and clear option - partsmenu.append(_(u"Set Recommended Layout (needs 4GB+)")) - partsmenu.append(_(u"Clear Partitions On This Drive.")) - code, part_to_edit = self._d.menu(_(u"Select a partition or unallocated space to edit\nKey: Minor, Pri/Ext, Filesystem, MkfsOpts, Mountpoint, MountOpts, Size."), width=70, choices=self._dmenu_list_to_choices(partsmenu), cancel=_(u"Back")) - if code != self._DLG_OK: break - partmenuchoice = partsmenu[int(part_to_edit)-1] - #Check for recommended and clear here before setting the tmppart - if partmenuchoice == _(u"Set Recommended Layout (needs 4GB+)"): - try: - devices[drive_to_partition].do_recommended() - except GLIException, error: - self._d.msgbox(_(u"The recommended layout could NOT be set. The following message was received:")+error.get_error_msg(), width=70, height=15) - continue - if partmenuchoice == _(u"Clear Partitions On This Drive."): - try: - devices[drive_to_partition].clear_partitions() - self._d.msgbox(_(u"Partition table cleared successfully")) - except: - self._d.msgbox(_(u"ERROR: could not clear the partition table!")) - continue - #all other cases (partitions) - part_to_edit = partlist[int(part_to_edit)-1] - tmppart = tmpparts[part_to_edit] - if tmppart.get_type() == "free": - # partition size first - free_mb = tmppart.get_mb() - code, new_mb = self._d.inputbox(_(u"Enter the size of the new partition in MB (max %s MB). If creating an extended partition input its entire size (not just the first logical size):") % str(free_mb), init=str(free_mb)) - if code != self._DLG_OK: continue - if int(new_mb) > free_mb: - self._d.msgbox(_(u"The size you entered (%s MB) is larger than the maximum of %s MB") % (new_mb, str(free_mb))) - continue - # partition type - part_types = [("ext2", _(u"Old, stable, but no journaling")), - ("ext3", _(u"ext2 with journaling and b-tree indexing (RECOMMENDED)")), - ("linux-swap", _(u"Swap partition for memory overhead")), - ("fat32", _(u"Windows filesystem format used in Win9X and XP")), - ("ntfs", _(u"Windows filesystem format used in Win2K and NT")), - ("jfs", _(u"IBM's journaling filesystem. stability unknown.")), - ("xfs", _(u"Don't use this unless you know you need it.")), - ("reiserfs", _(u"B*-tree based filesystem. great performance. Only V3 supported.")), - ("extended", _(u"Create an extended partition containing other logical partitions")), - (_(u"Other"), _(u"Something else we probably don't support."))] - code, type = self._d.menu(_(u"Choose the filesystem type for this new partition."), height=20, width=77, choices=part_types) - if code != self._DLG_OK: continue - - # 'other' partition type - if type == _(u"Other"): - code, type = self._d.inputbox(_(u"Please enter the new partition's type:")) - if code != self._DLG_OK: continue - - # now add it to the data structure - devices[drive_to_partition].add_partition(part_to_edit, int(new_mb), 0, 0, type) - else: - while 1: - tmppart = tmpparts[part_to_edit] - tmptitle = drive_to_partition + str(part_to_edit) + " - " - if tmppart.is_logical(): - tmptitle += _(u"Logical (") - else: - tmptitle += _(u"Primary (") - tmptitle += tmppart.get_type() + ", " - tmptitle += (tmppart.get_mkfsopts() or "none") + ", " - tmptitle += (tmppart.get_mountpoint() or "none") + ", " - tmptitle += (tmppart.get_mountopts() or "none") + ", " - tmptitle += str(tmppart.get_mb()) + "MB)" - menulist = [_(u"Delete"), _(u"Mount Point"), _(u"Mount Options"), _(u"Format"), _(u"Extra mkfs.* Parameters")] - code, part_action = self._d.menu(tmptitle, choices=self._dmenu_list_to_choices(menulist), cancel=_(u"Back")) - if code != self._DLG_OK: break - part_action = menulist[int(part_action)-1] - if part_action == _(u"Delete"): - answer = (self._d.yesno(_(u"Are you sure you want to delete the partition ") + drive_to_partition + str(part_to_edit) + "?") == self._DLG_YES) - if answer == True: - tmpdev = tmppart.get_device() - tmpdev.remove_partition(part_to_edit) - break - elif part_action == _(u"Mount Point"): - mountpoint_menu = ["/","/boot","/etc","/home","/lib","/mnt","/mnt/windows","/opt","/root","/usr","/usr/local","/usr/portage","/var",_(u"Other")] - code, mountpt = self._d.menu(_(u"Choose a mountpoint from the list or choose Other to type your own for partition ")+str(part_to_edit)+_(u". It is currently set to:")+tmppart.get_mountpoint(), choices=self._dmenu_list_to_choices(mountpoint_menu)) #may have to make that an integer - if code == self._DLG_OK: - mountpt = mountpoint_menu[int(mountpt)-1] - if mountpt == _(u"Other"): - code, mountpt = self._d.inputbox(_(u"Enter a mountpoint for partition ") + str(part_to_edit), init=tmppart.get_mountpoint()) - try: tmppart.set_mountpoint(mountpt) - except: self._d.msgbox(_(u"ERROR! Could not set mountpoint!")) - elif part_action == _(u"Mount Options"): - code, answer = self._d.inputbox(_(u"Enter your mount options for partition ") + str(part_to_edit), init=(tmppart.get_mountopts() or "defaults")) - if code == self._DLG_OK: tmppart.set_mountopts(answer) - elif part_action == _(u"Format"): - #Change the Yes/No buttons back. - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - code = self._d.yesno(_(u"Do you want to format this partition?")) - if code == self._DLG_YES: - tmppart.set_format(True) - else: - tmppart.set_format(False) - elif part_action == _(u"Extra mkfs.* Parameters"): - new_mkfsopts = tmppart.get_mkfsopts() - # extra mkfs options - if tmppart.get_type() != "extended": - code, new_mkfsopts = self._d.inputbox(_(u"Extra mkfs.* Parameters"), init=new_mkfsopts) - if code == self._DLG_OK: tmppart.set_mkfsopts(new_mkfsopts) - try: - self._install_profile.set_partition_tables(devices) - except: - self._d.msgbox(_(u"ERROR: The partition tables could not be set correctly!")) - - def set_network_mounts(self): - # This is where any NFS mounts will be specified - network_mounts = copy.deepcopy(self._install_profile.get_network_mounts()) - while 1: - menulist = [] - for mount in network_mounts: - menulist.append(mount['host'] + ":" + mount['export']) - menulist.append(_(u"Add a new network mount")) - choices = self._dmenu_list_to_choices(menulist) - code, menuitemidx = self._d.menu(_(u"If you have any network shares you would like to mount during the install and for your new system, define them here. Select a network mount to edit or add a new mount. Currently GLI only supports NFS mounts."), choices=choices, cancel=_(u"Save and Continue"), height=18) - if code == self._DLG_CANCEL: - try: - self._install_profile.set_network_mounts(network_mounts) - except: - self._d.msgbox(_(u"ERROR: Could net set network mounts!")) - break - menuitem = menulist[int(menuitemidx)-1] - if menuitem == _(u"Add a new network mount"): - code, nfsmount = self._d.inputbox(_(u"Enter NFS mount or just enter the IP/hostname to search for available mounts"), height=13, width=50) - if code != self._DLG_OK: - continue - if not GLIUtility.is_nfs(nfsmount): - if GLIUtility.is_ip(nfsmount) or GLIUtility.is_hostname(nfsmount): - status, remotemounts = GLIUtility.spawn("/usr/sbin/showmount -e " + nfsmount + " 2>&1 | egrep '^/' | cut -d ' ' -f 1 && echo", return_output=True) - remotemounts = remotemounts.strip().split("\n") - if (not GLIUtility.exitsuccess(status)) or (not len(remotemounts)) or not remotemounts[0]: - self._d.msgbox(_(u"No NFS exports were detected on ") + nfsmount) - continue - code, nfsmount2 = self._d.menu(_(u"Select a NFS export"), choices=self._dmenu_list_to_choices(remotemounts), cancel=_(u"Back")) - if code != self._DLG_OK: - continue - nfsmount2 = remotemounts[int(nfsmount2)-1] - else: - self._d.msgbox(_(u"The address you entered, %s, is not a valid IP or hostname. Please try again.") % nfsmount) - continue - else: - colon_location = nfsmount.find(':') - menuitem = nfsmount - nfsmount = menuitem[:colon_location] - nfsmount2 = menuitem[colon_location+1:] - for mount in network_mounts: - if nfsmount == mount['host'] and nfsmount2 == mount['export']: - self._d.msgbox(_(u"There is already an entry for ") + nfsmount + ":" + nfsmount2 + ".") - nfsmount = None - break - if nfsmount == None: - continue - network_mounts.append({'export': nfsmount2, 'host': nfsmount, 'mountopts': '', 'mountpoint': '', 'type': 'nfs'}) - menuitem = nfsmount + ":" + nfsmount2 - menuitemidx = len(network_mounts) - - if menuitem.find(':') != -1: - colon_location = menuitem.find(':') - tmpmount = network_mounts[int(menuitemidx)-1] - code, mountpoint = self._d.inputbox(_(u"Enter a mountpoint"), init=tmpmount['mountpoint']) - if code == self._DLG_OK: - tmpmount['mountpoint'] = mountpoint - code, mountopts = self._d.inputbox(_(u"Enter mount options"), init=tmpmount['mountopts']) - if code == self._DLG_OK: - tmpmount['mountopts'] = mountopts - network_mounts[int(menuitemidx)-1] = tmpmount - - def set_install_stage(self): - if self._networkless: return - # The install stage and stage tarball will be selected here - install_stages = (("1",_(u"Stage1 is used when you want to bootstrap&build from scratch.")), - ("2",_(u"Stage2 is used for building from a bootstrapped semi-compiled state.")), - ("3",_(u"Stage3 is a basic system that has been built for you (no compiling).")), - ("3+GRP", _(u"A Stage3 install but using binaries from the LiveCD when able."))) - code, install_stage = self._d.menu(_(u"Which stage do you want to start at?"), choices=install_stages, cancel=_(u"Back"), width=78) - stage3warning = "" - if code == self._DLG_OK: - if install_stage == "3+GRP": - stage3warning = _(u"WARNING: Since you are doing a GRP install it is HIGHLY recommended you choose Create from CD to avoid a potentially broken installation.") - try: - self._install_profile.set_grp_install(None, True, None) - except: - self._d.msgbox(_(u"ERROR! Could not set install stage!")) - install_stage = "3" - try: - self._install_profile.set_install_stage(None, install_stage, None) - except: - self._d.msgbox(_(u"ERROR! Could not set install stage!")) - has_systempkgs = GLIUtility.is_file("/usr/livecd/systempkgs.txt") - if install_stage == "3" and has_systempkgs: - #Change the Yes/No buttons to new labels for this question. - self._d.add_persistent_args(["--yes-label", _(u"Create from CD")]) - self._d.add_persistent_args(["--no-label", _(u"Specify URI")]) - if self._d.yesno(_(u"Do you want to generate a stage3 on the fly using the files on the LiveCD (fastest) or do you want to grab your stage tarball from the Internet?\n")+stage3warning, width=55) == self._DLG_YES: - #Generate on the FLY - try: - self._install_profile.set_dynamic_stage3(None, True, None) - except: - self._d.msgbox(_(u"ERROR: Could not set the stage tarball URI!")) - return - #Specify URI - #subarches = { 'x86': ("x86", "i686", "pentium3", "pentium4", "athlon-xp"), 'hppa': ("hppa1.1", "hppa2.0"), 'ppc': ("g3", "g4", "g5", "ppc"), 'sparc': ("sparc32", "sparc64")} - type_it_in = False - stage_tarball = "" - if GLIUtility.ping("www.gentoo.org"): #Test for network connectivity - mirrors = GLIUtility.list_mirrors() - mirrornames = [] - mirrorurls = [] - for item in mirrors: - mirrornames.append(item[1]) - mirrorurls.append(item[0]) - code, mirror = self._d.menu(_(u"Select a mirror to grab the tarball from or select Cancel to enter an URI manually."), choices=self._dmenu_list_to_choices(mirrornames), width=77, height=20) - if code != self._DLG_OK: - type_it_in = True - else: - mirror = mirrorurls[int(mirror)-1] - arch = self._client_profile.get_architecture_template() - tarballs = GLIUtility.list_stage_tarballs_from_mirror(mirror, arch) - code, stage_tarball = self._d.menu(_(u"Select your desired stage tarball:"), choices=self._dmenu_list_to_choices(tarballs), width=77, height=20) - if (code != self._DLG_OK): - type_it_in = True - else: - stage_tarball = mirror + "/releases/" + arch + "/current/stages/" + tarballs[int(stage_tarball)-1] - #get portageq envvar value of cflags and look for x86, i686,etc. - #URL SYNTAX - #http://gentoo.osuosl.org/releases/ARCHITECTURE/current/stages/ - else: - type_it_in = True - if type_it_in: - code, stage_tarball = self._d.inputbox(_(u"Specify the stage tarball URI or local file:"), init=self._install_profile.get_stage_tarball_uri()) - if code != self._DLG_OK: - return - #If Doing a local install, check for valid file:/// uri - if stage_tarball: - if not GLIUtility.is_uri(stage_tarball, checklocal=self.local_install): - self._d.msgbox(_(u"The specified URI is invalid. It was not saved. Please go back and try again.")); - else: self._install_profile.set_stage_tarball_uri(None, stage_tarball, None) - else: self._d.msgbox(_(u"No URI was specified!")) - #if d.yesno("The specified URI is invalid. Use it anyway?") == DLG_YES: install_profile.set_stage_tarball_uri(None, stage_tarball, None) - - def set_portage_tree(self): - # This section will ask whether to sync the tree, whether to use a snapshot, etc. - if self._install_profile.get_dynamic_stage3(): #special case - try: - self._install_profile.set_portage_tree_sync_type(None,"snapshot", None) - cd_snapshot_uri = GLIUtility.get_cd_snapshot_uri() - self._install_profile.set_portage_tree_snapshot_uri(None, cd_snapshot_uri, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the portage cd snapshot URI!")) - return - - #Normal case - menulist = [("Sync", _(u"Normal. Use emerge sync RECOMMENDED!")), - ("Webrsync", _(u"HTTP daily snapshot. Use when rsync is firewalled.")), - ("Snapshot", _(u"Use a portage snapshot, either a local file or a URL")), - ("None", _(u"Extra cases such as if /usr/portage is an NFS mount"))] - code, portage_tree_sync = self._d.menu(_(u"Which method do you want to use to sync the portage tree for the installation? If choosing a snapshot you will need to provide the URI for the snapshot if it is not on the livecd."),width=75, height=17, choices=menulist) - if code != self._DLG_OK: - return - self._install_profile.set_portage_tree_sync_type(None, portage_tree_sync.lower(), None) - if portage_tree_sync == "Snapshot": - if self._install_profile.get_portage_tree_snapshot_uri(): - initval = self._install_profile.get_portage_tree_snapshot_uri() - else: - initval = GLIUtility.get_cd_snapshot_uri() - code, snapshot = self._d.inputbox(_(u"Enter portage tree snapshot URI"), init=initval) - if code == self._DLG_OK: - if snapshot: - if not GLIUtility.is_uri(snapshot, checklocal=self.local_install): - self._d.msgbox(_(u"The specified URI is invalid. It was not saved. Please go back and try again.")) - else: - self._install_profile.set_portage_tree_snapshot_uri(None, snapshot, None) - - else: - self._d.msgbox(_(u"No URI was specified! Returning to default emerge sync.")) - #if d.yesno("The specified URI is invalid. Use it anyway?") == DLG_YES: install_profile.set_stage_tarball_uri(None, stage_tarball, None) - - - - def set_make_conf(self): - # This section will be for setting things like CFLAGS, ACCEPT_KEYWORDS, and USE - #special case for dynamic stage3 - if self._install_profile.get_dynamic_stage3() or not self.advanced_mode: - return - - etc_files = self._install_profile.get_etc_files() - if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] - else: - make_conf = {} - - self._d.msgbox(_(u"""The installer will now gather information regarding the contents of /etc/make.conf -One of the unique (and best) features of Gentoo is the ability to -define flags (called USE flags) that define what components are -compiled into applications. For example, you can enable the alsa -flag and programs that have alsa capability will use it. -The result is a finely tuned OS with no unnecessary components to -slow you down. -The installer divides USE flag selection into two screens, one for -global USE flags and one for local flags specific to each program. -Please be patient while the screens load. It may take awhile."""), width=73, height=16) - - #First grab the system USE flags. These will be used often. - system_use_flags = GLIUtility.spawn("portageq envvar USE", return_output=True)[1].strip().split() - - #Now get any stored USE flags. - remove_from_system = {} - add_flags = [] - if make_conf.has_key("USE"): - stored_use_flags = make_conf["USE"].split() - for flag in stored_use_flags: - if "-" in flag: #A subtraction of a flag in the system USE - remove_flag = flag[1:] - remove_from_system[remove_flag] = 1 - else: - add_flags.append(flag) #Add to checked list - - - #Load data. - use_flags = [] - use_local_flags = [] - use_desc = GLIUtility.get_global_use_flags() - use_local_desc = GLIUtility.get_local_use_flags() - - #populate the choices list - sorted_use = use_desc.keys() - sorted_use.sort() - for flagname in sorted_use: - use_flags.append((flagname, use_desc[flagname], int((flagname in system_use_flags or flagname in add_flags) and not remove_from_system.has_key(flagname) ))) - #present the menu - code, chosen_use_flags = self._d.checklist(_(u"Choose which *global* USE flags you want on the new system"), height=25, width=80,list_height=17, choices=use_flags) - - #populate the chocies list - sorted_use = use_local_desc.keys() - sorted_use.sort() - for flagname in sorted_use: - use_local_flags.append((flagname, use_local_desc[flagname], int((flagname in system_use_flags or flagname in add_flags) and not remove_from_system.has_key(flagname) ))) - #present the menu - code, chosen_use_local_flags = self._d.checklist(_(u"Choose which *local* USE flags you want on the new system"), height=25, width=80,list_height=17, choices=use_local_flags) - - - #Hash the chosen list for speed. - chosen_hash = {} - for flag in chosen_use_flags: - chosen_hash[flag] = 1 - for flag in chosen_use_local_flags: - chosen_hash[flag] = 1 - - #Create the new string. Loop through ALL flags, look for match in hash then in USE - temp_use = "" - for flag in use_desc: - if chosen_hash.has_key(flag) and (flag in system_use_flags): - continue #Already in USE, don't need to add. - elif chosen_hash.has_key(flag): - temp_use += flag + " " #Checked. Add. - elif not chosen_hash.has_key(flag) and (flag in system_use_flags): - temp_use += "-"+flag+" " #Was unchecked. add a -flag to USE - - for flag in use_local_desc: - if chosen_hash.has_key(flag) and (flag in system_use_flags): - continue #Already in USE, don't need to add. - elif chosen_hash.has_key(flag): - temp_use += flag + " " #Checked. Add. - elif not chosen_hash.has_key(flag) and (flag in system_use_flags): - temp_use += "-"+flag+" " #Was unchecked. add a -flag to USE - #Store it! - make_conf["USE"] = temp_use - - if not self._install_profile.get_dynamic_stage3() and self.advanced_mode: - #Second, set the ACCEPT_KEYWORDS - #Change the Yes/No buttons to new labels for this question. - self._d.add_persistent_args(["--yes-label", _(u"Stable")]) - self._d.add_persistent_args(["--no-label", _(u"Unstable")]) - if self._d.yesno(_(u"Do you want to run the normal stable portage tree, or the bleeding edge unstable (i.e. ACCEPT_KEYWORDS=arch)? If unsure select stable. Stable is required for GRP installs."), height=12, width=55) == self._DLG_YES: - #Stable - make_conf["ACCEPT_KEYWORDS"] = "" - else: #Unstable - make_conf["ACCEPT_KEYWORDS"] = "~" + self._client_profile.get_architecture_template() - #Third, misc. stuff. - while self.advanced_mode: - menulist = [("CFLAGS",_(u"Edit your C Flags and Optimization level")), - ("CHOST", _(u"Change the Host Setting")), - ("MAKEOPTS", _(u"Specify number of parallel makes (-j) to perform.")), - ("FEATURES", _(u"Change portage functionality settings. (distcc/ccache)")), - ("GENTOO_MIRRORS", _(u"Specify mirrors to use for source retrieval.")), - ("SYNC", _(u"Specify server used by rsync to sync the portage tree.")), - (_(u"Other"), _(u"Specify your own variable and value."))] - if self._install_profile.get_dynamic_stage3(): #SPECIAL LIST WITHOUT CHOST - menulist = [("CFLAGS",_(u"Edit your C Flags and Optimization level")), - ("MAKEOPTS", _(u"Specify number of parallel makes (-j) to perform.")), - ("FEATURES", _(u"Change portage functionality settings. (distcc/ccache)")), - ("GENTOO_MIRRORS", _(u"Specify mirrors to use for source retrieval.")), - ("SYNC", _(u"Specify server used by rsync to sync the portage tree.")), - (_(u"Other"), _(u"Specify your own variable and value."))] - code, menuitem = self._d.menu(_(u"For experienced users, the following /etc/make.conf variables can also be defined. Choose a variable to edit or Done to continue."), choices=menulist, cancel=_(u"Done"), width=77) - if code != self._DLG_OK: - break - if menuitem == _(u"Other"): - code,menuitem = self._d.inputbox(_(u"Enter the variable name: ")) - if code != self._DLG_OK: - continue - oldval = "" - if make_conf.has_key(menuitem): - oldval = make_conf[menuitem] - if oldval: - code, newval = self._d.inputbox(_(u"Enter new value for ") + menuitem, init=oldval) - if code == self._DLG_OK: - make_conf[menuitem] = newval - continue - #SPECIAL CASES here with their own menus. - if menuitem == "CFLAGS": - if not make_conf.has_key("CFLAGS"): - try: - cflags = GLIUtility.get_value_from_config("/etc/make.conf","CFLAGS") - except: - cflags = "" - else: - cflags = make_conf['CFLAGS'] - while 1: - choices_list = [ - (_(u"CLEAR"),_(u"Erase the current value and start over.")), - ("-mcpu",_(u"Add a CPU optimization (deprecated in GCC 3.4)")), - ("-mtune",_(u"Add a CPU optimization (GCC 3.4+)")), - ("-march",_(u"Add an Architecture optimization")), - ("-O",_(u"Add optimization level (please do NOT go over 2)")), - ("-fomit-frame-pointer",_(u"For advanced users only.")), - ("-pipe",_(u"Common additional flag")), - (_(u"Manual"),_(u"Specify your CFLAGS manually")) - ] - code, choice = self._d.menu(_(u"Choose a flag to add to the CFLAGS variable or Done to go back. The current value is: ")+ cflags, choices=choices_list, cancel=_(u"Done"), width=70) - if code != self._DLG_OK: - break - if choice == _(u"CLEAR"): - cflags = "" - elif choice == _(u"Manual"): - code, cflags = self._d.inputbox(_(u"Enter new value for ") + menuitem) - break - elif choice in ["-fomit-frame-pointer","-pipe"]: - cflags += " "+choice - else: - code, newval = self._d.inputbox(_(u"Enter the new value for %s (value only):") % choice) - if code != self._DLG_OK or not newval: - continue - if choice == "-O": - cflags += " "+choice+newval - else: - cflags += " "+choice+"="+newval - if cflags: - make_conf['CFLAGS'] = cflags - elif menuitem == "CHOST": - choices_list = GLIUtility.get_chosts(self._client_profile.get_architecture_template()) - code, chost = self._d.menu(_(u"Choose from the available CHOSTs for your architecture."), choices=self._dmenu_list_to_choices(choices_list), width=77) - if code != self._DLG_OK: - continue - chost = choices_list[int(chost)-1] - make_conf['CHOST'] = chost - elif menuitem == "MAKEOPTS": - makeopt_string = _(u"Presently the only use is for specifying the number of parallel makes (-j) to perform. The suggested number for parallel makes is CPUs+1. Enter the NUMBER ONLY:") - code, newval = self._d.inputbox(makeopt_string, width=60) - if code != self._DLG_OK: - continue - make_conf['MAKEOPTS'] = "-j "+str(newval) - elif menuitem == "FEATURES": - choices_list = [("sandbox",_(u"enables sandboxing when running emerge and ebuild."),0), - ("ccache",_(u"enables ccache support via CC."),0), - ("distcc",_(u"enables distcc support via CC."),0), - ("distlocks",_(u"enables distfiles locking using fcntl or hardlinks."),0), - ("buildpkg",_(u"create binaries of all packages emerged"),0), - (_(u"Other"),_(u"Input your list of FEATURES manually."),0) ] - features_string = _(u"FEATURES are settings that affect the functionality of portage. Most of these settings are for developer use, but some are available to non-developers as well.") - code, choices = self._d.checklist(features_string, choices=choices_list, width=75) - if code != self._DLG_OK: - continue - if _(u"Other") in choices: - code, features = self._d.inputbox(_(u"Enter the value of FEATURES: ")) - elif choices: - features = string.join(choices, ' ') - else: - features = "" - if features: - make_conf['FEATURES'] = features - else: - code, newval = self._d.inputbox(_(u"Enter new value for ") + menuitem) - if code == self._DLG_OK and newval: - make_conf[menuitem] = newval - - try: - if make_conf: - etc_files['make.conf'] = make_conf - self._install_profile.set_etc_files(etc_files) - except: - self._d.msgbox(_(u"ERROR! Could not set the make_conf correctly!")) - - def set_distcc(self): - #Change the Yes/No buttons for this question. - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - if self._d.yesno(_(u"Do you want to use distcc to compile your extra packages during the install and for future compilations as well?"), height=12, width=60, defaultno=1) == self._DLG_YES: - #Add distcc to the services list. - if self._install_profile.get_services(): - services = self._install_profile.get_services() - if isinstance(services, str): - services = services.split(',') - else: - services = [] - if not "distccd" in services: - services.append("distccd") - try: - services = string.join(services, ',') - if services: - self._install_profile.set_services(None, services, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the services list.")) - return - #Set the distcc flag to emerge earlier than other packages. - try: - self._install_profile.set_install_distcc(None, True, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the install distcc flag!")) - return - - #Add distcc to the FEATURES in make.conf and add DISTCC_HOSTS too. - etc_files = self._install_profile.get_etc_files() - #load up the make.conf - if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] - else: - make_conf = {} - #Check for FEATURES and add if not already there. - if make_conf.has_key("FEATURES"): - if not "distcc" in make_conf['FEATURES']: - make_conf['FEATURES'] += " distcc" - else: - make_conf['FEATURES'] = "distcc" - #Now while still working in make.conf, figure out what HOSTS to set. - if make_conf.has_key("DISTCC_HOSTS"): - initval = make_conf['DISTCC_HOSTS'] - else: - initval = "localhost " - distcc_string = _(u"Enter the hosts to be used by distcc for compilation:\nExample: localhost 192.168.0.2 192.168.0.3:4000/10") - code, hosts = self._d.inputbox(distcc_string, width=75, init=initval) - if code != self._DLG_OK: - hosts = initval - make_conf['DISTCC_HOSTS'] = hosts - try: - etc_files['make.conf'] = make_conf - self._install_profile.set_etc_files(etc_files) - except: - self._d.msgbox(_(u"ERROR! Could not set the make_conf correctly!")) - - def set_etc_portage(self): - if self._networkless: return - #This section will be for editing the /etc/portage/* files and other /etc/* files. This should be for advanced users only. - etc_files = self._install_profile.get_etc_files() - while self.advanced_mode: - - menulist = [("portage/package.mask",_(u"A list of DEPEND atoms to mask.")), - ("portage/package.unmask",_(u"A list of packages to unmask.")), - ("portage/package.keywords",_(u"Per-package KEYWORDS (like ACCEPT_KEYWORDS).")), - ("portage/package.use",_(u"Per-package USE flags.")), - (_(u"Other"),_(u"Type your own name of a file to edit in /etc/"))] - code, menuitem = self._d.menu(_(u"For experienced users, the following /etc/* variables can also be defined. Choose a variable to edit or Done to continue."), choices=menulist, cancel=_(u"Done"), width=77) - if code != self._DLG_OK: - break #get out of the while loop. then save and continue - - if menuitem == _(u"Other"): - code, menuitem = self._d.inputbox(_(u"Enter the name of the /etc/ file you would like to edit (DO NOT type /etc/)")) - if code != self._DLG_OK: - return - oldval = "" - if etc_files.has_key(menuitem): - oldval = etc_files[menuitem] - - code, newval = self._d.inputbox(_(u"Enter new contents (use \\n for newline) of ") + menuitem, init=oldval) - if code == self._DLG_OK: - etc_files[menuitem] = [] - etc_files[menuitem].append(newval) - try: - self._install_profile.set_etc_files(etc_files) - except: - self._d.msgbox(_(u"ERROR! Could not set etc/portage/* correctly!")) - - - - def set_kernel(self): - if self._networkless: return - # This section will be for choosing kernel sources, choosing (and specifying) a custom config or genkernel, modules to load at startup, etc. - kernel_sources = [("livecd-kernel", _(u"Copy over the current running kernel (fastest)")), - ("vanilla-sources", _(u"The Unaltered Linux Kernel ver 2.6+ (safest)")), - ("gentoo-sources", _(u"Gentoo's optimized 2.6+ kernel. (less safe)")), - ("hardened-sources", _(u"Hardened sources for the 2.6 kernel tree")), - ("grsec-sources",_(u"Vanilla sources with grsecurity patches")), - (_(u"Other"), _(u"Choose one of the other sources available."))] - code, menuitem = self._d.menu(_(u"Choose which kernel sources to use for your system. If using a previously-made kernel configuration, make sure the sources match the kernel used to create the configuration."), choices=kernel_sources, width=77, height=17) - if code != self._DLG_OK: - return - if menuitem == _(u"Other"): - code, menuitem = self._d.inputbox(_(u"Please enter the desired kernel sources package name:")) - if code != self._DLG_OK: return - try: - self._install_profile.set_kernel_source_pkg(None, menuitem, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the kernel source package!")) - if not menuitem == "livecd-kernel": - #Change the Yes/No buttons to new labels for this question. - self._d.add_persistent_args(["--yes-label", _(u"Genkernel")]) - self._d.add_persistent_args(["--no-label", _(u"Traditional (requires a config!)")]) - kernel_string1 = _(u"There are currently two ways the installer can compile a kernel for your new system. You can either provide a previously-made kernel configuration file and use the traditional kernel-compiling procedure (no initrd) or have genkernel automatically create your kernel for you (with initrd). \n\n If you do not have a previously-made kernel configuration, YOU MUST CHOOSE Genkernel. Choose which method you want to use.") - if self._d.yesno(kernel_string1, width=76,height=13) == self._DLG_YES: #Genkernel - self._install_profile.set_kernel_build_method(None,"genkernel", None) - if self.advanced_mode: - #Change the Yes/No buttons back. - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - if self._d.yesno(_(u"Do you want the bootsplash screen to show up on bootup?")) == self._DLG_YES: - self._install_profile.set_kernel_bootsplash(None, True, None) - else: - self._install_profile.set_kernel_bootsplash(None, False, None) - else: #Custom - self._install_profile.set_kernel_build_method(None,"custom", None) - if self.advanced_mode: - code, custom_kernel_uri = self._d.inputbox(_(u"If you have a custom kernel configuration, enter its location (otherwise just press Enter to continue):"), height=13, width=50) - if code == self._DLG_OK: - if custom_kernel_uri: - if not GLIUtility.is_uri(custom_kernel_uri, checklocal=self.local_install): - self._d.msgbox(_(u"The specified URI is invalid. It was not saved. Please go back and try again.")) - else: - try: - self._install_profile.set_kernel_config_uri(None, custom_kernel_uri, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the kernel config URI!")) - #else: self._d.msgbox(_(u"No URI was specified! Reverting to using genkernel")) - - def set_boot_loader(self): - arch = self._client_profile.get_architecture_template() - parts = self._install_profile.get_partition_tables() - #Bootloader code yanked from the x86ArchTemplate - kernel_params = self._install_profile.get_bootloader_kernel_args() - if self._install_profile.get_boot_device(): - boot_device = self._install_profile.get_boot_device() - else: - boot_device = "" - foundboot = False - for device in parts: - tmp_partitions = parts[device] #.get_install_profile_structure() - for partition in tmp_partitions: - mountpoint = tmp_partitions[partition]['mountpoint'] - if (mountpoint == "/boot"): - foundboot = True - if (( (mountpoint == "/") and (not foundboot) ) or (mountpoint == "/boot")): - boot_device = device - if not "doscsi" in kernel_params.split(): - if device.startswith("/dev/sd"): kernel_params += " doscsi" - arch_loaders = { 'x86': [ - ("grub",_(u"GRand Unified Bootloader, newer, RECOMMENDED"))], - 'amd64': [ - ("grub",_(u"GRand Unified Bootloader, newer, RECOMMENDED"))]} #FIXME ADD OTHER ARCHS - if not self._networkless: - arch_loaders['x86'].append(("lilo",_(u"LInux LOader, older, traditional.(detects windows partitions)"))) - boot_loaders = arch_loaders[arch] - boot_loaders.append(("none", _(u"Do not install a bootloader. (System may be unbootable!)"))) - boot_string1 = _(u"To boot successfully into your new Linux system, a bootloader will be needed. If you already have a bootloader you want to use you can select None here. The bootloader choices available are dependent on what GLI supports and what architecture your system is. Choose a bootloader") - code, menuitem = self._d.menu(boot_string1, choices=boot_loaders, height=16, width=74) - if code != self._DLG_OK: - return - try: - self._install_profile.set_boot_loader_pkg(None, menuitem, None) - except: - self._d.msgbox(_(u"ERROR! Could not set boot loader pkg! ")+menuitem) - if menuitem != "none" and self.advanced_mode: - #Reset the Yes/No labels. - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label",_(u"No")]) - boot_string2 = _(u"Most bootloaders have the ability to install to either the Master Boot Record (MBR) or some other partition. Most people will want their bootloader installed on the MBR for successful boots, but if you have special circumstances, you can have the bootloader installed to the /boot partition instead. Do you want the boot loader installed in the MBR? (YES is RECOMMENDED)") - if self._d.yesno(boot_string2, height=13, width=55) == self._DLG_YES: - self._install_profile.set_boot_loader_mbr(None, True, None) - else: - self._install_profile.set_boot_loader_mbr(None, False, None) - if self._install_profile.get_boot_loader_mbr(): #If we're installing to MBR gotta check the device. - if self.advanced_mode or (boot_device and boot_device[-1] != 'a'): - #show the menu. - boot_string3_std = _(u"Your boot device may not be correct. It is currently set to %s, but this device may not be the first to boot. Usually boot devices end in 'a' such as hda or sda.") % boot_device - boot_string3 = _(u" Please confirm your boot device by choosing it from the menu.") - if not self.advanced_mode: - boot_string3 = boot_string3_std + boot_string3 - #grab choies from the partiton list. - boot_drive_choices = [] - for device in parts: - boot_drive_choices.append(device) - if not boot_drive_choices: - self._d.msgbox(_(u"ERROR: No drives set up. Please complete the Partitioning screen first!")) - return - code, boot_drive_choice = self._d.menu(boot_string3, choices=self._dmenu_list_to_choices(boot_drive_choices), height=16, width=70) - if code != self._DLG_OK: - return - boot_drive_choice = boot_drive_choices[int(boot_drive_choice)-1] - try: - self._install_profile.set_boot_device(None,boot_drive_choice,None) - except: - self._d.msgbox(_(u"ERROR! Could not set the boot device!")+boot_drive_choice) - if self.advanced_mode: - code, bootloader_kernel_args = self._d.inputbox(_(u"If you have any additional optional arguments you want to pass to the kernel at boot, type them here or just press Enter to continue:"), height=12, width=55, init=kernel_params) - if code == self._DLG_OK: - try: - self._install_profile.set_bootloader_kernel_args(None, bootloader_kernel_args, None) - except: - self._d.msgbox(_(u"ERROR! Could not set bootloader kernel arguments! ")+bootloader_kernel_args) - elif kernel_params: #If we are in standard mode but have the dosci to add. - try: - self._install_profile.set_bootloader_kernel_args(None, kernel_params, None) - except: - self._d.msgbox(_(u"ERROR! Could not set bootloader kernel arguments! ")+bootloader_kernel_args) - - - def set_timezone(self): - # This section will be for setting the timezone. - zonepath = "/usr/share/zoneinfo" - skiplist = ["zone.tab","iso3166.tab","posixrules"] - while 1: - tzlist = [] - for entry in os.listdir(zonepath): - if entry not in skiplist: - if os.path.isdir(zonepath + "/" + entry): entry += "/" - tzlist.append(entry) - tzlist.sort() - timezone_string = _(u"Please select the timezone for the new installation. Entries ending with a / can be selected to reveal a sub-list of more specific locations. For example, you can select America/ and then Chicago.") - code, tznum = self._d.menu(timezone_string, choices=self._dmenu_list_to_choices(tzlist), height=20, cancel="Back") - if code == self._DLG_OK: - zonepath = os.path.join(zonepath,tzlist[int(tznum)-1]) - if tzlist[int(tznum)-1][-1:] != "/": - break - else: - if zonepath == "/usr/share/zoneinfo": - return - slashloc = zonepath[:-1].rfind("/") - zonepath = zonepath[:slashloc] - try: - self._install_profile.set_time_zone(None, zonepath[20:], None) - except: - self._d.msgbox(_(u"ERROR: Could not set that timezone!")) - - def set_networking(self): - # This section will be for setting up network interfaces - interfaces = self._install_profile.get_network_interfaces() - CC_iface = self._client_profile.get_network_interface() - if CC_iface and (CC_iface not in interfaces): - #The CC has a network config that's not already there. Preload it. - CC_net_type = self._client_profile.get_network_type() - if CC_net_type == 'dhcp': - try: - interfaces[CC_iface] = ('dhcp', self._client_profile.get_network_dhcp_options(), None) - except: - pass - else: - try: - interfaces[CC_iface] = (self._client_profile.get_network_ip(), self._client_profile.get_network_broadcast(), self._client_profile.get_network_netmask()) - except: - pass - - while 1: - net_string1 = _(u"Here you will enter all of your network interface information for the new system. You can either choose a network interface to edit, add a network interface, delete an interface, or edit the miscellaneous options such as hostname and proxy servers.") - net_string2 = _(u"To setup your network interface, you can either use DHCP if enabled, or manually enter your network information.\n DHCP (Dynamic Host Configuration Protocol) makes it possible to automatically receive networking information (IP address, netmask, broadcast address, gateway, nameservers etc.). This only works if you have a DHCP server in your network (or if your provider provides a DHCP service). If you do not, you must enter the information manually. Please select your networking configuration method:") - choice_list = [] - for iface in interfaces: - if interfaces[iface][0] == 'dhcp': - choice_list.append((iface, _(u"Settings: DHCP. Options: ")+ interfaces[iface][1])) - else: - choice_list.append((iface, _(u"IP: ")+interfaces[iface][0]+_(u" Broadcast: ")+interfaces[iface][1]+_(u" Netmask: ")+interfaces[iface][2])) - choice_list.append((_(u"Add"),_(u"Add a new network interface"))) - code, iface_choice = self._d.menu(net_string1, choices=choice_list, cancel=_(u"Save and Continue"), height=18, width=77) - if code != self._DLG_OK: - try: - self._install_profile.set_network_interfaces(interfaces) - except: - self_d.msgbox(_(u"ERROR! Could not set the network interfaces!")) - break #This should hopefully move the user down to part two of set_networking - if iface_choice == _(u"Add"): - if self.local_install: - device_list = GLIUtility.get_eth_devices() - newchoice_list = [] - for device in device_list: - if device not in interfaces: - newchoice_list.append((device, GLIUtility.get_interface_realname(device))) - newchoice_list.append((_(u"Other"),_(u"Type your own."))) - code, newnic = self._d.menu(_(u"Choose an interface from the list or Other to type your own if it was not detected."), choices=newchoice_list, width=75) - else: - newnic == _(u"Other") - if newnic == _(u"Other"): - code, newnic = self._d.inputbox(_(u"Enter name for new interface (eth0, ppp0, etc.)")) - if code != self._DLG_OK: - continue - if newnic in interfaces: - self._d.msgbox(_(u"An interface with the name is already defined.")) - continue - #create the interface in the data structure. - #interfaces[newnic] = ("", "", "") - #Change the Yes/No buttons to new labels for this question. - self._d.add_persistent_args(["--yes-label", _(u"DHCP")]) - self._d.add_persistent_args(["--no-label", _(u"Static IP/Manual")]) - if self._d.yesno(net_string2, height=15, width=60) == self._DLG_YES: #DHCP - dhcp_options = "" - if self.advanced_mode: - code, dhcp_options = self._d.inputbox(_(u"If you have any additional DHCP options to pass, type them here in a space-separated list. If you have none, just press Enter."), height=13, width=50) - interfaces[newnic] = ('dhcp', dhcp_options, None) - else: - network_type = 'static' - code, data = self._d.form(_(u'Enter your networking information: (See Chapter 3 of the Handbook for more information) Your broadcast address is probably your IP address with 255 as the last tuple. Do not press Enter until all fields are complete!'), - ((_(u'Enter your IP address:'), 15), - (_(u'Enter your Broadcast address:'), 15), - (_(u'Enter your Netmask:'),15,'255.255.255.0'))) - (ip_address, broadcast, netmask) = data[:-1].split('\n') - if code != self._DLG_OK: - continue - #Set the info now that it's all gathered. - interfaces[newnic] = (ip_address, broadcast, netmask) - else: #they have chosen an interface, present them with edit/delete - #Change the Yes/No buttons to new labels for this question. - self._d.add_persistent_args(["--yes-label", _(u"Edit")]) - self._d.add_persistent_args(["--no-label", _(u"Delete")]) - if self._d.yesno(_(u"For interface %s, you can either edit the interface information (IP Address, Broadcast, Netmask) or Delete the interface.") % iface_choice) == self._DLG_YES: - #Edit - #Change the Yes/No buttons to new labels for this question. - self._d.add_persistent_args(["--yes-label", _(u"DHCP")]) - self._d.add_persistent_args(["--no-label", _(u"Static IP/Manual")]) - if self._d.yesno(net_string2, height=15, width=60) == self._DLG_YES: #DHCP - dhcp_options = "" - if self.advanced_mode: - code, dhcp_options = self._d.inputbox(_(u"If you have any additional DHCP options to pass, type them here in a space-separated list. If you have none, just press Enter."), height=13, width=50) - interfaces[iface_choice] = ('dhcp', dhcp_options, None) - else: - network_type = 'static' - code, data = self._d.form(_(u'Enter your networking information: (See Chapter 3 of the Handbook for more information) Your broadcast address is probably your IP address with 255 as the last tuple. Do not press Enter until all fields are complete!'), - ((_(u'Enter your IP address:'), 15, interfaces[iface_choice][0]), - (_(u'Enter your Broadcast address:'), 15, interfaces[iface_choice][1]), - (_(u'Enter your Netmask:'),15,interfaces[iface_choice][2]))) - (ip_address, broadcast, netmask) = data[:-1].split('\n') - if code != self._DLG_OK: - continue - #Set the info now that it's all gathered. - interfaces[iface_choice] = (ip_address, broadcast, netmask) - else: - #Delete - #Reset the Yes/No buttons - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - if self._d.yesno(_(u"Are you sure you want to remove the interface ") + iface_choice + "?") == self._DLG_YES: - del interfaces[iface_choice] - - #This section is for defining DNS servers, default routes/gateways, hostname, etc. - #First ask for the default gateway device and IP - interfaces = self._install_profile.get_network_interfaces() - choice_list = [] - for iface in interfaces: - if interfaces[iface][0] == 'dhcp': - choice_list.append((iface, _(u"Settings: DHCP. Options: ")+ interfaces[iface][1],0)) - else: - choice_list.append((iface, _(u"IP: ")+interfaces[iface][0]+_(u" Broadcast: ")+interfaces[iface][1]+_(u" Netmask: ")+interfaces[iface][2],0)) - net_string3 = _(u"To be able to surf on the internet, you must know which host shares the Internet connection. This host is called the gateway. It is usually similar to your IP address, but ending in .1\nIf you have DHCP then just select your primary Internet interface (no IP will be needed) Start by choosing which interface accesses the Internet:") - if choice_list: - code, gateway_iface = self._d.radiolist(net_string3, choices=choice_list, height=20, width=67) - if (code == self._DLG_OK) and gateway_iface: #They made a choice. Ask the IP if not DHCP. - while interfaces[gateway_iface][0] != 'dhcp': - code, ip = self._d.inputbox(_(u"Enter the gateway IP address for ") + gateway_iface, init=interfaces[gateway_iface][0]) - if code != self._DLG_OK: - break - if not GLIUtility.is_ip(ip): - self._d.msgbox(_(u"Invalid IP Entered! Please try again.")) - continue - try: - self._install_profile.set_default_gateway(None, ip,{'interface': gateway_iface}) - except: - self._d.msgbox(_(u"ERROR! Coult not set the default gateway with IP %s for interface %s") % (ip, gateway_iface)) - break - #Now ask for the other info in a large form. - error = True - hostname = "" - domainname = "" - nisdomainname = "" - primary_dns = "" - backup_dns = "" - http_proxy = "" - ftp_proxy = "" - rsync_proxy = "" - while error: - error = False - if self.advanced_mode: - code, data = self._d.form(_(u'Fill out the remaining networking settings. The hostname is manditory as that is the name of your computer. Leave the other fields blank if you are not using them. If using DHCP you do not need to enter DNS servers. Do not press Enter until all fields are complete!'), - ((_(u'Enter your Hostname:'), 25, self._install_profile.get_hostname()), - (_(u'Enter your Domain Name:'), 25, self._install_profile.get_domainname()), - (_(u'Enter your NIS Domain Name:'),25,self._install_profile.get_nisdomainname()), - (_(u'Enter a primary DNS server:'),15), - (_(u'Enter a backup DNS server:'),15), - )) - if code != self._DLG_OK: - return - (hostname, domainname, nisdomainname, primary_dns, backup_dns, http_proxy, ftp_proxy, rsync_proxy) = data[:-1].split('\n') - else: #standard mode - code, data = self._d.form(_(u'Fill out the remaining networking settings. The hostname is manditory as that is the name of your computer. Leave the other fields blank if you are not using them. If using DHCP you do not need to enter DNS servers. Do not press Enter until all fields are complete!'), - ((_(u'Enter your Hostname:'), 25, self._install_profile.get_hostname()), - (_(u'Enter your Domain Name:'), 25, self._install_profile.get_domainname()), - (_(u'Enter a primary DNS server:'),15), - (_(u'Enter a backup DNS server:'),15))) - if code != self._DLG_OK: - return - (hostname, domainname, primary_dns, backup_dns) = data[:-1].split('\n') - #Check the data before entering it. - if hostname: - if type(hostname) != str: - self._d.msgbox(_(u"Incorrect hostname! It must be a string. Not saved.")) - error = True - else: - try: - self._install_profile.set_hostname(None, hostname, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the hostname:")+hostname) - error = True - if domainname: - if type(domainname) != str: - self._d.msgbox(_(u"Incorrect domainname! It must be a string. Not saved.")) - error = True - else: - try: - self._install_profile.set_domainname(None, domainname, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the domainname:")+domainname) - error = True - if nisdomainname: - if type(nisdomainname) != str: - self._d.msgbox(_(u"Incorrect nisdomainname! It must be a string. Not saved.")) - error = True - else: - try: - self._install_profile.set_nisdomainname(None, nisdomainname, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the nisdomainname:")+nisdomainname) - error = True - if primary_dns: - if not GLIUtility.is_ip(primary_dns): - self._d.msgbox(_(u"Incorrect Primary DNS Server! Not saved.")) - error = True - else: - if backup_dns: - if not GLIUtility.is_ip(backup_dns): - self._d.msgbox(_(u"Incorrect Backup DNS Server! Not saved.")) - error = True - else: - primary_dns = primary_dns + " " + backup_dns - try: - self._install_profile.set_dns_servers(None, primary_dns, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the DNS Servers:")+primary_dns) - error = True - - - - def set_cron_daemon(self): - if self._networkless: return - cron_daemons = (("vixie-cron", _(u"Paul Vixie's cron daemon, fully featured, RECOMMENDED.")), - ("dcron",_(u"A cute little cron from Matt Dillon.")), - ("fcron", _(u"A scheduler with extended capabilities over cron & anacron")), - ("None", _(u"Don't use a cron daemon. (NOT Recommended!)"))) - cron_string = _(u"A cron daemon executes scheduled commands. It is very handy if you need to execute some command regularly (for instance daily, weekly or monthly). Gentoo offers three possible cron daemons: dcron, fcron and vixie-cron. Installing one of them is similar to installing a system logger. However, dcron and fcron require an extra configuration command, namely crontab /etc/crontab. If you don't know what to choose, use vixie-cron. If doing a networkless install, choose vixie-cron. Choose your cron daemon:") - code, menuitem = self._d.menu(cron_string, choices=cron_daemons, height=21, width=77) - if code == self._DLG_OK: - if menuitem == "None": - menuitem = "" - self._install_profile.set_cron_daemon_pkg(None, menuitem, None) - - def set_logger(self): - if self._networkless: return - loggers = (("syslog-ng", _(u"An advanced system logger.")), - ("metalog", _(u"A Highly-configurable system logger.")), - ("syslogkd", _(u"The traditional set of system logging daemons."))) - logger_string = _(u"Linux has an excellent history of logging capabilities -- if you want you can log everything that happens on your system in logfiles. This happens through the system logger. Gentoo offers several system loggers to choose from. If you plan on using sysklogd or syslog-ng you might want to install logrotate afterwards as those system loggers don't provide any rotation mechanism for the log files. If doing networkless, choose syslog-ng. Choose a system logger:") - code, menuitem = self._d.menu(logger_string, choices=loggers, height=21, width=68) - if code == self._DLG_OK: - self._install_profile.set_logging_daemon_pkg(None, menuitem, None) - - def set_extra_packages(self): - #d.msgbox("This section is for selecting extra packages (pcmcia-cs, rp-pppoe, xorg-x11, etc.) and setting them up") - if self._install_profile.get_install_packages(): - install_packages = self._install_profile.get_install_packages() - if isinstance(install_packages, str): - install_packages = install_packages.split() - else: - install_packages = [] - package_list = self._install_profile.get_install_package_list() - highlevel_menu = [] - for group in package_list: - highlevel_menu.append( (group, package_list[group][0]) ) - highlevel_menu.append( (_(u"Manual"), "Type your own space-separated list of packages.") ) - - while 1: - extra_string1 = _(u"There are thousands of applications available to Gentoo users through Portage, Gentoo's package management system. Select some of the more common ones below or add your own additional package list by choosing 'Manual'.") - code, submenu = self._d.menu(extra_string1+ _(u"\nYour current package list is: ")+string.join(install_packages, ','), choices=highlevel_menu, cancel=_(u"Save and Continue"), width=70, height=23) - if code != self._DLG_OK: #Save and move on. - try: - packages = string.join(install_packages, ' ') - if packages: - self._install_profile.set_install_packages(None, packages, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the install packages! List of packages:")) - return - #Popular Desktop Applications - choices_list = [] - #pkgs = {} - - #Special case first. - if submenu == _(u"Manual"): - code, tmp_install_packages = self._d.inputbox(_(u"Enter a space-separated list of extra packages to install on the system"), init=string.join(install_packages, ' '), width=70) - if code == self._DLG_OK: - install_packages = tmp_install_packages.split() - continue - - #All other cases load pkgs and GRP - pkgs = package_list[submenu][1] - grp_list = GLIUtility.get_grp_pkgs_from_cd() - for pkg in pkgs: - if pkg in grp_list: - choices_list.append((pkg, "(GRP) "+pkgs[pkg], int(pkg in install_packages))) - else: - if not self._networkless: - choices_list.append((pkg, pkgs[pkg], int(pkg in install_packages))) - if not choices_list: continue - code, choices = self._d.checklist(_(u"Choose from the listed packages. If doing a networkless install, only choose (GRP) packages."), choices=choices_list, height=19, list_height=10, width=77) - if code != self._DLG_OK: - continue - for pkg in pkgs: #clear out packages from this list that are already in install_packages so that you can uncheck packages and they will be removed. the ones that remain checked will be re-added. - for i, tmppkg in enumerate(install_packages): - if tmppkg == pkg: - del install_packages[i] - - for package in choices: - install_packages.append(package) - #special cases for desktop environments - if package in ["xorg-x11", "gnome","kde","blackbox","enlightenment","fluxbox","xfce4"]: #ask about X - #Reset the Yes/No buttons - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - if not self.advanced_mode or self._d.yesno(_(u"Do you want to start X on bootup?")) == self._DLG_YES: - services = self._install_profile.get_services() or 'xdm' - if isinstance(services, list): - services = string.join(services, ',') - if 'xdm' not in services: - services += ',xdm' - try: - self._install_profile.set_services(None, services, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the services list.")) - #rc.conf changes specific to packages. - if package == "gnome": - etc_files = self._install_profile.get_etc_files() - if not "rc.conf" in etc_files: - etc_files['rc.conf'] = {} - etc_files['rc.conf']['DISPLAYMANAGER'] = "gdm" - self._install_profile.set_etc_files(etc_files) - if package == "kde": - etc_files = self._install_profile.get_etc_files() - if not "rc.conf" in etc_files: - etc_files['rc.conf'] = {} - etc_files['rc.conf']['DISPLAYMANAGER'] = "kdm" - self._install_profile.set_etc_files(etc_files) - if package == "enlightenment": - etc_files = self._install_profile.get_etc_files() - if not "rc.conf" in etc_files: - etc_files['rc.conf'] = {} - etc_files['rc.conf']['DISPLAYMANAGER'] = "entrance" - self._install_profile.set_etc_files(etc_files) - if package == "fluxbox": - etc_files = self._install_profile.get_etc_files() - if not "rc.conf" in etc_files: - etc_files['rc.conf'] = {} - etc_files['rc.conf']['XSESSION'] = "fluxbox" - self._install_profile.set_etc_files(etc_files) - - - - def set_services(self): - if self._install_profile.get_services(): - services = self._install_profile.get_services() - if isinstance(services, str): - services = services.split(',') - else: - services = [] - choice_list = [("alsasound", _(u"ALSA Sound Daemon"),int("alsasound" in services)), - ("apache", _(u"Common web server (version 1.x)"),int("apache" in services)), - ("apache2", _(u"Common web server (version 2.x)"),int("apache2" in services)), - ("distccd", _(u"Distributed Compiling System"),int("distccd" in services)), - ("esound", _(u"ESD Sound Daemon"),int("esound" in services)), - ("hdparm", _(u"Hard Drive Tweaking Utility"),int("hdparm" in services)), - ("local", _(u"Run scripts found in /etc/conf.d/local.start"),int("local" in services)), - ("portmap", _(u"Port Mapping Service"),int("portmap" in services)), - ("proftpd", _(u"Common FTP server"),int("proftpd" in services)), - ("sshd", _(u"SSH Daemon (allows remote logins)"),int("sshd" in services)), - ("xfs", _(u"X Font Server"),int("xfs" in services)), - ("xdm", _(u"X Daemon"),int("xdm" in services)), - (_(u"Other"),_(u"Manually specify your services in a comma-separated list."),0)] - services_string = _(u"Choose the services you want started on bootup. Note that depending on what packages are selected, some services listed will not exist.") - code, services_list = self._d.checklist(services_string, choices=choice_list, height=21, list_height=12, width=77) - if code != self._DLG_OK: - return - services = [] - for service in services_list: - services.append(service) - if _(u"Other") in services_list: - code, services = self._d.inputbox(_(u"Enter a comma-separated list of services to start on boot"), init=string.join(services, ',')) - if code != self._DLG_OK: - return - try: - services = string.join(services, ',') - if services: - self._install_profile.set_services(None, services, None) - except: - self._d.msgbox(_(u"ERROR! Could not set the services list.")) - return - - def set_rc_conf(self): - # This section is for editing /etc/rc.conf - if not self.advanced_mode: - return - etc_files = self._install_profile.get_etc_files() - keymap = "" - windowkeys = "" - ext_keymap = "" - font = "" - trans = "" - clock = "" - editor = "" - disp_manager = "" - xsession = "" - rc_string1 = _(u"Additional configuration settings for Advanced users (rc.conf)\nHere are some other variables you can set in various configuration files on the new system. If you don't know what a variable does, don't change it!") - menulist = [("KEYMAP",_(u"Use KEYMAP to specify the default console keymap.")), - ("SET_WINDOWKEYS", _(u"Decision to first load the 'windowkeys' console keymap")), - ("EXTENDED_KEYMAPS", _(u"maps to load for extended keyboards. Most users will leave this as is.")), - ("CONSOLEFONT", _(u"Specifies the default font that you'd like Linux to use on the console.")), - ("CONSOLETRANSLATION", _(u"The charset map file to use.")), - ("CLOCK", _(u"Set the clock to either UTC or local")), - ("EDITOR", _(u"Set EDITOR to your preferred editor.")), - ("DISPLAYMANAGER", _(u"What display manager do you use ? [ xdm | gdm | kdm | entrance ]")), - ("XSESSION", _(u"a new variable to control what window manager to start default with X"))] - while 1: - code, variable = self._d.menu(rc_string1, choices=menulist, cancel=_(u"Save and Continue"), width=77, height=19) - if code != self._DLG_OK: - break - if variable == "KEYMAP": - keymap_list = GLIUtility.generate_keymap_list() - code, keymap = self._d.menu(_(u"Choose your desired keymap:"), choices=self._dmenu_list_to_choices(keymap_list), height=19) - if code != self._DLG_OK: - continue - keymap = keymap_list[int(keymap)-1] - - elif variable == "SET_WINDOWKEYS": - #Reset the Yes/No buttons - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - if self._d.yesno(_(u"Should we first load the 'windowkeys' console keymap? Most x86 users will say 'yes' here. Note that non-x86 users should leave it as 'no'.")) == self._DLG_YES: - windowkeys = "yes" - else: - windowkeys = "no" - elif variable == "EXTENDED_KEYMAPS": - code, ext_keymap = self._d.inputbox(_(u"This sets the maps to load for extended keyboards. Most users will leave this as is. Enter new value for EXTENDED_KEYMAPS"), width=60) - elif variable == "CONSOLEFONT": - font_list = GLIUtility.generate_consolefont_list() - code, font = self._d.menu(_(u"Choose your desired console font:"), choices=self._dmenu_list_to_choices(font_list), height=19) - if code != self._DLG_OK: - continue - font = font_list[int(font)-1] - elif variable == "CONSOLETRANSLATION": - trans_list = GLIUtility.generate_consoletranslation_list() - code, trans = self._d.menu(_(u"Choose your desired console translation:"), choices=self._dmenu_list_to_choices(trans_list), height=19) - if code != self._DLG_OK: - continue - trans = trans_list[int(trans)-1] - elif variable == "CLOCK": - #Change the Yes/No buttons to new labels for this question. - self._d.add_persistent_args(["--yes-label", "UTC"]) - self._d.add_persistent_args(["--no-label", "local"]) - if self._d.yesno(_(u"Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local.")) == self._DLG_YES: - clock = "UTC" - else: - clock = "local" - elif variable == "EDITOR": - choice_list = [("/bin/nano", _(u"Default editor.")), ("/usr/bin/vim", _(u"vi improved editor.")), ("/usr/bin/emacs", _(u"The emacs editor."))] - code, editor = self._d.menu(_(u"Choose your default editor: "), choices=choice_list) - elif variable == "DISPLAYMANAGER": - choice_list = [("xdm", _(u"X Display Manager")), - ("gdm", _(u"Gnome Display Manager")), - ("kdm", _(u"KDE Display Manager")), - ("entrance", _(u"Login Manager for Enlightenment"))] - code, disp_manager = self._d.menu(_(u"Choose your desired display manager to use when starting X (note you must make sure that package also gets installed for it to work):"), choices=choice_list, width=65) - elif variable == "XSESSION": - code, xsession = self._d.inputbox(_(u"Choose what window manager you want to start default with X if run with xdm, startx, or xinit. (common options are Gnome or Xsession:"), width=65, height=12) - - if not "conf.d/keymaps" in etc_files: - if keymap or windowkeys or ext_keymap: - etc_files['conf.d/keymaps'] = {} - if not "conf.d/consolefont" in etc_files: - if font or trans: - etc_files['conf.d/consolefont'] = {} - if not "conf.d/clock" in etc_files: - if clock: - etc_files['conf.d/clock'] = {} - if not "rc.conf" in etc_files: - if editor or disp_manager or xsession: - etc_files['rc.conf'] = {} - if keymap: - etc_files['conf.d/keymaps']['KEYMAP'] = keymap - if windowkeys: - etc_files['conf.d/keymaps']['SET_WINDOWKEYS'] = windowkeys - if ext_keymap: - etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS'] = ext_keymap - if font: - etc_files['conf.d/consolefont']['CONSOLEFONT'] = font - if trans: - etc_files['conf.d/consolefont']['CONSOLETRANSLATION'] = trans - if clock: - etc_files['conf.d/clock']['CLOCK'] = clock - if editor: - etc_files['rc.conf']['EDITOR'] = editor - if disp_manager: - etc_files['rc.conf']['DISPLAYMANAGER'] = disp_manager - if xsession: - etc_files['rc.conf']['XSESSION'] = xsession - self._install_profile.set_etc_files(etc_files) - - def set_root_password(self): - # The root password will be set here - while 1: - code, passwd1 = self._d.passwordbox(_(u"Please enter your desired password for the root account. (note it will not show the password. Also do not try to use backspace.):")) - if code != self._DLG_OK: - return - code, passwd2 = self._d.passwordbox(_(u"Enter the new root password again for confirmation")) - if code != self._DLG_OK: - return - if passwd1 != passwd2: - self._d.msgbox(_(u"The passwords do not match. Please try again or cancel.")) - else: - try: - self._install_profile.set_root_pass_hash(None, GLIUtility.hash_password(passwd1), None) - except: - self._d.msgbox(_(u"ERROR! Could not set the new system root password!")) - self._d.msgbox(_(u"Password saved. Press Enter to continue.")) - return - - def set_additional_users(self): - # This section will be for adding non-root users - users = {} - for user in self._install_profile.get_users(): - users[user[0]] = (user[0], user[1], user[2], user[3], user[4], user[5], user[6]) - while 1: - menu_list = [] - for user in users: - menu_list.append(user) - menu_list.sort() - menu_list.append(_(u"Add user")) - users_string1 = _(u"Working as root on a Unix/Linux system is dangerous and should be avoided as much as possible. Therefore it is strongly recommended to add a user for day-to-day use. Choose a user to edit:") - code, menuitem = self._d.menu(users_string1, choices=self._dmenu_list_to_choices(menu_list), cancel=_(u"Save and Continue"), height=19) - if code != self._DLG_OK: - #if self._d.yesno("Do you want to save changes?") == self._DLG_YES: - tmpusers = [] - for user in users: - tmpusers.append(users[user]) - try: - self._install_profile.set_users(tmpusers) - except: - self._d.msgbox(_(u"ERROR! Could not set the additional users!")) - break - menuitem = menu_list[int(menuitem)-1] - if menuitem == _(u"Add user"): - code, newuser = self._d.inputbox(_(u"Enter the username for the new user")) - if code != self._DLG_OK: - continue - if newuser in users: - self._d.msgbox(_(u"A user with that name already exists")) - continue - match = False - while not match: - code, passwd1 = self._d.passwordbox(_(u"Enter the new password for user %s. (will not be echoed)") % newuser) - code, passwd2 = self._d.passwordbox(_(u"Enter the new password again for confirmation")) - if code == self._DLG_OK: - if passwd1 != passwd2: - self._d.msgbox(_(u"The passwords do not match! Please try again.")) - else: - match = True - else: - self._d.msgbox(_(u"You must enter a password for the user! Even a blank password will do. You can always edit it again later from the menu.")); - #Create the entry for the new user - new_user = [newuser, GLIUtility.hash_password(passwd1), ('users',), '/bin/bash', '/home/' + newuser, '', ''] - users[newuser] = new_user - menuitem = newuser - while 1: - menulist = [_(u"Password"), _(u"Group Membership"), _(u"Shell"), _(u"Home Directory"), _(u"UID"), _(u"Comment"), _(u"Delete")] - code, menuitem2 = self._d.menu(_(u"Choose an option for user ") + menuitem, choices=self._dmenu_list_to_choices(menulist), cancel=_(u"Back")) - if code != self._DLG_OK: - break - menuitem2 = menulist[int(menuitem2)-1] - if menuitem2 == _(u"Password"): - code, passwd1 = self._d.passwordbox(_(u"Enter the new password")) - if code != self._DLG_OK: - continue - code, passwd2 = self._d.passwordbox(_(u"Enter the new password again")) - if code != self._DLG_OK: - continue - if passwd1 != passwd2: - self._d.msgbox(_(u"The passwords do not match! Try again.")) - continue - self._d.msgbox(_(u"Password saved. Press Enter to continue.")) - users[menuitem][1] = GLIUtility.hash_password(passwd1) - elif menuitem2 == _(u"Group Membership"): - prechk = users[menuitem][2] - choice_list = [("users", _(u"The usual group for normal users."), int("users" in prechk)), - ("wheel", _(u"Allows users to attempt to su to root."), int("wheel" in prechk)), - ("audio", _(u"Allows access to audio devices."), int("audio" in prechk)), - ("games", _(u"Allows access to games."), int("games" in prechk)), - ("apache", _(u"For users who know what they're doing only."), int("apache" in prechk)), - ("cdrom", _(u"For users who know what they're doing only."), int("cdrom" in prechk)), - ("ftp", _(u"For users who know what they're doing only."), int("ftp" in prechk)), - ("video", _(u"For users who know what they're doing only."), int("video" in prechk)), - (_(u"Other"), _(u"Manually specify your groups in a comma-separated list."), 0)] - users_string2 = _(u"Select which groups you would like the user %s to be in." % menuitem) - code, group_list = self._d.checklist(users_string2, choices=choice_list, height=19, list_height=10, width=77) - if code != self._DLG_OK: - break - groups = "" - for group in group_list: - groups += group + "," - if groups: - groups = groups[:-1] - if _(u"Other") in group_list: - code, groups = self._d.inputbox(_(u"Enter a comma-separated list of groups the user is to be in"), init=",".join(users[menuitem][2])) - if code != self._DLG_OK: continue - users[menuitem][2] = string.split(groups, ",") - elif menuitem2 == _(u"Shell"): - code, shell = self._d.inputbox(_(u"Enter the shell you want the user to use. default is /bin/bash. "), init=users[menuitem][3]) - if code != self._DLG_OK: - continue - users[menuitem][3] = shell - elif menuitem2 == _(u"Home Directory"): - code, homedir = self._d.inputbox(_(u"Enter the user's home directory. default is /home/username. "), init=users[menuitem][4]) - if code != self._DLG_OK: - continue - users[menuitem][4] = homedir - elif menuitem2 == _(u"UID"): - code, uid = self._d.inputbox(_(u"Enter the user's UID. If left blank the system will choose a default value (this is recommended)."), init=users[menuitem][5], height=11, width=55) - if code != self._DLG_OK: - continue - if type(uid) != int: - continue - users[menuitem][5] = uid - elif menuitem2 == _(u"Comment"): - code, comment = self._d.inputbox(_(u"Enter the user's comment. This is completely optional."), init=users[menuitem][6]) - if code != self._DLG_OK: - continue - users[menuitem][6] = comment - elif menuitem2 == _(u"Delete"): - #Reset the Yes/No buttons - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - if self._d.yesno(_(u"Are you sure you want to delete the user ") + menuitem + "?") == self._DLG_YES: - del users[menuitem] - break - - - def save_install_profile(self, xmlfilename="", askforfilename=True): - code = 0 - filename = xmlfilename - if askforfilename: - code, filename = self._d.inputbox(_(u"Enter a filename for the XML file. Use full path!"), init=xmlfilename) - if code != self._DLG_OK or not filename: - return None - if GLIUtility.is_file(filename): - if not self._d.yesno(_(u"The file %s already exists. Do you want to overwrite it?") % filename) == self._DLG_YES: - return None - try: - configuration = open(filename ,"w") - configuration.write(self._install_profile.serialize()) - configuration.close() - except: - self._d.msgbox(_(u"Error. File couldn't be saved. It will be saved automatically to /tmp before the install.")) - return filename - def show_settings(self): - settings = _(u"Look carefully at the following settings to check for mistakes.\nThese are the installation settings you have chosen:\n\n") - #Partitioning - settings += _(u"Partitioning: \n Key: Minor, Pri/Ext, Filesystem, MkfsOpts, Mountpoint, MountOpts, Size.\n") - devices = self._install_profile.get_partition_tables() - drives = devices.keys() - drives.sort() - for drive in drives: - settings += _(u" Drive: ") + drive + devices[drive].get_model() + "\n" - partlist = devices[drive].get_ordered_partition_list() - tmpparts = devices[drive] #.get_partitions() - for part in partlist: - tmppart = tmpparts[part] - entry = " " - if tmppart.get_type() == "free": - #partschoice = "New" - entry += _(u" - Unallocated space (") - if tmppart.is_logical(): - entry += _(u"logical, ") - entry += str(tmppart.get_mb()) + "MB)" - elif tmppart.get_type() == "extended": - entry += str(int(tmppart.get_minor())) - entry += _(u" - Extended Partition (") + str(tmppart.get_mb()) + "MB)" - else: - entry += str(int(tmppart.get_minor())) + " - " - if tmppart.is_logical(): - entry += _(u"Logical (") - else: - entry += _(u"Primary (") - entry += tmppart.get_type() + ", " - entry += (tmppart.get_mkfsopts() or "none") + ", " - entry += (tmppart.get_mountpoint() or "none") + ", " - entry += (tmppart.get_mountopts() or "none") + ", " - entry += str(tmppart.get_mb()) + "MB)" - settings += entry + "\n" - - #Network Mounts: - network_mounts = copy.deepcopy(self._install_profile.get_network_mounts()) - settings += _(u"\nNetwork Mounts: \n") - for mount in network_mounts: - settings += " "+mount['host']+":"+mount['export']+"\n" - - #Install Stage: - settings += _(u"\nInstall Stage: ") + str(self._install_profile.get_install_stage()) + "\n" - if self._install_profile.get_dynamic_stage3(): - settings += _(u" Tarball will be generated on the fly from the CD.\n") - else: - settings += _(u" Tarball URI: ") + self._install_profile.get_stage_tarball_uri() + "\n" - - #Portage Tree Sync Type: - settings += _(u"\nPortage Tree Sync Type: ") + self._install_profile.get_portage_tree_sync_type() + "\n" - if self._install_profile.get_portage_tree_sync_type() == "snapshot": - settings += _(u" Portage snapshot URI: ") + self._install_profile.get_portage_tree_snapshot_uri() + "\n" - - #Kernel Settings: - settings += _(u"\nKernel Settings:\n") - settings += _(u" Kernel Sources: ") + self._install_profile.get_kernel_source_pkg() + "\n" - if self._install_profile.get_kernel_source_pkg() != "livecd-kernel": - settings += _(u" Kernel Build Method: ") + self._install_profile.get_kernel_build_method() + "\n" - if self._install_profile.get_kernel_build_method() == "genkernel": - settings += _(u" Kernel Bootsplash Option: ") + str(self._install_profile.get_kernel_bootsplash()) + "\n" - if self._install_profile.get_kernel_config_uri(): - settings += _(u" Kernel Configuration URI: ") + self._install_profile.get_kernel_config_uri() + "\n" - - #Bootloader Settings: - settings += _(u"\nBootloader Settings:\n") - settings += _(u" Bootloader package: ") + self._install_profile.get_boot_loader_pkg() + "\n" - if self._install_profile.get_boot_loader_pkg() != "none": - settings += _(u" Install bootloader to MBR: ") + str(self._install_profile.get_boot_loader_mbr()) + "\n" - settings += _(u" Bootloader kernel arguments: ") +self._install_profile.get_bootloader_kernel_args() + "\n" - - #Timezone: - settings += _(u"\nTimezone: ") + self._install_profile.get_time_zone() + "\n" - - #Networking Settings: - settings += _(u"\nNetworking Settings: \n") - interfaces = self._install_profile.get_network_interfaces() - for iface in interfaces: - if interfaces[iface][0] == 'dhcp': - settings += " " + iface + _(u": Settings: DHCP. Options: ") + interfaces[iface][1] + "\n" - else: - settings += " " + iface + _(u"IP: ") + interfaces[iface][0] + _(u" Broadcast: ") + interfaces[iface][1] + _(u" Netmask: ") + interfaces[iface][2] + "\n" - default_gateway = self._install_profile.get_default_gateway() - if default_gateway: - settings += _(u" Default Gateway: ") + default_gateway[0] + "/" + default_gateway[1] + "\n" - settings += _(u" Hostname: ") + self._install_profile.get_hostname() + "\n" - if self._install_profile.get_domainname(): - settings += _(u" Domainname: ") +self._install_profile.get_domainname() + "\n" - if self._install_profile.get_nisdomainname(): - settings += _(u" NIS Domainname: ") +self._install_profile.get_nisdomainname() + "\n" - if self._install_profile.get_dns_servers(): - for dns_server in self._install_profile.get_dns_servers(): - settings += _(u" DNS Server: ") +dns_server + "\n" - if self._install_profile.get_http_proxy(): - settings += _(u" HTTP Proxy: ") +self._install_profile.get_http_proxy() + "\n" - if self._install_profile.get_ftp_proxy(): - settings += _(u" FTP Proxy: ") +self._install_profile.get_ftp_proxy() + "\n" - if self._install_profile.get_rsync_proxy(): - settings += _(u" RSYNC Proxy: ") +self._install_profile.get_rsync_proxy() + "\n" - - #Cron Daemon: - settings += _(u"\nCron Daemon: ") + self._install_profile.get_cron_daemon_pkg() + "\n" - - #Logger: - settings += _(u"\nLogging Daemon: ") + self._install_profile.get_logging_daemon_pkg() + "\n" - - #Extra packages: - if self._install_profile.get_install_packages(): - install_packages = self._install_profile.get_install_packages() - else: - install_packages = [] - settings += _(u"\nExtra Packages: ") - for package in install_packages: - settings += package + " " - settings += "\n" - #Services: - if self._install_profile.get_services(): - services = self._install_profile.get_services() - else: - services = [] - settings += _(u"\nAdditional Services: ") - for service in services: - settings += service + " " - settings += "\n" - - #Other Configuration Settings (rc.conf): - #Make.conf Settings: - settings += _(u"\nConfiguration Files Settings:\n") - etc_files = self._install_profile.get_etc_files() - for etc_file in etc_files: - settings += _(u" File:") + etc_file + "\n" - if isinstance(etc_files[etc_file], dict): - for name in etc_files[etc_file]: - settings += _(u" Variable: ") + name + _(u" Value: ") + etc_files[etc_file][name] + "\n" - else: - for entry in etc_files[etc_file]: - settings += _(u" Value: ")+ entry + "\n" - - #Additional Users: - settings += _(u"\nAdditional Users:\n") - users = {} - for user in self._install_profile.get_users(): - users[user[0]] = (user[0], user[1], user[2], user[3], user[4], user[5], user[6]) - for user in users: - settings += _(u" Username: ") + user - settings += _(u"\n Group Membership: ") + string.join(users[user][2], ",") - settings += _(u"\n Shell: ") + users[user][3] - settings += _(u"\n Home Directory: ") + users[user][4] - if users[user][5]: - settings += _(u"\n User Id: ") + users[user][5] - if users[user][6]: - settings += _(u"\n User Comment: ") + users[user][6] - - self._d.scrollbox(settings, height=20, width=77, title=_(u"A Review of your settings")) diff --git a/src/GLIInstallProfile.py b/src/GLIInstallProfile.py index 36f3187..4d26d12 100644 --- a/src/GLIInstallProfile.py +++ b/src/GLIInstallProfile.py @@ -27,13 +27,13 @@ import xml.sax import os import GLIUtility import SimpleXMLParser +import Partitioning import xml.dom.minidom -import GLIStorageDevice from GLIException import * import gettext try: - gettext.install('install-profile', './languages') - translator = gettext.translation('install-profile', './languages') + gettext.install('GLIInstallProfile', './languages') + translator = gettext.translation('GLIInstallProfile', './languages') _ = translator.gettext except: _ = gettext.gettext @@ -65,7 +65,7 @@ class InstallProfile: self._bootloader_kernel_args = "" self._kernel_initrd = True self._kernel_bootsplash = False - self._kernel_source_pkg = "livecd-kernel" + self._kernel_source_pkg = "gentoo-sources" self._users = [] self._root_pass_hash = "" self._time_zone = "UTC" @@ -79,12 +79,11 @@ class InstallProfile: self._ftp_proxy = "" self._rsync_proxy = "" self._nisdomainname = "" - self._partition_tables = {} + self._mounts = [] self._network_mounts = [] self._temp_partition_table = [] self._network_interfaces = {} self._make_conf = {} -# self._rc_conf = {} self._install_rp_pppoe = False self._install_pcmcia_cs = False self._dns_servers = () @@ -98,7 +97,12 @@ class InstallProfile: self._temp_etc_file = {} self._dynamic_stage3 = False self._install_distcc = False + self._do_recommended_partitioning = "" #For fully-automated installs only. + self._yes_iam_sure = False #For use with do_recommended_partitioning only. + self._verbose = False self.xmldoc = "" + # This is the root mount point + self._root_mount_point = "/mnt/gentoo" # Parser handler calls. For each XML attribute and children of that attribute, a handler is needed. self._parser = SimpleXMLParser.SimpleXMLParser() @@ -120,7 +124,6 @@ class InstallProfile: self._parser.addHandler('gli-profile/install-distcc', self.set_install_distcc) self._parser.addHandler('gli-profile/install-packages', self.set_install_packages) self._parser.addHandler('gli-profile/install-pcmcia-cs', self.set_install_pcmcia_cs) - self._parser.addHandler('gli-profile/install-rp-pppoe', self.set_install_rp_pppoe) self._parser.addHandler('gli-profile/install-stage', self.set_install_stage) self._parser.addHandler('gli-profile/kernel-bootsplash', self.set_kernel_bootsplash) self._parser.addHandler('gli-profile/kernel-build-method', self.set_kernel_build_method) @@ -129,23 +132,24 @@ class InstallProfile: self._parser.addHandler('gli-profile/kernel-modules', self.set_kernel_modules) self._parser.addHandler('gli-profile/kernel-source', self.set_kernel_source_pkg) self._parser.addHandler('gli-profile/logging-daemon', self.set_logging_daemon_pkg) -# self._parser.addHandler('gli-profile/make-conf/variable', self.make_conf_add_var) + self._parser.addHandler('gli-profile/mounts/mount', self.add_mount, call_on_null=True) self._parser.addHandler('gli-profile/mta', self.set_mta_pkg) self._parser.addHandler('gli-profile/network-interfaces/device', self.add_network_interface) self._parser.addHandler('gli-profile/network-mounts/netmount', self.add_netmount, call_on_null=True) self._parser.addHandler('gli-profile/nisdomainname', self.set_nisdomainname) - self._parser.addHandler('gli-profile/partitions/device', self.add_partitions_device, call_on_null=True) - self._parser.addHandler('gli-profile/partitions/device/partition', self.add_partitions_device_partition, call_on_null=True) self._parser.addHandler('gli-profile/portage-snapshot', self.set_portage_tree_snapshot_uri) self._parser.addHandler('gli-profile/portage-tree-sync', self.set_portage_tree_sync_type) self._parser.addHandler('gli-profile/post-install-script-uri', self.set_post_install_script_uri) -# self._parser.addHandler('gli-profile/rc-conf/variable', self.rc_conf_add_var) + self._parser.addHandler('gli-profile/recommended-partitioning', self.set_do_recommended_partitioning) + self._parser.addHandler('gli-profile/root-mount-point', self.set_root_mount_point) self._parser.addHandler('gli-profile/root-pass-hash', self.set_root_pass_hash) self._parser.addHandler('gli-profile/rsync-proxy', self.set_rsync_proxy) self._parser.addHandler('gli-profile/services', self.set_services) self._parser.addHandler('gli-profile/stage-tarball', self.set_stage_tarball_uri) self._parser.addHandler('gli-profile/time-zone', self.set_time_zone) self._parser.addHandler('gli-profile/users/user', self.add_user) + self._parser.addHandler('gli-profile/yes-iam-sure', self.set_yes_iam_sure) + self._parser.addHandler('gli-profile/verbose', self.set_verbose) ## # Parses the given filename populating the client_configuration. @@ -157,8 +161,8 @@ class InstallProfile: # This method serializes the configuration data and output a nice XML document. # NOTE: this method currently does not serialize: _partition_tables or _kernel_modules def serialize(self): - xmltab = { 'boot-device': self.get_boot_device, - 'bootloader': self.get_boot_loader_pkg, + xmltab = { 'boot-device': self.get_boot_device, + 'bootloader': self.get_boot_loader_pkg, 'bootloader-mbr': self.get_boot_loader_mbr, 'bootloader-kernel-args': self.get_bootloader_kernel_args, 'cron-daemon': self.get_cron_daemon_pkg, @@ -170,10 +174,9 @@ class InstallProfile: 'http-proxy': self.get_http_proxy, 'install-distcc': self.get_install_distcc, 'install-pcmcia-cs': self.get_install_pcmcia_cs, - 'install-rp-pppoe': self.get_install_rp_pppoe, 'install-stage': self.get_install_stage, 'kernel-bootsplash': self.get_kernel_bootsplash, - 'kernel-build-method': self.get_kernel_build_method, + 'kernel-build-method': self.get_kernel_build_method, 'kernel-config': self.get_kernel_config_uri, 'kernel-initrd': self.get_kernel_initrd, 'kernel-source': self.get_kernel_source_pkg, @@ -183,10 +186,14 @@ class InstallProfile: 'portage-snapshot': self.get_portage_tree_snapshot_uri, 'portage-tree-sync': self.get_portage_tree_sync_type, 'post-install-script-uri': self.get_post_install_script_uri, + 'recommended-partitioning': self.get_do_recommended_partitioning, + 'root-mount-point': self.get_root_mount_point, 'root-pass-hash': self.get_root_pass_hash, 'rsync-proxy': self.get_rsync_proxy, 'stage-tarball': self.get_stage_tarball_uri, 'time-zone': self.get_time_zone, + 'yes-iam-sure': self.get_yes_iam_sure, + 'verbose': self.get_verbose, } self.xmldoc = "<?xml version=\"1.0\"?>" self.xmldoc += "<gli-profile>" @@ -200,11 +207,9 @@ class InstallProfile: self.serialize_dns_servers() self.serialize_install_packages() self.serialize_kernel_modules() -# self.serialize_make_conf() + self.serialize_mounts() self.serialize_network_interfaces() self.serialize_network_mounts() - self.serialize_partition_tables() -# self.serialize_rc_conf() self.serialize_services() self.serialize_users() self.serialize_etc_files() @@ -385,6 +390,25 @@ class InstallProfile: self.xmldoc += string.join(self.get_dns_servers(), ' ') self.xmldoc += "</dns-servers>" + ################################################################### + ## + # Set whether or not to automatically run do_recommended() on install. + # This is for fully-automated installs. Takes a value of the drive to partition. + # @param xml_path Used internally by the XML parser. Should be None when calling directly + # @param do_recommended_partitioning string of the DRIVE to partition. + # @param xml_attr not used here + def set_do_recommended_partitioning(self, xml_path, do_recommended, xml_attr): + if type(do_recommended) != str: + raise GLIException("DoRecommendedPartitioning", 'fatal', 'set_do_recommended_partitioning', "Input must be a string!") + + self._do_recommended_partitioning = do_recommended + + ## + # Returns the drive to run with do_recommended() on install + def get_do_recommended_partitioning(self): + return self._do_recommended_partitioning + + ############################################################################ #### Domainname @@ -584,80 +608,77 @@ class InstallProfile: def get_install_package_list(self): install_package_list = { 'Desktop': (_(u"Popular Desktop Applications"), - {"audacious": _(u"GTK+ music player"), - "easytag": _(u"A GTK+ tagging program for MP3, OGG, FLAC, and more"), - "evolution": _(u"A GNOME groupware application, a Microsoft Outlook workalike"), - "gaim": _(u"GTK+ Instant Messenger client"), - "gftp": _(u"GTK+ FTP Client"), - "gimp": _(u"GNU Image Manipulation Program"), - "gnomebaker": _(u"GNOME CD Writing Software"), - "gtkam": _(u"GTK+ application for transferring pictures from a digital camera"), - "inkscape": _(u"A SVG based generic vector-drawing program"), - "k3b": _(u"KDE CD Writing Software"), - "koffice": _(u"An integrated office suite for KDE, the K Desktop Environment"), - "mozilla": _(u"The Mozilla Suite"), - "mozilla-firefox": _(u"The Mozilla Firefox Web Browser"), - "mozilla-thunderbird": _(u"Thunderbird Mail Client"), - "mplayer": _(u"Media Player for Linux"), - "openoffice": _(u"OpenOffice.org, a full office productivity suite."), - "openoffice-bin": _(u"Same as OpenOffice but a binary package (no compiling!)"), - "pan": _(u"GTK news reader"), - "rhythmbox": _(u"Music management and playback software for GNOME"), - "seamonkey": _(u"Open replacement for the Mozilla Suite"), - "sylpheed": _(u"A light weight email client and news reader"), - "sylpheed-claws": _(u"A light weight email client and news reader"), - "vlc": _(u"VLC media player - Video player and streamer"), - "xchat": _(u"GTK+ Graphical IRC Client"), - "xine-ui": _(u"Xine movie player"), - "xmms": _(u"X MultiMedia System") }), + {"media-sound/audacious": _(u"GTK+ music player"), + "media-sound/easytag": _(u"A GTK+ tagging program for MP3, OGG, FLAC, and more"), + "mail-client/evolution": _(u"A GNOME groupware application, a Microsoft Outlook workalike"), + "net-im/gaim": _(u"GTK+ Instant Messenger client"), + "net-ftp/gftp": _(u"GTK+ FTP Client"), + "media-gfx/gimp": _(u"GNU Image Manipulation Program"), + "app-cdr/gnomebaker": _(u"GNOME CD Writing Software"), + "media-gfx/gtkam": _(u"GTK+ application for transferring pictures from a digital camera"), + "media-gfx/inkscape": _(u"A SVG based generic vector-drawing program"), + "app-cdr/k3b": _(u"KDE CD Writing Software"), + "app-office/koffice": _(u"An integrated office suite for KDE, the K Desktop Environment"), + "www-client/mozilla-firefox": _(u"The Mozilla Firefox Web Browser"), + "mail-client/mozilla-thunderbird": _(u"Thunderbird Mail Client"), + "media-video/mplayer": _(u"Media Player for Linux"), + "app-office/openoffice": _(u"OpenOffice.org, a full office productivity suite."), + "app-office/openoffice-bin": _(u"Same as OpenOffice but a binary package (no compiling!)"), + "net-nntp/pan": _(u"GTK news reader"), + "media-sound/rhythmbox": _(u"Music management and playback software for GNOME"), + "www-client/seamonkey": _(u"Open replacement for the Mozilla Suite"), + "mail-client/sylpheed": _(u"A light weight email client and news reader"), + "mail-client/sylpheed-claws": _(u"A light weight email client and news reader"), + "media-video/vlc": _(u"VLC media player - Video player and streamer"), + "net-irc/xchat": _(u"GTK+ Graphical IRC Client"), + "media-video/xine-ui": _(u"Xine movie player") }), 'Servers': (_(u"Applications often found on servers."), - {"apache": _(u"Apache Web Server"), - "cups": _(u"The Common Unix Printing System"), - "exim": _(u"A highly configurable, drop-in replacement for sendmail"), - "iptables": _(u"Linux kernel (2.4+) firewall, NAT and packet mangling tools"), - "mod_php": _(u"Apache module for PHP"), - "mysql": _(u"A fast, multi-threaded, multi-user SQL database server"), - "php": _(u"The PHP scripting language"), - "postfix": _(u"A fast and secure drop-in replacement for sendmail"), - "postgresql": _(u"sophisticated Object-Relational DBMS"), - "proftpd": _(u"ProFTP Server"), - "samba": _(u"SAMBA client/server programs for UNIX"), - "sendmail": _(u"Widely-used Mail Transport Agent (MTA)"), }), + {"net-www/apache": _(u"Apache Web Server"), + "net-print/cups": _(u"The Common Unix Printing System"), + "mail-mta/exim": _(u"A highly configurable, drop-in replacement for sendmail"), + "net-firewall/iptables": _(u"Linux kernel (2.4+) firewall, NAT and packet mangling tools"), + "dev-db/mysql": _(u"A fast, multi-threaded, multi-user SQL database server"), + "dev-lang/php": _(u"The PHP scripting language"), + "mail-mta/postfix": _(u"A fast and secure drop-in replacement for sendmail"), + "dev-db/postgresql": _(u"sophisticated Object-Relational DBMS"), + "net-ftp/proftpd": _(u"ProFTP Server"), + "net-fs/samba": _(u"SAMBA client/server programs for UNIX"), + "mail-mta/sendmail": _(u"Widely-used Mail Transport Agent (MTA)"), }), 'X11': (_(u"Window managers and X selection."), - {"gnome": _(u"The Gnome Desktop Environment"), - "kde-meta": _(u"The K Desktop Environment"), - "blackbox": _(u"A small, fast, full-featured window manager for X"), - "enlightenment": _(u"Enlightenment Window Manager"), - "fluxbox": _(u"Fluxbox is an X11 window manager featuring tabs and an iconbar"), - "icewm": _(u"IceWM is designed for speed, size, and simplicity"), - "windowmaker": _(u"Windowmaker is a window manager featuring the look and feel of NEXTSTEP"), - "xfce4": _(u"XFCE Desktop Environment"), - "xorg-x11": _(u"An X11 implementation maintained by the X.Org Foundation") }), + {"gnome-base/gnome": _(u"The Gnome Desktop Environment"), + "kde-base/kde-meta": _(u"The K Desktop Environment"), + "x11-wm/blackbox": _(u"A small, fast, full-featured window manager for X"), + "x11-wm/enlightenment": _(u"Enlightenment Window Manager"), + "x11-wm/fluxbox": _(u"Fluxbox is an X11 window manager featuring tabs and an iconbar"), + "x11-wm/icewm": _(u"IceWM is designed for speed, size, and simplicity"), + "x11-wm/windowmaker": _(u"Windowmaker is a window manager featuring the look and feel of NEXTSTEP"), + "xfce-base/xfce4": _(u"XFCE Desktop Environment"), + "x11-base/xorg-x11": _(u"An X11 implementation maintained by the X.Org Foundation") }), 'Misc': (_(u"Miscellaneous Applications you may want."), - {"bittorrent": _(u"tool for distributing files via a distributed network of nodes"), - "bluefish": _(u"GTK+ Web IDE"), - "emacs": _(u"An incredibly powerful, extensible text editor"), - "gkrellm": _(u"Single process stack of various system monitors"), - "gvim": _(u"GUI version of the Vim text editor"), - "keychain": _(u"ssh-agent manager"), - "logrotate": _(u"Rotates, compresses, and mails system logs"), - "ntp": _(u"Network Time Protocol suite/programs"), - "rdesktop": _(u"A Remote Desktop Protocol Client"), - "slocate": _(u"Secure way to index and quickly search for files on your system"), - "traceroute": _(u"Utility to trace the route of IP packets"), - "ufed": _(u"Gentoo Linux USE flags editor"), - "vim": _(u"Vim, an improved vi-style text editor"), - "wireshark": _(u"A commercial-quality network protocol analyzer") }), + {"net-p2p/bittorrent": _(u"tool for distributing files via a distributed network of nodes"), + "app-editors/bluefish": _(u"GTK+ Web IDE"), + "app-editors/emacs": _(u"An incredibly powerful, extensible text editor"), + "app-admin/gkrellm": _(u"Single process stack of various system monitors"), + "app-editors/gvim": _(u"GUI version of the Vim text editor"), + "net-misc/keychain": _(u"ssh-agent manager"), + "app-admin/logrotate": _(u"Rotates, compresses, and mails system logs"), + "net-misc/ntp": _(u"Network Time Protocol suite/programs"), + "net-misc/rdesktop": _(u"A Remote Desktop Protocol Client"), + "sys-apps/slocate": _(u"Secure way to index and quickly search for files on your system"), + "net-analyzer/traceroute": _(u"Utility to trace the route of IP packets"), + "app-portage/ufed": _(u"Gentoo Linux USE flags editor"), + "app-editors/vim": _(u"Vim, an improved vi-style text editor"), + "net-analyzer/wireshark": _(u"A commercial-quality network protocol analyzer") }), 'Recommended': (_(u"Applications recommended by the GLI Team."), - {"anjuta": _(u"A versatile IDE for GNOME"), - "chkrootkit": _(u"a tool to locally check for signs of a rootkit"), - "crack-attack": _(u"Addictive OpenGL-based block game"), - "gnupg": _(u"The GNU Privacy Guard, a GPL PGP replacement"), - "net-snmp": _(u"Software for generating and retrieving SNMP data"), - "netcat": _(u"the network swiss army knife"), - "nmap": _(u"A utility for network exploration or security auditing"), - "screen": _(u"full-screen window manager that multiplexes between several processes"), - "xpdf": _(u"An X Viewer for PDF Files") }) + {"dev-util/anjuta": _(u"A versatile IDE for GNOME"), + "app-forensics/chkrootkit": _(u"a tool to locally check for signs of a rootkit"), + "games-arcade/crack-attack": _(u"Addictive OpenGL-based block game"), + "app-crypt/gnupg": _(u"The GNU Privacy Guard, a GPL PGP replacement"), + "net-analyzer/net-snmp": _(u"Software for generating and retrieving SNMP data"), + "net-analyzer/netcat": _(u"the network swiss army knife"), + "net-analyzer/nmap": _(u"A utility for network exploration or security auditing"), + "app-misc/screen": _(u"full-screen window manager that multiplexes between several processes"), + "app-text/xpdf": _(u"An X Viewer for PDF Files") }) } return install_package_list @@ -715,27 +736,7 @@ class InstallProfile: def get_install_pcmcia_cs(self): return self._install_pcmcia_cs - ############################################################################ - #### RP-PPPoE Installation - - ## - # Tell the installer whether or not to install the rp-pppoe package - # @param xml_path Used internally by the XML parser. Should be None when calling directly - # @param install_rp_pppoe boolean - # @param xml_attr Parameter description - def set_install_rp_pppoe(self, xml_path, install_rp_pppoe, xml_attr): - if type(install_rp_pppoe) != bool: - if type(install_rp_pppoe) == str: - install_rp_pppoe = GLIUtility.strtobool(install_rp_pppoe) - else: - raise GLIException("InstallRP_PPPOE", 'fatal', 'set_install_rp_pppoe', "Invalid input!") - - self._install_rp_pppoe = install_rp_pppoe - ## - # Return the boolean value of _install_rp_pppoe - def get_install_rp_pppoe(self): - return self._install_rp_pppoe ############################################################################ #### Install Stage @@ -973,6 +974,50 @@ class InstallProfile: self.xmldoc += "</make-conf>" + + + ############################################################################ + #### Mounts + + ## + # Mounts used during the installation and for fstab and bootloader config. + # @param xml_path Used internally by the XML parser. Should be None when calling directly + # @param unused Parameter description + # @param attr Parameter description + def add_mount(self, xml_path, unused, attr): + mount_entry = {'devnode': '', 'mountopts': '', 'mountpoint': '', 'type': ''} + if type(attr) == tuple: + netmount_entry['devnode'] = attr[0] + netmount_entry['mountopts'] = attr[1] + netmount_entry['mountpoint'] = attr[2] + netmount_entry['type'] = attr[3] + else: + if "devnode" in attr.getNames(): + for attrName in attr.getNames(): + mount_entry[attrName] = str(attr.getValue(attrName)) + self._mounts.append(mount_entry) + + ## + # Sets Mounts given a mounts found probably in the config file. Not sure if used. + # @param netmounts Parameter description + def set_mounts(self, mounts): + self._mounts = mounts + + ## + # Returns the mounts. + def get_mounts(self): + return self._mounts + + ## + # Serializes mounts + def serialize_mounts(self): + if self.get_mounts() != {}: + mounts = self.get_mounts() + self.xmldoc += "<mounts>" + for mount in mounts: + self.xmldoc += "<mount devnode=\"%s\" type=\"%s\" mountpoint=\"%s\" mountopts=\"%s\" />" % (mount['devnode'], mount['type'], mount['mountpoint'], mount['mountopts']) + self.xmldoc += "</mounts>" + ############################################################################ #### MTA Selection @@ -1160,172 +1205,7 @@ class InstallProfile: def get_nisdomainname(self): return self._nisdomainname - ############################################################################ - #### Partitioning - ## - # FIXME: agaffney - # @param xml_path Used internally by the XML parser. Should be None when calling directly - # @param unused Parameter description - # @param attr Parameter description - def add_partitions_device(self, xml_path, unused, attr): - devnode = None - if type(attr) == tuple: - devnode = attr[0] - disklabel = attr[1] - else: - if "devnode" in attr.getNames(): - devnode = str(attr.getValue("devnode")) - if "disklabel" in attr.getNames(): - disklabel = str(attr.getValue("disklabel")) - else: - disklabel = "" - self._partition_current_device = devnode - self._partition_tables[devnode] = GLIStorageDevice.Device(devnode) - self._partition_tables[devnode].set_disklabel(disklabel) - self._partition_tables[devnode].set_partitions_from_install_profile_structure(self._temp_partition_table) - self._temp_partition_table = [] - - ## - # FIXME: agaffney - # @param xml_path Used internally by the XML parser. Should be None when calling directly - # @param unused Parameter description - # @param attr Parameter description - def add_partitions_device_partition(self, xml_path, unused, attr): - part_entry = {'end': 0, 'format': None, 'mb': 0, 'minor': 0, 'mountopts': '', 'mountpoint': '', 'origminor': '', 'start': 0, 'type': ''} -# if type(attr) == tuple: -# part_entry['end'] = attr[0] -# part_entry['format'] = attr[1] -# part_entry['mb'] = attr[2] -# part_entry['minor'] = attr[3] -# part_entry['mountopts'] = attr[4] -# part_entry['mountpoint'] = attr[5] -# part_entry['origminor'] = attr[6] -# part_entry['start'] = attr[7] -# part_entry['type'] = attr[8] -# else: - if "minor" in attr.getNames(): - for attrName in attr.getNames(): - part_entry[attrName] = str(attr.getValue(attrName)) - if type(part_entry['format']) == str: part_entry['format'] = GLIUtility.strtobool(part_entry['format']) - if type(part_entry['resized']) == str: part_entry['resized'] = GLIUtility.strtobool(part_entry['resized']) -# if GLIUtility.is_numeric(part_entry['end']): part_entry['end'] = long(part_entry['end']) -# if GLIUtility.is_numeric(part_entry['start']): part_entry['start'] = long(part_entry['start']) - if GLIUtility.is_numeric(part_entry['mb']): part_entry['mb'] = long(part_entry['mb']) - if GLIUtility.is_numeric(part_entry['minor']): -# if part_entry['type'] == "free": - part_entry['minor'] = float(part_entry['minor']) - if int(part_entry['minor']) == part_entry['minor']: - part_entry['minor'] = int(part_entry['minor']) - if GLIUtility.is_numeric(part_entry['origminor']): part_entry['origminor'] = int(part_entry['origminor']) - self._temp_partition_table.append(part_entry) - - ############################################################################ - #### Partition Tables - - ## - # Sets the partition Tables - # @param partition_tables multilevel dictionary described below. - def set_partition_tables(self, partition_tables): - """ - Sets the partition tables. A partition is a multi level dictionary in the following format: - { <device (local)>: <partition table>, <device (nfs)>: <mount point> } - - <device (local)> is a string containing the path to the local file. (ie. '/dev/hda') - <device (nfs)> is a string containing the ip address of the nfs mount. (ie. '192.168.1.2') - - <partition table> is a dictionary in the following format: - { <minor>: { 'mb': <size in mb>, 'type': <type>, 'mountpoint': <mount point>, 'start': <start cylinder>, - 'end': <end cylinder>, 'mountopts': <mount options>, 'format': <format> } } - - ie. partition_tables['/dev/hda'][1] would return { 'mb': 0, 'type': 'ext3', 'mountpoint': '/boot', 'start': 12345, - 'end': 34567, 'mountopts': 'auto', format: 'False' } - - Types are as follows: - string: <device>, <mount point>, <mount options>, <type> - integer: <minor>, <size in mb>, <start cylinder>, <end cylinder> - boolean: <format> - - Current <type> options include: - ext2, ext3, reiserfs, xfs, jfs, linux-swap, extended, others? - - There will be a method in the partitioning code to make sure that the current parition_tables can actually be implemented. - Should we call that function to test the culpability of our potential partitioning scheme? - Should we create a method in the Controller to take raw variables and put them in the proper structure? - Are all filesystems supported by all arches? - """ - - # All the sanity checks are being commented out until I can fix them for the GLIStorageDevice stuff - """ - if type(partition_tables) != dict: - raise GLIException("PartitionTableError", 'fatal', 'set_partition_tables', "Invalid data type! partition_tables is a dict...") - - for device in partition_tables: - - # If the device is a valid local device... - if GLIUtility.is_device(device): - - # We should check to make sure device is in /proc/partitions - # If it is in /proc/partitions, it is a partitionable device - - # ... then loop through each minor to check data - for minor in partition_tables[device]: - - # Make sure that the <minor> is an integer or can be converted to one - try: - int(minor) - except: - raise GLIException("ParitionTableError", 'fatal', 'set_partition_tables', "The minor you specified (" + minor + ") is not an integer!") - - # Make sure that a minor number is valid - if minor < 1: - raise GLIException("ParitionTableError", 'fatal', 'set_partition_tables', "The minor you specified (" + minor + ") is not a valid minor!") - - # Make sure that <size>, <type> and <mount point> are all set - #if len(partition_tables[device][minor]) != 3: - # raise GLIException("ParitionTableError", 'fatal', 'set_partition_tables', "The number of attributes for minor " + minor + " is incorrect!") - # - # Make sure that the <size> is an integer or can be converted to one - #try: - # int(partition_tables[device][minor][0]) - #except: - # raise GLIException("ParitionTableError", 'fatal', 'set_partition_tables', "The size you specified (" + partition_tables[device][minor][0] + ") is not an integer!") - - # Else, if the device is a valid remote device (hostname or ip) - elif GLIUtility.is_ip(device) or GLIUtility.is_hostname(device): - - pass - # Make sure that only the mount point is set - # if type(partition_tables[device]) != str: - # raise GLIException("ParitionTableError", 'fatal', 'set_partition_tables', "Invalid mount point for nfs mount (device: " + device + ")!") - - # If the device is not a local or remote device, then it is invalid - else: - raise GLIException("PartitionTableError", 'fatal', 'set_partition_tables', "The device you specified (" + device + ") is not valid!") - """ - - # If all the tests clear, then set the variable - self._partition_tables = partition_tables - - ## - # Returns partition_tables - def get_partition_tables(self): - return self._partition_tables - - ## - # Serializes partition tables - def serialize_partition_tables(self): - if self.get_partition_tables() != {}: - partitions = self.get_partition_tables() - self.xmldoc += "<partitions>"; - for device in partitions.keys(): - self.xmldoc += "<device devnode=\"%s\" disklabel=\"%s\">" % (device, partitions[device].get_disklabel()) - ips = partitions[device].get_install_profile_structure() - for part in ips: -# part = ips[minor] - self.xmldoc += "<partition minor=\"%s\" origminor=\"%s\" mb=\"%s\" type=\"%s\" mountpoint=\"%s\" mountopts=\"%s\" format=\"%s\" mkfsopts=\"%s\" resized=\"%s\" />" % (str(part['minor']), str(part['origminor']), str(part['mb']), str(part['type']), str(part['mountpoint']), str(part['mountopts']), str(part['format']), str(part['mkfsopts']), str(part['resized'])) - self.xmldoc += "</device>" - self.xmldoc += "</partitions>" ############################################################################ #### Portage Snapshot URI @@ -1433,6 +1313,22 @@ class InstallProfile: self.xmldoc += "</rc-conf>" ############################################################################ + #### Root Mount Point For New System + + ## + # Sets the root_mount_point for the new system to be installed to + # @param xml_path not used here. + # @param root_mount_point new location for the root mount point + # @param xml_attr not used here. + def set_root_mount_point(self, xml_path, root_mount_point, xml_attr): + self._root_mount_point = root_mount_point + + ## + # Returns the root_mount_point + def get_root_mount_point(self): + return self._root_mount_point + + ############################################################################ #### Root Password Hash ## @@ -1677,3 +1573,34 @@ class InstallProfile: self.xmldoc += "<user %s>%s</user>" % (string.strip(attrstr), username) self.xmldoc += "</users>" + + ## + # Sets the special additional check for do_recommended as a safeguard to make + # sure people don't accidentally trash their drives. + # @param xml_path not used here. + # @param yes_iam_sure flag. boolean. + # @param xml_attr not used here. + def set_yes_iam_sure(self, xml_path, yes_iam_sure, xml_attr): + if type(yes_iam_sure) == str: + yes_iam_sure = GLIUtility.strtobool(yes_iam_sure) + self._yes_iam_sure = yes_iam_sure + + ## + # Returns the yes_iam_sure flag. For use with do_recommended + def get_yes_iam_sure(self): + return self._yes_iam_sure + + ## + # Sets the Verbose mode (DEBUG mode) + # @param xml_path not used here. + # @param verbose flag. boolean. + # @param xml_attr not used here. + def set_verbose(self, xml_path, verbose, xml_attr): + if type(verbose) == str: + verbose = GLIUtility.strtobool(verbose) + self._verbose = verbose + + ## + # Returns the verbose (DEBUG) flag + def get_verbose(self): + return self._verbose diff --git a/src/GLIPortage.py b/src/GLIPortage.py index 7a36942..29d20bc 100644 --- a/src/GLIPortage.py +++ b/src/GLIPortage.py @@ -16,29 +16,23 @@ from GLIException import GLIException class GLIPortage(object): - def __init__(self, chroot_dir, grp_install, logger, debug, cc, compile_logfile): + def __init__(self, chroot_dir, logger, debug, cc, compile_logfile): self._chroot_dir = chroot_dir - self._grp_install = grp_install self._logger = logger self._debug = debug self._cc = cc self._compile_logfile = compile_logfile - def get_deps(self, pkgs): + def get_deps(self, pkgs, grp_install=False): pkglist = [] if isinstance(pkgs, str): pkgs = pkgs.split() for pkg in pkgs: if not pkg: continue if self._debug: self._logger.log("get_deps(): pkg is " + pkg) - if not self._grp_install or not self.get_best_version_vdb(pkg): + if not grp_install or not self.get_best_version_vdb(pkg): if self._debug: self._logger.log("get_deps(): grabbing compile deps") - GLIUtility.spawn("emerge -p " + pkg + r" >/tmp/deplist", chroot=self._chroot_dir) - blockers = GLIUtility.spawn(r"grep '^\[blocks ' /tmp/deplist | cut -d ']' -f2 | sed -e 's:^ \+::'", chroot=self._chroot_dir, return_output=True)[1].strip() - if blockers: - blockers = blockers.split("\n") - raise GLIException("GetDepListError", 'fatal', 'get_deps', "There were blockers while calculating deps:\n\n %s" % ("\n ".join(blockers))) - tmppkglist = GLIUtility.spawn(r"grep -e '^\[[a-z]' /tmp/deplist | cut -d ']' -f2 | sed -e 's:^ ::' -e 's: .\+$::'", chroot=self._chroot_dir, return_output=True)[1].strip().split("\n") + tmppkglist = GLIUtility.spawn("emerge -p " + pkg + r" 2>/dev/null | grep -e '^\[[a-z]' | cut -d ']' -f2 | sed -e 's:^ ::' -e 's: .\+$::'", chroot=self._chroot_dir, return_output=True)[1].strip().split("\n") else: if self._debug: self._logger.log("get_deps(): grabbing binary deps") # The runtimedeps.py script generates a package install order that is *very* different from emerge itself @@ -77,13 +71,36 @@ class GLIPortage(object): entries.sort() return entries + def update_counter(self): + try: + counter_f = open(self._chroot_dir + "/var/cache/edb/counter", "r") + counter = int(counter_f.readline().strip()) + counter_f.close() + except: + counter = 0 + counter += 1 + if not os.path.isdir(self._chroot_dir + "/var"): + os.mkdir(self._chroot_dir + "/var", 0755) + if not os.path.isdir(self._chroot_dir + "/var/cache"): + os.mkdir(self._chroot_dir + "/var/cache", 0755) + if not os.path.isdir(self._chroot_dir + "/var/cache/edb"): + os.mkdir(self._chroot_dir + "/var/cache/edb", 0775) + # chown to root:portage + try: + counter_f = open(self._chroot_dir + "/var/cache/edb/counter", "w") + counter_f.write(str(counter)) + counter_f.close() + except: + raise GLIException("UpdateCounterError", 'fatal', 'update_counter', "could not write new counter value") + return counter + def copy_pkg_to_chroot(self, package, use_root=False, ignore_missing=False): -# symlinks = { '/bin': '/mnt/livecd/bin/', '/boot': '/mnt/livecd/boot/', '/lib': '/mnt/livecd/lib/', -# '/opt': '/mnt/livecd/opt/', '/sbin': '/mnt/livecd/sbin/', '/usr': '/mnt/livecd/usr/', -# '/etc/gconf': '/usr/livecd/gconf/' } + symlinks = { '/bin': '/mnt/livecd/bin/', '/boot': '/mnt/livecd/boot/', '/lib': '/mnt/livecd/lib/', + '/opt': '/mnt/livecd/opt/', '/sbin': '/mnt/livecd/sbin/', '/usr': '/mnt/livecd/usr/', + '/etc/gconf': '/usr/livecd/gconf/' } tmpdir = "/var/tmp" - image_dir = tmpdir + "/portage/" + package.split("/")[1] + "/image" + image_dir = tmpdir + "/portage/" + package + "/image" root_cmd = "" tmp_chroot_dir = self._chroot_dir portage_tmpdir = "/var/tmp" @@ -138,6 +155,17 @@ class GLIPortage(object): if not GLIUtility.exitsuccess(GLIUtility.spawn("mkdir -p " + self._chroot_dir + "/var/db/pkg/" + package + " && cp -a /var/db/pkg/" + package + "/* " + self._chroot_dir + "/var/db/pkg/" + package, logfile=self._compile_logfile, append_log=True)): raise GLIException("CopyPackageToChrootError", 'fatal', 'copy_pkg_to_chroot', "Could not copy vdb entry for " + package) + # Update COUNTER + if self._debug: self._logger.log("DEBUG: copy_pkg_to_chroot(): calling update_counter() to get updated COUNTER value for " + package) + counter = self.update_counter() + try: + if self._debug: self._logger.log("DEBUG: copy_pkg_to_chroot(): updating COUNTER value (%s) in vdb entry for %s" % (self._chroot_dir + "/var/db/pkg/" + package + "/COUNTER", package)) + counter_f = open(self._chroot_dir + "/var/db/pkg/" + package + "/COUNTER", "w") + counter_f.write(str(counter)) + counter_f.close() + except: + raise GLIException("CopyPackageToChrootError", 'fatal', 'copy_pkg_to_chroot', "Could not update COUNTER for " + package) + # Create the image dir in the chroot if self._debug: self._logger.log("DEBUG: copy_pkg_to_chroot(): running 'mkdir -p " + self._chroot_dir + image_dir + "'") if not GLIUtility.exitsuccess(GLIUtility.spawn("mkdir -p " + self._chroot_dir + image_dir, logfile=self._compile_logfile, append_log=True)): @@ -173,11 +201,11 @@ class GLIPortage(object): if self._debug: self._logger.log("DEBUG: copy_pkg_to_chroot(): found the following directories: " + str(dirlist)) if not dirlist or dirlist[0] == "": raise GLIException("CopyPackageToChrootError", 'fatal', 'copy_pkg_to_chroot', "directory list entry for " + package + "...this shouldn't happen!") - for tmpdir in dirlist: - dirstat = os.stat(tmpdir) - if self._debug: self._logger.log("DEBUG: copy_pkg_to_chroot(): setting mode " + str(dirstat[0]) + " and uid/gid " + str(dirstat[4]) + "/" + str(dirstat[5]) + " for directory " + self._chroot_dir + image_dir + tmpdir) - os.chown(self._chroot_dir + image_dir + tmpdir, dirstat[4], dirstat[5]) - os.chmod(self._chroot_dir + image_dir + tmpdir, dirstat[0]) + for dir in dirlist: + dirstat = os.stat(dir) + if self._debug: self._logger.log("DEBUG: copy_pkg_to_chroot(): setting mode " + str(dirstat[0]) + " and uid/gid " + str(dirstat[4]) + "/" + str(dirstat[5]) + " for directory " + self._chroot_dir + image_dir + dir) + os.chown(self._chroot_dir + image_dir + dir, dirstat[4], dirstat[5]) + os.chmod(self._chroot_dir + image_dir + dir, dirstat[0]) # # More symlink crappiness hacks # for symlink in symlinks: @@ -230,7 +258,9 @@ class GLIPortage(object): expr = re.compile('^=?(.+?/.+?)(-\d.+)?$') res = expr.match(package) if res: - GLIUtility.spawn("echo " + res.group(1) + " >> " + self._chroot_dir + "/var/lib/portage/world") + world_f = open(self._chroot_dir + "/var/lib/portage/world", "a") + world_f.write(res.group(1) + "\n") + world_f.close() def get_best_version_vdb(self, package): if package.startswith('='): @@ -255,17 +285,17 @@ class GLIPortage(object): # def get_best_version_tree(self, package): # return portage.best(tree.match(package)) - def emerge(self, packages, add_to_world=True): + def emerge(self, packages, grp_install=False, add_to_world=True): if isinstance(packages, str): packages = packages.split() self._cc.addNotification("progress", (0, "Calculating dependencies for " + " ".join(packages))) - pkglist = self.get_deps(packages) + pkglist = self.get_deps(packages, grp_install) if self._debug: self._logger.log("install_packages(): pkglist is " + str(pkglist)) for i, pkg in enumerate(pkglist): if not pkg: continue if self._debug: self._logger.log("install_packages(): processing package " + pkg) self._cc.addNotification("progress", (float(i) / len(pkglist), "Emerging " + pkg + " (" + str(i+1) + "/" + str(len(pkglist)) + ")")) - if not self._grp_install or not self.get_best_version_vdb("=" + pkg): + if not grp_install or not self.get_best_version_vdb("=" + pkg): status = GLIUtility.spawn("emerge -1 =" + pkg, display_on_tty8=True, chroot=self._chroot_dir, logfile=self._compile_logfile, append_log=True) # status = self._emerge("=" + pkg) if not GLIUtility.exitsuccess(status): @@ -387,7 +417,7 @@ if __name__ == "__main__": if not gliportage.get_best_version_vdb(pkg): print "Package " + pkg + " is not available for install from the LiveCD" continue - pkglist = gliportage.get_deps(pkg) + pkglist = gliportage.get_deps(pkg, True) for i, tmppkg in enumerate(pkglist): print "Copying " + tmppkg + " (" + str(i+1) + "/" + str(len(pkglist)) + ")" gliportage.copy_pkg_to_chroot(tmppkg) diff --git a/src/GLIStorageDevice.py b/src/GLIStorageDevice.py deleted file mode 100644 index bcf1c56..0000000 --- a/src/GLIStorageDevice.py +++ /dev/null @@ -1,936 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. - -import commands, string, os, parted -from glob import glob -from GLIException import * -import GLIUtility - -MEGABYTE = 1024 * 1024 - -# these are here so that we can change them easily in future -# the values were chosen to represent perfect floating point representations -FREE_MINOR_FRAC_PRI = 1.0/32.0 -FREE_MINOR_FRAC_LOG = 1.0/8.0 - -supported_filesystems = { - 'all': ( 'ext2', 'ext3', 'linux-swap', 'xfs', 'jfs', 'reiserfs' ), - 'x86': ( 'ntfs', 'fat16', 'fat32' ), - 'amd64': ( 'ntfs', 'fat16', 'fat32' ), - 'ppc': ( 'reiserfs', 'apple_bootstrap', 'hfs' ) -} - -labelinfo = { - 'msdos': { 'ignoredparts': [], 'extended': True }, - 'mac': { 'ignoredparts': [1], 'extended': False }, - 'sun': { 'ignoredparts': [3], 'extended': False }, - 'loop': { 'ignoredparts': [], 'extended': False } -} - -archinfo = { - 'sparc': 'sun', - 'hppa': 'msdos', - 'x86': 'msdos', - 'amd64': 'msdos', - 'ppc': 'mac' -} - -## -# This class provides a partitioning abstraction for the frontends -class Device: - "Class representing a partitionable device." - - _device = None - _partitions = None - _geometry = None - _total_bytes = 0 - _total_sectors = 0 - _cylinder_bytes = 0 - _sectors_in_cylinder = 0 - _parted_dev = None - _parted_disk = None - _sector_bytes = 0 - _total_mb = 0 - _arch = None - _disklabel = None - - ## - # Initialization function for Device class - # @param device Device node (e.g. /dev/hda) of device being represented - # @param arch Architecture that we're partition for (defaults to 'x86' for now) - def __init__(self, device, arch="x86", set_geometry=True, local_device=True): - self._device = device - self._partitions = [] - self._geometry = {'cylinders': 0, 'heads': 0, 'sectors': 0, 'sectorsize': 512} - self._total_bytes = 0 - self._cylinder_bytes = 0 - self._arch = arch - self._local_device = local_device - if self._local_device: - self._parted_dev = parted.PedDevice.get(self._device) - try: - self._parted_disk = parted.PedDisk.new(self._parted_dev) - except: - self._parted_disk = self._parted_dev.disk_new_fresh(parted.disk_type_get(archinfo[self._arch])) - self._disklabel = self._parted_disk.type.name - else: - self._disklabel = archinfo[self._arch] - self._labelinfo = labelinfo[self._disklabel] - if set_geometry: - self.set_disk_geometry_from_disk() - - def __getitem__(self, name): - return self.get_partition(name) - - def __iter__(self): - for part in self.get_ordered_partition_list(): - yield part - - ## - # Returns list of supported filesystems based on arch - def get_supported_filesystems(self): - return supported_filesystems['all'] + supported_filesystems[self._arch] - - ## - # Sets disk geometry info from disk. This function is used internally by __init__() - def set_disk_geometry_from_disk(self): - self._total_bytes = self._parted_dev.length * self._parted_dev.sector_size - self._geometry['heads'], self._geometry['sectors'], self._geometry['cylinders'] = self._parted_dev.heads, self._parted_dev.sectors, self._parted_dev.cylinders - self._sector_bytes = self._parted_dev.sector_size - self._cylinder_bytes = self._geometry['heads'] * self._geometry['sectors'] * self._sector_bytes - self._total_sectors = self._parted_dev.length - self._sectors_in_cylinder = self._geometry['heads'] * self._geometry['sectors'] - self._total_mb = long(self._total_bytes / MEGABYTE) - - ## - # Sets partition info from disk. - def set_partitions_from_disk(self): - parted_part = self._parted_disk.next_partition() - while parted_part: - part_mb = long((parted_part.geom.end - parted_part.geom.start + 1) * self._sector_bytes / MEGABYTE) - if not part_mb and parted_part.type_name != "free": - part_mb = 1 - # Ignore metadata "partitions"...this will need to be changed for non-x86 - if parted_part.num in self._labelinfo['ignoredparts']: - parted_part = self._parted_disk.next_partition(parted_part) - continue - elif parted_part.num >= 1: - fs_type = "" - if parted_part.fs_type: - fs_type = parted_part.fs_type.name - if fs_type == "hfs" and parted_part.is_flag_available(1) and parted_part.get_flag(1): - fs_type = "apple_bootstrap" - else: - # Add additional partition identification code here - pass - if parted_part.type == 2: fs_type = "extended" - part_name = "" - if self._parted_disk.type.check_feature(parted.DISK_TYPE_PARTITION_NAME): - part_name = parted_part.get_name() - self._partitions.append(Partition(self, parted_part.num, part_mb, parted_part.geom.start, parted_part.geom.end, fs_type, format=False, existing=True, name=part_name)) - elif parted_part.type_name == "free": - if self._disklabel == "mac": - free_minor = int(GLIUtility.spawn("mac-fdisk -l %s | grep '@ %s' | cut -d ' ' -f 1" % (self._device, str(parted_part.geom.start)), return_output=True)[1].strip()[-1]) - elif self.get_extended_partition() and parted_part.geom.start >= self.get_partition(self.get_extended_partition()).get_start() and parted_part.geom.end <= self.get_partition(self.get_extended_partition()).get_end(): - if self._partitions[-1].get_minor() > 4: - free_minor = self._partitions[-1].get_minor() + FREE_MINOR_FRAC_LOG - else: - free_minor = 4 + FREE_MINOR_FRAC_LOG - else: - try: - free_minor = self._partitions[-1].get_minor() + FREE_MINOR_FRAC_PRI - except IndexError: - free_minor = FREE_MINOR_FRAC_PRI - self._partitions.append(Partition(self, free_minor, part_mb, parted_part.geom.start, parted_part.geom.end, "free", format=False, existing=False)) - parted_part = self._parted_disk.next_partition(parted_part) - # Juggle minor numbers so they match physical disk order. People may complain, but we're actually doing them a favor - # This is apparently bad to do when you just want to see the disk info -# self.reorder_minors() - - ## - # Reorders partition minors so that they match physical disk order - def reorder_minors(self): - for i, part in enumerate(self._partitions): - if not i: - last_minor = 0 - else: - last_minor = self._partitions[i-1].get_minor() - if part.get_type() == "free": - if self._disklabel == "mac": - new_minor = last_minor + 1 - elif last_minor and part.is_logical(): - if self.get_partition(last_minor).is_extended(): - last_minor = 4 - new_minor = last_minor + FREE_MINOR_FRAC_LOG - else: - new_minor = last_minor + FREE_MINOR_FRAC_PRI - part.set_minor(new_minor) - else: - if not last_minor: - new_minor = 1 - else: - if part.is_logical() and self.get_partition(last_minor).is_extended(): - last_minor = 4 - new_minor = int(last_minor) + 1 - part.set_minor(new_minor) - - ## - # Imports partition info from the install profile partition structure - # @param ips Parameter structure returned from install_profile.get_partition_tables() - def set_partitions_from_install_profile_structure(self, ips): - for tmppart in ips: - existing = False - if tmppart['origminor'] and not tmppart['format']: - existing = True - self._partitions.append(Partition(self, tmppart['minor'], tmppart['mb'], tmppart['start'], tmppart['end'], tmppart['type'], format=tmppart['format'], origminor=tmppart['origminor'], existing=existing, mountpoint=tmppart['mountpoint'], mountopts=tmppart['mountopts'], mkfsopts=tmppart['mkfsopts'], resized=(existing and tmppart['resized']))) - - ## - # Returns the partition object with the specified minor - # @param minor Minor number of partition object to get - def get_partition(self, minor): - for part in self._partitions: - if part.get_minor() == minor: - return part - return None - - def get_partition_position(self, minor): - for i, part in enumerate(self._partitions): - if part.get_minor() == minor: - return i - return -1 - - ## - # Returns name of device (e.g. /dev/hda) being represented - def get_device(self): - return self._device - - ## - # Returns whether the device is local or not - def is_local(self): - return self._local_device - - ## - # Uses magic to apply the recommended partition layout - def do_recommended(self): - free_minor = 0 - recommended_parts = [ { 'type': "ext2", 'size': 100, 'mountpoint': "/boot" }, - { 'type': "linux-swap", 'size': 512, 'mountpoint': "" }, - { 'type': "ext3", 'size': "*", 'mountpoint': "/" } ] - to_create = [] - physical_memory = int(GLIUtility.spawn(r"free -m | egrep '^Mem:' | sed -e 's/^Mem: \+//' -e 's/ \+.\+$//'", return_output=True)[1].strip()) -# parts = self.get_ordered_partition_list() - # Search for concurrent unallocated space >=4GB - for part in self._partitions: - if part.get_type() == "free" and part.get_mb() >= 4096: - free_minor = part.get_minor() - break - if not free_minor: - raise GLIException("RecommendedPartitionLayoutError", "notice", "do_recommended", "You do not have atleast 4GB of concurrent unallocated space. Please remove some partitions and try again.") - remaining_free = self.get_partition(free_minor).get_mb() - for newpart in recommended_parts: - # extended/logical partitions suck like a hoover - if self._labelinfo['extended'] and free_minor == (3 + FREE_MINOR_FRAC_PRI) and not newpart == recommended_parts[-1]: - if self.get_extended_partition(): - raise GLIException("RecommendedPartitionLayoutError", "notice", "do_recommended", "This code is not yet robust enough to handle automatic partitioning with your current layout.") - to_create.append({ 'type': "extended", 'size': remaining_free, 'mountpoint': "", 'free_minor': free_minor }) - free_minor = 4 + FREE_MINOR_FRAC_LOG - newpart['free_minor'] = free_minor - # Small hack to calculate optimal swap partition size - if newpart['type'] == "linux-swap" and physical_memory and physical_memory < 1024: - newpart['size'] = physical_memory * 2 - to_create.append(newpart) - free_minor = free_minor + 1 - if not newpart['size'] == "*": - remaining_free = remaining_free - newpart['size'] - for newpart in to_create: - if newpart['size'] == "*": - # This doesn't seem quite right...it should probably be set to remaining_free -# newpart['size'] = self.get_partition(newpart['free_minor']).get_mb() - newpart['size'] = remaining_free - self.add_partition(newpart['free_minor'], newpart['size'], 0, 0, newpart['type'], mountpoint=newpart['mountpoint']) - - def find_free_minor(self, min, max): - good_minor = max - for i in range(int(max) - 1, int(min) - 1, -1): - if not self.get_partition(i): - good_minor = i -# print "min = %s, max = %s, good_minor = %s" % (str(min), str(max), str(good_minor)) - return good_minor - - ## - # Combines free space and closes gaps in minor numbers. This is used internally - def tidy_partitions(self): - newparts = [] - for i, part in enumerate(self._partitions): - if part.get_type() == "free": - if i and newparts[-1].get_type() == "free": - newparts[-1].set_mb(newparts[-1].get_mb()+part.get_mb()) -# self._partitions.pop(i) - continue - else: - if self._disklabel == "mac": - part.set_minor(self.find_free_minor(newparts[-1].get_minor() + 1, part.get_minor())) - elif self._labelinfo['extended'] and part.get_minor() > 4: - last_minor = newparts[-1].get_minor() - if last_minor <= 4: last_minor = 4 - part.set_minor(last_minor + FREE_MINOR_FRAC_LOG) - else: - if i: - free_minor = newparts[-1].get_minor() + FREE_MINOR_FRAC_PRI - else: - free_minor = FREE_MINOR_FRAC_PRI - part.set_minor(free_minor) - else: - if self._labelinfo['extended'] and part.get_minor() > 4: - part.set_minor(self.find_free_minor(5, part.get_minor())) - else: - part.set_minor(self.find_free_minor(1, part.get_minor())) - newparts.append(part) - self._partitions = newparts - self.reorder_minors() - - ## - # Adds a new partition to the partition info - # @param free_minor minor of unallocated space partition is being created in - # @param mb size of partition in MB - # @param start Start sector (only used for existing partitions) - # @param end End sector (only used for existing partitions) - # @param type Partition type (ext2, ext3, fat32, linux-swap, free, extended, etc.) - # @param mountpoint='' Partition mountpoint - # @param mountopts='' Partition mount options - # @param mkfsopts='' Additional mkfs options - def add_partition(self, free_minor, mb, start, end, type, mountpoint='', mountopts='',mkfsopts=''): - # Automatically pick the first unused minor if not a local device - if not self._local_device or free_minor == -1: - tmpminor = self._partitions[-1].get_minor() - if self._disklabel == "mac": - free_minor = tmpminor + 1 - elif self._labelinfo['extended'] and tmpminor > 4: - free_minor = tmpminor + FREE_MINOR_FRAC_LOG - else: - free_minor = tmpminor + FREE_MINOR_FRAC_PRI - self._partitions.append(Partition(self, free_minor, mb, 0, 0, "free")) - if self._disklabel == "mac": - new_minor = free_minor - else: - new_minor = int(free_minor) + 1 - free_minor_pos = self.get_partition_position(free_minor) - if self._local_device: - # Check to see if the new minor we picked already exists. If it does, scoot all partitions from - # that one on down a minor - if self.get_partition(new_minor): - for i, part in enumerate(self._partitions): - if i <= free_minor_pos or new_minor > part.get_minor(): continue - part.set_minor(part.get_minor() + 1) - # If the size specified for the new partition is less than the size of the unallocated space that it - # is getting placed into, a new partition to represent the remaining unallocated space needs to be - # created. - if mb != self.get_partition(free_minor).get_mb(): - old_free_mb = self.get_partition(free_minor).get_mb() - self._partitions.pop(free_minor_pos) - if self._disklabel == "mac": - free_minor = new_minor + 1 - if self.get_partition(free_minor): - for i, part in enumerate(self._partitions): - if i < self.get_partition_position(new_minor+1) or free_minor > part.get_minor(): continue - part.set_minor(part.get_minor() + 1) - if self._labelinfo['extended'] and new_minor > 4: - free_minor = new_minor + FREE_MINOR_FRAC_LOG - else: - free_minor = new_minor + FREE_MINOR_FRAC_PRI - self._partitions.insert(free_minor_pos, Partition(self, free_minor, old_free_mb-mb, 0, 0, "free")) - else: - self._partitions.pop(free_minor_pos) - self._partitions.insert(free_minor_pos, Partition(self, new_minor, mb, start, end, type, mountpoint=mountpoint, mountopts=mountopts,mkfsopts=mkfsopts)) - # When we create an extended partition, we have to create the partition to represent the unallocated - # space inside of the extended partition - if type == "extended": - self._partitions.insert(self.get_partition_position(self.get_extended_partition()) + 1, Partition(self, (4 + FREE_MINOR_FRAC_LOG), mb, 0, 0, "free")) - new_minor_pos = self.get_partition_position(new_minor) - self.tidy_partitions() - return self._partitions[new_minor_pos].get_minor() - - ## - # Removes partition from partition info - # @param minor Minor of partition to remove - def remove_partition(self, minor): - part = self.get_partition(minor) - part_pos = self.get_partition_position(minor) - free_minor = 0 - if self._disklabel == "mac": - free_minor = minor - elif part.is_logical(): - free_minor = int(minor-1)+FREE_MINOR_FRAC_LOG - else: - free_minor = int(minor-1)+FREE_MINOR_FRAC_PRI - if part.get_type() == "extended": - # Remove free partition inside extended - self._partitions.pop(part_pos+1) - self._partitions[part_pos] = Partition(self, free_minor, part.get_mb(), 0, 0, "free", format=False, existing=False) - self.tidy_partitions() - - ## - # This function clears the partition table - def clear_partitions(self): - self._partitions = [ Partition(self, (0 + FREE_MINOR_FRAC_PRI), self.get_total_mb(), 0, 0, "free", format=False, existing=False) ] - self._disklabel = archinfo[self._arch] - - ## - # Returns an ordered list (disk order) of partition minors - def get_ordered_partition_list(self): - partlist = [] - for part in self._partitions: - partlist.append(part.get_minor()) - return partlist - - ## - # Returns partition info in a format suitable for passing to install_profile.set_partition_tables() - def get_install_profile_structure(self): - devlist = [] - for tmppart in self._partitions: -# tmppart = self._partitions[part] - devlist.append({ 'mb': tmppart.get_mb(), 'minor': float(tmppart.get_minor()), 'origminor': tmppart.get_orig_minor(), 'type': tmppart.get_type(), 'mountpoint': tmppart.get_mountpoint(), 'mountopts': tmppart.get_mountopts(), 'format': tmppart.get_format(), 'mkfsopts': tmppart.get_mkfsopts(), 'start': tmppart._start, 'end': tmppart._end, 'resized': tmppart.get_resized() }) - return devlist - - ## - # Returns the minor of the extended partition, if any - def get_extended_partition(self): - for part in self._partitions: - if part.is_extended(): - return part.get_minor() - return 0 - - ## - # Returns the drive model - def get_model(self): - if self._local_device: - return self._parted_dev.model - else: - return "Generic disk" - - ## - # Sets the disklabel type - def set_disklabel(self, disklabel): - self._disklabel = disklabel - - ## - # Returns the disklabel type - def get_disklabel(self): - return self._disklabel - - ## - # Returns the number of sectors on the device - def get_num_sectors(self): - return long(self._total_sectors) - - ## - # Returns the size of a cylinder in bytes - def get_cylinder_size(self): - return long(self._cylinder_bytes) - - ## - # Returns the size of a sector in bytes - def get_sector_size(self): - return long(self._sector_bytes) - - ## - # Returns the number of cylinders - def get_num_cylinders(self): - return long(self._geometry['cylinders']) - - ## - # Returns the total number of bytes on the device - def get_drive_bytes(self): - return long(self._total_bytes) - - ## - # Returns the total number of MB on the device - def get_total_mb(self): - if self._local_device: - return self._total_mb - else: - total_mb = 0 - for tmppart in self._partitions: - total_mb += tmppart.get_mb() - return total_mb - - ## - # Returns partition info dictionary - def get_partitions(self): - return self._partitions - -## -# This class represents a partition within a GLIStorageDevice object -class Partition: - "Class representing a single partition within a Device object" - - _device = None - _minor = 0 - _orig_minor = 0 - _start = 0 - _end = 0 - _type = None - _mountpoint = None - _mountopts = None - _format = None - _resizeable = None - _min_mb_for_resize = 0 - _mb = "" - _mkfsopts = None - _resized = False - _name = None - - ## - # Initialization function for the Partition class - # @param device Parent GLIStorageDevice object - # @param minor Minor of partition - # @param mb Parameter Size of partition in MB - # @param start Parameter Start sector of partition - # @param end Parameter Start sector of partition - # @param type Parameter Type of partition (ext2, ext3, fat32, linux-swap, free, extended, etc.) - # @param mountpoint='' Mountpoint of partition - # @param mountopts='' Mount options of partition - # @param mkfsopts='' Additional mkfs options - # @param format=True Format partition - # @param existing=False This partition exists on disk - def __init__(self, device, minor, mb, start, end, type, mountpoint='', mountopts='', format=True, existing=False, origminor=0, mkfsopts='', resized=False, name=""): - self._device = device - self._minor = float(minor) - self._start = long(start) - self._end = long(end) - self._type = type or "unknown" - self._mountpoint = mountpoint - self._mountopts = mountopts - self._format = format - self._mb = mb - self._orig_minor = origminor - self._mkfsopts = mkfsopts - self._resizeable = False - self._resized = resized - self._name = name - self._flags = [] - if type != "free": - if existing and not origminor: - self._orig_minor = self._minor - self._minor = int(self._minor) - self._orig_minor = int(self._orig_minor) - if existing: - try: - parted_part = device._parted_disk.get_partition(self._orig_minor) - label_type = device._parted_disk.type.name - if label_type == "loop": - dev_node = device._device - else: - dev_node = device._device + str(self._orig_minor) - # The 10 is completely arbitrary. If flags seem to be missed, this number should be increased - for flag in range(0, 10): - if parted_part.is_flag_available(flag) and parted_part.get_flag(flag): - self._flags.append(flag) - if type == "ext2" or type == "ext3": - block_size = long(string.strip(commands.getoutput("dumpe2fs -h " + dev_node + r" 2>&1 | grep -e '^Block size:' | sed -e 's/^Block size:\s\+//'"))) - free_blocks = long(string.strip(commands.getoutput("dumpe2fs -h " + dev_node + r" 2>&1 | grep -e '^Free blocks:' | sed -e 's/^Free blocks:\s\+//'"))) - free_bytes = long(block_size * free_blocks) - # can't hurt to pad (the +50) it a bit since this is really just a guess - self._min_mb_for_resize = self._mb - long(free_bytes / MEGABYTE) + 50 - self._resizeable = True - elif type == "ntfs": - min_bytes = long(commands.getoutput("ntfsresize -f --info " + dev_node + " | grep -e '^You might resize' | sed -e 's/You might resize at //' -e 's/ bytes or .\+//'")) - self._min_mb_for_resize = long(min_bytes / MEGABYTE) + 50 - self._resizeable = True - else: - parted_part = self._device._parted_disk.get_partition(int(self._orig_minor)) - parted_fs = parted_part.geom.file_system_open() - resize_constraint = parted_fs.get_resize_constraint() - min_bytes = resize_constraint.min_size * self._device._sector_bytes - self._min_mb_for_resize = long(min_bytes / MEGABYTE) + 1 - self._resizeable = True - except: - self._resizeable = False - - def __getitem__(self, name): - tmpdict = { 'start': self.get_start, - 'end': self.get_end, - 'format': self.get_format, - 'type': self.get_type, - 'resized': self.get_resized, - 'minor': self.get_minor, - 'mb': self.get_mb, - 'origminor': self.get_orig_minor, - 'mountpoint': self.get_mountpoint, - 'mountopts': self.get_mountopts, - 'mkfsopts': self.get_mkfsopts, - 'flags': self.get_flags, - 'devnode': self.get_devnode, - 'name': self.get_name - } - if name in tmpdict: - return tmpdict[name]() - else: - raise ValueError(name + " is not a valid attribute!") - - def __setitem__(self, name, value): - tmpdict = { 'start': self.set_start, - 'end': self.set_end, - 'format': self.set_format, - 'type': self.set_type, -# 'resized': self.set_resized, - 'minor': self.set_minor, - 'mb': self.set_mb, - 'origminor': self.set_orig_minor, - 'mountpoint': self.set_mountpoint, - 'mountopts': self.set_mountopts, - 'mkfsopts': self.set_mkfsopts, - 'flags': self.set_flags, - 'name': self.set_name - } - if name in tmpdict: - tmpdict[name](value) - else: - raise ValueError(name + " is not a valid attribute!") - - ## - # Returns the dev node that this partition will have - def get_devnode(self): - device = self._device.get_device() - if device[-1] in "0123456789": - return device + "p" + str(self.get_minor()) - else: - return device + str(self.get_minor()) - - ## - # Returns whether or not the partition is extended - def is_extended(self): - if self._type == "extended": - return True - else: - return False - - ## - # Returns whether or not the partition is logical - def is_logical(self): - if self._type == "free": - if int(self._minor) + FREE_MINOR_FRAC_LOG == self._minor: - return True - else: - return False - elif self._device._labelinfo['extended'] and self._minor > 4: - return True - else: - return False - - ## - # Returns a list of logical partitions if this is an extended partition - def get_logicals(self): - if not self.is_extended(): - return None - logicals = [] - for part in self._device._partitions: - if part.get_minor() > 4 and not part.get_type() == "free": - logicals.append(part.get_minor()) - return logicals - - ## - # Returns the extened parent partition if this is a logical partition (no longer used) - def get_extended_parent(self): - if not self.is_logical(): - return None - else: - return self._device.get_partition_at(self._start, ignore_extended=0) - - ## - # Sets the options passed to mkfs - # @param mkfsopts Options passed to mkfs - def set_mkfsopts(self, mkfsopts): - self._mkfsopts = mkfsopts - - ## - # Returns the options passes to mkfs - def get_mkfsopts(self): - return self._mkfsopts - - ## - # Sets the start sector for the partition - # @param start Start sector - def set_start(self, start): - self._start = long(start) - - ## - # Returns the start sector for the partition - def get_start(self): - return long(self._start) - - ## - # Sets the end sector of the partition - # @param end End sector - def set_end(self, end): - self._end = long(end) - - ## - # Returns end sector for the partition - def get_end(self): - return long(self._end) - - ## - # Returns size of partition in MB - def get_mb(self): - return self._mb - - ## - # Sets size of partition in MB - # @param mb Parameter description - def set_mb(self, mb): - self._mb = mb - - ## - # Sets type of partition - # @param type Parameter description - def set_type(self, type): - self._type = type - - ## - # Returns type of partition - def get_type(self): - return self._type - - ## - # Returns parent GLIStorageDevice object - def get_device(self): - return self._device - - ## - # Sets minor of partition - # @param minor New minor - def set_minor(self, minor): - self._minor = float(minor) - - ## - # Returns minor of partition - def get_minor(self): - if int(self._minor) == self._minor: - return int(self._minor) - else: - return float(self._minor) - - ## - # Sets the original minor of the partition - # @param orig_minor Parameter description - def set_orig_minor(self, orig_minor): - self._orig_minor = int(orig_minor) - - ## - # Returns the original minor of the partition - def get_orig_minor(self): - return self._orig_minor - - ## - # Sets the mountpoint for the partition - # @param mountpoint Mountpoint - def set_mountpoint(self, mountpoint): - self._mountpoint = mountpoint - - ## - # Returns the mountpoint for the partition - def get_mountpoint(self): - return self._mountpoint - - ## - # Sets the mount options for the partition - # @param mountopts Mount options - def set_mountopts(self, mountopts): - self._mountopts = mountopts - - ## - # Returns the mount options for the partition - def get_mountopts(self): - return self._mountopts - - ## - # Set whether to format the partition - # @param format Format this partition (True/False) - def set_format(self, format): - self._format = format - - ## - # Returns whether to format the partition - def get_format(self): - return self._format - - ## - # Returns whether to partition is resized - def get_resized(self): - return self._resized - - ## - # Returns whether the partition is resizeable - def is_resizeable(self): - return self._resizeable - - ## - # Sets partition flags - def set_flags(self, flags): - self._flags = flags - - ## - # Returns partition flags - def get_flags(self): - return self._flags - - ## - # Sets partition name - def set_name(self, name): - self._name = name - - ## - # Returns partition name - def get_name(self): - return self._name - - ## - # Returns minimum MB for resize - def get_min_mb_for_resize(self): -# if self.is_extended(): -# min_size = self._start -# for part in self._device._partitions: -# if part < 5: continue -# if part.get_end > min_size: min_size = part.get_end() -# return min_size -# else: - if self._resizeable: - return self._min_mb_for_resize - else: - return -1 - - ## - # Returns maximum MB for resize - def get_max_mb_for_resize(self): - if self._resizeable: - minor_pos = self._device.get_partition_position(self._minor) - try: - free_minor = self._device._partitions[minor_pos+1].get_minor() - except: - free_minor = 0 - if not free_minor or not self._device.get_partition(free_minor).get_type() == "free": return self._mb - if self._device.get_partition(free_minor).is_logical(): - if self.is_logical(): - return self._mb + self._device.get_partition(free_minor).get_mb() - else: - return self._mb - else: - return self._mb + self._device.get_partition(free_minor).get_mb() - else: - return -1 - - ## - # Resizes the partition - # @param mb New size in MB - def resize(self, mb): - minor_pos = self._device.get_partition_position(self._minor) - try: - free_minor = self._device._partitions[minor_pos+1].get_minor() - except: - free_minor = 0 - if mb < self._mb: - # Shrinking - if not free_minor or not self._device.get_partition(free_minor).get_type() == "free": - if self._device._disklabel == "mac": - free_minor = self._minor + 1 - elif self.is_logical(): - free_minor = self._minor + FREE_MINOR_FRAC_LOG - else: - free_minor = self._minor + FREE_MINOR_FRAC_PRI - if self._device.get_partition(free_minor): - for i, part in enumerate(self._device._partitions): - if i <= minor_pos or free_minor > part.get_minor(): continue - part.set_minor(part.get_minor() + 1) - self._device._partitions.insert(minor_pos+1, Partition(self._device, free_minor, self._mb - mb, 0, 0, "free", format=False, existing=False)) - else: - self._device.get_partition(free_minor).set_mb(self._device.get_partition(free_minor).get_mb() + (self._mb - mb)) - self._mb = mb - else: - if mb == self._mb + self._device.get_partition(free_minor).get_mb(): - # Using all available unallocated space - self._device._partitions.pop(self._device.get_partition_position(free_minor)) - self._mb = mb - else: - # Growing - self._device.get_partition(free_minor).set_mb(self._device.get_partition(free_minor).get_mb() - (mb - self._mb)) - self._mb = mb - self._resized = True - self._device.tidy_partitions() - -## -# Returns a list of detected partitionable devices -def detect_devices(): - devices = [] - - # Make sure sysfs exists - # TODO: rewrite for 2.4 support - if not os.path.exists("/sys/bus"): - raise GLIException("GLIStorageDeviceError", 'fatal', 'detect_devices', "no sysfs found (you MUST use a kernel >2.6)") - # Make sure /proc/partitions exists - if not os.path.exists("/proc/partitions"): - raise GLIException("GLIStorageDeviceError", 'fatal', 'detect_devices', "/proc/partitions does not exist! Please make sure procfs is in your kernel and mounted!") - - # Load /proc/partitions into the variable 'partitions' - partitions = [] - for line in open("/proc/partitions"): - tmpparts = line.split() - if len(tmpparts) < 4 or not tmpparts[0].isdigit() or not tmpparts[1].isdigit(): - continue - - # Get the major, minor and device name - major = int(tmpparts[0]) - minor = int(tmpparts[1]) - device = "/dev/" + tmpparts[3] - - # If there is no /dev/'device_name', then scan - # all the devices in /dev to try and find a - # devices with the same major and minor - if not os.path.exists(device): - device = None - for path, dirs, files in os.walk("/dev"): - for d_file in files: - full_file = os.path.join(path, d_file) - if not os.path.exists(full_file): - continue - statres = os.stat(full_file) - fmaj = os.major(statres.st_rdev) - fmin = os.minor(statres.st_rdev) - if fmaj == major and fmin == minor: - device = full_file - break - if not device: - continue - - partitions.append(( major, minor, device )) - - # Scan sysfs for the devices of type 'x' - # 'x' being a member of the list below: - # Compaq cards.../sys/block/{cciss,ida}!cXdX/dev - for dev_glob in ("/sys/bus/ide/devices/*/block*/dev", "/sys/bus/scsi/devices/*/block*/dev", "/sys/block/cciss*/dev", "/sys/block/ida*/dev"): - sysfs_devices = glob(dev_glob) - if not sysfs_devices: continue - for sysfs_device in sysfs_devices: - # Get the major and minor info - try: - major, minor = open(sysfs_device).read().split(":") - major = int(major) - minor = int(minor) - except: - raise GLIException("GLIStorageDeviceError", 'fatal', 'detect_devices', "invalid major/minor in " + sysfs_device) - - # Find a device listed in /proc/partitions - # that has the same minor and major as our - # current block device. - for record in partitions: - if major == record[0] and minor == record[1]: - devices.append(record[2]) - - # For testing the partitioning code - if GLIUtility.is_file("/tmp/disk.img"): - devices.append("/tmp/disk.img") - - # We have assembled the list of devices, so return it - return devices diff --git a/src/GLIUtility.py b/src/GLIUtility.py index fb2e8b1..1d2cf4f 100644 --- a/src/GLIUtility.py +++ b/src/GLIUtility.py @@ -277,7 +277,6 @@ def set_ip(dev, ip, broadcast, netmask): def set_default_route(route): if not is_ip(route): raise GLIException("GLIUtilityError", 'fatal', 'set_default_route', route + " is not an ip address!") - spawn("route del default gw " + route) status = spawn("route add default gw " + route) if not exitsuccess(status): @@ -303,19 +302,21 @@ def spawn(cmd, quiet=False, logfile=None, display_on_tty8=False, chroot=None, ap wrapper = open(chroot+"/var/tmp/spawn.sh", "w") wrapper.write("#!/bin/bash -l\n" + cmd + "\nexit $?\n") wrapper.close() - cmd = "chmod a+x " + chroot + "/var/tmp/spawn.sh && chroot " + chroot + " /var/tmp/spawn.sh 2>&1" - else: - cmd += " 2>&1 " + cmd = "chmod a+x " + chroot + "/var/tmp/spawn.sh && chroot " + chroot + " /var/tmp/spawn.sh" + if debug: print "Command: " + cmd output = "" + cmd = "(" + cmd + " 2>&1; echo $? > /tmp/spawn_exitcode)" if logfile: if append_log: - fd_logfile = open(logfile,'a') +# fd_logfile = open(logfile,'a') + cmd += " | tee -a " + logfile else: - fd_logfile = open(logfile,'w') +# fd_logfile = open(logfile,'w') + cmd += " | tee " + logfile if display_on_tty8: fd_tty = open('/dev/tty8','w') @@ -347,9 +348,9 @@ def spawn(cmd, quiet=False, logfile=None, display_on_tty8=False, chroot=None, ap # print "DEBUG: spawn(): data is " + str(len(data)) + " bytes long" - if logfile: - fd_logfile.write(data) -# fd_logfile.flush() +# if logfile: +# fd_logfile.write(data) +## fd_logfile.flush() if display_on_tty8: fd_tty.write(data) @@ -383,11 +384,13 @@ def spawn(cmd, quiet=False, logfile=None, display_on_tty8=False, chroot=None, ap # data = ro_pipe.readline() # close the file descriptors - if logfile: fd_logfile.close() +# if logfile: fd_logfile.close() if display_on_tty8: fd_tty.close() # close the pipe and save return value - ret = ro_pipe.close() or 0 + ro_pipe.close() + ret = int(open("/tmp/spawn_exitcode", "r").readline().strip()) + os.unlink("/tmp/spawn_exitcode") if return_output: return ret, output @@ -406,8 +409,7 @@ def exitsuccess(status): # Will produce a bash shell with a special prompt for the installer. def spawn_bash(): os.putenv("PROMPT_COMMAND","echo \"Type 'exit' to return to the installer.\"") - status = spawn("bash") - return status + os.system("reset && bash") #don't care what this returns. ## # Will download or copy a file/uri to a location @@ -908,6 +910,7 @@ def uncdata(text): return text def get_grp_pkgs_from_cd(): + """ if not is_file("/usr/livecd/grppkgs.txt"): return "" #raise GLIException("GLIUtilityError", "fatal", "get_grp_pkgs_from_cd", "Required file /usr/livecd/grppkgs.txt does not exist") @@ -918,8 +921,10 @@ def get_grp_pkgs_from_cd(): for pkg in output: results.append(pkg[(pkg.find('/')+1):]) return results + """ + return spawn(r"find /var/db/pkg -mindepth 2 -maxdepth 2 -type d | sed -e 's:^/var/db/pkg/::' -e 's:-[0-9].*$::'", return_output=True)[1].strip().split("\n") -def get_keymaps(self): +def get_keymaps(): return GLIUtility.spawn(r"find /usr/share/keymaps -iname *.map.gz | sed -e 's:^.\+/::' -e 's:\..\+$::' | sort", return_output=True)[1].strip().split("\n") def get_chosts(arch): @@ -941,3 +946,11 @@ def get_chosts(arch): if arch == "mips": chosts = ["mips-unknown-linux-gnu"] return chosts + +# Starts portmap. +def start_portmap(): + status = spawn('/etc/init.d/portmap start') #, display_on_tty8=True) + if not exitsuccess(status): + return False + else: + return True diff --git a/src/Partitioning.py b/src/Partitioning.py new file mode 100644 index 0000000..06154ff --- /dev/null +++ b/src/Partitioning.py @@ -0,0 +1,728 @@ +# Copyright 1999-2006 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import commands, string, os, parted, copy +from glob import glob +from GLIException import * +import GLIUtility +import time + +MEGABYTE = 1024 * 1024 + +supported_filesystems = { + 'all': ( 'ext2', 'ext3', 'linux-swap', 'xfs', 'jfs', 'reiserfs' ), + 'x86': ( 'ntfs', 'fat16', 'fat32' ), + 'amd64': ( 'ntfs', 'fat16', 'fat32' ), + 'ppc': ( 'reiserfs', 'apple_bootstrap', 'hfs' ) +} + +labelinfo = { + 'msdos': { 'ignoredparts': [], 'extended': True }, + 'mac': { 'ignoredparts': [1], 'extended': False }, + 'sun': { 'ignoredparts': [3], 'extended': False }, + 'loop': { 'ignoredparts': [], 'extended': False } +} + +archinfo = { + 'sparc': 'sun', + 'hppa': 'msdos', + 'x86': 'msdos', + 'amd64': 'msdos', + 'ppc': 'mac' +} + +parted_type_map = { + 'linux-swap': 'swap' +} + +## +# This class provides a partitioning abstraction for the frontends +class Device: + "Class representing a partitionable device." + + _device = None + _partitions = None + _geometry = None + _parted_dev = None + _parted_disk = None + _arch = None + _disklabel = None + _install_profile = None + + ## + # Initialization function for Device class + # @param device Device node (e.g. /dev/hda) of device being represented + # @param arch Architecture that we're partition for (defaults to 'x86' for now) + def __init__(self, device, arch, install_profile): + self._device = device + self._arch = arch + self._partitions = [] + self._geometry = {} + self._parted_dev = parted.PedDevice.get(self._device) + try: + self._parted_disk = parted.PedDisk.new(self._parted_dev) + except: + self._parted_disk = self._parted_dev.disk_new_fresh(parted.disk_type_get(archinfo[self._arch])) + self._disklabel = self._parted_disk.type.name + self._labelinfo = labelinfo[self._disklabel] + self.set_disk_geometry_from_disk() + self.set_partitions_from_disk() + self._install_profile = install_profile + + def __getitem__(self, name): + return self.get_partition(name) + + def __iter__(self): + for part in self.get_partitions(): + yield part + + ## + # Returns list of supported filesystems based on arch + def get_supported_filesystems(self): + return supported_filesystems['all'] + supported_filesystems[self._arch] + + ## + # Sets disk geometry info from disk. This function is used internally by __init__() + def set_disk_geometry_from_disk(self): + self._geometry = { + 'sector_size': self._parted_dev.sector_size, + 'total_bytes': self._parted_dev.length * self._parted_dev.sector_size, + 'heads': self._parted_dev.heads, + 'cylinders': self._parted_dev.cylinders, + 'sectors': self._parted_dev.sectors, + 'cylinder_bytes': self._parted_dev.heads * self._parted_dev.sectors * self._parted_dev.sector_size, + 'total_sectors': self._parted_dev.length, + 'sectors_in_cylinder': self._parted_dev.heads * self._parted_dev.sectors, + 'total_mb': long((self._parted_dev.length * self._parted_dev.sector_size) / MEGABYTE) + } + + ## + # Sets partition info from disk. + def set_partitions_from_disk(self): + self._partitions = [] + parted_part = self._parted_disk.next_partition() + while parted_part: + # Make sure it's a physical partition or unallocated space + if parted_part.num >= 1 or parted_part.type_name == "free": + self._partitions.append(Partition(self, parted_part)) + parted_part = self._parted_disk.next_partition(parted_part) + + ## + # Returns the partition object with the specified minor + # @param idx Index of partition object + def get_partition(self, idx): + return self._partitions[idx] + + def get_partition_idx_from_part(self, part): + for idx, tmppart in enumerate(self._partitions): + if tmppart['start'] == part['start'] and tmppart['end'] == part['end']: + return idx + else: + return -1 + + def get_partition_idx_from_minor(self, minor): + for idx, tmppart in enumerate(self._partitions): + if tmppart['minor'] == minor: + return idx + else: + return -1 + + def get_partition_idx_from_start_end(self, start, end): + for idx, tmppart in enumerate(self._partitions): + if tmppart['start'] == start and tmppart['end'] == end: + return idx + else: + return -1 + + def get_partiton_at_start(self, start): + for i, part in enumerate(self._partitions): + if part['start'] == start: + return i + return -1 + + ## + # Returns name of device (e.g. /dev/hda) being represented + def get_device(self): + return self._device + + ## + # Uses magic to apply the recommended partition layout + def do_recommended(self): + freeidx = -1 + free_part = None + remaining_free = 0 + recommended_parts = [ { 'type': "ext2", 'size': 100, 'mountpoint': '/boot', 'mountopts': 'defaults' }, + { 'type': "linux-swap", 'size': 512, 'mountpoint': 'swap', 'mountopts': 'defaults' }, + { 'type': "ext3", 'size': "*", 'mountpoint': '/', 'mountopts': 'noatime' } ] + localmounts = copy.deepcopy(self._install_profile.get_mounts()) + physical_memory = int(GLIUtility.spawn(r"free -m | egrep '^Mem:' | sed -e 's/^Mem: \+//' -e 's/ \+.\+$//'", return_output=True)[1].strip()) + self.clear_partitions() + for newpart in recommended_parts: + # Find idx of remaining unallocated space + for idx, part in enumerate(self._partitions): + # We want to ignore any "false" free space + if part['type'] == "free" and part['mb'] >= 10: + freeidx = idx + free_part = part + remaining_free = free_part['mb'] + break + # Small hack to calculate optimal swap partition size + if newpart['type'] == "linux-swap" and physical_memory: + newpart['size'] = physical_memory * 2 + if newpart['size'] > 2048: + newpart['size'] = 2048 + if newpart['size'] == "*": + newpart['size'] = remaining_free + newidx = self.add_partition(freeidx, newpart['size'], newpart['type']) + for i, mount in enumerate(localmounts): + if mount['devnode'] == self._partitions[newidx]['devnode']: + del localmounts[i] + break + localmounts.append({ 'devnode': self._partitions[newidx]['devnode'], 'type': parted_type_map.get(newpart['type'], newpart['type']), 'mountpoint': newpart['mountpoint'], 'mountopts': newpart['mountopts'] }) + self._install_profile.set_mounts(localmounts) + + def _megabytes_to_sectors(self, mb, sector_bytes=512): + return long(mb * MEGABYTE / sector_bytes) + + def _sectors_to_megabytes(self, sectors, sector_bytes=512): + return float((float(sectors) * sector_bytes)/ float(MEGABYTE)) + + ## + # Adds a new partition to the partition info + # @param freeidx minor of unallocated space partition is being created in + # @param mb size of partition in MB + # @param type Partition type (ext2, ext3, fat32, linux-swap, free, extended, etc.) + def add_partition(self, freeidx, mb, fs, mkfsopts="", pregap=0): + types = { 'primary': parted.PARTITION_PRIMARY, 'extended': parted.PARTITION_EXTENDED, 'logical': parted.PARTITION_LOGICAL } + fs_types = {} + fstype = None + try: + free_part = self._partitions[freeidx] + except: + # raise an exception here + pass + if mb > free_part['mb']: + # raise an exception here + pass + # Enumerate supported filesystem types + fs_type = parted.file_system_type_get_next() + while fs_type: + fs_types[fs_type.name] = fs_type + fs_type = parted.file_system_type_get_next(fs_type) + # apple_bootstrap is a "magic" hfs + if fs == "apple_bootstrap": + fs = "hfs" + # grab relevant parted filesystemtype object + if fs: + fstype = fs_types[fs] + # determine correct partition type + parttype = "primary" + if fs == "extended": + fstype = None + parttype = "extended" + elif free_part.is_logical(): + parttype = "logical" + # figure out start/end sectors + start = free_part['start'] + self._megabytes_to_sectors(pregap) + end = start + self._megabytes_to_sectors(mb) + parted_newpart = self._parted_disk.partition_new(types[parttype], fstype, start, end) + constraint = self._parted_disk.dev.constraint_any() + self._parted_disk.add_partition(parted_newpart, constraint) + self._parted_disk.commit() + self.set_partitions_from_disk() + if parttype != "extended": + newpart = self._partitions[self.get_partition_idx_from_minor(parted_newpart.num)] + devnode = newpart['devnode'] + format_cmds = { 'linux-swap': "mkswap", 'fat16': "mkfs.vfat -F 16", 'fat32': "mkfs.vfat -F 32", + 'ntfs': "mkntfs", 'xfs': "mkfs.xfs -f", 'jfs': "mkfs.jfs -f", + 'reiserfs': "mkfs.reiserfs -f", 'ext2': "mkfs.ext2", 'ext3': "mkfs.ext3", + 'hfs': "hformat", 'apple_bootstrap': "hformat" + } + if fs in format_cmds: + cmdname = format_cmds[fs] + else: + raise GLIException("PartitionFormatError", 'fatal', '_partition_format_step', "Unknown partition type " + fstype) + # sleep a bit first + time.sleep(1) + wait_for_device_node(devnode) + cmd = "%s %s %s" % (cmdname, mkfsopts, devnode) + ret = GLIUtility.spawn(cmd) + if not GLIUtility.exitsuccess(ret): + raise GLIException("PartitionFormatError", 'fatal', '_partition_format_step', "Could not create %s filesystem on %s" % (fstype, devnode)) + self.set_partitions_from_disk() + newidx = self.get_partition_idx_from_start_end(parted_newpart.geom.start, parted_newpart.geom.end) + return newidx + + ## + # Removes partition from partition info + # @param minor Minor of partition to remove + def remove_partition(self, partidx): + try: + tmp_part = self._partitions[partidx] + except: + # raise exception here + pass + if tmp_part['minor'] < 1: + # raise an exception here + pass + try: + self._parted_disk.delete_partition(self._parted_disk.get_partition(tmp_part['minor'])) + except: + # raise an exception here + pass + self._parted_disk.commit() + self.set_partitions_from_disk() + +# def resize_partition(self, partidx, mb): +# part = self._partitions[partidx] +# type = part['type'] +# start = part['start'] +# end = start + long(mb * MEGABYTE / 512) - 1 +# +# total_sectors = end - start + 1 +# total_bytes = long(total_sectors) * 512 +# +# # Delete partition and recreate at same start point with new size if growing +# if mb > part['mb']: +# curminor = self._find_current_minor_for_part(device, start) +# self._parted_disk.delete_partition(self._parted_disk.get_partition(part['minor'])) +# if part['logical']: +# tmptype = "logical" +# else: +# tmptype = "primary" +# self._add_partition(parted_disk, start, end, tmptype, tmppart_new['type'], strict_start=True) +# parted_disk.commit() +# +# curminor = self._find_current_minor_for_part(device, start) +# devnode = device + str(curminor) +# +# wait_for_device_node(devnode) +# +# if type in ("ext2", "ext3"): +# resizecmd = "resize2fs %s %sK" % (devnode, str(int((total_bytes - (2 * MEGABYTE)) / 1024))) +# self._logger.log("_partition_resize_step(): running: " + resizecmd) +# ret = GLIUtility.spawn(resizecmd, logfile=self._compile_logfile, append_log=True) +# if not GLIUtility.exitsuccess(ret): +# raise GLIException("PartitionResizeError", 'fatal', 'partition', "could not resize ext2/3 filesystem on " + devnode) +# elif type == "ntfs": +# ret = GLIUtility.spawn("yes | ntfsresize -v --size " + str(total_bytes) + " " + devnode, logfile=self._compile_logfile, append_log=True) +# if not GLIUtility.exitsuccess(ret): +# raise GLIException("PartitionResizeError", 'fatal', 'partition', "could not resize NTFS filesystem on " + devnode) +# elif type in ("linux-swap", "fat32", "fat16"): +# parted_fs = parted_disk.get_partition(curminor).geom.file_system_open() +# resize_constraint = parted_fs.get_resize_constraint() +# if total_sectors < resize_constraint.min_size or start != resize_constraint.start_range.start: +# raise GLIException("PartitionError", 'fatal', 'partition', "New size specified for " + devnode + " is not within allowed boundaries (blame parted)") +# new_geom = resize_constraint.start_range.duplicate() +# new_geom.set_start(start) +# new_geom.set_end(end) +# try: +# parted_fs.resize(new_geom) +# except: +# raise GLIException("PartitionResizeError", 'fatal', 'partition', "could not resize " + devnode) +# self._logger.log(" Deleting old minor " + str(oldpart) + " to be recreated in next pass") +# self._delete_partition(parted_disk, oldpart) +# parted_disk.delete_all() +# parted_disk.commit() + + + ## + # This function clears the partition table + def clear_partitions(self, disklabel=None): + if not disklabel: + disklabel = archinfo[self._arch] + self._parted_disk = self._parted_dev.disk_new_fresh(parted.disk_type_get(disklabel)) + self._disklabel = disklabel + self._parted_disk.commit() + self.set_partitions_from_disk() + + ## + # Returns an ordered list (disk order) of partitions + def get_partitions(self): + return self._partitions + + ## + # Returns the minor of the extended partition, if any + def get_extended_partition(self): + for idx, part in enumerate(self._partitions): + if part.is_extended(): + return idx + return -1 + + ## + # Returns the drive model + def get_model(self): + return self._parted_dev.model + + ## + # Returns the disklabel type + def get_disklabel(self): + return self._disklabel + + ## + # Returns all the geometry information + def get_geometry(self): + return self._geometry + +## +# This class represents a partition within a GLIStorageDevice object +class Partition: + "Class representing a single partition within a Device object" + + ## + # Initialization function for the Partition class + # @param device Parent GLIStorageDevice object + # @param parted_part parted.Partition object + def __init__(self, device, parted_part): + self._device = device + self._start = parted_part.geom.start + self._end = parted_part.geom.end + self._type = parted_part.type_name + self._minor = parted_part.num + self._mb = float((self._end - self._start + 1) * device._geometry['sector_size'] / MEGABYTE) + self._part_name = "" + self._resizeable = False + + # determine the /dev node that refers to this partition + tmpdevice = device.get_device() + label_type = device._parted_disk.type.name + if label_type == "loop": + self._devnode = tmpdevice + elif tmpdevice[-1] in "0123456789": + self._devnode = tmpdevice + "p" + str(self._minor) + else: + self._devnode = tmpdevice + str(self._minor) + + if not self._type == "free": + if parted_part.fs_type: + self._type = parted_part.fs_type.name + if self._type == "hfs" and parted_part.is_flag_available(1) and parted_part.get_flag(1): + self._type = "apple_bootstrap" + else: + # Add additional partition identification code here + self._type = "unknown" + if parted_part.type == 2: self._type = "extended" + if device._parted_disk.type.check_feature(parted.DISK_TYPE_PARTITION_NAME): + self._part_name = parted_part.get_name() + # The 10 is completely arbitrary. If flags seem to be missed, this number should be increased + for flag in range(0, 10): + if parted_part.is_flag_available(flag) and parted_part.get_flag(flag): + self._flags.append(flag) + + if type == "ext2" or type == "ext3": + block_size = long(string.strip(commands.getoutput("dumpe2fs -h " + self._devnode + r" 2>&1 | grep -e '^Block size:' | sed -e 's/^Block size:\s\+//'"))) + free_blocks = long(string.strip(commands.getoutput("dumpe2fs -h " + self._devnode + r" 2>&1 | grep -e '^Free blocks:' | sed -e 's/^Free blocks:\s\+//'"))) + free_bytes = long(block_size * free_blocks) + # can't hurt to pad (the +50) it a bit since this is really just a guess + self._min_size = self._mb - long(free_bytes / MEGABYTE) + 50 + self._resizeable = True + elif type == "ntfs": + min_bytes = long(commands.getoutput("ntfsresize -f --info " + self._devnode + " | grep -e '^You might resize' | sed -e 's/You might resize at //' -e 's/ bytes or .\+//'")) + self._min_size = long(min_bytes / MEGABYTE) + 50 + self._resizeable = True + else: + try: + parted_fs = parted_part.geom.file_system_open() + resize_constraint = parted_fs.get_resize_constraint() + min_bytes = resize_constraint.min_size * self._device._geometry['sector_size'] + self._min_size = long(min_bytes / MEGABYTE) + 1 + self._resizeable = True + except: + self._min_size = self._mb + self._resizeable = False + + def __getitem__(self, name): + tmpdict = { + 'start': self.get_start, + 'end': self.get_end, + 'type': self.get_type, + 'minor': self.get_minor, + 'mb': self.get_mb, + 'flags': self.get_flags, + 'name': self.get_name, + 'devnode': self.get_devnode, + 'resizeable': self.get_resizeable, + 'min_size': self.get_min_size, + 'max_size': self.get_max_size, + 'extended': self.is_extended, + 'logical': self.is_logical, + 'device': self.get_device + } + if name in tmpdict: + return tmpdict[name]() + else: + raise ValueError(name + " is not a valid attribute!") + + def __setitem__(self, name, value): + tmpdict = { + 'flags': self.set_flags, + 'name': self.set_name + } + if name in tmpdict: + tmpdict[name](value) + else: + raise ValueError(name + " is not a valid attribute!") + + ## + # Returns the dev node that this partition will have + def get_devnode(self): + return self._devnode + + ## + # Returns whether or not the partition is extended + def is_extended(self): + if self._type == "extended": + return True + else: + return False + + ## + # Returns whether or not the partition is logical + def is_logical(self): + if self._type == "free": + ext_idx = self._device.get_extended_partition() + if ext_idx == -1: return False + ext_part = self._device[ext_idx] + if self._start >= ext_part['start'] and self._start <= ext_part['end'] and self._end >= ext_part['start'] and self._end <= ext_part['end']: + return True + else: + return False + elif self._device._labelinfo['extended'] and self._minor > 4: + return True + else: + return False + + ## + # Returns a list of logical partitions if this is an extended partition + def get_logicals(self): + if not self.is_extended(): + return None + logicals = [] + for part in self._device._partitions: + if part.is_logical(): + logicals.append(part) + return logicals + + ## + # Returns the start sector for the partition + def get_start(self): + return long(self._start) + + ## + # Returns end sector for the partition + def get_end(self): + return long(self._end) + + ## + # Returns size of partition in MB + def get_mb(self): + return self._mb + + ## + # Returns type of partition + def get_type(self): + return self._type + + ## + # Returns parent Device object + def get_device(self): + return self._device + + ## + # Returns minor of partition + def get_minor(self): + return self._minor + + ## + # Returns whether the partition is resizeable + def get_resizeable(self): + return self._resizeable + + ## + # Sets partition flags + def set_flags(self, flags): + self._flags = flags + + ## + # Returns partition flags + def get_flags(self): + return self._flags + + ## + # Sets partition name + def set_name(self, name): + self._name = name + + ## + # Returns partition name + def get_name(self): + return self._name + + ## + # Returns minimum MB for resize + def get_min_size(self): + if self._resizeable: + return self._min_size + else: + return self._mb + + ## + # Returns maximum MB for resize + def get_max_size(self): + if self._resizeable: + partidx = self._device.get_partition_idx_from_minor(self._minor) + next_part = self._device._partitions[partidx + 1] + if next_part['type'] == "free": + if (next_part.is_logical() and self.is_logical()) or (not next_part.is_logical() and not self.is_logical()): + return self._mb + next_part['mb'] + else: + return self._mb + else: + return self._mb + else: + return self._mb + + ## + # Resizes the partition + # @param mb New size in MB + def resize(self, mb): + minor_pos = self._device.get_partition_idx_from_minor(self._minor) + try: + free_minor = self._device._partitions[minor_pos+1].get_minor() + except: + free_minor = 0 + if mb < self._mb: + # Shrinking + if not free_minor or not self._device.get_partition(free_minor).get_type() == "free": + if self._device._disklabel == "mac": + free_minor = self._minor + 1 + elif self.is_logical(): + free_minor = self._minor + FREE_MINOR_FRAC_LOG + else: + free_minor = self._minor + FREE_MINOR_FRAC_PRI + if self._device.get_partition(free_minor): + for i, part in enumerate(self._device._partitions): + if i <= minor_pos or free_minor > part.get_minor(): continue + part.set_minor(part.get_minor() + 1) + self._device._partitions.insert(minor_pos+1, Partition(self._device, free_minor, self._mb - mb, 0, 0, "free", format=False, existing=False)) + else: + self._device.get_partition(free_minor).set_mb(self._device.get_partition(free_minor).get_mb() + (self._mb - mb)) + self._mb = mb + else: + if mb == self._mb + self._device.get_partition(free_minor).get_mb(): + # Using all available unallocated space + self._device._partitions.pop(self._device.get_partition_idx_from_minor(free_minor)) + self._mb = mb + else: + # Growing + self._device.get_partition(free_minor).set_mb(self._device.get_partition(free_minor).get_mb() - (mb - self._mb)) + self._mb = mb + self._resized = True + self._device.tidy_partitions() + +## +# Returns a list of detected partitionable devices +def detect_devices(): + devices = [] + + # Make sure sysfs exists + # TODO: rewrite for 2.4 support + if not os.path.exists("/sys/bus"): + raise GLIException("GLIStorageDeviceError", 'fatal', 'detect_devices', "no sysfs found (you MUST use a kernel >2.6)") + # Make sure /proc/partitions exists + if not os.path.exists("/proc/partitions"): + raise GLIException("GLIStorageDeviceError", 'fatal', 'detect_devices', "/proc/partitions does not exist! Please make sure procfs is in your kernel and mounted!") + + # Load /proc/partitions into the variable 'partitions' + partitions = [] + for line in open("/proc/partitions"): + tmpparts = line.split() + if len(tmpparts) < 4 or not tmpparts[0].isdigit() or not tmpparts[1].isdigit(): + continue + + # Get the major, minor and device name + major = int(tmpparts[0]) + minor = int(tmpparts[1]) + device = "/dev/" + tmpparts[3] + + # If there is no /dev/'device_name', then scan + # all the devices in /dev to try and find a + # devices with the same major and minor + if not os.path.exists(device): + device = None + for path, dirs, files in os.walk("/dev"): + for d_file in files: + full_file = os.path.join(path, d_file) + if not os.path.exists(full_file): + continue + statres = os.stat(full_file) + fmaj = os.major(statres.st_rdev) + fmin = os.minor(statres.st_rdev) + if fmaj == major and fmin == minor: + device = full_file + break + if not device: + continue + + partitions.append(( major, minor, device )) + + # Scan sysfs for the devices of type 'x' + # 'x' being a member of the list below: + # Compaq cards.../sys/block/{cciss,ida}!cXdX/dev + for dev_glob in ("/sys/bus/ide/devices/*/block*/dev", "/sys/bus/scsi/devices/*/block*/dev", "/sys/block/cciss*/dev", "/sys/block/ida*/dev"): + sysfs_devices = glob(dev_glob) + if not sysfs_devices: continue + for sysfs_device in sysfs_devices: + # Get the major and minor info + try: + major, minor = open(sysfs_device).read().split(":") + major = int(major) + minor = int(minor) + except: + raise GLIException("GLIStorageDeviceError", 'fatal', 'detect_devices', "invalid major/minor in " + sysfs_device) + + # Find a device listed in /proc/partitions + # that has the same minor and major as our + # current block device. + for record in partitions: + if major == record[0] and minor == record[1]: + devices.append(record[2]) + + # We have assembled the list of devices, so return it + return devices + +def list_partitions(): + # Load /proc/partitions into the variable 'partitions' +# return [("/dev/" + x[3]) for x in [y.strip().split() for y in open("/proc/partitions", "r").readlines()] if len(x) >= 4 and x[3][-1].isdigit()] + partitions = {} + for line in open("/proc/partitions"): + tmpparts = line.split() + if len(tmpparts) < 4 or not tmpparts[0].isdigit() or not tmpparts[1].isdigit(): + continue + device = "/dev/" + tmpparts[3] + if device == "/dev/loop0": #we don't want this. + continue + if not device[-1].isdigit(): #A Drive + continue + else: + partitions[device] = tmpparts[2] + return partitions + +def wait_for_device_node(devnode): + if GLIUtility.is_file("/sbin/udevsettle"): + GLIUtility.spawn("/sbin/udevsettle") + if not GLIUtility.is_file(devnode): + GLIUtility.spawn("/sbin/udevsettle") + else: + for i in range(0, 10): + if GLIUtility.is_file(devnode): + break + time.sleep(1) + time.sleep(1) + for i in range(0, 10): + if GLIUtility.is_file(devnode): + break + time.sleep(1) + diff --git a/src/fe/cli/clife.py b/src/fe/cli/clife.py index 1b64066..8132a6c 100755 --- a/src/fe/cli/clife.py +++ b/src/fe/cli/clife.py @@ -11,7 +11,7 @@ sys.path.append("../..") import time from optparse import OptionParser -import GLIClientConfiguration +import GLIException import GLIClientController import GLIInstallProfile from GLILogger import Logger @@ -24,54 +24,100 @@ def msg(s): if clilog != None: clilog.log(s) +def try_steps(steps,cc): + try: + do_steps(steps, cc) + sys.stderr.write('\07') #BEEP + except GLIException.GLIException, e: + sys.stderr.write('\07') #BEEP + error = e.get_error_msg() + msg("Error during install: %s" % error) + sys.exit(-1) def main(): clilog = Logger("/var/log/installer-cli.log") - usage = "usage: %prog [options] CLIENT.xml INSTALL.xml" + usage = "usage: %prog [options] INSTALL.xml" parser = OptionParser(usage) parser.add_option("-p", "--pretend", dest="pretend_install",action="store_true",help="Pretend",default=False) + parser.add_option("-d", "--detailed", dest="detailed",action="store_true",help="Prints the subprogress info",default=False) + global options (options, args) = parser.parse_args() - if len(args) != 2: - sys.stderr.write("You must specify both client and install profiles!\n") + if len(args) != 1: + sys.stderr.write("You must specify the install profile!\n") sys.exit(-1) - client_config_xml_file = args[0] - install_profile_xml_file = args[1] - - client_profile = GLIClientConfiguration.ClientConfiguration() - install_profile = GLIInstallProfile.InstallProfile() - cc = GLIClientController.GLIClientController(pretend=options.pretend_install) - - msg("Loading client profile: "+client_config_xml_file) - if not GLIUtility.get_uri( client_config_xml_file, "/var/tmp/clientconfiguration.xml" ): - msg("Couldn't open client profile: "+client_config_xml_file) - sys.exit(-1) - client_profile.parse("/var/tmp/clientconfiguration.xml") - client_profile.set_interactive(None, False, None) - cc.set_configuration(client_profile) - cc.start_pre_install() + install_profile_xml_file = args[0] msg("Loading install profile: "+install_profile_xml_file) if not GLIUtility.get_uri( install_profile_xml_file, "/var/tmp/installprofile.xml" ): - msg("Couldn't open client profile: "+client_config_xml_file) + msg("Couldn't open install profile: "+install_profile_xml_file) sys.exit(-1) - install_profile.parse("/var/tmp/installprofile.xml") + + install_profile = GLIInstallProfile.InstallProfile() + install_profile.parse("/var/tmp/installprofile.xml") + + cc = GLIClientController.GLIClientController(install_profile, pretend=options.pretend_install, verbose=True) + cc.set_install_profile(install_profile) - cc.start_install() +# cc.start_install() if options.pretend_install: msg("Pretending ") msg("Serializing XML for test reasons.") - f = open("/var/tmp/clientconfiguration-serialized.xml","w") - f.write(install_profile.serialize()) - f.close() f = open("/var/tmp/installprofile-serialized.xml","w") f.write(install_profile.serialize()) f.close() + steps = ['do_recommended_partitioning', + 'mount_local_partitions', + 'mount_network_shares', + 'unpack_stage_tarball', + 'update_config_files', + 'configure_make_conf', + 'prepare_chroot', + 'install_portage_tree', + 'stage1', + 'stage2', + 'set_root_password', + 'set_timezone', + 'emerge_kernel_sources', + 'build_kernel', + 'install_distcc', + 'install_mta', + 'install_logging_daemon', + 'install_cron_daemon', + 'install_filesystem_tools', + 'setup_network_post', + 'install_bootloader', + 'setup_and_run_bootloader', + 'update_config_files', + 'set_users', + 'install_packages', + # services for startup need to come after installing extra packages + # otherwise some of the scripts will not exist. + 'set_services', + 'run_post_install_script', + 'finishing_cleanup'] + + try_steps(steps, cc) + msg("Install completed!") + sys.exit(0) + +def do_steps(steps, cc): msg("Installation Started!") + time.sleep(2) num_steps_completed = 1 + install_steps = list(steps) + num_steps = len(install_steps) + + #Start off with one step. + step_name = install_steps.pop(0) + next_step = cc.get_step_info(step_name) + s = "On step %d of %d. Current step: %s" % (num_steps_completed, num_steps, next_step) + msg(s) + cc.run_step(step_name) + while 1: notification = cc.getNotification() if notification == None: @@ -81,21 +127,28 @@ def main(): notify_data = notification.get_data() if notify_type == "exception": msg("Exception ("+repr(notify_data)+") received:\n"+str(notify_data)) + raise GLIException.GLIException("DoStepFailure",'fatal','do_steps',str(notify_data)) + #This should be a RAISE so it gets caught above. + elif notify_type == "progress": + #SECONDARY UPDATIN' GOIN ON IN HERE + if options.detailed: #only show if in detailed mode. + diff = (notify_data[0]*100)/num_steps + msg("On step %d of %d. Current step: %s\n%s" % (num_steps_completed, num_steps, next_step, notify_data[1])) elif notify_type == "int": if notify_data == GLIClientController.NEXT_STEP_READY: - next_step = cc.get_next_step_info() - num_steps = cc.get_num_steps() + if len(install_steps): + step_name = install_steps.pop(0) + else: + return + #print "Step name: " + step_name + next_step = cc.get_step_info(step_name) i = (num_steps_completed*100)/num_steps s = "On step %d of %d. Current step: %s" % (num_steps_completed, num_steps, next_step) msg(s) num_steps_completed += 1 - if cc.has_more_steps(): - cc.next_step() + cc.run_step(step_name) continue - if notify_data == GLIClientController.INSTALL_DONE: - msg("Install completed") - msg("Install done!") - sys.exit(0) + if __name__ == "__main__": main() diff --git a/src/fe/dialog/gli-dialog.py b/src/fe/dialog/gli-dialog.py index 67c34d9..db4025c 100755 --- a/src/fe/dialog/gli-dialog.py +++ b/src/fe/dialog/gli-dialog.py @@ -8,8 +8,8 @@ import sys sys.path.append("../..") import dialog -import GLIException, GLIInstallProfile, GLIClientConfiguration, GLIClientController, GLIUtility, GLIStorageDevice -from GLIGenDialog import GLIGenCF,GLIGenIP +import GLIException, GLIInstallProfile, GLIClientController, GLIUtility, Partitioning + import string, copy, time, re, glob, os, platform import gettext try: @@ -20,276 +20,2092 @@ except: _ = gettext.gettext -class Setup_CConfig(GLIGenCF): - def __init__(self, client_profile, local_install, advanced_mode, networkless): - GLIGenCF.__init__(self, client_profile, local_install, advanced_mode, networkless) - self.set_arch_template() - self.set_verbose() - self.set_logfile() - self.set_root_mount_point() - self.set_client_networking() - self.set_enable_ssh() - self.set_livecd_password() - self.set_client_kernel_modules() - self.client_config_xml_file = None - if advanced_mode: - if d.yesno(_(u"Do you want to save the ClientConfiguration XML file before continuing? (it will be automatically saved before the install begins)")) == DLG_YES: - self.client_config_xml_file = self.save_client_profile() - -class Setup_InstallProfile(GLIGenIP): - def __init__(self, client_profile, install_profile, local_install, advanced_mode, skip_wizard_question, networkless): - GLIGenIP.__init__(self, client_profile, install_profile, local_install, advanced_mode, networkless) - show_review_menu = True - if not skip_wizard_question: - #Change the Yes/No buttons to new labels for this question. - d.add_persistent_args(["--yes-label", _(u"Wizard Mode")]) - d.add_persistent_args(["--no-label", _(u"Skip to Menu")]) - if d.yesno(_(u"The Gentoo Linux Installer can either take you step by step through the installation settings (recommended), or you can instead go straight to the Revisions menu to set your settings before the installation begins."), width=66) == DLG_YES: - self.set_partitions() - self.set_network_mounts() - self.set_install_stage() - self.set_portage_tree() - self.set_make_conf() - if advanced_mode: - self.set_distcc() - self.set_kernel() - self.set_boot_loader() - self.set_timezone() - self.set_networking() - if advanced_mode: - self.set_cron_daemon() - self.set_logger() - self.set_extra_packages() - if advanced_mode: - self.set_services() - self.set_rc_conf() - self.set_root_password() - self.set_additional_users() - self.show_settings() - #Reset the Yes/No labels. - d.add_persistent_args(["--yes-label", _(u"Yes")]) - d.add_persistent_args(["--no-label",_(u"No")]) - if d.yesno(_(u"Do you want to change any of your settings before starting the actual installation?")) == DLG_NO: - show_review_menu = False - if show_review_menu: - self._fn = ( - { 'text': _(u"Partitioning"), 'fn': self.set_partitions }, - { 'text': _(u"Network mounts"), 'fn': self.set_network_mounts }, - { 'text': _(u"Install Stage"), 'fn': self.set_install_stage }, - { 'text': _(u"Portage Tree"), 'fn': self.set_portage_tree }, - { 'text': _(u"make.conf"), 'fn': self.set_make_conf }, - { 'text': _(u"distcc"), 'fn': self.set_distcc }, - { 'text': _(u"etc/portage/*"), 'fn': self.set_etc_portage }, - { 'text': _(u"Kernel"), 'fn': self.set_kernel }, - { 'text': _(u"Bootloader"), 'fn': self.set_boot_loader }, - { 'text': _(u"Timezone"), 'fn': self.set_timezone }, - { 'text': _(u"Networking"), 'fn': self.set_networking }, - { 'text': _(u"Cron daemon"), 'fn': self.set_cron_daemon }, - { 'text': _(u"Logging daemon"), 'fn': self.set_logger }, - { 'text': _(u"Extra packages"), 'fn': self.set_extra_packages }, - { 'text': _(u"Services"), 'fn': self.set_services }, - { 'text': _(u"Configuration Settings"), 'fn': self.set_rc_conf }, - { 'text': _(u"Root password"), 'fn': self.set_root_password }, - { 'text': _(u"Additional Users"), 'fn': self.set_additional_users }) - self._menu_list = [] - for item in self._fn: - self._menu_list.append(item['text']) - current_item = 0 - while 1: - code, menuitem = self._d.menu(_(u"Choose an option"), choices=self._dmenu_list_to_choices(self._menu_list), default_item=str(current_item), height=23, menu_height=17, cancel=_(u"Done")) - if code != DLG_OK: - break - current_item = int(menuitem) - menuitem = self._menu_list[int(menuitem)-1] - for item in self._fn: - if menuitem == item['text']: - item['fn']() - current_item += 1 - self.install_profile_xml_file = None - #Reset the Yes/No labels. - d.add_persistent_args(["--yes-label", _(u"Yes")]) - d.add_persistent_args(["--no-label",_(u"No")]) - if d.yesno(_(u"Do you want to save the InstallProfile XML file?")) == DLG_YES: - self.install_profile_xml_file = self.save_install_profile() - # ------------------------------------------------------------------ -if __name__ == '__main__': +class GLIDialog(object): + def __init__(self): + self._d = dialog.Dialog() + self._install_profile = GLIInstallProfile.InstallProfile() + self._cc = GLIClientController.GLIClientController(self._install_profile,pretend=False,verbose=True) #FIXME change to False + + self._DLG_OK = 0 + self._DLG_YES = 0 + self._DLG_CANCEL = 1 + self._DLG_NO = 1 + self._DLG_ESC = 2 + self._DLG_ERROR = 3 + self._DLG_EXTRA = 4 + self._DLG_HELP = 5 + self._d.setBackgroundTitle("Gentoo Linux Installer") + self.profile_xml_file = None + self.advanced_mode = True + self.networkless = False + self.just_starting = 1 - d = dialog.Dialog() - client_profile = GLIClientConfiguration.ClientConfiguration() - install_profile = GLIInstallProfile.InstallProfile() - cc = GLIClientController.GLIClientController(pretend=False) - exception_waiting = None - client_config_xml_file = None - install_profile_xml_file = None - next_step_waiting = False - install_done = False - local_install = True - advanced_mode = False - networkless = False - - DLG_OK = 0 - DLG_YES = 0 - DLG_CANCEL = 1 - DLG_NO = 1 - DLG_ESC = 2 - DLG_ERROR = 3 - DLG_EXTRA = 4 - DLG_HELP = 5 - - d.setBackgroundTitle("Gentoo Linux Installer") - welcome_string = _(u"""Welcome to the Gentoo Linux Installer! This program will help install Gentoo on your computer. + +############ ACCESSOR FUNCTIONS ############# + def _dmenu_list_to_choices(self, list): + choices = [] + for i in range(0, len(list)): + choices.append((str(i + 1), list[i])) + return choices + + def install_profile(self): + return self._install_profile + + def fatal(self,message): + self._d.msgbox(message) + sys.exit(0) + +############ QUESTION FUNCTIONS ################# + def show_welcome_screen(self): + + welcome_string = _(u"""Welcome to the Gentoo Linux Installer! This program will help install Gentoo on your computer. Before proceeding please thoroughly read the Gentoo Installation Handbook available at http://www.gentoo.org/doc/en/handbook/index.xml \n -This installer works by first asking a series of questions to generate an \"installation profile\", -which contains all the information needed to install Gentoo.\n -NO Changes will be made to your system until you select the "Install!" button. -You can save your profile at any time by exiting the installer. -You can also load a previously made profile at any time.\n -If choosing expert mode, you will make a second profile with configuration settings for the livecd environment and the installer.\n Press OK to continue""") - d.msgbox(welcome_string, height=25, width=78, title=_(u"Welcome")) - - #Change the Yes/No buttons to new labels for this question. - d.add_persistent_args(["--yes-label", _(u"Simulate")]) - d.add_persistent_args(["--no-label", _(u"Real Install")]) - #This is a temporary question during the development process. In a beta release a real install will be implied. - if d.yesno(_(u"Are we performing an actual install or just simulating?"), width=45) == DLG_NO: - cc._pretend = False - else: - cc._pretend = True - - #Set the Yes/No labels. - d.add_persistent_args(["--yes-label", _(u"Standard")]) - d.add_persistent_args(["--no-label",_(u"Advanced")]) - advanced_string = _(u"""This installer has two modes, an advanced mode for those knowledgable with the inner details of their computer and a standard mode where many of the defaults will be chosen for the user for simplicity and to speed up the install process. The advanced mode offers full customizability and is required for generating profiles to be used other computers. \nThe advanced mode is recommended by the developers. - """) - if d.yesno(advanced_string, width=55, height=15) == DLG_NO: - advanced_mode = True - local_install = True - - networkless_string = _(u"Do you want to do a networkless installation? This will limit the customizability of your install due to the limitations of the LiveCD. For example, choosing networkless will set your installation stage, portage snapshot, and limit your extra packages selections. NOTE: It is easily possible to do a networkless installation on a machine with an active Internet connection; in fact this may result in the fastest installations for many users.") - #Change the Yes/No buttons - d.add_persistent_args(["--yes-label", _(u"Networkless")]) - d.add_persistent_args(["--no-label", _(u"Internet enabled")]) - if d.yesno(networkless_string, width=65, height=20) == DLG_YES: - networkless = True - else: - networkless = False - - -#Reset the Yes/No labels. - d.add_persistent_args(["--yes-label", _(u"Yes")]) - d.add_persistent_args(["--no-label",_(u"No")]) - if advanced_mode: - #Local install affects the pre-selection of partitions on the local hard drives, amongst other things. - if d.yesno(_(u"Are the profiles being generated to be used for an install on the current computer?")) == DLG_NO: - local_install = False - #Ask + self._d.msgbox(welcome_string, height=25, width=78, title=_(u"Welcome")) + + def ask_advanced_mode(self): + #Set the Yes/No labels. + self._d.add_persistent_args(["--yes-label", _(u"Standard")]) + self._d.add_persistent_args(["--no-label",_(u"Advanced")]) + advanced_string = _(u"""This installer has two modes, an advanced mode for those knowledgable with the inner details of their computer and a standard mode where many of the defaults will be chosen for the user for simplicity and to speed up the install process. The advanced mode offers full customizability and is required for generating profiles to be used other computers. \nThe advanced mode is recommended by the developers. + """) + if self._d.yesno(advanced_string, width=65, height=15) == self._DLG_NO: + self.advanced_mode = True + else: + self.advanced_mode = False + + def ask_networkless(self): + networkless_string = _(u"Do you want to do a networkless installation? This will limit the customizability of your install due to the limitations of the LiveCD. For example, choosing networkless will set your installation stage, portage snapshot, and limit your extra packages selections. NOTE: It is easily possible to do a networkless installation on a machine with an active Internet connection; in fact this may result in the fastest installations for many users.") + #Change the Yes/No buttons + self._d.add_persistent_args(["--yes-label", _(u"Networkless")]) + self._d.add_persistent_args(["--no-label", _(u"Internet enabled")]) + if self._d.yesno(networkless_string, width=70, height=20) == self._DLG_YES: + self.networkless = True + try: + self._install_profile.set_grp_install(None, True, None) + self._install_profile.set_install_stage(None, "3", None) + self._install_profile.set_dynamic_stage3(None, True, None) + self._install_profile.set_portage_tree_sync_type(None,"snapshot", None) + cd_snapshot_uri = GLIUtility.get_cd_snapshot_uri() + self._install_profile.set_portage_tree_snapshot_uri(None, cd_snapshot_uri, None) + self._install_profile.set_kernel_source_pkg(None, "livecd-kernel", None) + self._install_profile.set_cron_daemon_pkg(None, "vixie-cron", None) + self._install_profile.set_logging_daemon_pkg(None,"syslog-ng", None) + except: + self._d.msgbox(_(u"ERROR: Could not set networkless information in the profile")) + else: + self.networkless = False + + def ask_load_profile(self): + #Reset the Yes/No labels. + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label",_(u"No")]) + #Ask while 1: string = _(u""" -The first profile needed for an advanced install includes all the -necessary information for getting the livecd environment set up. -This includes the livecd networking configuration, where the -logfile and new root mount point are to be located, etc. -We call this the ClientConfiguration profile. -Do you have a previously generated XML file for the ClientConfiguration? -""") - if d.yesno(string, width=70, height=15, defaultno=1) == DLG_YES: - code, client_config_xml_file = d.inputbox(_(u"Enter the filename of the XML file")) - if code != DLG_OK: + All of the installation settings are stored in an XML file, which we call the InstallProfile. If you have a previously-created profile, you can load it now + for use in this installation. + Do you have a previously generated profile for the installer? + """) + if self._d.yesno(string, width=70, height=15, defaultno=1) == self._DLG_YES: + code, self.profile_xml_file = self._d.inputbox(_(u"Enter the filename of the XML file")) + if code != self._DLG_OK: break - if GLIUtility.is_file(client_config_xml_file): + if GLIUtility.is_file(self.profile_xml_file): break - d.msgbox(_(u"Cannot open file ") + client_config_xml_file, height=7, width=50) - client_config_xml_file = None + self._d.msgbox(_(u"Cannot open file %s") % self.profile_xml_file, height=7, width=50) + self.profile_xml_file = None continue else: break + if self.profile_xml_file != None: + self._install_profile.parse(self.profile_xml_file) + self.run_phase5() + sys.exit(0) + +############ STAGE1 FUNCTIONS ################# + + def set_arch_template(self): + subarches = { 'i386': 'x86', 'i486': 'x86', 'i586': 'x86', 'i686': 'x86', 'x86_64': 'amd64', 'parisc': 'hppa' } + arch = platform.machine() + if arch in subarches: + arch = subarches[arch] + self._arch = arch + + def set_verbose(self): + #Don't show unless advanced. + if self.advanced_mode: + #Change the Yes/No buttons back. + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label", _(u"No")]) + if self._d.yesno(_(u"Do you want debugging output enabled during the install? This is mainly meant to help the developers debug any bugs."), width=65) == self._DLG_YES: + self._install_profile.set_verbose(None, True, None) + else: + self._install_profile.set_verbose(None, False, None) + + def set_client_networking(self): + if self.networkless: return + if GLIUtility.ping("www.gentoo.org"): #If an active connection exists, ignore this step. + return + + device_list = GLIUtility.get_eth_devices() + + choice_list = [] + for device in device_list: + choice_list.append((device, GLIUtility.get_interface_realname(device))) + choice_list.append((_(u"Other"),_(u"Type your own."))) + cnet_string1 = _(u"In order to complete most installs, an active Internet connection is required. Listed are the network devices already detected. In this step you will need to setup one network connection for GLI to use to connect to the Internet. If your desired device does not show up in the list, you can select Other and input the device name manually.") + code, interface = self._d.menu(cnet_string1, width=75, height=20, choices=choice_list) + + if interface == _(u"Other"): + code, interface = self._d.inputbox(_(u"Enter the interface (NIC) you would like to use for installation (e.g. eth0):")) + if code != self._DLG_OK: + return + + dhcp_options = "" + + #Change the Yes/No buttons to new labels for this question. + self._d.add_persistent_args(["--yes-label", _(u"DHCP")]) + self._d.add_persistent_args(["--no-label", _(u"Static IP/Manual")]) + cnet_string2 = _(u"To setup your network interface, you can either use DHCP if enabled, or manually enter your network information.\n DHCP (Dynamic Host Configuration Protocol) makes it possible to automatically receive networking information (IP address, netmask, broadcast address, gateway, nameservers etc.). This only works if you have a DHCP server in your network (or if your provider provides a DHCP service). If you do not, you must enter the information manually. Please select your networking configuration method:") + if self._d.yesno(cnet_string2, height=15, width=70) == self._DLG_YES: #DHCP + network_type = 'dhcp' + if self.advanced_mode: + code, dhcp_options = self._d.inputbox(_(u"If you have any additional DHCP options to pass, type them here in a space-separated list. If you have none, just press Enter."), height=13, width=60) + else: + network_type = 'static' + code, data = self._d.form(_(u'Enter your networking information: (See Chapter 3 of the Handbook for more information) Your broadcast address is probably your IP address with 255 as the last tuple. DO NOT PRESS ENTER until all fields you intend to fill out are complete!'), + ((_(u'Enter your IP address:'), 15), + (_(u'Enter your Broadcast address:'), 15), + (_(u'Enter your Netmask:'),15,'255.255.255.0'), + (_(u'Enter your default gateway:'),15), + (_(u'Enter a DNS server:'),15,'4.2.2.1'), + (_(u'Enter a HTTP Proxy IP:'), 15), + (_(u'Enter a FTP Proxy IP:'), 15), + (_(u'Enter a RSYNC Proxy:'),15) + )) + (ip_address, broadcast, netmask, gateway, dnsservers, http_proxy, ftp_proxy, rsync_proxy) = data[:-1].split('\n') + if code != self._DLG_OK: + return + + if ftp_proxy and ftp_proxy != "": + os.environ['ftp_proxy'] = ftp_proxy + + if http_proxy and http_proxy != "": + os.environ['http_proxy'] = http_proxy + + if rsync_proxy and rsync_proxy != "": + os.environ['RSYNC_PROXY'] = rsync_proxy + + #Set the info now that it's all gathered. + if network_type == "dhcp": + if dhcp_options: + status = GLIUtility.spawn("/sbin/dhcpcd -t 15 " + dhcp_options + " " + interface) + else: + status = GLIUtility.spawn("/sbin/dhcpcd -t 15 -n " + interface) + if not GLIUtility.exitsuccess(status): + self._d.msgbox("ERROR: Could not run dhcpcd command!") #FIXME LANGUAGE + elif network_type == "static": + # Configure the network from the settings they gave. + if not GLIUtility.set_ip(interface, ip_address, broadcast, netmask): + self._d.msgbox("ERROR: Could not set the IP address!") #FIXME LANGUAGE + + if not GLIUtility.set_default_route(gateway): + self._d.msgbox("ERROR: Could not set the default route!") #FIXME LANGUAGE + + if dns_servers: + try: + resolv_conf = open("/etc/resolv.conf", "w") + for dns_server in dns_servers: + resolv_conf.write("nameserver " + dns_server + "\n") + resolv_conf.close() + except: + self._d.msgbox("ERROR: Could not set the DNS servers!") #FIXME LANGUAGE + + time.sleep(5) #Give the backgrounded process a chance. + #Test the connection to make sure everything worked. + if not GLIUtility.ping("www.gentoo.org"): + self._d.msgbox(_(u"Sorry, but the network could not be set up successfully. Please configure yourself manually and restart the installer.")) + sys.exit(0) + + def set_enable_ssh(self): + #Change the Yes/No buttons back. + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label", _(u"No")]) + if self.advanced_mode and not self.networkless: + if self._d.yesno(_(u"Do you want SSH enabled during the install? This will allow you to login remotely during the installation process. If choosing Yes, be sure you select a new LiveCD root password!"), width=65) == self._DLG_YES: + # Enables SSH **Code originally from GLIClientController** + status = GLIUtility.spawn("/etc/init.d/sshd start") + if not GLIUtility.exitsuccess(status): + self._d.msgbox(_(u"ERROR! : Could not start the SSH daemon!")) + + def set_livecd_password(self): + # The root password will be set here only if in advanced mode. Otherwise it is auto-scrambled. + if self.advanced_mode: + self._root_passwd = "" + match = False; + while not match: + livecd_password_string = _(u"""If you want to be able to login to your machine from another console during the installation, + you will want to enter a new root password for the LIVECD. + Note that this can be different from your new system's root password. + Presss Enter twice to skip this step. + Enter the new LIVECD root password (will not be echoed): """) + code, passwd1 = self._d.passwordbox(livecd_password_string, width=65, height=17) + if code != self._DLG_OK: + return + code, passwd2 = self._d.passwordbox(_(u"Enter the new LIVECD root password again to verify:")) + if code != self._DLG_OK: + return + if passwd1 != passwd2: + self._d.msgbox(_(u"The passwords do not match. Please try again.")) + return + else: + match = True; + if passwd1 != "": #don't want to hash an empty password. + try: + self._root_passwd = GLIUtility.hash_password(passwd1) + except: + self._d.msgbox(_(u"ERROR! Could not hash the root password on the LiveCD!")) + ## + # Actually set it now. **Code originally from GLIClientController** + #self._logger.log("Setting root password.") + if self._root_passwd != "": + # The password specified in the configuration is encrypted. + status = GLIUtility.spawn("echo 'root:" + self._root_passwd + "' | chpasswd -e") + + if not GLIUtility.exitsuccess(status): + self._d.msgbox(_(u"ERROR! Could not set the root password on the livecd environment!")) + # else: + # self._logger.log("Livecd root password set.") + + def set_client_kernel_modules(self): + if self.advanced_mode: + status, output = GLIUtility.spawn("lsmod", return_output=True) + cmodules_string1 = _(u"Here is a list of modules currently loaded on your machine.\n Please look through and see if any modules are missing\n that you would like loaded.\n\n") + self._d.add_persistent_args(["--exit-label", _(u"Continue")]) + self._d.scrollbox(cmodules_string1+output, height=20, width=70, title=_(u"Loaded Modules")) + cmodules_string2 = _(u"If you have additional modules you would like loaded before the installation begins (ex. a network driver), enter them in a space-separated list.") + code, kernel_modules_list = self._d.inputbox(cmodules_string2, init="", width=60, height=12) + if code != self._DLG_OK: + return + + + # Actually Load the kernel modules **Code originally from GLIClientController + + #self._logger.log("DEBUG: load_kernel_modules(): modules are " + str(modules)) + for module in kernel_modules_list.split(): + try: + # if self._configuration.get_verbose(): self._logger.log("DEBUG: load_kernel_modules(): trying to load module " + module) + ret = GLIUtility.spawn('modprobe ' + module) + if not GLIUtility.exitsuccess(ret): + self._d.msgbox(_(u"ERROR! : Could not load module: %s ") % module) + # raise GLIException("KernelModuleError", 'warning', 'load_kernel_modules', 'Could not load module: ' + module) + #else: + # self._logger.log('kernel module: ' + module + ' loaded.') + except: + self._d.msgbox(_(u"ERROR!: An unknown error occurred during modprobing the modules. Please load them manually and then restart the installer.")) + +####################################### +####################################### +### MAIN INSTALL SETUP FUNCTIONS START HERE + +############ STAGE2 FUNCTIONS ################# + + def set_mounts(self): + mounts = copy.deepcopy(self._install_profile.get_mounts()) + + if not mounts: + #No mountpoints defined. lets at least find the swap partitions and add them. + for drive in self._drives: + for part in self._devices[drive]: + if part['type'] == "linux-swap": + mounts.append({'devnode': part['devnode'], 'mountopts': '', 'mountpoint': '', 'type': "linux-swap"}) + + while 1: + menulist = [] + for mount in mounts: + if mount['type'] == "linux-swap": + menulist.append(mount['devnode'] + " - swap") + else: + menulist.append(mount['devnode'] + " - " + mount['mountpoint']) + #menulist.append(_(u"Define a new mountpoint")) + choices = self._dmenu_list_to_choices(menulist) + choices.append((_(u"Add"),_(u"Define a new mountpoint"))) + code, choice = self._d.menu(_(u"Please define the mountpoints of your partitions for the new system. At minimum, a / mountpoint must be defined. Defining /boot and /home mountpoints is recommended."),choices=choices, cancel=_(u"Save and Continue"), height=18, width=65) + if code == self._DLG_CANCEL: + try: + self._install_profile.set_mounts(mounts) + except: + self._d.msgbox(_(u"ERROR: Could net set mounts!")) + break + if choice == _(u"Add"): + parts = [] + fstypes = {} + + #Make a list of the partitions + for drive in self._drives: + for tmppart in self._devices[drive]: + skip = False + devnode = tmppart['devnode'] + entry = "" + if tmppart['type'] == "free": + continue + elif tmppart['type'] == "extended": + continue + else: + if tmppart.is_logical(): + entry += _(u"Logical (") + else: + entry += _(u"Primary (") + entry += tmppart['type'] + ", " + entry += str(tmppart['mb']) + "MB)" + + #Go through and remove any already defined. + for mount in mounts: + if mount['devnode'] == devnode: + skip = True + + if not skip: + #Add to the choices list. + parts.append((devnode,entry)) + fstypes[devnode] = tmppart['type'] + + if not parts: + continue + code, partition = self._d.menu(_(u"Select a Partition to define a mountpoint for"), choices=parts, height=18, width=65) + if code != self._DLG_OK: + continue + + fstype = fstypes[partition] + #Ask for mountpoint for this partition. #FIXME use Partition to get the type. + # choices_list = ['ext2', 'ext3', 'linux-swap', 'xfs', 'jfs', 'reiserfs','ntfs', 'fat16', 'fat32'] + # choices = self._dmenu_list_to_choices(choices_list) + # code,fstypeidx = self._d.menu(_(u"Select the filesystem for partition %s") % partition, choices=choices, height=18) + # if fstypeidx: + # fstype = choices_list[int(fstypeidx)-1] + # else: continue + + if fstype == 'linux-swap': + #We have all the info we need, now add the mount + mounts.append({'devnode': partition, 'mountopts': '', 'mountpoint': '', 'type': fstype}) + continue + + #Ask for the mountpoint + mountpoint_menu = ["/","/boot","/etc","/home","/lib","/mnt","/mnt/windows","/opt","/root","/usr","/usr/local","/usr/portage","/var",_(u"Other")] + code, mountpt = self._d.menu(_(u"Choose a mountpoint from the list or choose Other to type your own for partition %s. ") % partition, choices=self._dmenu_list_to_choices(mountpoint_menu), width=65) #may have to make that an integer + if code == self._DLG_OK: + mountpoint = mountpoint_menu[int(mountpt)-1] + if mountpoint == _(u"Other"): + code, mountpoint = self._d.inputbox(_(u"Enter a mountpoint for partition %s") % partition) + + if not mountpoint: continue + + #Ask for mountopts + code, mountopts = self._d.inputbox(_(u"Enter mount options for mountpoint %s. Leave blank for defaults") % mountpoint, height=13, width=60) + if code != self._DLG_OK: + continue + + #We have all the info we need, now add the mount + mounts.append({'devnode': partition, 'mountopts': mountopts, 'mountpoint': mountpoint, 'type': fstype}) + elif choice: #EDITING A MOUNTPOINT + #Find the mount in question, based on devnode + idx = int(choice) - 1 + devnode = mounts[idx]['devnode'] + mountpoint = mounts[idx]['mountpoint'] + mountopts = mounts[idx]['mountopts'] + fstype = mounts[idx]['type'] + + menu = [_(u"Change Mountpoint"), + _(u"Change Filesystem Type"), + _(u"Change Mountoptions"), + _(u"Delete This Mountpoint")] + code, editchoice = self._d.menu(_(u"Select an option for device %(dev)s : Mountpoint: %(mt)s, Type: %(type)s, Options: %(opt)s" % {'dev': devnode, 'mt': mountpoint, 'type': fstype, 'opt': mountopts}), choices=self._dmenu_list_to_choices(menu)) + if code == self._DLG_CANCEL: + continue + editchoice = menu[int(editchoice)-1] + if editchoice == _(u"Change Mountpoint"): + mountpoint_menu = ["/","/boot","/etc","/home","/lib","/mnt","/mnt/windows","/opt","/root","/usr","/usr/local","/usr/portage","/var",_(u"Other")] + code, mountpt = self._d.menu(_(u"Choose a mountpoint from the list or choose Other to type your own for partition %(part)s. Current mountpoint is: %(mt)s" % {'part': devnode, 'mt': mountpoint}) , choices=self._dmenu_list_to_choices(mountpoint_menu), height=18) #may have to make that an integer + if code == self._DLG_OK: + mountpoint = mountpoint_menu[int(mountpt)-1] + if mountpoint == _(u"Other"): + code, mountpoint = self._d.inputbox(_(u"Enter a mountpoint for partition %s") % devnode) + if not mountpoint: continue + mounts[idx]['mountpoint'] = mountpoint + elif editchoice == _(u"Change Filesystem Type"): + choices_list = ['ext2', 'ext3', 'linux-swap', 'xfs', 'jfs', 'reiserfs','ntfs', 'fat16', 'fat32'] + choices = self._dmenu_list_to_choices(choices_list) + code,fstypeidx = self._d.menu(_(u"Select the filesystem for partition %(part)s. It is currently %(fs)s." % {'part': devnode,'fs': fstype}), choices=choices, height=18) + if fstypeidx: + fstype = choices_list[int(fstypeidx)-1] + else: continue + mounts[idx]['type'] = fstype + elif editchoice == _(u"Change Mountoptions"): + code, mountopts = self._d.inputbox(_(u"Enter mount options for mountpoint %s. Leave blank for defaults") % mountpoint, init=mountopts,height=13, width=50) + if code != self._DLG_OK: + continue + mounts[idx]['mountopts'] = mountopts + elif editchoice == _(u"Delete This Mountpoint"): + del mounts[idx] + else: continue #catchall. + def set_partitions(self): + partitions_string1 = _(u"""The first thing on the new system to setup is the partitoning. + You will first select a drive and then edit its partitions. + WARNING: CHANGES ARE MADE IMMEDIATELY TO DISK. BE CAREFUL + NOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION "/" + If your drive is pre-partitioned, just select the mountpoints and make + sure that the format option is set to FALSE or it will erase your data. + The installer does not yet support resizing of partitions (its not safe). + When in doubt, **Partition it yourself and then re-run the installer** + Please refer to the Gentoo Installation Handbook for more information + on partitioning and the various filesystem types available in Linux.""") + self._d.msgbox(partitions_string1, height=17, width=78) + drives = [] + devices = {} + choice_list = [] + tmp_drives = Partitioning.detect_devices() + tmp_drives.sort() + for drive in tmp_drives: + devices[drive] = Partitioning.Device(drive, self._arch, self._install_profile) + drives.append(drive) + choice_list.append((drive, devices[drive].get_model())) + self._drives = drives #Store for use in mounts. + self._devices = devices #Store for use in mounts. + while 1: + code, drive_to_partition = self._d.menu(_(u"Which drive would you like to partition?\n Info provided: Type, Size in MB"), choices=choice_list, cancel=_(u"Done"), width=65) + if code != self._DLG_OK: break + while 1: + partsmenu = [] +# for part in partlist: + for tmppart in devices[drive_to_partition]: +# tmppart = tmpparts[part] + entry = "" + if tmppart['type'] == "free": + #partschoice = "New" + entry = _(u" - Unallocated space (") + if tmppart.is_logical(): + entry += _(u"logical, ") + entry += str(tmppart['mb']) + "MB)" + elif tmppart['type'] == "extended": + entry = str(int(tmppart['minor'])) + entry += _(u" - Extended Partition (") + str(tmppart['mb']) + "MB)" + else: + entry = str(int(tmppart['minor'])) + " - " + # Type: " + tmppart.get_type() + ", Mountpoint: " + tmppart.get_mountpoint() + ", Mountopts: " + tmppart.get_mountopts() + "(" + if tmppart.is_logical(): + entry += _(u"Logical (") + else: + entry += _(u"Primary (") + entry += tmppart['type'] + ", " + entry += str(tmppart['mb']) + "MB)" + partsmenu.append(entry) + #Add recommended partitioning option and clear option + partsmenu.append(_(u"Set Recommended Layout")) + partsmenu.append(_(u"Clear Partitions On This Drive.")) + code, part_to_edit = self._d.menu(_(u"Select a partition or unallocated space to edit\nKey: Minor, Pri/Ext, Filesystem, Size."), width=70, choices=self._dmenu_list_to_choices(partsmenu), cancel=_(u"Back")) + if code != self._DLG_OK: break + partmenuchoice = partsmenu[int(part_to_edit)-1] + #Check for recommended and clear here before setting the tmppart + if partmenuchoice == _(u"Set Recommended Layout"): + if self._d.yesno(_(u"This will ERASE YOUR DRIVE and apply a recommended layout. Are you sure you wish to do this?")) == self._DLG_YES: + if self._d.yesno(_(u"This is your last chance. Are you SURE you want to CLEAR this drive and set a recommended layout? THERE IS NO TURNING BACK IF YOU SELECT YES."), width=65, defaultno=1) == self._DLG_YES: + devices[drive_to_partition].do_recommended() + continue + if partmenuchoice == _(u"Clear Partitions On This Drive."): + if self._d.yesno(_(u"This will remove all partitions on your drive. Are you sure you wish to do this?")) == self._DLG_YES: + if self._d.yesno(_(u"This is your last chance. Are you SURE you want to CLEAR this drive? THIS WILL DELETE ANY DATA ON THE DRIVE!"), width=65, defaultno=1) == self._DLG_YES: + devices[drive_to_partition].clear_partitions() +# self._d.msgbox(_(u"Partition table cleared successfully")) +# except: +# self._d.msgbox(_(u"ERROR: could not clear the partition table!")) + continue + #all other cases (partitions) + part_to_edit = int(part_to_edit) - 1 + tmppart = devices[drive_to_partition][part_to_edit] + if tmppart['type'] == "free": + # partition size first + free_mb = long(tmppart['mb']) + code, new_mb = self._d.inputbox(_(u"Enter the size of the new partition in MB (max %s MB). If creating an extended partition input its entire size (not just the first logical size):") % str(free_mb), init=str(free_mb)) + if code != self._DLG_OK: continue + if int(new_mb) > free_mb: + self._d.msgbox(_(u"The size you entered (%(entered)s MB) is larger than the maximum of %(max)s MB" % {'entered': new_mb, 'max': str(free_mb)})) + continue + # partition type + part_types = [("ext2", _(u"Old, stable, but no journaling")), + ("ext3", _(u"ext2 with journaling and b-tree indexing (RECOMMENDED)")), + ("linux-swap", _(u"Swap partition for memory overhead")), + ("fat32", _(u"Windows filesystem format used in Win9X and XP")), +# ("ntfs", _(u"Windows filesystem format used in Win2K and NT")), +# ("jfs", _(u"IBM's journaling filesystem. stability unknown.")), +# ("xfs", _(u"Don't use this unless you know you need it.")), + ("reiserfs", _(u"B*-tree based filesystem. great performance. Only V3 supported.")), + ("extended", _(u"Create an extended partition containing other logical partitions")), + (_(u"Other"), _(u"Something else we probably don't support."))] + code, type = self._d.menu(_(u"Choose the filesystem type for this new partition."), height=20, width=77, choices=part_types) + if code != self._DLG_OK: continue + + # 'other' partition type + if type == _(u"Other"): + code, type = self._d.inputbox(_(u"Please enter the new partition's type:")) + if code != self._DLG_OK: continue + + # now add it to the data structure + devices[drive_to_partition].add_partition(part_to_edit, int(new_mb), type) + else: + while 1: + tmppart = devices[drive_to_partition][part_to_edit] + tmptitle = drive_to_partition + str(tmppart['minor']) + " - " + if tmppart.is_logical(): + tmptitle += _(u"Logical (") + else: + tmptitle += _(u"Primary (") + tmptitle += tmppart['type'] + ", " + tmptitle += str(tmppart['mb']) + "MB)" + menulist = [_(u"Delete"), _(u"Extra mkfs.* Parameters")] + code, part_action = self._d.menu(tmptitle, choices=self._dmenu_list_to_choices(menulist), cancel=_(u"Back")) + if code != self._DLG_OK: break + part_action = menulist[int(part_action)-1] + if part_action == _(u"Delete"): + answer = (self._d.yesno(_(u"Are you sure you want to delete the partition ") + drive_to_partition + str(tmppart['minor']) + "?") == self._DLG_YES) + if answer == True: + devices[drive_to_partition].remove_partition(part_to_edit) + break + + elif part_action == _(u"Extra mkfs.* Parameters"): + self._d.msgbox(_(u"This feature is coming soon. Please go to console and do it yourself for now.")) + + def set_network_mounts(self): + # This is where any NFS mounts will be specified + network_mounts = copy.deepcopy(self._install_profile.get_network_mounts()) + while 1: + menulist = [] + for mount in network_mounts: + menulist.append(mount['host'] + ":" + mount['export']) + menulist.append(_(u"Add a new network mount")) + choices = self._dmenu_list_to_choices(menulist) + code, menuitemidx = self._d.menu(_(u"If you have any network shares you would like to mount during the install and for your new system, define them here. Select a network mount to edit or add a new mount. Currently GLI only supports NFS mounts."), choices=choices, cancel=_(u"Save and Continue"), height=18, width=65) + if code == self._DLG_CANCEL: + try: + self._install_profile.set_network_mounts(network_mounts) + except: + self._d.msgbox(_(u"ERROR: Could net set network mounts!")) + break + menuitem = menulist[int(menuitemidx)-1] + if menuitem == _(u"Add a new network mount"): + #Change the Yes/No buttons back. + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label", _(u"No")]) + if self._d.yesno(_(u"Do you want to start portmap to be able to search for NFS mounts?"), width=60) == self._DLG_YES: + status = GLIUtility.start_portmap() + if not status: + self._d.msgbox(_(u"ERROR: Could not start portmap!")) + + code, nfsmount = self._d.inputbox(_(u"Enter NFS mount or just enter the IP/hostname to search for available mounts"), height=13, width=50) + if code != self._DLG_OK: + continue + if not GLIUtility.is_nfs(nfsmount): + if GLIUtility.is_ip(nfsmount) or GLIUtility.is_hostname(nfsmount): + status, remotemounts = GLIUtility.spawn("/usr/sbin/showmount -e " + nfsmount + " 2>&1 | egrep '^/' | cut -d ' ' -f 1 && echo", return_output=True) + remotemounts = remotemounts.strip().split("\n") + if (not GLIUtility.exitsuccess(status)) or (not len(remotemounts)) or not remotemounts[0]: + self._d.msgbox(_(u"No NFS exports were detected on ") + nfsmount) + continue + code, nfsmount2 = self._d.menu(_(u"Select a NFS export"), choices=self._dmenu_list_to_choices(remotemounts), cancel=_(u"Back")) + if code != self._DLG_OK: + continue + nfsmount2 = remotemounts[int(nfsmount2)-1] + else: + self._d.msgbox(_(u"The address you entered, %s, is not a valid IP or hostname. Please try again.") % nfsmount) + continue + else: + colon_location = nfsmount.find(':') + menuitem = nfsmount + nfsmount = menuitem[:colon_location] + nfsmount2 = menuitem[colon_location+1:] + for mount in network_mounts: + if nfsmount == mount['host'] and nfsmount2 == mount['export']: + self._d.msgbox(_(u"There is already an entry for ") + nfsmount + ":" + nfsmount2 + ".") + nfsmount = None + break + if nfsmount == None: + continue + network_mounts.append({'export': nfsmount2, 'host': nfsmount, 'mountopts': '', 'mountpoint': '', 'type': 'nfs'}) + menuitem = nfsmount + ":" + nfsmount2 + menuitemidx = len(network_mounts) + + if menuitem.find(':') != -1: + colon_location = menuitem.find(':') + tmpmount = network_mounts[int(menuitemidx)-1] + code, mountpoint = self._d.inputbox(_(u"Enter a mountpoint"), init=tmpmount['mountpoint']) + if code == self._DLG_OK: + tmpmount['mountpoint'] = mountpoint + code, mountopts = self._d.inputbox(_(u"Enter mount options"), init=tmpmount['mountopts']) + if code == self._DLG_OK: + tmpmount['mountopts'] = mountopts + network_mounts[int(menuitemidx)-1] = tmpmount + +############ STAGE3 FUNCTIONS ################# + + def set_install_stage(self): + if self.networkless: return + # The install stage and stage tarball will be selected here + install_stages = (("3",_(u"Stage3 is a basic system that has been built for you (no compiling).")), + ("3+GRP", _(u"A Stage3 install but using binaries from the LiveCD when able."))) + code, install_stage = self._d.menu(_(u"Which stage do you want to start at?"), choices=install_stages, cancel=_(u"Back"), width=78) + stage3warning = "" + if code == self._DLG_OK: + if install_stage == "3+GRP": + stage3warning = _(u"WARNING: Since you are doing a GRP install it is HIGHLY recommended you choose Create from CD to avoid a potentially broken installation.") + try: + self._install_profile.set_grp_install(None, True, None) + except: + self._d.msgbox(_(u"ERROR! Could not set install stage!")) + install_stage = "3" + try: + self._install_profile.set_install_stage(None, install_stage, None) + except: + self._d.msgbox(_(u"ERROR! Could not set install stage!")) + has_systempkgs = GLIUtility.is_file("/usr/livecd/systempkgs.txt") + if install_stage == "3" and has_systempkgs: + #Change the Yes/No buttons to new labels for this question. + self._d.add_persistent_args(["--yes-label", _(u"Create from CD")]) + self._d.add_persistent_args(["--no-label", _(u"Specify URI")]) + if self._d.yesno(_(u"Do you want to generate a stage3 on the fly using the files on the LiveCD (fastest) or do you want to grab your stage tarball from the Internet?\n")+stage3warning, width=55) == self._DLG_YES: + #Generate on the FLY + try: + self._install_profile.set_dynamic_stage3(None, True, None) + except: + self._d.msgbox(_(u"ERROR: Could not set the stage tarball URI!")) + return + #Specify URI + #subarches = { 'x86': ("x86", "i686", "pentium3", "pentium4", "athlon-xp"), 'hppa': ("hppa1.1", "hppa2.0"), 'ppc': ("g3", "g4", "g5", "ppc"), 'sparc': ("sparc32", "sparc64")} + + stage_tarball = "" + while (not stage_tarball) and (not GLIUtility.is_uri(stage_tarball)): #LOOP till valid. + type_it_in = False + if GLIUtility.ping("www.gentoo.org"): #Test for network connectivity + mirrors = GLIUtility.list_mirrors() + mirrornames = [] + mirrorurls = [] + for item in mirrors: + mirrornames.append(item[1]) + mirrorurls.append(item[0]) + code, mirror = self._d.menu(_(u"Select a mirror to grab the tarball from or select Cancel to enter an URI manually."), choices=self._dmenu_list_to_choices(mirrornames), width=77, height=20) + if code != self._DLG_OK: + type_it_in = True + else: + mirror = mirrorurls[int(mirror)-1] + tarballs = GLIUtility.list_stage_tarballs_from_mirror(mirror, self._arch) + code, stage_tarball = self._d.menu(_(u"Select your desired stage tarball:"), choices=self._dmenu_list_to_choices(tarballs), width=77, height=20) + if (code != self._DLG_OK): + type_it_in = True + else: + stage_tarball = mirror + "/releases/" + self._arch + "/current/stages/" + tarballs[int(stage_tarball)-1] + #get portageq envvar value of cflags and look for x86, i686,etc. + #URL SYNTAX + #http://gentoo.osuosl.org/releases/ARCHITECTURE/current/stages/ + else: + type_it_in = True + if type_it_in: + code, stage_tarball = self._d.inputbox(_(u"Specify the stage tarball URI or local file:"), init=self._install_profile.get_stage_tarball_uri()) + if code != self._DLG_OK: + return + #If Doing a local install, check for valid file:/// uri + if stage_tarball: + if not GLIUtility.is_uri(stage_tarball): + self._d.msgbox(_(u"The specified URI is invalid. It was not saved. Please go back and try again.")); + else: self._install_profile.set_stage_tarball_uri(None, stage_tarball, None) + else: self._d.msgbox(_(u"No URI was specified!")) + + def set_portage_tree(self): + # This section will ask whether to sync the tree, whether to use a snapshot, etc. + if self._install_profile.get_dynamic_stage3(): #special case + try: + self._install_profile.set_portage_tree_sync_type(None,"snapshot", None) + cd_snapshot_uri = GLIUtility.get_cd_snapshot_uri() + self._install_profile.set_portage_tree_snapshot_uri(None, cd_snapshot_uri, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the portage cd snapshot URI!")) + return + + #Normal case + menulist = [("Sync", _(u"Normal. Use emerge sync RECOMMENDED!")), + ("Webrsync", _(u"HTTP daily snapshot. Use when rsync is firewalled.")), + ("Snapshot", _(u"Use a portage snapshot, either a local file or a URL")), + ("None", _(u"Extra cases such as if /usr/portage is an NFS mount"))] + code, portage_tree_sync = self._d.menu(_(u"Which method do you want to use to sync the portage tree for the installation? If choosing a snapshot you will need to provide the URI for the snapshot if it is not on the livecd."),width=75, height=17, choices=menulist) + if code != self._DLG_OK: + return + self._install_profile.set_portage_tree_sync_type(None, portage_tree_sync.lower(), None) + if portage_tree_sync == "Snapshot": + if self._install_profile.get_portage_tree_snapshot_uri(): + initval = self._install_profile.get_portage_tree_snapshot_uri() + else: + initval = GLIUtility.get_cd_snapshot_uri() + code, snapshot = self._d.inputbox(_(u"Enter portage tree snapshot URI"), init=initval) + if code == self._DLG_OK: + if snapshot: + if not GLIUtility.is_uri(snapshot): + self._d.msgbox(_(u"The specified URI is invalid. It was not saved. Please go back and try again.")) + else: + self._install_profile.set_portage_tree_snapshot_uri(None, snapshot, None) + + else: + self._d.msgbox(_(u"No URI was specified! Returning to default emerge sync.")) + #if d.yesno("The specified URI is invalid. Use it anyway?") == DLG_YES: install_profile.set_stage_tarball_uri(None, stage_tarball, None) + +############ STAGE4 FUNCTIONS ################# + + def set_make_conf(self): + # This section will be for setting things like CFLAGS, ACCEPT_KEYWORDS, and USE + #special case for dynamic stage3 + if self._install_profile.get_dynamic_stage3() or not self.advanced_mode: + return + + etc_files = self._install_profile.get_etc_files() + if etc_files.has_key("make.conf"): + make_conf = etc_files['make.conf'] + else: + make_conf = {} + + self._d.msgbox(_(u"""The installer will now gather information regarding the contents of /etc/make.conf + One of the unique (and best) features of Gentoo is the ability to + define flags (called USE flags) that define what components are + compiled into applications. For example, you can enable the alsa + flag and programs that have alsa capability will use it. + The result is a finely tuned OS with no unnecessary components to + slow you down. + The installer divides USE flag selection into two screens, one for + global USE flags and one for local flags specific to each program. + Please be patient while the screens load. It may take awhile."""), width=73, height=16) + + #First grab the system USE flags. These will be used often. + system_use_flags = GLIUtility.spawn("portageq envvar USE", return_output=True)[1].strip().split() + + #Now get any stored USE flags. + remove_from_system = {} + add_flags = [] + if make_conf.has_key("USE"): + stored_use_flags = make_conf["USE"].split() + for flag in stored_use_flags: + if "-" in flag: #A subtraction of a flag in the system USE + remove_flag = flag[1:] + remove_from_system[remove_flag] = 1 + else: + add_flags.append(flag) #Add to checked list + + + #Load data. + use_flags = [] + use_local_flags = [] + use_desc = GLIUtility.get_global_use_flags() + use_local_desc = GLIUtility.get_local_use_flags() + + #populate the choices list + sorted_use = use_desc.keys() + sorted_use.sort() + for flagname in sorted_use: + use_flags.append((flagname, use_desc[flagname], int((flagname in system_use_flags or flagname in add_flags) and not remove_from_system.has_key(flagname) ))) + #present the menu + code, chosen_use_flags = self._d.checklist(_(u"Choose which *global* USE flags you want on the new system"), height=25, width=80,list_height=17, choices=use_flags) + + #populate the chocies list + sorted_use = use_local_desc.keys() + sorted_use.sort() + for flagname in sorted_use: + use_local_flags.append((flagname, use_local_desc[flagname], int((flagname in system_use_flags or flagname in add_flags) and not remove_from_system.has_key(flagname) ))) + #present the menu + code, chosen_use_local_flags = self._d.checklist(_(u"Choose which *local* USE flags you want on the new system"), height=25, width=80,list_height=17, choices=use_local_flags) + + + #Hash the chosen list for speed. + chosen_hash = {} + for flag in chosen_use_flags: + chosen_hash[flag] = 1 + for flag in chosen_use_local_flags: + chosen_hash[flag] = 1 + + #Create the new string. Loop through ALL flags, look for match in hash then in USE + temp_use = "" + for flag in use_desc: + if chosen_hash.has_key(flag) and (flag in system_use_flags): + continue #Already in USE, don't need to add. + elif chosen_hash.has_key(flag): + temp_use += flag + " " #Checked. Add. + elif not chosen_hash.has_key(flag) and (flag in system_use_flags): + temp_use += "-"+flag+" " #Was unchecked. add a -flag to USE + + for flag in use_local_desc: + if chosen_hash.has_key(flag) and (flag in system_use_flags): + continue #Already in USE, don't need to add. + elif chosen_hash.has_key(flag): + temp_use += flag + " " #Checked. Add. + elif not chosen_hash.has_key(flag) and (flag in system_use_flags): + temp_use += "-"+flag+" " #Was unchecked. add a -flag to USE + #Store it! + make_conf["USE"] = temp_use + + if not self._install_profile.get_dynamic_stage3() and self.advanced_mode: + #Second, set the ACCEPT_KEYWORDS + #Change the Yes/No buttons to new labels for this question. + self._d.add_persistent_args(["--yes-label", _(u"Stable")]) + self._d.add_persistent_args(["--no-label", _(u"Unstable")]) + if self._d.yesno(_(u"Do you want to run the normal stable portage tree, or the bleeding edge unstable (i.e. ACCEPT_KEYWORDS=%s)? If unsure select stable. Stable is required for GRP installs." % self._arch), height=12, width=55) == self._DLG_YES: + #Stable + make_conf["ACCEPT_KEYWORDS"] = "" + else: #Unstable + make_conf["ACCEPT_KEYWORDS"] = "~" + self._arch + #Third, misc. stuff. + while self.advanced_mode: + menulist = [("CFLAGS",_(u"Edit your C Flags and Optimization level")), + ("CHOST", _(u"Change the Host Setting")), + ("MAKEOPTS", _(u"Specify number of parallel makes (-j) to perform.")), + ("FEATURES", _(u"Change portage functionality settings. (distcc/ccache)")), + ("GENTOO_MIRRORS", _(u"Specify mirrors to use for source retrieval.")), + ("SYNC", _(u"Specify server used by rsync to sync the portage tree.")), + (_(u"Other"), _(u"Specify your own variable and value."))] + if self._install_profile.get_dynamic_stage3(): #SPECIAL LIST WITHOUT CHOST + menulist = [("CFLAGS",_(u"Edit your C Flags and Optimization level")), + ("MAKEOPTS", _(u"Specify number of parallel makes (-j) to perform.")), + ("FEATURES", _(u"Change portage functionality settings. (distcc/ccache)")), + ("GENTOO_MIRRORS", _(u"Specify mirrors to use for source retrieval.")), + ("SYNC", _(u"Specify server used by rsync to sync the portage tree.")), + (_(u"Other"), _(u"Specify your own variable and value."))] + code, menuitem = self._d.menu(_(u"For experienced users, the following /etc/make.conf variables can also be defined. Choose a variable to edit or Done to continue."), choices=menulist, cancel=_(u"Done"), width=77) + if code != self._DLG_OK: + break + if menuitem == _(u"Other"): + code,menuitem = self._d.inputbox(_(u"Enter the variable name: ")) + if code != self._DLG_OK: + continue + oldval = "" + if make_conf.has_key(menuitem): + oldval = make_conf[menuitem] + if oldval: + code, newval = self._d.inputbox(_(u"Enter new value for ") + menuitem, init=oldval) + if code == self._DLG_OK: + make_conf[menuitem] = newval + continue + #SPECIAL CASES here with their own menus. + if menuitem == "CFLAGS": + if not make_conf.has_key("CFLAGS"): + try: + cflags = GLIUtility.get_value_from_config("/etc/make.conf","CFLAGS") + except: + cflags = "" + else: + cflags = make_conf['CFLAGS'] + while 1: + choices_list = [ + (_(u"CLEAR"),_(u"Erase the current value and start over.")), + ("-mcpu",_(u"Add a CPU optimization (deprecated in GCC 3.4)")), + ("-mtune",_(u"Add a CPU optimization (GCC 3.4+)")), + ("-march",_(u"Add an Architecture optimization")), + ("-O",_(u"Add optimization level (please do NOT go over 2)")), + ("-fomit-frame-pointer",_(u"For advanced users only.")), + ("-pipe",_(u"Common additional flag")), + (_(u"Manual"),_(u"Specify your CFLAGS manually")) + ] + code, choice = self._d.menu(_(u"Choose a flag to add to the CFLAGS variable or Done to go back. The current value is: ")+ cflags, choices=choices_list, cancel=_(u"Done"), width=70) + if code != self._DLG_OK: + break + if choice == _(u"CLEAR"): + cflags = "" + elif choice == _(u"Manual"): + code, cflags = self._d.inputbox(_(u"Enter new value for ") + menuitem) + break + elif choice in ["-fomit-frame-pointer","-pipe"]: + cflags += " "+choice + else: + code, newval = self._d.inputbox(_(u"Enter the new value for %s (value only):") % choice) + if code != self._DLG_OK or not newval: + continue + if choice == "-O": + cflags += " "+choice+newval + else: + cflags += " "+choice+"="+newval + if cflags: + make_conf['CFLAGS'] = cflags + elif menuitem == "CHOST": + choices_list = GLIUtility.get_chosts(self._arch) + code, chost = self._d.menu(_(u"Choose from the available CHOSTs for your architecture."), choices=self._dmenu_list_to_choices(choices_list), width=77) + if code != self._DLG_OK: + continue + chost = choices_list[int(chost)-1] + make_conf['CHOST'] = chost + elif menuitem == "MAKEOPTS": + makeopt_string = _(u"Presently the only use is for specifying the number of parallel makes (-j) to perform. The suggested number for parallel makes is CPUs+1. Enter the NUMBER ONLY:") + code, newval = self._d.inputbox(makeopt_string, width=60) + if code != self._DLG_OK: + continue + make_conf['MAKEOPTS'] = "-j"+str(newval) + elif menuitem == "FEATURES": + choices_list = [("sandbox",_(u"enables sandboxing when running emerge and ebuild."),0), + ("ccache",_(u"enables ccache support via CC."),0), + ("distcc",_(u"enables distcc support via CC."),0), + ("distlocks",_(u"enables distfiles locking using fcntl or hardlinks."),0), + ("buildpkg",_(u"create binaries of all packages emerged"),0), + (_(u"Other"),_(u"Input your list of FEATURES manually."),0) ] + features_string = _(u"FEATURES are settings that affect the functionality of portage. Most of these settings are for developer use, but some are available to non-developers as well.") + code, choices = self._d.checklist(features_string, choices=choices_list, width=75) + if code != self._DLG_OK: + continue + if _(u"Other") in choices: + code, features = self._d.inputbox(_(u"Enter the value of FEATURES: ")) + elif choices: + features = string.join(choices, ' ') + else: + features = "" + if features: + make_conf['FEATURES'] = features + else: + code, newval = self._d.inputbox(_(u"Enter new value for ") + menuitem) + if code == self._DLG_OK and newval: + make_conf[menuitem] = newval + + try: + if make_conf: + etc_files['make.conf'] = make_conf + self._install_profile.set_etc_files(etc_files) + except: + self._d.msgbox(_(u"ERROR! Could not set the make_conf correctly!")) + + def set_distcc(self): + #Change the Yes/No buttons for this question. + if self._install_profile.get_dynamic_stage3() or not self.advanced_mode: + return + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label", _(u"No")]) + if self._d.yesno(_(u"Do you want to use distcc to compile your extra packages during the install and for future compilations as well?"), height=12, width=60, defaultno=1) == self._DLG_YES: + #Add distcc to the services list. + if self._install_profile.get_services(): + services = self._install_profile.get_services() + if isinstance(services, str): + services = services.split(',') + else: + services = [] + if not "distccd" in services: + services.append("distccd") + try: + services = string.join(services, ',') + if services: + self._install_profile.set_services(None, services, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the services list.")) + return + #Set the distcc flag to emerge earlier than other packages. + try: + self._install_profile.set_install_distcc(None, True, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the install distcc flag!")) + return + + #Add distcc to the FEATURES in make.conf and add DISTCC_HOSTS too. + etc_files = self._install_profile.get_etc_files() + #load up the make.conf + if etc_files.has_key("make.conf"): + make_conf = etc_files['make.conf'] + else: + make_conf = {} + #Check for FEATURES and add if not already there. + if make_conf.has_key("FEATURES"): + if not "distcc" in make_conf['FEATURES']: + make_conf['FEATURES'] += " distcc" + else: + make_conf['FEATURES'] = "distcc" + #Now while still working in make.conf, figure out what HOSTS to set. + if make_conf.has_key("DISTCC_HOSTS"): + initval = make_conf['DISTCC_HOSTS'] + else: + initval = "localhost " + distcc_string = _(u"Enter the hosts to be used by distcc for compilation:\nExample: localhost 192.168.0.2 192.168.0.3:4000/10") + code, hosts = self._d.inputbox(distcc_string, width=75, init=initval) + if code != self._DLG_OK: + hosts = initval + make_conf['DISTCC_HOSTS'] = hosts + try: + etc_files['make.conf'] = make_conf + self._install_profile.set_etc_files(etc_files) + except: + self._d.msgbox(_(u"ERROR! Could not set the make_conf correctly!")) + + def set_etc_portage(self): + if self.networkless: return + #This section will be for editing the /etc/portage/* files and other /etc/* files. This should be for advanced users only. + etc_files = self._install_profile.get_etc_files() + while self.advanced_mode: - if client_config_xml_file != None: - client_profile.parse(client_config_xml_file) - # code to actually run the client_controller functions - else: - #This line does all the work. - gen_client_conf = Setup_CConfig(client_profile, local_install, advanced_mode, networkless) - client_profile = gen_client_conf.client_profile() + menulist = [("portage/package.mask",_(u"A list of DEPEND atoms to mask.")), + ("portage/package.unmask",_(u"A list of packages to unmask.")), + ("portage/package.keywords",_(u"Per-package KEYWORDS (like ACCEPT_KEYWORDS).")), + ("portage/package.use",_(u"Per-package USE flags.")), + (_(u"Other"),_(u"Type your own name of a file to edit in /etc/"))] + code, menuitem = self._d.menu(_(u"For experienced users, the following /etc/* variables can also be defined. Choose a variable to edit or Done to continue."), choices=menulist, cancel=_(u"Done"), width=77) + if code != self._DLG_OK: + break #get out of the while loop. then save and continue - client_profile.set_interactive(None, True, None) - cc.set_configuration(client_profile) - - #This will execute all of the CC functions, and set up networking if there is networking to set up. - cc.start_pre_install() - - #Reset the Yes/No labels. - d.add_persistent_args(["--yes-label", _(u"Yes")]) - d.add_persistent_args(["--no-label",_(u"No")]) - while 1: - if d.yesno(_(u"All of the installation settings are stored in an XML file, which we call the InstallProfile. If you have previously saved a profile and would like to load it for this install, say Yes. Otherwise say No. Do you have a previously generated InstallProfile XML file?"), width=55, defaultno=1) == DLG_YES: - code, install_profile_xml_file = d.inputbox(_(u"Enter the filename of the XML file")) - if code != DLG_OK: + if menuitem == _(u"Other"): + code, menuitem = self._d.inputbox(_(u"Enter the name of the /etc/ file you would like to edit (DO NOT type /etc/)")) + if code != self._DLG_OK: + return + oldval = "" + if etc_files.has_key(menuitem): + oldval = etc_files[menuitem] + + code, newval = self._d.inputbox(_(u"Enter new contents (use \\n for newline) of ") + menuitem, init=oldval) + if code == self._DLG_OK: + etc_files[menuitem] = [] + etc_files[menuitem].append(newval) + try: + self._install_profile.set_etc_files(etc_files) + except: + self._d.msgbox(_(u"ERROR! Could not set etc/portage/* correctly!")) + + + + def set_kernel(self): + if self.networkless: return + # This section will be for choosing kernel sources, choosing (and specifying) a custom config or genkernel, modules to load at startup, etc. + kernel_sources = [("livecd-kernel", _(u"Copy over the current running kernel (fastest)")), + ("vanilla-sources", _(u"The Unaltered Linux Kernel ver 2.6+ (safest)")), + ("gentoo-sources", _(u"Gentoo's optimized 2.6+ kernel. (less safe)")+" (RECOMMENDED)"), #FIXME LANGUAGE + ("hardened-sources", _(u"Hardened sources for the 2.6 kernel tree")), + ("grsec-sources",_(u"Vanilla sources with grsecurity patches")), + (_(u"Other"), _(u"Choose one of the other sources available."))] + code, menuitem = self._d.menu(_(u"Choose which kernel sources to use for your system. If using a previously-made kernel configuration, make sure the sources match the kernel used to create the configuration."), choices=kernel_sources, width=77, height=17) + if code != self._DLG_OK: + return + if menuitem == _(u"Other"): + code, menuitem = self._d.inputbox(_(u"Please enter the desired kernel sources package name:")) + if code != self._DLG_OK: return + try: + self._install_profile.set_kernel_source_pkg(None, menuitem, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the kernel source package!")) + if not menuitem == "livecd-kernel": + #Change the Yes/No buttons to new labels for this question. + self._d.add_persistent_args(["--yes-label", _(u"Genkernel")]) + self._d.add_persistent_args(["--no-label", _(u"Traditional (requires a config!)")]) + kernel_string1 = _(u"There are currently two ways the installer can compile a kernel for your new system. You can either provide a previously-made kernel configuration file and use the traditional kernel-compiling procedure (no initrd) or have genkernel automatically create your kernel for you (with initrd). \n\n If you do not have a previously-made kernel configuration, YOU MUST CHOOSE Genkernel. Choose which method you want to use.") + if self._d.yesno(kernel_string1, width=76,height=13) == self._DLG_YES: #Genkernel + self._install_profile.set_kernel_build_method(None,"genkernel", None) + if self.advanced_mode: + #Change the Yes/No buttons back. + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label", _(u"No")]) + if self._d.yesno(_(u"Do you want the bootsplash screen to show up on bootup?")) == self._DLG_YES: + self._install_profile.set_kernel_bootsplash(None, True, None) + else: + self._install_profile.set_kernel_bootsplash(None, False, None) + else: #Custom + self._install_profile.set_kernel_build_method(None,"custom", None) + if self.advanced_mode: + code, custom_kernel_uri = self._d.inputbox(_(u"If you have a custom kernel configuration, enter its location (otherwise just press Enter to continue):"), height=13, width=50) + if code == self._DLG_OK: + if custom_kernel_uri: + if not GLIUtility.is_uri(custom_kernel_uri, checklocal=self.local_install): + self._d.msgbox(_(u"The specified URI is invalid. It was not saved. Please go back and try again.")) + else: + try: + self._install_profile.set_kernel_config_uri(None, custom_kernel_uri, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the kernel config URI!")) + #else: self._d.msgbox(_(u"No URI was specified! Reverting to using genkernel")) + + def set_boot_loader(self): + mounts = self._install_profile.get_mounts() + boot_drive_choices = [] + #Bootloader code yanked from the x86ArchTemplate + kernel_params = self._install_profile.get_bootloader_kernel_args() + if self._install_profile.get_boot_device(): + boot_device = self._install_profile.get_boot_device() + else: + boot_device = "" + foundboot = False + for mount in mounts: + #if not mount['devnode'][:-1] in boot_drive_choices: + # boot_drive_choices.append(mount['devnode'][:-1]) + mountpoint = mount['mountpoint'] + if (mountpoint == "/boot"): + foundboot = True + if (( (mountpoint == "/") and (not foundboot) ) or (mountpoint == "/boot")): + if not "doscsi" in kernel_params.split(): + if mount['devnode'].startswith("/dev/sd"): kernel_params += " doscsi" + for drive in self._drives: + boot_drive_choices.append((drive, self._devices[drive].get_model())) + arch_loaders = { 'x86': [ + ("grub",_(u"GRand Unified Bootloader, newer, RECOMMENDED")), + ], + 'amd64': [ + ("grub",_(u"GRand Unified Bootloader, newer, RECOMMENDED"))]} #FIXME ADD OTHER ARCHS + if not self.networkless: + arch_loaders['x86'].append(("lilo",_(u"LInux LOader, older, traditional.(detects windows partitions)"))) + boot_loaders = arch_loaders[self._arch] + boot_loaders.append(("none", _(u"Do not install a bootloader. (System may be unbootable!)"))) + boot_string1 = _(u"To boot successfully into your new Linux system, a bootloader will be needed. If you already have a bootloader you want to use you can select None here. The bootloader choices available are dependent on what GLI supports and what architecture your system is. Choose a bootloader") + code, menuitem = self._d.menu(boot_string1, choices=boot_loaders, height=16, width=74) + if code != self._DLG_OK: + return + try: + self._install_profile.set_boot_loader_pkg(None, menuitem, None) + except: + self._d.msgbox(_(u"ERROR! Could not set boot loader pkg! ")+menuitem) + if menuitem == "none": + return + if self.advanced_mode: + #Reset the Yes/No labels. + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label",_(u"No")]) + boot_string2 = _(u"Most bootloaders have the ability to install to either the Master Boot Record (MBR) or some other partition. Most people will want their bootloader installed on the MBR for successful boots, but if you have special circumstances, you can have the bootloader installed to the /boot partition instead. Do you want the boot loader installed in the MBR? (YES is RECOMMENDED)") + if self._d.yesno(boot_string2, height=13, width=55) == self._DLG_YES: + self._install_profile.set_boot_loader_mbr(None, True, None) + else: + self._install_profile.set_boot_loader_mbr(None, False, None) + if self._install_profile.get_boot_loader_mbr(): #If we're installing to MBR gotta check the device. + if self.advanced_mode or (boot_device and boot_device[-1] != 'a'): + #show the menu. + boot_string3_std = _(u"Your boot device may not be correct. It is currently set to %s, but this device may not be the first to boot. Usually boot devices end in 'a' such as hda or sda.") % boot_device + boot_string3 = _(u" Please confirm your boot device by choosing it from the menu.") + if not self.advanced_mode: + boot_string3 = boot_string3_std + boot_string3 + if not boot_drive_choices: + self._d.msgbox(_(u"ERROR: No drives set up. Please complete the Partitioning screen first!")) + return + code, boot_drive_choice = self._d.menu(boot_string3, choices=boot_drive_choices, height=16, width=70) + if code != self._DLG_OK: + return + try: + self._install_profile.set_boot_device(None,boot_drive_choice,None) + except: + self._d.msgbox(_(u"ERROR! Could not set the boot device!")+boot_drive_choice) + if self.advanced_mode: + code, bootloader_kernel_args = self._d.inputbox(_(u"If you have any additional optional arguments you want to pass to the kernel at boot, type them here or just press Enter to continue:"), height=12, width=55, init=kernel_params) + if code == self._DLG_OK: + try: + self._install_profile.set_bootloader_kernel_args(None, bootloader_kernel_args, None) + except: + self._d.msgbox(_(u"ERROR! Could not set bootloader kernel arguments! ")+bootloader_kernel_args) + elif kernel_params: #If we are in standard mode but have the dosci to add. + try: + self._install_profile.set_bootloader_kernel_args(None, kernel_params, None) + except: + self._d.msgbox(_(u"ERROR! Could not set bootloader kernel arguments! ")+bootloader_kernel_args) + + + def set_timezone(self): + # This section will be for setting the timezone. + zonepath = "/usr/share/zoneinfo" + skiplist = ["zone.tab","iso3166.tab","posixrules"] + while 1: + tzlist = [] + for entry in os.listdir(zonepath): + if entry not in skiplist: + if os.path.isdir(zonepath + "/" + entry): entry += "/" + tzlist.append(entry) + tzlist.sort() + timezone_string = _(u"Please select the timezone for the new installation. Entries ending with a / can be selected to reveal a sub-list of more specific locations. For example, you can select America/ and then Chicago.") + code, tznum = self._d.menu(timezone_string, choices=self._dmenu_list_to_choices(tzlist), height=20, cancel="Back") + if code == self._DLG_OK: + zonepath = os.path.join(zonepath,tzlist[int(tznum)-1]) + if tzlist[int(tznum)-1][-1:] != "/": + break + else: + if zonepath == "/usr/share/zoneinfo": + return + slashloc = zonepath[:-1].rfind("/") + zonepath = zonepath[:slashloc] + try: + self._install_profile.set_time_zone(None, zonepath[20:], None) + except: + self._d.msgbox(_(u"ERROR: Could not set that timezone!")) + + def set_networking(self): + # This section will be for setting up network interfaces + interfaces = self._install_profile.get_network_interfaces() + + while 1: + net_string1 = _(u"Here you will enter all of your network interface information for the new system. You can either choose a network interface to edit, add a network interface, delete an interface, or edit the miscellaneous options such as hostname and proxy servers.") + net_string2 = _(u"To setup your network interface, you can either use DHCP if enabled, or manually enter your network information.\n DHCP (Dynamic Host Configuration Protocol) makes it possible to automatically receive networking information (IP address, netmask, broadcast address, gateway, nameservers etc.). This only works if you have a DHCP server in your network (or if your provider provides a DHCP service). If you do not, you must enter the information manually. Please select your networking configuration method:") + choice_list = [] + for iface in interfaces: + if interfaces[iface][0] == 'dhcp': + choice_list.append((iface, _(u"Settings: DHCP. Options: ")+ interfaces[iface][1])) + else: + choice_list.append((iface, _(u"IP: ")+interfaces[iface][0]+_(u" Broadcast: ")+interfaces[iface][1]+_(u" Netmask: ")+interfaces[iface][2])) + choice_list.append((_(u"Add"),_(u"Add a new network interface"))) + code, iface_choice = self._d.menu(net_string1, choices=choice_list, cancel=_(u"Save and Continue"), height=18, width=77) + if code != self._DLG_OK: + try: + self._install_profile.set_network_interfaces(interfaces) + except: + self._d.msgbox(_(u"ERROR! Could not set the network interfaces!")) + break #This should hopefully move the user down to part two of set_networking + if iface_choice == _(u"Add"): + + device_list = GLIUtility.get_eth_devices() + newchoice_list = [] + for device in device_list: + if device not in interfaces: + newchoice_list.append((device, GLIUtility.get_interface_realname(device))) + newchoice_list.append((_(u"Other"),_(u"Type your own."))) + code, newnic = self._d.menu(_(u"Choose an interface from the list or Other to type your own if it was not detected."), choices=newchoice_list, width=75) + + if newnic == _(u"Other"): + code, newnic = self._d.inputbox(_(u"Enter name for new interface (eth0, ppp0, etc.)")) + if code != self._DLG_OK: + continue + if newnic in interfaces: + self._d.msgbox(_(u"An interface with the name is already defined.")) + continue + #create the interface in the data structure. + #interfaces[newnic] = ("", "", "") + #Change the Yes/No buttons to new labels for this question. + self._d.add_persistent_args(["--yes-label", _(u"DHCP")]) + self._d.add_persistent_args(["--no-label", _(u"Static IP/Manual")]) + if self._d.yesno(net_string2, height=17, width=70) == self._DLG_YES: #DHCP + dhcp_options = "" + if self.advanced_mode: + code, dhcp_options = self._d.inputbox(_(u"If you have any additional DHCP options to pass, type them here in a space-separated list. If you have none, just press Enter."), height=13, width=60) + interfaces[newnic] = ('dhcp', dhcp_options, None) + else: + network_type = 'static' + code, data = self._d.form(_(u'Enter your networking information: (See Chapter 3 of the Handbook for more information) Your broadcast address is probably your IP address with 255 as the last tuple. Do not press Enter until all fields are complete!'), + ((_(u'Enter your IP address:'), 15), + (_(u'Enter your Broadcast address:'), 15), + (_(u'Enter your Netmask:'),15,'255.255.255.0'))) + (ip_address, broadcast, netmask) = data[:-1].split('\n') + if code != self._DLG_OK: + continue + #Set the info now that it's all gathered. + interfaces[newnic] = (ip_address, broadcast, netmask) + else: #they have chosen an interface, present them with edit/delete + #Change the Yes/No buttons to new labels for this question. + self._d.add_persistent_args(["--yes-label", _(u"Edit")]) + self._d.add_persistent_args(["--no-label", _(u"Delete")]) + if self._d.yesno(_(u"For interface %s, you can either edit the interface information (IP Address, Broadcast, Netmask) or Delete the interface.") % iface_choice) == self._DLG_YES: + #Edit + #Change the Yes/No buttons to new labels for this question. + self._d.add_persistent_args(["--yes-label", _(u"DHCP")]) + self._d.add_persistent_args(["--no-label", _(u"Static IP/Manual")]) + if self._d.yesno(net_string2, height=15, width=60) == self._DLG_YES: #DHCP + dhcp_options = "" + if self.advanced_mode: + code, dhcp_options = self._d.inputbox(_(u"If you have any additional DHCP options to pass, type them here in a space-separated list. If you have none, just press Enter."), height=13, width=50) + interfaces[iface_choice] = ('dhcp', dhcp_options, None) + else: + network_type = 'static' + code, data = self._d.form(_(u'Enter your networking information: (See Chapter 3 of the Handbook for more information) Your broadcast address is probably your IP address with 255 as the last tuple. Do not press Enter until all fields are complete!'), + ((_(u'Enter your IP address:'), 15, interfaces[iface_choice][0]), + (_(u'Enter your Broadcast address:'), 15, interfaces[iface_choice][1]), + (_(u'Enter your Netmask:'),15,interfaces[iface_choice][2]))) + (ip_address, broadcast, netmask) = data[:-1].split('\n') + if code != self._DLG_OK: + continue + #Set the info now that it's all gathered. + interfaces[iface_choice] = (ip_address, broadcast, netmask) + else: + #Delete + #Reset the Yes/No buttons + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label", _(u"No")]) + if self._d.yesno(_(u"Are you sure you want to remove the interface ") + iface_choice + "?") == self._DLG_YES: + del interfaces[iface_choice] + + #This section is for defining DNS servers, default routes/gateways, hostname, etc. + #First ask for the default gateway device and IP + interfaces = self._install_profile.get_network_interfaces() + choice_list = [] + for iface in interfaces: + if interfaces[iface][0] == 'dhcp': + choice_list.append((iface, _(u"Settings: DHCP. Options: ")+ interfaces[iface][1],0)) + else: + choice_list.append((iface, _(u"IP: ")+interfaces[iface][0]+_(u" Broadcast: ")+interfaces[iface][1]+_(u" Netmask: ")+interfaces[iface][2],0)) + net_string3 = _(u"To be able to surf on the internet, you must know which host shares the Internet connection. This host is called the gateway. It is usually similar to your IP address, but ending in .1\nIf you have DHCP then just select your primary Internet interface (no IP will be needed) Start by choosing which interface accesses the Internet:") + if choice_list: + if len(choice_list) == 1: #Only one, no need for menu. + gateway_iface = choice_list[0][0] + else: + code, gateway_iface = self._d.radiolist(net_string3, choices=choice_list, height=20, width=67) + if (code == self._DLG_OK) or gateway_iface: #They made a choice. Ask the IP if not DHCP. + while interfaces[gateway_iface][0] != 'dhcp': + code, ip = self._d.inputbox(_(u"Enter the gateway IP address for ") + gateway_iface, init=interfaces[gateway_iface][0]) + if code != self._DLG_OK: + break + if not GLIUtility.is_ip(ip): + self._d.msgbox(_(u"Invalid IP Entered! Please try again.")) + continue + try: + self._install_profile.set_default_gateway(None, ip,{'interface': gateway_iface}) + except: + self._d.msgbox(_(u"ERROR! Coult not set the default gateway with IP %(ip)s for interface %(iface)s" % {'ip': ip, 'iface' : gateway_iface})) + break + #Now ask for the other info in a large form. + error = True + hostname = "" + domainname = "" + nisdomainname = "" + primary_dns = "" + backup_dns = "" + http_proxy = "" + ftp_proxy = "" + rsync_proxy = "" + while error: + error = False + if self.advanced_mode: + code, data = self._d.form(_(u'Fill out the remaining networking settings. The hostname is manditory as that is the name of your computer. Leave the other fields blank if you are not using them. If using DHCP you do not need to enter DNS servers. Do not press Enter until all fields are complete!'), + ((_(u'Enter your Hostname:'), 25, self._install_profile.get_hostname()), + (_(u'Enter your Domain Name:'), 25, self._install_profile.get_domainname()), + (_(u'Enter your NIS Domain Name:'),25,self._install_profile.get_nisdomainname()), + (_(u'Enter a primary DNS server:'),15), + (_(u'Enter a backup DNS server:'),15), + (_(u'Enter a HTTP Proxy IP:'), 15,self._install_profile.get_http_proxy()), + (_(u'Enter a FTP Proxy IP:'), 15, self._install_profile.get_ftp_proxy()), + (_(u'Enter a RSYNC Proxy:'),15,self._install_profile.get_rsync_proxy()))) + if code != self._DLG_OK: + return + (hostname, domainname, nisdomainname, primary_dns, backup_dns, http_proxy, ftp_proxy, rsync_proxy) = data[:-1].split('\n') + else: #standard mode + code, data = self._d.form(_(u'Fill out the remaining networking settings. The hostname is manditory as that is the name of your computer. Leave the other fields blank if you are not using them. If using DHCP you do not need to enter DNS servers. Do not press Enter until all fields are complete!'), + ((_(u'Enter your Hostname:'), 25, self._install_profile.get_hostname()), + (_(u'Enter your Domain Name:'), 25, self._install_profile.get_domainname()), + (_(u'Enter a primary DNS server:'),15), + (_(u'Enter a backup DNS server:'),15))) + if code != self._DLG_OK: + return + (hostname, domainname, primary_dns, backup_dns) = data[:-1].split('\n') + #Check the data before entering it. + if hostname: + if type(hostname) != str: + self._d.msgbox(_(u"Incorrect hostname! It must be a string. Not saved.")) + error = True + else: + try: + self._install_profile.set_hostname(None, hostname, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the hostname:")+hostname) + error = True + if domainname: + if type(domainname) != str: + self._d.msgbox(_(u"Incorrect domainname! It must be a string. Not saved.")) + error = True + else: + try: + self._install_profile.set_domainname(None, domainname, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the domainname:")+domainname) + error = True + if nisdomainname: + if type(nisdomainname) != str: + self._d.msgbox(_(u"Incorrect nisdomainname! It must be a string. Not saved.")) + error = True + else: + try: + self._install_profile.set_nisdomainname(None, nisdomainname, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the nisdomainname:")+nisdomainname) + error = True + if primary_dns: + if not GLIUtility.is_ip(primary_dns): + self._d.msgbox(_(u"Incorrect Primary DNS Server! Not saved.")) + error = True + else: + if backup_dns: + if not GLIUtility.is_ip(backup_dns): + self._d.msgbox(_(u"Incorrect Backup DNS Server! Not saved.")) + error = True + else: + primary_dns = primary_dns + " " + backup_dns + try: + self._install_profile.set_dns_servers(None, primary_dns, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the DNS Servers:")+primary_dns) + error = True + if http_proxy: + if not GLIUtility.is_uri(http_proxy): + self._d.msgbox(_(u"Incorrect HTTP Proxy! It must be a uri. Not saved.")) + error = True + else: + try: + self._install_profile.set_http_proxy(None, http_proxy, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the HTTP Proxy:")+http_proxy) + error = True + if ftp_proxy: + if not GLIUtility.is_uri(ftp_proxy): + self._d.msgbox(_(u"Incorrect FTP Proxy! It must be a uri. Not saved.")) + error = True + else: + try: + self._install_profile.set_ftp_proxy(None, ftp_proxy, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the FTP Proxy:")+ftp_proxy) + error = True + if rsync_proxy: + if not GLIUtility.is_uri(rsync_proxy): + self._d.msgbox(_(u"Incorrect RSYNC Proxy! It must be a uri. Not saved.")) + error = True + else: + try: + self._install_profile.set_rsync_proxy(None, rsync_proxy, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the RSYNC Proxy:")+rsync_proxy) + error = True + + + def set_cron_daemon(self): + if self.networkless: return + cron_daemons = (("vixie-cron", _(u"Paul Vixie's cron daemon, fully featured, RECOMMENDED.")), + ("dcron",_(u"A cute little cron from Matt Dillon.")), + ("fcron", _(u"A scheduler with extended capabilities over cron & anacron")), + ("None", _(u"Don't use a cron daemon. (NOT Recommended!)"))) + cron_string = _(u"A cron daemon executes scheduled commands. It is very handy if you need to execute some command regularly (for instance daily, weekly or monthly). Gentoo offers three possible cron daemons: dcron, fcron and vixie-cron. Installing one of them is similar to installing a system logger. However, dcron and fcron require an extra configuration command, namely crontab /etc/crontab. If you don't know what to choose, use vixie-cron. If doing a networkless install, choose vixie-cron. Choose your cron daemon:") + code, menuitem = self._d.menu(cron_string, choices=cron_daemons, height=21, width=77) + if code == self._DLG_OK: + if menuitem == "None": + menuitem = "" + self._install_profile.set_cron_daemon_pkg(None, menuitem, None) + + def set_logger(self): + if self.networkless: return + loggers = (("syslog-ng", _(u"An advanced system logger.")), + ("metalog", _(u"A Highly-configurable system logger.")), + ("syslogkd", _(u"The traditional set of system logging daemons."))) + logger_string = _(u"Linux has an excellent history of logging capabilities -- if you want you can log everything that happens on your system in logfiles. This happens through the system logger. Gentoo offers several system loggers to choose from. If you plan on using sysklogd or syslog-ng you might want to install logrotate afterwards as those system loggers don't provide any rotation mechanism for the log files. If doing networkless, choose syslog-ng. Choose a system logger:") + code, menuitem = self._d.menu(logger_string, choices=loggers, height=21, width=68) + if code == self._DLG_OK: + self._install_profile.set_logging_daemon_pkg(None, menuitem, None) + + def set_extra_packages(self): + #d.msgbox("This section is for selecting extra packages (pcmcia-cs, rp-pppoe, xorg-x11, etc.) and setting them up") + if self._install_profile.get_install_packages(): + install_packages = self._install_profile.get_install_packages() + if isinstance(install_packages, str): + install_packages = install_packages.split() + else: + install_packages = [] + package_list = self._install_profile.get_install_package_list() + highlevel_menu = [] + for group in package_list: + highlevel_menu.append( (group, package_list[group][0]) ) + highlevel_menu.append( (_(u"Manual"), "Type your own space-separated list of packages.") ) + + while 1: + extra_string1 = _(u"There are thousands of applications available to Gentoo users through Portage, Gentoo's package management system. Select some of the more common ones below or add your own additional package list by choosing 'Manual'.") + code, submenu = self._d.menu(extra_string1+ _(u"\nYour current package list is: ")+string.join(install_packages, ','), choices=highlevel_menu, cancel=_(u"Save and Continue"), width=70, height=23) + if code != self._DLG_OK: #Save and move on. + try: + packages = string.join(install_packages, ' ') + if packages: + self._install_profile.set_install_packages(None, packages, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the install packages! List of packages:")) + return + #Popular Desktop Applications + choices_list = [] + #pkgs = {} + + #Special case first. + if submenu == _(u"Manual"): + code, tmp_install_packages = self._d.inputbox(_(u"Enter a space-separated list of extra packages to install on the system"), init=string.join(install_packages, ' '), width=70) + if code == self._DLG_OK: + install_packages = tmp_install_packages.split() + continue + + #All other cases load pkgs and GRP + pkgs = package_list[submenu][1] + grp_list = GLIUtility.get_grp_pkgs_from_cd() + for pkg in pkgs: + if pkg in grp_list: + choices_list.append((pkg, "(GRP) "+pkgs[pkg], int(pkg in install_packages))) + else: + if not self.networkless: + choices_list.append((pkg, pkgs[pkg], int(pkg in install_packages))) + if not choices_list: continue + code, choices = self._d.checklist(_(u"Choose from the listed packages. If doing a networkless install, only choose (GRP) packages."), choices=choices_list, height=19, list_height=10, width=77) + if code != self._DLG_OK: + continue + for pkg in pkgs: #clear out packages from this list that are already in install_packages so that you can uncheck packages and they will be removed. the ones that remain checked will be re-added. + for i, tmppkg in enumerate(install_packages): + if tmppkg == pkg: + del install_packages[i] + + for package in choices: + install_packages.append(package) + #special cases for desktop environments + if package in ["x11-base/xorg-x11", "gnome-base/gnome","kde", "kde-base/kde-meta","x11-wm/blackbox","x11-wm/enlightenment","x11-wm/e17", "x11-wm/fluxbox","x11-wm/xfce4"]: #ask about X + #Add xorg-x11 if not already there. + if not 'x11-base/xorg-x11' in install_packages: + install_packages.append('x11-base/xorg-x11') + + #Reset the Yes/No buttons + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label", _(u"No")]) + if not self.advanced_mode or self._d.yesno(_(u"Do you want to start X on bootup?")) == self._DLG_YES: + services = self._install_profile.get_services() or 'xdm' + if isinstance(services, list): + services = string.join(services, ',') + if not 'xdm' in services: + services += ',xdm' + try: + self._install_profile.set_services(None, services, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the services list.")) + #rc.conf changes specific to packages. + if package == "gnome": + etc_files = self._install_profile.get_etc_files() + if not "rc.conf" in etc_files: + etc_files['rc.conf'] = {} + etc_files['rc.conf']['DISPLAYMANAGER'] = "gdm" + self._install_profile.set_etc_files(etc_files) + if package == "kde" or package == "kde-meta": + etc_files = self._install_profile.get_etc_files() + if not "rc.conf" in etc_files: + etc_files['rc.conf'] = {} + etc_files['rc.conf']['DISPLAYMANAGER'] = "kdm" + self._install_profile.set_etc_files(etc_files) + if package == "enlightenment": + etc_files = self._install_profile.get_etc_files() + if not "rc.conf" in etc_files: + etc_files['rc.conf'] = {} + etc_files['rc.conf']['DISPLAYMANAGER'] = "entrance" + self._install_profile.set_etc_files(etc_files) + if package == "fluxbox": + etc_files = self._install_profile.get_etc_files() + if not "rc.conf" in etc_files: + etc_files['rc.conf'] = {} + etc_files['rc.conf']['XSESSION'] = "fluxbox" + self._install_profile.set_etc_files(etc_files) + + + + def set_services(self): + if self._install_profile.get_services(): + services = self._install_profile.get_services() + if isinstance(services, str): + services = services.split(',') + else: + services = [] + choice_list = [("alsasound", _(u"ALSA Sound Daemon"),int("alsasound" in services)), + ("apache", _(u"Common web server (version 1.x)"),int("apache" in services)), + ("apache2", _(u"Common web server (version 2.x)"),int("apache2" in services)), + ("distccd", _(u"Distributed Compiling System"),int("distccd" in services)), + ("esound", _(u"ESD Sound Daemon"),int("esound" in services)), + ("hdparm", _(u"Hard Drive Tweaking Utility"),int("hdparm" in services)), + ("local", _(u"Run scripts found in /etc/conf.d/local.start"),int("local" in services)), + ("portmap", _(u"Port Mapping Service"),int("portmap" in services)), + ("proftpd", _(u"Common FTP server"),int("proftpd" in services)), + ("sshd", _(u"SSH Daemon (allows remote logins)"),int("sshd" in services)), + ("xfs", _(u"X Font Server"),int("xfs" in services)), + ("xdm", _(u"X Daemon"),int("xdm" in services)), + (_(u"Other"),_(u"Manually specify your services in a comma-separated list."),0)] + services_string = _(u"Choose the services you want started on bootup. Note that depending on what packages are selected, some services listed will not exist.") + code, services_list = self._d.checklist(services_string, choices=choice_list, height=21, list_height=12, width=77) + if code != self._DLG_OK: + return + services = [] + for service in services_list: + services.append(service) + if _(u"Other") in services_list: + code, services = self._d.inputbox(_(u"Enter a comma-separated list of services to start on boot"), init=string.join(services, ',')) + if code != self._DLG_OK: + return + try: + services = string.join(services, ',') + if services: + self._install_profile.set_services(None, services, None) + except: + self._d.msgbox(_(u"ERROR! Could not set the services list.")) + return + + def set_rc_conf(self): + # This section is for editing /etc/rc.conf + if not self.advanced_mode: + return + etc_files = self._install_profile.get_etc_files() + keymap = "" + windowkeys = "" + ext_keymap = "" + font = "" + trans = "" + clock = "" + editor = "" + disp_manager = "" + xsession = "" + rc_string1 = _(u"Additional configuration settings for Advanced users (rc.conf)\nHere are some other variables you can set in various configuration files on the new system. If you don't know what a variable does, don't change it!") + menulist = [("KEYMAP",_(u"Use KEYMAP to specify the default console keymap.")), + ("SET_WINDOWKEYS", _(u"Decision to first load the 'windowkeys' console keymap")), + ("EXTENDED_KEYMAPS", _(u"maps to load for extended keyboards. Most users will leave this as is.")), + ("CONSOLEFONT", _(u"Specifies the default font that you'd like Linux to use on the console.")), + ("CONSOLETRANSLATION", _(u"The charset map file to use.")), + ("CLOCK", _(u"Set the clock to either UTC or local")), + ("EDITOR", _(u"Set EDITOR to your preferred editor.")), + ("DISPLAYMANAGER", _(u"What display manager do you use ? [ xdm | gdm | kdm | entrance ]")), + ("XSESSION", _(u"a new variable to control what window manager to start default with X"))] + while 1: + code, variable = self._d.menu(rc_string1, choices=menulist, cancel=_(u"Save and Continue"), width=77, height=19) + if code != self._DLG_OK: break - if GLIUtility.is_file(install_profile_xml_file): + if variable == "KEYMAP": + keymap_list = GLIUtility.generate_keymap_list() + code, keymap = self._d.menu(_(u"Choose your desired keymap:"), choices=self._dmenu_list_to_choices(keymap_list), height=19) + if code != self._DLG_OK: + continue + keymap = keymap_list[int(keymap)-1] + + elif variable == "SET_WINDOWKEYS": + #Reset the Yes/No buttons + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label", _(u"No")]) + if self._d.yesno(_(u"Should we first load the 'windowkeys' console keymap? Most x86 users will say 'yes' here. Note that non-x86 users should leave it as 'no'.")) == self._DLG_YES: + windowkeys = "yes" + else: + windowkeys = "no" + elif variable == "EXTENDED_KEYMAPS": + code, ext_keymap = self._d.inputbox(_(u"This sets the maps to load for extended keyboards. Most users will leave this as is. Enter new value for EXTENDED_KEYMAPS"), width=60) + elif variable == "CONSOLEFONT": + font_list = GLIUtility.generate_consolefont_list() + code, font = self._d.menu(_(u"Choose your desired console font:"), choices=self._dmenu_list_to_choices(font_list), height=19) + if code != self._DLG_OK: + continue + font = font_list[int(font)-1] + elif variable == "CONSOLETRANSLATION": + trans_list = GLIUtility.generate_consoletranslation_list() + code, trans = self._d.menu(_(u"Choose your desired console translation:"), choices=self._dmenu_list_to_choices(trans_list), height=19) + if code != self._DLG_OK: + continue + trans = trans_list[int(trans)-1] + elif variable == "CLOCK": + #Change the Yes/No buttons to new labels for this question. + self._d.add_persistent_args(["--yes-label", "UTC"]) + self._d.add_persistent_args(["--no-label", "local"]) + if self._d.yesno(_(u"Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local.")) == self._DLG_YES: + clock = "UTC" + else: + clock = "local" + elif variable == "EDITOR": + choice_list = [("/bin/nano", _(u"Default editor.")), ("/usr/bin/vim", _(u"vi improved editor.")), ("/usr/bin/emacs", _(u"The emacs editor."))] + code, editor = self._d.menu(_(u"Choose your default editor: "), choices=choice_list) + elif variable == "DISPLAYMANAGER": + choice_list = [("xdm", _(u"X Display Manager")), + ("gdm", _(u"Gnome Display Manager")), + ("kdm", _(u"KDE Display Manager")), + ("entrance", _(u"Login Manager for Enlightenment"))] + code, disp_manager = self._d.menu(_(u"Choose your desired display manager to use when starting X (note you must make sure that package also gets installed for it to work):"), choices=choice_list, width=65) + elif variable == "XSESSION": + code, xsession = self._d.inputbox(_(u"Choose what window manager you want to start default with X if run with xdm, startx, or xinit. (common options are Gnome or Xsession):"), width=65, height=12) + + if not "conf.d/keymaps" in etc_files: + if keymap or windowkeys or ext_keymap: + etc_files['conf.d/keymaps'] = {} + if not "conf.d/consolefont" in etc_files: + if font or trans: + etc_files['conf.d/consolefont'] = {} + if not "conf.d/clock" in etc_files: + if clock: + etc_files['conf.d/clock'] = {} + if not "rc.conf" in etc_files: + if editor or disp_manager or xsession: + etc_files['rc.conf'] = {} + if keymap: + etc_files['conf.d/keymaps']['KEYMAP'] = keymap + if windowkeys: + etc_files['conf.d/keymaps']['SET_WINDOWKEYS'] = windowkeys + if ext_keymap: + etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS'] = ext_keymap + if font: + etc_files['conf.d/consolefont']['CONSOLEFONT'] = font + if trans: + etc_files['conf.d/consolefont']['CONSOLETRANSLATION'] = trans + if clock: + etc_files['conf.d/clock']['CLOCK'] = clock + if editor: + etc_files['rc.conf']['EDITOR'] = editor + if disp_manager: + etc_files['rc.conf']['DISPLAYMANAGER'] = disp_manager + if xsession: + etc_files['rc.conf']['XSESSION'] = xsession + self._install_profile.set_etc_files(etc_files) + + def set_root_password(self): + # The root password will be set here + while 1: + code, passwd1 = self._d.passwordbox(_(u"Please enter your desired password for the root account. (note it will not show the password. Also do not try to use backspace.):")) + if code != self._DLG_OK: + return + code, passwd2 = self._d.passwordbox(_(u"Enter the new root password again for confirmation")) + if code != self._DLG_OK: + return + if passwd1 != passwd2: + self._d.msgbox(_(u"The passwords do not match. Please try again or cancel.")) + else: + try: + self._install_profile.set_root_pass_hash(None, GLIUtility.hash_password(passwd1), None) + except: + self._d.msgbox(_(u"ERROR! Could not set the new system root password!")) + self._d.msgbox(_(u"Password saved. Press Enter to continue.")) + return + + def set_additional_users(self): + # This section will be for adding non-root users + users = {} + for user in self._install_profile.get_users(): + users[user[0]] = (user[0], user[1], user[2], user[3], user[4], user[5], user[6]) + while 1: + menu_list = [] + for user in users: + menu_list.append(user) + menu_list.sort() + menu_list.append(_(u"Add user")) + users_string1 = _(u"Working as root on a Unix/Linux system is dangerous and should be avoided as much as possible. Therefore it is strongly recommended to add a user for day-to-day use. Choose a user to edit:") + code, menuitem = self._d.menu(users_string1, choices=self._dmenu_list_to_choices(menu_list), cancel=_(u"Save and Continue"), height=19, width=70) + if code != self._DLG_OK: + #if self._d.yesno("Do you want to save changes?") == self._DLG_YES: + tmpusers = [] + for user in users: + tmpusers.append(users[user]) + try: + self._install_profile.set_users(tmpusers) + except: + self._d.msgbox(_(u"ERROR! Could not set the additional users!")) break - d.msgbox(_(u"Cannot open file ") + install_profile_xml_file, height=7, width=50) - install_profile_xml_file = None + menuitem = menu_list[int(menuitem)-1] + if menuitem == _(u"Add user"): + code, newuser = self._d.inputbox(_(u"Enter the username for the new user")) + if code != self._DLG_OK: + continue + if newuser in users: + self._d.msgbox(_(u"A user with that name already exists")) + continue + match = False + while not match: + code, passwd1 = self._d.passwordbox(_(u"Enter the new password for user %s. (will not be echoed)") % newuser) + code, passwd2 = self._d.passwordbox(_(u"Enter the new password again for confirmation")) + if code == self._DLG_OK: + if passwd1 != passwd2: + self._d.msgbox(_(u"The passwords do not match! Please try again.")) + else: + match = True + else: + self._d.msgbox(_(u"You must enter a password for the user! Even a blank password will do. You can always edit it again later from the menu.")); + #Create the entry for the new user + new_user = [newuser, GLIUtility.hash_password(passwd1), ('users',), '/bin/bash', '/home/' + newuser, '', ''] + users[newuser] = new_user + menuitem = newuser + while 1: + menulist = [_(u"Password"), _(u"Group Membership"), _(u"Shell"), _(u"Home Directory"), _(u"UID"), _(u"Comment"), _(u"Delete")] + code, menuitem2 = self._d.menu(_(u"Choose an option for user %s") % menuitem, choices=self._dmenu_list_to_choices(menulist), cancel=_(u"Back")) + if code != self._DLG_OK: + break + menuitem2 = menulist[int(menuitem2)-1] + if menuitem2 == _(u"Password"): + code, passwd1 = self._d.passwordbox(_(u"Enter the new password")) + if code != self._DLG_OK: + continue + code, passwd2 = self._d.passwordbox(_(u"Enter the new password again")) + if code != self._DLG_OK: + continue + if passwd1 != passwd2: + self._d.msgbox(_(u"The passwords do not match! Try again.")) + continue + self._d.msgbox(_(u"Password saved. Press Enter to continue.")) + users[menuitem][1] = GLIUtility.hash_password(passwd1) + elif menuitem2 == _(u"Group Membership"): + prechk = users[menuitem][2] + choice_list = [("users", _(u"The usual group for normal users."), int("users" in prechk)), + ("wheel", _(u"Allows users to attempt to su to root."), int("wheel" in prechk)), + ("audio", _(u"Allows access to audio devices."), int("audio" in prechk)), + ("games", _(u"Allows access to games."), int("games" in prechk)), + ("apache", _(u"For users who know what they're doing only."), int("apache" in prechk)), + ("cdrom", _(u"For users who know what they're doing only."), int("cdrom" in prechk)), + ("ftp", _(u"For users who know what they're doing only."), int("ftp" in prechk)), + ("video", _(u"For users who know what they're doing only."), int("video" in prechk)), + (_(u"Other"), _(u"Manually specify your groups in a comma-separated list."), 0)] + users_string2 = _(u"Select which groups you would like the user %s to be in." % menuitem) + code, group_list = self._d.checklist(users_string2, choices=choice_list, height=19, list_height=10, width=77) + if code != self._DLG_OK: + break + groups = "" + for group in group_list: + groups += group + "," + if groups: + groups = groups[:-1] + if _(u"Other") in group_list: + code, groups = self._d.inputbox(_(u"Enter a comma-separated list of groups the user is to be in"), init=",".join(users[menuitem][2])) + if code != self._DLG_OK: continue + users[menuitem][2] = string.split(groups, ",") + elif menuitem2 == _(u"Shell"): + code, shell = self._d.inputbox(_(u"Enter the shell you want the user to use. default is /bin/bash. "), init=users[menuitem][3]) + if code != self._DLG_OK: + continue + users[menuitem][3] = shell + elif menuitem2 == _(u"Home Directory"): + code, homedir = self._d.inputbox(_(u"Enter the user's home directory. default is /home/username. "), init=users[menuitem][4]) + if code != self._DLG_OK: + continue + users[menuitem][4] = homedir + elif menuitem2 == _(u"UID"): + code, uid = self._d.inputbox(_(u"Enter the user's UID. If left blank the system will choose a default value (this is recommended)."), init=users[menuitem][5], height=11, width=55) + if code != self._DLG_OK: + continue + if type(uid) != int: + continue + users[menuitem][5] = uid + elif menuitem2 == _(u"Comment"): + code, comment = self._d.inputbox(_(u"Enter the user's comment. This is completely optional."), init=users[menuitem][6]) + if code != self._DLG_OK: + continue + users[menuitem][6] = comment + elif menuitem2 == _(u"Delete"): + #Reset the Yes/No buttons + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label", _(u"No")]) + if self._d.yesno(_(u"Are you sure you want to delete the user %s ?") % menuitem) == self._DLG_YES: + del users[menuitem] + break + + def save_install_profile(self, xmlfilename="", askforfilename=True): + #Reset the Yes/No buttons + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label", _(u"No")]) + if self._d.yesno(_(u"Would you like to save these install settings for use again later?")) == self._DLG_YES: + code = 0 + filename = xmlfilename + if askforfilename: + code, filename = self._d.inputbox(_(u"Enter a filename for the XML file. Use full path!"), init=xmlfilename) + if code != self._DLG_OK or not filename: + return None + if GLIUtility.is_file(filename): + if not self._d.yesno(_(u"The file %s already exists. Do you want to overwrite it?") % filename) == self._DLG_YES: + return None + try: + configuration = open(filename ,"w") + configuration.write(self._install_profile.serialize()) + configuration.close() + except: + self._d.msgbox(_(u"Error. File couldn't be saved. Saving to /tmp/installprofile.xml instead.")) else: - break - skip_wizard_question = False - if install_profile_xml_file != None: - install_profile.parse(install_profile_xml_file) - skip_wizard_question = True - - #These are always done - - gen_install_profile = Setup_InstallProfile(client_profile, install_profile, local_install, advanced_mode, skip_wizard_question, networkless) - install_profile = gen_install_profile.install_profile() - - -# INSTALLATION TIME - current_item = 0 - while 1: - cc.set_install_profile(install_profile) - cc.start_install() - d.gauge_start(_(u"Installation Started!"), title=_(u"Installation progress")) - num_steps_completed = 1 - next_step = 0 - num_steps = 0 + filename = "/tmp/installprofile.xml" + try: + configuration = open("/tmp/installprofile.xml", "w") + configuration.write(self._install_profile.serialize()) + configuration.close() + except: + self._d.msgbox(_(u"Complete failure to save install profile!")) + return filename + +############ RUN PHASE FUNCTIONS ############ + def run_phase1(self): + self.set_arch_template() + self.set_verbose() + self.set_client_networking() + self.set_enable_ssh() + self.set_livecd_password() + self.set_client_kernel_modules() + def run_phase2(self): + self.set_partitions() + self.set_mounts() + self.set_network_mounts() + self.try_steps(['mount_local_partitions','mount_network_shares']) + def run_phase3(self): + self.set_install_stage() + self.set_portage_tree() + self.try_steps(['unpack_stage_tarball', 'update_config_files', 'configure_make_conf','prepare_chroot','install_portage_tree']) + def run_phase4(self): + self.set_make_conf() + self.set_etc_portage() + self.set_distcc() + self.try_steps(['update_config_files', 'configure_make_conf', 'stage1', 'stage2', 'install_distcc']) + + self.set_root_password() + self.set_timezone() + self.try_steps(['set_root_password','set_timezone']) + + self.set_kernel() + self.try_steps(['emerge_kernel_sources','build_kernel']) + + self.set_networking() + self.try_steps(['setup_network_post']) + + if self.advanced_mode: + self.set_cron_daemon() + self.set_logger() + self.try_steps(['install_logging_daemon','install_cron_daemon','install_filesystem_tools']) + + self.set_boot_loader() + self.try_steps(['install_bootloader','setup_and_run_bootloader']) + + self.set_additional_users() + self.try_steps(['set_users']) + + self.set_extra_packages() + if self.advanced_mode: + self.set_services() + self.set_rc_conf() + + #Save the profile + self.save_install_profile() + + self.try_steps(['update_config_files','install_mta','install_packages','set_services','run_post_install_script','finishing_cleanup']) + + + + + def run_phase5(self): + #test function for getting steps. + steps = ['do_recommended_partitioning', + 'mount_local_partitions', + 'mount_network_shares', + 'unpack_stage_tarball', + 'update_config_files', + 'configure_make_conf', + 'prepare_chroot', + 'install_portage_tree', + 'stage1', + 'stage2', + 'set_root_password', + 'set_timezone', + 'emerge_kernel_sources', + 'build_kernel', + 'install_distcc', + 'install_mta', + 'install_logging_daemon', + 'install_cron_daemon', + 'install_filesystem_tools', + 'setup_network_post', + 'install_bootloader', + 'setup_and_run_bootloader', + 'update_config_files', + 'set_users', + 'install_packages', + # services for startup need to come after installing extra packages + # otherwise some of the scripts will not exist. + 'set_services', + 'run_post_install_script', + 'finishing_cleanup'] + + self.try_steps(steps) + + def finish_up(self): + self._d.gauge_update(100, _(u"Install completed!"), update_text=1) + self._d.gauge_stop() + print _(u"Install done!") + sys.exit(0) + + def try_steps(self, steps): + try: + self.do_steps(steps) + sys.stderr.write('\07') #BEEP + except GLIException.GLIException, e: + sys.stderr.write('\07') #BEEP + error = e.get_error_msg() + self.handle_exception(error,steps) + + def handle_exception(self, error, steps): + #Reset the Yes/No labels. + self._d.add_persistent_args(["--yes-label", _(u"Yes")]) + self._d.add_persistent_args(["--no-label",_(u"No")]) + message = _(u"There was an Exception received during the install that is outside of the normal install errors. This is a bad thing. The error was: %s \n You have several ways of handling this. If you cannot resolve it, please submit a bug report (after searching to make sure it's not a known issue and verifying you didn't do something stupid) with the contents of /var/log/install.log and /tmp/installprofile.xml and the version of the installer you used." % str(error)) + #options: 1. drop to console and retry 2. retry. 3. restart the phase 4. clean up and exit 5. don't clean up and exit. + choices = ['Drop to console and then retry on return.', + 'Just retry the step.', + #'Go back and change your choices.', + 'Clean up (unmount partitions) and exit.', + 'Just exit'] + code, choice = self._d.menu(message,choices=self._dmenu_list_to_choices(choices), width=77, height=22) + if code == self._DLG_CANCEL: + sys.exit(0) + choice = choices[int(choice)-1] + if choice == 'Drop to console and then retry on return.': + GLIUtility.spawn_bash() + self.try_steps(steps) + elif choice == 'Just retry the step.': + self.try_steps(steps) #Not sure if this will leave me in a bad spot. + elif choice == 'Go back and change your choices.': + sys.exit(0) + elif choice == 'Clean up (unmount partitions) and exit.': + self.do_steps(['install_failed_cleanup']) + configuration = open("/tmp/installprofile.xml", "w") + configuration.write(self._install_profile.serialize()) + configuration.close() + sys.exit(0) + else: #just exit + configuration = open("/tmp/installprofile.xml", "w") + configuration.write(self._install_profile.serialize()) + configuration.close() + sys.exit(0) + + def do_steps(self, install_steps): + #Start the rest of the installation + # INSTALLATION TIME +# current_item = 0 +# self._cc.set_install_profile(self._install_profile) + install_steps = list(install_steps) +# self._cc.start_install() + if self.just_starting == 1: + self._d.gauge_start(_(u"Installation Started!"), title=_(u"Installation progress"), height="10") + self.just_starting = 0 + else: + self._d.gauge_start(_(u"Continuing Installation"), title=_(u"Installation progress"), height="10") + self.num_steps_completed = 1 + self.num_steps = len(install_steps) + step_name = install_steps.pop(0) + next_step = self._cc.get_step_info(step_name) + self._cc.run_step(step_name) i = 0 while 1: - notification = cc.getNotification() + notification = self._cc.getNotification() if notification == None: time.sleep(1) continue type_r = notification.get_type() data = notification.get_data() if type_r == "exception": - #Reset the Yes/No labels. - d.add_persistent_args(["--yes-label", _(u"Yes")]) - d.add_persistent_args(["--no-label",_(u"No")]) - if d.yesno(_(u"There was an Exception received during the install that is outside of the normal install errors. This is a bad thing. The error was:")+ str(data) + _(u"\nPlease submit a bug report (after searching to make sure it's not a known issue and verifying you didn't do something stupid) with the contents of /var/log/install.log and /tmp/installprofile.xml and the version of the installer you used\nDo you want to cleanup your system to attempt another install?"), width=77, height=22) == DLG_YES: - cc.start_failure_cleanup() - sys.exit(0) - else: - sys.exit(0) + #We need to raise an exception here. This will hopefully be caught by the calling function in a try/except block so that they can decide how best to handle this. + raise GLIException.GLIException("DoStepFailure",'fatal','do_steps',str(data)) elif type_r == "progress": #SECONDARY UPDATIN' GOIN ON IN HERE - diff = (data[0]*100)/num_steps - d.gauge_update(i+diff, _(u"On step %d of %d. Current step: %s\n%s") % (num_steps_completed, num_steps, next_step, data[1]), update_text=1) + diff = (data[0]*100)/self.num_steps + self._d.gauge_update(i+diff, _(u"On step %(A)d of %(B)d. Current step: %(C)s\n%(D)s" % {'A': self.num_steps_completed, 'B': self.num_steps, 'C': next_step, 'D': data[1]}), update_text=1) elif type_r == "int": if data == GLIClientController.NEXT_STEP_READY: - next_step_waiting = False - next_step = cc.get_next_step_info() - num_steps = cc.get_num_steps() - i = (num_steps_completed*100)/num_steps - d.gauge_update(i, _(u"On step %d of %d. Current step: %s") % (num_steps_completed, num_steps, next_step), update_text=1) - num_steps_completed += 1 + if len(install_steps): + step_name = install_steps.pop(0) + else: + return + #print "Step name: " + step_name + next_step = self._cc.get_step_info(step_name) +# num_steps = self._cc.get_num_steps() + i = (self.num_steps_completed*100)/self.num_steps + self._d.gauge_update(i, _(u"On step %(A)d of %(B)d. Current step: %(C)s" % {'A': self.num_steps_completed, 'B': self.num_steps, 'C': next_step}), update_text=1) + self.num_steps_completed += 1 #print "Next step: " + next_step - if cc.has_more_steps(): - cc.next_step() + #if self._cc.has_more_steps(): + self._cc.run_step(step_name) continue - if data == GLIClientController.INSTALL_DONE: - d.gauge_update(100, _(u"Install completed!"), update_text=1) - d.gauge_stop() - print _(u"Install done!") - sys.exit(0) + +# --------------------------End of functions------------------------ +# --------------------------Beginning of MAIN----------------------- +if __name__ == '__main__': + + + #d = dialog.Dialog() + + gli = GLIDialog() + + gli.show_welcome_screen() + gli.ask_load_profile() + gli.ask_advanced_mode() + gli.ask_networkless() + + + gli.run_phase1() #Set up networking + gli.run_phase2() #Do partitioning + gli.run_phase3() #Install stage tarball and portage + gli.run_phase4() #Do everything else + + gli.finish_up() + + sys.exit(0) +#########################End of main################################# diff --git a/src/fe/dialog/languages/GLIGenDialog.pot b/src/fe/dialog/languages/GLIGenDialog.pot deleted file mode 100644 index 81bb8e5..0000000 --- a/src/fe/dialog/languages/GLIGenDialog.pot +++ /dev/null @@ -1,1802 +0,0 @@ -# Gentoo Linux Installer. -# Copyright (C) 2006 -# This file is distributed under the same license as the Gentoo Linux Installer. -# Preston Cody <codeman@gentoo.org>, 2006. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: GenDialog 2006.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-09-02 11:58-0400\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: LANGUAGE <LL@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: GLIGenDialog.py:68 GLIGenDialog.py:78 -msgid "" -"Error! Undefined architecture template specified or found on the current " -"machine" -msgstr "" - -#: GLIGenDialog.py:71 -msgid "" -"Please select the architecture of the computer that gentoo will be installed " -"on. For pentium and AMD 32-bit processors, choose x86. If you don't know " -"your architecture, you should consider another Linux distribution." -msgstr "" - -#: GLIGenDialog.py:83 GLIGenDialog.py:180 GLIGenDialog.py:239 -#: GLIGenDialog.py:429 GLIGenDialog.py:803 GLIGenDialog.py:920 -#: GLIGenDialog.py:979 GLIGenDialog.py:1151 GLIGenDialog.py:1376 -#: GLIGenDialog.py:1492 GLIGenDialog.py:1689 -msgid "Yes" -msgstr "" - -#: GLIGenDialog.py:84 GLIGenDialog.py:181 GLIGenDialog.py:240 -#: GLIGenDialog.py:430 GLIGenDialog.py:804 GLIGenDialog.py:921 -#: GLIGenDialog.py:980 GLIGenDialog.py:1152 GLIGenDialog.py:1377 -#: GLIGenDialog.py:1493 GLIGenDialog.py:1690 -msgid "No" -msgstr "" - -#: GLIGenDialog.py:85 -msgid "" -"Do you want debugging output enabled during the install? This is mainly " -"meant to help the developers debug any bugs." -msgstr "" - -#: GLIGenDialog.py:93 -msgid "" -"The installer logs all important events during the install process to a " -"logfile for debugging purposes.\n" -"The file gets copied to the new system once the install is complete.\n" -"Enter the desired filename and path for the install log (the default is " -"recommended):" -msgstr "" - -#: GLIGenDialog.py:104 -msgid "" -"Enter the mount point to be used to mount the partition(s) where the new " -"system will be installed. The default is /mnt/gentoo and is greatly " -"recommended, but any mount point will do." -msgstr "" - -#: GLIGenDialog.py:121 GLIGenDialog.py:126 GLIGenDialog.py:381 -#: GLIGenDialog.py:386 GLIGenDialog.py:416 GLIGenDialog.py:420 -#: GLIGenDialog.py:694 GLIGenDialog.py:701 GLIGenDialog.py:705 -#: GLIGenDialog.py:776 GLIGenDialog.py:781 GLIGenDialog.py:868 -#: GLIGenDialog.py:873 GLIGenDialog.py:900 GLIGenDialog.py:904 -#: GLIGenDialog.py:1091 GLIGenDialog.py:1094 GLIGenDialog.py:1095 -#: GLIGenDialog.py:1435 GLIGenDialog.py:1443 GLIGenDialog.py:1651 -#: GLIGenDialog.py:1661 -msgid "Other" -msgstr "" - -#: GLIGenDialog.py:121 GLIGenDialog.py:1091 -msgid "Type your own." -msgstr "" - -#: GLIGenDialog.py:122 -msgid "" -"In order to complete most installs, an active Internet connection is " -"required. Listed are the network devices already detected. In this step " -"you will need to setup one network connection for GLI to use to connect to " -"the Internet. If your desired device does not show up in the list, you can " -"select Other and input the device name manually." -msgstr "" - -#: GLIGenDialog.py:127 -msgid "" -"Enter the interface (NIC) you would like to use for installation (e.g. eth0):" -msgstr "" - -#: GLIGenDialog.py:134 GLIGenDialog.py:1105 GLIGenDialog.py:1130 -msgid "DHCP" -msgstr "" - -#: GLIGenDialog.py:135 GLIGenDialog.py:1106 GLIGenDialog.py:1131 -msgid "Static IP/Manual" -msgstr "" - -#: GLIGenDialog.py:136 GLIGenDialog.py:1069 -msgid "" -"To setup your network interface, you can either use DHCP if enabled, or " -"manually enter your network information.\n" -" DHCP (Dynamic Host Configuration Protocol) makes it possible to " -"automatically receive networking information (IP address, netmask, broadcast " -"address, gateway, nameservers etc.). This only works if you have a DHCP " -"server in your network (or if your provider provides a DHCP service). If " -"you do not, you must enter the information manually. Please select your " -"networking configuration method:" -msgstr "" - -#: GLIGenDialog.py:139 GLIGenDialog.py:1110 GLIGenDialog.py:1135 -msgid "" -"If you have any additional DHCP options to pass, type them here in a space-" -"separated list. If you have none, just press Enter." -msgstr "" - -#: GLIGenDialog.py:142 -msgid "" -"Enter your networking information: (See Chapter 3 of the Handbook for more " -"information) Your broadcast address is probably your IP address with 255 as " -"the last tuple. Do not press Enter until all fields you intend to fill out " -"are complete!" -msgstr "" - -#: GLIGenDialog.py:143 GLIGenDialog.py:1115 GLIGenDialog.py:1140 -msgid "Enter your IP address:" -msgstr "" - -#: GLIGenDialog.py:144 GLIGenDialog.py:1116 GLIGenDialog.py:1141 -msgid "Enter your Broadcast address:" -msgstr "" - -#: GLIGenDialog.py:145 GLIGenDialog.py:1117 GLIGenDialog.py:1142 -msgid "Enter your Netmask:" -msgstr "" - -#: GLIGenDialog.py:146 -msgid "Enter your default gateway:" -msgstr "" - -#: GLIGenDialog.py:147 -msgid "Enter a DNS server:" -msgstr "" - -#: GLIGenDialog.py:148 GLIGenDialog.py:1200 -msgid "Enter a HTTP Proxy IP:" -msgstr "" - -#: GLIGenDialog.py:149 GLIGenDialog.py:1201 -msgid "Enter a FTP Proxy IP:" -msgstr "" - -#: GLIGenDialog.py:150 GLIGenDialog.py:1202 -msgid "Enter a RSYNC Proxy:" -msgstr "" - -#: GLIGenDialog.py:176 -msgid "ERROR! Could not set networking information!" -msgstr "" - -#: GLIGenDialog.py:183 -msgid "" -"Do you want SSH enabled during the install? This will allow you to login " -"remotely during the installation process. If choosing Yes, be sure you " -"select a new LiveCD root password!" -msgstr "" - -#: GLIGenDialog.py:193 -msgid "" -"If you want to be able to login to your machine from another console during " -"the installation,\n" -"you will want to enter a new root password for the LIVECD.\n" -"Note that this can be different from your new system's root password.\n" -"Presss Enter twice to skip this step.\n" -"Enter the new LIVECD root password:\t" -msgstr "" - -#: GLIGenDialog.py:201 -msgid "Enter the new LIVECD root password again to verify:" -msgstr "" - -#: GLIGenDialog.py:205 -msgid "The passwords do not match. Please try again." -msgstr "" - -#: GLIGenDialog.py:213 -msgid "ERROR! Could not set the root password on the LiveCD!" -msgstr "" - -#: GLIGenDialog.py:214 GLIGenDialog.py:1580 GLIGenDialog.py:1639 -msgid "Password saved. Press Enter to continue." -msgstr "" - -#: GLIGenDialog.py:219 -msgid "" -"Here is a list of modules currently loaded on your machine.\n" -" Please look through and see if any modules are missing\n" -" that you would like loaded.\n" -"\n" -msgstr "" - -#: GLIGenDialog.py:220 -msgid "Continue" -msgstr "" - -#: GLIGenDialog.py:221 -msgid "Loaded Modules" -msgstr "" - -#: GLIGenDialog.py:222 -msgid "" -"If you have additional modules you would like loaded before the installation " -"begins (ex. a network driver), enter them in a space-separated list." -msgstr "" - -#: GLIGenDialog.py:228 -msgid "ERROR! Could not set the list of kernel modules!" -msgstr "" - -#: GLIGenDialog.py:234 -msgid "Enter a filename for the XML file. Use the full path!" -msgstr "" - -#: GLIGenDialog.py:241 GLIGenDialog.py:1704 -#, python-format -msgid "The file %s already exists. Do you want to overwrite it?" -msgstr "" - -#: GLIGenDialog.py:248 GLIGenDialog.py:1711 -msgid "" -"Error. File couldn't be saved. It will be saved automatically to /tmp " -"before the install." -msgstr "" - -#: GLIGenDialog.py:270 -msgid "ERROR: Could not set networkless information in the profile" -msgstr "" - -#: GLIGenDialog.py:279 -msgid "" -"The first thing on the new system to setup is the partitoning.\n" -"You will first select a drive and then edit its partitions.\n" -"No changes will be saved until the end of the step.\n" -"No changes to your disk will be made until the installation.\n" -"NOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION \"/\"\n" -"If your drive is pre-partitioned, just select the mountpoints and make \n" -"sure that the format option is set to FALSE or it will erase your data.\n" -"The installer does not yet support resizing of partitions (its not safe).\n" -"Please refer to the Gentoo Installation Handbook for more information\n" -"on partitioning and the various filesystem types available in Linux." -msgstr "" - -#: GLIGenDialog.py:308 -msgid "" -"Which drive would you like to partition?\n" -" Info provided: Type, mkfs Options, Mountpoint, Mountopts, Size in MB" -msgstr "" - -#: GLIGenDialog.py:308 GLIGenDialog.py:456 GLIGenDialog.py:1077 -#: GLIGenDialog.py:1333 GLIGenDialog.py:1480 GLIGenDialog.py:1595 -msgid "Save and Continue" -msgstr "" - -#: GLIGenDialog.py:320 GLIGenDialog.py:1729 -msgid " - Unallocated space (" -msgstr "" - -#: GLIGenDialog.py:322 GLIGenDialog.py:1731 -msgid "logical, " -msgstr "" - -#: GLIGenDialog.py:326 GLIGenDialog.py:1735 -msgid " - Extended Partition (" -msgstr "" - -#: GLIGenDialog.py:331 GLIGenDialog.py:397 GLIGenDialog.py:1739 -msgid "Logical (" -msgstr "" - -#: GLIGenDialog.py:333 GLIGenDialog.py:399 GLIGenDialog.py:1741 -msgid "Primary (" -msgstr "" - -#: GLIGenDialog.py:341 GLIGenDialog.py:347 -msgid "Set Recommended Layout (needs 4GB+)" -msgstr "" - -#: GLIGenDialog.py:342 GLIGenDialog.py:353 -msgid "Clear Partitions On This Drive." -msgstr "" - -#: GLIGenDialog.py:343 -msgid "" -"Select a partition or unallocated space to edit\n" -"Key: Minor, Pri/Ext, Filesystem, MkfsOpts, Mountpoint, MountOpts, Size." -msgstr "" - -#: GLIGenDialog.py:343 GLIGenDialog.py:406 GLIGenDialog.py:475 -#: GLIGenDialog.py:516 GLIGenDialog.py:1625 -msgid "Back" -msgstr "" - -#: GLIGenDialog.py:351 -msgid "" -"The recommended layout could NOT be set. The following message was received:" -msgstr "" - -#: GLIGenDialog.py:356 -msgid "Partition table cleared successfully" -msgstr "" - -#: GLIGenDialog.py:358 -msgid "ERROR: could not clear the partition table!" -msgstr "" - -#: GLIGenDialog.py:366 -#, python-format -msgid "" -"Enter the size of the new partition in MB (max %s MB). If creating an " -"extended partition input its entire size (not just the first logical size):" -msgstr "" - -#: GLIGenDialog.py:369 -#, python-format -msgid "The size you entered (%s MB) is larger than the maximum of %s MB" -msgstr "" - -#: GLIGenDialog.py:372 -msgid "Old, stable, but no journaling" -msgstr "" - -#: GLIGenDialog.py:373 -msgid "ext2 with journaling and b-tree indexing (RECOMMENDED)" -msgstr "" - -#: GLIGenDialog.py:374 -msgid "Swap partition for memory overhead" -msgstr "" - -#: GLIGenDialog.py:375 -msgid "Windows filesystem format used in Win9X and XP" -msgstr "" - -#: GLIGenDialog.py:376 -msgid "Windows filesystem format used in Win2K and NT" -msgstr "" - -#: GLIGenDialog.py:377 -msgid "IBM's journaling filesystem. stability unknown." -msgstr "" - -#: GLIGenDialog.py:378 -msgid "Don't use this unless you know you need it." -msgstr "" - -#: GLIGenDialog.py:379 -msgid "B*-tree based filesystem. great performance. Only V3 supported." -msgstr "" - -#: GLIGenDialog.py:380 -msgid "Create an extended partition containing other logical partitions" -msgstr "" - -#: GLIGenDialog.py:381 -msgid "Something else we probably don't support." -msgstr "" - -#: GLIGenDialog.py:382 -msgid "Choose the filesystem type for this new partition." -msgstr "" - -#: GLIGenDialog.py:387 -msgid "Please enter the new partition's type:" -msgstr "" - -#: GLIGenDialog.py:405 GLIGenDialog.py:409 GLIGenDialog.py:1126 -#: GLIGenDialog.py:1624 GLIGenDialog.py:1687 -msgid "Delete" -msgstr "" - -#: GLIGenDialog.py:405 GLIGenDialog.py:415 -msgid "Mount Point" -msgstr "" - -#: GLIGenDialog.py:405 GLIGenDialog.py:424 -msgid "Mount Options" -msgstr "" - -#: GLIGenDialog.py:405 GLIGenDialog.py:427 -msgid "Format" -msgstr "" - -#: GLIGenDialog.py:405 GLIGenDialog.py:436 GLIGenDialog.py:440 -msgid "Extra mkfs.* Parameters" -msgstr "" - -#: GLIGenDialog.py:410 -msgid "Are you sure you want to delete the partition " -msgstr "" - -#: GLIGenDialog.py:417 -msgid "" -"Choose a mountpoint from the list or choose Other to type your own for " -"partition " -msgstr "" - -#: GLIGenDialog.py:417 -msgid ". It is currently set to:" -msgstr "" - -#: GLIGenDialog.py:421 -msgid "Enter a mountpoint for partition " -msgstr "" - -#: GLIGenDialog.py:423 -msgid "ERROR! Could not set mountpoint!" -msgstr "" - -#: GLIGenDialog.py:425 -msgid "Enter your mount options for partition " -msgstr "" - -#: GLIGenDialog.py:431 -msgid "Do you want to format this partition?" -msgstr "" - -#: GLIGenDialog.py:445 -msgid "ERROR: The partition tables could not be set correctly!" -msgstr "" - -#: GLIGenDialog.py:454 GLIGenDialog.py:464 -msgid "Add a new network mount" -msgstr "" - -#: GLIGenDialog.py:456 -msgid "" -"If you have any network shares you would like to mount during the install " -"and for your new system, define them here. Select a network mount to edit or " -"add a new mount. Currently GLI only supports NFS mounts." -msgstr "" - -#: GLIGenDialog.py:461 -msgid "ERROR: Could net set network mounts!" -msgstr "" - -#: GLIGenDialog.py:465 -msgid "" -"Enter NFS mount or just enter the IP/hostname to search for available mounts" -msgstr "" - -#: GLIGenDialog.py:473 -msgid "No NFS exports were detected on " -msgstr "" - -#: GLIGenDialog.py:475 -msgid "Select a NFS export" -msgstr "" - -#: GLIGenDialog.py:480 -#, python-format -msgid "" -"The address you entered, %s, is not a valid IP or hostname. Please try " -"again." -msgstr "" - -#: GLIGenDialog.py:489 -msgid "There is already an entry for " -msgstr "" - -#: GLIGenDialog.py:501 -msgid "Enter a mountpoint" -msgstr "" - -#: GLIGenDialog.py:504 -msgid "Enter mount options" -msgstr "" - -#: GLIGenDialog.py:512 -msgid "Stage1 is used when you want to bootstrap&build from scratch." -msgstr "" - -#: GLIGenDialog.py:513 -msgid "Stage2 is used for building from a bootstrapped semi-compiled state." -msgstr "" - -#: GLIGenDialog.py:514 -msgid "Stage3 is a basic system that has been built for you (no compiling)." -msgstr "" - -#: GLIGenDialog.py:515 -msgid "A Stage3 install but using binaries from the LiveCD when able." -msgstr "" - -#: GLIGenDialog.py:516 -msgid "Which stage do you want to start at?" -msgstr "" - -#: GLIGenDialog.py:520 -msgid "" -"WARNING: Since you are doing a GRP install it is HIGHLY recommended you " -"choose Create from CD to avoid a potentially broken installation." -msgstr "" - -#: GLIGenDialog.py:524 GLIGenDialog.py:529 -msgid "ERROR! Could not set install stage!" -msgstr "" - -#: GLIGenDialog.py:533 -msgid "Create from CD" -msgstr "" - -#: GLIGenDialog.py:534 -msgid "Specify URI" -msgstr "" - -#: GLIGenDialog.py:535 -msgid "" -"Do you want to generate a stage3 on the fly using the files on the LiveCD " -"(fastest) or do you want to grab your stage tarball from the Internet?\n" -msgstr "" - -#: GLIGenDialog.py:540 -msgid "ERROR: Could not set the stage tarball URI!" -msgstr "" - -#: GLIGenDialog.py:553 -msgid "" -"Select a mirror to grab the tarball from or select Cancel to enter an URI " -"manually." -msgstr "" - -#: GLIGenDialog.py:560 -msgid "Select your desired stage tarball:" -msgstr "" - -#: GLIGenDialog.py:571 -msgid "Specify the stage tarball URI or local file:" -msgstr "" - -#: GLIGenDialog.py:577 GLIGenDialog.py:611 GLIGenDialog.py:933 -msgid "" -"The specified URI is invalid. It was not saved. Please go back and try " -"again." -msgstr "" - -#: GLIGenDialog.py:579 -msgid "No URI was specified!" -msgstr "" - -#: GLIGenDialog.py:590 -msgid "ERROR! Could not set the portage cd snapshot URI!" -msgstr "" - -#: GLIGenDialog.py:594 -msgid "Normal. Use emerge sync RECOMMENDED!" -msgstr "" - -#: GLIGenDialog.py:595 -msgid "HTTP daily snapshot. Use when rsync is firewalled." -msgstr "" - -#: GLIGenDialog.py:596 -msgid "Use a portage snapshot, either a local file or a URL" -msgstr "" - -#: GLIGenDialog.py:597 -msgid "Extra cases such as if /usr/portage is an NFS mount" -msgstr "" - -#: GLIGenDialog.py:598 -msgid "" -"Which method do you want to use to sync the portage tree for the " -"installation? If choosing a snapshot you will need to provide the URI for " -"the snapshot if it is not on the livecd." -msgstr "" - -#: GLIGenDialog.py:607 -msgid "Enter portage tree snapshot URI" -msgstr "" - -#: GLIGenDialog.py:616 -msgid "No URI was specified! Returning to default emerge sync." -msgstr "" - -#: GLIGenDialog.py:633 -msgid "" -"The installer will now gather information regarding the contents of /etc/" -"make.conf\n" -"One of the unique (and best) features of Gentoo is the ability to\n" -"define flags (called USE flags) that define what components are \n" -"compiled into applications. For example, you can enable the alsa\n" -"flag and programs that have alsa capability will use it. \n" -"The result is a finely tuned OS with no unnecessary components to\n" -"slow you down.\n" -"The installer divides USE flag selection into two screens, one for\n" -"global USE flags and one for local flags specific to each program.\n" -"Please be patient while the screens load. It may take awhile." -msgstr "" - -#: GLIGenDialog.py:660 -msgid "Choose which *global* USE flags you want on the new system" -msgstr "" - -#: GLIGenDialog.py:668 -msgid "Choose which *local* USE flags you want on the new system" -msgstr "" - -#: GLIGenDialog.py:679 -msgid "Stable" -msgstr "" - -#: GLIGenDialog.py:680 -msgid "Unstable" -msgstr "" - -#: GLIGenDialog.py:681 -msgid "" -"Do you want to run the normal stable portage tree, or the bleeding edge " -"unstable (i.e. ACCEPT_KEYWORDS=arch)? If unsure select stable. Stable is " -"required for GRP installs." -msgstr "" - -#: GLIGenDialog.py:688 GLIGenDialog.py:696 -msgid "Edit your C Flags and Optimization level" -msgstr "" - -#: GLIGenDialog.py:689 -msgid "Change the Host Setting" -msgstr "" - -#: GLIGenDialog.py:690 GLIGenDialog.py:697 -msgid "Specify number of parallel makes (-j) to perform." -msgstr "" - -#: GLIGenDialog.py:691 GLIGenDialog.py:698 -msgid "Change portage functionality settings. (distcc/ccache)" -msgstr "" - -#: GLIGenDialog.py:692 GLIGenDialog.py:699 -msgid "Specify mirrors to use for source retrieval." -msgstr "" - -#: GLIGenDialog.py:693 GLIGenDialog.py:700 -msgid "Specify server used by rsync to sync the portage tree." -msgstr "" - -#: GLIGenDialog.py:694 GLIGenDialog.py:701 -msgid "Specify your own variable and value." -msgstr "" - -#: GLIGenDialog.py:702 -msgid "" -"For experienced users, the following /etc/make.conf variables can also be " -"defined. Choose a variable to edit or Done to continue." -msgstr "" - -#: GLIGenDialog.py:702 GLIGenDialog.py:737 GLIGenDialog.py:869 -msgid "Done" -msgstr "" - -#: GLIGenDialog.py:706 -msgid "Enter the variable name: " -msgstr "" - -#: GLIGenDialog.py:713 GLIGenDialog.py:743 GLIGenDialog.py:790 -msgid "Enter new value for " -msgstr "" - -#: GLIGenDialog.py:728 GLIGenDialog.py:740 -msgid "CLEAR" -msgstr "" - -#: GLIGenDialog.py:728 -msgid "Erase the current value and start over." -msgstr "" - -#: GLIGenDialog.py:729 -msgid "Add a CPU optimization (deprecated in GCC 3.4)" -msgstr "" - -#: GLIGenDialog.py:730 -msgid "Add a CPU optimization (GCC 3.4+)" -msgstr "" - -#: GLIGenDialog.py:731 -msgid "Add an Architecture optimization" -msgstr "" - -#: GLIGenDialog.py:732 -msgid "Add optimization level (please do NOT go over 2)" -msgstr "" - -#: GLIGenDialog.py:733 -msgid "For advanced users only." -msgstr "" - -#: GLIGenDialog.py:734 -msgid "Common additional flag" -msgstr "" - -#: GLIGenDialog.py:735 GLIGenDialog.py:742 GLIGenDialog.py:1329 -#: GLIGenDialog.py:1347 -msgid "Manual" -msgstr "" - -#: GLIGenDialog.py:735 -msgid "Specify your CFLAGS manually" -msgstr "" - -#: GLIGenDialog.py:737 -msgid "" -"Choose a flag to add to the CFLAGS variable or Done to go back. The current " -"value is: " -msgstr "" - -#: GLIGenDialog.py:748 -#, python-format -msgid "Enter the new value for %s (value only):" -msgstr "" - -#: GLIGenDialog.py:759 -msgid "Choose from the available CHOSTs for your architecture." -msgstr "" - -#: GLIGenDialog.py:765 -msgid "" -"Presently the only use is for specifying the number of parallel makes (-j) " -"to perform. The suggested number for parallel makes is CPUs+1. Enter the " -"NUMBER ONLY:" -msgstr "" - -#: GLIGenDialog.py:771 -msgid "enables sandboxing when running emerge and ebuild." -msgstr "" - -#: GLIGenDialog.py:772 -msgid "enables ccache support via CC." -msgstr "" - -#: GLIGenDialog.py:773 -msgid "enables distcc support via CC." -msgstr "" - -#: GLIGenDialog.py:774 -msgid "enables distfiles locking using fcntl or hardlinks." -msgstr "" - -#: GLIGenDialog.py:775 -msgid "create binaries of all packages emerged" -msgstr "" - -#: GLIGenDialog.py:776 -msgid "Input your list of FEATURES manually." -msgstr "" - -#: GLIGenDialog.py:777 -msgid "" -"FEATURES are settings that affect the functionality of portage. Most of " -"these settings are for developer use, but some are available to non-" -"developers as well." -msgstr "" - -#: GLIGenDialog.py:782 -msgid "Enter the value of FEATURES: " -msgstr "" - -#: GLIGenDialog.py:799 GLIGenDialog.py:856 -msgid "ERROR! Could not set the make_conf correctly!" -msgstr "" - -#: GLIGenDialog.py:805 -msgid "" -"Do you want to use distcc to compile your extra packages during the install " -"and for future compilations as well?" -msgstr "" - -#: GLIGenDialog.py:820 GLIGenDialog.py:1387 GLIGenDialog.py:1452 -msgid "ERROR! Could not set the services list." -msgstr "" - -#: GLIGenDialog.py:826 -msgid "ERROR! Could not set the install distcc flag!" -msgstr "" - -#: GLIGenDialog.py:847 -msgid "" -"Enter the hosts to be used by distcc for compilation:\n" -"Example: localhost 192.168.0.2 192.168.0.3:4000/10" -msgstr "" - -#: GLIGenDialog.py:864 -msgid "A list of DEPEND atoms to mask." -msgstr "" - -#: GLIGenDialog.py:865 -msgid "A list of packages to unmask." -msgstr "" - -#: GLIGenDialog.py:866 -msgid "Per-package KEYWORDS (like ACCEPT_KEYWORDS)." -msgstr "" - -#: GLIGenDialog.py:867 -msgid "Per-package USE flags." -msgstr "" - -#: GLIGenDialog.py:868 -msgid "Type your own name of a file to edit in /etc/" -msgstr "" - -#: GLIGenDialog.py:869 -msgid "" -"For experienced users, the following /etc/* variables can also be defined. " -"Choose a variable to edit or Done to continue." -msgstr "" - -#: GLIGenDialog.py:874 -msgid "" -"Enter the name of the /etc/ file you would like to edit (DO NOT type /etc/)" -msgstr "" - -#: GLIGenDialog.py:881 -msgid "Enter new contents (use \\n for newline) of " -msgstr "" - -#: GLIGenDialog.py:888 -msgid "ERROR! Could not set etc/portage/* correctly!" -msgstr "" - -#: GLIGenDialog.py:895 -msgid "Copy over the current running kernel (fastest)" -msgstr "" - -#: GLIGenDialog.py:896 -msgid "The Unaltered Linux Kernel ver 2.6+ (safest)" -msgstr "" - -#: GLIGenDialog.py:897 -msgid "Gentoo's optimized 2.6+ kernel. (less safe)" -msgstr "" - -#: GLIGenDialog.py:898 -msgid "Hardened sources for the 2.6 kernel tree" -msgstr "" - -#: GLIGenDialog.py:899 -msgid "Vanilla sources with grsecurity patches" -msgstr "" - -#: GLIGenDialog.py:900 -msgid "Choose one of the other sources available." -msgstr "" - -#: GLIGenDialog.py:901 -msgid "" -"Choose which kernel sources to use for your system. If using a previously-" -"made kernel configuration, make sure the sources match the kernel used to " -"create the configuration." -msgstr "" - -#: GLIGenDialog.py:905 -msgid "Please enter the desired kernel sources package name:" -msgstr "" - -#: GLIGenDialog.py:910 -msgid "ERROR! Could not set the kernel source package!" -msgstr "" - -#: GLIGenDialog.py:913 -msgid "Genkernel" -msgstr "" - -#: GLIGenDialog.py:914 -msgid "Traditional (requires a config!)" -msgstr "" - -#: GLIGenDialog.py:915 -msgid "" -"There are currently two ways the installer can compile a kernel for your new " -"system. You can either provide a previously-made kernel configuration file " -"and use the traditional kernel-compiling procedure (no initrd) or have " -"genkernel automatically create your kernel for you (with initrd). \n" -"\n" -" If you do not have a previously-made kernel configuration, YOU MUST CHOOSE " -"Genkernel. Choose which method you want to use." -msgstr "" - -#: GLIGenDialog.py:922 -msgid "Do you want the bootsplash screen to show up on bootup?" -msgstr "" - -#: GLIGenDialog.py:929 -msgid "" -"If you have a custom kernel configuration, enter its location (otherwise " -"just press Enter to continue):" -msgstr "" - -#: GLIGenDialog.py:938 -msgid "ERROR! Could not set the kernel config URI!" -msgstr "" - -#: GLIGenDialog.py:962 GLIGenDialog.py:964 -msgid "GRand Unified Bootloader, newer, RECOMMENDED" -msgstr "" - -#: GLIGenDialog.py:966 -msgid "LInux LOader, older, traditional.(detects windows partitions)" -msgstr "" - -#: GLIGenDialog.py:968 -msgid "Do not install a bootloader. (System may be unbootable!)" -msgstr "" - -#: GLIGenDialog.py:969 -msgid "" -"To boot successfully into your new Linux system, a bootloader will be " -"needed. If you already have a bootloader you want to use you can select " -"None here. The bootloader choices available are dependent on what GLI " -"supports and what architecture your system is. Choose a bootloader" -msgstr "" - -#: GLIGenDialog.py:976 -msgid "ERROR! Could not set boot loader pkg! " -msgstr "" - -#: GLIGenDialog.py:981 -msgid "" -"Most bootloaders have the ability to install to either the Master Boot " -"Record (MBR) or some other partition. Most people will want their " -"bootloader installed on the MBR for successful boots, but if you have " -"special circumstances, you can have the bootloader installed to the /boot " -"partition instead. Do you want the boot loader installed in the MBR? (YES " -"is RECOMMENDED)" -msgstr "" - -#: GLIGenDialog.py:989 -#, python-format -msgid "" -"Your boot device may not be correct. It is currently set to %s, but this " -"device may not be the first to boot. Usually boot devices end in 'a' such " -"as hda or sda." -msgstr "" - -#: GLIGenDialog.py:990 -msgid " Please confirm your boot device by choosing it from the menu." -msgstr "" - -#: GLIGenDialog.py:998 -msgid "" -"ERROR: No drives set up. Please complete the Partitioning screen first!" -msgstr "" - -#: GLIGenDialog.py:1007 -msgid "ERROR! Could not set the boot device!" -msgstr "" - -#: GLIGenDialog.py:1009 -msgid "" -"If you have any additional optional arguments you want to pass to the kernel " -"at boot, type them here or just press Enter to continue:" -msgstr "" - -#: GLIGenDialog.py:1014 GLIGenDialog.py:1019 -msgid "ERROR! Could not set bootloader kernel arguments! " -msgstr "" - -#: GLIGenDialog.py:1033 -msgid "" -"Please select the timezone for the new installation. Entries ending with " -"a / can be selected to reveal a sub-list of more specific locations. For " -"example, you can select America/ and then Chicago." -msgstr "" - -#: GLIGenDialog.py:1047 -msgid "ERROR: Could not set that timezone!" -msgstr "" - -#: GLIGenDialog.py:1068 -msgid "" -"Here you will enter all of your network interface information for the new " -"system. You can either choose a network interface to edit, add a network " -"interface, delete an interface, or edit the miscellaneous options such as " -"hostname and proxy servers." -msgstr "" - -#: GLIGenDialog.py:1073 GLIGenDialog.py:1162 -msgid "Settings: DHCP. Options: " -msgstr "" - -#: GLIGenDialog.py:1075 GLIGenDialog.py:1164 GLIGenDialog.py:1794 -msgid "IP: " -msgstr "" - -#: GLIGenDialog.py:1075 GLIGenDialog.py:1164 GLIGenDialog.py:1794 -msgid " Broadcast: " -msgstr "" - -#: GLIGenDialog.py:1075 GLIGenDialog.py:1164 GLIGenDialog.py:1794 -msgid " Netmask: " -msgstr "" - -#: GLIGenDialog.py:1076 GLIGenDialog.py:1084 -msgid "Add" -msgstr "" - -#: GLIGenDialog.py:1076 -msgid "Add a new network interface" -msgstr "" - -#: GLIGenDialog.py:1082 -msgid "ERROR! Could not set the network interfaces!" -msgstr "" - -#: GLIGenDialog.py:1092 -msgid "" -"Choose an interface from the list or Other to type your own if it was not " -"detected." -msgstr "" - -#: GLIGenDialog.py:1096 -msgid "Enter name for new interface (eth0, ppp0, etc.)" -msgstr "" - -#: GLIGenDialog.py:1100 -msgid "An interface with the name is already defined." -msgstr "" - -#: GLIGenDialog.py:1114 GLIGenDialog.py:1139 -msgid "" -"Enter your networking information: (See Chapter 3 of the Handbook for more " -"information) Your broadcast address is probably your IP address with 255 as " -"the last tuple. Do not press Enter until all fields are complete!" -msgstr "" - -#: GLIGenDialog.py:1125 -msgid "Edit" -msgstr "" - -#: GLIGenDialog.py:1127 -#, python-format -msgid "" -"For interface %s, you can either edit the interface information (IP Address, " -"Broadcast, Netmask) or Delete the interface." -msgstr "" - -#: GLIGenDialog.py:1153 -msgid "Are you sure you want to remove the interface " -msgstr "" - -#: GLIGenDialog.py:1165 -msgid "" -"To be able to surf on the internet, you must know which host shares the " -"Internet connection. This host is called the gateway. It is usually similar " -"to your IP address, but ending in .1\n" -"If you have DHCP then just select your primary Internet interface (no IP " -"will be needed) Start by choosing which interface accesses the Internet:" -msgstr "" - -#: GLIGenDialog.py:1170 -msgid "Enter the gateway IP address for " -msgstr "" - -#: GLIGenDialog.py:1174 -msgid "Invalid IP Entered! Please try again." -msgstr "" - -#: GLIGenDialog.py:1179 -#, python-format -msgid "ERROR! Coult not set the default gateway with IP %s for interface %s" -msgstr "" - -#: GLIGenDialog.py:1194 GLIGenDialog.py:1207 -msgid "" -"Fill out the remaining networking settings. The hostname is manditory as " -"that is the name of your computer. Leave the other fields blank if you are " -"not using them. If using DHCP you do not need to enter DNS servers. Do not " -"press Enter until all fields are complete!" -msgstr "" - -#: GLIGenDialog.py:1195 GLIGenDialog.py:1208 -msgid "Enter your Hostname:" -msgstr "" - -#: GLIGenDialog.py:1196 GLIGenDialog.py:1209 -msgid "Enter your Domain Name:" -msgstr "" - -#: GLIGenDialog.py:1197 -msgid "Enter your NIS Domain Name:" -msgstr "" - -#: GLIGenDialog.py:1198 GLIGenDialog.py:1210 -msgid "Enter a primary DNS server:" -msgstr "" - -#: GLIGenDialog.py:1199 GLIGenDialog.py:1211 -msgid "Enter a backup DNS server:" -msgstr "" - -#: GLIGenDialog.py:1218 -msgid "Incorrect hostname! It must be a string. Not saved." -msgstr "" - -#: GLIGenDialog.py:1224 -msgid "ERROR! Could not set the hostname:" -msgstr "" - -#: GLIGenDialog.py:1228 -msgid "Incorrect domainname! It must be a string. Not saved." -msgstr "" - -#: GLIGenDialog.py:1234 -msgid "ERROR! Could not set the domainname:" -msgstr "" - -#: GLIGenDialog.py:1238 -msgid "Incorrect nisdomainname! It must be a string. Not saved." -msgstr "" - -#: GLIGenDialog.py:1244 -msgid "ERROR! Could not set the nisdomainname:" -msgstr "" - -#: GLIGenDialog.py:1248 -msgid "Incorrect Primary DNS Server! Not saved." -msgstr "" - -#: GLIGenDialog.py:1253 -msgid "Incorrect Backup DNS Server! Not saved." -msgstr "" - -#: GLIGenDialog.py:1260 -msgid "ERROR! Could not set the DNS Servers:" -msgstr "" - -#: GLIGenDialog.py:1264 -msgid "Incorrect HTTP Proxy! It must be a uri. Not saved." -msgstr "" - -#: GLIGenDialog.py:1270 -msgid "ERROR! Could not set the HTTP Proxy:" -msgstr "" - -#: GLIGenDialog.py:1274 -msgid "Incorrect FTP Proxy! It must be a uri. Not saved." -msgstr "" - -#: GLIGenDialog.py:1280 -msgid "ERROR! Could not set the FTP Proxy:" -msgstr "" - -#: GLIGenDialog.py:1284 -msgid "Incorrect RSYNC Proxy! It must be a uri. Not saved." -msgstr "" - -#: GLIGenDialog.py:1290 -msgid "ERROR! Could not set the RSYNC Proxy:" -msgstr "" - -#: GLIGenDialog.py:1296 -msgid "Paul Vixie's cron daemon, fully featured, RECOMMENDED." -msgstr "" - -#: GLIGenDialog.py:1297 -msgid "A cute little cron from Matt Dillon." -msgstr "" - -#: GLIGenDialog.py:1298 -msgid "A scheduler with extended capabilities over cron & anacron" -msgstr "" - -#: GLIGenDialog.py:1299 -msgid "Don't use a cron daemon. (NOT Recommended!)" -msgstr "" - -#: GLIGenDialog.py:1300 -msgid "" -"A cron daemon executes scheduled commands. It is very handy if you need to " -"execute some command regularly (for instance daily, weekly or monthly). " -"Gentoo offers three possible cron daemons: dcron, fcron and vixie-cron. " -"Installing one of them is similar to installing a system logger. However, " -"dcron and fcron require an extra configuration command, namely crontab /etc/" -"crontab. If you don't know what to choose, use vixie-cron. If doing a " -"networkless install, choose vixie-cron. Choose your cron daemon:" -msgstr "" - -#: GLIGenDialog.py:1309 -msgid "An advanced system logger." -msgstr "" - -#: GLIGenDialog.py:1310 -msgid "A Highly-configurable system logger." -msgstr "" - -#: GLIGenDialog.py:1311 -msgid "The traditional set of system logging daemons." -msgstr "" - -#: GLIGenDialog.py:1312 -msgid "" -"Linux has an excellent history of logging capabilities -- if you want you " -"can log everything that happens on your system in logfiles. This happens " -"through the system logger. Gentoo offers several system loggers to choose " -"from. If you plan on using sysklogd or syslog-ng you might want to install " -"logrotate afterwards as those system loggers don't provide any rotation " -"mechanism for the log files. If doing networkless, choose syslog-ng. " -"Choose a system logger:" -msgstr "" - -#: GLIGenDialog.py:1332 -msgid "" -"There are thousands of applications available to Gentoo users through " -"Portage, Gentoo's package management system. Select some of the more common " -"ones below or add your own additional package list by choosing 'Manual'." -msgstr "" - -#: GLIGenDialog.py:1333 -msgid "" -"\n" -"Your current package list is: " -msgstr "" - -#: GLIGenDialog.py:1340 -msgid "ERROR! Could not set the install packages! List of packages:" -msgstr "" - -#: GLIGenDialog.py:1348 -msgid "Enter a space-separated list of extra packages to install on the system" -msgstr "" - -#: GLIGenDialog.py:1363 -msgid "" -"Choose from the listed packages. If doing a networkless install, only " -"choose (GRP) packages." -msgstr "" - -#: GLIGenDialog.py:1378 -msgid "Do you want to start X on bootup?" -msgstr "" - -#: GLIGenDialog.py:1423 -msgid "ALSA Sound Daemon" -msgstr "" - -#: GLIGenDialog.py:1424 -msgid "Common web server (version 1.x)" -msgstr "" - -#: GLIGenDialog.py:1425 -msgid "Common web server (version 2.x)" -msgstr "" - -#: GLIGenDialog.py:1426 -msgid "Distributed Compiling System" -msgstr "" - -#: GLIGenDialog.py:1427 -msgid "ESD Sound Daemon" -msgstr "" - -#: GLIGenDialog.py:1428 -msgid "Hard Drive Tweaking Utility" -msgstr "" - -#: GLIGenDialog.py:1429 -msgid "Run scripts found in /etc/conf.d/local.start" -msgstr "" - -#: GLIGenDialog.py:1430 -msgid "Port Mapping Service" -msgstr "" - -#: GLIGenDialog.py:1431 -msgid "Common FTP server" -msgstr "" - -#: GLIGenDialog.py:1432 -msgid "SSH Daemon (allows remote logins)" -msgstr "" - -#: GLIGenDialog.py:1433 -msgid "X Font Server" -msgstr "" - -#: GLIGenDialog.py:1434 -msgid "X Daemon" -msgstr "" - -#: GLIGenDialog.py:1435 -msgid "Manually specify your services in a comma-separated list." -msgstr "" - -#: GLIGenDialog.py:1436 -msgid "" -"Choose the services you want started on bootup. Note that depending on what " -"packages are selected, some services listed will not exist." -msgstr "" - -#: GLIGenDialog.py:1444 -msgid "Enter a comma-separated list of services to start on boot" -msgstr "" - -#: GLIGenDialog.py:1469 -msgid "" -"Additional configuration settings for Advanced users (rc.conf)\n" -"Here are some other variables you can set in various configuration files on " -"the new system. If you don't know what a variable does, don't change it!" -msgstr "" - -#: GLIGenDialog.py:1470 -msgid "Use KEYMAP to specify the default console keymap." -msgstr "" - -#: GLIGenDialog.py:1471 -msgid "Decision to first load the 'windowkeys' console keymap" -msgstr "" - -#: GLIGenDialog.py:1472 -msgid "maps to load for extended keyboards. Most users will leave this as is." -msgstr "" - -#: GLIGenDialog.py:1473 -msgid "Specifies the default font that you'd like Linux to use on the console." -msgstr "" - -#: GLIGenDialog.py:1474 -msgid "The charset map file to use." -msgstr "" - -#: GLIGenDialog.py:1475 -msgid "Set the clock to either UTC or local" -msgstr "" - -#: GLIGenDialog.py:1476 -msgid "Set EDITOR to your preferred editor." -msgstr "" - -#: GLIGenDialog.py:1477 -msgid "What display manager do you use ? [ xdm | gdm | kdm | entrance ]" -msgstr "" - -#: GLIGenDialog.py:1478 -msgid "a new variable to control what window manager to start default with X" -msgstr "" - -#: GLIGenDialog.py:1485 -msgid "Choose your desired keymap:" -msgstr "" - -#: GLIGenDialog.py:1494 -msgid "" -"Should we first load the 'windowkeys' console keymap? Most x86 users will " -"say 'yes' here. Note that non-x86 users should leave it as 'no'." -msgstr "" - -#: GLIGenDialog.py:1499 -msgid "" -"This sets the maps to load for extended keyboards. Most users will leave " -"this as is. Enter new value for EXTENDED_KEYMAPS" -msgstr "" - -#: GLIGenDialog.py:1502 -msgid "Choose your desired console font:" -msgstr "" - -#: GLIGenDialog.py:1508 -msgid "Choose your desired console translation:" -msgstr "" - -#: GLIGenDialog.py:1516 -msgid "" -"Should CLOCK be set to UTC or local? Unless you set your timezone to UTC " -"you will want to choose local." -msgstr "" - -#: GLIGenDialog.py:1521 -msgid "Default editor." -msgstr "" - -#: GLIGenDialog.py:1521 -msgid "vi improved editor." -msgstr "" - -#: GLIGenDialog.py:1521 -msgid "The emacs editor." -msgstr "" - -#: GLIGenDialog.py:1522 -msgid "Choose your default editor: " -msgstr "" - -#: GLIGenDialog.py:1524 -msgid "X Display Manager" -msgstr "" - -#: GLIGenDialog.py:1525 -msgid "Gnome Display Manager" -msgstr "" - -#: GLIGenDialog.py:1526 -msgid "KDE Display Manager" -msgstr "" - -#: GLIGenDialog.py:1527 -msgid "Login Manager for Enlightenment" -msgstr "" - -#: GLIGenDialog.py:1528 -msgid "" -"Choose your desired display manager to use when starting X (note you must " -"make sure that package also gets installed for it to work):" -msgstr "" - -#: GLIGenDialog.py:1530 -msgid "" -"Choose what window manager you want to start default with X if run with xdm, " -"startx, or xinit. (common options are Gnome or Xsession:" -msgstr "" - -#: GLIGenDialog.py:1567 -msgid "" -"Please enter your desired password for the root account. (note it will not " -"show the password. Also do not try to use backspace.):" -msgstr "" - -#: GLIGenDialog.py:1570 -msgid "Enter the new root password again for confirmation" -msgstr "" - -#: GLIGenDialog.py:1574 -msgid "The passwords do not match. Please try again or cancel." -msgstr "" - -#: GLIGenDialog.py:1579 -msgid "ERROR! Could not set the new system root password!" -msgstr "" - -#: GLIGenDialog.py:1593 GLIGenDialog.py:1607 -msgid "Add user" -msgstr "" - -#: GLIGenDialog.py:1594 -msgid "" -"Working as root on a Unix/Linux system is dangerous and should be avoided as " -"much as possible. Therefore it is strongly recommended to add a user for day-" -"to-day use. Choose a user to edit:" -msgstr "" - -#: GLIGenDialog.py:1604 -msgid "ERROR! Could not set the additional users!" -msgstr "" - -#: GLIGenDialog.py:1608 -msgid "Enter the username for the new user" -msgstr "" - -#: GLIGenDialog.py:1612 -msgid "A user with that name already exists" -msgstr "" - -#: GLIGenDialog.py:1614 -msgid "Enter the new password for user " -msgstr "" - -#: GLIGenDialog.py:1615 -msgid "Enter the new password again for confirmation" -msgstr "" - -#: GLIGenDialog.py:1618 -msgid "The passwords do not match! Go to the menu and try again." -msgstr "" - -#: GLIGenDialog.py:1624 GLIGenDialog.py:1629 -msgid "Password" -msgstr "" - -#: GLIGenDialog.py:1624 GLIGenDialog.py:1641 -msgid "Group Membership" -msgstr "" - -#: GLIGenDialog.py:1624 GLIGenDialog.py:1665 -msgid "Shell" -msgstr "" - -#: GLIGenDialog.py:1624 GLIGenDialog.py:1670 -msgid "Home Directory" -msgstr "" - -#: GLIGenDialog.py:1624 GLIGenDialog.py:1675 -msgid "UID" -msgstr "" - -#: GLIGenDialog.py:1624 GLIGenDialog.py:1682 -msgid "Comment" -msgstr "" - -#: GLIGenDialog.py:1625 -msgid "Choose an option for user " -msgstr "" - -#: GLIGenDialog.py:1630 -msgid "Enter the new password" -msgstr "" - -#: GLIGenDialog.py:1633 -msgid "Enter the new password again" -msgstr "" - -#: GLIGenDialog.py:1637 -msgid "The passwords do not match! Try again." -msgstr "" - -#: GLIGenDialog.py:1643 -msgid "The usual group for normal users." -msgstr "" - -#: GLIGenDialog.py:1644 -msgid "Allows users to attempt to su to root." -msgstr "" - -#: GLIGenDialog.py:1645 -msgid "Allows access to audio devices." -msgstr "" - -#: GLIGenDialog.py:1646 -msgid "Allows access to games." -msgstr "" - -#: GLIGenDialog.py:1647 GLIGenDialog.py:1648 GLIGenDialog.py:1649 -#: GLIGenDialog.py:1650 -msgid "For users who know what they're doing only." -msgstr "" - -#: GLIGenDialog.py:1651 -msgid "Manually specify your groups in a comma-separated list." -msgstr "" - -#: GLIGenDialog.py:1652 -#, python-format -msgid "Select which groups you would like the user %s to be in." -msgstr "" - -#: GLIGenDialog.py:1662 -msgid "Enter a comma-separated list of groups the user is to be in" -msgstr "" - -#: GLIGenDialog.py:1666 -msgid "Enter the shell you want the user to use. default is /bin/bash. " -msgstr "" - -#: GLIGenDialog.py:1671 -msgid "Enter the user's home directory. default is /home/username. " -msgstr "" - -#: GLIGenDialog.py:1676 -msgid "" -"Enter the user's UID. If left blank the system will choose a default value " -"(this is recommended)." -msgstr "" - -#: GLIGenDialog.py:1683 -msgid "Enter the user's comment. This is completely optional." -msgstr "" - -#: GLIGenDialog.py:1691 -msgid "Are you sure you want to delete the user " -msgstr "" - -#: GLIGenDialog.py:1700 -msgid "Enter a filename for the XML file. Use full path!" -msgstr "" - -#: GLIGenDialog.py:1714 -msgid "" -"Look carefully at the following settings to check for mistakes.\n" -"These are the installation settings you have chosen:\n" -"\n" -msgstr "" - -#: GLIGenDialog.py:1716 -msgid "" -"Partitioning: \n" -" Key: Minor, Pri/Ext, Filesystem, MkfsOpts, Mountpoint, MountOpts, Size.\n" -msgstr "" - -#: GLIGenDialog.py:1721 -msgid " Drive: " -msgstr "" - -#: GLIGenDialog.py:1751 -msgid "" -"\n" -"Network Mounts: \n" -msgstr "" - -#: GLIGenDialog.py:1756 -msgid "" -"\n" -"Install Stage: " -msgstr "" - -#: GLIGenDialog.py:1758 -msgid " Tarball will be generated on the fly from the CD.\n" -msgstr "" - -#: GLIGenDialog.py:1760 -msgid " Tarball URI: " -msgstr "" - -#: GLIGenDialog.py:1763 -msgid "" -"\n" -"Portage Tree Sync Type: " -msgstr "" - -#: GLIGenDialog.py:1765 -msgid " Portage snapshot URI: " -msgstr "" - -#: GLIGenDialog.py:1768 -msgid "" -"\n" -"Kernel Settings:\n" -msgstr "" - -#: GLIGenDialog.py:1769 -msgid " Kernel Sources: " -msgstr "" - -#: GLIGenDialog.py:1771 -msgid " Kernel Build Method: " -msgstr "" - -#: GLIGenDialog.py:1773 -msgid " Kernel Bootsplash Option: " -msgstr "" - -#: GLIGenDialog.py:1775 -msgid " Kernel Configuration URI: " -msgstr "" - -#: GLIGenDialog.py:1778 -msgid "" -"\n" -"Bootloader Settings:\n" -msgstr "" - -#: GLIGenDialog.py:1779 -msgid " Bootloader package: " -msgstr "" - -#: GLIGenDialog.py:1781 -msgid " Install bootloader to MBR: " -msgstr "" - -#: GLIGenDialog.py:1782 -msgid " Bootloader kernel arguments: " -msgstr "" - -#: GLIGenDialog.py:1785 -msgid "" -"\n" -"Timezone: " -msgstr "" - -#: GLIGenDialog.py:1788 -msgid "" -"\n" -"Networking Settings: \n" -msgstr "" - -#: GLIGenDialog.py:1792 -msgid ": Settings: DHCP. Options: " -msgstr "" - -#: GLIGenDialog.py:1797 -msgid " Default Gateway: " -msgstr "" - -#: GLIGenDialog.py:1798 -msgid " Hostname: " -msgstr "" - -#: GLIGenDialog.py:1800 -msgid " Domainname: " -msgstr "" - -#: GLIGenDialog.py:1802 -msgid " NIS Domainname: " -msgstr "" - -#: GLIGenDialog.py:1805 -msgid " DNS Server: " -msgstr "" - -#: GLIGenDialog.py:1807 -msgid " HTTP Proxy: " -msgstr "" - -#: GLIGenDialog.py:1809 -msgid " FTP Proxy: " -msgstr "" - -#: GLIGenDialog.py:1811 -msgid " RSYNC Proxy: " -msgstr "" - -#: GLIGenDialog.py:1814 -msgid "" -"\n" -"Cron Daemon: " -msgstr "" - -#: GLIGenDialog.py:1817 -msgid "" -"\n" -"Logging Daemon: " -msgstr "" - -#: GLIGenDialog.py:1824 -msgid "" -"\n" -"Extra Packages: " -msgstr "" - -#: GLIGenDialog.py:1833 -msgid "" -"\n" -"Additional Services: " -msgstr "" - -#: GLIGenDialog.py:1840 -msgid "" -"\n" -"Configuration Files Settings:\n" -msgstr "" - -#: GLIGenDialog.py:1843 -msgid " File:" -msgstr "" - -#: GLIGenDialog.py:1846 -msgid " Variable: " -msgstr "" - -#: GLIGenDialog.py:1846 -msgid " Value: " -msgstr "" - -#: GLIGenDialog.py:1849 -msgid " Value: " -msgstr "" - -#: GLIGenDialog.py:1852 -msgid "" -"\n" -"Additional Users:\n" -msgstr "" - -#: GLIGenDialog.py:1857 -msgid " Username: " -msgstr "" - -#: GLIGenDialog.py:1858 -msgid "" -"\n" -" Group Membership: " -msgstr "" - -#: GLIGenDialog.py:1859 -msgid "" -"\n" -" Shell: " -msgstr "" - -#: GLIGenDialog.py:1860 -msgid "" -"\n" -" Home Directory: " -msgstr "" - -#: GLIGenDialog.py:1862 -msgid "" -"\n" -" User Id: " -msgstr "" - -#: GLIGenDialog.py:1864 -msgid "" -"\n" -" User Comment: " -msgstr "" - -#: GLIGenDialog.py:1866 -msgid "A Review of your settings" -msgstr "" diff --git a/src/fe/dialog/languages/GLIInstallProfile.pot b/src/fe/dialog/languages/GLIInstallProfile.pot index d9255d2..0fea281 100644 --- a/src/fe/dialog/languages/GLIInstallProfile.pot +++ b/src/fe/dialog/languages/GLIInstallProfile.pot @@ -1,12 +1,12 @@ # Gentoo Linux Installer. -# Copyright (C) 2006 +# Copyright (C) 2007 # This file is distributed under the same license as the Gentoo Linux Installer. -# Preston Cody <codeman@gentoo.org>, 2006. +# Preston Cody <codeman@gentoo.org>, 2007. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: InstallProfile 2006.1\n" +"Project-Id-Version: InstallProfile 2007.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-09-02 11:58-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" diff --git a/src/fe/dialog/languages/de/GLIInstallProfile.de.po b/src/fe/dialog/languages/de/GLIInstallProfile.de.po new file mode 100644 index 0000000..c337c67 --- /dev/null +++ b/src/fe/dialog/languages/de/GLIInstallProfile.de.po @@ -0,0 +1,300 @@ +# Gentoo Linux Installer. +# Copyright (C) 2007 +# This file is distributed under the same license as the Gentoo Linux Installer. +# Preston Cody <codeman@gentoo.org>, 2007. +# +#: GLIInstallProfile.py:586 +msgid "Popular Desktop Applications" +msgstr "Populäre Desktop Anwendungen" + +#: GLIInstallProfile.py:587 +msgid "GTK+ music player" +msgstr "GTK+ Musik Player" + +#: GLIInstallProfile.py:588 +msgid "A GTK+ tagging program for MP3, OGG, FLAC, and more" +msgstr "Ein GTK+ Tagging Programm für MP3, OGG, FLAC etc." + +#: GLIInstallProfile.py:589 +msgid "A GNOME groupware application, a Microsoft Outlook workalike" +msgstr "Eine GNOME Groupware Anwendung, ähnlich Microsoft Outlook" + +#: GLIInstallProfile.py:590 +msgid "GTK+ Instant Messenger client" +msgstr "GTK+ Multiprotokoll Messenger Client" + +#: GLIInstallProfile.py:591 +msgid "GTK+ FTP Client" +msgstr "GTK+ FTP Client" + +#: GLIInstallProfile.py:592 +msgid "GNU Image Manipulation Program" +msgstr "GNU Bildbearbeitungssoftware" + +#: GLIInstallProfile.py:593 +msgid "GNOME CD Writing Software" +msgstr "GNOME CD-Brennsoftware" + +#: GLIInstallProfile.py:594 +msgid "GTK+ application for transferring pictures from a digital camera" +msgstr "GTK+ Anwendung für die Übertragung von Fotos von einer Digitalkamera" + +#: GLIInstallProfile.py:595 +msgid "A SVG based generic vector-drawing program" +msgstr "Ein auf SVG basierendes Vektor-Zeichenprogramm" + +#: GLIInstallProfile.py:596 +msgid "KDE CD Writing Software" +msgstr "KDE CD-Brennsoftware" + +#: GLIInstallProfile.py:597 +msgid "An integrated office suite for KDE, the K Desktop Environment" +msgstr "Eine integrierte Office Suite für KDE, der K Desktop Umgebung" + +#: GLIInstallProfile.py:598 +msgid "The Mozilla Suite" +msgstr "Die Mozilla Suite" + +#: GLIInstallProfile.py:599 +msgid "The Mozilla Firefox Web Browser" +msgstr "Der Mozilla Firefox Web Browser" + +#: GLIInstallProfile.py:600 +msgid "Thunderbird Mail Client" +msgstr "Thunderbird E-Mail Programm" + +#: GLIInstallProfile.py:601 +msgid "Media Player for Linux" +msgstr "Media Player für Linux" + +#: GLIInstallProfile.py:602 +msgid "OpenOffice.org, a full office productivity suite." +msgstr "OpenOffice.org, eine featurereiche und produktive Office Suite" + +#: GLIInstallProfile.py:603 +msgid "Same as OpenOffice but a binary package (no compiling!)" +msgstr "OpenOffice als Binärpaket (keine Kompilierung notwendig)" + +#: GLIInstallProfile.py:604 +msgid "GTK news reader" +msgstr "GTK News Reader" + +#: GLIInstallProfile.py:605 +msgid "Music management and playback software for GNOME" +msgstr "Musikverwaltungs- und Wiedergabesoftware für GNOME" + +#: GLIInstallProfile.py:606 +msgid "Open replacement for the Mozilla Suite" +msgstr "Offener Ersatz für die Mozilla Suite" + +#: GLIInstallProfile.py:607 GLIInstallProfile.py:608 +msgid "A light weight email client and news reader" +msgstr "Ein schlanker E-Mail Client und News Reader" + +#: GLIInstallProfile.py:609 +msgid "VLC media player - Video player and streamer" +msgstr "VLC Media Player - Streaming und Wiedergabe von Videos" + +#: GLIInstallProfile.py:610 +msgid "GTK+ Graphical IRC Client" +msgstr "GTK+ Graphischer IRC Client" + +#: GLIInstallProfile.py:611 +msgid "Xine movie player" +msgstr "Xine Video Player" + +#: GLIInstallProfile.py:612 +msgid "X MultiMedia System" +msgstr "X Multimedia System" + +#: GLIInstallProfile.py:613 +msgid "Applications often found on servers." +msgstr "Anwendungen die oft auf Servern eingesetzt werden" + +#: GLIInstallProfile.py:614 +msgid "Apache Web Server" +msgstr "Apache Web Server" + +#: GLIInstallProfile.py:615 +msgid "The Common Unix Printing System" +msgstr "Das Common Unix Printing System" + +#: GLIInstallProfile.py:616 +msgid "A highly configurable, drop-in replacement for sendmail" +msgstr "Ein sehr gut konfigurierbarer Ersatz für sendmail" + +#: GLIInstallProfile.py:617 +msgid "Linux kernel (2.4+) firewall, NAT and packet mangling tools" +msgstr "Linux Kernel (2.4+) Firewall, NAT und Paketverwaltungstools" + +#: GLIInstallProfile.py:618 +msgid "Apache module for PHP" +msgstr "Apache Modul für PHP" + +#: GLIInstallProfile.py:619 +msgid "A fast, multi-threaded, multi-user SQL database server" +msgstr "Ein schneller, multi-threaded und mehrbenutzer SQL Datenbank Server" + +#: GLIInstallProfile.py:620 +msgid "The PHP scripting language" +msgstr "Die PHP Skriptsprache" + +#: GLIInstallProfile.py:621 +msgid "A fast and secure drop-in replacement for sendmail" +msgstr "Ein schneller und sicherer Ersatz für sendmail" + +#: GLIInstallProfile.py:622 +msgid "sophisticated Object-Relational DBMS" +msgstr "Ein anspruchvolles Object-Relational DBMS" + +#: GLIInstallProfile.py:623 +msgid "ProFTP Server" +msgstr "ProFTP Server" + +#: GLIInstallProfile.py:624 +msgid "SAMBA client/server programs for UNIX" +msgstr "SAMBA Client/Server Programme für UNIX" + +#: GLIInstallProfile.py:625 +msgid "Widely-used Mail Transport Agent (MTA)" +msgstr "Weitverbreiteter Mail Transport Agent (MTA)" + +#: GLIInstallProfile.py:626 +msgid "Window managers and X selection." +msgstr "Auswahl der Fenstermanager für X" + +#: GLIInstallProfile.py:627 +msgid "The Gnome Desktop Environment" +msgstr "Die Gnome Desktop Umgebung" + +#: GLIInstallProfile.py:628 +msgid "The K Desktop Environment" +msgstr "Die K Destop Umgebung" + +#: GLIInstallProfile.py:629 +msgid "A small, fast, full-featured window manager for X" +msgstr "Ein kleiner, schneller und vollfunktionsfähiger Fenstermanager für X" + +#: GLIInstallProfile.py:630 +msgid "Enlightenment Window Manager" +msgstr "Enlightment Fenstermanager" + +#: GLIInstallProfile.py:631 +msgid "Fluxbox is an X11 window manager featuring tabs and an iconbar" +msgstr "Fluxbox ist ein X11 Fenstermanager mit Unterstützung für Tabs und Iconbars" + +#: GLIInstallProfile.py:632 +msgid "IceWM is designed for speed, size, and simplicity" +msgstr "IceWM wurde für Geschwindigkeit, Größe und einfache Bedienung entworfen" + +#: GLIInstallProfile.py:633 +msgid "Windowmaker is a window manager featuring the look and feel of NEXTSTEP" +msgstr "Windowmaker ist ein Fenstermanager im Look'n'Feel von NEXTSTEP" + +#: GLIInstallProfile.py:634 +msgid "XFCE Desktop Environment" +msgstr "XFCE Desktop Umgebung" + +#: GLIInstallProfile.py:635 +msgid "An X11 implementation maintained by the X.Org Foundation" +msgstr "Eine X11 Implementierung, gepflegt von der X.Org Foundation" + +#: GLIInstallProfile.py:636 +msgid "Miscellaneous Applications you may want." +msgstr "Diverse nützliche Anwendungen" + +#: GLIInstallProfile.py:637 +msgid "tool for distributing files via a distributed network of nodes" +msgstr "Ein Werkzeug zum Verteilen von Dateien über ein Netzwerk von vielen Computern" + +#: GLIInstallProfile.py:638 +msgid "GTK+ Web IDE" +msgstr "GTK+ Web IDE" + +#: GLIInstallProfile.py:639 +msgid "An incredibly powerful, extensible text editor" +msgstr "Ein unglaublich mächtiger und erweiterbarer Text Editor" + +#: GLIInstallProfile.py:640 +msgid "Single process stack of various system monitors" +msgstr "Ein Programm mit mehreren System Monitoren" + +#: GLIInstallProfile.py:641 +msgid "GUI version of the Vim text editor" +msgstr "GUI Version des Vim Text Editors" + +#: GLIInstallProfile.py:642 +msgid "ssh-agent manager" +msgstr "SSH-Agent Manager" + +#: GLIInstallProfile.py:643 +msgid "Rotates, compresses, and mails system logs" +msgstr "Dreht, komprimiert und versendet System Logs per E-Mail" + +#: GLIInstallProfile.py:644 +msgid "Network Time Protocol suite/programs" +msgstr "Network Time Protocol Suite/Programme" + +#: GLIInstallProfile.py:645 +msgid "A Remote Desktop Protocol Client" +msgstr "Ein Remote Desktop Protocol Client" + +#: GLIInstallProfile.py:646 +msgid "Secure way to index and quickly search for files on your system" +msgstr "Ein sicherer Weg zur Indexierung und schnellen Suche nach Dateien in einem System" + +#: GLIInstallProfile.py:647 +msgid "Utility to trace the route of IP packets" +msgstr "Ein Programm um die Route von IP Paketen zu verfolgen" + +#: GLIInstallProfile.py:648 +msgid "Gentoo Linux USE flags editor" +msgstr "Gentoo Linux USE Flags Editor" + +#: GLIInstallProfile.py:649 +msgid "Vim, an improved vi-style text editor" +msgstr "Vim, ein verbesserter vi-style Texteditor" + +#: GLIInstallProfile.py:650 +msgid "A commercial-quality network protocol analyzer" +msgstr "Ein handelsüblicher Netzwerkprotokoll Analysator" + +#: GLIInstallProfile.py:651 +msgid "Applications recommended by the GLI Team." +msgstr "Vom GLI Team empfohlene Anwendungen" + +#: GLIInstallProfile.py:652 +msgid "A versatile IDE for GNOME" +msgstr "Eine vielseitige IDE für GNOME" + +#: GLIInstallProfile.py:653 +msgid "a tool to locally check for signs of a rootkit" +msgstr "Ein Programm zur lokalen Überprüfung auf Anzeichen von Rootkits" + +#: GLIInstallProfile.py:654 +msgid "Addictive OpenGL-based block game" +msgstr "Suchterzeugendes, auf OpenGL basierendes, Block Spiel" + +#: GLIInstallProfile.py:655 +msgid "The GNU Privacy Guard, a GPL PGP replacement" +msgstr "Der GNU Privacy Guard, ein GPL PGP Ersatz" + +#: GLIInstallProfile.py:656 +msgid "Software for generating and retrieving SNMP data" +msgstr "Software um SNMP Daten zu generieren und abzurufen" + +#: GLIInstallProfile.py:657 +msgid "the network swiss army knife" +msgstr "Das Schweizertaschenmesser im Netzwerk" + +#: GLIInstallProfile.py:658 +msgid "A utility for network exploration or security auditing" +msgstr "Ein Programm zur Netzwerkuntersuchung und Sicherheitsüberprüfung" + +#: GLIInstallProfile.py:659 +msgid "full-screen window manager that multiplexes between several processes" +msgstr "Ein Vollbild Fenstermanager" + +#: GLIInstallProfile.py:660 +msgid "An X Viewer for PDF Files" +msgstr "Ein X Viewer für PDF Dateien" diff --git a/src/fe/dialog/languages/de/LC_MESSAGES/GLIInstallProfile.mo b/src/fe/dialog/languages/de/LC_MESSAGES/GLIInstallProfile.mo Binary files differnew file mode 100644 index 0000000..8829357 --- /dev/null +++ b/src/fe/dialog/languages/de/LC_MESSAGES/GLIInstallProfile.mo diff --git a/src/fe/dialog/languages/de/LC_MESSAGES/gli-dialog.mo b/src/fe/dialog/languages/de/LC_MESSAGES/gli-dialog.mo Binary files differnew file mode 100644 index 0000000..50f5fd1 --- /dev/null +++ b/src/fe/dialog/languages/de/LC_MESSAGES/gli-dialog.mo diff --git a/src/fe/dialog/languages/de/gli-dialog.de.po b/src/fe/dialog/languages/de/gli-dialog.de.po new file mode 100644 index 0000000..667a181 --- /dev/null +++ b/src/fe/dialog/languages/de/gli-dialog.de.po @@ -0,0 +1,1996 @@ +# Gentoo Linux Installer. +# Copyright (C) 2007 +# This file is distributed under the same license as the Gentoo Linux Installer. +# Preston Cody <codeman@gentoo.org>, 2007. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: gli-dialog 2007.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-02-20 21:19-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gli-dialog.py:62 +msgid "" +"Welcome to the Gentoo Linux Installer! This program will help install " +"Gentoo on your computer.\n" +"Before proceeding please thoroughly read the Gentoo Installation Handbook " +"available at \n" +"http://www.gentoo.org/doc/en/handbook/index.xml \n" +"\n" +"Press OK to continue" +msgstr "" +"Willkommen zum Gentoo Linux Installer! Dieses Programm wird Ihnen helfen " +"Gentoo auf Ihrem Computer zu installieren.\n" +"Bevor Sie fortfahren lesen Sie sich bitte das Gentoo Linux Installations Handbuch " +"gründlich durch. Es ist verfügbar unter \n" +"http://www.gentoo.org/doc/en/handbook/index.xml \n" +"\n" +"Drücken Sie OK um fortzufahren" + +#: gli-dialog.py:66 +msgid "Welcome" +msgstr "Willkommen" + +#: gli-dialog.py:70 +msgid "Standard" +msgstr "Standard" + +#: gli-dialog.py:71 +msgid "Advanced" +msgstr "Fortgeschritten" + +#: gli-dialog.py:72 +msgid "" +"This installer has two modes, an advanced mode for those knowledgable with " +"the inner details of their computer and a standard mode where many of the " +"defaults will be chosen for the user for simplicity and to speed up the " +"install process. The advanced mode offers full customizability and is " +"required for generating profiles to be used other computers. \n" +"The advanced mode is recommended by the developers.\n" +"\t\t" +msgstr "" +"Der Installer hat zwei Modi, einen fortgeschrittenen Modus für jene die über " +"tiefgreifende Kenntnisse ihres Computers verfügen und einen normalen Modus bei " +"dem viele Standardoptionen verwendet werden um eine einfache und schnelle Installation zu ermöglichen. " +"Der fortgeschrittene Modus bietet volle Anpassungsmöglichkeiten und " +"ist erforderlich zur Generierung von Profilen die auch auf anderen Computern verwendet " +"werden können. \n" +"Der fortgeschrittene Modus ist von den Entwicklern empfohlen.\n" +"\t\t" + +#: gli-dialog.py:80 +msgid "" +"Do you want to do a networkless installation? This will limit the " +"customizability of your install due to the limitations of the LiveCD. For " +"example, choosing networkless will set your installation stage, portage " +"snapshot, and limit your extra packages selections. NOTE: It is easily " +"possible to do a networkless installation on a machine with an active " +"Internet connection; in fact this may result in the fastest installations " +"for many users." +msgstr "" +"Möchten Sie eine netzwerklose Installation durchführen? Dies limitiert die " +"Anpassungsmöglichkeiten Ihrer Installation aufgrund der Einschränkungen der LiveCD. " +"Eine netzwerklose Installation legt zum Beispiel das Stage Archiv und den Portage Schnappschuss fest " +"und limitiert somit Ihre Auswahl an zusätzlichen Paketen. BEACHTE: Efile:////usr/local/Zend/ZendStudio-5.5.0/docs/PHPmanual/ine netzwerklose Installation " +"kann auch sehr einfach auf einer Maschine mit einer aktiven Internetverbindung erfolgen; Das ist " +"wahrscheinlich die schnellste Installationsmethode für viele Benutzer." + +#: gli-dialog.py:82 +msgid "Networkless" +msgstr "Netzwerklos" + +#: gli-dialog.py:83 +msgid "Internet enabled" +msgstr "Internet aktiviert" + +#: gli-dialog.py:97 +msgid "ERROR: Could not set networkless information in the profile" +msgstr "FEHLER: Konnte Informationen über netzwerklose Installation nicht im Profile speichern" + +#: gli-dialog.py:103 gli-dialog.py:141 gli-dialog.py:204 gli-dialog.py:567 +#: gli-dialog.py:946 gli-dialog.py:1063 gli-dialog.py:1121 gli-dialog.py:1274 +#: gli-dialog.py:1506 gli-dialog.py:1622 gli-dialog.py:1825 gli-dialog.py:1833 +#: gli-dialog.py:1968 +msgid "Yes" +msgstr "Ja" + +#: gli-dialog.py:104 gli-dialog.py:142 gli-dialog.py:205 gli-dialog.py:568 +#: gli-dialog.py:947 gli-dialog.py:1064 gli-dialog.py:1122 gli-dialog.py:1275 +#: gli-dialog.py:1507 gli-dialog.py:1623 gli-dialog.py:1826 gli-dialog.py:1834 +#: gli-dialog.py:1969 +msgid "No" +msgstr "Nein" + +#: gli-dialog.py:107 +msgid "" +"\n" +"\tAll of the installation settings are stored in an XML file, which we call " +"the InstallProfile. If you have a previously-created profile, you can load " +"it now\n" +"\tfor use in this installation.\n" +"\tDo you have a previously generated profile for the installer?\n" +"\t" +msgstr "" +"\n" +"\tAlle Installationseinstellungen sind in einer XML Datei gespeichert die als " +"InstallProfile bezeichnet wird. Wenn sie bereits ein Profil haben, können Sie es jetzt\n" +"\tfür die Verwendung bei dieser Installation laden.\n" +"\tHaben Sie bereits ein Profil für den Installer?\n" +"\t" + +#: gli-dialog.py:113 +msgid "Enter the filename of the XML file" +msgstr "Geben Sie den Dateinamen der XML Datei ein" + +#: gli-dialog.py:118 +#, python-format +msgid "Cannot open file %s" +msgstr "Die Datei %s konnte nicht geöffnet werden" + +#: gli-dialog.py:143 +msgid "" +"Do you want debugging output enabled during the install? This is mainly " +"meant to help the developers debug any bugs." +msgstr "" +"Wollen Sie, dass Debuginformationen während der Installation angezeigt werden? Das ist " +"hauptsächlich nützlich fürEntwickler um Fehler zu debuggen." + +#: gli-dialog.py:158 gli-dialog.py:162 gli-dialog.py:365 gli-dialog.py:369 +#: gli-dialog.py:398 gli-dialog.py:402 gli-dialog.py:514 gli-dialog.py:519 +#: gli-dialog.py:837 gli-dialog.py:844 gli-dialog.py:848 gli-dialog.py:919 +#: gli-dialog.py:924 gli-dialog.py:1011 gli-dialog.py:1016 gli-dialog.py:1043 +#: gli-dialog.py:1047 gli-dialog.py:1215 gli-dialog.py:1218 gli-dialog.py:1565 +#: gli-dialog.py:1573 gli-dialog.py:1787 gli-dialog.py:1797 +msgid "Other" +msgstr "Andere" + +#: gli-dialog.py:158 gli-dialog.py:1215 +msgid "Type your own." +msgstr "Gib deine eigene ein." + +#: gli-dialog.py:159 +msgid "" +"In order to complete most installs, an active Internet connection is " +"required. Listed are the network devices already detected. In this step " +"you will need to setup one network connection for GLI to use to connect to " +"the Internet. If your desired device does not show up in the list, you can " +"select Other and input the device name manually." +msgstr "" +"Um die meisten Installationen erfolgreich zu beenden, ist eine aktive Internetverbindung erforderlich. " +"Nachfolgend werden die bereits erkannten Netzwerkgeräte angezeigt. In diesem Schritt müssen Sie " +"eine Internetverbindung für den GLI erstellen. Wird Ihr gewünschtes Netzwerkgerät nicht in der Liste " +"angezeigt, so können Sie Andere wählen und den Namen des Netzwerkgerätes manuell eingeben." + +#: gli-dialog.py:163 +msgid "" +"Enter the interface (NIC) you would like to use for installation (e.g. eth0):" +msgstr "" +"Geben Sie den Namen der Schnittstelle (NIC) ein, die Sie für die Installation verwenden möchten (z.B. eth0)" + +#: gli-dialog.py:170 gli-dialog.py:1228 gli-dialog.py:1253 +msgid "DHCP" +msgstr "DHCP" + +#: gli-dialog.py:171 gli-dialog.py:1229 gli-dialog.py:1254 +msgid "Static IP/Manual" +msgstr "Statische IP/Manuel" + +#: gli-dialog.py:172 gli-dialog.py:1193 +msgid "" +"To setup your network interface, you can either use DHCP if enabled, or " +"manually enter your network information.\n" +" DHCP (Dynamic Host Configuration Protocol) makes it possible to " +"automatically receive networking information (IP address, netmask, broadcast " +"address, gateway, nameservers etc.). This only works if you have a DHCP " +"server in your network (or if your provider provides a DHCP service). If " +"you do not, you must enter the information manually. Please select your " +"networking configuration method:" +msgstr "" +"Um eine Internetverbindung zu erstellen, können Sie entweder DHCP verwenden (d.h. wenn vorhanden) oder " +"Ihre Netzwerkinformationen manuell eingeben.\n" +" DHCP (Dynamic Host Configuration Protocol) ermöglicht die automatische Zuweisung von netzwerkspezifischen Informationen " +"(IP Adresse, Netzwerkmaske, Broadcast Adresse, Gateway, Nameserver etc.). Dies funktioniert " +"allerdings nur wenn Sie einen DHCP Server in Ihrem Netzwerk haben (oder wenn Ihr Anbieter einen DHCP Service anbietet). " +"Falls Sie keinen DHCP Server haben, so müssen Sie die benötigten Informationen manuell eingeben. Bitte wählen Sie " +"die von Ihnen gewünschte Konfigurationsmethode aus:" + +#: gli-dialog.py:176 gli-dialog.py:1233 gli-dialog.py:1258 +msgid "" +"If you have any additional DHCP options to pass, type them here in a space-" +"separated list. If you have none, just press Enter." +msgstr "" +"Wenn Sie zusätzliche DHCP-Optionen verwenden wollen, können Sie diese nachfolgend in " +"eine leerzeichenseparierte Liste eingeben. Ansonsten drücken Sie Enter um fortzufahren." + +#: gli-dialog.py:179 +msgid "" +"Enter your networking information: (See Chapter 3 of the Handbook for more " +"information) Your broadcast address is probably your IP address with 255 as " +"the last tuple. DO NOT PRESS ENTER until all fields you intend to fill out " +"are complete!" +msgstr "" +"Geben Sie Ihre Netzwerkinformationen ein: (Siehe Kapitel 3 des Handbuches für weitere Informationen) " +"Ihre Broadcast-Adresse ist wahrscheinlich Ihre IP Adresse mit 255 als letztes Tupel. DRÜCKEN SIE NICHT " +"AUF DIE EINGABETASTE bis alle von Ihnen gewünschten Felder ausgefüllt sind!" + +#: gli-dialog.py:180 gli-dialog.py:1238 gli-dialog.py:1263 +msgid "Enter your IP address:" +msgstr "Geben Sie Ihre IP Adresse ein:" + +#: gli-dialog.py:181 gli-dialog.py:1239 gli-dialog.py:1264 +msgid "Enter your Broadcast address:" +msgstr "Geben Sie Ihre Broadcast-Adresse ein:" + +#: gli-dialog.py:182 gli-dialog.py:1240 gli-dialog.py:1265 +msgid "Enter your Netmask:" +msgstr "Geben Sie Ihre Netzwerkmaske ein:" + +#: gli-dialog.py:183 +msgid "Enter your default gateway:" +msgstr "Geben Sie Ihren Standardgateway ein:" + +#: gli-dialog.py:184 +msgid "Enter a DNS server:" +msgstr "Geben Sie einen DNS Server ein:" + +#: gli-dialog.py:185 gli-dialog.py:1326 +msgid "Enter a HTTP Proxy IP:" +msgstr "Geben Sie eine HTTP Proxy IP ein:" + +#: gli-dialog.py:186 gli-dialog.py:1327 +msgid "Enter a FTP Proxy IP:" +msgstr "Geben Sie eine FTP Proxy IP ein:" + +#: gli-dialog.py:187 gli-dialog.py:1328 +msgid "Enter a RSYNC Proxy:" +msgstr "Geben Sie einen RSYNC Proxy ein:" + +#: gli-dialog.py:197 +msgid "" +"Sorry, but the network could not be set up successfully. Please configure " +"yourself manually and restart the installer." +msgstr "" +"Entschuldigung, aber das Netzwerk konnte nicht erfolgreich erstellt werden. " +"Bitte konfigurieren Sie es manuell und starten Sie den Installer neu." + +#: gli-dialog.py:199 +msgid "ERROR! Could not setup networking!" +msgstr "FEHLER! Netzwerk konnte nicht erstellt werden!" + +#: gli-dialog.py:207 +msgid "" +"Do you want SSH enabled during the install? This will allow you to login " +"remotely during the installation process. If choosing Yes, be sure you " +"select a new LiveCD root password!" +msgstr "" +"Wollen Sie während der Installation SSH aktivieren? Dies erlaubt es Ihnen " +"sich während der Installation von einem anderen Computer aus anzumelden. " +"Für den Fall, dass Sie das wollen sollten Sie ein neues LiveCD root Passwort " +"erstellen!" + +#: gli-dialog.py:211 +msgid "ERROR! : Could not start the SSH daemon!" +msgstr "FEHLER! Der SSH Daemon konnte nicht gestartet werden!" + +#: gli-dialog.py:219 +msgid "" +"If you want to be able to login to your machine from another console during " +"the installation,\n" +"\tyou will want to enter a new root password for the LIVECD.\n" +"\tNote that this can be different from your new system's root password.\n" +"\tPresss Enter twice to skip this step.\n" +"\tEnter the new LIVECD root password (will not be echoed):\t" +msgstr "" +"Wenn Sie sich während der Installation an Ihrem Computer von einer anderen Konsole aus anmelden wollen,\n" +"\tso sollten Sie ein neues root Passwort für die LIVECD festlegen.\n" +"\tDieses Passwort muss nicht gleich dem Passwort Ihrer neuen Gentoo Installation sein.\n" +"\tUm diesen Schritt zu überspringen, drücken Sie bitte zweimal die Eingabetaste.\n" +"\tGeben Sie das neue LIVECD root Passwort ein (wird nicht angezeigt):\t" + +#: gli-dialog.py:227 +msgid "Enter the new LIVECD root password again to verify:" +msgstr "Bestätigen Sie das neue LiveCD root Passwort:" + +#: gli-dialog.py:231 +msgid "The passwords do not match. Please try again." +msgstr "Die Passwörter stimmen nicht überein. Bitte versuchen Sie es erneut." + +#: gli-dialog.py:239 +msgid "ERROR! Could not hash the root password on the LiveCD!" +msgstr "FEHLER! Es konnte keine Hashsumme des Passworts berechnet werden!" + +#: gli-dialog.py:248 +msgid "ERROR! Could not set the root password on the livecd environment!" +msgstr "FEHLER! Das root Passwort konnte für die LiveCD Umgebung nicht festgelegt werden!" + +#: gli-dialog.py:255 +msgid "" +"Here is a list of modules currently loaded on your machine.\n" +" Please look through and see if any modules are missing\n" +" that you would like loaded.\n" +"\n" +msgstr "" +"Nachfolgenden sehen Sie eine Liste der aktuell geladenen Module auf Ihrem Computer.\n" +" Bitte sehen Sie nach ob alle von Ihnen gewünschte Module geladen sind.\n" +"\n" + +#: gli-dialog.py:256 +msgid "Continue" +msgstr "Fortfahren" + +#: gli-dialog.py:257 +msgid "Loaded Modules" +msgstr "Geladene Module" + +#: gli-dialog.py:258 +msgid "" +"If you have additional modules you would like loaded before the installation " +"begins (ex. a network driver), enter them in a space-separated list." +msgstr "" +"Wenn Sie noch zusätzliche Module bevor der Installation laden möchten (z.B. Netzwerktreiber), " +"so können Sie diese nun in einer leerzeichenseparierten Liste eingeben." + + +#: gli-dialog.py:272 +#, python-format +msgid "ERROR! : Could not load module: %s " +msgstr "FEHLER!: Folgendes Modul konnte nicht geladen werden: %s" + +#: gli-dialog.py:277 +msgid "" +"ERROR!: An unknown error occurred during modprobing the modules. Please " +"load them manually and then restart the installer." +msgstr "" +"FEHLER!: Beim Versuch die Module zu laden ist ein Fehler aufgetreten. " +"Bitte laden Sie die Module manuell und starten Sie den Installer danach erneut." + +#: gli-dialog.py:304 gli-dialog.py:312 gli-dialog.py:1200 gli-dialog.py:1208 +msgid "Add" +msgstr "Hinzufügen" + +#: gli-dialog.py:304 +msgid "Define a new mountpoint" +msgstr "Einen neuen Mountpunkt festlegen" + +#: gli-dialog.py:305 +msgid "" +"Please define the mountpoints of your partitions for the new system. At " +"minimum, a / mountpoint must be defined. Defining /boot and /home " +"mountpoints is recommended." +msgstr "" +"Bitte legen Sie die Mountpunkte für die Partitionen Ihres neuen Systems fest. " +"Sie müssen mindestens einen Mountpunkt für / festlegen. Es ist empfohlen " +"auch für /boot und /home einen Mountpunkt zu definieren." + +#: gli-dialog.py:305 gli-dialog.py:557 gli-dialog.py:1201 gli-dialog.py:1459 +#: gli-dialog.py:1610 gli-dialog.py:1725 +msgid "Save and Continue" +msgstr "Speichern und Fortfahren" + +#: gli-dialog.py:310 +msgid "ERROR: Could net set mounts!" +msgstr "FEHLER: Mountpunkte konnten nicht festgelegt werden" + +#: gli-dialog.py:328 gli-dialog.py:467 gli-dialog.py:530 +msgid "Logical (" +msgstr "Logische Partition (" + +#: gli-dialog.py:330 gli-dialog.py:469 gli-dialog.py:532 +msgid "Primary (" +msgstr "Primäre Partition (" + +#: gli-dialog.py:346 +msgid "Select a Partition to define a mountpoint for" +msgstr "Wählen Sie eine Partition aus um einen Mountpunkt festzulegen" + +#: gli-dialog.py:366 +#, python-format +msgid "" +"Choose a mountpoint from the list or choose Other to type your own for ""http://www.gentoo.org/doc/en/handbook/index.xml \n" +"partition %s. " +msgstr "" +"Wählen Sie einen Mountpunkt aus der Liste aus oder wählen Sie Andere um Ihren " +"eigenen Mountpunkt für die Partition %s festzulegen." + +#: gli-dialog.py:370 gli-dialog.py:403 +#, python-format +msgid "Enter a mountpoint for partition %s" +msgstr "Geben Sie einen Mountpunkt für die Partition %s ein" + +#: gli-dialog.py:375 gli-dialog.py:415 +#, python-format +msgid "Enter mount options for mountpoint %s. Leave blank for defaults" +msgstr "Geben Sie Mountoptionen für den Mountpunkt %s ein. Für Standardoptionen einfach leer lassen." + +#: gli-dialog.py:389 gli-dialog.py:397 +msgid "Change Mountpoint" +msgstr "Mountpunkt ändern" + +#: gli-dialog.py:390 gli-dialog.py:406 +msgid "Change Filesystem Type" +msgstr "Dateisystem ändern" + +#: gli-dialog.py:391 gli-dialog.py:414 +msgid "Change Mountoptions" +msgstr "Mountoptionen ändern" + +#: gli-dialog.py:392 gli-dialog.py:419 +msgid "Delete This Mountpoint" +msgstr "Diesen Mountpunkt löschen" + +#: gli-dialog.py:393 +#, python-format +msgid "" +"Select an option for device %(dev)s : Mountpoint: %(mt)s, Type: %(type)s, " +"Options: %(opt)s" +msgstr "" +"Wählen Sie eine Option für die Gerätedatei %(dev)s aus: Mountpunkt: %(mt)s, Typ: %(type)s, " +"Optionen: %(opt)s" + +#: gli-dialog.py:399 +#, python-format +msgid "" +"Choose a mountpoint from the list or choose Other to type your own for " +"partition %(part)s. Current mountpoint is: %(mt)s" +msgstr "" +"Wählen Sie einen Mountpunkt aus der Liste oder wählen Sie Andere um Ihren eigenen " +"Mountpunkt für die Partition %(part)s einzugeben. Der aktuelle Mountpunkt ist : %(mt)s" + +#: gli-dialog.py:409 +#, python-format +msgid "Select the filesystem for partition %(part)s. It is currently %(fs)s." +msgstr "Wählen Sie das Dateisystem für die Partition %(part)s aus. Aktuelles Dateisystem ist %(fs)s" + +#: gli-dialog.py:423 +msgid "" +"The first thing on the new system to setup is the partitoning.\n" +"\tYou will first select a drive and then edit its partitions.\n" +"\tWARNING: CHANGES ARE MADE IMMEDIATELY TO DISK. BE CAREFUL\n" +"\tNOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION \"/\"\n" +"\tIf your drive is pre-partitioned, just select the mountpoints and make \n" +"\tsure that the format option is set to FALSE or it will erase your data.\n" +"\tThe installer does not yet support resizing of partitions (its not safe).\n" +"\tWhen in doubt, **Partition it yourself and then re-run the installer**\n" +"\tPlease refer to the Gentoo Installation Handbook for more information\n" +"\ton partitioning and the various filesystem types available in Linux." +msgstr "" +"Als erstes müssen Sie auf Ihrem System die Partitionierung festlegen.\n" +"\tUm Partitionen ändern zu können, müssen Sie zuerst eine Festplatte auswählen.\n" +"\tACHTUNG: ÄNDERUNGEN WERDEN SOFORT WIRKSAM. SEIEN SIE VORSICHTIG\n" +"\tBEACHTE: SIE MÜSSEN ZU MINDEST EINE ROOT PARTITION \"/\" FESTLEGEN\n" +"\tWenn Ihre Festplatte vorpartitioniert ist müssen Sie lediglich noch die " +"Mountpunkte bestimmen.\n" +"\tStellen Sie aber zuerst sicher, dass die Option Formatieren ausgeschaltet ist. " +"Ansonsten gehen Ihre ganzen Daten verloren.\n" +"\tDer Installer kann Partitionen leider nocht nicht in ihrer Größe verändern (zu unsicher).\n" +"\t**Im Zweifel sollten Sie die Partitionierung selbst vornehmen und den Installer danach erneut starten**\n" +"\tFür mehr Informationen über die Partitionierung und die verfügbaren Dateisysteme unter Linux " +"lesen Sie bitte das Gentoo Installationshandbuch." + +#: gli-dialog.py:446 +msgid "" +"Which drive would you like to partition?\n" +" Info provided: Type, Size in MB" +msgstr "" +"Welche Festplatte möchten Sie partitionieren?\n" +" Verfügbare Informationen: Typ, Größe in MB" + +#: gli-dialog.py:446 gli-dialog.py:845 gli-dialog.py:880 gli-dialog.py:1012 +msgid "Done" +msgstr "Fertig" + +#: gli-dialog.py:456 +msgid " - Unallocated space (" +msgstr " - Unbenutzer Speicher (" + +#: gli-dialog.py:458 +msgid "logical, " +msgstr "logische Partition, " + +#: gli-dialog.py:462 +msgid " - Extended Partition (" +msgstr " - Erweiterte Partition (" + +#: gli-dialog.py:474 gli-dialog.py:480 +msgid "Set Recommended Layout" +msgstr "Empfohlenes Layout verwenden" + +#: gli-dialog.py:475 gli-dialog.py:485 +msgid "Clear Partitions On This Drive." +msgstr "Partitionen auf dieser Festplatte löschen." + +#: gli-dialog.py:476 +msgid "" +"Select a partition or unallocated space to edit\n" +"Key: Minor, Pri/Ext, Filesystem, Size." +msgstr "" +"Wählen Sie ein Partition oder freien Speicher zum Bearbeiten aus\n" +"Schlüssel: Minor, Pri/Erw, Dateisystem, Größe." + +#: gli-dialog.py:476 gli-dialog.py:536 gli-dialog.py:584 gli-dialog.py:625 +#: gli-dialog.py:1761 +msgid "Back" +msgstr "Zurück" + +#: gli-dialog.py:481 +msgid "" +"This will ERASE YOUR DRIVE and apply a recommended layout. Are you sure you " +"wish to do this?" +msgstr "" +"DIES WIRD IHRE DATEN AUF DER FESTPLATTE LÖSCHEN und das empfohlene Partitionsschema verwenden. " +"Wollen Sie das wirklich tun?" + +#: gli-dialog.py:482 +msgid "" +"This is your last chance. Are you SURE you want to CLEAR this drive and set " +"a recommended layout? THERE IS NO TURNING BACK IF YOU SELECT YES." +msgstr "" +"Das ist Ihre letzte Chance. Sind Sie sicher, dass Sie alle Partitionen auf dieser Festplatte " +"löschen und das empfohlene Partionsschema verwenden wollen? " +"NACHDEM SIE JA GEDRÜCKT HABEN, GIBT ES KEIN ZURÜCK." + +#: gli-dialog.py:486 +msgid "" +"This will remove all partitions on your drive. Are you sure you wish to do " +"this?" +msgstr "" +"Alle Partitionen auf Ihrer Festplatte werden gelöscht. Wollen Sie das wirklich tun?" + +#: gli-dialog.py:487 +msgid "" +"This is your last chance. Are you SURE you want to CLEAR this drive? THIS " +"WILL DELETE ANY DATA ON THE DRIVE!" +msgstr "" +"Das ist Ihre letzte Chance. Sind Sie sicher, dass Sie diese Festplatte LÖSCHEN wollen? " +"ES WERDEN ALLE DATEN AUF IHRER FESTPLATTE GELÖSCHT!" + +#: gli-dialog.py:499 +#, python-format +msgid "" +"Enter the size of the new partition in MB (max %s MB). If creating an " +"extended partition input its entire size (not just the first logical size):" +msgstr "" +"Geben Sie die Größe der neuen Partition in MB ein (max. %s MB). Wenn Sie eine " +"erweiterte Partition erstellen, müssen Sie die Gesamtgröße eingeben (Nicht nur " +"die Größe der ersten logischen Partition):" + +#: gli-dialog.py:502 +#, python-format +msgid "" +"The size you entered (%(entered)s MB) is larger than the maximum of %(max)s " +"MB" +msgstr "" +"Der eingegebene Wert (%(entered)s MB) ist größer als die maximale Größe von %(max)s MB" + +#: gli-dialog.py:505 +msgid "Old, stable, but no journaling" +msgstr "Alt, stabil und ohne Journaling" + +#: gli-dialog.py:506 +msgid "ext2 with journaling and b-tree indexing (RECOMMENDED)" +msgstr "ext2 mit Journaling und B-Tree Indexierung (EMPFOHLEN)" + +#: gli-dialog.py:507 +msgid "Swap partition for memory overhead" +msgstr "Swap Partition zur RAM-Auslagerung" + +#: gli-dialog.py:508 +msgid "Windows filesystem format used in Win9X and XP" +msgstr "Windows Dateisystem, verwendet unter Win9X und XP" + +#: gli-dialog.py:512 +msgid "B*-tree based filesystem. great performance. Only V3 supported." +msgstr "B*-tree basierendes Dateisystem. Sehr gute Performance. Nur V3 unterstützt." + +#: gli-dialog.py:513 +msgid "Create an extended partition containing other logical partitions" +msgstr "Erstellen Sie ein erweiterte Partition, die andere logische Partitionen enthalten kann" + +#: gli-dialog.py:514 +msgid "Something else we probably don't support." +msgstr "Etwas anderes unterstützen wir wahrscheinlich nicht." + +#: gli-dialog.py:515 +msgid "Choose the filesystem type for this new partition." +msgstr "Wählen Sie das Dateisystem für diese Partition." + +#: gli-dialog.py:520 +msgid "Please enter the new partition's type:" +msgstr "Bitte geben Sie den Typ der Partition ein:" + +#: gli-dialog.py:535 gli-dialog.py:539 gli-dialog.py:1249 gli-dialog.py:1760 +#: gli-dialog.py:1823 +msgid "Delete" +msgstr "Löschen" + +#: gli-dialog.py:535 gli-dialog.py:545 +msgid "Extra mkfs.* Parameters" +msgstr "Extra mkfs.* Parameter" + +#: gli-dialog.py:540 +msgid "Are you sure you want to delete the partition " +msgstr "Wollen Sie die Partition wirklich löschen " + +#: gli-dialog.py:546 +msgid "" +"This feature is coming soon. Please go to console and do it yourself for " +"now." +msgstr "" +"An diesem Feature wird bereits gearbeitet. Erledigen Sie es derweil bitte manuell." + +#: gli-dialog.py:555 gli-dialog.py:565 +msgid "Add a new network mount" +msgstr "Mounten Sie ein Netzwerk" + +#: gli-dialog.py:557 +msgid "" +"If you have any network shares you would like to mount during the install " +"and for your new system, define them here. Select a network mount to edit or " +"add a new mount. Currently GLI only supports NFS mounts." +msgstr "" +"Wenn Sie Netzwerkfreigaben während der Installation und für Ihr neues System mounten möchten, " +"so können Sie das hier festlegen. Wählen Sie einen Netzwerkmount zum Bearbeiten oder fügen " +"Sie hier einen neuen hinzu. GLI unterstützt zur Zeit nur NFS." + +#: gli-dialog.py:562 +msgid "ERROR: Could net set network mounts!" +msgstr "FEHLER: Netzwerk konnte nicht gemountet werden!" + +#: gli-dialog.py:569 +msgid "Do you want to start portmap to be able to search for NFS mounts?" +msgstr "Wollen Sie Portmap starten um nach NFS-Mounts zu suchen?" + +#: gli-dialog.py:572 +msgid "ERROR: Could not start portmap!" +msgstr "FEHLER: Portmap konnte nicht gestartet werden!" + +#: gli-dialog.py:574 +msgid "" +"Enter NFS mount or just enter the IP/hostname to search for available mounts" +msgstr "" +"Geben Sie den NFS-Mount oder eine IP/Hostname ein um nach verfügbaren Mounts zu suchen" + +#: gli-dialog.py:582 +msgid "No NFS exports were detected on " +msgstr "Es wurden keine NFS-Exporte gefunden in " + +#: gli-dialog.py:584 +msgid "Select a NFS export" +msgstr "Wählen Sie einen NFS-Export aus" + +#: gli-dialog.py:589 +#, python-format +msgid "" +"The address you entered, %s, is not a valid IP or hostname. Please try " +"again." +msgstr "" +"Die eingegebene Adresse %s, ist kein valider Hostname oder IP Adresse. " +"Bitte versuchen Sie es erneut." + +#: gli-dialog.py:598 +msgid "There is already an entry for " +msgstr "Es gibt bereits einen Eintrag für " + +#: gli-dialog.py:610 +msgid "Enter a mountpoint" +msgstr "Geben Sie einen Mountpunkt ein" + +#: gli-dialog.py:613 +msgid "Enter mount options" +msgstr "Geben Sie Mountoptionen ein" + +#: gli-dialog.py:623 +msgid "Stage3 is a basic system that has been built for you (no compiling)." +msgstr "Stage3 ist ein grundlegendes System, das bereits für Sie kompiliert wurde." + +#: gli-dialog.py:624 +msgid "A Stage3 install but using binaries from the LiveCD when able." +msgstr "Eine Stage3 Installation. Binärpakete von der LiveCD werden verwenden, wenn verfügbar." + +#: gli-dialog.py:625 +msgid "Which stage do you want to start at?" +msgstr "Mit welchem Stagearchiv wollen Sie starten?" + +#: gli-dialog.py:629 +msgid "" +"WARNING: Since you are doing a GRP install it is HIGHLY recommended you " +"choose Create from CD to avoid a potentially broken installation." +msgstr "" +"WARNUNG: Da Sie eine GRP Installation durchführen, ist es höchstens empfohlen " +"'Erstellen von CD' zu wählen um kaputte Installation zu vermeiden." + +#: gli-dialog.py:633 gli-dialog.py:638 +msgid "ERROR! Could not set install stage!" +msgstr "FEHLER! Stagearchiv für den Installer konnte nicht festgelegt werden!" + +#: gli-dialog.py:642 +msgid "Create from CD" +msgstr "Erstellen von CD" + +#: gli-dialog.py:643 +msgid "Specify URI" +msgstr "Spezifizieren Sie einen URI" + +#: gli-dialog.py:644 +msgid "" +"Do you want to generate a stage3 on the fly using the files on the LiveCD " +"(fastest) or do you want to grab your stage tarball from the Internet?\n" +msgstr "" +"Möchten Sie ein Stage3 mit den Dateien auf der LiveCD erstellen (schnell) oder " +"möchten Sie das Stagearchiv aus dem Internet laden?\n" + +#: gli-dialog.py:649 +msgid "ERROR: Could not set the stage tarball URI!" +msgstr "FEHLER: Der URI für das Stagearchiv konnte nicht festgelegt werden!" + +#: gli-dialog.py:664 +msgid "" +"Select a mirror to grab the tarball from or select Cancel to enter an URI " +"manually." +msgstr "" +"Wählen Sie einen Spiegelserver oder drücken Sie 'Abbrechen' um den URI, " +"von dem Sie das Tararchiv herunterladen wollen manuell einzugeben." + +#: gli-dialog.py:670 +msgid "Select your desired stage tarball:" +msgstr "Wählen Sie Ihr gewünschtes Stagearchiv aus:" + +#: gli-dialog.py:681 +msgid "Specify the stage tarball URI or local file:" +msgstr "Spezifizieren Sie den URI oder den lokalen Pfad zum Stagearchiv" + +#: gli-dialog.py:687 gli-dialog.py:720 gli-dialog.py:1076 +msgid "" +"The specified URI is invalid. It was not saved. Please go back and try " +"again." +msgstr "" +"Der angegebene URI ist nicht korrekt. Er wurde nicht gespeichert. Bitte gehen Sie zurück und " +"versuchen Sie es erneut." + +#: gli-dialog.py:689 +msgid "No URI was specified!" +msgstr "Es wurde kein URI angegeben!" + +#: gli-dialog.py:699 +msgid "ERROR! Could not set the portage cd snapshot URI!" +msgstr "FEHLER! Die Portage CD Snapshot URI konnte nicht festgelegt werden!" + +#: gli-dialog.py:703 +msgid "Normal. Use emerge sync RECOMMENDED!" +msgstr "Normal. Es ist EMPFOHLEN emerge sync zu verwenden" + +#: gli-dialog.py:704 +msgid "HTTP daily snapshot. Use when rsync is firewalled." +msgstr "Täglicher HTTP Schnappschuss. Verwenden wenn rsync firewalled" + +#: gli-dialog.py:705 +msgid "Use a portage snapshot, either a local file or a URL" +msgstr "Verwenden Sie einen Portage Schnappschuss, entweder eine lokale Datei oder einen URL" + +#: gli-dialog.py:706 +msgid "Extra cases such as if /usr/porage is an NFS mount" +msgstr "Sonderfälle wie wenn z.B. /usr/portage ein NFS-Mount ist" + +#: gli-dialog.py:707 +msgid "" +"Which method do you want to use to sync the portage tree for the " +"installation? If choosing a snapshot you will need to provide the URI for " +"the snapshot if it is not on the livecd." +msgstr "" +"Welche Methode zur Synchronisation des Portage Trees wollen Sie für die Installation " +"verwenden? Wenn Sie einen Schnappschuss auswählen müssen Sie einen entsprechenden " +"URI bereitstellen sofern sich dieser sich nicht auf der LiveCD befindet." + +#: gli-dialog.py:716 +msgid "Enter portage tree snapshot URI" +msgstr "Geben Sie den Portag Tree Schnappschuss URI ein" + +#: gli-dialog.py:725 +msgid "No URI was specified! Returning to default emerge sync." +msgstr "Es wurde kein URI angegeben! Verwende nun emerge sync." + +#: gli-dialog.py:742 +msgid "" +"The installer will now gather information regarding the contents of /etc/" +"make.conf\n" +"\tOne of the unique (and best) features of Gentoo is the ability to\n" +"\tdefine flags (called USE flags) that define what components are \n" +"\tcompiled into applications. For example, you can enable the alsa\n" +"\tflag and programs that have alsa capability will use it. \n" +"\tThe result is a finely tuned OS with no unnecessary components to\n" +"\tslow you down.\n" +"\tThe installer divides USE flag selection into two screens, one for\n" +"\tglobal USE flags and one for local flags specific to each program.\n" +"\tPlease be patient while the screens load. It may take awhile." +msgstr "" +"Der Installer wird nun Information bezüglich /etc/make.conf sammeln\n" +"\tEin einzigartiges (und beste) Feature von Gentoo ist die\n" +"\tFähigkeit Flags zu setzen (genannt USE Flags) und anhand dieser\n" +"\tzu bestimmen welche Komponenten in eine Applikation kompiliert\n" +"\twerden sollen. Sie können z.B. mit dem alsa Flag bestimmen, dass\n" +"\tProgramme mit ALSA-Unterstützung dies auch tun.\n" +"\tDas Ergebnis ist somit ein optimiertes OS ohne unnötigen Ballast\n" +"\tder das System verlangsamt.\n" +"\tDer Installer spaltet den USE Flag Abschnitt in zwei Sektionen. Eine\n" +"\tfür globale USE Flags und eine für lokale USE Flags passend zu\n" +"\tjedem Programm. Bitte haben Sie etwas Geduld während die Sektionen\n" +"\tgeladen werden. Es könnte evtl. etwas dauern." + +#: gli-dialog.py:781 +msgid "Choose which *global* USE flags you want on the new system" +msgstr "Wählen Sie die *globalen* USE Flags für Ihr System aus" + +#: gli-dialog.py:789 +msgid "Choose which *local* USE flags you want on the new system" +msgstr "Wählen Sie die *lokalen* USE Flags für Ihr System aus" + +#: gli-dialog.py:822 +msgid "Stable" +msgstr "Stabil" + +#: gli-dialog.py:823 +msgid "Unstable" +msgstr "Instabil" + +#: gli-dialog.py:824 +#, python-format +msgid "" +"Do you want to run the normal stable portage tree, or the bleeding edge " +"unstable (i.e. ACCEPT_KEYWORDS=%s)? If unsure select stable. Stable is " +"required for GRP installs." +msgstr "" +"Wollen Sie den normalen und stabilen Portage Tree oder den instabilen " +"(z.B. ACCEPT_KEYWORDS=%s) verwenden? Wenn unsicher, wählen Sie stabil. Stabil " +"ist erforderlich für GRP Installationen." + +#: gli-dialog.py:831 gli-dialog.py:839 +msgid "Edit your C Flags and Optimization level" +msgstr "Ändern Sie Ihre C Flags und Optimierungslevel" + +#: gli-dialog.py:832 +msgid "Change the Host Setting" +msgstr "Ändern Sie die Hosteinstellungen" + +#: gli-dialog.py:833 gli-dialog.py:840 +msgid "Specify number of parallel makes (-j) to perform." +msgstr "Geben Sie die Anzahl der parallen Ausführungen (-j) von make an." + +#: gli-dialog.py:834 gli-dialog.py:841 +msgid "Change portage functionality settings. (distcc/ccache)" +msgstr "Ändern Sie die Portage-Funktionalitätseinstellungen. (distcc/ccache)" + +#: gli-dialog.py:835 gli-dialog.py:842 +msgid "Specify mirrors to use for source retrieval." +msgstr "Spezifizieren Sie die Spiegelserver für den Download des Quellcodes." + +#: gli-dialog.py:836 gli-dialog.py:843 +msgid "Specify server used by rsync to sync the portage tree." +msgstr "Spezifizieren Sie die Server für rsync um den Portage Tree zu synchronisieren." + +#: gli-dialog.py:837 gli-dialog.py:844 +msgid "Specify your own variable and value." +msgstr "Spezifizieren Sie Ihre eigene Variable." + +#: gli-dialog.py:845 +msgid "" +"For experienced users, the following /etc/make.conf variables can also be " +"defined. Choose a variable to edit or Done to continue." +msgstr "" +"Erfahrene Benutzer können noch die folgenden Variablen in /etc/make.conf definieren. " +"Wählen Sie eine Variable zum Bearbeiten oder 'Fertig' um fortzufahren." + +#: gli-dialog.py:849 +msgid "Enter the variable name: " +msgstr "Geben Sie den Variablennamen ein: " + +#: gli-dialog.py:856 gli-dialog.py:886 gli-dialog.py:933 +msgid "Enter new value for " +msgstr "Eingabe eines neuen Werts für " + +#: gli-dialog.py:871 gli-dialog.py:883 +msgid "CLEAR" +msgstr "LÖSCHEN" + +#: gli-dialog.py:871 +msgid "Erase the current value and start over." +msgstr "Aktuellen Wert löschen und erneut beginnen." + +#: gli-dialog.py:872 +msgid "Add a CPU optimization (deprecated in GCC 3.4)" +msgstr "Fügen Sie CPU Optimierungen hinzu (Veraltet in GCC 3.4)" + +#: gli-dialog.py:873 +msgid "Add a CPU optimization (GCC 3.4+)" +msgstr "Fügen Sie CPU Optimierungen hinzu (GCC 3.4+)" + +#: gli-dialog.py:874 +msgid "Add an Architecture optimization" +msgstr "Fügen Sie eine Optimierung Ihre Architektur hinzu" + +#: gli-dialog.py:875 +msgid "Add optimization level (please do NOT go over 2)" +msgstr "Fügen Sie ein Optimierungslevel hinzu (Bitte NICHT höher als 2)" + +#: gli-dialog.py:876 +msgid "For advanced users only." +msgstr "Nur für fortgeschrittene Benutzer." + +#: gli-dialog.py:877 +msgid "Common additional flag" +msgstr "Häufig verwendete zusätzliche USE Flags" + +#: gli-dialog.py:878 gli-dialog.py:885 gli-dialog.py:1455 gli-dialog.py:1473 +msgid "Manual" +msgstr "Manuell" + +#: gli-dialog.py:878 +msgid "Specify your CFLAGS manually" +msgstr "Spezifizieren Sie Ihre CFLAGS manuell" + +#: gli-dialog.py:880 +msgid "" +"Choose a flag to add to the CFLAGS variable or Done to go back. The current " +"value is: " +msgstr "" +"Wählen Sie einen Flag um diesen der CFLAGS Variable hinzuzufügen oder 'Fertig' um zurückzugehen. " +"Der aktuelle Wert ist: " + +#: gli-dialog.py:891 +#, python-format +msgid "Enter the new value for %s (value only):" +msgstr "Geben Sie den neuen Wert für %s (Nur den Wert) ein:" + +#: gli-dialog.py:902 +msgid "Choose from the available CHOSTs for your architecture." +msgstr "Wählen Sie von den für Ihre Architektur verfügbaren CHOSTs." + +#: gli-dialog.py:908 +msgid "" +"Presently the only use is for specifying the number of parallel makes (-j) " +"to perform. The suggested number for parallel makes is CPUs+1. Enter the " +"NUMBER ONLY:" +msgstr "" +"Der einzige Verwendungszweck ist zur Zeit die Definition der Anzahl an parallel " +"auszuführenden make Befehlen (-j). Empfohlen ist ein Wert von die Anzahl der CPUs+1. " +"Geben Sie NUR DIE NUMMER ein:" + +#: gli-dialog.py:914 +msgid "enables sandboxing when running emerge and ebuild." +msgstr "Aktiviert Sandboxing für die Ausführung von emerge und ebuild." + +#: gli-dialog.py:915 +msgid "enables ccache support via CC." +msgstr "Aktiviert CCACHE Unterstützung via CC." + +#: gli-dialog.py:916 +msgid "enables distcc support via CC." +msgstr "Aktiviert DISTCC Unterstützung via CC." + +#: gli-dialog.py:917 +msgid "enables distfiles locking using fcntl or hardlinks." +msgstr "Aktiviert Distfiles locking durch fcntl oder Hardlinks." + +#: gli-dialog.py:918 +msgid "create binaries of all packages emerged" +msgstr "Erstellt Binärdateien von allen installierten Paketen." + +#: gli-dialog.py:919 +msgid "Input your list of FEATURES manually." +msgstr "Geben Sie die Liste Ihrer FEATURES selbst ein." + +#: gli-dialog.py:920 +msgid "" +"FEATURES are settings that affect the functionality of portage. Most of " +"these settings are for developer use, but some are available to non-" +"developers as well." +msgstr "" +"FEATURES sind Einstellungen die die Funktionalität von Portage beinflussen. " +"Die meisten dieser Features sind nur für die Verwendung von Entwicklern gedacht. " +"Einige sind allerdings auch für Nicht-Entwickler verfügbar." + +#: gli-dialog.py:925 +msgid "Enter the value of FEATURES: " +msgstr "Geben Sie den Wert von FEATURES ein: " + +#: gli-dialog.py:942 gli-dialog.py:999 +msgid "ERROR! Could not set the make_conf correctly!" +msgstr "FEHLER! make.conf konnte nicht richtig geschrieben werden!" + +#: gli-dialog.py:948 +msgid "" +"Do you want to use distcc to compile your extra packages during the install " +"and for future compilations as well?" +msgstr "" +"Wollen Sie Distcc zur Kompilierung von Extrapaketen sowohl während der Installation " +"als auch in Zukunft verwenden?" + +#: gli-dialog.py:963 gli-dialog.py:1517 gli-dialog.py:1582 +msgid "ERROR! Could not set the services list." +msgstr "FEHLER! Liste der Dienste konnte nicht gesetzt werden." + +#: gli-dialog.py:969 +msgid "ERROR! Could not set the install distcc flag!" +msgstr "FEHLER! Konnte den Installalations-Distcc-Flag nicht setzen!" + +#: gli-dialog.py:990 +msgid "" +"Enter the hosts to be used by distcc for compilation:\n" +"Example: localhost 192.168.0.2 192.168.0.3:4000/10" +msgstr "" +"Geben Sie den Host der von distcc für die Kompilierung verwendet " +"werden soll ein:\n" +"Beispiel: localhost 192.168.0.2 192.168.0.3:4000/10" + +#: gli-dialog.py:1007 +msgid "A list of DEPEND atoms to mask." +msgstr "Eine Liste von DEPEND Atoms zum Maskieren." + +#: gli-dialog.py:1008 +msgid "A list of packages to unmask." +msgstr "Eine List von Paketen zum unmasken." + +#: gli-dialog.py:1009 +msgid "Per-package KEYWORDS (like ACCEPT_KEYWORDS)." +msgstr "Pro Paket KEYWORDS (Wie ACCEPT_KEYWORDS)." + +#: gli-dialog.py:1010 +msgid "Per-package USE flags." +msgstr "Pro Paket USE Flags." + +#: gli-dialog.py:1011 +msgid "Type your own name of a file to edit in /etc/" +msgstr "Geben Sie den Namen einer Datei in /etc/ die Sie bearbeiten möchen ein." + +#: gli-dialog.py:1012 +msgid "" +"For experienced users, the following /etc/* variables can also be defined. " +"Choose a variable to edit or Done to continue." +msgstr "" +"Für erfahrene Benutzer. Die folgenden /etc/* Variablen können ebenfalls definiert werden. " +"Wählen Sie eine Variable zum Bearbeiten oder 'Fertig' um fortzufahren." + +#: gli-dialog.py:1017 +msgid "" +"Enter the name of the /etc/ file you would like to edit (DO NOT type /etc/)" +msgstr "" +"Geben Sie den Namen der Datei in /etc/, die Sie bearbeiten möchten, ein (Ohne /etc/)" + +#: gli-dialog.py:1024 +msgid "Enter new contents (use \\n for newline) of " +msgstr "Eingabe eines neuen Inhalts (\\n für Zeilenumbruch) für " + +#: gli-dialog.py:1031 +msgid "ERROR! Could not set etc/portage/* correctly!" +msgstr "FEHLER! /etc/portage konnte nicht korrekt geschrieben werden!" + +#: gli-dialog.py:1038 +msgid "Copy over the current running kernel (fastest)" +msgstr "Kopieren Sie den aktuellen laufenden Kernel (schnell)" + +#: gli-dialog.py:1039 +msgid "The Unaltered Linux Kernel ver 2.6+ (safest)" +msgstr "Der unveränderte Linux Kernel in Version 2.6+ (sicher)" + +#: gli-dialog.py:1040 +msgid "Gentoo's optimized 2.6+ kernel. (less safe)" +msgstr "Optimierter 2.6+ kernel von Gentoo. (weniger sicher)" + +#: gli-dialog.py:1041 +msgid "Hardened sources for the 2.6 kernel tree" +msgstr "Hardened Quellcode für den 2.6er Kernel" + +#: gli-dialog.py:1042 +msgid "Vanilla sources with grsecurity patches" +msgstr "Vanilla Sources mit grsecurity Patches" + +#: gli-dialog.py:1043 +msgid "Choose one of the other sources available." +msgstr "Wählen Sie einen der anderen verfügbaren Kernel." + +#: gli-dialog.py:1044 +msgid "" +"Choose which kernel sources to use for your system. If using a previously-" +"made kernel configuration, make sure the sources match the kernel used to " +"create the configuration." +msgstr "" +"Wählen Sie den Kernel für Ihr System. Wenn Sie eine zuvor generierte Kernelkonfiguration " +"verwenden stellen Sie sicher, dass der verwendete Kernel der Gleiche ist wie der der die Konfiguration " +"erzeugt hat." + +#: gli-dialog.py:1048 +msgid "Please enter the desired kernel sources package name:" +msgstr "Bitte geben Sie den Namen des gewünschten Kernelpaketes ein:" + +#: gli-dialog.py:1053 +msgid "ERROR! Could not set the kernel source package!" +msgstr "FEHLER! Das Kernelpaket konnte nicht gesetzt werden!" + +#: gli-dialog.py:1056 +msgid "Genkernel" +msgstr "Genkernel" + +#: gli-dialog.py:1057 +msgid "Traditional (requires a config!)" +msgstr "Traditionell (erfordert eine config!)" + +#: gli-dialog.py:1058 +msgid "" +"There are currently two ways the installer can compile a kernel for your new " +"system. You can either provide a previously-made kernel configuration file " +"and use the traditional kernel-compiling procedure (no initrd) or have " +"genkernel automatically create your kernel for you (with initrd). \n" +"\n" +" If you do not have a previously-made kernel configuration, YOU MUST CHOOSE " +"Genkernel. Choose which method you want to use." +msgstr "" +"Es gibt derzeit zwei Wege wie der Installer den Kernel für Ihr neues System " +"kompilieren kann. Sie können entweder eine zuvor generierte .config Datei " +"verwenden und die tranditionelle Kernelkonfigurationsprozedur durchführen " +"oder sich von Genkernel einen Kernel automatisch erstellen lassen (mit initrd). \n" +"\n" +"Wenn sie keine zuvor generierte Kernelkonfiguration haben, dann MÜSSEN SIE GENKERNEL " +"VERWENDEN. Welche Methode möchten Sie verwenden." + +#: gli-dialog.py:1065 +msgid "Do you want the bootsplash screen to show up on bootup?" +msgstr "Wollen Sie einen Bootsplash verwenden?" + +#: gli-dialog.py:1072 +msgid "" +"If you have a custom kernel configuration, enter its location (otherwise " +"just press Enter to continue):" +msgstr "" +"Wenn Sie eine eigene Kernelkonfiguration haben, können Sie nun den URI eingeben " +"(Ansonsten drücken Sie Enter um fortzufahren):" + +#: gli-dialog.py:1081 +msgid "ERROR! Could not set the kernel config URI!" +msgstr "FEHLER! Kernelkonfigurations URI konnte nicht gesetzt werden!" + +#: gli-dialog.py:1104 gli-dialog.py:1106 +msgid "GRand Unified Bootloader, newer, RECOMMENDED" +msgstr "GRand Unified Bootloader, neuer, EMPFOHLEN" + +#: gli-dialog.py:1108 +msgid "LInux LOader, older, traditional.(detects windows partitions)" +msgstr "LInux LOader, älter, traditionell. (erkennt Windows Partitionen)" + +#: gli-dialog.py:1110 +msgid "Do not install a bootloader. (System may be unbootable!)" +msgstr "Keinen Bootloader installieren. (System dann evtl. nicht bootbar)" + +#: gli-dialog.py:1111 +msgid "" +"To boot successfully into your new Linux system, a bootloader will be " +"needed. If you already have a bootloader you want to use you can select " +"None here. The bootloader choices available are dependent on what GLI " +"supports and what architecture your system is. Choose a bootloader" +msgstr "" +"Um Ihr Linux System erfolgreich zu booten, benötigen Sie einen Bootloader. " +"Wenn Sie bereits über einen Bootloader verfügen, können Sie auch None wählen. " +"Die verfügbaren Bootloader hängen von der Architektur Ihres Systems und der " +"Unterstützung durch den GLI ab. Wählen Sie einen Bootloader" + +#: gli-dialog.py:1118 +msgid "ERROR! Could not set boot loader pkg! " +msgstr "FEHLER! Bootloader konnte nicht gesetzt werden! " + +#: gli-dialog.py:1123 +msgid "" +"Most bootloaders have the ability to install to either the Master Boot " +"Record (MBR) or some other partition. Most people will want their " +"bootloader installed on the MBR for successful boots, but if you have " +"special circumstances, you can have the bootloader installed to the /boot " +"partition instead. Do you want the boot loader installed in the MBR? (YES " +"is RECOMMENDED)" +msgstr "" +"Die meisten Bootloader haben die Fähigkeit sich entweder im Master Boot " +"Recorder (MBR) oder auf einer anderen Partition zu installieren. Die " +"meisten Leute installieren Ihren Bootloader im MBR, aber bei speziellen " +"Umständen, können Sie den Bootloader auch in Ihrer /boot Partition installieren. " +"Wollen Sie Ihren Bootloader im MBR installieren? (JA ist empfohlen)" + +#: gli-dialog.py:1131 +#, python-format +msgid "" +"Your boot device may not be correct. It is currently set to %s, but this " +"device may not be the first to boot. Usually boot devices end in 'a' such " +"as hda or sda." +msgstr "" +"Ihre Bootpartition scheint nicht richtig zu sein. Sie ist zur Zeit %s, aber dieses " +"Device ist möglicherweise nicht das erste das gebootet wird. Bootpartitionen enden " +"normalerweise mit 'a' wie z.B. hda oder sda." + +#: gli-dialog.py:1132 +msgid " Please confirm your boot device by choosing it from the menu." +msgstr " Bitte bestätigen Sie die Bootpartition indem Sie sie vom Menü auswählen." + +#: gli-dialog.py:1136 +msgid "" +"ERROR: No drives set up. Please complete the Partitioning screen first!" +msgstr "" +"FEHLER: Keine Festplatten festgelegt. Bitte vervollständigen Sie zuerst die Partitionierung!" + +#: gli-dialog.py:1145 +msgid "ERROR! Could not set the boot device!" +msgstr "FEHLER! Die Bootpartition konnte nicht gesetzt werden!" + +#: gli-dialog.py:1147 +msgid "" +"If you have any additional optional arguments you want to pass to the kernel " +"at boot, type them here or just press Enter to continue:" +msgstr "" +"Wenn Sie dem Kernel beim Booten irgendwelche zusätzlichen Argumente übergeben wollen, " +"so könne Sie diese nachfolgenden angeben. Ansonsten drücken Sie Enter um fortzufahren:" + +#: gli-dialog.py:1152 gli-dialog.py:1157 +msgid "ERROR! Could not set bootloader kernel arguments! " +msgstr "FEHLER! Die Argumente der kernel Anweisung Ihres Bootloaders konnten nicht gesetzt werden! " + +#: gli-dialog.py:1171 +msgid "" +"Please select the timezone for the new installation. Entries ending with " +"a / can be selected to reveal a sub-list of more specific locations. For " +"example, you can select America/ and then Chicago." +msgstr "" +"Bitte wählen Sie die Zeitzone für die neue Installation aus. Einträge mit " +"einem / am Ende, enthalten eine Liste mit genaueren Ortsangaben. " +"Sie können z.B. zuerst Amerika/ und dann Chicago wählen." + +#: gli-dialog.py:1185 +msgid "ERROR: Could not set that timezone!" +msgstr "FEHLER: Zeitzone konnte nicht gesetzt werden!" + +#: gli-dialog.py:1192 +msgid "" +"Here you will enter all of your network interface information for the new " +"system. You can either choose a network interface to edit, add a network " +"interface, delete an interface, or edit the miscellaneous options such as " +"hostname and proxy servers." +msgstr "" +"Hier werden Sie alle Netzwerwerkinformationen für Ihr neues System eingeben. " +"Sie können entweder eine Schnittstelle bearbeiten, hinzufügen, löschen oder diverse " +"Optionen wie Hostname und Proxy Server bearbeiten." + +#: gli-dialog.py:1197 gli-dialog.py:1285 +msgid "Settings: DHCP. Options: " +msgstr "Einstellungen: DHCP. Optionen: " + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid "IP: " +msgstr "IP: " + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid " Broadcast: " +msgstr " Broadcast: " + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid " Netmask: " +msgstr "Netzwerkmaske: " + +#: gli-dialog.py:1200 +msgid "Add a new network interface" +msgstr "Netzwerkschnittstelle hinzufügen" + +#: gli-dialog.py:1206 +msgid "ERROR! Could not set the network interfaces!" +msgstr "FEHLER! Netzwerkschnittstelle konnte nicht gesetzt werden!" + +#: gli-dialog.py:1216 +msgid "" +"Choose an interface from the list or Other to type your own if it was not " +"detected." +msgstr "" +"Wählen Sie eine Schnittstelle aus der Liste aus oder wählen Sie Andere um Ihre eigene " +"zu erstellen." + +#: gli-dialog.py:1219 +msgid "Enter name for new interface (eth0, ppp0, etc.)" +msgstr "Geben Sie den Namen für eine neue Schnittstelle ein (eth0, ppp0, etc.)" + +#: gli-dialog.py:1223 +msgid "An interface with the name is already defined." +msgstr "Es gibt bereits eine Schnittstelle mit gleichem Namen." + +#: gli-dialog.py:1237 gli-dialog.py:1262 +msgid "" +"Enter your networking information: (See Chapter 3 of the Handbook for more " +"information) Your broadcast address is probably your IP address with 255 as " +"the last tuple. Do not press Enter until all fields are complete!" +msgstr "" +"Geben Sie die Netzwerkinformationen ein: (Siehe Kapitel 3 des Handbuches) " +"Ihre Broadcast Adresse ist wahrscheinlich Ihre IP Adresse mit 255 als letztes Tuple. " +"Drücken Sie nicht Enter bevor alle Felder ausgefüllt sind!" + +#: gli-dialog.py:1248 +msgid "Edit" +msgstr "Bearbeiten" + +#: gli-dialog.py:1250 +#, python-format +msgid "" +"For interface %s, you can either edit the interface information (IP Address, " +"Broadcast, Netmask) or Delete the interface." +msgstr "" +"Sie können die Schnittstelle %s entweder bearbeiten (IP Adresse, Broadcast, Netzwermaske) " +"oder löschen." + +#: gli-dialog.py:1276 +msgid "Are you sure you want to remove the interface " +msgstr "Sind Sie sicher, dass Sie die Schnittstelle entfernen wollen " + +#: gli-dialog.py:1288 +msgid "" +"To be able to surf on the internet, you must know which host shares the " +"Internet connection. This host is called the gateway. It is usually similar " +"to your IP address, but ending in .1\n" +"If you have DHCP then just select your primary Internet interface (no IP " +"will be needed) Start by choosing which interface accesses the Internet:" +msgstr "" +"Um im Internet surfen zu können müssen Sie wissen welcher Host die Internet " +"Verbindung anbietet. Dieser Host nennt sich Gateway. Er ist normalerweise " +"gleich Ihrer IP Adresse, allerdings mit der Endung .1\n" +"Wenn Sie DHCP verwenden, dann müssen Sie nur Ihre primäre Internet Schnittstelle auswählen " +"(IP Adresse wird nicht benötigt) Wählen Sie die Schnittstelle für den Internetzugang:" + +#: gli-dialog.py:1296 +msgid "Enter the gateway IP address for " +msgstr "Eingabe der Gateway IP Adresse für " + +#: gli-dialog.py:1300 +msgid "Invalid IP Entered! Please try again." +msgstr "Falsche IP eingegeben! Bitte versuchen Sie es erneut." + +#: gli-dialog.py:1305 +#, python-format +msgid "" +"ERROR! Coult not set the default gateway with IP %(ip)s for interface %" +"(iface)s" +msgstr "" +"FEHLER! Konnte den Standardgateway mit der IP %(ip)s für das Interface %(iface)s nicht setzen" + +#: gli-dialog.py:1320 gli-dialog.py:1333 +msgid "" +"Fill out the remaining networking settings. The hostname is manditory as " +"that is the name of your computer. Leave the other fields blank if you are " +"not using them. If using DHCP you do not need to enter DNS servers. Do not " +"press Enter until all fields are complete!" +msgstr "" +"Füllen Sie die restlichen Netzwerkeinstellungen aus. Der Hostname ist verpflichtend, " +"da dies der Name Ihrers Computers ist. Lassen Sie die anderen Felder leer, wenn Sie " +"sie nicht benutzen. Wenn Sie DHCP verwenden brauchen Sie keine DNS Server angeben. " +"Drücken Sie nicht Enter bevor alle gewünschten Felder vollständig ausgefüllt sind!" + +#: gli-dialog.py:1321 gli-dialog.py:1334 +msgid "Enter your Hostname:" +msgstr "Geben Sie einen Hostname ein:" + +#: gli-dialog.py:1322 gli-dialog.py:1335 +msgid "Enter your Domain Name:" +msgstr "Geben Sie einen Domainname ein:" + +#: gli-dialog.py:1323 +msgid "Enter your NIS Domain Name:" +msgstr "Geben Sie einen NIS Domainname ein:" + +#: gli-dialog.py:1324 gli-dialog.py:1336 +msgid "Enter a primary DNS server:" +msgstr "Geben Sie einen Primary DNS Server ein:" + +#: gli-dialog.py:1325 gli-dialog.py:1337 +msgid "Enter a backup DNS server:" +msgstr "Geben Sie einen Backup DNS Server ein:" + +#: gli-dialog.py:1344 +msgid "Incorrect hostname! It must be a string. Not saved." +msgstr "Falscher Hostname! Es muss ein String sein. Nicht gespeichert." + +#: gli-dialog.py:1350 +msgid "ERROR! Could not set the hostname:" +msgstr "FEHLER! Hostname konnte nicht gesetzt werden:" + +#: gli-dialog.py:1354 +msgid "Incorrect domainname! It must be a string. Not saved." +msgstr "Falscher Domainname! Es muss ein String sein. Nicht gespeichert." + +#: gli-dialog.py:1360 +msgid "ERROR! Could not set the domainname:" +msgstr "FEHLER! Domainname konnte nicht gesetzt werden." + +#: gli-dialog.py:1364 +msgid "Incorrect nisdomainname! It must be a string. Not saved." +msgstr "Falscher NIS Domainname! Es muss ein String sein. Nicht gespeichert." + +#: gli-dialog.py:1370 +msgid "ERROR! Could not set the nisdomainname:" +msgstr "FEHLER! NIS Domainname konnte nicht gesetzt werden:" + +#: gli-dialog.py:1374 +msgid "Incorrect Primary DNS Server! Not saved." +msgstr "Falscher Primary DNS Server! Nicht gespeichert." + +#: gli-dialog.py:1379 +msgid "Incorrect Backup DNS Server! Not saved." +msgstr "Falscher Backup DNS Server! Nicht gespeichert." + +#: gli-dialog.py:1386 +msgid "ERROR! Could not set the DNS Servers:" +msgstr "FEHLER! DNS Server konnte nicht gesetzt werden:" + +#: gli-dialog.py:1390 +msgid "Incorrect HTTP Proxy! It must be a uri. Not saved." +msgstr "Falscher HTTP Proxy! Es muss eine URI sein. Nicht gespeichert." + +#: gli-dialog.py:1396 +msgid "ERROR! Could not set the HTTP Proxy:" +msgstr "FEHLER! HTTP Proxy konnte nicht gesetzt werden:" + +#: gli-dialog.py:1400 +msgid "Incorrect FTP Proxy! It must be a uri. Not saved." +msgstr "Falscher FTP Proxy! Es muss ein URI sein. Nicht gespeichert." + +#: gli-dialog.py:1406 +msgid "ERROR! Could not set the FTP Proxy:" +msgstr "FEHLER! FTP Proxy konnte nicht gesetzt werden:" + +#: gli-dialog.py:1410 +msgid "Incorrect RSYNC Proxy! It must be a uri. Not saved." +msgstr "Falscher RSYNC Proxy! Es muss ein URI sein. Nicht gespeichert." + +#: gli-dialog.py:1416 +msgid "ERROR! Could not set the RSYNC Proxy:" +msgstr "FEHLER! RSYNC Proxy konnte nicht gesetzt werden:" + +#: gli-dialog.py:1422 +msgid "Paul Vixie's cron daemon, fully featured, RECOMMENDED." +msgstr "Paul Vixie's Cron Daemon, featurereich, EMPFOHLEN." + +#: gli-dialog.py:1423 +msgid "A cute little cron from Matt Dillon." +msgstr "Ein niedlicher kleiner Cron Daemon von Matt Dillon." + +#: gli-dialog.py:1424 +msgid "A scheduler with extended capabilities over cron & anacron" +msgstr "Ein Steuerprogramm mit erweiterten Fähigkeiten über cron & anacron" + +#: gli-dialog.py:1425 +msgid "Don't use a cron daemon. (NOT Recommended!)" +msgstr "Keinen Cron Daemon verwenden. (NICHT Empfohlen!)" + +#: gli-dialog.py:1426 +msgid "" +"A cron daemon executes scheduled commands. It is very handy if you need to " +"execute some command regularly (for instance daily, weekly or monthly). " +"Gentoo offers three possible cron daemons: dcron, fcron and vixie-cron. " +"Installing one of them is similar to installing a system logger. However, " +"dcron and fcron require an extra configuration command, namely crontab /etc/" +"crontab. If you don't know what to choose, use vixie-cron. If doing a " +"networkless install, choose vixie-cron. Choose your cron daemon:" +msgstr "" +"Ein Cron Daemon führt regelmäßig geplante Kommands aus. Das ist sehr praktisch, " +"wenn Sie einen Befehl regelmäßig ausführen müssen (z.B. täglich, wöchentlich, monatlich). " +"Gentoo bietet drei Cron Daemons an: dcron, fcron und vixie-cron. " +"Die Installation eines Cron Daemons ist gleich der eines System Loggers. Jedoch benötigen " +"dcron und fcron eine Konfigurationsanweisung, nämlich crontab /etc/crontab. Wenn Sie " +"sich nicht entscheiden können, wählen Sie vixie-cron. Führen Sie eine netzwerklose " +"Installation durch so wählen Sie ebenfalls vixie-cron. Wählen Sie einen Cron Daemon:" + + +#: gli-dialog.py:1435 +msgid "An advanced system logger." +msgstr "Ein fortgeschrittener System Logger" + +#: gli-dialog.py:1436 +msgid "A Highly-configurable system logger." +msgstr "Ein sehr gut konfigurierbarer System Logger" + +#: gli-dialog.py:1437 +msgid "The traditional set of system logging daemons." +msgstr "Die üblichen System Logging Daemons" + +#: gli-dialog.py:1438 +msgid "" +"Linux has an excellent history of logging capabilities -- if you want you " +"can log everything that happens on your system in logfiles. This happens " +"through the system logger. Gentoo offers several system loggers to choose " +"from. If you plan on using sysklogd or syslog-ng you might want to install " +"logrotate afterwards as those system loggers don't provide any rotation " +"mechanism for the log files. If doing networkless, choose syslog-ng. " +"Choose a system logger:" +msgstr "" +"Linux hat ausgezeichnete Logging Funktionalitäten. Sie können alles was auf " +"Ihrem System geschieht in Log Dateien festhalten. Dies geschieht durch " +"den System Logger. Gentoo stellt verschiedene System Logger zur Verfügung. " +"Wenn Sie sysklogd oder syslog-ng verwenden wollen, so sollten Sie auch " +"noch logrotate installieren. Diese System Logger bieten nämlich keine " +"Rotationsmechanismen für die Log Dateien. Wenn Sie eine netzwerklose " +"Installation durchführen wählen Sie syslog-ng. " +"Wählen Sie einen System Logger:" + +#: gli-dialog.py:1458 +msgid "" +"There are thousands of applications available to Gentoo users through " +"Portage, Gentoo's package management system. Select some of the more common " +"ones below or add your own additional package list by choosing 'Manual'." +msgstr "" +"Gentoo Benutzern stehen durch Portage, Gentoo's Paketverwaltungssystem, tausende Applikationen zur Verfügung. " +"Sie können aus der Liste häufig genutzte Pakete auswählen oder 'Manuell' wählen und selbst " +"Pakete zur Liste hinzufügen." + +#: gli-dialog.py:1459 +msgid "" +"\n" +"Your current package list is: " +msgstr "\n" +"Ihre aktuelle Paketliste ist: " + +#: gli-dialog.py:1466 +msgid "ERROR! Could not set the install packages! List of packages:" +msgstr "FEHLER! Konnte die zu installierenden Pakete nicht festlegen! Liste von Paketen:" + +#: gli-dialog.py:1474 +msgid "Enter a space-separated list of extra packages to install on the system" +msgstr "Geben Sie in einer leerzeichenseparierten Liste zu installierende Extra-Pakete an" + +#: gli-dialog.py:1489 +msgid "" +"Choose from the listed packages. If doing a networkless install, only " +"choose (GRP) packages." +msgstr "" +"Wählen Sie Pakete aus der Liste aus. Wenn Sie ein netzwerklose Installation durchführen " +"können Sie nur (GRP) Pakete wählen." + +#: gli-dialog.py:1508 +msgid "Do you want to start X on bootup?" +msgstr "Soll X beim Bootvorgang gestartet werden?" + +#: gli-dialog.py:1553 +msgid "ALSA Sound Daemon" +msgstr "ALSA Sound Daemon" + +#: gli-dialog.py:1554 +msgid "Common web server (version 1.x)" +msgstr "Häufig verwendeter Web Server (Version 1.x)" + +#: gli-dialog.py:1555 +msgid "Common web server (version 2.x)" +msgstr "Häufig verwendeter Web Server (Version 2.x)" + +#: gli-dialog.py:1556 +msgid "Distributed Compiling System" +msgstr "Verteiltes Kompilierungssystem" + +#: gli-dialog.py:1557 +msgid "ESD Sound Daemon" +msgstr "ESD Sound Daemon" + +#: gli-dialog.py:1558 +msgid "Hard Drive Tweaking Utility" +msgstr "Festplatten Tuning Tool" + +#: gli-dialog.py:1559 +msgid "Run scripts found in /etc/conf.d/local.start" +msgstr "Führt Skripte die in /etc/conf.d/local.start aufgerufen werden aus" + +#: gli-dialog.py:1560 +msgid "Port Mapping Service" +msgstr "Port Mapping Dienst" + +#: gli-dialog.py:1561 +msgid "Common FTP server" +msgstr "Häufig verwendeter FTP Server" + +#: gli-dialog.py:1562 +msgid "SSH Daemon (allows remote logins)" +msgstr "SSH Daemon (Erlaubt Remote Logins)" + +#: gli-dialog.py:1563 +msgid "X Font Server" +msgstr "X Schrift Server" + +#: gli-dialog.py:1564 +msgid "X Daemon" +msgstr "X Daemon" + +#: gli-dialog.py:1565 +msgid "Manually specify your services in a comma-separated list." +msgstr "Spezifizieren Sie die Dienste in einer kommaseparierten Liste" + +#: gli-dialog.py:1566 +msgid "" +"Choose the services you want started on bootup. Note that depending on what " +"packages are selected, some services listed will not exist." +msgstr "" +"Wählen Sie die Dienste, die beim Bootvorgang gestartet werden sollen. Beachten Sie, dass " +"einige aufgelistete Dienste möglicherweise nicht existieren, weil evtl. nicht alle " +"erforderlichen Pakete installiert sind." + +#: gli-dialog.py:1574 +msgid "Enter a comma-separated list of services to start on boot" +msgstr "Geben Sie eine kommaseparierte Liste von Diensten ein, die beim Bootvorgang " +"gestartet werden sollen." + +#: gli-dialog.py:1599 +msgid "" +"Additional configuration settings for Advanced users (rc.conf)\n" +"Here are some other variables you can set in various configuration files on " +"the new system. If you don't know what a variable does, don't change it!" +msgstr "" +"Zusätzliche Konfigurationseinstellungen für fortgeschrittene Benutzer (rc.conf)\n" +"Hier sind einige andere Variablen die in verschiedenen Konfigurationsdateien gesetzt werden " +"können. Wenn Sie nicht genau wissen was eine Variable macht, so ändern Sie diese nicht!" + +#: gli-dialog.py:1600 +msgid "Use KEYMAP to specify the default console keymap." +msgstr "Verwenden Sie KEYMAP um das Konsolentastaturlayout festzulegen." + +#: gli-dialog.py:1601 +msgid "Decision to first load the 'windowkeys' console keymap" +msgstr "Entscheidung ob zuerst die 'windowkeys' Keymap für die Konsole geladen werden soll" + +#: gli-dialog.py:1602 +msgid "maps to load for extended keyboards. Most users will leave this as is." +msgstr "Keymap die für erweiterte Tastaturen geladen werden soll. Die meisten " +"Benutzer werden diesen Wert nicht verändern." + +#: gli-dialog.py:1603 +msgid "Specifies the default font that you'd like Linux to use on the console." +msgstr "Spezifiziert die Standardschrift die Linux für die Konsole verwenden soll." + +#: gli-dialog.py:1604 +msgid "The charset map file to use." +msgstr "Die zu verwendende Zeichensatztabellendatei" + +#: gli-dialog.py:1605 +msgid "Set the clock to either UTC or local" +msgstr "Setzen Sie CLOCK entweder auf UTC oder local" + +#: gli-dialog.py:1606 +msgid "Set EDITOR to your preferred editor." +msgstr "Setzen Sie EDITOR auf Ihren bevorzugten Editor" + +#: gli-dialog.py:1607 +msgid "What display manager do you use ? [ xdm | gdm | kdm | entrance ]" +msgstr "Welchen Fenstermanager verwenden Sie? [ xdm | gdm | kdm | entrance ]" + +#: gli-dialog.py:1608 +msgid "a new variable to control what window manager to start default with X" +msgstr "Eine neue Variable um festzulegen welcher Fenstermanager standardmäßig " +"mit X gestartet werden soll." + +#: gli-dialog.py:1615 +msgid "Choose your desired keymap:" +msgstr "Wählen Sie Ihre gewünschte Keymap aus:" + +#: gli-dialog.py:1624 +msgid "" +"Should we first load the 'windowkeys' console keymap? Most x86 users will " +"say 'yes' here. Note that non-x86 users should leave it as 'no'." +msgstr "" +"Soll zuerst die 'windowkeys' Keymap für die Konsole geladen werden? Die meisten " +"x86 Benutzer werden hierzu 'Ja' sagen. Nicht-x86 Benutzer sollten es bei 'Nein' " +"belassen." + +#: gli-dialog.py:1629 +msgid "" +"This sets the maps to load for extended keyboards. Most users will leave " +"this as is. Enter new value for EXTENDED_KEYMAPS" +msgstr "" +"Das setzt die Keymap für erweiterte Tastaturen. Die meisten " +"Benutzer werden diesen Wert nicht verändern. Geben Sie einen neuen Wert für " +"EXTENDED_KEYMAPS ein" + +#: gli-dialog.py:1632 +msgid "Choose your desired console font:" +msgstr "Wählen Sie Ihre gewünschte Konsolenschrift:" + +#: gli-dialog.py:1638 +msgid "Choose your desired console translation:" +msgstr "Wählen Sie Ihre gewünschte Konsolensprache:" + +#: gli-dialog.py:1646 +msgid "" +"Should CLOCK be set to UTC or local? Unless you set your timezone to UTC " +"you will want to choose local." +msgstr "" +"Soll CLOCK auf UTC oder lokal gesetzt werden? Wenn Ihre Zeitzone nicht auf UTC gestellt ist " +"werden Sie wahrscheinlich lokal wählen wollen." + +#: gli-dialog.py:1651 +msgid "Default editor." +msgstr "Standardeditor." + +#: gli-dialog.py:1651 +msgid "vi improved editor." +msgstr "Verbesserter vi Editor." + +#: gli-dialog.py:1651 +msgid "The emacs editor." +msgstr "Der emacs Editor." + +#: gli-dialog.py:1652 +msgid "Choose your default editor: " +msgstr "Wählen Sie Ihren Standardeditor aus: " + +#: gli-dialog.py:1654 +msgid "X Display Manager" +msgstr "X Fenstermanager" + +#: gli-dialog.py:1655 +msgid "Gnome Display Manager" +msgstr "Gnome Fenstermanager" + +#: gli-dialog.py:1656 +msgid "KDE Display Manager" +msgstr "KDE Fenstermanager" + +#: gli-dialog.py:1657 +msgid "Login Manager for Enlightenment" +msgstr "Login Manager für Enlightenment" + +#: gli-dialog.py:1658 +msgid "" +"Choose your desired display manager to use when starting X (note you must " +"make sure that package also gets installed for it to work):" +msgstr "" +"Wählen Sie Ihren gewünschten Fenstermanager aus (Stellen Sie sicher, dass " +"die dafür erforderlichen Pakete auch installiert werden):" + +#: gli-dialog.py:1660 +msgid "" +"Choose what window manager you want to start default with X if run with xdm, " +"startx, or xinit. (common options are Gnome or Xsession):" +msgstr "" +"Wählen Sie welcher Fenstermanager standardmäßig bei der Verwendung von xdm, startx oder xinit " +"gestartet werden soll. (Häufige Optionen sind Gnome oder Xsession):" + +#: gli-dialog.py:1697 +msgid "" +"Please enter your desired password for the root account. (note it will not " +"show the password. Also do not try to use backspace.):" +msgstr "" +"Bitte geben Sie das gewünschte root Passwort ein. (Passwort wird nicht angezeigt, " +"versuchen Sie nicht die Löschen-Taste zu verwenden.):" + +#: gli-dialog.py:1700 +msgid "Enter the new root password again for confirmation" +msgstr "Bestätigen Sie das neue root Passwort." + +#: gli-dialog.py:1704 +msgid "The passwords do not match. Please try again or cancel." +msgstr "Die Passwörter stimmen nicht überein. Bitte versuchen Sie es erneut oder brechen Sie ab." + +#: gli-dialog.py:1709 +msgid "ERROR! Could not set the new system root password!" +msgstr "FEHLER! Das neue root Passwort konnte nicht gesetzt werden!" + +#: gli-dialog.py:1710 gli-dialog.py:1775 +msgid "Password saved. Press Enter to continue." +msgstr "Passwort gespeichert. Drücken Sie Enter um fortzufahren." + +#: gli-dialog.py:1723 gli-dialog.py:1737 +msgid "Add user" +msgstr "Benutzer hinzufügen" + +#: gli-dialog.py:1724 +msgid "" +"Working as root on a Unix/Linux system is dangerous and should be avoided as " +"much as possible. Therefore it is strongly recommended to add a user for day-" +"to-day use. Choose a user to edit:" +msgstr "" +"Als Benutzer root auf einem Unix/Linux System zu arbeiten ist gefährlich und " +"sollte möglichst vermieden werden. Deshalb ist es höchstens empfohlen einen Benutzer " +"für das tägliche Arbeiten zu erstellen. Wählen Sie einen zu bearbeitenden Benutzer:" + +#: gli-dialog.py:1734 +msgid "ERROR! Could not set the additional users!" +msgstr "FEHLER! Der zusätzliche Benutzer konnte nicht festgelegt werden!" + +#: gli-dialog.py:1738 +msgid "Enter the username for the new user" +msgstr "Geben Sie einen Benutzernamen für den neuen Benutzer ein" + +#: gli-dialog.py:1742 +msgid "A user with that name already exists" +msgstr "Es existiert bereits ein Benutzer mit diesem Namen" + +#: gli-dialog.py:1746 +#, python-format +msgid "Enter the new password for user %s. (will not be echoed)" +msgstr "Geben Sie das neue Passwort für den Benutzer %s ein. (wird nicht angezeigt)" + +#: gli-dialog.py:1747 +msgid "Enter the new password again for confirmation" +msgstr "Bestätigen Sie das neue Passwort" + +#: gli-dialog.py:1750 +msgid "The passwords do not match! Please try again." +msgstr "Die Passwörter stimmen nicht überein! Bitte versuchen Sie es erneut." + +#: gli-dialog.py:1754 +msgid "" +"You must enter a password for the user! Even a blank password will do. You " +"can always edit it again later from the menu." +msgstr "" +"Sie müssen ein Passwort für den Benutzer eingeben! Ein leeres Passwort ist auch valide. " +"Sie können es später über das Menü ändern." + +#: gli-dialog.py:1760 gli-dialog.py:1765 +msgid "Password" +msgstr "Passwort" + +#: gli-dialog.py:1760 gli-dialog.py:1777 +msgid "Group Membership" +msgstr "Gruppenmitgliedschaft" + +#: gli-dialog.py:1760 gli-dialog.py:1801 +msgid "Shell" +msgstr "Shell" + +#: gli-dialog.py:1760 gli-dialog.py:1806 +msgid "Home Directory" +msgstr "Heimatverzeichnis" + +#: gli-dialog.py:1760 gli-dialog.py:1811 +msgid "UID" +msgstr "UID" + +#: gli-dialog.py:1760 gli-dialog.py:1818 +msgid "Comment" +msgstr "Kommentar" + +#: gli-dialog.py:1761 +#, python-format +msgid "Choose an option for user %s" +msgstr "Wählen Sie eine Option für den Benutzer %s" + +#: gli-dialog.py:1766 +msgid "Enter the new password" +msgstr "Geben Sie das neue Passwort ein" + +#: gli-dialog.py:1769 +msgid "Enter the new password again" +msgstr "Geben Sie das Passwort erneut ein" + +#: gli-dialog.py:1773 +msgid "The passwords do not match! Try again." +msgstr "Die Passwörter stimmen nicht überein! Versuchen Sie es erneut." + +#: gli-dialog.py:1779 +msgid "The usual group for normal users." +msgstr "Die Gruppe für normale Benutzer." + +#: gli-dialog.py:1780 +msgid "Allows users to attempt to su to root." +msgstr "Erlaubt Benutzern zum Systemadministrator (root) zu werden." + +#: gli-dialog.py:1781 +msgid "Allows access to audio devices." +msgstr "Erlaubt die Verwendung von Audiogeräten." + +#: gli-dialog.py:1782 +msgid "Allows access to games." +msgstr "Erlaubt die Verwendung von Spielen." + +#: gli-dialog.py:1783 gli-dialog.py:1784 gli-dialog.py:1785 gli-dialog.py:1786 +msgid "For users who know what they're doing only." +msgstr "Nur für Benutzer die wissen was sie tun." + +#: gli-dialog.py:1787 +msgid "Manually specify your groups in a comma-separated list." +msgstr "Geben Sie Ihre Gruppen in einer kommaseparierten Liste ein." + +#: gli-dialog.py:1788 +#, python-format +msgid "Select which groups you would like the user %s to be in." +msgstr "Wählen Sie aus zu welchen Gruppen der Benutzer %s gehören soll." + +#: gli-dialog.py:1798 +msgid "Enter a comma-separated list of groups the user is to be in" +msgstr "Geben Sie die Gruppen, zu welchen der Benutzer gehören soll, in einer kommaseparierten Liste an" + +#: gli-dialog.py:1802 +msgid "Enter the shell you want the user to use. default is /bin/bash. " +msgstr "Geben Sie die Shell für den Benutzer ein. Standard ist /bin/bash. " + +#: gli-dialog.py:1807 +msgid "Enter the user's home directory. default is /home/username. " +msgstr "Geben Sie das Heimatverzeichnis des Benutzers ein. Standardmäßig wird /home/benutzername verwendet. " + +#: gli-dialog.py:1812 +msgid "" +"Enter the user's UID. If left blank the system will choose a default value " +"(this is recommended)." +msgstr "" +"Geben Sie die UID des Benutzers ein. Wenn nichts angegeben, so werden Standardwerte verwendet (empfohlen)" + +#: gli-dialog.py:1819 +msgid "Enter the user's comment. This is completely optional." +msgstr "Geben Sie einen Kommentar zum Benutzer ein. Diese Angabe ist optional." + +#: gli-dialog.py:1827 +#, python-format +msgid "Are you sure you want to delete the user %s ?" +msgstr "Wollen Sie den Benutzer %s wirklich löschen?" + +#: gli-dialog.py:1835 +msgid "Would you like to save these install settings for use again later?" +msgstr "Sollen die Installationseinstellungen für die spätere Verwendung gespeichert werden?" + +#: gli-dialog.py:1839 +msgid "Enter a filename for the XML file. Use full path!" +msgstr "Geben Sie einen Dateinamen für die XML Datei ein. Verwenden sie einen vollständige Pfad!" + +#: gli-dialog.py:1843 +#, python-format +msgid "The file %s already exists. Do you want to overwrite it?" +msgstr "Die Datei %s existiert bereits. Soll sie überschrieben werden?" + +#: gli-dialog.py:1850 +msgid "" +"Error. File couldn't be saved. Saving to /tmp/installprofile.xml instead." +msgstr "" +"Fehler. Datei konnte nicht gespeichert werden. Speichere Daten in /tmp/installprofile.xml stattdessen." + +#: gli-dialog.py:1856 +msgid "Complete failure to save install profile!" +msgstr "Installationsprofil konnte nicht gespeichert werden." + +#: gli-dialog.py:1952 +msgid "Install completed!" +msgstr "Installation abgeschlossen!" + +#: gli-dialog.py:1954 +msgid "Install done!" +msgstr "Installation fertig!" + +#: gli-dialog.py:1970 +#, python-format +msgid "" +"There was an Exception received during the install that is outside of the " +"normal install errors. This is a bad thing. The error was: %s \n" +" You have several ways of handling this. If you cannot resolve it, please " +"submit a bug report (after searching to make sure it's not a known issue and " +"verifying you didn't do something stupid) with the contents of /var/log/" +"install.log and /tmp/installprofile.xml and the version of the installer you " +"used." +msgstr "" +"Es ist ein sehr schwerer Fehler während der Installation aufgetreten. Der Fehler war: %s \n" +"Es gibt nun mehrere Möglichkeiten. Wenn Sie den Fehler nicht selbst beheben können, so " +"eröffnen Sie bitte einen Bugreport (Sehen Sie aber vorher nach ob für dieses Problem nicht " +"schon ein Eintrag im Bugtracker existiert und versichern Sie sich, dass der Fehler nicht Ihre " +"Schuld war) mit dem Inhalt von /var/log/install.log und /tmp/installprofile.xml, " +"sowie mit der Version des verwendeten Installers." + +#: gli-dialog.py:2002 +msgid "Installation Started!" +msgstr "Installation gestartet!" + +#: gli-dialog.py:2002 gli-dialog.py:2005 +msgid "Installation progress" +msgstr "Fortschritt der Installation" + +#: gli-dialog.py:2005 +msgid "Continuing Installation" +msgstr "Installationsfortschritt" + +#: gli-dialog.py:2025 +#, python-format +msgid "" +"On step %(A)d of %(B)d. Current step: %(C)s\n" +"%(D)s" +msgstr "" +"Schritt %(A)d von %(B)d. Aktueller Schritt: %(C)s\n" +"%(D)s" + +#: gli-dialog.py:2036 +#, python-format +msgid "On step %(A)d of %(B)d. Current step: %(C)s" +msgstr "Schritt %(A)d von %(B)d. Aktueller Schritt: %(C)s" diff --git a/src/fe/dialog/languages/fi/GLIInstallProfile.po b/src/fe/dialog/languages/fi/GLIInstallProfile.po new file mode 100644 index 0000000..2aa3031 --- /dev/null +++ b/src/fe/dialog/languages/fi/GLIInstallProfile.po @@ -0,0 +1,314 @@ +# Gentoo Linux Installer. +# Copyright (C) 2007 +# This file is distributed under the same license as the Gentoo Linux Installer. +# Preston Cody <codeman@gentoo.org>, 2007. +# Translated to Finnish by Flammie <flammie@gentoo.org>, 2007 +msgid "" +msgstr "" +"Project-Id-Version: InstallProfile 2007.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-09-02 11:58-0400\n" +"PO-Revision-Date: 2007-03-05 21:14+0200\n" +"Last-Translator: Flammie Pirinen <flammie@gentoo.org>\n" +"Language-Team: Finnish <laatu@lokalisointi.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: GLIInstallProfile.py:586 +msgid "Popular Desktop Applications" +msgstr "Suositut työpöytäsovellukset" + +#: GLIInstallProfile.py:587 +msgid "GTK+ music player" +msgstr "GTK+-musiikkisoitin" + +#: GLIInstallProfile.py:588 +msgid "A GTK+ tagging program for MP3, OGG, FLAC, and more" +msgstr "GTK+-täggäysohjelma MP3:ille, OGGeille, FLACeille ja muille" + +#: GLIInstallProfile.py:589 +msgid "A GNOME groupware application, a Microsoft Outlook workalike" +msgstr "Gnomen ryhmätyöohjelma, Microsoft Outlookin kaltainen" + +#: GLIInstallProfile.py:590 +msgid "GTK+ Instant Messenger client" +msgstr "GTK+-pikaviestin" + +#: GLIInstallProfile.py:591 +msgid "GTK+ FTP Client" +msgstr "GTK+FTP-asiakas" + +#: GLIInstallProfile.py:592 +msgid "GNU Image Manipulation Program" +msgstr "GNU-kuvankäsittelyohjelma GIMP" + +#: GLIInstallProfile.py:593 +msgid "GNOME CD Writing Software" +msgstr "Gnomen CD-poltto-ohjelma" + +#: GLIInstallProfile.py:594 +msgid "GTK+ application for transferring pictures from a digital camera" +msgstr "GTK+-sovellus digikameran kuvien siirtoon" + +#: GLIInstallProfile.py:595 +msgid "A SVG based generic vector-drawing program" +msgstr "SVG-pohjainen vektoripiirrosohjelma" + +#: GLIInstallProfile.py:596 +msgid "KDE CD Writing Software" +msgstr "KDE:n CD-poltto-ohjelma" + +#: GLIInstallProfile.py:597 +msgid "An integrated office suite for KDE, the K Desktop Environment" +msgstr "KDE:n toimisto-ohjelmisto" + +#: GLIInstallProfile.py:598 +msgid "The Mozilla Suite" +msgstr "Mozilla-ohjelmisto" + +#: GLIInstallProfile.py:599 +msgid "The Mozilla Firefox Web Browser" +msgstr "Mozillan Tulikettu-veppiselain" + +#: GLIInstallProfile.py:600 +msgid "Thunderbird Mail Client" +msgstr "Thunderbird-sähköpostiohjelma" + +#: GLIInstallProfile.py:601 +msgid "Media Player for Linux" +msgstr "Mediasoitin Linuxille" + +#: GLIInstallProfile.py:602 +msgid "OpenOffice.org, a full office productivity suite." +msgstr "OpenOffice.org-toimisto-ohjelmisto" + +#: GLIInstallProfile.py:603 +msgid "Same as OpenOffice but a binary package (no compiling!)" +msgstr "OpenOffice binäärinä (kääntelemättä!)" + +#: GLIInstallProfile.py:604 +msgid "GTK news reader" +msgstr "GTK-nyyssilukija" + +#: GLIInstallProfile.py:605 +msgid "Music management and playback software for GNOME" +msgstr "Musiikinhallinta ja -soitto-ohjelma Gnomelle" + +#: GLIInstallProfile.py:606 +msgid "Open replacement for the Mozilla Suite" +msgstr "Vapaa korvike Mozilla-ohjelmistolle" + +#: GLIInstallProfile.py:607 GLIInstallProfile.py:608 +msgid "A light weight email client and news reader" +msgstr "Kevyt sähköpostin ja nyyssien lukuohjelma" + +#: GLIInstallProfile.py:609 +msgid "VLC media player - Video player and streamer" +msgstr "VLC-mediasoitin, videontoisto ja -striimausohjelma" + +#: GLIInstallProfile.py:610 +msgid "GTK+ Graphical IRC Client" +msgstr "GTK+-irkkiasiakas" + +#: GLIInstallProfile.py:611 +msgid "Xine movie player" +msgstr "Xine-videontoisto" + +#: GLIInstallProfile.py:612 +msgid "X MultiMedia System" +msgstr "Xmms-multimediajärjestelmä" + +#: GLIInstallProfile.py:613 +msgid "Applications often found on servers." +msgstr "Palvelimelle tyypilliset ohjelmat." + +#: GLIInstallProfile.py:614 +msgid "Apache Web Server" +msgstr "Apache-veppipalvelin" + +#: GLIInstallProfile.py:615 +msgid "The Common Unix Printing System" +msgstr "CUPS-tulostinjärjestelmä" + +#: GLIInstallProfile.py:616 +msgid "A highly configurable, drop-in replacement for sendmail" +msgstr "Mukautettava sendmailin korvike" + +#: GLIInstallProfile.py:617 +msgid "Linux kernel (2.4+) firewall, NAT and packet mangling tools" +msgstr "Linuxin ytimen 2.4 tai uudemman palomuuri-, NAT- ja paketinohjaus-työ" +"kalut" + +#: GLIInstallProfile.py:618 +msgid "Apache module for PHP" +msgstr "PHP Apache-moduulina" + +#: GLIInstallProfile.py:619 +msgid "A fast, multi-threaded, multi-user SQL database server" +msgstr "Nopea monisäikeistetty usean käyttäjän SQL-tietokantapalvelin" + +#: GLIInstallProfile.py:620 +msgid "The PHP scripting language" +msgstr "PHP-skriptauskieli" + +#: GLIInstallProfile.py:621 +msgid "A fast and secure drop-in replacement for sendmail" +msgstr "Nopea ja turvallinen sendmailin korvike" + +#: GLIInstallProfile.py:622 +msgid "sophisticated Object-Relational DBMS" +msgstr "hienostunut oliorelaatiotietokannanhallintajärjestelmä" + +#: GLIInstallProfile.py:623 +msgid "ProFTP Server" +msgstr "ProFTP-palvelin" + +#: GLIInstallProfile.py:624 +msgid "SAMBA client/server programs for UNIX" +msgstr "SAMBA-ohjelmisto UNIXille" + +#: GLIInstallProfile.py:625 +msgid "Widely-used Mail Transport Agent (MTA)" +msgstr "Yleinen sähköpostinsiirto-ohjelma (MTA)" + +#: GLIInstallProfile.py:626 +msgid "Window managers and X selection." +msgstr "Ikkunointimanagerin ja X:n valinta." + +#: GLIInstallProfile.py:627 +msgid "The Gnome Desktop Environment" +msgstr "Gnome-työpöytä" + +#: GLIInstallProfile.py:628 +msgid "The K Desktop Environment" +msgstr "K-työpöytä" + +#: GLIInstallProfile.py:629 +msgid "A small, fast, full-featured window manager for X" +msgstr "Pieni, nopea ja tehokas ikkunointihallinta X:lle" + +#: GLIInstallProfile.py:630 +msgid "Enlightenment Window Manager" +msgstr "Enlightenment-ikkunointi" + +#: GLIInstallProfile.py:631 +msgid "Fluxbox is an X11 window manager featuring tabs and an iconbar" +msgstr "Fluxbox on X11-ikkunointi tabeilla ja kuvakepalkilla" + +#: GLIInstallProfile.py:632 +msgid "IceWM is designed for speed, size, and simplicity" +msgstr "IceWM on nopea, pieni ja yksinkertainen" + +#: GLIInstallProfile.py:633 +msgid "Windowmaker is a window manager featuring the look and feel of NEXTSTEP" +msgstr "Windowmaker on NEXTSTEPin kaltainen ikkunointi" + +#: GLIInstallProfile.py:634 +msgid "XFCE Desktop Environment" +msgstr "XFCE-työpöytä" + +#: GLIInstallProfile.py:635 +msgid "An X11 implementation maintained by the X.Org Foundation" +msgstr "X.Org-säätiön X11-toteutus" + +#: GLIInstallProfile.py:636 +msgid "Miscellaneous Applications you may want." +msgstr "Muut sovellukset." + +#: GLIInstallProfile.py:637 +msgid "tool for distributing files via a distributed network of nodes" +msgstr "työkalu tiedostojen jakoon hajautetussa verkossa" + +#: GLIInstallProfile.py:638 +msgid "GTK+ Web IDE" +msgstr "GTK+-verkkoympäristö" + +#: GLIInstallProfile.py:639 +msgid "An incredibly powerful, extensible text editor" +msgstr "Tehokas laajennettava tekstimuokkain" + +#: GLIInstallProfile.py:640 +msgid "Single process stack of various system monitors" +msgstr "Järjestelmämonitorien prosessipino" + +#: GLIInstallProfile.py:641 +msgid "GUI version of the Vim text editor" +msgstr "Graafinen versio Vimistä" + +#: GLIInstallProfile.py:642 +msgid "ssh-agent manager" +msgstr "ssh-agent" + +#: GLIInstallProfile.py:643 +msgid "Rotates, compresses, and mails system logs" +msgstr "Järjestelmälokien kierrätys, pakkaus ja postitus" + +#: GLIInstallProfile.py:644 +msgid "Network Time Protocol suite/programs" +msgstr "NTP-ajanhallintaohjelmisto" + +#: GLIInstallProfile.py:645 +msgid "A Remote Desktop Protocol Client" +msgstr "Etätyöpöytäyhteyskäytäntöasiakas" + +#: GLIInstallProfile.py:646 +msgid "Secure way to index and quickly search for files on your system" +msgstr "Turvallinen tapa indeksoida ja hakea järjestelmän tiedostoja" + +#: GLIInstallProfile.py:647 +msgid "Utility to trace the route of IP packets" +msgstr "IP-pakettien jäljityssovellus" + +#: GLIInstallProfile.py:648 +msgid "Gentoo Linux USE flags editor" +msgstr "Gentoon Linuxin USE-asetusmuokkain" + +#: GLIInstallProfile.py:649 +msgid "Vim, an improved vi-style text editor" +msgstr "Vim, vi-tyylinen muokkain" + +#: GLIInstallProfile.py:650 +msgid "A commercial-quality network protocol analyzer" +msgstr "Kaupallislaatuinen verkkoliikenteen seuranta" + +#: GLIInstallProfile.py:651 +msgid "Applications recommended by the GLI Team." +msgstr "GLI:n suositellut ohjelmat" + +#: GLIInstallProfile.py:652 +msgid "A versatile IDE for GNOME" +msgstr "Gnomen tehokas sovelluskehitysympäristö" + +#: GLIInstallProfile.py:653 +msgid "a tool to locally check for signs of a rootkit" +msgstr "rootkittien etsintäsovellus" + +#: GLIInstallProfile.py:654 +msgid "Addictive OpenGL-based block game" +msgstr "OpenGL-pohjainen palikkapeli" + +#: GLIInstallProfile.py:655 +msgid "The GNU Privacy Guard, a GPL PGP replacement" +msgstr "GNUn yksityisyysjärjestelmä GPG, GPL-lisensoitu PGP-korvike" + +#: GLIInstallProfile.py:656 +msgid "Software for generating and retrieving SNMP data" +msgstr "SNMP-datan luonti- ja hakusovellus" + +#: GLIInstallProfile.py:657 +msgid "the network swiss army knife" +msgstr "Sveitsin armeijan veitsi verkoille" + +#: GLIInstallProfile.py:658 +msgid "A utility for network exploration or security auditing" +msgstr "Verkkojen hallinta- ja tietoturvavarmistussovellus" + +#: GLIInstallProfile.py:659 +msgid "full-screen window manager that multiplexes between several processes" +msgstr "Kokoruudun ikkunointi" + +#: GLIInstallProfile.py:660 +msgid "An X Viewer for PDF Files" +msgstr "X-pohjainen PDF-katselin" + diff --git a/src/fe/dialog/languages/fi/LC_MESSAGES/GLIInstallProfile.mo b/src/fe/dialog/languages/fi/LC_MESSAGES/GLIInstallProfile.mo Binary files differnew file mode 100644 index 0000000..d552783 --- /dev/null +++ b/src/fe/dialog/languages/fi/LC_MESSAGES/GLIInstallProfile.mo diff --git a/src/fe/dialog/languages/fi/LC_MESSAGES/gli-dialog.mo b/src/fe/dialog/languages/fi/LC_MESSAGES/gli-dialog.mo Binary files differnew file mode 100644 index 0000000..d42ed28 --- /dev/null +++ b/src/fe/dialog/languages/fi/LC_MESSAGES/gli-dialog.mo diff --git a/src/fe/dialog/languages/fi/gli-dialog.po b/src/fe/dialog/languages/fi/gli-dialog.po new file mode 100644 index 0000000..bf6d772 --- /dev/null +++ b/src/fe/dialog/languages/fi/gli-dialog.po @@ -0,0 +1,1979 @@ +# Gentoo Linux Installer. +# Copyright (C) 2007 +# This file is distributed under the same license as the Gentoo Linux Installer. +# Preston Cody <codeman@gentoo.org>, 2007. +# Translated to Finnish by Flammie <flammie@gentoo.org>, 2007 +# +msgid "" +msgstr "" +"Project-Id-Version: gli-dialog 2007.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-02-20 21:19-0500\n" +"PO-Revision-Date: 2007-03-06 20:55+0200\n" +"Last-Translator: Flammie Pirinen <flammie@gentoo.org>\n" +"Language-Team: Finnish <laatu@lokalisointi.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gli-dialog.py:62 +msgid "" +"Welcome to the Gentoo Linux Installer! This program will help install " +"Gentoo on your computer.\n" +"Before proceeding please thoroughly read the Gentoo Installation Handbook " +"available at \n" +"http://www.gentoo.org/doc/en/handbook/index.xml \n" +"\n" +"Press OK to continue" +msgstr "" +"Tämä on Gentoo Linuxin asennusohjelma, joka auttaa asentamaan Gentoon " +"tietokoneellesi.\n" +"Ennen jatkamista kannattaa lukea Gentoon asennuskäsikirja osoitteesta\n" +"http://www.gentoo.org/doc/fi/handbook/index.xml \n" +"\n" +"Paina OK:ta jatkaaksesi" + +#: gli-dialog.py:66 +msgid "Welcome" +msgstr "Tervetuloa" + +#: gli-dialog.py:70 +msgid "Standard" +msgstr "Standardi" + +#: gli-dialog.py:71 +msgid "Advanced" +msgstr "Tehokäyttäjä" + +#: gli-dialog.py:72 +msgid "" +"This installer has two modes, an advanced mode for those knowledgable with " +"the inner details of their computer and a standard mode where many of the " +"defaults will be chosen for the user for simplicity and to speed up the " +"install process. The advanced mode offers full customizability and is " +"required for generating profiles to be used other computers. \n" +"The advanced mode is recommended by the developers.\n" +"\t\t" +msgstr "" +"Asentimessa on kaksi tilaa. Tehokäyttäjätila on niille, jotka tuntevat " +"tietokoneensa. Standarditilassa monet oletusasetuksista valitaan ennalta " +"asennuksen yksinkertaistamiseksi ja nopeuttamiseksi. Tehokäyttäjän tilassa " +"on paljon mukautettavaa ja sitä pitää käyttää jos tehdään profiileja " +"toisille koneille käytettäviksi. \n" +"Tehokäyttäjän tila on suositeltava.\n" +"\t\t" + +#: gli-dialog.py:80 +msgid "" +"Do you want to do a networkless installation? This will limit the " +"customizability of your install due to the limitations of the LiveCD. For " +"example, choosing networkless will set your installation stage, portage " +"snapshot, and limit your extra packages selections. NOTE: It is easily " +"possible to do a networkless installation on a machine with an active " +"Internet connection; in fact this may result in the fastest installations " +"for many users." +msgstr "" +"Asennetaanko verkkoyhteyttä käyttämättä? Tässä tapauksessa mukautusten " +"määrää on rajoitettava LiveCD:n rajoitusten mukaan. Esimerkiksi " +"verkottomassa " +"asennuksessa on mahdollista käyttää vain yhtä stagea, Portagen otosta ja " +"vain rajattua määrää paketteja. Huomaa: Verkoton asennus on mahdollinen myös " +"verkossa olevalla koneella, ja saattaa olla nopein asennustapa monissa " +"tapauksissa." + +#: gli-dialog.py:82 +msgid "Networkless" +msgstr "Verkoton" + +#: gli-dialog.py:83 +msgid "Internet enabled" +msgstr "Internet-yhteys käytössä" + +#: gli-dialog.py:97 +msgid "ERROR: Could not set networkless information in the profile" +msgstr "VIRHE: Ei voitu asentaa verkottomia tietoja profiiliin" + +#: gli-dialog.py:103 gli-dialog.py:141 gli-dialog.py:204 gli-dialog.py:567 +#: gli-dialog.py:946 gli-dialog.py:1063 gli-dialog.py:1121 gli-dialog.py:1274 +#: gli-dialog.py:1506 gli-dialog.py:1622 gli-dialog.py:1825 gli-dialog.py:1833 +#: gli-dialog.py:1968 +msgid "Yes" +msgstr "Kyllä" + +#: gli-dialog.py:104 gli-dialog.py:142 gli-dialog.py:205 gli-dialog.py:568 +#: gli-dialog.py:947 gli-dialog.py:1064 gli-dialog.py:1122 gli-dialog.py:1275 +#: gli-dialog.py:1507 gli-dialog.py:1623 gli-dialog.py:1826 gli-dialog.py:1834 +#: gli-dialog.py:1969 +msgid "No" +msgstr "Ei" + +#: gli-dialog.py:107 +msgid "" +"\n" +"\tAll of the installation settings are stored in an XML file, which we call " +"the InstallProfile. If you have a previously-created profile, you can load " +"it now\n" +"\tfor use in this installation.\n" +"\tDo you have a previously generated profile for the installer?\n" +"\t" +msgstr "" +"\n" +"\tAsennuksen asetukset tallennetaan XML-tiedostoon nimeltä InstallProfile. " +"Jos saatavilla on aiemmin tallennettu profiili, sen voi ladata nyt\n" +"\ttätä asennusta varten.\n" +"\tOnko aiemmin tehty InstallProfile saatavilla?\n" +"\t" + +#: gli-dialog.py:113 +msgid "Enter the filename of the XML file" +msgstr "XML-tiedoston tiedostonimi" + +#: gli-dialog.py:118 +#, python-format +msgid "Cannot open file %s" +msgstr "Tiedostoa %s ei voi avata" + +#: gli-dialog.py:143 +msgid "" +"Do you want debugging output enabled during the install? This is mainly " +"meant to help the developers debug any bugs." +msgstr "" +"Tulostetaanko vianetsintätietoja asennuksen aikana? Tämä on tarkoitettu " +"lähinnä kehittäjille vian etsintään." + +#: gli-dialog.py:158 gli-dialog.py:162 gli-dialog.py:365 gli-dialog.py:369 +#: gli-dialog.py:398 gli-dialog.py:402 gli-dialog.py:514 gli-dialog.py:519 +#: gli-dialog.py:837 gli-dialog.py:844 gli-dialog.py:848 gli-dialog.py:919 +#: gli-dialog.py:924 gli-dialog.py:1011 gli-dialog.py:1016 gli-dialog.py:1043 +#: gli-dialog.py:1047 gli-dialog.py:1215 gli-dialog.py:1218 gli-dialog.py:1565 +#: gli-dialog.py:1573 gli-dialog.py:1787 gli-dialog.py:1797 +msgid "Other" +msgstr "Muu" + +#: gli-dialog.py:158 gli-dialog.py:1215 +msgid "Type your own." +msgstr "Kirjoita omasi." + +#: gli-dialog.py:159 +msgid "" +"In order to complete most installs, an active Internet connection is " +"required. Listed are the network devices already detected. In this step " +"you will need to setup one network connection for GLI to use to connect to " +"the Internet. If your desired device does not show up in the list, you can " +"select Other and input the device name manually." +msgstr "" +"Asennuksen viimeistelemiseen vaaditaan yleensä toimiva Internet-yhteys. " +"Luettelossa on tunnistetut verkkolaitteet. Tässä vaiheessa pitää " +"asettaa verkkoasetukset, joita GLI käyttää Internet-yhteydelle. Jos haluttu " +"laite ei näy luettelossa, valitse Muu ja kirjoita laitenimi." + +#: gli-dialog.py:163 +msgid "" +"Enter the interface (NIC) you would like to use for installation (e.g. eth0):" +msgstr "" +"Kirjoita rajapinnan (NICin) nimi, jota asennuksessa käytetään " +"(kuten eth0):" + +#: gli-dialog.py:170 gli-dialog.py:1228 gli-dialog.py:1253 +msgid "DHCP" +msgstr "DHCP" + +#: gli-dialog.py:171 gli-dialog.py:1229 gli-dialog.py:1254 +msgid "Static IP/Manual" +msgstr "Staattinen IP tai käsisäätö" + +#: gli-dialog.py:172 gli-dialog.py:1193 +msgid "" +"To setup your network interface, you can either use DHCP if enabled, or " +"manually enter your network information.\n" +" DHCP (Dynamic Host Configuration Protocol) makes it possible to " +"automatically receive networking information (IP address, netmask, broadcast " +"address, gateway, nameservers etc.). This only works if you have a DHCP " +"server in your network (or if your provider provides a DHCP service). If " +"you do not, you must enter the information manually. Please select your " +"networking configuration method:" +msgstr "" +"Verkkorajapinnan asetuksiin voi käyttää DHCP:tä tai antaa verkon " +"tiedot käsin.\n" +" DHCP (Dynamic Host Configuration Protocol) hakee automaattisesti " +"sellaiset tiedot kuin IP:n, verkon peitteen, broadcast-osoitteen, gatewayn " +"osoitteen, nimipalvelimet jne. Tämä vaatii toimiakseen DHCP-palvelimen " +"paikallisessa verkossa (tai ISP:n, jolla on DHCP-palvelu). Jos " +"sellaista ei ole, pitää tiedot syöttää käsin. Valitse verkon asetustapa:" + +#: gli-dialog.py:176 gli-dialog.py:1233 gli-dialog.py:1258 +msgid "" +"If you have any additional DHCP options to pass, type them here in a space-" +"separated list. If you have none, just press Enter." +msgstr "" +"Jos käytät erikoisia DHCP-asetuksia, lisää ne tähän välilyönnein eroteltuna. " +"Muussa tapauksessa paina enteriä." + +#: gli-dialog.py:179 +msgid "" +"Enter your networking information: (See Chapter 3 of the Handbook for more " +"information) Your broadcast address is probably your IP address with 255 as " +"the last tuple. DO NOT PRESS ENTER until all fields you intend to fill out " +"are complete!" +msgstr "" +"Anna verkon tiedot (lisätietoja käsikirjan kolmannesta kappaleesta): " +"Broadcast-osoite on tyypillisesti oma IP, jonka viimeinen luku on korvattu " +"255:llä. Älä paina enteriä ennen kuin kaikki tarpeellinen on asetettu." + +#: gli-dialog.py:180 gli-dialog.py:1238 gli-dialog.py:1263 +msgid "Enter your IP address:" +msgstr "Anna IP-osoite:" + +#: gli-dialog.py:181 gli-dialog.py:1239 gli-dialog.py:1264 +msgid "Enter your Broadcast address:" +msgstr "Anna broadcast-osoite:" + +#: gli-dialog.py:182 gli-dialog.py:1240 gli-dialog.py:1265 +msgid "Enter your Netmask:" +msgstr "Anna verkon peite:" + +#: gli-dialog.py:183 +msgid "Enter your default gateway:" +msgstr "Anna gateway-osoite:" + +#: gli-dialog.py:184 +msgid "Enter a DNS server:" +msgstr "Anna DNS-palvelime:" + +#: gli-dialog.py:185 gli-dialog.py:1326 +msgid "Enter a HTTP Proxy IP:" +msgstr "Anna HTTP-välipalvelimen IP-osoite:" + +#: gli-dialog.py:186 gli-dialog.py:1327 +msgid "Enter a FTP Proxy IP:" +msgstr "Anna FTP-välipalvelimen IP-osoite:" + +#: gli-dialog.py:187 gli-dialog.py:1328 +msgid "Enter a RSYNC Proxy:" +msgstr "Anna RSYNC-välipalvelin:" + +#: gli-dialog.py:197 +msgid "" +"Sorry, but the network could not be set up successfully. Please configure " +"yourself manually and restart the installer." +msgstr "" +"Verkon asetukset eivät toimineet. Aseta verkko käsin ja käynnistä asennin " +"uudestaan." + +#: gli-dialog.py:199 +msgid "ERROR! Could not setup networking!" +msgstr "Virhe. Verkkoa ei saatu toimimaan." + +#: gli-dialog.py:207 +msgid "" +"Do you want SSH enabled during the install? This will allow you to login " +"remotely during the installation process. If choosing Yes, be sure you " +"select a new LiveCD root password!" +msgstr "" +"Otetaanko SSH:n käyttöön asennuksen ajaksi? Tämä mahdollistaa " +"etäkirjautumiset asennuksen aikaan. Jos valitset kyllä, muista muuttaa " +"LiveCD:n rootin salasana." + +#: gli-dialog.py:211 +msgid "ERROR! : Could not start the SSH daemon!" +msgstr "Virhe. : SSH-palvelu ei käynnistynyt." + +#: gli-dialog.py:219 +msgid "" +"If you want to be able to login to your machine from another console during " +"the installation,\n" +"\tyou will want to enter a new root password for the LIVECD.\n" +"\tNote that this can be different from your new system's root password.\n" +"\tPresss Enter twice to skip this step.\n" +"\tEnter the new LIVECD root password (will not be echoed):\t" +msgstr "" +"Jos haluat kirjautua koneeseen toiselta konsolilta asennuksen " +"aikana,\n" +"\tpitää asettaa uusi salasana LiveCD:n rootille.\n" +"\tTämä voi olla eri salasana kuin asennettavan järjestelmän rootin " +"salasana.\n" +"\tPaina enteriä kahdesti, jos haluat ohittaa tämän vaiheen.\n" +"\tAnna LiveCD:n rootin uusi salasana (kirjoitamaasi ei näytetä):\t" + +#: gli-dialog.py:227 +msgid "Enter the new LIVECD root password again to verify:" +msgstr "Anna LiveCD:n rootin uusi salasana uudestaan:" + +#: gli-dialog.py:231 +msgid "The passwords do not match. Please try again." +msgstr "Salasanat eivät täsmää. Yritä uudestaan." + +#: gli-dialog.py:239 +msgid "ERROR! Could not hash the root password on the LiveCD!" +msgstr "Virhe. Ei voitu tiivistää LiveCD:n rootin salasanaa." + +#: gli-dialog.py:248 +msgid "ERROR! Could not set the root password on the livecd environment!" +msgstr "Virhe. Ei voitu asettaa rootin salasanaa livecd-ympäristössä" + +#: gli-dialog.py:255 +msgid "" +"Here is a list of modules currently loaded on your machine.\n" +" Please look through and see if any modules are missing\n" +" that you would like loaded.\n" +"\n" +msgstr "" +"Seuraavat moduulit on ladattu.\n" +" Tarkista ettei mitään oleellista puutu.\n\n\n" + +#: gli-dialog.py:256 +msgid "Continue" +msgstr "Jatka" + +#: gli-dialog.py:257 +msgid "Loaded Modules" +msgstr "Ladatut moduulit" + +#: gli-dialog.py:258 +msgid "" +"If you have additional modules you would like loaded before the installation " +"begins (ex. a network driver), enter them in a space-separated list." +msgstr "" +"Jos käytössä on muita moduuleja, jotka pitää ladata ennen asennusta " +"(kuten verkkokortin ajuri), anna ne välilyönnein eroteltuna." + +#: gli-dialog.py:272 +#, python-format +msgid "ERROR! : Could not load module: %s " +msgstr "Virhe. : Moduulia ei voitu ladata: %s" + +#: gli-dialog.py:277 +msgid "" +"ERROR!: An unknown error occurred during modprobing the modules. Please " +"load them manually and then restart the installer." +msgstr "" +"Virhe.: Tunnistamaton virhe modproben ajamisessa moduuleille. Lataa ne " +"käsin ja käynnistä asennin uudelleen." + +#: gli-dialog.py:304 gli-dialog.py:312 gli-dialog.py:1200 gli-dialog.py:1208 +msgid "Add" +msgstr "Lisää" + +#: gli-dialog.py:304 +msgid "Define a new mountpoint" +msgstr "Määritä liitoskohta" + +#: gli-dialog.py:305 +msgid "" +"Please define the mountpoints of your partitions for the new system. At " +"minimum, a / mountpoint must be defined. Defining /boot and /home " +"mountpoints is recommended." +msgstr "" +"Määritä osioiden liitoskohdat uudessa järjestelmässä. Vähintään / pitää " +"määritellä. /bootin ja /homen määritteleminen on suositeltavaa." + +#: gli-dialog.py:305 gli-dialog.py:557 gli-dialog.py:1201 gli-dialog.py:1459 +#: gli-dialog.py:1610 gli-dialog.py:1725 +msgid "Save and Continue" +msgstr "Tallenna ja jatka" + +#: gli-dialog.py:310 +msgid "ERROR: Could net set mounts!" +msgstr "Virhe: Liitosten asetus ei onnistu." + +#: gli-dialog.py:328 gli-dialog.py:467 gli-dialog.py:530 +msgid "Logical (" +msgstr "Looginen (" + +#: gli-dialog.py:330 gli-dialog.py:469 gli-dialog.py:532 +msgid "Primary (" +msgstr "Ensiö (" + +#: gli-dialog.py:346 +msgid "Select a Partition to define a mountpoint for" +msgstr "Valitse osio, jonka liitoskohta määritellään" + +#: gli-dialog.py:366 +#, python-format +msgid "" +"Choose a mountpoint from the list or choose Other to type your own for " +"partition %s. " +msgstr "" +"Valitse liitoskohta tai muu syöttääksesi oman osiolle %s." + +#: gli-dialog.py:370 gli-dialog.py:403 +#, python-format +msgid "Enter a mountpoint for partition %s" +msgstr "Anna liitoskohta osiolle %s" + +#: gli-dialog.py:375 gli-dialog.py:415 +#, python-format +msgid "Enter mount options for mountpoint %s. Leave blank for defaults" +msgstr "Anna liitosasetukset liitoskohtaan %s. Jätä tyhjäksi oletuksia varten" + +#: gli-dialog.py:389 gli-dialog.py:397 +msgid "Change Mountpoint" +msgstr "Muuta liitoskohtaa" + +#: gli-dialog.py:390 gli-dialog.py:406 +msgid "Change Filesystem Type" +msgstr "Muuta tiedostojärjestelmätyyppiä" + +#: gli-dialog.py:391 gli-dialog.py:414 +msgid "Change Mountoptions" +msgstr "Muuta liitosasetuksia" + +#: gli-dialog.py:392 gli-dialog.py:419 +msgid "Delete This Mountpoint" +msgstr "Poista liitoskohta" + +#: gli-dialog.py:393 +#, python-format +msgid "" +"Select an option for device %(dev)s : Mountpoint: %(mt)s, Type: %(type)s, " +"Options: %(opt)s" +msgstr "Valitse asetukset laitteelle %(dev)s : Liitoskohta: %(mt)s, tyyppi: " +"%(type)s, asetukset: %(opt)s" + +#: gli-dialog.py:399 +#, python-format +msgid "" +"Choose a mountpoint from the list or choose Other to type your own for " +"partition %(part)s. Current mountpoint is: %(mt)s" +msgstr "" +"Valitse liitoskohta luettelosta tai muu syöttääksesi oman osiolle %(part)s. " +"Nykyinen liitoskohta on: %(mt)s" + +#: gli-dialog.py:409 +#, python-format +msgid "Select the filesystem for partition %(part)s. It is currently %(fs)s." +msgstr "Valitse tiedostojärjestelmä osiolle %(part)s. Nykyinen on %(fs)s." + +#: gli-dialog.py:423 +msgid "" +"The first thing on the new system to setup is the partitoning.\n" +"\tYou will first select a drive and then edit its partitions.\n" +"\tWARNING: CHANGES ARE MADE IMMEDIATELY TO DISK. BE CAREFUL\n" +"\tNOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION \"/\"\n" +"\tIf your drive is pre-partitioned, just select the mountpoints and make \n" +"\tsure that the format option is set to FALSE or it will erase your data.\n" +"\tThe installer does not yet support resizing of partitions (its not safe).\n" +"\tWhen in doubt, **Partition it yourself and then re-run the installer**\n" +"\tPlease refer to the Gentoo Installation Handbook for more information\n" +"\ton partitioning and the various filesystem types available in Linux." +msgstr "" +"Ensimmäinen asia tehtävänä uudelle järjestelmälle on osiointi\n" +"\tValitse asema, jonka osioita muokataan.\n" +"\tVaroitus: Muutokset, jotka tehdään, kirjoitetaan suoraan levylle!\n" +"\tHuomaa: Ainakin juuriosio / pitää valita\n" +"\tJos asema on osioitu, valitse vain liitoskohdat ja varmista, että format-\n" +"\tvalinta on pois päältä, jottei tietoja poisteta. Asennin ei vielä tue\n" +"\tosioiden koon muuttamista, sillä se ei ole turvallista. Jos et ole varma\n" +"\tmitä tehdä, osioi levysi itse valmiiksi ja käynnistä asennin uudestaan.\n" +"\tlisätietoja osioinneista ja tiedostojärjestelmistä löytyy käsikirjasta." + +#: gli-dialog.py:446 +msgid "" +"Which drive would you like to partition?\n" +" Info provided: Type, Size in MB" +msgstr "" +"Mikä asema osioidaan?\n" +" Tiedot: Tyyppi, koko megatavuina" + +#: gli-dialog.py:446 gli-dialog.py:845 gli-dialog.py:880 gli-dialog.py:1012 +msgid "Done" +msgstr "Valmis" + +#: gli-dialog.py:456 +msgid " - Unallocated space (" +msgstr " — Osioimaton tila (" + +#: gli-dialog.py:458 +msgid "logical, " +msgstr "looginen, " + +#: gli-dialog.py:462 +msgid " - Extended Partition (" +msgstr " — Jatkettu osio (" + +#: gli-dialog.py:474 gli-dialog.py:480 +msgid "Set Recommended Layout" +msgstr "Aseta suositusten mukaan" + +#: gli-dialog.py:475 gli-dialog.py:485 +msgid "Clear Partitions On This Drive." +msgstr "Tyhjennä tämän levyn osiointi." + +#: gli-dialog.py:476 +msgid "" +"Select a partition or unallocated space to edit\n" +"Key: Minor, Pri/Ext, Filesystem, Size." +msgstr "" +"Valitse osio tai vapaa tila muokattavaksi\n" +"Tiedot: Minor, Ensiö/Jatkettu, Tiedostojärjestelmä, Koko." + +#: gli-dialog.py:476 gli-dialog.py:536 gli-dialog.py:584 gli-dialog.py:625 +#: gli-dialog.py:1761 +msgid "Back" +msgstr "Takaisin" + +#: gli-dialog.py:481 +msgid "" +"This will ERASE YOUR DRIVE and apply a recommended layout. Are you sure you " +"wish to do this?" +msgstr "" +"Tämä tyhjentää aseman ja toteuttaa suositusosioinnin. Jatketaanko?" + +#: gli-dialog.py:482 +msgid "" +"This is your last chance. Are you SURE you want to CLEAR this drive and set " +"a recommended layout? THERE IS NO TURNING BACK IF YOU SELECT YES." +msgstr "" +"Tyhjennetäänkö asema ja asennetaan suositusosiointi? " +"Muutokset ovat lopullisia." + +#: gli-dialog.py:486 +msgid "" +"This will remove all partitions on your drive. Are you sure you wish to do " +"this?" +msgstr "" +"Tämä toiminto poistaa kaikki osiot asemalta. Jatketaanko?" + +#: gli-dialog.py:487 +msgid "" +"This is your last chance. Are you SURE you want to CLEAR this drive? THIS " +"WILL DELETE ANY DATA ON THE DRIVE!" +msgstr "" +"Tyhjennetäänkö asema? Muutokset ovat lopullisia." + +#: gli-dialog.py:499 +#, python-format +msgid "" +"Enter the size of the new partition in MB (max %s MB). If creating an " +"extended partition input its entire size (not just the first logical size):" +msgstr "" +"Anna osion koko megatavuissa (enintään %s Mt). Jos tämä on " +"jatkettu osio, anna sen kokonaiskoko (eikä vain ensimmäisen sisällytetyn " +"osion kokoa):" + +#: gli-dialog.py:502 +#, python-format +msgid "" +"The size you entered (%(entered)s MB) is larger than the maximum of %(max)s " +"MB" +msgstr "" +"Syötetty koko (%(entered)s Mt) on suurempi kuin enimmäismäärä %(max)s" + +#: gli-dialog.py:505 +msgid "Old, stable, but no journaling" +msgstr "Vanha, vakaa, ei levykirjanpitoa" + +#: gli-dialog.py:506 +msgid "ext2 with journaling and b-tree indexing (RECOMMENDED)" +msgstr "ext2 kirjanpidolla ja b-puu-indekseillä (suositeltu)" + +#: gli-dialog.py:507 +msgid "Swap partition for memory overhead" +msgstr "Swap-osio muistille" + +#: gli-dialog.py:508 +msgid "Windows filesystem format used in Win9X and XP" +msgstr "Windows-tiedostojärjestelmä 9X- ja XP-versioissa" + +#: gli-dialog.py:512 +msgid "B*-tree based filesystem. great performance. Only V3 supported." +msgstr "B*-puupohjainen tiedostojärjestelmä, tehokas. V3 ainoa tuettu versio." + +#: gli-dialog.py:513 +msgid "Create an extended partition containing other logical partitions" +msgstr "Luo jatkettu osio, joka sisältää loogisia osioita" + +#: gli-dialog.py:514 +msgid "Something else we probably don't support." +msgstr "Muuta, jota ei tueta." + +#: gli-dialog.py:515 +msgid "Choose the filesystem type for this new partition." +msgstr "Valitse tiedostojärjestelmä osiolle" + +#: gli-dialog.py:520 +msgid "Please enter the new partition's type:" +msgstr "Valitse osion tyyppi" + +#: gli-dialog.py:535 gli-dialog.py:539 gli-dialog.py:1249 gli-dialog.py:1760 +#: gli-dialog.py:1823 +msgid "Delete" +msgstr "Poista" + +#: gli-dialog.py:535 gli-dialog.py:545 +msgid "Extra mkfs.* Parameters" +msgstr "Muut mkfs.*-parametrit" + +#: gli-dialog.py:540 +msgid "Are you sure you want to delete the partition " +msgstr "Poistetaanko osio " + +#: gli-dialog.py:546 +msgid "" +"This feature is coming soon. Please go to console and do it yourself for " +"now." +msgstr "" +"Toiminto lisätään pian, nyt se pitää tehdä itse konsolilta." + +#: gli-dialog.py:555 gli-dialog.py:565 +msgid "Add a new network mount" +msgstr "Lisää uusi verkkoliitos" + +#: gli-dialog.py:557 +msgid "" +"If you have any network shares you would like to mount during the install " +"and for your new system, define them here. Select a network mount to edit or " +"add a new mount. Currently GLI only supports NFS mounts." +msgstr "" +"Jos käytössä on verkkojakoja, joiden pitää olla liitetty asennuksen aikana " +"ja " +"sen jälkeen, määrittele ne tässä. Valitse verkkoliitos muokattavaksi tai " +"lisää uusi. GLI tukee toistaiseksi vain NFS-liitoksia." + +#: gli-dialog.py:562 +msgid "ERROR: Could net set network mounts!" +msgstr "Virhe: Ei voitu asettaa verkkoliitoksia" + +#: gli-dialog.py:569 +msgid "Do you want to start portmap to be able to search for NFS mounts?" +msgstr "Käynnistetäänkö portmap, jolla voi etsiä NFS-liitoksia" + +#: gli-dialog.py:572 +msgid "ERROR: Could not start portmap!" +msgstr "Virhe: Portmapin käynnistys ei onnistu!" + +#: gli-dialog.py:574 +msgid "" +"Enter NFS mount or just enter the IP/hostname to search for available mounts" +msgstr "" +"Anna NFS-osio tai IP tahi konenimi, jolta haetaan saatavia liitoskohtia" + +#: gli-dialog.py:582 +msgid "No NFS exports were detected on " +msgstr "Ei NFS-vientejä löydetty koneelta " + +#: gli-dialog.py:584 +msgid "Select a NFS export" +msgstr "Valitse NFS-vienti" + +#: gli-dialog.py:589 +#, python-format +msgid "" +"The address you entered, %s, is not a valid IP or hostname. Please try " +"again." +msgstr "" +"Annettu osoite %s ei ole IP tai konenimi. Yritä uudestaan." + +# liian vaikeata käyttää python-formattia vissiin +#: gli-dialog.py:598 +msgid "There is already an entry for " +msgstr "On olemassa jo kohta " + +#: gli-dialog.py:610 +msgid "Enter a mountpoint" +msgstr "Anna liitosokohta" + +#: gli-dialog.py:613 +msgid "Enter mount options" +msgstr "Anna liitosasetukset" + +#: gli-dialog.py:623 +msgid "Stage3 is a basic system that has been built for you (no compiling)." +msgstr "Stage3:ssa on perusjärjestelmä valmiina, eikä sitä tarvitse kääntää." + +#: gli-dialog.py:624 +msgid "A Stage3 install but using binaries from the LiveCD when able." +msgstr "Stage3-asennus, jossa käytetään LiveCD:n binäärejä tarvittaessa." + +#: gli-dialog.py:625 +msgid "Which stage do you want to start at?" +msgstr "Mikä stage otetaan käyttöön?" + +#: gli-dialog.py:629 +msgid "" +"WARNING: Since you are doing a GRP install it is HIGHLY recommended you " +"choose Create from CD to avoid a potentially broken installation." +msgstr "" +"Varoitus: Koska GRP-asennus on käytössä, kannattaa valita CD:ltä luonti. " +"Se varmistaa, ettei asennus mene rikki." + +#: gli-dialog.py:633 gli-dialog.py:638 +msgid "ERROR! Could not set install stage!" +msgstr "Virhe. Ei voitu asentaa stagea." + +#: gli-dialog.py:642 +msgid "Create from CD" +msgstr "Luo CD:ltä" + +#: gli-dialog.py:643 +msgid "Specify URI" +msgstr "Anna URI" + +#: gli-dialog.py:644 +msgid "" +"Do you want to generate a stage3 on the fly using the files on the LiveCD " +"(fastest) or do you want to grab your stage tarball from the Internet?\n" +msgstr "" +"Luodaanko stage3 lennosta LiveCD:n tiedostoista (nopein vaihtoehto) vai " +"haetko stage-tarrapallon itse netistä?\n" + +#: gli-dialog.py:649 +msgid "ERROR: Could not set the stage tarball URI!" +msgstr "Virhe: Ei voitu asettaa stage-tarrapallon URIa." + +#: gli-dialog.py:664 +msgid "" +"Select a mirror to grab the tarball from or select Cancel to enter an URI " +"manually." +msgstr "" +"Valitse peili, jolta tarrapallo haetaan, tai peruuta syöttääksesi URIn " +"itse." + +#: gli-dialog.py:670 +msgid "Select your desired stage tarball:" +msgstr "Valitse stage-tarrapallo:" + +#: gli-dialog.py:681 +msgid "Specify the stage tarball URI or local file:" +msgstr "Anna tarrapallon URI tai paikallinen tiedostopolku:" + +#: gli-dialog.py:687 gli-dialog.py:720 gli-dialog.py:1076 +msgid "" +"The specified URI is invalid. It was not saved. Please go back and try " +"again." +msgstr "" +"Annettu URI on virheellinen. Sitä ei tallennettu. Palaa ja yritä uudelleen." + +#: gli-dialog.py:689 +msgid "No URI was specified!" +msgstr "URIa ei annettu." + +#: gli-dialog.py:699 +msgid "ERROR! Could not set the portage cd snapshot URI!" +msgstr "Virhe. Ei voitu asettaa Portagen otoksen URIa cd:ltä." + +#: gli-dialog.py:703 +msgid "Normal. Use emerge sync RECOMMENDED!" +msgstr "Normaali, käytä emerge --synciä, suositeltavaa." + +#: gli-dialog.py:704 +msgid "HTTP daily snapshot. Use when rsync is firewalled." +msgstr "Päivittäinen HTTP-otos, käytä, jos rsync ei toimi palomuurin takia" + +#: gli-dialog.py:705 +msgid "Use a portage snapshot, either a local file or a URL" +msgstr "Käytä Portagen otosta paikallisesta tiedostosta tai URLista" + +#: gli-dialog.py:706 +msgid "Extra cases such as if /usr/portage is an NFS mount" +msgstr "Erityistapauksissa, kuten jos /usr/portage on NFS-liitos" + +#: gli-dialog.py:707 +msgid "" +"Which method do you want to use to sync the portage tree for the " +"installation? If choosing a snapshot you will need to provide the URI for " +"the snapshot if it is not on the livecd." +msgstr "" +"Mitä keinoa käytetään Portage-puun ajantasaistukseen asennuksessa? " +"Otos-valinnassa pitää antaa URI otokseen, jollei sitä löydy LiveCD:ltä." + +#: gli-dialog.py:716 +msgid "Enter portage tree snapshot URI" +msgstr "Anna Portage-puun otoksen URI" + +#: gli-dialog.py:725 +msgid "No URI was specified! Returning to default emerge sync." +msgstr "URIa ei annettu, käytetään oletusarvoa emerge sync" + +#: gli-dialog.py:742 +msgid "" +"The installer will now gather information regarding the contents of /etc/" +"make.conf\n" +"\tOne of the unique (and best) features of Gentoo is the ability to\n" +"\tdefine flags (called USE flags) that define what components are \n" +"\tcompiled into applications. For example, you can enable the alsa\n" +"\tflag and programs that have alsa capability will use it. \n" +"\tThe result is a finely tuned OS with no unnecessary components to\n" +"\tslow you down.\n" +"\tThe installer divides USE flag selection into two screens, one for\n" +"\tglobal USE flags and one for local flags specific to each program.\n" +"\tPlease be patient while the screens load. It may take awhile." +msgstr "" +"Asennin kerää tietoa järjestelmästä /etc/make.confia varten\n" +"\tGentoon ainutlaatuisia ja parhaita ominaisuuksia on mahdollisuus\n" +"\tmääritellä ns. USE-flägejä, jotka kertovat mitä osia asennettuihin\n" +"\tohjelmiin otetaan mukaan. Esimerkiksi alsa-valinnalla saa alsa-tuen\n" +"\tohjelmiin, jotka tukevat alsaa. \n" +"\tLopputuloksena on tuunattu käyttöjärjestelmä, jossa ei ole mitään\n" +"\tylimääräisiä osia hidastamassa.\n" +"\tAsennin jakaa USE-flägivalinnat kahteen näyttöön, joista toinen\n" +"\ton yleisille USE-flägeille ja toinen pakettikohtaisille.\n" +"\tRuutujen lataaminen saattaa kestää tovin." + +#: gli-dialog.py:781 +msgid "Choose which *global* USE flags you want on the new system" +msgstr "Valitse *yleiset* USE-flägit uudelle järjestelmälle" + +#: gli-dialog.py:789 +msgid "Choose which *local* USE flags you want on the new system" +msgstr "Valitse *pakettikohtaiset* USE-flägit uudelle järjestelmälle" + +#: gli-dialog.py:822 +msgid "Stable" +msgstr "Vakaa" + +#: gli-dialog.py:823 +msgid "Unstable" +msgstr "Epävakaa" + +#: gli-dialog.py:824 +#, python-format +msgid "" +"Do you want to run the normal stable portage tree, or the bleeding edge " +"unstable (i.e. ACCEPT_KEYWORDS=%s)? If unsure select stable. Stable is " +"required for GRP installs." +msgstr "" +"Käytetäänkö tavallista vakaata osaa Portage-puusta, vai tuoreempaa " +"epävakaata (ACCEPT_KEYWORDS=%s)? Jollet tiedä, valitse vakaa. Vakaa on " +"pakollinen myös GRP-asennuksissa." + +#: gli-dialog.py:831 gli-dialog.py:839 +msgid "Edit your C Flags and Optimization level" +msgstr "Muokkaa CFLAGSeja ja optimointitasoja" + +#: gli-dialog.py:832 +msgid "Change the Host Setting" +msgstr "Muuta Host-asetusta" + +#: gli-dialog.py:833 gli-dialog.py:840 +msgid "Specify number of parallel makes (-j) to perform." +msgstr "Määritä rinnakkaissuoritettavien make-ohjelmien määrä (-j)." + +#: gli-dialog.py:834 gli-dialog.py:841 +msgid "Change portage functionality settings. (distcc/ccache)" +msgstr "Muuta Portagen toimintoasetuksia (distcc tai ccache)." + +#: gli-dialog.py:835 gli-dialog.py:842 +msgid "Specify mirrors to use for source retrieval." +msgstr "Anna peilipalvelimet joilta lähdekoodit haetaan." + +#: gli-dialog.py:836 gli-dialog.py:843 +msgid "Specify server used by rsync to sync the portage tree." +msgstr "Anna palvelin, jota rsync käyttää Portage-puun ajantasaistukseen." + +#: gli-dialog.py:837 gli-dialog.py:844 +msgid "Specify your own variable and value." +msgstr "Anna muita muuttujia ja arvoja." + +#: gli-dialog.py:845 +msgid "" +"For experienced users, the following /etc/make.conf variables can also be " +"defined. Choose a variable to edit or Done to continue." +msgstr "" +"Kokeneemmat käyttäjät halunnevat muokata seuraavia muuttujia " +"/etc/make.confissa. Valitse muuttuja tai Valmis jatkaaksesi." + +#: gli-dialog.py:849 +msgid "Enter the variable name: " +msgstr "Anna muuttujan nimi:" + +#: gli-dialog.py:856 gli-dialog.py:886 gli-dialog.py:933 +msgid "Enter new value for " +msgstr "Anna uusi arvo muuttujalle " + +#: gli-dialog.py:871 gli-dialog.py:883 +msgid "CLEAR" +msgstr "Tyhjennä" + +#: gli-dialog.py:871 +msgid "Erase the current value and start over." +msgstr "Poista arvo ja aloita alusta." + +#: gli-dialog.py:872 +msgid "Add a CPU optimization (deprecated in GCC 3.4)" +msgstr "Lisää suoritinoptimointi (vanhentunut GCC:ssä 3.4)" + +#: gli-dialog.py:873 +msgid "Add a CPU optimization (GCC 3.4+)" +msgstr "Lisää suoritinoptimointi (GCC:issä 3.4 ja uudemmat)" + +#: gli-dialog.py:874 +msgid "Add an Architecture optimization" +msgstr "Valitse arkkitehtuurioptimointi" + +#: gli-dialog.py:875 +msgid "Add optimization level (please do NOT go over 2)" +msgstr "Lisää optimointitaso " +"(2:ta suurempia ei kannata yleensä käyttää)" + +#: gli-dialog.py:876 +msgid "For advanced users only." +msgstr "Tehokäyttäjille." + +#: gli-dialog.py:877 +msgid "Common additional flag" +msgstr "Yleinen lisäasetus" + +#: gli-dialog.py:878 gli-dialog.py:885 gli-dialog.py:1455 gli-dialog.py:1473 +msgid "Manual" +msgstr "Käsisäätö" + +#: gli-dialog.py:878 +msgid "Specify your CFLAGS manually" +msgstr "Aseta CFLAGS käsin" + +#: gli-dialog.py:880 +msgid "" +"Choose a flag to add to the CFLAGS variable or Done to go back. The current " +"value is: " +msgstr "" +"Valitse kohta, joka lisätään CFLAGSiin tai Valmis palataksesi. " +"Nykyinen arvo on: " + +#: gli-dialog.py:891 +#, python-format +msgid "Enter the new value for %s (value only):" +msgstr "Anna uusi arvo muuttujalle %s (vain arvo):" + +#: gli-dialog.py:902 +msgid "Choose from the available CHOSTs for your architecture." +msgstr "Valitse arkkitehtuuriin sopiva CHOST" + +#: gli-dialog.py:908 +msgid "" +"Presently the only use is for specifying the number of parallel makes (-j) " +"to perform. The suggested number for parallel makes is CPUs+1. Enter the " +"NUMBER ONLY:" +msgstr "" +"Käytetään tällä hetkellä vain rinnakkaisille make-prosesseille (-j). " +"Suositus on suorittimien määrä + 1. Anna vain lukuarvo:" + +#: gli-dialog.py:914 +msgid "enables sandboxing when running emerge and ebuild." +msgstr "käyttää sandboxia emergen ja ebuildin suorituksessa." + +#: gli-dialog.py:915 +msgid "enables ccache support via CC." +msgstr "käyttää ccachea CC:n kautta." + +#: gli-dialog.py:916 +msgid "enables distcc support via CC." +msgstr "käyttää distcc:tä CC:n kautta" + +#: gli-dialog.py:917 +msgid "enables distfiles locking using fcntl or hardlinks." +msgstr "lukitsee distfiles-tiedostot fcntl:llä tai kovilla linkeillä." + +#: gli-dialog.py:918 +msgid "create binaries of all packages emerged" +msgstr "luo binääripaketit kaikista asennuksista" + +#: gli-dialog.py:919 +msgid "Input your list of FEATURES manually." +msgstr "Anna lista FEATURES-arvoksi käsin." + +#: gli-dialog.py:920 +msgid "" +"FEATURES are settings that affect the functionality of portage. Most of " +"these settings are for developer use, but some are available to non-" +"developers as well." +msgstr "" +"FEATURES on asetusjoukko, joka vaikuttaa Portagen toimintaan. Suurin osa " +"asetuksista on kehittäjien käyttöön, mutta joistain on hyötyä muillekin." + +#: gli-dialog.py:925 +msgid "Enter the value of FEATURES: " +msgstr "Anna FEATURES-arvo: " + +#: gli-dialog.py:942 gli-dialog.py:999 +msgid "ERROR! Could not set the make_conf correctly!" +msgstr "Virhe. Ei voitu asettaa make_confia oikein." + +#: gli-dialog.py:948 +msgid "" +"Do you want to use distcc to compile your extra packages during the install " +"and for future compilations as well?" +msgstr "" +"Käytetäänkö distcc:tä asennuksessa loppujen pakettien kanssa ja lopullisessa " +"järjestelmässä?" + +#: gli-dialog.py:963 gli-dialog.py:1517 gli-dialog.py:1582 +msgid "ERROR! Could not set the services list." +msgstr "Virhe. Palveluluettelon asettaminen epäonnistui." + +#: gli-dialog.py:969 +msgid "ERROR! Could not set the install distcc flag!" +msgstr "Virhe. Ei voitu asettaa distcc:tä asennukseksi." + +#: gli-dialog.py:990 +msgid "" +"Enter the hosts to be used by distcc for compilation:\n" +"Example: localhost 192.168.0.2 192.168.0.3:4000/10" +msgstr "" +"Anna koneet, joita distcc käyttää:\n" +"Esimerkiksi: localhost 192.168.0.2 192.168.0.3:4000/10" + +#: gli-dialog.py:1007 +msgid "A list of DEPEND atoms to mask." +msgstr "Luettelo DEPEND-atomeja peitettäviksi." + +#: gli-dialog.py:1008 +msgid "A list of packages to unmask." +msgstr "Luettelo paketteja, joiden peitto poistetaan." + +#: gli-dialog.py:1009 +msgid "Per-package KEYWORDS (like ACCEPT_KEYWORDS)." +msgstr "Pakettikohtaiset KEYWORDSit (kuten ACCEPT_KEYWORDS-asetus)." + +#: gli-dialog.py:1010 +msgid "Per-package USE flags." +msgstr "Pakettikohtaiset USE-flägit." + +#: gli-dialog.py:1011 +msgid "Type your own name of a file to edit in /etc/" +msgstr "Anna tiedostonimi /etc/:ssä, jota muokataan" + +#: gli-dialog.py:1012 +msgid "" +"For experienced users, the following /etc/* variables can also be defined. " +"Choose a variable to edit or Done to continue." +msgstr "" +"Tehokäyttäjät halunnevat muokata seuraavia /etc/*-muuttujia. " +"Valitse muuttuja tai Valmis jatkaaksesi." + +#: gli-dialog.py:1017 +msgid "" +"Enter the name of the /etc/ file you would like to edit (DO NOT type /etc/)" +msgstr "" +"Anna tiedostonimi /etc/:stä, jota muokataan (ilman osaa /etc/)" + +#: gli-dialog.py:1024 +msgid "Enter new contents (use \\n for newline) of " +msgstr "Kirjoita uusi sisältö (\\n rivinvaihtona) tiedostolle " + +#: gli-dialog.py:1031 +msgid "ERROR! Could not set etc/portage/* correctly!" +msgstr "Virhe. Ei voitu asettaa /etc/portage/*-tiedostoja oikein." + +#: gli-dialog.py:1038 +msgid "Copy over the current running kernel (fastest)" +msgstr "Kopio nykyinen ydin (nopein)" + +#: gli-dialog.py:1039 +msgid "The Unaltered Linux Kernel ver 2.6+ (safest)" +msgstr "Muuttamaton Linux-ytimen versio 2.6+ (turvallisin)" + +#: gli-dialog.py:1040 +msgid "Gentoo's optimized 2.6+ kernel. (less safe)" +msgstr "Gentoon versio Linux-ytimen 2.6+-versioista (vähemmän varma)" + +#: gli-dialog.py:1041 +msgid "Hardened sources for the 2.6 kernel tree" +msgstr "Tietoturvallinen versio 2.6-Linuxista" + +#: gli-dialog.py:1042 +msgid "Vanilla sources with grsecurity patches" +msgstr "Alkuperäinen 2.6-Linux grsecurity päivityksin" + +#: gli-dialog.py:1043 +msgid "Choose one of the other sources available." +msgstr "Valitse muista ytimen lähteistä." + +#: gli-dialog.py:1044 +msgid "" +"Choose which kernel sources to use for your system. If using a previously-" +"made kernel configuration, make sure the sources match the kernel used to " +"create the configuration." +msgstr "" +"Valitse minkä ytimen lähdekoodejä käytetään järjestelmässä. Jos käytät " +"aiemmin tehtyjä asetuksia, varmista että lähteet täsmäävät asetusten kanssa." + +#: gli-dialog.py:1048 +msgid "Please enter the desired kernel sources package name:" +msgstr "Anna ydinlähdekoodipaketin nimi:" + +#: gli-dialog.py:1053 +msgid "ERROR! Could not set the kernel source package!" +msgstr "Virhe. Ei voitu asettaa ytimen lähdepakettia." + +#: gli-dialog.py:1056 +msgid "Genkernel" +msgstr "Genkernel" + +#: gli-dialog.py:1057 +msgid "Traditional (requires a config!)" +msgstr "Perinteinen (vaatii asetukset)" + +#: gli-dialog.py:1058 +msgid "" +"There are currently two ways the installer can compile a kernel for your new " +"system. You can either provide a previously-made kernel configuration file " +"and use the traditional kernel-compiling procedure (no initrd) or have " +"genkernel automatically create your kernel for you (with initrd). \n" +"\n" +" If you do not have a previously-made kernel configuration, YOU MUST CHOOSE " +"Genkernel. Choose which method you want to use." +msgstr "" +"Ytimen voi tehdä kahdella tavalla. Joko käytetään aiempaa asetustietostoa, " +"ja käännetään ydin kuten tavallisesti (ilman initrd-asetuksia), tai " +"käytetään genkerneliä, joka tekee automaattisesti ytimen (initrd:n kanssa)." +"\n\n" +"Jos saatavilla ei ole aiemman ytimen asetustiedostoa, pitää käyttää " +"genkerneliä. Valitse käytettävä tapa." + +#: gli-dialog.py:1065 +msgid "Do you want the bootsplash screen to show up on bootup?" +msgstr "Käytetäänkö käynnistyksessä bootsplash-käynnistuskuvaa?" + +#: gli-dialog.py:1072 +msgid "" +"If you have a custom kernel configuration, enter its location (otherwise " +"just press Enter to continue):" +msgstr "" +"Jos käytät omaa ytimen asetustoa, anna tiedoston sijainti (muutoin " +"paina enteriä jatkaaksesi):" + +#: gli-dialog.py:1081 +msgid "ERROR! Could not set the kernel config URI!" +msgstr "Virhe. Ei voitu asettaa ytimen asetuksille URIa." + +#: gli-dialog.py:1104 gli-dialog.py:1106 +msgid "GRand Unified Bootloader, newer, RECOMMENDED" +msgstr "GRand Unified Bootloader, uudempi, suositeltu" + +#: gli-dialog.py:1108 +msgid "LInux LOader, older, traditional.(detects windows partitions)" +msgstr "LInux LOader, vanhempi, perinteinen. (tunnistaa windows-osioita)" + +#: gli-dialog.py:1110 +msgid "Do not install a bootloader. (System may be unbootable!)" +msgstr "Älä asenna käynnistyslatainta. (Järjestelmästä saattaa tulla" +"käynnistyskelvoton)" + +#: gli-dialog.py:1111 +msgid "" +"To boot successfully into your new Linux system, a bootloader will be " +"needed. If you already have a bootloader you want to use you can select " +"None here. The bootloader choices available are dependent on what GLI " +"supports and what architecture your system is. Choose a bootloader" +msgstr "" +"Uuden Linuxin käynnistäminen vaatii käynnistyslataimen. Jos käynnistyslatain " +"on jo aseennettu, voit valita Ei mitään. Käynnistyslatainvaihtoehdot " +"riippuvat GLIn tukemista vaihtoehdoista ja arkkitehtuurista. Valitse " +"käynnistyslatain" + +#: gli-dialog.py:1118 +msgid "ERROR! Could not set boot loader pkg! " +msgstr "Virhe. Ei voitu asettaa käynnistyslatainpakettia." + +#: gli-dialog.py:1123 +msgid "" +"Most bootloaders have the ability to install to either the Master Boot " +"Record (MBR) or some other partition. Most people will want their " +"bootloader installed on the MBR for successful boots, but if you have " +"special circumstances, you can have the bootloader installed to the /boot " +"partition instead. Do you want the boot loader installed in the MBR? (YES " +"is RECOMMENDED)" +msgstr "" +"Useimmat käynnistyslataimet voivat asentua joko Master Boot Recordiin " +"(MBR:ään) tai jollekin osiolle. Useimmat halunnevat käynnistyslataimen " +"MBR:ään, joka takaa onnistuneet käynnistykset, mutta erikoistapauksissa " +"voi tarvita asentaa latain /boot-osiolle. Asennetaanko MBR:ään (Kyllä on " +"suositeltava)" + +#: gli-dialog.py:1131 +#, python-format +msgid "" +"Your boot device may not be correct. It is currently set to %s, but this " +"device may not be the first to boot. Usually boot devices end in 'a' such " +"as hda or sda." +msgstr "" +"Käynnistyslaite saattaa olla väärä. Se on nyt %s, mutta tämä ei välttämättä " +"ole ensimmäinen laite, joka käynnistyy. Tyypillisesti käynnistyvät laitteet " +"päättyvät nimiltään aahan, kuten hda tai sda." + +#: gli-dialog.py:1132 +msgid " Please confirm your boot device by choosing it from the menu." +msgstr " Vahvista käynnistyslaite valitsemalla se valikosta." + +#: gli-dialog.py:1136 +msgid "" +"ERROR: No drives set up. Please complete the Partitioning screen first!" +msgstr "" +"Virhe: Ei asetettuja asemia. Viimeistele osiointi-näyttö ensin." + +#: gli-dialog.py:1145 +msgid "ERROR! Could not set the boot device!" +msgstr "Virhe. Ei voitu asettaa käynnistyslaitetta." + +#: gli-dialog.py:1147 +msgid "" +"If you have any additional optional arguments you want to pass to the kernel " +"at boot, type them here or just press Enter to continue:" +msgstr "" +"Jos tarvitset lisäasetuksia ytimelle käynnistyksen aikaan, kirjoita ne " +"tähän tai paina enteriä jatkaaksesi:" + +#: gli-dialog.py:1152 gli-dialog.py:1157 +msgid "ERROR! Could not set bootloader kernel arguments! " +msgstr "Virhe. Ei voitu asettaa käynnistyslataimen ydinasetuksia." + +#: gli-dialog.py:1171 +msgid "" +"Please select the timezone for the new installation. Entries ending with " +"a / can be selected to reveal a sub-list of more specific locations. For " +"example, you can select America/ and then Chicago." +msgstr "" +"Valitse aikavyöhyke asennukselle. Valinnat, jotka päättyvät vinoviivaan " +"avaavat tarkennetun listan vaihtoehtoja. Esimerkiksi voit valita Europe/" +" ja sieltä Helsinki." + +#: gli-dialog.py:1185 +msgid "ERROR: Could not set that timezone!" +msgstr "Virhe. Ei voitu asettaa aikavyöhykettä." + +#: gli-dialog.py:1192 +msgid "" +"Here you will enter all of your network interface information for the new " +"system. You can either choose a network interface to edit, add a network " +"interface, delete an interface, or edit the miscellaneous options such as " +"hostname and proxy servers." +msgstr "" +"Tässä annetaan kaikki verkkorajapinnat uuteen järjestelmään. " +"Voit valita muokattavan verkkorajapinnan, lisäta uuden, poistaa tai muokata " +"muita asetuksia, kuten konenimeä ja välipalvelimia." + +# Sellasta on elämä. +#: gli-dialog.py:1197 gli-dialog.py:1285 +msgid "Settings: DHCP. Options: " +msgstr "Asetukset: DHCP. Asetukset: " + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid "IP: " +msgstr "IP: " + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid " Broadcast: " +msgstr " Broadcast: " + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid " Netmask: " +msgstr " Netmask: " + +#: gli-dialog.py:1200 +msgid "Add a new network interface" +msgstr "Lisää verkkorajapinta" + +#: gli-dialog.py:1206 +msgid "ERROR! Could not set the network interfaces!" +msgstr "Virhe. Ei voitu asettaa verkkorajapintaa." + +#: gli-dialog.py:1216 +msgid "" +"Choose an interface from the list or Other to type your own if it was not " +"detected." +msgstr "" +"Valitse rajapinta listasta tai Muu kirjoittaaksesi uusi, jos rajapintaa ei " +"tunnistettu." + +#: gli-dialog.py:1219 +msgid "Enter name for new interface (eth0, ppp0, etc.)" +msgstr "Anna nimi rajapinnalle (eth0, ppp0 tms.)" + +#: gli-dialog.py:1223 +msgid "An interface with the name is already defined." +msgstr "Rajapinta tälle nimelle on jo määritelty." + +#: gli-dialog.py:1237 gli-dialog.py:1262 +msgid "" +"Enter your networking information: (See Chapter 3 of the Handbook for more " +"information) Your broadcast address is probably your IP address with 255 as " +"the last tuple. Do not press Enter until all fields are complete!" +msgstr "" +"Anna verkon tiedot (lue käsikirjan kolmas kappale lisätietoja varten): " +" Broadcast on yleensä oma IP, jonka viimeinen luku on korvattu 255:llä. " +"Älä paina enteriä ennen kuin kaikki on valmista." + +#: gli-dialog.py:1248 +msgid "Edit" +msgstr "Muokkaa" + +#: gli-dialog.py:1250 +#, python-format +msgid "" +"For interface %s, you can either edit the interface information (IP Address, " +"Broadcast, Netmask) or Delete the interface." +msgstr "" +"Rajapinnan %s tietoja (IP, broadcast, verkon peite) voi muokata tai " +"poistaa koko rajapinnan." + +#: gli-dialog.py:1276 +msgid "Are you sure you want to remove the interface " +msgstr "Poistetaanko rajapinta " + +#: gli-dialog.py:1288 +msgid "" +"To be able to surf on the internet, you must know which host shares the " +"Internet connection. This host is called the gateway. It is usually similar " +"to your IP address, but ending in .1\n" +"If you have DHCP then just select your primary Internet interface (no IP " +"will be needed) Start by choosing which interface accesses the Internet:" +msgstr "" +"Internetiin pääsyyn tarvitsee tietää kone, joka jakaa yhteyttä. Tämä on " +"nimeltään gateway. Se on usein sama IP-osoite kuin oma, paitsi viimeinen " +"luku on 1.\n" +"Jos DHCP on käytössä, valitse vain ensisijainen rajapinta (IP:tä ei " +"tarvitse tietää) Aloita valitsemalla verkkorajapinta, joka yhdistää " +"Internetiin:" + +#: gli-dialog.py:1296 +msgid "Enter the gateway IP address for " +msgstr "Anna gatewayn IP rajapinnalle " + +#: gli-dialog.py:1300 +msgid "Invalid IP Entered! Please try again." +msgstr "Virheellinen IP, yritä uudestaan." + +#: gli-dialog.py:1305 +#, python-format +msgid "" +"ERROR! Coult not set the default gateway with IP %(ip)s for interface %" +"(iface)s" +msgstr "" +"Virhe. Ei voitu asettaa oletus-gatewaytä IP:lle %(ip)s rajapinnassa " +"%(iface)s" + +#: gli-dialog.py:1320 gli-dialog.py:1333 +msgid "" +"Fill out the remaining networking settings. The hostname is manditory as " +"that is the name of your computer. Leave the other fields blank if you are " +"not using them. If using DHCP you do not need to enter DNS servers. Do not " +"press Enter until all fields are complete!" +msgstr "" +"Täytä puuttuvat verkkoasetukste. Konenimi on pakollinen. Jätä muut tyhjiksi, " +"jollet tarvitse niitä. Jos DHCP on käytössä, DNS-palvelimia ei tarvitse " +"antaa. Älä paina enteriä ennen kuin kaikki kentät on täytetty." + +#: gli-dialog.py:1321 gli-dialog.py:1334 +msgid "Enter your Hostname:" +msgstr "Anna konenimi:" + +#: gli-dialog.py:1322 gli-dialog.py:1335 +msgid "Enter your Domain Name:" +msgstr "Anna domainnimi:" + +#: gli-dialog.py:1323 +msgid "Enter your NIS Domain Name:" +msgstr "Anna NIS-domainnimi:" + +#: gli-dialog.py:1324 gli-dialog.py:1336 +msgid "Enter a primary DNS server:" +msgstr "Anna ensisijainen DNS:" + +#: gli-dialog.py:1325 gli-dialog.py:1337 +msgid "Enter a backup DNS server:" +msgstr "Anna vara-DNS:" + +#: gli-dialog.py:1344 +msgid "Incorrect hostname! It must be a string. Not saved." +msgstr "Virheellinen konenimi. Sen pitää olla merkkijono. Ei tallennettu." + +#: gli-dialog.py:1350 +msgid "ERROR! Could not set the hostname:" +msgstr "Virhe. Ei voitu asettaa konenimeä:" + +#: gli-dialog.py:1354 +msgid "Incorrect domainname! It must be a string. Not saved." +msgstr "Virheellinen domainnimi. Pitää olla merkkijono. Ei tallennettu." + +#: gli-dialog.py:1360 +msgid "ERROR! Could not set the domainname:" +msgstr "Virhe. Ei voitu asettaa domainnimeä:" + +#: gli-dialog.py:1364 +msgid "Incorrect nisdomainname! It must be a string. Not saved." +msgstr "Virheellinen NIS-domainnimi. Pitää olla merkkijono. Ei tallennettu." + +#: gli-dialog.py:1370 +msgid "ERROR! Could not set the nisdomainname:" +msgstr "Virhe. Ei voitu asettaa NIS-domainnimeä:" + +#: gli-dialog.py:1374 +msgid "Incorrect Primary DNS Server! Not saved." +msgstr "Virheellinen ensisijainen DNS-palvelin. Ei tallennettu." + +#: gli-dialog.py:1379 +msgid "Incorrect Backup DNS Server! Not saved." +msgstr "Virheellinen vara-DNS-palvelin. Ei tallennettu." + +#: gli-dialog.py:1386 +msgid "ERROR! Could not set the DNS Servers:" +msgstr "Virhe. Ei voitu asettaa DNS-palvelimia:" + +#: gli-dialog.py:1390 +msgid "Incorrect HTTP Proxy! It must be a uri. Not saved." +msgstr "Virheellinen HTTP-välipalvelin. Pitää olla URI. Ei tallennettu." + +#: gli-dialog.py:1396 +msgid "ERROR! Could not set the HTTP Proxy:" +msgstr "Virhe. Ei voitu asettaa HTTP-välipalvelinta:" + +#: gli-dialog.py:1400 +msgid "Incorrect FTP Proxy! It must be a uri. Not saved." +msgstr "Virheellinen FTP-välipalvelin. Pitää olla URI. Ei tallennettu." + +#: gli-dialog.py:1406 +msgid "ERROR! Could not set the FTP Proxy:" +msgstr "Virhe. Ei voitu asettaa FTP-välipalvelinta:" + +#: gli-dialog.py:1410 +msgid "Incorrect RSYNC Proxy! It must be a uri. Not saved." +msgstr "Virheellinen RSYNC-välipalvelin. Pitää olla URI. Ei tallennettu." + +#: gli-dialog.py:1416 +msgid "ERROR! Could not set the RSYNC Proxy:" +msgstr "Virhe. Ei voitu asettaa RSYNC-välipalvelinta:" + +#: gli-dialog.py:1422 +msgid "Paul Vixie's cron daemon, fully featured, RECOMMENDED." +msgstr "Paul Vixien cron-palvelu, paljon ominaisuuksia, suositeltu." + +#: gli-dialog.py:1423 +msgid "A cute little cron from Matt Dillon." +msgstr "Pieni Matt Dillonin tekemä cron." + +#: gli-dialog.py:1424 +msgid "A scheduler with extended capabilities over cron & anacron" +msgstr "Ajastustoiminto, jossa on cronia ja anacronia laajemmat ominaisuudet" + +#: gli-dialog.py:1425 +msgid "Don't use a cron daemon. (NOT Recommended!)" +msgstr "Älä käytä cron-palvelua. (Ei suositella)" + +#: gli-dialog.py:1426 +msgid "" +"A cron daemon executes scheduled commands. It is very handy if you need to " +"execute some command regularly (for instance daily, weekly or monthly). " +"Gentoo offers three possible cron daemons: dcron, fcron and vixie-cron. " +"Installing one of them is similar to installing a system logger. However, " +"dcron and fcron require an extra configuration command, namely crontab /etc/" +"crontab. If you don't know what to choose, use vixie-cron. If doing a " +"networkless install, choose vixie-cron. Choose your cron daemon:" +msgstr "" +"Cron-palvelu on ohjelma, joka suorittaa ajastettuja toimintoja. Se on " +"kätevä suorittamaan komentoja tietuin väliajoin, kuten päivittäin, " +"viikoittain tai kuukausittain. Gentoossa on kolme vaihtoehtoa croneiksi: " +"dcron, fcron tai vixie-cron. Asennus on kuten järjestelmälokissa. Kuitenkin " +"dcron ja fcron vaativat asetusten säätämistä komennolla crontab " +"/etc/crontab. Jollet tiedä mitä valita, käytä vixie-cronia. Verkottomassa " +"asennuksessa on käytettävä vixie-cronia. Valitse cron-palvelu:" + +#: gli-dialog.py:1435 +msgid "An advanced system logger." +msgstr "Tehokas järjestelmäloki." + +#: gli-dialog.py:1436 +msgid "A Highly-configurable system logger." +msgstr "Muokattava järjestelmäloki." + +#: gli-dialog.py:1437 +msgid "The traditional set of system logging daemons." +msgstr "Perinteinen järjestelmälokipalvelujoukko." + +#: gli-dialog.py:1438 +msgid "" +"Linux has an excellent history of logging capabilities -- if you want you " +"can log everything that happens on your system in logfiles. This happens " +"through the system logger. Gentoo offers several system loggers to choose " +"from. If you plan on using sysklogd or syslog-ng you might want to install " +"logrotate afterwards as those system loggers don't provide any rotation " +"mechanism for the log files. If doing networkless, choose syslog-ng. " +"Choose a system logger:" +msgstr "" +"Linuxissa on mittavat lokiominaisuudet, joilla voi halutessaan kirjata " +"kaiken mitä tapahtuu järjestelmässä. Tämä tehdään järjestelmälokin avulla. " +"Gentooossa on useita järjestelmälokivaihtoehtoja valittavana. Jos käytät " +"sysklogd:tä tai syslog-ng:tä, kannattanee asentaa logrotate jälkikäteen, " +"sillä ne eivät tue lokitiedostojen kierrätysmekanismeja. Verkottomassa " +"asennuksessa on valittava syslog-ng. " +"Valitse järjestelmäloki:" + +#: gli-dialog.py:1458 +msgid "" +"There are thousands of applications available to Gentoo users through " +"Portage, Gentoo's package management system. Select some of the more common " +"ones below or add your own additional package list by choosing 'Manual'." +msgstr "" +"Gentoossa on saatavilla tuhansia sovelluksia, joita hallitaan Portagella, " +"Gentoon paketinhallintaohjelmalla. Valitse jokin yleisempi alta tai lisää " +"paketteja listaan valinnalla Käsin." + +#: gli-dialog.py:1459 +msgid "" +"\n" +"Your current package list is: " +msgstr "" +"\n" +"Nykyinen pakettilista on: " + +#: gli-dialog.py:1466 +msgid "ERROR! Could not set the install packages! List of packages:" +msgstr "Virhe. Ei voitu asettaa asennettavia paketteja. Pakettiluettelo:" + +#: gli-dialog.py:1474 +msgid "Enter a space-separated list of extra packages to install on the system" +msgstr "Anna välein eroteltu luettelo muista asennettavista paketeista" + +#: gli-dialog.py:1489 +msgid "" +"Choose from the listed packages. If doing a networkless install, only " +"choose (GRP) packages." +msgstr "" +"Valitse luetelluista paketeista. Verkottomassa asennuksessa voi valita vain " +"(GRP)-merkittyjä paketteja." + +#: gli-dialog.py:1508 +msgid "Do you want to start X on bootup?" +msgstr "Käynnistetäänkö X käynnistyksessä." + +#: gli-dialog.py:1553 +msgid "ALSA Sound Daemon" +msgstr "ALSA-äänipalvelu" + +#: gli-dialog.py:1554 +msgid "Common web server (version 1.x)" +msgstr "Yleinen veppipalvelin (1.x-versio)" + +#: gli-dialog.py:1555 +msgid "Common web server (version 2.x)" +msgstr "Yleinen veppipalvelin (2.x-versio)" + +#: gli-dialog.py:1556 +msgid "Distributed Compiling System" +msgstr "Hajautettu kääntöjärjestelmä" + +#: gli-dialog.py:1557 +msgid "ESD Sound Daemon" +msgstr "ESD-äänipalvelu" + +#: gli-dialog.py:1558 +msgid "Hard Drive Tweaking Utility" +msgstr "Kovalevyn viritysohjelma" + +#: gli-dialog.py:1559 +msgid "Run scripts found in /etc/conf.d/local.start" +msgstr "Käynnistää skriptit tiedostosta /etc/conf.d/local.start" + +#: gli-dialog.py:1560 +msgid "Port Mapping Service" +msgstr "Portmapperipalvelu" + +#: gli-dialog.py:1561 +msgid "Common FTP server" +msgstr "Yleinen FTP-palvelin" + +#: gli-dialog.py:1562 +msgid "SSH Daemon (allows remote logins)" +msgstr "SSH-palvelu (mahdollistaa etäkirjautumiset)" + +#: gli-dialog.py:1563 +msgid "X Font Server" +msgstr "X:n fonttipalvelin" + +#: gli-dialog.py:1564 +msgid "X Daemon" +msgstr "X-palvelin" + +#: gli-dialog.py:1565 +msgid "Manually specify your services in a comma-separated list." +msgstr "Kirjoita lisää palveluja pilkuin eroteltuna listana." + +#: gli-dialog.py:1566 +msgid "" +"Choose the services you want started on bootup. Note that depending on what " +"packages are selected, some services listed will not exist." +msgstr "" +"Valitse palvelut, jotka käynnistetään käynnistyksessä. Riippuen " +"asennetuista paketeista, joitain lueteltuja palveluja ei välttämättä ole " +"saatavilla." + +#: gli-dialog.py:1574 +msgid "Enter a comma-separated list of services to start on boot" +msgstr "Anna pilkuin eroteltu luettelo käynnistettävistä palveluista" + +#: gli-dialog.py:1599 +msgid "" +"Additional configuration settings for Advanced users (rc.conf)\n" +"Here are some other variables you can set in various configuration files on " +"the new system. If you don't know what a variable does, don't change it!" +msgstr "Muut asetukset tehokäyttäjille (rc.confissa)\n" +"Tässä on joitain muuttujia, joita voi asettaa uuden järjestelmän " +"asetuksiin. Jollet tiedä mitä muuttuja tekee, älä muuta sitä." + +#: gli-dialog.py:1600 +msgid "Use KEYMAP to specify the default console keymap." +msgstr "KEYMAP määrittelee konsolin näppäinkartan." + +#: gli-dialog.py:1601 +msgid "Decision to first load the 'windowkeys' console keymap" +msgstr "Ensin lataa windowkeus-kartan" + +#: gli-dialog.py:1602 +msgid "maps to load for extended keyboards. Most users will leave this as is." +msgstr "näppäinkartat laajennetuille näppäimmistöille, useimmissa tapauksissa " +"oletusarvot ovat hyvät." + +#: gli-dialog.py:1603 +msgid "Specifies the default font that you'd like Linux to use on the console." +msgstr "Määrittelee oletusfontin Linuxin konsolille." + +#: gli-dialog.py:1604 +msgid "The charset map file to use." +msgstr "Näppäinkarttatiedoston nimi." + +#: gli-dialog.py:1605 +msgid "Set the clock to either UTC or local" +msgstr "Kello asetettu paikalliseen (local) tai UTC-aikaan " + +#: gli-dialog.py:1606 +msgid "Set EDITOR to your preferred editor." +msgstr "Aseta EDITOR suosikkimuokkaimeksi" + +#: gli-dialog.py:1607 +msgid "What display manager do you use ? [ xdm | gdm | kdm | entrance ]" +msgstr "Käytettävä graafinen käynnistin (xdm, gdm, kdm tai entrance)" + +#: gli-dialog.py:1608 +msgid "a new variable to control what window manager to start default with X" +msgstr "Muuttuja, joka määrittelee X:n oletusikkunoinnin" + +#: gli-dialog.py:1615 +msgid "Choose your desired keymap:" +msgstr "Valitse näppäinkartta:" + +#: gli-dialog.py:1624 +msgid "" +"Should we first load the 'windowkeys' console keymap? Most x86 users will " +"say 'yes' here. Note that non-x86 users should leave it as 'no'." +msgstr "" +"Ladataanko ensin windowkeys-kartta? Useimmille x86:ille sopii " +"yes. Muiden tulee yleensä vastata no." + +#: gli-dialog.py:1629 +msgid "" +"This sets the maps to load for extended keyboards. Most users will leave " +"this as is. Enter new value for EXTENDED_KEYMAPS" +msgstr "" +"Asettaa kartan laajennetuille näppäimistöille. Useimmin oletus on oikein. " +"Anna uusi arvo muuttujalle EXTENDED_KEYMAPS" + +#: gli-dialog.py:1632 +msgid "Choose your desired console font:" +msgstr "Valitse konsolifontti:" + +#: gli-dialog.py:1638 +msgid "Choose your desired console translation:" +msgstr "Valitse konsolin merkistömuunnos:" + +#: gli-dialog.py:1646 +msgid "" +"Should CLOCK be set to UTC or local? Unless you set your timezone to UTC " +"you will want to choose local." +msgstr "" +"Onko kello paikallisessa vai UTC-ajassa? Jollei kello ole UTC-ajassa pitää " +"asettaa local." + +#: gli-dialog.py:1651 +msgid "Default editor." +msgstr "Oletusmuokkain." + +#: gli-dialog.py:1651 +msgid "vi improved editor." +msgstr "vi improved." + +#: gli-dialog.py:1651 +msgid "The emacs editor." +msgstr "emacs." + +#: gli-dialog.py:1652 +msgid "Choose your default editor: " +msgstr "Valitse oletuseditori: " + +#: gli-dialog.py:1654 +msgid "X Display Manager" +msgstr "X Display Manager" + +#: gli-dialog.py:1655 +msgid "Gnome Display Manager" +msgstr "Gnome Display Manager" + +#: gli-dialog.py:1656 +msgid "KDE Display Manager" +msgstr "KDE Display Manager" + +#: gli-dialog.py:1657 +msgid "Login Manager for Enlightenment" +msgstr "Enlightenmentin kirjautumismanageri" + +#: gli-dialog.py:1658 +msgid "" +"Choose your desired display manager to use when starting X (note you must " +"make sure that package also gets installed for it to work):" +msgstr "" +"Valitse käytettävä graafinen kirjaiutuminen X:n käynnistykseen (valittu " +"paketti pitää myös olla asennettu):" + +#: gli-dialog.py:1660 +msgid "" +"Choose what window manager you want to start default with X if run with xdm, " +"startx, or xinit. (common options are Gnome or Xsession):" +msgstr "" +"Valitse ikkunointimanageri, jota käytetään jos X käynnistetään xdm:llä, " +"startx:llä tai xinitillä (yleisiä valintoja ovat Gnome tai Xsession):" + +#: gli-dialog.py:1697 +msgid "" +"Please enter your desired password for the root account. (note it will not " +"show the password. Also do not try to use backspace.):" +msgstr "" +"Anna salasana rootin tilille. (Salasanaa ei näy kirjoitettaessa. Älä käytä " +"askelpalautinta.):" + +#: gli-dialog.py:1700 +msgid "Enter the new root password again for confirmation" +msgstr "Anna rootin salasana uudelleen vahvistukseksi" + +#: gli-dialog.py:1704 +msgid "The passwords do not match. Please try again or cancel." +msgstr "Salasanata eivät täsmää. Yritä uudestaan tai peruuta." + +#: gli-dialog.py:1709 +msgid "ERROR! Could not set the new system root password!" +msgstr "Virhe. Uuden järjestelmän salasanaa ei voitu asettaa." + +#: gli-dialog.py:1710 gli-dialog.py:1775 +msgid "Password saved. Press Enter to continue." +msgstr "Salasana tallennettu. Paina enteriä jatkaaksesi." + +#: gli-dialog.py:1723 gli-dialog.py:1737 +msgid "Add user" +msgstr "Lisää käyttäjä" + +#: gli-dialog.py:1724 +msgid "" +"Working as root on a Unix/Linux system is dangerous and should be avoided as " +"much as possible. Therefore it is strongly recommended to add a user for day-" +"to-day use. Choose a user to edit:" +msgstr "" +"Rootin tunnuksella toimiminen Linux-järjestelmässä on vaarallista, joten " +"tulisi välttää. Tämän takia on suositeltavaa luoda erillinen käyttäjätunnus " +"arkikäyttöä varten. Valitse käyttäjä muokattavaksi:" + +#: gli-dialog.py:1734 +msgid "ERROR! Could not set the additional users!" +msgstr "Virhe. Ei voitu lisätä käyttäjää." + +#: gli-dialog.py:1738 +msgid "Enter the username for the new user" +msgstr "Anna käyttäjän käyttäjänimi" + +#: gli-dialog.py:1742 +msgid "A user with that name already exists" +msgstr "Samanniminen käyttäjä on jo olemassa" + +#: gli-dialog.py:1746 +#, python-format +msgid "Enter the new password for user %s. (will not be echoed)" +msgstr "Anna salasana käyttäjälle %s. (Kirjoitettua ei näy ruudulla)" + +#: gli-dialog.py:1747 +msgid "Enter the new password again for confirmation" +msgstr "Anna salasana uudestaan vahvistukseksi" + +#: gli-dialog.py:1750 +msgid "The passwords do not match! Please try again." +msgstr "Salasanat eivät täsmää, yritä uudelleen." + +#: gli-dialog.py:1754 +msgid "" +"You must enter a password for the user! Even a blank password will do. You " +"can always edit it again later from the menu." +msgstr "" +"Salasana on pakollinen. Tyhjäkin salasana kelpaa. Sitä voi muokata " +"jälkikäteen valikosta." + +#: gli-dialog.py:1760 gli-dialog.py:1765 +msgid "Password" +msgstr "Salasana" + +#: gli-dialog.py:1760 gli-dialog.py:1777 +msgid "Group Membership" +msgstr "Ryhmät" + +#: gli-dialog.py:1760 gli-dialog.py:1801 +msgid "Shell" +msgstr "Kuori" + +#: gli-dialog.py:1760 gli-dialog.py:1806 +msgid "Home Directory" +msgstr "Kotihakemisto" + +#: gli-dialog.py:1760 gli-dialog.py:1811 +msgid "UID" +msgstr "UID" + +#: gli-dialog.py:1760 gli-dialog.py:1818 +msgid "Comment" +msgstr "Kommentti" + +#: gli-dialog.py:1761 +#, python-format +msgid "Choose an option for user %s" +msgstr "Valitse asetus käyttäjälle %s" + +#: gli-dialog.py:1766 +msgid "Enter the new password" +msgstr "Anna uusi salasana" + +#: gli-dialog.py:1769 +msgid "Enter the new password again" +msgstr "Anna uusi salasana uudelleen" + +#: gli-dialog.py:1773 +msgid "The passwords do not match! Try again." +msgstr "Salasanat eivät täsmää, yritä uudestaan." + +#: gli-dialog.py:1779 +msgid "The usual group for normal users." +msgstr "Yleinen ryhmä tavan käyttäjille." + +#: gli-dialog.py:1780 +msgid "Allows users to attempt to su to root." +msgstr "Mahdollistaa käyttäjälle rootin oikeuksien saannin sulla." + +#: gli-dialog.py:1781 +msgid "Allows access to audio devices." +msgstr "Mahdollistaa audiolaitteiden käytön." + +#: gli-dialog.py:1782 +msgid "Allows access to games." +msgstr "Mahdollistaa pelien peluun." + +#: gli-dialog.py:1783 gli-dialog.py:1784 gli-dialog.py:1785 gli-dialog.py:1786 +msgid "For users who know what they're doing only." +msgstr "Vain tehokäyttäjille." + +#: gli-dialog.py:1787 +msgid "Manually specify your groups in a comma-separated list." +msgstr "Anna ryhmät käsin pilkuin eroteltuna luettelona." + +#: gli-dialog.py:1788 +#, python-format +msgid "Select which groups you would like the user %s to be in." +msgstr "Valitse mihin ryhmiin %s kuuluu." + +#: gli-dialog.py:1798 +msgid "Enter a comma-separated list of groups the user is to be in" +msgstr "Anna pilkuin eroteltuna luettelona käyttäjän ryhmät" + +#: gli-dialog.py:1802 +msgid "Enter the shell you want the user to use. default is /bin/bash. " +msgstr "Anna kuori, jota käyttäjä käyttää. Oletus on /bin/bash. " + +#: gli-dialog.py:1807 +msgid "Enter the user's home directory. default is /home/username. " +msgstr "Anna käyttäjän kotihakemisto. Oletus on /home/käyttäjätunnus." + +#: gli-dialog.py:1812 +msgid "" +"Enter the user's UID. If left blank the system will choose a default value " +"(this is recommended)." +msgstr "" +"Anna käyttäjän UID. Jätä tyhjäksi järjestelmän valitsemaa oletusta varten " +"(suositus)" + +#: gli-dialog.py:1819 +msgid "Enter the user's comment. This is completely optional." +msgstr "Anna käyttäjän kommentti. Tämä ei ole pakollinen." + +#: gli-dialog.py:1827 +#, python-format +msgid "Are you sure you want to delete the user %s ?" +msgstr "Poistetaanko käyttäjä %s?" + +#: gli-dialog.py:1835 +msgid "Would you like to save these install settings for use again later?" +msgstr "Tallennetaanko asetukset myöhempää käyttöä varten?" + +#: gli-dialog.py:1839 +msgid "Enter a filename for the XML file. Use full path!" +msgstr "XML-tiedoston tiedostonimi. Anna koko hakemistopolku." + +#: gli-dialog.py:1843 +#, python-format +msgid "The file %s already exists. Do you want to overwrite it?" +msgstr "Tiedosto %s on jo olemassa. Korvataanko?" + +#: gli-dialog.py:1850 +msgid "" +"Error. File couldn't be saved. Saving to /tmp/installprofile.xml instead." +msgstr "" +"Virhe. Tiedostoa ei voitu tallentaa. Tallenetaan /tmp/installprofile.xml:ksi." + +#: gli-dialog.py:1856 +msgid "Complete failure to save install profile!" +msgstr "Asennusprofiilin tallennus epäonnistui täysin." + +#: gli-dialog.py:1952 +msgid "Install completed!" +msgstr "Asennus valmistui!" + +#: gli-dialog.py:1954 +msgid "Install done!" +msgstr "Asennus tehty!" + +#: gli-dialog.py:1970 +#, python-format +msgid "" +"There was an Exception received during the install that is outside of the " +"normal install errors. This is a bad thing. The error was: %s \n" +" You have several ways of handling this. If you cannot resolve it, please " +"submit a bug report (after searching to make sure it's not a known issue and " +"verifying you didn't do something stupid) with the contents of /var/log/" +"install.log and /tmp/installprofile.xml and the version of the installer you " +"used." +msgstr "" +"Poikkeus, joka ei ole tunnettu asennusongelma, havaittiin. Saatu virhe oli " +"%s\n" +" Tämän voi hoitaa monella tavalla. " +"Jollei ongelma ratkea, lähetä vikailmoitus, kun olet etsinyt, ettei tätä ole " +"jo ilmoitettu ja " +"varmistanut ettei se seurannut omasta tyhmyydestäsi. Sisällytä ilmoitukseen /" +"var/log/install.log ja /tmp/installprofile.xml sekä asentimen versio." + +#: gli-dialog.py:2002 +msgid "Installation Started!" +msgstr "Asennus alkoi!" + +#: gli-dialog.py:2002 gli-dialog.py:2005 +msgid "Installation progress" +msgstr "Asennuksen edistyminen" + +#: gli-dialog.py:2005 +msgid "Continuing Installation" +msgstr "Jatketaan asennusta" + +#: gli-dialog.py:2025 +#, python-format +msgid "" +"On step %(A)d of %(B)d. Current step: %(C)s\n" +"%(D)s" +msgstr "" +"Askel %(A)d/%(B)d. Suoritettava askel: %(C)s\n" +"%(D)s" + +#: gli-dialog.py:2036 +#, python-format +msgid "On step %(A)d of %(B)d. Current step: %(C)s" +msgstr "Askel %(A)d/%(B)d. Suoritettava askel: %(C)s" + diff --git a/src/fe/dialog/languages/fr/GLIInstallProfile.fr.po b/src/fe/dialog/languages/fr/GLIInstallProfile.fr.po new file mode 100644 index 0000000..a836fc4 --- /dev/null +++ b/src/fe/dialog/languages/fr/GLIInstallProfile.fr.po @@ -0,0 +1,312 @@ +msgid "" +msgstr "" +"Project-Id-Version: GLIinstallprofilev1\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2007-03-12 22:23+0100\n" +"Last-Translator: Jean-Baptiste Holcroft <jb.holcroft@gmail.com>\n" +"Language-Team: gentoo-doc-fr <jb.holcroft@gmail.com>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: French\n" +"X-Poedit-Country: FRANCE\n" + +#: GLIInstallProfile.py:586 +msgid "Popular Desktop Applications" +msgstr "Applications de bureau typiques" + +#: GLIInstallProfile.py:587 +msgid "GTK+ music player" +msgstr "Lecteur audio GTK+" + +#: GLIInstallProfile.py:588 +msgid "A GTK+ tagging program for MP3, OGG, FLAC, and more" +msgstr "Un éditeur de balises GTK+ pour MP3, OGG, FLAC et plus" + +#: GLIInstallProfile.py:589 +msgid "A GNOME groupware application, a Microsoft Outlook workalike" +msgstr "Un logiciel du groupe GNOME, similaire à Microsoft Outlook" + +#: GLIInstallProfile.py:590 +msgid "GTK+ Instant Messenger client" +msgstr "Un client de messagerie instantanée GTK+" + +#: GLIInstallProfile.py:591 +msgid "GTK+ FTP Client" +msgstr "Client FTP GTK+" + +#: GLIInstallProfile.py:592 +msgid "GNU Image Manipulation Program" +msgstr "Programme de Manipulation d'Images GNU" + +#: GLIInstallProfile.py:593 +msgid "GNOME CD Writing Software" +msgstr "Logiciel GNOME de gravure CD" + +#: GLIInstallProfile.py:594 +msgid "GTK+ application for transferring pictures from a digital camera" +msgstr "Application GTK+ pour le transfert d'images à partir d'appareils photo numérique" + +#: GLIInstallProfile.py:595 +msgid "A SVG based generic vector-drawing program" +msgstr "Un logiciel de dessin vectoriel générique, basé sur le format SVG" + +#: GLIInstallProfile.py:596 +msgid "KDE CD Writing Software" +msgstr "Logiciel KDE de gravure de CD" + +#: GLIInstallProfile.py:597 +msgid "An integrated office suite for KDE, the K Desktop Environment" +msgstr "Une suite bureautique intégrée pour KDE" + +#: GLIInstallProfile.py:598 +msgid "The Mozilla Suite" +msgstr "La suite Mozilla" + +#: GLIInstallProfile.py:599 +msgid "The Mozilla Firefox Web Browser" +msgstr "Le navigateur Mozilla Firefox" + +#: GLIInstallProfile.py:600 +msgid "Thunderbird Mail Client" +msgstr "Client de messagerie Thunderbird" + +#: GLIInstallProfile.py:601 +msgid "Media Player for Linux" +msgstr "Lecteur de média pour Linux" + +#: GLIInstallProfile.py:602 +msgid "OpenOffice.org, a full office productivity suite." +msgstr "OpenOffice.org, une suite de production bureautique complète" + +#: GLIInstallProfile.py:603 +msgid "Same as OpenOffice but a binary package (no compiling!)" +msgstr "Comme OpenOffice mais en paquet binaire (pas de compilation !)" + +#: GLIInstallProfile.py:604 +msgid "GTK news reader" +msgstr "Lecteur de news GTK" + +#: GLIInstallProfile.py:605 +msgid "Music management and playback software for GNOME" +msgstr "Gestionnaire et lecteur de musique pour GNOME" + +#: GLIInstallProfile.py:606 +#, fuzzy +msgid "Open replacement for the Mozilla Suite" +msgstr "Remplacement libre pour la suite Mozilla" + +#: GLIInstallProfile.py:607 +#: GLIInstallProfile.py:608 +msgid "A light weight email client and news reader" +msgstr "Un client email et lecteur de news léger" + +#: GLIInstallProfile.py:609 +msgid "VLC media player - Video player and streamer" +msgstr "Lecteur de média VLC - Lecteur vidéo et streaming" + +#: GLIInstallProfile.py:610 +msgid "GTK+ Graphical IRC Client" +msgstr "Client graphique IRC GTK+" + +#: GLIInstallProfile.py:611 +msgid "Xine movie player" +msgstr "Lecteur vidéo Xine" + +#: GLIInstallProfile.py:612 +msgid "X MultiMedia System" +msgstr "X MultiMedia System, lecteur audio" + +#: GLIInstallProfile.py:613 +msgid "Applications often found on servers." +msgstr "Applications généralement installées sur les serveurs" + +#: GLIInstallProfile.py:614 +msgid "Apache Web Server" +msgstr "Serveur Web Apache" + +#: GLIInstallProfile.py:615 +msgid "The Common Unix Printing System" +msgstr "Common Unix Printing System, le système commun d'impression Unix" + +#: GLIInstallProfile.py:616 +msgid "A highly configurable, drop-in replacement for sendmail" +msgstr "Un remplaçant transparent et hautement configurable pour sendmail" + +#: GLIInstallProfile.py:617 +msgid "Linux kernel (2.4+) firewall, NAT and packet mangling tools" +msgstr "Firewall pour Linux (2.4+), avec outils de NAT et modification de paquets" + +#: GLIInstallProfile.py:618 +msgid "Apache module for PHP" +msgstr "Module Apache pour PHP" + +#: GLIInstallProfile.py:619 +msgid "A fast, multi-threaded, multi-user SQL database server" +msgstr "Un serveur de base de données SQL rapide, multi-tâches et multi-utilisateur" + +#: GLIInstallProfile.py:620 +msgid "The PHP scripting language" +msgstr "Le language de script PHP" + +#: GLIInstallProfile.py:621 +msgid "A fast and secure drop-in replacement for sendmail" +msgstr "Un remplaçant transparent, rapide et sécurisé pour sendmail" + +#: GLIInstallProfile.py:622 +msgid "sophisticated Object-Relational DBMS" +msgstr "SGBD orienté objet sophistiqué" + +#: GLIInstallProfile.py:623 +msgid "ProFTP Server" +msgstr "Serveur ProFTP" + +#: GLIInstallProfile.py:624 +msgid "SAMBA client/server programs for UNIX" +msgstr "Client/serveur SAMBA pour Unix" + +#: GLIInstallProfile.py:625 +msgid "Widely-used Mail Transport Agent (MTA)" +msgstr "Agent de Transport Mail largement utilisé" + +#: GLIInstallProfile.py:626 +msgid "Window managers and X selection." +msgstr "Sélection de gestionnaires de fenêtres et d'applications X" + +#: GLIInstallProfile.py:627 +msgid "The Gnome Desktop Environment" +msgstr "L'environnement de bureau GNOME" + +#: GLIInstallProfile.py:628 +msgid "The K Desktop Environment" +msgstr "L'environnement de bureau K" + +#: GLIInstallProfile.py:629 +msgid "A small, fast, full-featured window manager for X" +msgstr "Un gestionnaire de fenêtres pour X, petit, rapide et complètement configurable" + +#: GLIInstallProfile.py:630 +msgid "Enlightenment Window Manager" +msgstr "Gestionnaire de fenêtres Enlightenment" + +#: GLIInstallProfile.py:631 +#, fuzzy +msgid "Fluxbox is an X11 window manager featuring tabs and an iconbar" +msgstr "Fluxbox est un gestionnaire de fenêtres X11 comportant onglets et barres d'icônes" + +#: GLIInstallProfile.py:632 +msgid "IceWM is designed for speed, size, and simplicity" +msgstr "IceWM est conçu pour être rapide, petit et simple" + +#: GLIInstallProfile.py:633 +msgid "Windowmaker is a window manager featuring the look and feel of NEXTSTEP" +msgstr "Windowmaker est un gestionnaire de fenêtres comportant l'apparence et les sensations de NEXTSTEP" + +#: GLIInstallProfile.py:634 +msgid "XFCE Desktop Environment" +msgstr "Environnement de bureau XFCE" + +#: GLIInstallProfile.py:635 +msgid "An X11 implementation maintained by the X.Org Foundation" +msgstr "Un implémentation X11 maintenue par la fondation X.Org" + +#: GLIInstallProfile.py:636 +msgid "Miscellaneous Applications you may want." +msgstr "Diverses applications que vous voudrez peut-être" + +#: GLIInstallProfile.py:637 +msgid "tool for distributing files via a distributed network of nodes" +msgstr "Outil de distribution de fichiers via un réseau distribué de noeuds" + +#: GLIInstallProfile.py:638 +msgid "GTK+ Web IDE" +msgstr "Environnement de développement Internet GTK+" + +#: GLIInstallProfile.py:639 +msgid "An incredibly powerful, extensible text editor" +msgstr "Un éditeur de texte extensible et incroyablement puissant" + +#: GLIInstallProfile.py:640 +msgid "Single process stack of various system monitors" +msgstr "Pile de différents moniteurs systèmes n'utilisant qu'un seul processus" + +#: GLIInstallProfile.py:641 +msgid "GUI version of the Vim text editor" +msgstr "Éditeur de texte Vim avec interface graphique" + +#: GLIInstallProfile.py:642 +msgid "ssh-agent manager" +msgstr "Gestionnaire ssh-agent" + +#: GLIInstallProfile.py:643 +msgid "Rotates, compresses, and mails system logs" +msgstr "Effectue la rotation, la compression, et l'envoi par mail des journaux système" + +#: GLIInstallProfile.py:644 +msgid "Network Time Protocol suite/programs" +msgstr "Suite de programmes liés au protocole horaire en réseau (NTP)" + +#: GLIInstallProfile.py:645 +msgid "A Remote Desktop Protocol Client" +msgstr "Client Bureau à Distance (RDP : Remote Desktop Protocol)" + +#: GLIInstallProfile.py:646 +msgid "Secure way to index and quickly search for files on your system" +msgstr "Solution sécurisée pour indexer et chercher rapidement les fichiers sur votre système" + +#: GLIInstallProfile.py:647 +msgid "Utility to trace the route of IP packets" +msgstr "Utilitaire pour tracer la route de paquets IP" + +#: GLIInstallProfile.py:648 +msgid "Gentoo Linux USE flags editor" +msgstr "Éditeur de paramètres USE de Gentoo Linux" + +#: GLIInstallProfile.py:649 +msgid "Vim, an improved vi-style text editor" +msgstr "Vim, un éditeur de texte amélioré dans le style de vi" + +#: GLIInstallProfile.py:650 +msgid "A commercial-quality network protocol analyzer" +msgstr "Un analyseur de protocoles réseau de qualité commerciale" + +#: GLIInstallProfile.py:651 +msgid "Applications recommended by the GLI Team." +msgstr "Applications recommandées par l'équipe de l'Installateur Gentoo Linux" + +#: GLIInstallProfile.py:652 +msgid "A versatile IDE for GNOME" +msgstr "Un environement de développement polyvalent pour GNOME" + +#: GLIInstallProfile.py:653 +msgid "a tool to locally check for signs of a rootkit" +msgstr "Un outil pour chercher localement les signes d'un rootkit" + +#: GLIInstallProfile.py:654 +msgid "Addictive OpenGL-based block game" +msgstr "Groupe de jeux OpenGL addictifs" + +#: GLIInstallProfile.py:655 +msgid "The GNU Privacy Guard, a GPL PGP replacement" +msgstr "Le garde de la vie privée GNU, un remplaçant GPL pour PGP" + +#: GLIInstallProfile.py:656 +msgid "Software for generating and retrieving SNMP data" +msgstr "Logiciel permettant de générer et récupérer des données SNMP" + +#: GLIInstallProfile.py:657 +msgid "the network swiss army knife" +msgstr "Le couteau Suisse des réseaux" + +#: GLIInstallProfile.py:658 +msgid "A utility for network exploration or security auditing" +msgstr "Un utilitaire d'exploration de réseaux ou d'audit sécurité" + +#: GLIInstallProfile.py:659 +msgid "full-screen window manager that multiplexes between several processes" +msgstr "Un gestionnaire de fenêtres plein-écran qui permet de multiplexer plusieurs processus" + +#: GLIInstallProfile.py:660 +msgid "An X Viewer for PDF Files" +msgstr "Un lecteur de PDF pour X" + diff --git a/src/fe/dialog/languages/fr/LC_MESSAGES/GLIInstallProfile.mo b/src/fe/dialog/languages/fr/LC_MESSAGES/GLIInstallProfile.mo Binary files differnew file mode 100644 index 0000000..ab523de --- /dev/null +++ b/src/fe/dialog/languages/fr/LC_MESSAGES/GLIInstallProfile.mo diff --git a/src/fe/dialog/languages/fr/LC_MESSAGES/gli-dialog.mo b/src/fe/dialog/languages/fr/LC_MESSAGES/gli-dialog.mo Binary files differnew file mode 100644 index 0000000..b1e7320 --- /dev/null +++ b/src/fe/dialog/languages/fr/LC_MESSAGES/gli-dialog.mo diff --git a/src/fe/dialog/languages/fr/gli-dialog.fr.po b/src/fe/dialog/languages/fr/gli-dialog.fr.po new file mode 100644 index 0000000..9de0ca6 --- /dev/null +++ b/src/fe/dialog/languages/fr/gli-dialog.fr.po @@ -0,0 +1,1717 @@ +msgid "" +msgstr "" +"Project-Id-Version: GLI SUPER\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2007-03-18 02:18+0100\n" +"Last-Translator: Camille Huot <cam@gentoo.org>\n" +"Language-Team: gentoo-doc-fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: French\n" +"X-Poedit-Country: FRANCE\n" + +#: gli-dialog.py:62 +msgid "" +"Welcome to the Gentoo Linux Installer! This program will help install Gentoo on your computer.\n" +"Before proceeding please thoroughly read the Gentoo Installation Handbook available at \n" +"http://www.gentoo.org/doc/en/handbook/index.xml \n" +"\n" +"Press OK to continue" +msgstr "" +"Bienvenue dans l'installateur de Gentoo Linux ! Ce programme vous aidera à installer Gentoo sur votre ordinateur.\n" +"Avant de débuter, veuillez lire complètement le guide d'installation Gentoo disponible sur http://www.gentoo.org/doc/fr/handbook/index.xml \n" +"\n" +"Appuyez sur OK pour continuer" + +#: gli-dialog.py:66 +msgid "Welcome" +msgstr "Bienvenue" + +#: gli-dialog.py:70 +msgid "Standard" +msgstr "Normal" + +#: gli-dialog.py:71 +msgid "Advanced" +msgstr "Avancé" + +#: gli-dialog.py:72 +msgid "" +"This installer has two modes, an advanced mode for those knowledgable with the inner details of their computer and a standard mode where many of the defaults will be chosen for the user for simplicity and to speed up the install process. The advanced mode offers full customizability and is required for generating profiles to be used other computers. \n" +"The advanced mode is recommended by the developers.\n" +"\t\t" +msgstr "" +"Cet installateur a deux modes, un mode avancé pour ceux qui maîtrisent les détails internes de leurs ordinateurs et un mode normal où de nombreuses options seront choisies pour faciliter et accélérer le processus d'installation. Le mode avancé offre une personnalisation complète et permet de générer des profils réutilisables sur d'autres ordinateurs.\n" +"Le mode avancé est recommandé par les développeurs.\n" +"\t\t" + +#: gli-dialog.py:80 +msgid "Do you want to do a networkless installation? This will limit the customizability of your install due to the limitations of the LiveCD. For example, choosing networkless will set your installation stage, portage snapshot, and limit your extra packages selections. NOTE: It is easily possible to do a networkless installation on a machine with an active Internet connection; in fact this may result in the fastest installations for many users." +msgstr "Voulez-vous faire une installation hors-ligne ? Ceci limitera la personnalisation de votre installation aux limitations du LiveCD. Par exemple, choisir une installation hors-ligne fixera le stage installé, l'instantané de Portage et limitera votre sélection de paquets subsidiaires. NOTE : Il est possible de faire une installation hors-ligne même sur une machine reliée à internet ; c'est en réalité la méthode d'installation la plus rapide." + +#: gli-dialog.py:82 +msgid "Networkless" +msgstr "Hors-ligne" + +#: gli-dialog.py:83 +msgid "Internet enabled" +msgstr "Internet activé" + +#: gli-dialog.py:97 +msgid "ERROR: Could not set networkless information in the profile" +msgstr "ERREUR : Impossible de définir les informations Hors-ligne dans le profil" + +#: gli-dialog.py:103 +#: gli-dialog.py:141 +#: gli-dialog.py:204 +#: gli-dialog.py:567 +#: gli-dialog.py:946 +#: gli-dialog.py:1063 +#: gli-dialog.py:1121 +#: gli-dialog.py:1274 +#: gli-dialog.py:1506 +#: gli-dialog.py:1622 +#: gli-dialog.py:1825 +#: gli-dialog.py:1833 +#: gli-dialog.py:1968 +msgid "Yes" +msgstr "Oui" + +#: gli-dialog.py:104 +#: gli-dialog.py:142 +#: gli-dialog.py:205 +#: gli-dialog.py:568 +#: gli-dialog.py:947 +#: gli-dialog.py:1064 +#: gli-dialog.py:1122 +#: gli-dialog.py:1275 +#: gli-dialog.py:1507 +#: gli-dialog.py:1623 +#: gli-dialog.py:1826 +#: gli-dialog.py:1834 +#: gli-dialog.py:1969 +msgid "No" +msgstr "Non" + +#: gli-dialog.py:107 +msgid "" +"\n" +"\tAll of the installation settings are stored in an XML file, which we call the InstallProfile. If you have a previously-created profile, you can load it now\n" +"\tfor use in this installation.\n" +"\tDo you have a previously generated profile for the installer?\n" +"\t" +msgstr "" +"\n" +"\tTous les paramètres d'installation sont stockés dans un fichier XML que nous appelons le profil d'installation (InstallProfile).\n" +"\tSi vous avez déjà créé un profil, vous pouvez le charger maintenant pour l'utiliser dans cette installation.\n" +"\tAvez-vous un profil à donner à l'installateur ?\n" +"\t" + +#: gli-dialog.py:113 +msgid "Enter the filename of the XML file" +msgstr "Entrez le nom du fichier XML" + +#: gli-dialog.py:118 +#, python-format +msgid "Cannot open file %s" +msgstr "Impossible d'ouvrir le fichier %s" + +#: gli-dialog.py:143 +msgid "Do you want debugging output enabled during the install? This is mainly meant to help the developers debug any bugs." +msgstr "Voulez-vous activer le mode debug pour l'installation, dans le but d'aider les développeurs lors de la résolution des bogues." + +#: gli-dialog.py:158 +#: gli-dialog.py:162 +#: gli-dialog.py:365 +#: gli-dialog.py:369 +#: gli-dialog.py:398 +#: gli-dialog.py:402 +#: gli-dialog.py:514 +#: gli-dialog.py:519 +#: gli-dialog.py:837 +#: gli-dialog.py:844 +#: gli-dialog.py:848 +#: gli-dialog.py:919 +#: gli-dialog.py:924 +#: gli-dialog.py:1011 +#: gli-dialog.py:1016 +#: gli-dialog.py:1043 +#: gli-dialog.py:1047 +#: gli-dialog.py:1215 +#: gli-dialog.py:1218 +#: gli-dialog.py:1565 +#: gli-dialog.py:1573 +#: gli-dialog.py:1787 +#: gli-dialog.py:1797 +msgid "Other" +msgstr "Autre" + +# vos propres quoi ? +#: gli-dialog.py:158 +#: gli-dialog.py:1215 +msgid "Type your own." +msgstr "Entrez le nom." + +#: gli-dialog.py:159 +msgid "In order to complete most installs, an active Internet connection is required. Listed are the network devices already detected. In this step you will need to setup one network connection for GLI to use to connect to the Internet. If your desired device does not show up in the list, you can select Other and input the device name manually." +msgstr "Afin de procéder à cette installation, une connexion à Internet est requise. Vous trouverez ici les périphériques réseaux déjà détectés. Vous devez maintenant configurer une connexion afin que GLI puisse se connecter à Internet. Si votre périphérique n'apparaît pas dans la liste, vous pouvez sélectionner Autre et entrer le nom du périphérique manuellement." + +#: gli-dialog.py:163 +msgid "Enter the interface (NIC) you would like to use for installation (e.g. eth0):" +msgstr "Entrez le nom de l'interface réseau que vous souhaitez utiliser pour l'installation (ex : eth0) :" + +#: gli-dialog.py:170 +#: gli-dialog.py:1228 +#: gli-dialog.py:1253 +msgid "DHCP" +msgstr "DHCP" + +#: gli-dialog.py:171 +#: gli-dialog.py:1229 +#: gli-dialog.py:1254 +msgid "Static IP/Manual" +msgstr "IP Statique/Manuel" + +#: gli-dialog.py:172 +#: gli-dialog.py:1193 +msgid "" +"To setup your network interface, you can either use DHCP if enabled, or manually enter your network information.\n" +" DHCP (Dynamic Host Configuration Protocol) makes it possible to automatically receive networking information (IP address, netmask, broadcast address, gateway, nameservers etc.). This only works if you have a DHCP server in your network (or if your provider provides a DHCP service). If you do not, you must enter the information manually. Please select your networking configuration method:" +msgstr "" +"Pour configurer votre interface réseau, vous pouvez soit utiliser le DHCP s'il est activé, soit entrer manuellement vos informations réseau.\n" +"Le DHCP (Dynamic Host Configuration Protocol) permet de recevoir automatiquement les informations du réseau (adresse IP, masque réseau, adresse de diffusion, passerelle, serveurs de noms, etc.). Ceci fonctionne uniquement si vous avez un serveur DHCP dans votre réseau (ou si votre fournisseur propose un service DHCP). Si vous n'en avez pas, vous devez entrer les informations manuellement. Sélectionnez votre méthode de configuration du réseau :" + +#: gli-dialog.py:176 +#: gli-dialog.py:1233 +#: gli-dialog.py:1258 +msgid "If you have any additional DHCP options to pass, type them here in a space-separated list. If you have none, just press Enter." +msgstr "Si vous avez des options additionnelles à transmettre au DHCP, entrez-les ici, séparées par des espaces. Sinon, appuyez simplement sur Entrée." + +#: gli-dialog.py:179 +msgid "Enter your networking information: (See Chapter 3 of the Handbook for more information) Your broadcast address is probably your IP address with 255 as the last tuple. DO NOT PRESS ENTER until all fields you intend to fill out are complete!" +msgstr "Entrez les informations de votre réseau (voir le chapitre 3 du Manel Gentoo pour plus d'informations) : Votre adresse de diffusion est probablement votre adresse IP avec 255 comme dernier nombre. N'APPUYEZ PAS SUR ENTRÉE avant que tous les champs que vous comptez remplir ne le soient !" + +#: gli-dialog.py:180 +#: gli-dialog.py:1238 +#: gli-dialog.py:1263 +msgid "Enter your IP address:" +msgstr "Entrez votre adresse IP :" + +#: gli-dialog.py:181 +#: gli-dialog.py:1239 +#: gli-dialog.py:1264 +msgid "Enter your Broadcast address:" +msgstr "Entrez votre adresse de diffusion :" + +#: gli-dialog.py:182 +#: gli-dialog.py:1240 +#: gli-dialog.py:1265 +msgid "Enter your Netmask:" +msgstr "Entrez votre masque réseau :" + +#: gli-dialog.py:183 +msgid "Enter your default gateway:" +msgstr "Entrez votre passerelle par défaut :" + +#: gli-dialog.py:184 +msgid "Enter a DNS server:" +msgstr "Entrez un serveur DNS :" + +#: gli-dialog.py:185 +#: gli-dialog.py:1326 +msgid "Enter a HTTP Proxy IP:" +msgstr "Entrez une adresse IP de proxy HTTP :" + +#: gli-dialog.py:186 +#: gli-dialog.py:1327 +msgid "Enter a FTP Proxy IP:" +msgstr "Entrez une adresse IP de proxy FTP :" + +#: gli-dialog.py:187 +#: gli-dialog.py:1328 +msgid "Enter a RSYNC Proxy:" +msgstr "Entrez un le nom d'un proxy RSYNC :" + +#: gli-dialog.py:197 +msgid "Sorry, but the network could not be set up successfully. Please configure yourself manually and restart the installer." +msgstr "Désolé, mais le réseau n'a pas pu être correctement configuré. Veuillez le configurer vous-même manuellement et redémarrer l'installateur." + +#: gli-dialog.py:199 +msgid "ERROR! Could not setup networking!" +msgstr "ERREUR ! Impossible d'établir le réseau !" + +#: gli-dialog.py:207 +msgid "Do you want SSH enabled during the install? This will allow you to login remotely during the installation process. If choosing Yes, be sure you select a new LiveCD root password!" +msgstr "Voulez-vous activer SSH durant l'installation ? Ceci vous permettra de vous connecter à distance pendant le processus d'installation. Si vous choisissez Oui, n'oubliez pas de changer le mot de passe root du LiveCD !" + +#: gli-dialog.py:211 +msgid "ERROR! : Could not start the SSH daemon!" +msgstr "ERREUR ! Impossible de démarrer le démon SSH !" + +#: gli-dialog.py:219 +msgid "" +"If you want to be able to login to your machine from another console during the installation,\n" +"\tyou will want to enter a new root password for the LIVECD.\n" +"\tNote that this can be different from your new system's root password.\n" +"\tPresss Enter twice to skip this step.\n" +"\tEnter the new LIVECD root password (will not be echoed):\t" +msgstr "" +"\tSi vous voulez vous connecter à votre machine depuis un autre terminal pendant l'installation, vous devrez entrer un nouveau mot de passe root pour le LiveCD. Notez que celui-ci peut être différent du mot de passe root de votre nouveau système.\n" +"\tAppuyez sur Entrée deux fois pour sauter cette étape.\n" +"\tEntrez le nouveau mot de passe root pour le LiveCD (il ne sera pas affiché) :\t" + +#: gli-dialog.py:227 +msgid "Enter the new LIVECD root password again to verify:" +msgstr "Entrez-le à nouveau pour vérification :" + +#: gli-dialog.py:231 +msgid "The passwords do not match. Please try again." +msgstr "Les mots de passes ne correspondent pas. Veuillez réessayer." + +#: gli-dialog.py:239 +msgid "ERROR! Could not hash the root password on the LiveCD!" +msgstr "ERREUR ! Impossible de hacher le mot de passe root pour le LiveCD !" + +#: gli-dialog.py:248 +msgid "ERROR! Could not set the root password on the livecd environment!" +msgstr "ERREUR ! Impossible de définir le mot de passe root dans l'environnement du LiveCD !" + +#: gli-dialog.py:255 +msgid "" +"Here is a list of modules currently loaded on your machine.\n" +" Please look through and see if any modules are missing\n" +" that you would like loaded.\n" +"\n" +msgstr "" +"Voici une liste des modules actuellement chargés sur votre machine.\n" +"Veuillez la parcourir et voir s'il manque un module que vous voudriez charger.\n" +"\n" + +#: gli-dialog.py:256 +msgid "Continue" +msgstr "Continuer" + +#: gli-dialog.py:257 +msgid "Loaded Modules" +msgstr "Modules chargés" + +#: gli-dialog.py:258 +msgid "If you have additional modules you would like loaded before the installation begins (ex. a network driver), enter them in a space-separated list." +msgstr "Si vous souhaitez charger des modules supplémentaires avant le début de l'installation (ex : un pilote réseau), entrez les noms des modules séparés par des espaces." + +#: gli-dialog.py:272 +#, python-format +msgid "ERROR! : Could not load module: %s " +msgstr "ERREUR ! Impossible de charger le module : %s" + +#: gli-dialog.py:277 +msgid "ERROR!: An unknown error occurred during modprobing the modules. Please load them manually and then restart the installer." +msgstr "ERREUR ! Une erreur inconnue est apparue lors du chargement des modules. Rechargez-les manuellement puis relancez l'installateur." + +#: gli-dialog.py:304 +#: gli-dialog.py:312 +#: gli-dialog.py:1200 +#: gli-dialog.py:1208 +msgid "Add" +msgstr "Ajouter" + +#: gli-dialog.py:304 +msgid "Define a new mountpoint" +msgstr "Définir un nouveau point de montage" + +#: gli-dialog.py:305 +msgid "Please define the mountpoints of your partitions for the new system. At minimum, a / mountpoint must be defined. Defining /boot and /home mountpoints is recommended." +msgstr "Veuillez définir les points de montage de vos partitions pour le nouveau système. Au minimum, un point de montage / doit être défini. Il est recommandé de définir les points de montage /boot et /home." + +#: gli-dialog.py:305 +#: gli-dialog.py:557 +#: gli-dialog.py:1201 +#: gli-dialog.py:1459 +#: gli-dialog.py:1610 +#: gli-dialog.py:1725 +msgid "Save and Continue" +msgstr "Enregistrer et continuer" + +# Erreur dans version EN +#: gli-dialog.py:310 +msgid "ERROR: Could net set mounts!" +msgstr "ERREUR : Impossible de configurer les points de montage !" + +#: gli-dialog.py:328 +#: gli-dialog.py:467 +#: gli-dialog.py:530 +msgid "Logical (" +msgstr "Logique (" + +#: gli-dialog.py:330 +#: gli-dialog.py:469 +#: gli-dialog.py:532 +msgid "Primary (" +msgstr "Primaire (" + +# Doute +#: gli-dialog.py:346 +msgid "Select a Partition to define a mountpoint for" +msgstr "Sélectionner une partition pour laquelle définir un point de montage" + +#: gli-dialog.py:366 +#, python-format +msgid "Choose a mountpoint from the list or choose Other to type your own for partition %s. " +msgstr "Choisissez un point de montage depuis la liste pour %s ou choisissez Autre pour le nommer vous-même." + +#: gli-dialog.py:370 +#: gli-dialog.py:403 +#, python-format +msgid "Enter a mountpoint for partition %s" +msgstr "Entrez un point de montage pour la partition %s" + +#: gli-dialog.py:375 +#: gli-dialog.py:415 +#, python-format +msgid "Enter mount options for mountpoint %s. Leave blank for defaults" +msgstr "Entrez les options pour le point de montage %s. Laissez vide pour utiliser les réglages par défaut." + +#: gli-dialog.py:389 +#: gli-dialog.py:397 +msgid "Change Mountpoint" +msgstr "Changer le point de montage" + +#: gli-dialog.py:390 +#: gli-dialog.py:406 +msgid "Change Filesystem Type" +msgstr "Changer le type de système de fichiers" + +#: gli-dialog.py:391 +#: gli-dialog.py:414 +msgid "Change Mountoptions" +msgstr "Changer les options de montage" + +#: gli-dialog.py:392 +#: gli-dialog.py:419 +msgid "Delete This Mountpoint" +msgstr "Supprimer ce point de montage" + +#: gli-dialog.py:393 +#, python-format +msgid "Select an option for device %(dev)s : Mountpoint: %(mt)s, Type: %(type)s, Options: %(opt)s" +msgstr "Sélectionnez une option pour le périphérique %(dev)s : Point de montage : %(mt)s, Type : %(type)s, Options : %(opt)s" + +#: gli-dialog.py:399 +#, python-format +msgid "Choose a mountpoint from the list or choose Other to type your own for partition %(part)s. Current mountpoint is: %(mt)s" +msgstr "Choisissez un point de montage depuis la liste pour %(part)s ou choisissez Autre pour le nommer vous-même. Point de montage actuel : %(mt)s" + +#: gli-dialog.py:409 +#, python-format +msgid "Select the filesystem for partition %(part)s. It is currently %(fs)s." +msgstr "Sélectionnez le système de fichiers pour la partition %(part)s. Pour l'instant %(fs)s." + +#: gli-dialog.py:423 +msgid "" +"The first thing on the new system to setup is the partitoning.\n" +"\tYou will first select a drive and then edit its partitions.\n" +"\tWARNING: CHANGES ARE MADE IMMEDIATELY TO DISK. BE CAREFUL\n" +"\tNOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION \"/\"\n" +"\tIf your drive is pre-partitioned, just select the mountpoints and make \n" +"\tsure that the format option is set to FALSE or it will erase your data.\n" +"\tThe installer does not yet support resizing of partitions (its not safe).\n" +"\tWhen in doubt, **Partition it yourself and then re-run the installer**\n" +"\tPlease refer to the Gentoo Installation Handbook for more information\n" +"\ton partitioning and the various filesystem types available in Linux." +msgstr "" +"\tLa première chose à faire pour installer le système est le partitionnement.\n" +"\tChoisissez d'abord un disque, puis éditez ses partitions.\n" +"\tATTENTION : LES CHANGEMENTS SONT RÉALISÉS IMMÉDIATEMENT SUR LE DISQUE. SOYEZ PRUDENT.\n" +"\tNOTE : VOUS DEVEZ SÉLECTIONNER AU MOINS UNE PARTITION COMME PARTITION ROOT « / »\n" +"\tSi votre disque est déjà partitionné, sélectionnez uniquement les points de montage et assurez-vous que l'option « format » est sur FALSE ou bien cela supprimera vos données.\n" +"\tL'installateur ne supporte pas le redimensionnement de partitions (ce n'est pas fiable pour l'instant).\n" +"\tEn cas de doute, **Partitionnez votre disque vous-même et relancez l'installateur**.\n" +"\tVeuillez vous référer au guide d'installation Gentoo pour plus d'informations sur le partitionnement et les différents systèmes de fichiers disponible pour Linux." + +#: gli-dialog.py:446 +msgid "" +"Which drive would you like to partition?\n" +" Info provided: Type, Size in MB" +msgstr "" +"Quel disque souhaitez-vous partitionner ?\n" +"Informations données : Type, Taille en Mo" + +#: gli-dialog.py:446 +#: gli-dialog.py:845 +#: gli-dialog.py:880 +#: gli-dialog.py:1012 +msgid "Done" +msgstr "Terminé" + +#: gli-dialog.py:456 +msgid " - Unallocated space (" +msgstr " - Espace non alloué (" + +#: gli-dialog.py:458 +msgid "logical, " +msgstr "logique," + +#: gli-dialog.py:462 +msgid " - Extended Partition (" +msgstr " - Partition étendue (" + +#: gli-dialog.py:474 +#: gli-dialog.py:480 +msgid "Set Recommended Layout" +msgstr "Utiliser la disposition recommandée" + +#: gli-dialog.py:475 +#: gli-dialog.py:485 +msgid "Clear Partitions On This Drive." +msgstr "Effacer les partitions de ce disque." + +#: gli-dialog.py:476 +msgid "" +"Select a partition or unallocated space to edit\n" +"Key: Minor, Pri/Ext, Filesystem, Size." +msgstr "" +"Sélectionnez une partition ou un espace non alloué à éditer.\n" +"Clé : Mineure, Primaire/Étendue, Système de fichiers, Taille." + +#: gli-dialog.py:476 +#: gli-dialog.py:536 +#: gli-dialog.py:584 +#: gli-dialog.py:625 +#: gli-dialog.py:1761 +msgid "Back" +msgstr "Retour" + +#: gli-dialog.py:481 +msgid "This will ERASE YOUR DRIVE and apply a recommended layout. Are you sure you wish to do this?" +msgstr "Ceci EFFACERA VOTRE DISQUE et appliquera une disposition recommandée. Êtes-vous sûr de vouloir continuer ?" + +#: gli-dialog.py:482 +msgid "This is your last chance. Are you SURE you want to CLEAR this drive and set a recommended layout? THERE IS NO TURNING BACK IF YOU SELECT YES." +msgstr "Ceci est votre dernière chance. Êtes-vous SÛR de vouloir EFFACER ce disque afin d'appliquer une répartition recommandée ? IL N'Y AURA PAS DE RETOUR EN ARRIÈRE POSSIBLE SI VOUS SÉLECTIONNEZ OUI." + +#: gli-dialog.py:486 +msgid "This will remove all partitions on your drive. Are you sure you wish to do this?" +msgstr "Ceci supprimera toutes les partitions de votre disque. Êtes-vous sûr de vouloir continuer ?" + +#: gli-dialog.py:487 +msgid "This is your last chance. Are you SURE you want to CLEAR this drive? THIS WILL DELETE ANY DATA ON THE DRIVE!" +msgstr "Ceci est votre dernière chance. Êtes vous SÛR de vouloir EFFACER ce disque ? CELA SUPPRIMERA TOUTE DONNÉE PRÉSENTE SUR LE DISQUE !" + +#: gli-dialog.py:499 +#, python-format +msgid "Enter the size of the new partition in MB (max %s MB). If creating an extended partition input its entire size (not just the first logical size):" +msgstr "Entrez la taille de la nouvelle partition en Mo (max %s Mo). Si vous êtes en train de créer une partition étendue, entrez sa taille entière (pas seulement la taille de la première partition logique) :" + +#: gli-dialog.py:502 +#, python-format +msgid "The size you entered (%(entered)s MB) is larger than the maximum of %(max)s MB" +msgstr "La taille que vous avez entré (%(entered)s Mo) est plus grande que le maximum de %(max)s Mo." + +#: gli-dialog.py:505 +msgid "Old, stable, but no journaling" +msgstr "Ancien, stable, mais pas de journal" + +#: gli-dialog.py:506 +msgid "ext2 with journaling and b-tree indexing (RECOMMENDED)" +msgstr "ext2 avec journal et indexation b-tree (RECOMMANDÉ)" + +#: gli-dialog.py:507 +msgid "Swap partition for memory overhead" +msgstr "Partition de mémoire virtuelle (swap)" + +#: gli-dialog.py:508 +msgid "Windows filesystem format used in Win9X and XP" +msgstr "Système de fichiers Windows utilisé par Win9X et XP" + +#: gli-dialog.py:512 +msgid "B*-tree based filesystem. great performance. Only V3 supported." +msgstr "Système de fichiers basé sur du B*-tree. Excellentes performances. Seule la V3 est supportée." + +#: gli-dialog.py:513 +msgid "Create an extended partition containing other logical partitions" +msgstr "Créer une partition étendue contenant des lecteurs logiques." + +#: gli-dialog.py:514 +msgid "Something else we probably don't support." +msgstr "Quelque chose d'autre que nous ne supportons probablement pas." + +#: gli-dialog.py:515 +msgid "Choose the filesystem type for this new partition." +msgstr "Choisissez le système de fichiers pour cette nouvelle partition." + +#: gli-dialog.py:520 +msgid "Please enter the new partition's type:" +msgstr "Veuillez entrer le nouveau type de la partition :" + +#: gli-dialog.py:535 +#: gli-dialog.py:539 +#: gli-dialog.py:1249 +#: gli-dialog.py:1760 +#: gli-dialog.py:1823 +msgid "Delete" +msgstr "Supprimer" + +# ordre des mots ? +#: gli-dialog.py:535 +#: gli-dialog.py:545 +msgid "Extra mkfs.* Parameters" +msgstr "Paramètres supplémentaires pour la commande mkfs.*" + +#: gli-dialog.py:540 +msgid "Are you sure you want to delete the partition " +msgstr "Êtes-vous sûr de vouloir supprimer la partition ?" + +#: gli-dialog.py:546 +msgid "This feature is coming soon. Please go to console and do it yourself for now." +msgstr "Cette fonctionnalité arrive bientôt. Allez dans un terminal et faites-le vous-même pour l'instant." + +#: gli-dialog.py:555 +#: gli-dialog.py:565 +msgid "Add a new network mount" +msgstr "Ajouter un nouveau montage réseau" + +#: gli-dialog.py:557 +msgid "If you have any network shares you would like to mount during the install and for your new system, define them here. Select a network mount to edit or add a new mount. Currently GLI only supports NFS mounts." +msgstr "Si vous souhaitez monter un quelconque partage réseau pendant l'installation et pour votre nouveau système, définissez-le ici. Sélectionnez un montage réseau à éditer ou ajoutez un nouveau point de montage. L'installateur Gentoo actuel supporte uniquement les points de montages NFS." + +#: gli-dialog.py:562 +msgid "ERROR: Could net set network mounts!" +msgstr "ERREUR : Impossible de définir les montages réseaux !" + +#: gli-dialog.py:569 +msgid "Do you want to start portmap to be able to search for NFS mounts?" +msgstr "Voulez-vous démarrer portmap pour être capable de rechercher les montages NFS ?" + +#: gli-dialog.py:572 +msgid "ERROR: Could not start portmap!" +msgstr "ERREUR : Impossible de démarrer portmap !" + +#: gli-dialog.py:574 +msgid "Enter NFS mount or just enter the IP/hostname to search for available mounts" +msgstr "Entrez le montage NFS ou juste l'adresse IP/nom de l'hôte pour chercher les montages disponibles." + +#: gli-dialog.py:582 +msgid "No NFS exports were detected on " +msgstr "Aucun export NFS n'a été détecté sur " + +#: gli-dialog.py:584 +msgid "Select a NFS export" +msgstr "Sélectionnez un export NFS" + +#: gli-dialog.py:589 +#, python-format +msgid "The address you entered, %s, is not a valid IP or hostname. Please try again." +msgstr "L'adresse que vous avez entré, %s, n'est pas une adresse IP ou un nom d'hôte valide. Veuillez réessayer." + +#: gli-dialog.py:598 +msgid "There is already an entry for " +msgstr "Il y a déjà une entrée pour " + +#: gli-dialog.py:610 +msgid "Enter a mountpoint" +msgstr "Entrez un point de montage" + +#: gli-dialog.py:613 +msgid "Enter mount options" +msgstr "Entrez les options de montage" + +#: gli-dialog.py:623 +msgid "Stage3 is a basic system that has been built for you (no compiling)." +msgstr "Le stage3 est un système de base qui a été construit pour vous (pas de compilation)." + +#: gli-dialog.py:624 +msgid "A Stage3 install but using binaries from the LiveCD when able." +msgstr "Une installation stage3 qui utilise des binaires depuis le LiveCD s'ils sont disponibles." + +#: gli-dialog.py:625 +msgid "Which stage do you want to start at?" +msgstr "À quelle stage voulez-vous démarrer ?" + +#: gli-dialog.py:629 +msgid "WARNING: Since you are doing a GRP install it is HIGHLY recommended you choose Create from CD to avoid a potentially broken installation." +msgstr "ATTENTION : Puisque vous faites une installation GRP, il vous est FORTEMENT recommandé de choisir « Créer depuis le CD » pour éviter une installation potentiellement ratée." + +#: gli-dialog.py:633 +#: gli-dialog.py:638 +msgid "ERROR! Could not set install stage!" +msgstr "ERREUR ! Impossible de définir le stage d'installation !" + +#: gli-dialog.py:642 +msgid "Create from CD" +msgstr "Créer depuis le CD" + +#: gli-dialog.py:643 +msgid "Specify URI" +msgstr "Spécifier une URI" + +#: gli-dialog.py:644 +msgid "Do you want to generate a stage3 on the fly using the files on the LiveCD (fastest) or do you want to grab your stage tarball from the Internet?\n" +msgstr "Voulez-vous générer un stage3 à la volée en utilisant les fichiers du LiveCD (le plus rapide) ou voulez-vous obtenir votre archive de stage depuis Internet ?\n" + +#: gli-dialog.py:649 +msgid "ERROR: Could not set the stage tarball URI!" +msgstr "ERREUR : Impossible de définir l'URI de l'archive du stage !" + +#: gli-dialog.py:664 +msgid "Select a mirror to grab the tarball from or select Cancel to enter an URI manually." +msgstr "Sélectionnez un miroir duquel obtenir l'archive du stage ou sélectionnez Annuler pour entrer une URI manuellement." + +#: gli-dialog.py:670 +msgid "Select your desired stage tarball:" +msgstr "Sélectionnez l'archive du stage de votre choix :" + +#: gli-dialog.py:681 +msgid "Specify the stage tarball URI or local file:" +msgstr "Spécifiez l'URI de l'archive du stage ou le fichier local :" + +#: gli-dialog.py:687 +#: gli-dialog.py:720 +#: gli-dialog.py:1076 +msgid "The specified URI is invalid. It was not saved. Please go back and try again." +msgstr "L'URI spécifiée est invalide. Elle n'a pas été sauvée. Veuillez retourner en arrière et réessayer." + +#: gli-dialog.py:689 +msgid "No URI was specified!" +msgstr "Aucune URI n'a été spécifiée !" + +#: gli-dialog.py:699 +msgid "ERROR! Could not set the portage cd snapshot URI!" +msgstr "ERREUR ! Impossible de définir l'URI de l'instantané du CD Portage." + +#: gli-dialog.py:703 +msgid "Normal. Use emerge sync RECOMMENDED!" +msgstr "Normal. L'utilisation d'emerge sync est RECOMMANDÉ !" + +#: gli-dialog.py:704 +msgid "HTTP daily snapshot. Use when rsync is firewalled." +msgstr "Instantané quotidien HTTP. Utilisé quand rsync est bloqué par le pare-feu." + +#: gli-dialog.py:705 +msgid "Use a portage snapshot, either a local file or a URL" +msgstr "Utiliser un instantané de Portage, soit un fichier local, soit une URL." + +#: gli-dialog.py:706 +msgid "Extra cases such as if /usr/portage is an NFS mount" +msgstr "Cas supplémentaires comme quand /usr/portage est un montage NFS" + +#: gli-dialog.py:707 +msgid "Which method do you want to use to sync the portage tree for the installation? If choosing a snapshot you will need to provide the URI for the snapshot if it is not on the livecd." +msgstr "Quelle méthode voulez-vous utiliser pour synchroniser l'arbre de Portage de l'installation ? Si vous choisissez un instantané, vous devrez fournir son URI s'il n'est pas sur le LiveCD." + +#: gli-dialog.py:716 +msgid "Enter portage tree snapshot URI" +msgstr "Entrez l'URI de l'instantané de l'arbre de Portage" + +#: gli-dialog.py:725 +msgid "No URI was specified! Returning to default emerge sync." +msgstr "Aucune URI n'a été spécifiée ! Retour au réglage par défaut : emerge sync." + +#: gli-dialog.py:742 +msgid "" +"The installer will now gather information regarding the contents of /etc/make.conf\n" +"\tOne of the unique (and best) features of Gentoo is the ability to\n" +"\tdefine flags (called USE flags) that define what components are \n" +"\tcompiled into applications. For example, you can enable the alsa\n" +"\tflag and programs that have alsa capability will use it. \n" +"\tThe result is a finely tuned OS with no unnecessary components to\n" +"\tslow you down.\n" +"\tThe installer divides USE flag selection into two screens, one for\n" +"\tglobal USE flags and one for local flags specific to each program.\n" +"\tPlease be patient while the screens load. It may take awhile." +msgstr "" +"\tL'installateur va maintenant recueillir les informations relatives au contenu du fichier /etc/make.conf.\n" +"\tUne des fonctionnalités uniques (et la meilleure) de Gentoo est son utilisation des paramètres USE, qui déterminent quels composants sont compilés dans les applications. Par exemple, vous pouvez activer le paramètre alsa et alors les programmes qui ont la capacité alsa l'utiliseront.\n" +"\tLe résultat est un système d'exploitation finement adapté sans composant inutile pour vous ralentir.\n" +"\tL'installateur divise la sélection des paramètres USE en deux écrans, un pour les paramètres globaux et un pour les paramètres locaux spécifiques à chaque programme.\n" +"\tSoyez patient pendant le chargement. Cela peut prendre un moment." + +#: gli-dialog.py:781 +msgid "Choose which *global* USE flags you want on the new system" +msgstr "Choisissez quels paramètres USE *globaux* vous voulez sur le nouveau système" + +#: gli-dialog.py:789 +msgid "Choose which *local* USE flags you want on the new system" +msgstr "Choisissez quels paramètres USE *locaux* vous voulez sur le nouveau système" + +#: gli-dialog.py:822 +msgid "Stable" +msgstr "Stable" + +#: gli-dialog.py:823 +msgid "Unstable" +msgstr "Instable" + +#: gli-dialog.py:824 +#, python-format +msgid "Do you want to run the normal stable portage tree, or the bleeding edge unstable (i.e. ACCEPT_KEYWORDS=%s)? If unsure select stable. Stable is required for GRP installs." +msgstr "Voulez-vous utiliser la branche stable de Portage (recommandé) ou la branche instable (ex : ACCEPT_KEYWORDS=%s) ? Dans le doute, choisissez stable. La version stable est requise pour les installations GRP." + +#: gli-dialog.py:831 +#: gli-dialog.py:839 +msgid "Edit your C Flags and Optimization level" +msgstr "Éditez vos paramètres C et votre niveau d'optimisation" + +#: gli-dialog.py:832 +msgid "Change the Host Setting" +msgstr "Changer les paramètres de l'hôte" + +#: gli-dialog.py:833 +#: gli-dialog.py:840 +msgid "Specify number of parallel makes (-j) to perform." +msgstr "Spécifiez le nombre de makes (-j) à effectuer en parallèle." + +#: gli-dialog.py:834 +#: gli-dialog.py:841 +msgid "Change portage functionality settings. (distcc/ccache)" +msgstr "Changer les options fonctionnelles de Portage (distcc/ccache)" + +#: gli-dialog.py:835 +#: gli-dialog.py:842 +msgid "Specify mirrors to use for source retrieval." +msgstr "Spécifier les miroirs à utiliser pour la récupération des sources." + +#: gli-dialog.py:836 +#: gli-dialog.py:843 +msgid "Specify server used by rsync to sync the portage tree." +msgstr "Spécifier le serveur utilisé par rsync pour la synchronisation de l'arbre de Portage." + +#: gli-dialog.py:837 +#: gli-dialog.py:844 +msgid "Specify your own variable and value." +msgstr "Spécifiez votre propre variable et sa valeur." + +#: gli-dialog.py:845 +msgid "For experienced users, the following /etc/make.conf variables can also be defined. Choose a variable to edit or Done to continue." +msgstr "Pour les utilisateurs expérimentés, les variables suivantes du fichier /etc/make.conf peuvent aussi êtres définies. Choisissez une variable à éditer ou Terminé pour continuer." + +#: gli-dialog.py:849 +msgid "Enter the variable name: " +msgstr "Entrez le nom de la variable :" + +#: gli-dialog.py:856 +#: gli-dialog.py:886 +#: gli-dialog.py:933 +msgid "Enter new value for " +msgstr "Entrez la valeur pour " + +#: gli-dialog.py:871 +#: gli-dialog.py:883 +msgid "CLEAR" +msgstr "EFFACER" + +#: gli-dialog.py:871 +msgid "Erase the current value and start over." +msgstr "Effacer la valeur actuelle et recommencer." + +#: gli-dialog.py:872 +msgid "Add a CPU optimization (deprecated in GCC 3.4)" +msgstr "Ajouter une optimisation de CPU (déprécié dans GCC 3.4)" + +#: gli-dialog.py:873 +msgid "Add a CPU optimization (GCC 3.4+)" +msgstr "Ajouter une optimisation de CPU (GCC 3.4+)" + +#: gli-dialog.py:874 +msgid "Add an Architecture optimization" +msgstr "Ajoute une optimisation d'architecture" + +#: gli-dialog.py:875 +msgid "Add optimization level (please do NOT go over 2)" +msgstr "Ajouter un niveau d'optimisation (merci de ne PAS dépasser 2)" + +#: gli-dialog.py:876 +msgid "For advanced users only." +msgstr "Pour les utilisateurs avancés uniquement." + +#: gli-dialog.py:877 +msgid "Common additional flag" +msgstr "Paramètres additionnels communs" + +# correspond à ajouter un paquet : Manuellement +# Manuel n'aurais aucun sens, à vérifier avec contextes +#: gli-dialog.py:878 +#: gli-dialog.py:885 +#: gli-dialog.py:1455 +#: gli-dialog.py:1473 +msgid "Manual" +msgstr "Manuellement" + +#: gli-dialog.py:878 +msgid "Specify your CFLAGS manually" +msgstr "Spécifier vos CFLAGS manuellement" + +#: gli-dialog.py:880 +msgid "Choose a flag to add to the CFLAGS variable or Done to go back. The current value is: " +msgstr "Choisir un paramètre à ajouter à la variable CFLAGS ou Terminé pour retourner en arrière. La valeur actuelle est : " + +#: gli-dialog.py:891 +#, python-format +msgid "Enter the new value for %s (value only):" +msgstr "Entrez la nouvelle valeur pour %s (uniquement la valeur) :" + +#: gli-dialog.py:902 +msgid "Choose from the available CHOSTs for your architecture." +msgstr "Choisir depuis les CHOST disponibles pour votre architecture" + +#: gli-dialog.py:908 +msgid "Presently the only use is for specifying the number of parallel makes (-j) to perform. The suggested number for parallel makes is CPUs+1. Enter the NUMBER ONLY:" +msgstr "Actuellement, la seule utilisation est pour spécifier le nombre de makes (-j) à faire en parallèle. Le nombre suggéré pour les actions parallèles est NOMBRE_CPU+1. Entrez le NOMBRE UNIQUEMENT :" + +#: gli-dialog.py:914 +msgid "enables sandboxing when running emerge and ebuild." +msgstr "Active le bac à sable lors du lancement des commandes emerge et ebuild." + +#: gli-dialog.py:915 +msgid "enables ccache support via CC." +msgstr "Active le support de ccache via CC." + +#: gli-dialog.py:916 +msgid "enables distcc support via CC." +msgstr "Active le support de distcc via CC." + +#: gli-dialog.py:917 +msgid "enables distfiles locking using fcntl or hardlinks." +msgstr "Active le verrouillage des fichiers d'archives en utilisant fcntl ou les liens durs" + +#: gli-dialog.py:918 +msgid "create binaries of all packages emerged" +msgstr "Crée les binaires de tous les paquets installés" + +#: gli-dialog.py:919 +msgid "Input your list of FEATURES manually." +msgstr "Entrez votre liste de FEATURES manuellement." + +#: gli-dialog.py:920 +msgid "FEATURES are settings that affect the functionality of portage. Most of these settings are for developer use, but some are available to non-developers as well." +msgstr "Les FEATURES sont des réglages qui affectent la fonctionnement de Portage. La majorité de ces réglages sont utilisés par les développeurs, mais une partie sont aussi disponibles pour les non-développeurs." + +#: gli-dialog.py:925 +msgid "Enter the value of FEATURES: " +msgstr "Entrez la valeur de FEATURES :" + +#: gli-dialog.py:942 +#: gli-dialog.py:999 +msgid "ERROR! Could not set the make_conf correctly!" +msgstr "ERREUR ! Impossible de définir le make_conf correctement !" + +#: gli-dialog.py:948 +msgid "Do you want to use distcc to compile your extra packages during the install and for future compilations as well?" +msgstr "Voulez-vous utiliser distcc pour compiler vos paquets supplémentaires pendant l'installation et pour les compilations futures ?" + +#: gli-dialog.py:963 +#: gli-dialog.py:1517 +#: gli-dialog.py:1582 +msgid "ERROR! Could not set the services list." +msgstr "ERREUR ! Impossible de définir la liste des services." + +#: gli-dialog.py:969 +msgid "ERROR! Could not set the install distcc flag!" +msgstr "ERREUR ! Impossible de définir les paramètres d'installation de distcc !" + +#: gli-dialog.py:990 +msgid "" +"Enter the hosts to be used by distcc for compilation:\n" +"Example: localhost 192.168.0.2 192.168.0.3:4000/10" +msgstr "" +"Entrer les hôtes qui seront utilisés par distcc pour la compilation :\n" +"Exemple: localhost 192.168.0.2 192.168.0.3:4000/10" + +#: gli-dialog.py:1007 +msgid "A list of DEPEND atoms to mask." +msgstr "Une liste d'atomes DEPEND à masquer." + +#: gli-dialog.py:1008 +msgid "A list of packages to unmask." +msgstr "Une liste de paquets à démasquer." + +#: gli-dialog.py:1009 +msgid "Per-package KEYWORDS (like ACCEPT_KEYWORDS)." +msgstr "KEYWORDS par paquets (comme ACCEPT_KEYWORDS)." + +#: gli-dialog.py:1010 +msgid "Per-package USE flags." +msgstr "Paramètres USE par paquets." + +#: gli-dialog.py:1011 +msgid "Type your own name of a file to edit in /etc/" +msgstr "Veuillez indiquer le nom d'un fichier à éditer dans /etc/" + +#: gli-dialog.py:1012 +msgid "For experienced users, the following /etc/* variables can also be defined. Choose a variable to edit or Done to continue." +msgstr "Pour les utilisateurs expérimentés, les variables suivantes /etc/* peuvent aussi être définies. Choisissez une variable à éditer ou Terminé pour continuer." + +#: gli-dialog.py:1017 +msgid "Enter the name of the /etc/ file you would like to edit (DO NOT type /etc/)" +msgstr "Veuillez indiquer le nom du fichier que vous voulez éditer dans /etc/ (NE PAS entrer /etc/)" + +#: gli-dialog.py:1024 +msgid "" +"Enter new contents (use \\n" +" for newline) of " +msgstr "" +"Entrer le nouveau contenu (utiliser \\n" +" pour une nouvelle ligne) de" + +#: gli-dialog.py:1031 +msgid "ERROR! Could not set etc/portage/* correctly!" +msgstr "ERREUR ! Impossible de mettre correctement en place /etc/portage/* !" + +#: gli-dialog.py:1038 +msgid "Copy over the current running kernel (fastest)" +msgstr "Copier le noyau utilisé actuellement (le plus rapide)" + +#: gli-dialog.py:1039 +msgid "The Unaltered Linux Kernel ver 2.6+ (safest)" +msgstr "La version inchangée 2.6+ du noyau Linux (le plus sûr)" + +#: gli-dialog.py:1040 +msgid "Gentoo's optimized 2.6+ kernel. (less safe)" +msgstr "Noyau 2.6+ optimisé pour Gentoo. (moins sûr)" + +#: gli-dialog.py:1041 +msgid "Hardened sources for the 2.6 kernel tree" +msgstr "Sources sécurisées (hardened) pour l'arbre 2.6 du noyau" + +#: gli-dialog.py:1042 +msgid "Vanilla sources with grsecurity patches" +msgstr "Sources Vanilla avec correctif grsecurity" + +#: gli-dialog.py:1043 +msgid "Choose one of the other sources available." +msgstr "Choisir une des autres sources disponibles." + +#: gli-dialog.py:1044 +msgid "Choose which kernel sources to use for your system. If using a previously-made kernel configuration, make sure the sources match the kernel used to create the configuration." +msgstr "Choisissez quelles sources de noyau utiliser pour votre système. Si vous souhaitez utiliser une configuration du noyau déjà existante, assurez-vous que les sources correspondent au noyau utilisé pour créer cette configuration." + +#: gli-dialog.py:1048 +msgid "Please enter the desired kernel sources package name:" +msgstr "Veuillez entrer le nom du paquet des sources du noyau désiré :" + +#: gli-dialog.py:1053 +msgid "ERROR! Could not set the kernel source package!" +msgstr "ERREUR ! Impossible de mettre en place le paquet des sources du noyau !" + +#: gli-dialog.py:1056 +msgid "Genkernel" +msgstr "Genkernel" + +#: gli-dialog.py:1057 +msgid "Traditional (requires a config!)" +msgstr "Traditionnelle (requiert une configuration !)" + +#: gli-dialog.py:1058 +msgid "" +"There are currently two ways the installer can compile a kernel for your new system. You can either provide a previously-made kernel configuration file and use the traditional kernel-compiling procedure (no initrd) or have genkernel automatically create your kernel for you (with initrd). \n" +"\n" +" If you do not have a previously-made kernel configuration, YOU MUST CHOOSE Genkernel. Choose which method you want to use." +msgstr "" +"Il y a actuellement pour l'installateur deux façons de compiler le noyau du nouveau système. Vous pouvez soit utiliser une configuration de noyau déjà existante et utiliser la procédure de compilation du noyau traditionnelle (sans initrd), soit avoir un noyau généré automatiquement pour vous (avec initrd).\n" +"\n" +"Si vous n'avez pas de configuration pré-existante, VOUS DEVEZ CHOISIR Genkernel. Choisissez quelle méthode vous voulez utiliser." + +#: gli-dialog.py:1065 +msgid "Do you want the bootsplash screen to show up on bootup?" +msgstr "Voulez-vous activer l'écran de chargement au démarrage de l'ordinateur ?" + +#: gli-dialog.py:1072 +msgid "If you have a custom kernel configuration, enter its location (otherwise just press Enter to continue):" +msgstr "Si vous avez une configuration personnalisée du noyau, entrez son emplacement (sinon appuyez simplement sur Entrée pour continuer) :" + +#: gli-dialog.py:1081 +msgid "ERROR! Could not set the kernel config URI!" +msgstr "ERREUR ! Impossible de déterminer le chemin du fichier de configuration du noyau !" + +#: gli-dialog.py:1104 +#: gli-dialog.py:1106 +msgid "GRand Unified Bootloader, newer, RECOMMENDED" +msgstr "GRand Unified Bootloader, plus récent, RECOMMANDÉ" + +#: gli-dialog.py:1108 +msgid "LInux LOader, older, traditional.(detects windows partitions)" +msgstr "LInux LOader, plus ancien, traditionnel. (détecte les partitions Windows)" + +#: gli-dialog.py:1110 +msgid "Do not install a bootloader. (System may be unbootable!)" +msgstr "Ne pas installer de système d'amorçage. (Le système peut ne pas être démarrable !)" + +#: gli-dialog.py:1111 +msgid "To boot successfully into your new Linux system, a bootloader will be needed. If you already have a bootloader you want to use you can select None here. The bootloader choices available are dependent on what GLI supports and what architecture your system is. Choose a bootloader" +msgstr "Pour démarrer avec succès votre nouveau système Linux, un système d'amorçage est nécessaire. Si vous en avez déjà un, vous pouvez sélectionner Aucun. Les choix disponibles sont indépendants de ce que l'installateur Gentoo supporte et de l'architecture de votre système. Choisissez un système d'amorçage." + +#: gli-dialog.py:1118 +msgid "ERROR! Could not set boot loader pkg! " +msgstr "ERREUR ! Impossible de définir le paquet du système d'amorçage !" + +#: gli-dialog.py:1123 +msgid "Most bootloaders have the ability to install to either the Master Boot Record (MBR) or some other partition. Most people will want their bootloader installed on the MBR for successful boots, but if you have special circumstances, you can have the bootloader installed to the /boot partition instead. Do you want the boot loader installed in the MBR? (YES is RECOMMENDED)" +msgstr "La majorité des systèmes d'amorçage ont la capacité de s'installer soit dans le Master Boot Record (MBR), soit dans une partition. La majorité des gens voudront installer le système d'amorçage sur le MBR pour la facilité, mais, si vous savez ce que vous faites, vous pouvez l'installer sur la partition /boot à la place. Voulez-vous que le système de démarrage soit installé sur le MBR ? (OUI est CONSEILLÉ)" + +#: gli-dialog.py:1131 +#, python-format +msgid "Your boot device may not be correct. It is currently set to %s, but this device may not be the first to boot. Usually boot devices end in 'a' such as hda or sda." +msgstr "Votre périphérique de démarrage peut être incorrect. Il est actuellement défini comme %s, mais ce périphérique peut ne pas être le premier à démarrer. Normalement, les périphériques de démarrages se terminent par « a » comme hda ou sda." + +#: gli-dialog.py:1132 +msgid " Please confirm your boot device by choosing it from the menu." +msgstr " Veuillez confirmer le périphérique choisi en le sélectionnant dans le menu." + +#: gli-dialog.py:1136 +msgid "ERROR: No drives set up. Please complete the Partitioning screen first!" +msgstr "ERREUR : Aucun disque défini. Veuillez compléter l'écran de partitionnement au préalable !" + +#: gli-dialog.py:1145 +msgid "ERROR! Could not set the boot device!" +msgstr "ERREUR : Impossible de définir le périphérique de démarrage !" + +#: gli-dialog.py:1147 +msgid "If you have any additional optional arguments you want to pass to the kernel at boot, type them here or just press Enter to continue:" +msgstr "Si vous souhaitez passer au noyau des arguments optionnels supplémentaires au démarrage, entrez les ici ou appuyez sur Entrée pour continuer :" + +#: gli-dialog.py:1152 +#: gli-dialog.py:1157 +msgid "ERROR! Could not set bootloader kernel arguments! " +msgstr "ERREUR : Impossible de définir les arguments du noyau pour le système d'amorçage !" + +#: gli-dialog.py:1171 +msgid "Please select the timezone for the new installation. Entries ending with a / can be selected to reveal a sub-list of more specific locations. For example, you can select America/ and then Chicago." +msgstr "Veuillez sélectionner le fuseau horaire de la nouvelle installation. Les entrées avec un / peuvent êtres sélectionnées pour révéler une sous-liste d'endroits plus spécifiques. Par exemple, vous pouvez sélectionner Europe/ puis Paris." + +#: gli-dialog.py:1185 +msgid "ERROR: Could not set that timezone!" +msgstr "ERREUR : Impossible de définir ce fuseau horaire !" + +#: gli-dialog.py:1192 +msgid "Here you will enter all of your network interface information for the new system. You can either choose a network interface to edit, add a network interface, delete an interface, or edit the miscellaneous options such as hostname and proxy servers." +msgstr "Vous pouvez entrer ici toutes les informations de vos interfaces réseaux pour le nouveau système. Vous pouvez choisir d'ajouter, éditer ou supprimer une interface réseau ou éditer diverses options comme le nom d'hôte et les serveurs proxy." + +#: gli-dialog.py:1197 +#: gli-dialog.py:1285 +msgid "Settings: DHCP. Options: " +msgstr "Configuration : Options DHCP :" + +#: gli-dialog.py:1199 +#: gli-dialog.py:1287 +msgid "IP: " +msgstr "Adresse IP :" + +#: gli-dialog.py:1199 +#: gli-dialog.py:1287 +msgid " Broadcast: " +msgstr "Adresse de diffusion :" + +#: gli-dialog.py:1199 +#: gli-dialog.py:1287 +msgid " Netmask: " +msgstr "Masque réseau :" + +#: gli-dialog.py:1200 +msgid "Add a new network interface" +msgstr "Ajouter une nouvelle interface réseau" + +#: gli-dialog.py:1206 +msgid "ERROR! Could not set the network interfaces!" +msgstr "ERREUR ! Impossible de définir les interfaces réseaux !" + +#: gli-dialog.py:1216 +msgid "Choose an interface from the list or Other to type your own if it was not detected." +msgstr "Choisissez une interface depuis la liste ou Autre pour entrer la vôtre si elle n'est pas détectée." + +#: gli-dialog.py:1219 +msgid "Enter name for new interface (eth0, ppp0, etc.)" +msgstr "Entrez le nom de la nouvelle interface (eth0, ppp0, etc)" + +#: gli-dialog.py:1223 +msgid "An interface with the name is already defined." +msgstr "Une interface avec ce nom est déjà définie." + +#: gli-dialog.py:1237 +#: gli-dialog.py:1262 +msgid "Enter your networking information: (See Chapter 3 of the Handbook for more information) Your broadcast address is probably your IP address with 255 as the last tuple. Do not press Enter until all fields are complete!" +msgstr "Entrez les informations du réseau (cf chapitre 3 du Manuel Gentoo d'Installation pour plus d'information) : Votre adresse de diffusion est probablement votre adresse IP avec 255 pour le dernier groupe. N'appuyez pas sur Entrée avant que tous les champs ne soient complétés !" + +#: gli-dialog.py:1248 +msgid "Edit" +msgstr "Éditer" + +#: gli-dialog.py:1250 +#, python-format +msgid "For interface %s, you can either edit the interface information (IP Address, Broadcast, Netmask) or Delete the interface." +msgstr "Pour l'interface %s, vous pouvez soit éditer les informations réseau (adresse IP, adresse diffusion, masque réseau) ou supprimer l'interface." + +#: gli-dialog.py:1276 +msgid "Are you sure you want to remove the interface " +msgstr "Êtes-vous sûr de vouloir supprimer l'interface" + +#: gli-dialog.py:1288 +msgid "" +"To be able to surf on the internet, you must know which host shares the Internet connection. This host is called the gateway. It is usually similar to your IP address, but ending in .1\n" +"If you have DHCP then just select your primary Internet interface (no IP will be needed) Start by choosing which interface accesses the Internet:" +msgstr "" +"Pour être capable de surfer sur Internet, vous devez savoir quel hôte partage la connexion Internet. Cet hôte est appelé la passerelle. Il est généralement similaire à votre adresse IP, mais termine avec .1\n" +"Si vous avez un serveur DHCP, sélectionnez simplement votre interface réseau principale (aucune IP ne sera nécessaire) Commencez par choisir quelle interface a accès à Internet :" + +#: gli-dialog.py:1296 +msgid "Enter the gateway IP address for " +msgstr "Entrer l'adresse IP de la passerelle pour " + +#: gli-dialog.py:1300 +msgid "Invalid IP Entered! Please try again." +msgstr "L'adresse IP saisie est incorrecte ! Veuillez réessayer." + +#: gli-dialog.py:1305 +#, python-format +msgid "ERROR! Coult not set the default gateway with IP %(ip)s for interface %(iface)s" +msgstr "ERREUR ! Impossible de définir la passerelle par défaut avec l'IP %(ip)s pour l'interface %(iface)s" + +#: gli-dialog.py:1320 +#: gli-dialog.py:1333 +msgid "Fill out the remaining networking settings. The hostname is manditory as that is the name of your computer. Leave the other fields blank if you are not using them. If using DHCP you do not need to enter DNS servers. Do not press Enter until all fields are complete!" +msgstr "Remplissez les options réseau restantes. Le nom d'hôte est obligatoire parce qu'il s'agit du nom de votre ordinateur. Laissez les autres champs vides si vous ne les utilisez pas. Si vous utilisez le DHCP vous n'avez pas besoin d'entrer de serveurs DNS. N'appuyez pas sur Entrée avant que tous les champs ne soient complétés." + +#: gli-dialog.py:1321 +#: gli-dialog.py:1334 +msgid "Enter your Hostname:" +msgstr "Entrez votre nom d'hôte (hostname) :" + +#: gli-dialog.py:1322 +#: gli-dialog.py:1335 +msgid "Enter your Domain Name:" +msgstr "Entrez votre nom de domaine :" + +#: gli-dialog.py:1323 +msgid "Enter your NIS Domain Name:" +msgstr "Entrez votre nom de domaine NIS :" + +#: gli-dialog.py:1324 +#: gli-dialog.py:1336 +msgid "Enter a primary DNS server:" +msgstr "Entrez un serveur DNS primaire :" + +#: gli-dialog.py:1325 +#: gli-dialog.py:1337 +msgid "Enter a backup DNS server:" +msgstr "Entrez un serveur DNS secondaire :" + +#: gli-dialog.py:1344 +msgid "Incorrect hostname! It must be a string. Not saved." +msgstr "Nom d'hôte incorrect ! Cela doit être une chaîne. Non enregistré." + +#: gli-dialog.py:1350 +msgid "ERROR! Could not set the hostname:" +msgstr "ERREUR ! Impossible de définir le nom d'hôte :" + +#: gli-dialog.py:1354 +msgid "Incorrect domainname! It must be a string. Not saved." +msgstr "Nom de domaine incorrect ! Cela doit être une chaîne. Non enregistré." + +#: gli-dialog.py:1360 +msgid "ERROR! Could not set the domainname:" +msgstr "ERREUR ! Impossible de définir le nom de domaine :" + +#: gli-dialog.py:1364 +msgid "Incorrect nisdomainname! It must be a string. Not saved." +msgstr "Nom de domaine NIS incorrect ! Cela doit être une chaîne. Non enregistré." + +#: gli-dialog.py:1370 +msgid "ERROR! Could not set the nisdomainname:" +msgstr "ERREUR ! Impossible de définir le nom de domaine NIS :" + +#: gli-dialog.py:1374 +msgid "Incorrect Primary DNS Server! Not saved." +msgstr "Serveur DNS primaire incorrect ! Non enregistré." + +#: gli-dialog.py:1379 +msgid "Incorrect Backup DNS Server! Not saved." +msgstr "Serveur secondaire DNS incorrect ! Non enregistré." + +#: gli-dialog.py:1386 +msgid "ERROR! Could not set the DNS Servers:" +msgstr "ERREUR ! Impossible de définir les serveurs DNS :" + +#: gli-dialog.py:1390 +msgid "Incorrect HTTP Proxy! It must be a uri. Not saved." +msgstr "Proxy HTTP incorrect ! Doit être une URI. Non enregistré" + +#: gli-dialog.py:1396 +msgid "ERROR! Could not set the HTTP Proxy:" +msgstr "ERREUR ! Impossible de définir le Proxy HTTP :" + +#: gli-dialog.py:1400 +msgid "Incorrect FTP Proxy! It must be a uri. Not saved." +msgstr "Proxy FTP incorrect ! Doit être une URI. Non enregistré" + +#: gli-dialog.py:1406 +msgid "ERROR! Could not set the FTP Proxy:" +msgstr "ERREUR ! Impossible de définir le Proxy FTP :" + +#: gli-dialog.py:1410 +msgid "Incorrect RSYNC Proxy! It must be a uri. Not saved." +msgstr "Proxy RSYNC incorrect ! Doit être une URI. Non enregistré" + +#: gli-dialog.py:1416 +msgid "ERROR! Could not set the RSYNC Proxy:" +msgstr "ERREUR ! Impossible de définir le Proxy RSYNC :" + +#: gli-dialog.py:1422 +msgid "Paul Vixie's cron daemon, fully featured, RECOMMENDED." +msgstr "Démon cron de Paul Vixie, présentant beaucoup de fonctionnalités, RECOMMANDÉ." + +#: gli-dialog.py:1423 +msgid "A cute little cron from Matt Dillon." +msgstr "Un sympathique petit cron de Matt Dillon." + +#: gli-dialog.py:1424 +msgid "A scheduler with extended capabilities over cron & anacron" +msgstr "Un planificateur avec des capacités étendues par rapport à cron et anacron" + +#: gli-dialog.py:1425 +msgid "Don't use a cron daemon. (NOT Recommended!)" +msgstr "Ne pas utiliser de démon cron. (NON CONSEILLÉ !)" + +#: gli-dialog.py:1426 +msgid "A cron daemon executes scheduled commands. It is very handy if you need to execute some command regularly (for instance daily, weekly or monthly). Gentoo offers three possible cron daemons: dcron, fcron and vixie-cron. Installing one of them is similar to installing a system logger. However, dcron and fcron require an extra configuration command, namely crontab /etc/crontab. If you don't know what to choose, use vixie-cron. If doing a networkless install, choose vixie-cron. Choose your cron daemon:" +msgstr "Un démon cron exécute des commandes planifiées. Très pratique si vous avez besoin d'exécuter des commandes régulièrement (par exemple : quotidiennes, hebdomadaires ou mensuelles). Gentoo offre trois démon cron : dcron, fcron et vixie-cron. Leur installation est similaire à celle d'un journal système. Cependant, dcron et fcron ont besoin d'une commande de configuration supplémentaire, c'est-à-dire crontab /etc/crontab. Si vous ne savez pas quoi utiliser ou si vous faites une installation hors-ligne, choisissez vixie-cron. Choisissez votre démon cron :" + +#: gli-dialog.py:1435 +msgid "An advanced system logger." +msgstr "Un journal système avancé." + +#: gli-dialog.py:1436 +msgid "A Highly-configurable system logger." +msgstr "Un journal système hautement configurable." + +#: gli-dialog.py:1437 +msgid "The traditional set of system logging daemons." +msgstr "Le lot habituel de démons de journal système." + +#: gli-dialog.py:1438 +msgid "Linux has an excellent history of logging capabilities -- if you want you can log everything that happens on your system in logfiles. This happens through the system logger. Gentoo offers several system loggers to choose from. If you plan on using sysklogd or syslog-ng you might want to install logrotate afterwards as those system loggers don't provide any rotation mechanism for the log files. If doing networkless, choose syslog-ng. Choose a system logger:" +msgstr "Linux a une très bonne capacité de journalisation. Si vous voulez, vous pouvez enregistrer tout ce qui se passe sur votre système dans des journaux. Et cela grâce au système de journal. Gentoo offre plusieurs choix de systèmes de journal. Si vous prévoyez d'utiliser sysklogd ou syslog-ng, vous voudrez également installer logrotate étant donné que ces système de journaux ne proposent aucun mécanisme de rotation des journaux. Si vous faites une installation hors-ligne, choisissez syslog-ng. Choisissez un système de journal :" + +#: gli-dialog.py:1458 +msgid "There are thousands of applications available to Gentoo users through Portage, Gentoo's package management system. Select some of the more common ones below or add your own additional package list by choosing 'Manual'." +msgstr "Il y a des milliers d'applications disponibles aux utilisateurs de Gentoo à travers Portage, le système de gestion des paquets de Gentoo. Sélectionnez les plus communs ci-dessous ou ajoutez votre liste de paquets supplémentaires en choisissant « Manuellement »." + +#: gli-dialog.py:1459 +msgid "" +"\n" +"Your current package list is: " +msgstr "" +"\n" +"Votre liste de paquets actuelle est : " + +#: gli-dialog.py:1466 +msgid "ERROR! Could not set the install packages! List of packages:" +msgstr "ERREUR ! Impossible de définir les paquets d'installation ! Liste de paquets :" + +#: gli-dialog.py:1474 +msgid "Enter a space-separated list of extra packages to install on the system" +msgstr "Entrez la liste de paquets supplémentaires à installer sur le système, sous forme de liste séparée par des espaces" + +#: gli-dialog.py:1489 +msgid "Choose from the listed packages. If doing a networkless install, only choose (GRP) packages." +msgstr "Choisissez depuis les paquets listés. Si vous procédez à une installation hors-ligne, choisissez uniquement des paquets (GRP)." + +#: gli-dialog.py:1508 +msgid "Do you want to start X on bootup?" +msgstr "Voulez vous lancer X au démarrage ?" + +#: gli-dialog.py:1553 +msgid "ALSA Sound Daemon" +msgstr "Démon audio ALSA" + +#: gli-dialog.py:1554 +msgid "Common web server (version 1.x)" +msgstr "Serveur web courant (version 1.x)" + +#: gli-dialog.py:1555 +msgid "Common web server (version 2.x)" +msgstr "Serveur web courant (version 2.x)" + +#: gli-dialog.py:1556 +msgid "Distributed Compiling System" +msgstr "Système de compilation distribué" + +#: gli-dialog.py:1557 +msgid "ESD Sound Daemon" +msgstr "Démon audio ESD" + +#: gli-dialog.py:1558 +msgid "Hard Drive Tweaking Utility" +msgstr "Utilitaire de réglage de disque dur amélioré" + +#: gli-dialog.py:1559 +msgid "Run scripts found in /etc/conf.d/local.start" +msgstr "Exécute /etc/conf.d/local.start au démarrage" + +#: gli-dialog.py:1560 +msgid "Port Mapping Service" +msgstr "Service de redirection de port" + +#: gli-dialog.py:1561 +msgid "Common FTP server" +msgstr "Serveur FTP commun" + +#: gli-dialog.py:1562 +msgid "SSH Daemon (allows remote logins)" +msgstr "Démon SSH (permet les connexions à distance)" + +#: gli-dialog.py:1563 +msgid "X Font Server" +msgstr "Serveur de polices de caractères X" + +#: gli-dialog.py:1564 +msgid "X Daemon" +msgstr "Démon X" + +#: gli-dialog.py:1565 +msgid "Manually specify your services in a comma-separated list." +msgstr "Spécifiez manuellement vos services séparés par des virgules." + +#: gli-dialog.py:1566 +msgid "Choose the services you want started on bootup. Note that depending on what packages are selected, some services listed will not exist." +msgstr "Choisissez les services que vous souhaitez lancer au démarrage. Notez que cela dépendra des paquets qui ont été sélectionnés, certains services listés n'existeront pas." + +#: gli-dialog.py:1574 +msgid "Enter a comma-separated list of services to start on boot" +msgstr "Entrez la liste de services que vous souhaitez lancer au démarrage" + +#: gli-dialog.py:1599 +msgid "" +"Additional configuration settings for Advanced users (rc.conf)\n" +"Here are some other variables you can set in various configuration files on the new system. If you don't know what a variable does, don't change it!" +msgstr "" +"Configuration supplémentaire pour les utilisateurs avancés (rc.conf).\n" +"Voici d'autres variables que vous pouvez définir dans différents fichiers de configuration sur le nouveau système. Si vous ne savez pas ce que font les variables, ne les changez pas !" + +#: gli-dialog.py:1600 +msgid "Use KEYMAP to specify the default console keymap." +msgstr "Utilisez KEYMAP pour définir la disposition du clavier par défaut, pour le terminal." + +# keymap et windowkeys, traduction ? +#: gli-dialog.py:1601 +msgid "Decision to first load the 'windowkeys' console keymap" +msgstr "Décision de d'abord charger la dispositions du clavier contenant les touches Windows, pour le terminal" + +#: gli-dialog.py:1602 +msgid "maps to load for extended keyboards. Most users will leave this as is." +msgstr "Dispositions à charger pour les claviers étendus. La majorité des utilisateurs laisseront cela tel quel." + +#: gli-dialog.py:1603 +msgid "Specifies the default font that you'd like Linux to use on the console." +msgstr "Spécifie la police par défaut que vous souhaitez que Linux utilise pour le terminal." + +#: gli-dialog.py:1604 +msgid "The charset map file to use." +msgstr "Le fichier de jeux de caractères à utiliser." + +#: gli-dialog.py:1605 +msgid "Set the clock to either UTC or local" +msgstr "Définir l'horloge à l'heure locale ou UTC" + +#: gli-dialog.py:1606 +msgid "Set EDITOR to your preferred editor." +msgstr "Définissez EDITOR à votre éditeur préféré." + +#: gli-dialog.py:1607 +msgid "What display manager do you use ? [ xdm | gdm | kdm | entrance ]" +msgstr "Quel gestionnaire d'affichage utilisez-vous ? [ xdm | gdm | kdm | entrance ]" + +#: gli-dialog.py:1608 +msgid "a new variable to control what window manager to start default with X" +msgstr "une nouvelle variable pour contrôler quel gestionnaire de fenêtre démarrer par défaut avec X" + +#: gli-dialog.py:1615 +msgid "Choose your desired keymap:" +msgstr "Choisissez la disposition de votre clavier :" + +#: gli-dialog.py:1624 +msgid "Should we first load the 'windowkeys' console keymap? Most x86 users will say 'yes' here. Note that non-x86 users should leave it as 'no'." +msgstr "Doit-on d'abord charger la dispositions du clavier contenant les touches Windows, pour le terminal ? La plupart des utilisateurs d'x86 diront Oui ici. Les utilisateurs d'autres architectures devraient laisser cette option sur Non." + +#: gli-dialog.py:1629 +msgid "This sets the maps to load for extended keyboards. Most users will leave this as is. Enter new value for EXTENDED_KEYMAPS" +msgstr "Ceci définit la disposition du clavier à charger pour les claviers étendus. La majorité des utilisateurs laisseront tel quel. Entrez la nouvelle valeur pour EXTENDED_KEYMAPS" + +#: gli-dialog.py:1632 +msgid "Choose your desired console font:" +msgstr "Choisissez la police que vous désirez pour le terminal :" + +#: gli-dialog.py:1638 +msgid "Choose your desired console translation:" +msgstr "Choisissez la traduction de caractères que vous désirez pour le terminal :" + +#: gli-dialog.py:1646 +msgid "Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local." +msgstr "L'horloge (CLOCK) doit-elle être définie comme locale ou Universelle ? À moins de mettre votre fuseau horaire sur UTC, choisissez local." + +#: gli-dialog.py:1651 +msgid "Default editor." +msgstr "Éditeur par défaut." + +#: gli-dialog.py:1651 +msgid "vi improved editor." +msgstr "Éditeur vi amélioré." + +#: gli-dialog.py:1651 +msgid "The emacs editor." +msgstr "L'éditeur emacs." + +#: gli-dialog.py:1652 +msgid "Choose your default editor: " +msgstr "Choissez l'éditeur utilisé par défaut :" + +#: gli-dialog.py:1654 +msgid "X Display Manager" +msgstr "Gestionnaire d'affichage X" + +#: gli-dialog.py:1655 +msgid "Gnome Display Manager" +msgstr "Gestionnaire d'affichage Gnome" + +#: gli-dialog.py:1656 +msgid "KDE Display Manager" +msgstr "Gestionnaire d'affichage KDE" + +#: gli-dialog.py:1657 +msgid "Login Manager for Enlightenment" +msgstr "Gestionnaire de connexion pour Enlightenment" + +#: gli-dialog.py:1658 +msgid "Choose your desired display manager to use when starting X (note you must make sure that package also gets installed for it to work):" +msgstr "Choisissez le gestionnaire d'affichage à utiliser quand vous démarrez X (notez que vous devez vous assurer que les paquets nécessaires sont installés pour lui permetre de fonctionner) :" + +#: gli-dialog.py:1660 +msgid "Choose what window manager you want to start default with X if run with xdm, startx, or xinit. (common options are Gnome or Xsession):" +msgstr "Choisissez quel gestionnaire de fenêtres vous souhaitez démarrer par défaut avec X en utilisant xdm, startx ou xinit. (Options classiques : Gnome ou Xsession) :" + +#: gli-dialog.py:1697 +msgid "Please enter your desired password for the root account. (note it will not show the password. Also do not try to use backspace.):" +msgstr "Entrez le mot de passe de votre choix pour l'utilisateur root. (Notez que le mot de passe ne sera pas affiché. Donc n'essayez pas d'utiliser la touche retour.) :" + +#: gli-dialog.py:1700 +msgid "Enter the new root password again for confirmation" +msgstr "Entrez à nouveau le mot de passe root pour confirmer" + +#: gli-dialog.py:1704 +msgid "The passwords do not match. Please try again or cancel." +msgstr "Les mots de passe ne correspondent pas. Essayez encore ou annulez." + +#: gli-dialog.py:1709 +msgid "ERROR! Could not set the new system root password!" +msgstr "ERREUR ! Impossible de définir le nouveau mot de passe root du système !" + +#: gli-dialog.py:1710 +#: gli-dialog.py:1775 +msgid "Password saved. Press Enter to continue." +msgstr "Mot de passe enregistré. Appuyez sur Entrée pour continuer." + +#: gli-dialog.py:1723 +#: gli-dialog.py:1737 +msgid "Add user" +msgstr "Ajouter un utilisateur" + +#: gli-dialog.py:1724 +msgid "Working as root on a Unix/Linux system is dangerous and should be avoided as much as possible. Therefore it is strongly recommended to add a user for day-to-day use. Choose a user to edit:" +msgstr "Travailler en tant que super-utilisateur (root) sur un système Unix/Linux est dangereux et devrait être évité autant que possible. C'est pourquoi il est fortement recommandé d'ajouter un utilisateur pour l'usage quotidien. Choisissez un utilisateur à éditer :" + +#: gli-dialog.py:1734 +msgid "ERROR! Could not set the additional users!" +msgstr "ERREUR ! Impossible de définir de nouveaux utilisateurs !" + +#: gli-dialog.py:1738 +msgid "Enter the username for the new user" +msgstr "Entrez le nom du nouvel utilisateur" + +#: gli-dialog.py:1742 +msgid "A user with that name already exists" +msgstr "Un utilisateur avec ce nom existe déjà" + +#: gli-dialog.py:1746 +#, python-format +msgid "Enter the new password for user %s. (will not be echoed)" +msgstr "Entrez le nouveau mot de passe pour l'utilisateur %s. (ne sera pas affiché)" + +#: gli-dialog.py:1747 +msgid "Enter the new password again for confirmation" +msgstr "Entrez-le à nouveau pour confirmer" + +#: gli-dialog.py:1750 +msgid "The passwords do not match! Please try again." +msgstr "Les mots de passes ne correspondent pas ! Réessayez." + +#: gli-dialog.py:1754 +msgid "You must enter a password for the user! Even a blank password will do. You can always edit it again later from the menu." +msgstr "Vous devez entrer un mot de passe pour l'utilisateur ! Même un mot de passe blanc suffira. Vous pouvez toujours l'éditer plus tard depuis le menu." + +#: gli-dialog.py:1760 +#: gli-dialog.py:1765 +msgid "Password" +msgstr "Mot de passe" + +#: gli-dialog.py:1760 +#: gli-dialog.py:1777 +msgid "Group Membership" +msgstr "Adhésion au groupe" + +#: gli-dialog.py:1760 +#: gli-dialog.py:1801 +msgid "Shell" +msgstr "Shell" + +#: gli-dialog.py:1760 +#: gli-dialog.py:1806 +msgid "Home Directory" +msgstr "Répertoire Personnel" + +#: gli-dialog.py:1760 +#: gli-dialog.py:1811 +msgid "UID" +msgstr "UID" + +#: gli-dialog.py:1760 +#: gli-dialog.py:1818 +msgid "Comment" +msgstr "Commentaire" + +#: gli-dialog.py:1761 +#, python-format +msgid "Choose an option for user %s" +msgstr "Choisissez une option pour l'utilisateur %s" + +#: gli-dialog.py:1766 +msgid "Enter the new password" +msgstr "Entrez le nouveau mot de passe" + +#: gli-dialog.py:1769 +msgid "Enter the new password again" +msgstr "Ré-entrez le nouveau mot de passe" + +#: gli-dialog.py:1773 +msgid "The passwords do not match! Try again." +msgstr "Les mots de passe ne correspondent pas ! Réessayez." + +#: gli-dialog.py:1779 +msgid "The usual group for normal users." +msgstr "Le groupe habituel pour les utilisateurs normaux." + +#: gli-dialog.py:1780 +msgid "Allows users to attempt to su to root." +msgstr "Autorise les utilisateurs à utiliser la commande su pour se connecter en root." + +#: gli-dialog.py:1781 +msgid "Allows access to audio devices." +msgstr "Autorise l'accès aux périphériques audio." + +#: gli-dialog.py:1782 +msgid "Allows access to games." +msgstr "Autorise l'accès aux jeux." + +#: gli-dialog.py:1783 +#: gli-dialog.py:1784 +#: gli-dialog.py:1785 +#: gli-dialog.py:1786 +msgid "For users who know what they're doing only." +msgstr "Pour les utilisateurs qui savent ce qu'ils font uniquement." + +#: gli-dialog.py:1787 +msgid "Manually specify your groups in a comma-separated list." +msgstr "Entrez manuellement vos groupes dans un liste séparée par des virgules." + +#: gli-dialog.py:1788 +#, python-format +msgid "Select which groups you would like the user %s to be in." +msgstr "Sélectionnez les groupes dans lesquels vous voulez que l'utilisateur %s soit." + +#: gli-dialog.py:1798 +msgid "Enter a comma-separated list of groups the user is to be in" +msgstr "Entrez les groupes (séparés par des virgules) dont l'utilisateur fera parti" + +#: gli-dialog.py:1802 +msgid "Enter the shell you want the user to use. default is /bin/bash. " +msgstr "Entrez l'interpréteur de commandes que vous souhaitez que l'utilisateur utilise. Défaut : /bin/bash." + +#: gli-dialog.py:1807 +msgid "Enter the user's home directory. default is /home/username. " +msgstr "Entrez le répertoire personnel de l'utilisateur. Défaut : /home/nomdutilisateur." + +#: gli-dialog.py:1812 +msgid "Enter the user's UID. If left blank the system will choose a default value (this is recommended)." +msgstr "Entrez l'UID de l'utilisateur. Si laissé blanc, le système choisira une valeur par défaut (ceci est recommandé)." + +#: gli-dialog.py:1819 +msgid "Enter the user's comment. This is completely optional." +msgstr "Entrez les commentaires sur l'utilisateur. Ceci est complètement optionnel." + +#: gli-dialog.py:1827 +#, python-format +msgid "Are you sure you want to delete the user %s ?" +msgstr "Êtes-vous sûr de vouloir supprimer l'utilisateur %s ?" + +#: gli-dialog.py:1835 +msgid "Would you like to save these install settings for use again later?" +msgstr "Voulez-vous sauvegarder ces paramètres d'installation pour les réutiliser plus tard ?" + +#: gli-dialog.py:1839 +msgid "Enter a filename for the XML file. Use full path!" +msgstr "Entrez un nom pour le fichier XML. Utilisez le chemin complet !" + +#: gli-dialog.py:1843 +#, python-format +msgid "The file %s already exists. Do you want to overwrite it?" +msgstr "Le fichier %s existe déjà. Voulez-vous l'écraser ?" + +#: gli-dialog.py:1850 +msgid "Error. File couldn't be saved. Saving to /tmp/installprofile.xml instead." +msgstr "Erreur. Le fichier n'a pas pu être enregistré. Enregistrement dans /tmp/installprofile.xml à la place." + +#: gli-dialog.py:1856 +msgid "Complete failure to save install profile!" +msgstr "Échec complet de l'enregistrement du profil d'installation !" + +#: gli-dialog.py:1952 +msgid "Install completed!" +msgstr "Installation accomplie !" + +#: gli-dialog.py:1954 +msgid "Install done!" +msgstr "Installation terminée !" + +#: gli-dialog.py:1970 +#, python-format +msgid "" +"There was an Exception received during the install that is outside of the normal install errors. This is a bad thing. The error was: %s \n" +" You have several ways of handling this. If you cannot resolve it, please submit a bug report (after searching to make sure it's not a known issue and verifying you didn't do something stupid) with the contents of /var/log/install.log and /tmp/installprofile.xml and the version of the installer you used." +msgstr "" +"\tUne exception a été reçue lors de l'installation, en dehors des erreurs normales d'installation. C'est une mauvaise chose. L'erreur était : %s \n" +"\tVous avez plusieurs possibilités. Si vous ne pouvez pas résoudre ce problème, merci de déposer un rapport de bogue (après vous être renseigné et avoir vérifié ne pas avoir fait quelque chose d'idiot) avec le contenu des fichiers /var/log/install.log et /tmp/installprofile.xml ainsi que la version de l'installateur que vous utilisez." + +#: gli-dialog.py:2002 +msgid "Installation Started!" +msgstr "L'installation a débuté !" + +#: gli-dialog.py:2002 +#: gli-dialog.py:2005 +msgid "Installation progress" +msgstr "Progression de l'installation" + +#: gli-dialog.py:2005 +msgid "Continuing Installation" +msgstr "Continuer l'installation" + +#: gli-dialog.py:2025 +#, python-format +msgid "" +"On step %(A)d of %(B)d. Current step: %(C)s\n" +"%(D)s" +msgstr "" +"À l'étape %(A)d de %(B)d. Étape actuelle : %(C)s\n" +"%(D)s" + +#: gli-dialog.py:2036 +#, python-format +msgid "On step %(A)d of %(B)d. Current step: %(C)s" +msgstr "À l'étape %(A)d de %(B)d. Étape actuelle : %(C)s" + diff --git a/src/fe/dialog/languages/gli-dialog.pot b/src/fe/dialog/languages/gli-dialog.pot index b65ea70..d3a3015 100644 --- a/src/fe/dialog/languages/gli-dialog.pot +++ b/src/fe/dialog/languages/gli-dialog.pot @@ -1,14 +1,14 @@ # Gentoo Linux Installer. -# Copyright (C) 2006 +# Copyright (C) 2007 # This file is distributed under the same license as the Gentoo Linux Installer. -# Preston Cody <codeman@gentoo.org>, 2006. +# Preston Cody <codeman@gentoo.org>, 2007. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gli-dialog 2006.1\n" +"Project-Id-Version: gli-dialog 2007.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-09-02 11:57-0400\n" +"POT-Creation-Date: 2007-02-20 21:19-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -16,277 +16,1718 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: gli-dialog.py:36 +#: gli-dialog.py:62 msgid "" -"Do you want to save the ClientConfiguration XML file before continuing? (it " -"will be automatically saved before the install begins)" +"Welcome to the Gentoo Linux Installer! This program will help install " +"Gentoo on your computer.\n" +"Before proceeding please thoroughly read the Gentoo Installation Handbook " +"available at \n" +"http://www.gentoo.org/doc/en/handbook/index.xml \n" +"\n" +"Press OK to continue" msgstr "" -#: gli-dialog.py:45 -msgid "Wizard Mode" +#: gli-dialog.py:66 +msgid "Welcome" +msgstr "" + +#: gli-dialog.py:70 +msgid "Standard" msgstr "" -#: gli-dialog.py:46 -msgid "Skip to Menu" +#: gli-dialog.py:71 +msgid "Advanced" msgstr "" -#: gli-dialog.py:47 +#: gli-dialog.py:72 msgid "" -"The Gentoo Linux Installer can either take you step by step through the " -"installation settings (recommended), or you can instead go straight to the " -"Revisions menu to set your settings before the installation begins." +"This installer has two modes, an advanced mode for those knowledgable with " +"the inner details of their computer and a standard mode where many of the " +"defaults will be chosen for the user for simplicity and to speed up the " +"install process. The advanced mode offers full customizability and is " +"required for generating profiles to be used other computers. \n" +"The advanced mode is recommended by the developers.\n" +"\t\t" msgstr "" -#: gli-dialog.py:70 gli-dialog.py:110 gli-dialog.py:182 gli-dialog.py:225 -#: gli-dialog.py:268 +#: gli-dialog.py:80 +msgid "" +"Do you want to do a networkless installation? This will limit the " +"customizability of your install due to the limitations of the LiveCD. For " +"example, choosing networkless will set your installation stage, portage " +"snapshot, and limit your extra packages selections. NOTE: It is easily " +"possible to do a networkless installation on a machine with an active " +"Internet connection; in fact this may result in the fastest installations " +"for many users." +msgstr "" + +#: gli-dialog.py:82 +msgid "Networkless" +msgstr "" + +#: gli-dialog.py:83 +msgid "Internet enabled" +msgstr "" + +#: gli-dialog.py:97 +msgid "ERROR: Could not set networkless information in the profile" +msgstr "" + +#: gli-dialog.py:103 gli-dialog.py:141 gli-dialog.py:204 gli-dialog.py:567 +#: gli-dialog.py:946 gli-dialog.py:1063 gli-dialog.py:1121 gli-dialog.py:1274 +#: gli-dialog.py:1506 gli-dialog.py:1622 gli-dialog.py:1825 gli-dialog.py:1833 +#: gli-dialog.py:1968 msgid "Yes" msgstr "" -#: gli-dialog.py:71 gli-dialog.py:111 gli-dialog.py:183 gli-dialog.py:226 -#: gli-dialog.py:269 +#: gli-dialog.py:104 gli-dialog.py:142 gli-dialog.py:205 gli-dialog.py:568 +#: gli-dialog.py:947 gli-dialog.py:1064 gli-dialog.py:1122 gli-dialog.py:1275 +#: gli-dialog.py:1507 gli-dialog.py:1623 gli-dialog.py:1826 gli-dialog.py:1834 +#: gli-dialog.py:1969 msgid "No" msgstr "" -#: gli-dialog.py:72 +#: gli-dialog.py:107 msgid "" -"Do you want to change any of your settings before starting the actual " -"installation?" +"\n" +"\tAll of the installation settings are stored in an XML file, which we call " +"the InstallProfile. If you have a previously-created profile, you can load " +"it now\n" +"\tfor use in this installation.\n" +"\tDo you have a previously generated profile for the installer?\n" +"\t" msgstr "" -#: gli-dialog.py:76 -msgid "Partitioning" +#: gli-dialog.py:113 +msgid "Enter the filename of the XML file" msgstr "" -#: gli-dialog.py:77 -msgid "Network mounts" +#: gli-dialog.py:118 +#, python-format +msgid "Cannot open file %s" msgstr "" -#: gli-dialog.py:78 -msgid "Install Stage" +#: gli-dialog.py:143 +msgid "" +"Do you want debugging output enabled during the install? This is mainly " +"meant to help the developers debug any bugs." msgstr "" -#: gli-dialog.py:79 -msgid "Portage Tree" +#: gli-dialog.py:158 gli-dialog.py:162 gli-dialog.py:365 gli-dialog.py:369 +#: gli-dialog.py:398 gli-dialog.py:402 gli-dialog.py:514 gli-dialog.py:519 +#: gli-dialog.py:837 gli-dialog.py:844 gli-dialog.py:848 gli-dialog.py:919 +#: gli-dialog.py:924 gli-dialog.py:1011 gli-dialog.py:1016 gli-dialog.py:1043 +#: gli-dialog.py:1047 gli-dialog.py:1215 gli-dialog.py:1218 gli-dialog.py:1565 +#: gli-dialog.py:1573 gli-dialog.py:1787 gli-dialog.py:1797 +msgid "Other" msgstr "" -#: gli-dialog.py:80 -msgid "make.conf" +#: gli-dialog.py:158 gli-dialog.py:1215 +msgid "Type your own." msgstr "" -#: gli-dialog.py:81 -msgid "distcc" +#: gli-dialog.py:159 +msgid "" +"In order to complete most installs, an active Internet connection is " +"required. Listed are the network devices already detected. In this step " +"you will need to setup one network connection for GLI to use to connect to " +"the Internet. If your desired device does not show up in the list, you can " +"select Other and input the device name manually." msgstr "" -#: gli-dialog.py:82 -msgid "etc/portage/*" +#: gli-dialog.py:163 +msgid "" +"Enter the interface (NIC) you would like to use for installation (e.g. eth0):" msgstr "" -#: gli-dialog.py:83 -msgid "Kernel" +#: gli-dialog.py:170 gli-dialog.py:1228 gli-dialog.py:1253 +msgid "DHCP" msgstr "" -#: gli-dialog.py:84 -msgid "Bootloader" +#: gli-dialog.py:171 gli-dialog.py:1229 gli-dialog.py:1254 +msgid "Static IP/Manual" +msgstr "" + +#: gli-dialog.py:172 gli-dialog.py:1193 +msgid "" +"To setup your network interface, you can either use DHCP if enabled, or " +"manually enter your network information.\n" +" DHCP (Dynamic Host Configuration Protocol) makes it possible to " +"automatically receive networking information (IP address, netmask, broadcast " +"address, gateway, nameservers etc.). This only works if you have a DHCP " +"server in your network (or if your provider provides a DHCP service). If " +"you do not, you must enter the information manually. Please select your " +"networking configuration method:" msgstr "" -#: gli-dialog.py:85 -msgid "Timezone" +#: gli-dialog.py:176 gli-dialog.py:1233 gli-dialog.py:1258 +msgid "" +"If you have any additional DHCP options to pass, type them here in a space-" +"separated list. If you have none, just press Enter." msgstr "" -#: gli-dialog.py:86 -msgid "Networking" +#: gli-dialog.py:179 +msgid "" +"Enter your networking information: (See Chapter 3 of the Handbook for more " +"information) Your broadcast address is probably your IP address with 255 as " +"the last tuple. DO NOT PRESS ENTER until all fields you intend to fill out " +"are complete!" msgstr "" -#: gli-dialog.py:87 -msgid "Cron daemon" +#: gli-dialog.py:180 gli-dialog.py:1238 gli-dialog.py:1263 +msgid "Enter your IP address:" msgstr "" -#: gli-dialog.py:88 -msgid "Logging daemon" +#: gli-dialog.py:181 gli-dialog.py:1239 gli-dialog.py:1264 +msgid "Enter your Broadcast address:" msgstr "" -#: gli-dialog.py:89 -msgid "Extra packages" +#: gli-dialog.py:182 gli-dialog.py:1240 gli-dialog.py:1265 +msgid "Enter your Netmask:" msgstr "" -#: gli-dialog.py:90 -msgid "Services" +#: gli-dialog.py:183 +msgid "Enter your default gateway:" msgstr "" -#: gli-dialog.py:91 -msgid "Configuration Settings" +#: gli-dialog.py:184 +msgid "Enter a DNS server:" msgstr "" -#: gli-dialog.py:92 -msgid "Root password" +#: gli-dialog.py:185 gli-dialog.py:1326 +msgid "Enter a HTTP Proxy IP:" msgstr "" -#: gli-dialog.py:93 -msgid "Additional Users" +#: gli-dialog.py:186 gli-dialog.py:1327 +msgid "Enter a FTP Proxy IP:" msgstr "" -#: gli-dialog.py:99 -msgid "Choose an option" +#: gli-dialog.py:187 gli-dialog.py:1328 +msgid "Enter a RSYNC Proxy:" msgstr "" -#: gli-dialog.py:99 -msgid "Done" +#: gli-dialog.py:197 +msgid "" +"Sorry, but the network could not be set up successfully. Please configure " +"yourself manually and restart the installer." msgstr "" -#: gli-dialog.py:112 -msgid "Do you want to save the InstallProfile XML file?" +#: gli-dialog.py:199 +msgid "ERROR! Could not setup networking!" msgstr "" -#: gli-dialog.py:141 +#: gli-dialog.py:207 msgid "" -"Welcome to the Gentoo Linux Installer! This program will help install " -"Gentoo on your computer.\n" -"Before proceeding please thoroughly read the Gentoo Installation Handbook " -"available at \n" -"http://www.gentoo.org/doc/en/handbook/index.xml \n" -"\n" -"This installer works by first asking a series of questions to generate an " -"\"installation profile\",\n" -"which contains all the information needed to install Gentoo.\n" -"\n" -"NO Changes will be made to your system until you select the \"Install!\" " -"button. \n" -"You can save your profile at any time by exiting the installer.\n" -"You can also load a previously made profile at any time.\n" -"\n" -"If choosing expert mode, you will make a second profile with configuration " -"settings for the livecd environment and the installer.\n" +"Do you want SSH enabled during the install? This will allow you to login " +"remotely during the installation process. If choosing Yes, be sure you " +"select a new LiveCD root password!" +msgstr "" + +#: gli-dialog.py:211 +msgid "ERROR! : Could not start the SSH daemon!" +msgstr "" + +#: gli-dialog.py:219 +msgid "" +"If you want to be able to login to your machine from another console during " +"the installation,\n" +"\tyou will want to enter a new root password for the LIVECD.\n" +"\tNote that this can be different from your new system's root password.\n" +"\tPresss Enter twice to skip this step.\n" +"\tEnter the new LIVECD root password (will not be echoed):\t" +msgstr "" + +#: gli-dialog.py:227 +msgid "Enter the new LIVECD root password again to verify:" +msgstr "" + +#: gli-dialog.py:231 +msgid "The passwords do not match. Please try again." +msgstr "" + +#: gli-dialog.py:239 +msgid "ERROR! Could not hash the root password on the LiveCD!" +msgstr "" + +#: gli-dialog.py:248 +msgid "ERROR! Could not set the root password on the livecd environment!" +msgstr "" + +#: gli-dialog.py:255 +msgid "" +"Here is a list of modules currently loaded on your machine.\n" +" Please look through and see if any modules are missing\n" +" that you would like loaded.\n" "\n" -"Press OK to continue" msgstr "" -#: gli-dialog.py:151 -msgid "Welcome" +#: gli-dialog.py:256 +msgid "Continue" msgstr "" -#: gli-dialog.py:154 -msgid "Simulate" +#: gli-dialog.py:257 +msgid "Loaded Modules" msgstr "" -#: gli-dialog.py:155 -msgid "Real Install" +#: gli-dialog.py:258 +msgid "" +"If you have additional modules you would like loaded before the installation " +"begins (ex. a network driver), enter them in a space-separated list." msgstr "" -#: gli-dialog.py:157 -msgid "Are we performing an actual install or just simulating?" +#: gli-dialog.py:272 +#, python-format +msgid "ERROR! : Could not load module: %s " msgstr "" -#: gli-dialog.py:163 -msgid "Standard" +#: gli-dialog.py:277 +msgid "" +"ERROR!: An unknown error occurred during modprobing the modules. Please " +"load them manually and then restart the installer." msgstr "" -#: gli-dialog.py:164 -msgid "Advanced" +#: gli-dialog.py:304 gli-dialog.py:312 gli-dialog.py:1200 gli-dialog.py:1208 +msgid "Add" msgstr "" -#: gli-dialog.py:165 +#: gli-dialog.py:304 +msgid "Define a new mountpoint" +msgstr "" + +#: gli-dialog.py:305 msgid "" -"This installer has two modes, an advanced mode for those knowledgable with " -"the inner details of their computer and a standard mode where many of the " -"defaults will be chosen for the user for simplicity and to speed up the " -"install process. The advanced mode offers full customizability and is " -"required for generating profiles to be used other computers. \n" -"The advanced mode is recommended by the developers.\n" -"\t" +"Please define the mountpoints of your partitions for the new system. At " +"minimum, a / mountpoint must be defined. Defining /boot and /home " +"mountpoints is recommended." +msgstr "" + +#: gli-dialog.py:305 gli-dialog.py:557 gli-dialog.py:1201 gli-dialog.py:1459 +#: gli-dialog.py:1610 gli-dialog.py:1725 +msgid "Save and Continue" +msgstr "" + +#: gli-dialog.py:310 +msgid "ERROR: Could net set mounts!" +msgstr "" + +#: gli-dialog.py:328 gli-dialog.py:467 gli-dialog.py:530 +msgid "Logical (" +msgstr "" + +#: gli-dialog.py:330 gli-dialog.py:469 gli-dialog.py:532 +msgid "Primary (" +msgstr "" + +#: gli-dialog.py:346 +msgid "Select a Partition to define a mountpoint for" msgstr "" -#: gli-dialog.py:171 +#: gli-dialog.py:366 +#, python-format msgid "" -"Do you want to do a networkless installation? This will limit the " -"customizability of your install due to the limitations of the LiveCD. For " -"example, choosing networkless will set your installation stage, portage " -"snapshot, and limit your extra packages selections. NOTE: It is easily " -"possible to do a networkless installation on a machine with an active " -"Internet connection; in fact this may result in the fastest installations " -"for many users." +"Choose a mountpoint from the list or choose Other to type your own for " +"partition %s. " msgstr "" -#: gli-dialog.py:173 -msgid "Networkless" +#: gli-dialog.py:370 gli-dialog.py:403 +#, python-format +msgid "Enter a mountpoint for partition %s" msgstr "" -#: gli-dialog.py:174 -msgid "Internet enabled" +#: gli-dialog.py:375 gli-dialog.py:415 +#, python-format +msgid "Enter mount options for mountpoint %s. Leave blank for defaults" +msgstr "" + +#: gli-dialog.py:389 gli-dialog.py:397 +msgid "Change Mountpoint" +msgstr "" + +#: gli-dialog.py:390 gli-dialog.py:406 +msgid "Change Filesystem Type" +msgstr "" + +#: gli-dialog.py:391 gli-dialog.py:414 +msgid "Change Mountoptions" +msgstr "" + +#: gli-dialog.py:392 gli-dialog.py:419 +msgid "Delete This Mountpoint" +msgstr "" + +#: gli-dialog.py:393 +#, python-format +msgid "" +"Select an option for device %(dev)s : Mountpoint: %(mt)s, Type: %(type)s, " +"Options: %(opt)s" +msgstr "" + +#: gli-dialog.py:399 +#, python-format +msgid "" +"Choose a mountpoint from the list or choose Other to type your own for " +"partition %(part)s. Current mountpoint is: %(mt)s" +msgstr "" + +#: gli-dialog.py:409 +#, python-format +msgid "Select the filesystem for partition %(part)s. It is currently %(fs)s." +msgstr "" + +#: gli-dialog.py:423 +msgid "" +"The first thing on the new system to setup is the partitoning.\n" +"\tYou will first select a drive and then edit its partitions.\n" +"\tWARNING: CHANGES ARE MADE IMMEDIATELY TO DISK. BE CAREFUL\n" +"\tNOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION \"/\"\n" +"\tIf your drive is pre-partitioned, just select the mountpoints and make \n" +"\tsure that the format option is set to FALSE or it will erase your data.\n" +"\tThe installer does not yet support resizing of partitions (its not safe).\n" +"\tWhen in doubt, **Partition it yourself and then re-run the installer**\n" +"\tPlease refer to the Gentoo Installation Handbook for more information\n" +"\ton partitioning and the various filesystem types available in Linux." +msgstr "" + +#: gli-dialog.py:446 +msgid "" +"Which drive would you like to partition?\n" +" Info provided: Type, Size in MB" +msgstr "" + +#: gli-dialog.py:446 gli-dialog.py:845 gli-dialog.py:880 gli-dialog.py:1012 +msgid "Done" +msgstr "" + +#: gli-dialog.py:456 +msgid " - Unallocated space (" +msgstr "" + +#: gli-dialog.py:458 +msgid "logical, " +msgstr "" + +#: gli-dialog.py:462 +msgid " - Extended Partition (" +msgstr "" + +#: gli-dialog.py:474 gli-dialog.py:480 +msgid "Set Recommended Layout" +msgstr "" + +#: gli-dialog.py:475 gli-dialog.py:485 +msgid "Clear Partitions On This Drive." +msgstr "" + +#: gli-dialog.py:476 +msgid "" +"Select a partition or unallocated space to edit\n" +"Key: Minor, Pri/Ext, Filesystem, Size." +msgstr "" + +#: gli-dialog.py:476 gli-dialog.py:536 gli-dialog.py:584 gli-dialog.py:625 +#: gli-dialog.py:1761 +msgid "Back" +msgstr "" + +#: gli-dialog.py:481 +msgid "" +"This will ERASE YOUR DRIVE and apply a recommended layout. Are you sure you " +"wish to do this?" +msgstr "" + +#: gli-dialog.py:482 +msgid "" +"This is your last chance. Are you SURE you want to CLEAR this drive and set " +"a recommended layout? THERE IS NO TURNING BACK IF YOU SELECT YES." +msgstr "" + +#: gli-dialog.py:486 +msgid "" +"This will remove all partitions on your drive. Are you sure you wish to do " +"this?" +msgstr "" + +#: gli-dialog.py:487 +msgid "" +"This is your last chance. Are you SURE you want to CLEAR this drive? THIS " +"WILL DELETE ANY DATA ON THE DRIVE!" +msgstr "" + +#: gli-dialog.py:499 +#, python-format +msgid "" +"Enter the size of the new partition in MB (max %s MB). If creating an " +"extended partition input its entire size (not just the first logical size):" +msgstr "" + +#: gli-dialog.py:502 +#, python-format +msgid "" +"The size you entered (%(entered)s MB) is larger than the maximum of %(max)s " +"MB" +msgstr "" + +#: gli-dialog.py:505 +msgid "Old, stable, but no journaling" +msgstr "" + +#: gli-dialog.py:506 +msgid "ext2 with journaling and b-tree indexing (RECOMMENDED)" +msgstr "" + +#: gli-dialog.py:507 +msgid "Swap partition for memory overhead" +msgstr "" + +#: gli-dialog.py:508 +msgid "Windows filesystem format used in Win9X and XP" +msgstr "" + +#: gli-dialog.py:512 +msgid "B*-tree based filesystem. great performance. Only V3 supported." +msgstr "" + +#: gli-dialog.py:513 +msgid "Create an extended partition containing other logical partitions" +msgstr "" + +#: gli-dialog.py:514 +msgid "Something else we probably don't support." +msgstr "" + +#: gli-dialog.py:515 +msgid "Choose the filesystem type for this new partition." +msgstr "" + +#: gli-dialog.py:520 +msgid "Please enter the new partition's type:" +msgstr "" + +#: gli-dialog.py:535 gli-dialog.py:539 gli-dialog.py:1249 gli-dialog.py:1760 +#: gli-dialog.py:1823 +msgid "Delete" +msgstr "" + +#: gli-dialog.py:535 gli-dialog.py:545 +msgid "Extra mkfs.* Parameters" +msgstr "" + +#: gli-dialog.py:540 +msgid "Are you sure you want to delete the partition " +msgstr "" + +#: gli-dialog.py:546 +msgid "" +"This feature is coming soon. Please go to console and do it yourself for " +"now." +msgstr "" + +#: gli-dialog.py:555 gli-dialog.py:565 +msgid "Add a new network mount" +msgstr "" + +#: gli-dialog.py:557 +msgid "" +"If you have any network shares you would like to mount during the install " +"and for your new system, define them here. Select a network mount to edit or " +"add a new mount. Currently GLI only supports NFS mounts." +msgstr "" + +#: gli-dialog.py:562 +msgid "ERROR: Could net set network mounts!" +msgstr "" + +#: gli-dialog.py:569 +msgid "Do you want to start portmap to be able to search for NFS mounts?" +msgstr "" + +#: gli-dialog.py:572 +msgid "ERROR: Could not start portmap!" +msgstr "" + +#: gli-dialog.py:574 +msgid "" +"Enter NFS mount or just enter the IP/hostname to search for available mounts" +msgstr "" + +#: gli-dialog.py:582 +msgid "No NFS exports were detected on " +msgstr "" + +#: gli-dialog.py:584 +msgid "Select a NFS export" +msgstr "" + +#: gli-dialog.py:589 +#, python-format +msgid "" +"The address you entered, %s, is not a valid IP or hostname. Please try " +"again." +msgstr "" + +#: gli-dialog.py:598 +msgid "There is already an entry for " +msgstr "" + +#: gli-dialog.py:610 +msgid "Enter a mountpoint" +msgstr "" + +#: gli-dialog.py:613 +msgid "Enter mount options" +msgstr "" + +#: gli-dialog.py:623 +msgid "Stage3 is a basic system that has been built for you (no compiling)." +msgstr "" + +#: gli-dialog.py:624 +msgid "A Stage3 install but using binaries from the LiveCD when able." +msgstr "" + +#: gli-dialog.py:625 +msgid "Which stage do you want to start at?" +msgstr "" + +#: gli-dialog.py:629 +msgid "" +"WARNING: Since you are doing a GRP install it is HIGHLY recommended you " +"choose Create from CD to avoid a potentially broken installation." +msgstr "" + +#: gli-dialog.py:633 gli-dialog.py:638 +msgid "ERROR! Could not set install stage!" +msgstr "" + +#: gli-dialog.py:642 +msgid "Create from CD" +msgstr "" + +#: gli-dialog.py:643 +msgid "Specify URI" +msgstr "" + +#: gli-dialog.py:644 +msgid "" +"Do you want to generate a stage3 on the fly using the files on the LiveCD " +"(fastest) or do you want to grab your stage tarball from the Internet?\n" +msgstr "" + +#: gli-dialog.py:649 +msgid "ERROR: Could not set the stage tarball URI!" +msgstr "" + +#: gli-dialog.py:664 +msgid "" +"Select a mirror to grab the tarball from or select Cancel to enter an URI " +"manually." +msgstr "" + +#: gli-dialog.py:670 +msgid "Select your desired stage tarball:" +msgstr "" + +#: gli-dialog.py:681 +msgid "Specify the stage tarball URI or local file:" +msgstr "" + +#: gli-dialog.py:687 gli-dialog.py:720 gli-dialog.py:1076 +msgid "" +"The specified URI is invalid. It was not saved. Please go back and try " +"again." +msgstr "" + +#: gli-dialog.py:689 +msgid "No URI was specified!" +msgstr "" + +#: gli-dialog.py:699 +msgid "ERROR! Could not set the portage cd snapshot URI!" +msgstr "" + +#: gli-dialog.py:703 +msgid "Normal. Use emerge sync RECOMMENDED!" +msgstr "" + +#: gli-dialog.py:704 +msgid "HTTP daily snapshot. Use when rsync is firewalled." +msgstr "" + +#: gli-dialog.py:705 +msgid "Use a portage snapshot, either a local file or a URL" +msgstr "" + +#: gli-dialog.py:706 +msgid "Extra cases such as if /usr/portage is an NFS mount" +msgstr "" + +#: gli-dialog.py:707 +msgid "" +"Which method do you want to use to sync the portage tree for the " +"installation? If choosing a snapshot you will need to provide the URI for " +"the snapshot if it is not on the livecd." +msgstr "" + +#: gli-dialog.py:716 +msgid "Enter portage tree snapshot URI" +msgstr "" + +#: gli-dialog.py:725 +msgid "No URI was specified! Returning to default emerge sync." +msgstr "" + +#: gli-dialog.py:742 +msgid "" +"The installer will now gather information regarding the contents of /etc/" +"make.conf\n" +"\tOne of the unique (and best) features of Gentoo is the ability to\n" +"\tdefine flags (called USE flags) that define what components are \n" +"\tcompiled into applications. For example, you can enable the alsa\n" +"\tflag and programs that have alsa capability will use it. \n" +"\tThe result is a finely tuned OS with no unnecessary components to\n" +"\tslow you down.\n" +"\tThe installer divides USE flag selection into two screens, one for\n" +"\tglobal USE flags and one for local flags specific to each program.\n" +"\tPlease be patient while the screens load. It may take awhile." +msgstr "" + +#: gli-dialog.py:781 +msgid "Choose which *global* USE flags you want on the new system" +msgstr "" + +#: gli-dialog.py:789 +msgid "Choose which *local* USE flags you want on the new system" +msgstr "" + +#: gli-dialog.py:822 +msgid "Stable" +msgstr "" + +#: gli-dialog.py:823 +msgid "Unstable" +msgstr "" + +#: gli-dialog.py:824 +#, python-format +msgid "" +"Do you want to run the normal stable portage tree, or the bleeding edge " +"unstable (i.e. ACCEPT_KEYWORDS=%s)? If unsure select stable. Stable is " +"required for GRP installs." +msgstr "" + +#: gli-dialog.py:831 gli-dialog.py:839 +msgid "Edit your C Flags and Optimization level" +msgstr "" + +#: gli-dialog.py:832 +msgid "Change the Host Setting" +msgstr "" + +#: gli-dialog.py:833 gli-dialog.py:840 +msgid "Specify number of parallel makes (-j) to perform." +msgstr "" + +#: gli-dialog.py:834 gli-dialog.py:841 +msgid "Change portage functionality settings. (distcc/ccache)" +msgstr "" + +#: gli-dialog.py:835 gli-dialog.py:842 +msgid "Specify mirrors to use for source retrieval." +msgstr "" + +#: gli-dialog.py:836 gli-dialog.py:843 +msgid "Specify server used by rsync to sync the portage tree." +msgstr "" + +#: gli-dialog.py:837 gli-dialog.py:844 +msgid "Specify your own variable and value." +msgstr "" + +#: gli-dialog.py:845 +msgid "" +"For experienced users, the following /etc/make.conf variables can also be " +"defined. Choose a variable to edit or Done to continue." +msgstr "" + +#: gli-dialog.py:849 +msgid "Enter the variable name: " +msgstr "" + +#: gli-dialog.py:856 gli-dialog.py:886 gli-dialog.py:933 +msgid "Enter new value for " +msgstr "" + +#: gli-dialog.py:871 gli-dialog.py:883 +msgid "CLEAR" +msgstr "" + +#: gli-dialog.py:871 +msgid "Erase the current value and start over." +msgstr "" + +#: gli-dialog.py:872 +msgid "Add a CPU optimization (deprecated in GCC 3.4)" +msgstr "" + +#: gli-dialog.py:873 +msgid "Add a CPU optimization (GCC 3.4+)" +msgstr "" + +#: gli-dialog.py:874 +msgid "Add an Architecture optimization" +msgstr "" + +#: gli-dialog.py:875 +msgid "Add optimization level (please do NOT go over 2)" +msgstr "" + +#: gli-dialog.py:876 +msgid "For advanced users only." +msgstr "" + +#: gli-dialog.py:877 +msgid "Common additional flag" +msgstr "" + +#: gli-dialog.py:878 gli-dialog.py:885 gli-dialog.py:1455 gli-dialog.py:1473 +msgid "Manual" +msgstr "" + +#: gli-dialog.py:878 +msgid "Specify your CFLAGS manually" +msgstr "" + +#: gli-dialog.py:880 +msgid "" +"Choose a flag to add to the CFLAGS variable or Done to go back. The current " +"value is: " +msgstr "" + +#: gli-dialog.py:891 +#, python-format +msgid "Enter the new value for %s (value only):" +msgstr "" + +#: gli-dialog.py:902 +msgid "Choose from the available CHOSTs for your architecture." +msgstr "" + +#: gli-dialog.py:908 +msgid "" +"Presently the only use is for specifying the number of parallel makes (-j) " +"to perform. The suggested number for parallel makes is CPUs+1. Enter the " +"NUMBER ONLY:" +msgstr "" + +#: gli-dialog.py:914 +msgid "enables sandboxing when running emerge and ebuild." +msgstr "" + +#: gli-dialog.py:915 +msgid "enables ccache support via CC." +msgstr "" + +#: gli-dialog.py:916 +msgid "enables distcc support via CC." +msgstr "" + +#: gli-dialog.py:917 +msgid "enables distfiles locking using fcntl or hardlinks." +msgstr "" + +#: gli-dialog.py:918 +msgid "create binaries of all packages emerged" +msgstr "" + +#: gli-dialog.py:919 +msgid "Input your list of FEATURES manually." +msgstr "" + +#: gli-dialog.py:920 +msgid "" +"FEATURES are settings that affect the functionality of portage. Most of " +"these settings are for developer use, but some are available to non-" +"developers as well." +msgstr "" + +#: gli-dialog.py:925 +msgid "Enter the value of FEATURES: " +msgstr "" + +#: gli-dialog.py:942 gli-dialog.py:999 +msgid "ERROR! Could not set the make_conf correctly!" +msgstr "" + +#: gli-dialog.py:948 +msgid "" +"Do you want to use distcc to compile your extra packages during the install " +"and for future compilations as well?" +msgstr "" + +#: gli-dialog.py:963 gli-dialog.py:1517 gli-dialog.py:1582 +msgid "ERROR! Could not set the services list." +msgstr "" + +#: gli-dialog.py:969 +msgid "ERROR! Could not set the install distcc flag!" +msgstr "" + +#: gli-dialog.py:990 +msgid "" +"Enter the hosts to be used by distcc for compilation:\n" +"Example: localhost 192.168.0.2 192.168.0.3:4000/10" +msgstr "" + +#: gli-dialog.py:1007 +msgid "A list of DEPEND atoms to mask." +msgstr "" + +#: gli-dialog.py:1008 +msgid "A list of packages to unmask." +msgstr "" + +#: gli-dialog.py:1009 +msgid "Per-package KEYWORDS (like ACCEPT_KEYWORDS)." +msgstr "" + +#: gli-dialog.py:1010 +msgid "Per-package USE flags." msgstr "" -#: gli-dialog.py:186 +#: gli-dialog.py:1011 +msgid "Type your own name of a file to edit in /etc/" +msgstr "" + +#: gli-dialog.py:1012 msgid "" -"Are the profiles being generated to be used for an install on the current " -"computer?" +"For experienced users, the following /etc/* variables can also be defined. " +"Choose a variable to edit or Done to continue." msgstr "" -#: gli-dialog.py:190 +#: gli-dialog.py:1017 msgid "" +"Enter the name of the /etc/ file you would like to edit (DO NOT type /etc/)" +msgstr "" + +#: gli-dialog.py:1024 +msgid "Enter new contents (use \\n for newline) of " +msgstr "" + +#: gli-dialog.py:1031 +msgid "ERROR! Could not set etc/portage/* correctly!" +msgstr "" + +#: gli-dialog.py:1038 +msgid "Copy over the current running kernel (fastest)" +msgstr "" + +#: gli-dialog.py:1039 +msgid "The Unaltered Linux Kernel ver 2.6+ (safest)" +msgstr "" + +#: gli-dialog.py:1040 +msgid "Gentoo's optimized 2.6+ kernel. (less safe)" +msgstr "" + +#: gli-dialog.py:1041 +msgid "Hardened sources for the 2.6 kernel tree" +msgstr "" + +#: gli-dialog.py:1042 +msgid "Vanilla sources with grsecurity patches" +msgstr "" + +#: gli-dialog.py:1043 +msgid "Choose one of the other sources available." +msgstr "" + +#: gli-dialog.py:1044 +msgid "" +"Choose which kernel sources to use for your system. If using a previously-" +"made kernel configuration, make sure the sources match the kernel used to " +"create the configuration." +msgstr "" + +#: gli-dialog.py:1048 +msgid "Please enter the desired kernel sources package name:" +msgstr "" + +#: gli-dialog.py:1053 +msgid "ERROR! Could not set the kernel source package!" +msgstr "" + +#: gli-dialog.py:1056 +msgid "Genkernel" +msgstr "" + +#: gli-dialog.py:1057 +msgid "Traditional (requires a config!)" +msgstr "" + +#: gli-dialog.py:1058 +msgid "" +"There are currently two ways the installer can compile a kernel for your new " +"system. You can either provide a previously-made kernel configuration file " +"and use the traditional kernel-compiling procedure (no initrd) or have " +"genkernel automatically create your kernel for you (with initrd). \n" "\n" -"The first profile needed for an advanced install includes all the \n" -"necessary information for getting the livecd environment set up. \n" -"This includes the livecd networking configuration, where the \n" -"logfile and new root mount point are to be located, etc. \n" -"We call this the ClientConfiguration profile.\n" -"Do you have a previously generated XML file for the ClientConfiguration?\n" +" If you do not have a previously-made kernel configuration, YOU MUST CHOOSE " +"Genkernel. Choose which method you want to use." msgstr "" -#: gli-dialog.py:199 gli-dialog.py:229 -msgid "Enter the filename of the XML file" +#: gli-dialog.py:1065 +msgid "Do you want the bootsplash screen to show up on bootup?" +msgstr "" + +#: gli-dialog.py:1072 +msgid "" +"If you have a custom kernel configuration, enter its location (otherwise " +"just press Enter to continue):" +msgstr "" + +#: gli-dialog.py:1081 +msgid "ERROR! Could not set the kernel config URI!" +msgstr "" + +#: gli-dialog.py:1104 gli-dialog.py:1106 +msgid "GRand Unified Bootloader, newer, RECOMMENDED" +msgstr "" + +#: gli-dialog.py:1108 +msgid "LInux LOader, older, traditional.(detects windows partitions)" msgstr "" -#: gli-dialog.py:204 gli-dialog.py:234 -msgid "Cannot open file " +#: gli-dialog.py:1110 +msgid "Do not install a bootloader. (System may be unbootable!)" msgstr "" -#: gli-dialog.py:228 +#: gli-dialog.py:1111 msgid "" -"All of the installation settings are stored in an XML file, which we call " -"the InstallProfile. If you have previously saved a profile and would like " -"to load it for this install, say Yes. Otherwise say No. Do you have a " -"previously generated InstallProfile XML file?" +"To boot successfully into your new Linux system, a bootloader will be " +"needed. If you already have a bootloader you want to use you can select " +"None here. The bootloader choices available are dependent on what GLI " +"supports and what architecture your system is. Choose a bootloader" msgstr "" -#: gli-dialog.py:254 -msgid "Installation Started!" +#: gli-dialog.py:1118 +msgid "ERROR! Could not set boot loader pkg! " msgstr "" -#: gli-dialog.py:254 -msgid "Installation progress" +#: gli-dialog.py:1123 +msgid "" +"Most bootloaders have the ability to install to either the Master Boot " +"Record (MBR) or some other partition. Most people will want their " +"bootloader installed on the MBR for successful boots, but if you have " +"special circumstances, you can have the bootloader installed to the /boot " +"partition instead. Do you want the boot loader installed in the MBR? (YES " +"is RECOMMENDED)" msgstr "" -#: gli-dialog.py:270 +#: gli-dialog.py:1131 +#, python-format msgid "" -"There was an Exception received during the install that is outside of the " -"normal install errors. This is a bad thing. The error was:" +"Your boot device may not be correct. It is currently set to %s, but this " +"device may not be the first to boot. Usually boot devices end in 'a' such " +"as hda or sda." +msgstr "" + +#: gli-dialog.py:1132 +msgid " Please confirm your boot device by choosing it from the menu." +msgstr "" + +#: gli-dialog.py:1136 +msgid "" +"ERROR: No drives set up. Please complete the Partitioning screen first!" +msgstr "" + +#: gli-dialog.py:1145 +msgid "ERROR! Could not set the boot device!" +msgstr "" + +#: gli-dialog.py:1147 +msgid "" +"If you have any additional optional arguments you want to pass to the kernel " +"at boot, type them here or just press Enter to continue:" +msgstr "" + +#: gli-dialog.py:1152 gli-dialog.py:1157 +msgid "ERROR! Could not set bootloader kernel arguments! " +msgstr "" + +#: gli-dialog.py:1171 +msgid "" +"Please select the timezone for the new installation. Entries ending with " +"a / can be selected to reveal a sub-list of more specific locations. For " +"example, you can select America/ and then Chicago." +msgstr "" + +#: gli-dialog.py:1185 +msgid "ERROR: Could not set that timezone!" +msgstr "" + +#: gli-dialog.py:1192 +msgid "" +"Here you will enter all of your network interface information for the new " +"system. You can either choose a network interface to edit, add a network " +"interface, delete an interface, or edit the miscellaneous options such as " +"hostname and proxy servers." +msgstr "" + +#: gli-dialog.py:1197 gli-dialog.py:1285 +msgid "Settings: DHCP. Options: " +msgstr "" + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid "IP: " +msgstr "" + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid " Broadcast: " +msgstr "" + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid " Netmask: " +msgstr "" + +#: gli-dialog.py:1200 +msgid "Add a new network interface" +msgstr "" + +#: gli-dialog.py:1206 +msgid "ERROR! Could not set the network interfaces!" +msgstr "" + +#: gli-dialog.py:1216 +msgid "" +"Choose an interface from the list or Other to type your own if it was not " +"detected." +msgstr "" + +#: gli-dialog.py:1219 +msgid "Enter name for new interface (eth0, ppp0, etc.)" msgstr "" -#: gli-dialog.py:270 +#: gli-dialog.py:1223 +msgid "An interface with the name is already defined." +msgstr "" + +#: gli-dialog.py:1237 gli-dialog.py:1262 +msgid "" +"Enter your networking information: (See Chapter 3 of the Handbook for more " +"information) Your broadcast address is probably your IP address with 255 as " +"the last tuple. Do not press Enter until all fields are complete!" +msgstr "" + +#: gli-dialog.py:1248 +msgid "Edit" +msgstr "" + +#: gli-dialog.py:1250 +#, python-format +msgid "" +"For interface %s, you can either edit the interface information (IP Address, " +"Broadcast, Netmask) or Delete the interface." +msgstr "" + +#: gli-dialog.py:1276 +msgid "Are you sure you want to remove the interface " +msgstr "" + +#: gli-dialog.py:1288 +msgid "" +"To be able to surf on the internet, you must know which host shares the " +"Internet connection. This host is called the gateway. It is usually similar " +"to your IP address, but ending in .1\n" +"If you have DHCP then just select your primary Internet interface (no IP " +"will be needed) Start by choosing which interface accesses the Internet:" +msgstr "" + +#: gli-dialog.py:1296 +msgid "Enter the gateway IP address for " +msgstr "" + +#: gli-dialog.py:1300 +msgid "Invalid IP Entered! Please try again." +msgstr "" + +#: gli-dialog.py:1305 +#, python-format +msgid "" +"ERROR! Coult not set the default gateway with IP %(ip)s for interface %" +"(iface)s" +msgstr "" + +#: gli-dialog.py:1320 gli-dialog.py:1333 +msgid "" +"Fill out the remaining networking settings. The hostname is manditory as " +"that is the name of your computer. Leave the other fields blank if you are " +"not using them. If using DHCP you do not need to enter DNS servers. Do not " +"press Enter until all fields are complete!" +msgstr "" + +#: gli-dialog.py:1321 gli-dialog.py:1334 +msgid "Enter your Hostname:" +msgstr "" + +#: gli-dialog.py:1322 gli-dialog.py:1335 +msgid "Enter your Domain Name:" +msgstr "" + +#: gli-dialog.py:1323 +msgid "Enter your NIS Domain Name:" +msgstr "" + +#: gli-dialog.py:1324 gli-dialog.py:1336 +msgid "Enter a primary DNS server:" +msgstr "" + +#: gli-dialog.py:1325 gli-dialog.py:1337 +msgid "Enter a backup DNS server:" +msgstr "" + +#: gli-dialog.py:1344 +msgid "Incorrect hostname! It must be a string. Not saved." +msgstr "" + +#: gli-dialog.py:1350 +msgid "ERROR! Could not set the hostname:" +msgstr "" + +#: gli-dialog.py:1354 +msgid "Incorrect domainname! It must be a string. Not saved." +msgstr "" + +#: gli-dialog.py:1360 +msgid "ERROR! Could not set the domainname:" +msgstr "" + +#: gli-dialog.py:1364 +msgid "Incorrect nisdomainname! It must be a string. Not saved." +msgstr "" + +#: gli-dialog.py:1370 +msgid "ERROR! Could not set the nisdomainname:" +msgstr "" + +#: gli-dialog.py:1374 +msgid "Incorrect Primary DNS Server! Not saved." +msgstr "" + +#: gli-dialog.py:1379 +msgid "Incorrect Backup DNS Server! Not saved." +msgstr "" + +#: gli-dialog.py:1386 +msgid "ERROR! Could not set the DNS Servers:" +msgstr "" + +#: gli-dialog.py:1390 +msgid "Incorrect HTTP Proxy! It must be a uri. Not saved." +msgstr "" + +#: gli-dialog.py:1396 +msgid "ERROR! Could not set the HTTP Proxy:" +msgstr "" + +#: gli-dialog.py:1400 +msgid "Incorrect FTP Proxy! It must be a uri. Not saved." +msgstr "" + +#: gli-dialog.py:1406 +msgid "ERROR! Could not set the FTP Proxy:" +msgstr "" + +#: gli-dialog.py:1410 +msgid "Incorrect RSYNC Proxy! It must be a uri. Not saved." +msgstr "" + +#: gli-dialog.py:1416 +msgid "ERROR! Could not set the RSYNC Proxy:" +msgstr "" + +#: gli-dialog.py:1422 +msgid "Paul Vixie's cron daemon, fully featured, RECOMMENDED." +msgstr "" + +#: gli-dialog.py:1423 +msgid "A cute little cron from Matt Dillon." +msgstr "" + +#: gli-dialog.py:1424 +msgid "A scheduler with extended capabilities over cron & anacron" +msgstr "" + +#: gli-dialog.py:1425 +msgid "Don't use a cron daemon. (NOT Recommended!)" +msgstr "" + +#: gli-dialog.py:1426 +msgid "" +"A cron daemon executes scheduled commands. It is very handy if you need to " +"execute some command regularly (for instance daily, weekly or monthly). " +"Gentoo offers three possible cron daemons: dcron, fcron and vixie-cron. " +"Installing one of them is similar to installing a system logger. However, " +"dcron and fcron require an extra configuration command, namely crontab /etc/" +"crontab. If you don't know what to choose, use vixie-cron. If doing a " +"networkless install, choose vixie-cron. Choose your cron daemon:" +msgstr "" + +#: gli-dialog.py:1435 +msgid "An advanced system logger." +msgstr "" + +#: gli-dialog.py:1436 +msgid "A Highly-configurable system logger." +msgstr "" + +#: gli-dialog.py:1437 +msgid "The traditional set of system logging daemons." +msgstr "" + +#: gli-dialog.py:1438 +msgid "" +"Linux has an excellent history of logging capabilities -- if you want you " +"can log everything that happens on your system in logfiles. This happens " +"through the system logger. Gentoo offers several system loggers to choose " +"from. If you plan on using sysklogd or syslog-ng you might want to install " +"logrotate afterwards as those system loggers don't provide any rotation " +"mechanism for the log files. If doing networkless, choose syslog-ng. " +"Choose a system logger:" +msgstr "" + +#: gli-dialog.py:1458 +msgid "" +"There are thousands of applications available to Gentoo users through " +"Portage, Gentoo's package management system. Select some of the more common " +"ones below or add your own additional package list by choosing 'Manual'." +msgstr "" + +#: gli-dialog.py:1459 msgid "" "\n" -"Please submit a bug report (after searching to make sure it's not a known " -"issue and verifying you didn't do something stupid) with the contents of /" -"var/log/install.log and /tmp/installprofile.xml and the version of the " -"installer you used\n" -"Do you want to cleanup your system to attempt another install?" +"Your current package list is: " +msgstr "" + +#: gli-dialog.py:1466 +msgid "ERROR! Could not set the install packages! List of packages:" +msgstr "" + +#: gli-dialog.py:1474 +msgid "Enter a space-separated list of extra packages to install on the system" +msgstr "" + +#: gli-dialog.py:1489 +msgid "" +"Choose from the listed packages. If doing a networkless install, only " +"choose (GRP) packages." +msgstr "" + +#: gli-dialog.py:1508 +msgid "Do you want to start X on bootup?" +msgstr "" + +#: gli-dialog.py:1553 +msgid "ALSA Sound Daemon" +msgstr "" + +#: gli-dialog.py:1554 +msgid "Common web server (version 1.x)" +msgstr "" + +#: gli-dialog.py:1555 +msgid "Common web server (version 2.x)" +msgstr "" + +#: gli-dialog.py:1556 +msgid "Distributed Compiling System" +msgstr "" + +#: gli-dialog.py:1557 +msgid "ESD Sound Daemon" +msgstr "" + +#: gli-dialog.py:1558 +msgid "Hard Drive Tweaking Utility" +msgstr "" + +#: gli-dialog.py:1559 +msgid "Run scripts found in /etc/conf.d/local.start" +msgstr "" + +#: gli-dialog.py:1560 +msgid "Port Mapping Service" +msgstr "" + +#: gli-dialog.py:1561 +msgid "Common FTP server" +msgstr "" + +#: gli-dialog.py:1562 +msgid "SSH Daemon (allows remote logins)" +msgstr "" + +#: gli-dialog.py:1563 +msgid "X Font Server" +msgstr "" + +#: gli-dialog.py:1564 +msgid "X Daemon" +msgstr "" + +#: gli-dialog.py:1565 +msgid "Manually specify your services in a comma-separated list." +msgstr "" + +#: gli-dialog.py:1566 +msgid "" +"Choose the services you want started on bootup. Note that depending on what " +"packages are selected, some services listed will not exist." +msgstr "" + +#: gli-dialog.py:1574 +msgid "Enter a comma-separated list of services to start on boot" +msgstr "" + +#: gli-dialog.py:1599 +msgid "" +"Additional configuration settings for Advanced users (rc.conf)\n" +"Here are some other variables you can set in various configuration files on " +"the new system. If you don't know what a variable does, don't change it!" +msgstr "" + +#: gli-dialog.py:1600 +msgid "Use KEYMAP to specify the default console keymap." +msgstr "" + +#: gli-dialog.py:1601 +msgid "Decision to first load the 'windowkeys' console keymap" +msgstr "" + +#: gli-dialog.py:1602 +msgid "maps to load for extended keyboards. Most users will leave this as is." +msgstr "" + +#: gli-dialog.py:1603 +msgid "Specifies the default font that you'd like Linux to use on the console." +msgstr "" + +#: gli-dialog.py:1604 +msgid "The charset map file to use." +msgstr "" + +#: gli-dialog.py:1605 +msgid "Set the clock to either UTC or local" +msgstr "" + +#: gli-dialog.py:1606 +msgid "Set EDITOR to your preferred editor." +msgstr "" + +#: gli-dialog.py:1607 +msgid "What display manager do you use ? [ xdm | gdm | kdm | entrance ]" +msgstr "" + +#: gli-dialog.py:1608 +msgid "a new variable to control what window manager to start default with X" +msgstr "" + +#: gli-dialog.py:1615 +msgid "Choose your desired keymap:" +msgstr "" + +#: gli-dialog.py:1624 +msgid "" +"Should we first load the 'windowkeys' console keymap? Most x86 users will " +"say 'yes' here. Note that non-x86 users should leave it as 'no'." +msgstr "" + +#: gli-dialog.py:1629 +msgid "" +"This sets the maps to load for extended keyboards. Most users will leave " +"this as is. Enter new value for EXTENDED_KEYMAPS" +msgstr "" + +#: gli-dialog.py:1632 +msgid "Choose your desired console font:" +msgstr "" + +#: gli-dialog.py:1638 +msgid "Choose your desired console translation:" +msgstr "" + +#: gli-dialog.py:1646 +msgid "" +"Should CLOCK be set to UTC or local? Unless you set your timezone to UTC " +"you will want to choose local." +msgstr "" + +#: gli-dialog.py:1651 +msgid "Default editor." +msgstr "" + +#: gli-dialog.py:1651 +msgid "vi improved editor." +msgstr "" + +#: gli-dialog.py:1651 +msgid "The emacs editor." +msgstr "" + +#: gli-dialog.py:1652 +msgid "Choose your default editor: " +msgstr "" + +#: gli-dialog.py:1654 +msgid "X Display Manager" +msgstr "" + +#: gli-dialog.py:1655 +msgid "Gnome Display Manager" +msgstr "" + +#: gli-dialog.py:1656 +msgid "KDE Display Manager" +msgstr "" + +#: gli-dialog.py:1657 +msgid "Login Manager for Enlightenment" +msgstr "" + +#: gli-dialog.py:1658 +msgid "" +"Choose your desired display manager to use when starting X (note you must " +"make sure that package also gets installed for it to work):" +msgstr "" + +#: gli-dialog.py:1660 +msgid "" +"Choose what window manager you want to start default with X if run with xdm, " +"startx, or xinit. (common options are Gnome or Xsession):" +msgstr "" + +#: gli-dialog.py:1697 +msgid "" +"Please enter your desired password for the root account. (note it will not " +"show the password. Also do not try to use backspace.):" +msgstr "" + +#: gli-dialog.py:1700 +msgid "Enter the new root password again for confirmation" +msgstr "" + +#: gli-dialog.py:1704 +msgid "The passwords do not match. Please try again or cancel." +msgstr "" + +#: gli-dialog.py:1709 +msgid "ERROR! Could not set the new system root password!" +msgstr "" + +#: gli-dialog.py:1710 gli-dialog.py:1775 +msgid "Password saved. Press Enter to continue." msgstr "" -#: gli-dialog.py:275 +#: gli-dialog.py:1723 gli-dialog.py:1737 +msgid "Add user" +msgstr "" + +#: gli-dialog.py:1724 +msgid "" +"Working as root on a Unix/Linux system is dangerous and should be avoided as " +"much as possible. Therefore it is strongly recommended to add a user for day-" +"to-day use. Choose a user to edit:" +msgstr "" + +#: gli-dialog.py:1734 +msgid "ERROR! Could not set the additional users!" +msgstr "" + +#: gli-dialog.py:1738 +msgid "Enter the username for the new user" +msgstr "" + +#: gli-dialog.py:1742 +msgid "A user with that name already exists" +msgstr "" + +#: gli-dialog.py:1746 +#, python-format +msgid "Enter the new password for user %s. (will not be echoed)" +msgstr "" + +#: gli-dialog.py:1747 +msgid "Enter the new password again for confirmation" +msgstr "" + +#: gli-dialog.py:1750 +msgid "The passwords do not match! Please try again." +msgstr "" + +#: gli-dialog.py:1754 +msgid "" +"You must enter a password for the user! Even a blank password will do. You " +"can always edit it again later from the menu." +msgstr "" + +#: gli-dialog.py:1760 gli-dialog.py:1765 +msgid "Password" +msgstr "" + +#: gli-dialog.py:1760 gli-dialog.py:1777 +msgid "Group Membership" +msgstr "" + +#: gli-dialog.py:1760 gli-dialog.py:1801 +msgid "Shell" +msgstr "" + +#: gli-dialog.py:1760 gli-dialog.py:1806 +msgid "Home Directory" +msgstr "" + +#: gli-dialog.py:1760 gli-dialog.py:1811 +msgid "UID" +msgstr "" + +#: gli-dialog.py:1760 gli-dialog.py:1818 +msgid "Comment" +msgstr "" + +#: gli-dialog.py:1761 +#, python-format +msgid "Choose an option for user %s" +msgstr "" + +#: gli-dialog.py:1766 +msgid "Enter the new password" +msgstr "" + +#: gli-dialog.py:1769 +msgid "Enter the new password again" +msgstr "" + +#: gli-dialog.py:1773 +msgid "The passwords do not match! Try again." +msgstr "" + +#: gli-dialog.py:1779 +msgid "The usual group for normal users." +msgstr "" + +#: gli-dialog.py:1780 +msgid "Allows users to attempt to su to root." +msgstr "" + +#: gli-dialog.py:1781 +msgid "Allows access to audio devices." +msgstr "" + +#: gli-dialog.py:1782 +msgid "Allows access to games." +msgstr "" + +#: gli-dialog.py:1783 gli-dialog.py:1784 gli-dialog.py:1785 gli-dialog.py:1786 +msgid "For users who know what they're doing only." +msgstr "" + +#: gli-dialog.py:1787 +msgid "Manually specify your groups in a comma-separated list." +msgstr "" + +#: gli-dialog.py:1788 #, python-format +msgid "Select which groups you would like the user %s to be in." +msgstr "" + +#: gli-dialog.py:1798 +msgid "Enter a comma-separated list of groups the user is to be in" +msgstr "" + +#: gli-dialog.py:1802 +msgid "Enter the shell you want the user to use. default is /bin/bash. " +msgstr "" + +#: gli-dialog.py:1807 +msgid "Enter the user's home directory. default is /home/username. " +msgstr "" + +#: gli-dialog.py:1812 msgid "" -"On step %d of %d. Current step: %s\n" -"%s" +"Enter the user's UID. If left blank the system will choose a default value " +"(this is recommended)." +msgstr "" + +#: gli-dialog.py:1819 +msgid "Enter the user's comment. This is completely optional." +msgstr "" + +#: gli-dialog.py:1827 +#, python-format +msgid "Are you sure you want to delete the user %s ?" +msgstr "" + +#: gli-dialog.py:1835 +msgid "Would you like to save these install settings for use again later?" msgstr "" -#: gli-dialog.py:282 +#: gli-dialog.py:1839 +msgid "Enter a filename for the XML file. Use full path!" +msgstr "" + +#: gli-dialog.py:1843 #, python-format -msgid "On step %d of %d. Current step: %s" +msgid "The file %s already exists. Do you want to overwrite it?" +msgstr "" + +#: gli-dialog.py:1850 +msgid "" +"Error. File couldn't be saved. Saving to /tmp/installprofile.xml instead." +msgstr "" + +#: gli-dialog.py:1856 +msgid "Complete failure to save install profile!" msgstr "" -#: gli-dialog.py:289 +#: gli-dialog.py:1952 msgid "Install completed!" msgstr "" -#: gli-dialog.py:291 +#: gli-dialog.py:1954 msgid "Install done!" msgstr "" + +#: gli-dialog.py:1970 +#, python-format +msgid "" +"There was an Exception received during the install that is outside of the " +"normal install errors. This is a bad thing. The error was: %s \n" +" You have several ways of handling this. If you cannot resolve it, please " +"submit a bug report (after searching to make sure it's not a known issue and " +"verifying you didn't do something stupid) with the contents of /var/log/" +"install.log and /tmp/installprofile.xml and the version of the installer you " +"used." +msgstr "" + +#: gli-dialog.py:2002 +msgid "Installation Started!" +msgstr "" + +#: gli-dialog.py:2002 gli-dialog.py:2005 +msgid "Installation progress" +msgstr "" + +#: gli-dialog.py:2005 +msgid "Continuing Installation" +msgstr "" + +#: gli-dialog.py:2025 +#, python-format +msgid "" +"On step %(A)d of %(B)d. Current step: %(C)s\n" +"%(D)s" +msgstr "" + +#: gli-dialog.py:2036 +#, python-format +msgid "On step %(A)d of %(B)d. Current step: %(C)s" +msgstr "" diff --git a/src/fe/dialog/languages/hu/GLIInstallProfile.hu.po b/src/fe/dialog/languages/hu/GLIInstallProfile.hu.po new file mode 100644 index 0000000..69a411a --- /dev/null +++ b/src/fe/dialog/languages/hu/GLIInstallProfile.hu.po @@ -0,0 +1,303 @@ +# Gentoo Linux Installer. +# Copyright (C) 2006 +# This file is distributed under the same license as the Gentoo Linux Installer. +# Preston Cody <codeman@gentoo.org>, 2006. +# + +#: GLIInstallProfile.py:586 +msgid "Popular Desktop Applications" +msgstr "Népszerű asztali alkalmazások" + +#: GLIInstallProfile.py:587 +msgid "GTK+ music player" +msgstr "GTK+ zenelejátszó" + +#: GLIInstallProfile.py:588 +msgid "A GTK+ tagging program for MP3, OGG, FLAC, and more" +msgstr "GTK+ program az MP3, OGG, FLAC (és társai) megjegyzéseinek szerkesztésére" + +#: GLIInstallProfile.py:589 +msgid "A GNOME groupware application, a Microsoft Outlook workalike" +msgstr "Egy GNOME csoportmunka-alkalmazás, a Microsoft Outlookhoz hasonló" + +#: GLIInstallProfile.py:590 +msgid "GTK+ Instant Messenger client" +msgstr "GTK+ azonnali üzenetküldő kliens" + +#: GLIInstallProfile.py:591 +msgid "GTK+ FTP Client" +msgstr "GTK+ FTP kliens" + +#: GLIInstallProfile.py:592 +msgid "GNU Image Manipulation Program" +msgstr "GNU képszerkesztő program" + +#: GLIInstallProfile.py:593 +msgid "GNOME CD Writing Software" +msgstr "GNOME CD-író szoftver" + +#: GLIInstallProfile.py:594 +msgid "GTK+ application for transferring pictures from a digital camera" +msgstr "GTK+ alkalmazás a képek digitális kameráról való letöltéséhez" + +#: GLIInstallProfile.py:595 +msgid "A SVG based generic vector-drawing program" +msgstr "Egy SVG alapú általános vektor-rajzoló program" + +#: GLIInstallProfile.py:596 +msgid "KDE CD Writing Software" +msgstr "KDE CD-író szoftver" + +#: GLIInstallProfile.py:597 +msgid "An integrated office suite for KDE, the K Desktop Environment" +msgstr "Egy integrált irodai alkalmazás KDE-hez" + +#: GLIInstallProfile.py:598 +msgid "The Mozilla Suite" +msgstr "A Mozilla alkalmazás-csomag" + +#: GLIInstallProfile.py:599 +msgid "The Mozilla Firefox Web Browser" +msgstr "A Mozilla Firefox webböngésző" + +#: GLIInstallProfile.py:600 +msgid "Thunderbird Mail Client" +msgstr "Thunderbird levelező kliens" + +#: GLIInstallProfile.py:601 +msgid "Media Player for Linux" +msgstr "Médialejátszó Linuxra" + +#: GLIInstallProfile.py:602 +msgid "OpenOffice.org, a full office productivity suite." +msgstr "OpenOffice.org, egy teljeskörű irodai alkalmazáscsomag" + +#: GLIInstallProfile.py:603 +msgid "Same as OpenOffice but a binary package (no compiling!)" +msgstr "Az OpenOffice bináris csomagban (nem kell lefordítani!)" + +#: GLIInstallProfile.py:604 +msgid "GTK news reader" +msgstr "GTK hírolvasó" + +#: GLIInstallProfile.py:605 +msgid "Music management and playback software for GNOME" +msgstr "Zenerendszerező és -lejátszó alkalmazás GNOME-ra" + +#: GLIInstallProfile.py:606 +msgid "Open replacement for the Mozilla Suite" +msgstr "A Mozilla nyílt forráskódú alternatívája" + +#: GLIInstallProfile.py:607 +#: GLIInstallProfile.py:608 +msgid "A light weight email client and news reader" +msgstr "Könnyűsúlyú email kliens és hírolvasó" + +#: GLIInstallProfile.py:609 +msgid "VLC media player - Video player and streamer" +msgstr "VLC médialejátszó - Video lejátszó és streamer" + +#: GLIInstallProfile.py:610 +msgid "GTK+ Graphical IRC Client" +msgstr "GTK+ grafikus IRC kliens" + +#: GLIInstallProfile.py:611 +msgid "Xine movie player" +msgstr "Xine mozilejátszó" + +#: GLIInstallProfile.py:612 +msgid "X MultiMedia System" +msgstr "X Multimédia Rendszer" + +#: GLIInstallProfile.py:613 +msgid "Applications often found on servers." +msgstr "Szervereken használatos programok" + +#: GLIInstallProfile.py:614 +msgid "Apache Web Server" +msgstr "Apache webszerver" + +#: GLIInstallProfile.py:615 +msgid "The Common Unix Printing System" +msgstr "Az általános UNIX nyomtató-rendszer (CUPS)" + +#: GLIInstallProfile.py:616 +msgid "A highly configurable, drop-in replacement for sendmail" +msgstr "Egy alaposan konfigurálható levelező a sendmail leváltására" + +#: GLIInstallProfile.py:617 +msgid "Linux kernel (2.4+) firewall, NAT and packet mangling tools" +msgstr "Eszközök a Linux kernelben (2.4+) lévő tűzfal, NAT és csomagszűrő kezeléséhez" + +#: GLIInstallProfile.py:618 +msgid "Apache module for PHP" +msgstr "Apache modul PHP-hoz" + +#: GLIInstallProfile.py:619 +msgid "A fast, multi-threaded, multi-user SQL database server" +msgstr "Egy gyors, többszálas, többfelhasználós SQL adatbázis-szerver" + +#: GLIInstallProfile.py:620 +msgid "The PHP scripting language" +msgstr "A PHP szkriptelt nyelv" + +#: GLIInstallProfile.py:621 +msgid "A fast and secure drop-in replacement for sendmail" +msgstr "Egy gyors és biztonságos sendmail-szerű levelező" + +#: GLIInstallProfile.py:622 +msgid "sophisticated Object-Relational DBMS" +msgstr "egy bonyolult objektum-relációs adatbázis-kezelő (DBMS)" + +#: GLIInstallProfile.py:623 +msgid "ProFTP Server" +msgstr "ProFTP szerver" + +#: GLIInstallProfile.py:624 +msgid "SAMBA client/server programs for UNIX" +msgstr "SAMBA kliens/szerver programok UNIX-ra" + +#: GLIInstallProfile.py:625 +msgid "Widely-used Mail Transport Agent (MTA)" +msgstr "Széleskörben használt Levél Kézbesítő Ügynök" + +#: GLIInstallProfile.py:626 +msgid "Window managers and X selection." +msgstr "Ablakkezelők és X kiválasztása." + +#: GLIInstallProfile.py:627 +msgid "The Gnome Desktop Environment" +msgstr "A Gnome asztali környezet" + +#: GLIInstallProfile.py:628 +msgid "The K Desktop Environment" +msgstr "A K asztali környezet" + +#: GLIInstallProfile.py:629 +msgid "A small, fast, full-featured window manager for X" +msgstr "Egy kicsi, gyors, teljes szolgáltatást nyújtó ablakkezelő X-re" + +#: GLIInstallProfile.py:630 +msgid "Enlightenment Window Manager" +msgstr "Enlightenment ablakkezelő" + +#: GLIInstallProfile.py:631 +msgid "Fluxbox is an X11 window manager featuring tabs and an iconbar" +msgstr "A Fluxbox egy füleket és ikonsort ismerő ablakkezelő" + +#: GLIInstallProfile.py:632 +msgid "IceWM is designed for speed, size, and simplicity" +msgstr "Az IceWM tulajdonságai: gyorsaság, méret, egyszerűség" + +#: GLIInstallProfile.py:633 +msgid "Windowmaker is a window manager featuring the look and feel of NEXTSTEP" +msgstr "A WindowMaker a régi NextStep kinézetét, használhatóságát valósítja meg" + +#: GLIInstallProfile.py:634 +msgid "XFCE Desktop Environment" +msgstr "XFCE asztali környezet" + +#: GLIInstallProfile.py:635 +msgid "An X11 implementation maintained by the X.Org Foundation" +msgstr "Egy X11 implementáció az X.Org Alapítványtól" + +#: GLIInstallProfile.py:636 +msgid "Miscellaneous Applications you may want." +msgstr "Különféle alkalmazások." + +#: GLIInstallProfile.py:637 +msgid "tool for distributing files via a distributed network of nodes" +msgstr "Elosztott hálózaton történő fájlátvitel eszközei" + +#: GLIInstallProfile.py:638 +msgid "GTK+ Web IDE" +msgstr "GTK+ Web IDE" + +#: GLIInstallProfile.py:639 +msgid "An incredibly powerful, extensible text editor" +msgstr "Hihetetlenül nagy tudású, bővíthető szövegszerkesztő" + +#: GLIInstallProfile.py:640 +msgid "Single process stack of various system monitors" +msgstr "Különféle rendszermonitorozó eszközök" + +#: GLIInstallProfile.py:641 +msgid "GUI version of the Vim text editor" +msgstr "GUI alapú Vim szövegszerkesztő" + +#: GLIInstallProfile.py:642 +msgid "ssh-agent manager" +msgstr "az ssh-ügynök kezelője" + +#: GLIInstallProfile.py:643 +msgid "Rotates, compresses, and mails system logs" +msgstr "A rendszerlogokat kezeli, tömöríti, levélben elküldi" + +#: GLIInstallProfile.py:644 +msgid "Network Time Protocol suite/programs" +msgstr "Hálózati Idő Protokol (NTP) kliens/szerver" + +#: GLIInstallProfile.py:645 +msgid "A Remote Desktop Protocol Client" +msgstr "Egy Távoli Asztal kliens" + +#: GLIInstallProfile.py:646 +msgid "Secure way to index and quickly search for files on your system" +msgstr "A gépen található fájlok biztonságos és gyors indexelése, keresése" + +#: GLIInstallProfile.py:647 +msgid "Utility to trace the route of IP packets" +msgstr "IP-csomagok útvonalának nyomonkövetése" + +#: GLIInstallProfile.py:648 +msgid "Gentoo Linux USE flags editor" +msgstr "Gentoo Linux USE flag szerkesztő" + +#: GLIInstallProfile.py:649 +msgid "Vim, an improved vi-style text editor" +msgstr "Vim, egy fejlett, vi-stílusó szövegszerkesztő" + +#: GLIInstallProfile.py:650 +msgid "A commercial-quality network protocol analyzer" +msgstr "Egy üzleti minőségű hálózati protokoll-elemző" + +#: GLIInstallProfile.py:651 +msgid "Applications recommended by the GLI Team." +msgstr "Ajánlott alkalmazások a GLI Csapattól." + +#: GLIInstallProfile.py:652 +msgid "A versatile IDE for GNOME" +msgstr "Egy sokoldalú IDE GNOME-ra" + +#: GLIInstallProfile.py:653 +msgid "a tool to locally check for signs of a rootkit" +msgstr "egy segédeszköz rootkitek kereséséhez" + +#: GLIInstallProfile.py:654 +msgid "Addictive OpenGL-based block game" +msgstr "Egy rabulejtő OpenGL-alapú blokk-játék" + +#: GLIInstallProfile.py:655 +msgid "The GNU Privacy Guard, a GPL PGP replacement" +msgstr "A GNU jogosultság-felügyelő, a GPL PGP leváltására" + +#: GLIInstallProfile.py:656 +msgid "Software for generating and retrieving SNMP data" +msgstr "SNMP-adatok készítésére és gyűjtésére szolgáló eszköz" + +#: GLIInstallProfile.py:657 +msgid "the network swiss army knife" +msgstr "a hálózatkezelés svájcibicskája" + +#: GLIInstallProfile.py:658 +msgid "A utility for network exploration or security auditing" +msgstr "Egy hasznos program a hálózat felderítésére, biztonságának vizsgálatára" + +#: GLIInstallProfile.py:659 +msgid "full-screen window manager that multiplexes between several processes" +msgstr "teljes képernyős ablakkezelő, amely több feladatot jelenít meg egyszerre" + +#: GLIInstallProfile.py:660 +msgid "An X Viewer for PDF Files" +msgstr "PDF-nézegető X-re" + diff --git a/src/fe/dialog/languages/hu/LC_MESSAGES/GLIInstallProfile.mo b/src/fe/dialog/languages/hu/LC_MESSAGES/GLIInstallProfile.mo Binary files differnew file mode 100644 index 0000000..e8e027f --- /dev/null +++ b/src/fe/dialog/languages/hu/LC_MESSAGES/GLIInstallProfile.mo diff --git a/src/fe/dialog/languages/hu/LC_MESSAGES/gli-dialog.mo b/src/fe/dialog/languages/hu/LC_MESSAGES/gli-dialog.mo Binary files differnew file mode 100644 index 0000000..18e0fd9 --- /dev/null +++ b/src/fe/dialog/languages/hu/LC_MESSAGES/gli-dialog.mo diff --git a/src/fe/dialog/languages/hu/gli-dialog.hu.po b/src/fe/dialog/languages/hu/gli-dialog.hu.po new file mode 100644 index 0000000..3ad1be6 --- /dev/null +++ b/src/fe/dialog/languages/hu/gli-dialog.hu.po @@ -0,0 +1,1729 @@ +# Gentoo Linux Installer. +# Copyright (C) 2006 +# This file is distributed under the same license as the Gentoo Linux Installer. +# Preston Cody , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: gli-dialog\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-09-02 11:57-0400\n" +"PO-Revision-Date: 2007-03-08 21:53+0100\n" +"Last-Translator: Sipi <tibors11@t-online.hu>\n" +"Language-Team: Gentoo-hu Team\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Hungarian\n" +"X-Poedit-Country: HUNGARY\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: gli-dialog.py:62 +msgid "" +"Welcome to the Gentoo Linux Installer! This program will help install Gentoo on your computer.\n" +"Before proceeding please thoroughly read the Gentoo Installation Handbook available at \n" +"http://www.gentoo.org/doc/en/handbook/index.xml \n" +"\n" +"Press OK to continue" +msgstr "" +"Üdvözöllek a Gentoo Linux Telepítőben! Ez a program segít neked feltelepíteni a Gentoot a számítógépedre.\n" +"Mielőtt bármibe is belekezdenénk, olvasd át alaposan a Gentoo Telepítési Kézikönyvet:\n" +"http://www.gentoo.org/doc/en/handbook/index.xml \n" +"vagy http://www.gentoo.org/doc/hu/handbook/index.xml (részleges) \n" +"\n" +"Nyomd meg az OK-ot a folytatáshoz" + +#: gli-dialog.py:66 +msgid "Welcome" +msgstr "Üdvözöllek!" + +#: gli-dialog.py:70 +msgid "Standard" +msgstr "Normál" + +#: gli-dialog.py:71 +msgid "Advanced" +msgstr "Kiterjesztett" + +#: gli-dialog.py:72 +msgid "" +"This installer has two modes, an advanced mode for those knowledgable with the inner details of their computer and a standard mode where many of the defaults will be chosen for the user for simplicity and to speed up the install process. The advanced mode offers full customizability and is required for generating profiles to be used other computers. \n" +"The advanced mode is recommended by the developers.\n" +"\t\t" +msgstr "" +"A telepítő két módot tartalmaz. Egy kiterjesztettet azoknak, akik jól ismerik a számítógép belső működését, és egy normál módot, ahol a gyorsabb telepítés érdekében alapértékeket ajánl fel. A kiterjesztett mód akkor ajánlott, ha teljesen egyéni beállításokat szeretnél, vagy a beállításokat más gépekre szeretnéd átvinni. \n" +"A fejlesztők inkább a kiterjesztett módot ajánlják.\n" +"\t\t" + +#: gli-dialog.py:80 +msgid "Do you want to do a networkless installation? This will limit the customizability of your install due to the limitations of the LiveCD. For example, choosing networkless will set your installation stage, portage snapshot, and limit your extra packages selections. NOTE: It is easily possible to do a networkless installation on a machine with an active Internet connection; in fact this may result in the fastest installations for many users." +msgstr "Hálózat nélküli telepítést szeretnél csinálni? A LiveCD korlátai miatt ilyenkor kevesebb választási lehetőséged lesz. Ilyenkor például nem választhatsz egyéni stage-t, Portage pillanatképet, és korlátozni fog az extra csomagok választékában is. MEGJEGYZÉS: hálózat nélküli telepítést természetesen hálózattal rendelkező gépen is választhatsz; a legtöbb felhasználónak ez a leggyorsabb telepítési mód." + +#: gli-dialog.py:82 +msgid "Networkless" +msgstr "Hálózat nélküli" + +#: gli-dialog.py:83 +msgid "Internet enabled" +msgstr "Internet-kapcsolattal" + +#: gli-dialog.py:97 +msgid "ERROR: Could not set networkless information in the profile" +msgstr "HIBA! Nem lehet beállítani a hálózat nélküli információkat a profilban!" + +#: gli-dialog.py:103 +#: gli-dialog.py:141 +#: gli-dialog.py:204 +#: gli-dialog.py:567 +#: gli-dialog.py:946 +#: gli-dialog.py:1063 +#: gli-dialog.py:1121 +#: gli-dialog.py:1274 +#: gli-dialog.py:1506 +#: gli-dialog.py:1622 +#: gli-dialog.py:1825 +#: gli-dialog.py:1833 +#: gli-dialog.py:1968 +msgid "Yes" +msgstr "Igen" + +#: gli-dialog.py:104 +#: gli-dialog.py:142 +#: gli-dialog.py:205 +#: gli-dialog.py:568 +#: gli-dialog.py:947 +#: gli-dialog.py:1064 +#: gli-dialog.py:1122 +#: gli-dialog.py:1275 +#: gli-dialog.py:1507 +#: gli-dialog.py:1623 +#: gli-dialog.py:1826 +#: gli-dialog.py:1834 +#: gli-dialog.py:1969 +msgid "No" +msgstr "Nem" + +#: gli-dialog.py:107 +msgid "" +"\n" +"\tAll of the installation settings are stored in an XML file, which we call the InstallProfile. If you have a previously-created profile, you can load it now\n" +"\tfor use in this installation.\n" +"\tDo you have a previously generated profile for the installer?\n" +"\t" +msgstr "" +"\n" +"\tMinden telepítési beállítás egy XML fájlban tárolódik. Ennek a neve: InstallProfile. Ha előzőleg elmentettél egy ilyen fájlt, akkor most be tudod tölteni\n" +"\tés felhasználni ehhez a telepítéshez.\n" +"\tAkarsz egy már létező InstallProfile XML fájlt betölteni?\n" +"\t" + +#: gli-dialog.py:113 +msgid "Enter the filename of the XML file" +msgstr "Add meg az XML fájl nevét" + +#: gli-dialog.py:118 +#, python-format +msgid "Cannot open file %s" +msgstr "A(z) %s fájl nem nyitható meg" + +#: gli-dialog.py:143 +msgid "Do you want debugging output enabled during the install? This is mainly meant to help the developers debug any bugs." +msgstr "A telepítés folyamán látni akarod a hibafelderítési információkat? Ez főként a fejlesztőket segíti a hibajavítás során." + +#: gli-dialog.py:158 +#: gli-dialog.py:162 +#: gli-dialog.py:365 +#: gli-dialog.py:369 +#: gli-dialog.py:398 +#: gli-dialog.py:402 +#: gli-dialog.py:514 +#: gli-dialog.py:519 +#: gli-dialog.py:837 +#: gli-dialog.py:844 +#: gli-dialog.py:848 +#: gli-dialog.py:919 +#: gli-dialog.py:924 +#: gli-dialog.py:1011 +#: gli-dialog.py:1016 +#: gli-dialog.py:1043 +#: gli-dialog.py:1047 +#: gli-dialog.py:1215 +#: gli-dialog.py:1218 +#: gli-dialog.py:1565 +#: gli-dialog.py:1573 +#: gli-dialog.py:1787 +#: gli-dialog.py:1797 +msgid "Other" +msgstr "Egyéb" + +#: gli-dialog.py:158 +#: gli-dialog.py:1215 +msgid "Type your own." +msgstr "Add meg sajátodat." + +#: gli-dialog.py:159 +msgid "In order to complete most installs, an active Internet connection is required. Listed are the network devices already detected. In this step you will need to setup one network connection for GLI to use to connect to the Internet. If your desired device does not show up in the list, you can select Other and input the device name manually." +msgstr "A legtöbb telepítési módhoz élő Internet-kapcsolatra lesz szükséged. Itt láthatod felsorolva, milyen hálózati eszközöket ismert fel a telepítő. Most be kell állítanod egy hálózati kapcsolatot, hogy a GLI az Internethez csatlakozhasson. Ha nincs felsorolva egy eszköz, aminek itt kellene lennie, válaszd az Egyéb típust, és add meg az eszköz nevét." + +#: gli-dialog.py:163 +msgid "Enter the interface (NIC) you would like to use for installation (e.g. eth0):" +msgstr "Add meg azt az interfészt (NIC), amit a telepítés során használhatok (pl. eth0):" + +#: gli-dialog.py:170 +#: gli-dialog.py:1228 +#: gli-dialog.py:1253 +msgid "DHCP" +msgstr "DHCP" + +#: gli-dialog.py:171 +#: gli-dialog.py:1229 +#: gli-dialog.py:1254 +msgid "Static IP/Manual" +msgstr "Fix IP/Kézi beállítás" + +#: gli-dialog.py:172 +#: gli-dialog.py:1193 +msgid "" +"To setup your network interface, you can either use DHCP if enabled, or manually enter your network information.\n" +" DHCP (Dynamic Host Configuration Protocol) makes it possible to automatically receive networking information (IP address, netmask, broadcast address, gateway, nameservers etc.). This only works if you have a DHCP server in your network (or if your provider provides a DHCP service). If you do not, you must enter the information manually. Please select your networking configuration method:" +msgstr "" +"A hálózati eszköz beállításához használhatsz DHCP-t (ha engedélyezve van a hálózatodon), vagy kézzel is megadhatod a szükséges információt.\n" +"A DHCP (Dynamic Host Configuration Protocol) segítségével automatikusan kaphatod meg a hálózat adatait (IP-cím, hálózati maszk, broadcast-cím, átjáró, névszerver, stb.). Ez csak akkor működik, ha van DHCP-szerver a hálózaton (vagy a szolgáltatód biztosítja a DHCP-szolgáltatást). Ha nincs, kézzel kell ezeket megadnod. Kérlek, válaszd ki a hálózatbeállítás módját:" + +#: gli-dialog.py:176 +#: gli-dialog.py:1233 +#: gli-dialog.py:1258 +msgid "If you have any additional DHCP options to pass, type them here in a space-separated list. If you have none, just press Enter." +msgstr "Ha egyéb paramétereket kell megadni a DHCP-hez, akkor itt szóközzel elválasztott listaként megadhatod. Ha nem kell, akkor csak nyomj egy Entert." + +#: gli-dialog.py:179 +msgid "Enter your networking information: (See Chapter 3 of the Handbook for more information) Your broadcast address is probably your IP address with 255 as the last tuple. DO NOT PRESS ENTER until all fields you intend to fill out are complete!" +msgstr "Add meg a hálózati adatokat: (További információért lásd a Kézikönyv 3. fejezetét.) A broadcast-cím valószínűleg megegyezik az IP-címeddel, csak az utolsó számjegye 255. NE NYOMD MEG AZ ENTERT, amíg ki nem töltötted az összes mezőt!" + +#: gli-dialog.py:180 +#: gli-dialog.py:1238 +#: gli-dialog.py:1263 +msgid "Enter your IP address:" +msgstr "Add meg az IP-címedet:" + +#: gli-dialog.py:181 +#: gli-dialog.py:1239 +#: gli-dialog.py:1264 +msgid "Enter your Broadcast address:" +msgstr "Add meg a broadcast-címedet:" + +#: gli-dialog.py:182 +#: gli-dialog.py:1240 +#: gli-dialog.py:1265 +msgid "Enter your Netmask:" +msgstr "Add meg a hálózati maszkodat:" + +#: gli-dialog.py:183 +msgid "Enter your default gateway:" +msgstr "Add meg az alapértelmezett átjáródat:" + +#: gli-dialog.py:184 +msgid "Enter a DNS server:" +msgstr "Add meg a DNS szerveredet:" + +#: gli-dialog.py:185 +#: gli-dialog.py:1326 +msgid "Enter a HTTP Proxy IP:" +msgstr "A HTTP proxy IP-je:" + +#: gli-dialog.py:186 +#: gli-dialog.py:1327 +msgid "Enter a FTP Proxy IP:" +msgstr "Az FTP proxy IP-je:" + +#: gli-dialog.py:187 +#: gli-dialog.py:1328 +msgid "Enter a RSYNC Proxy:" +msgstr "Az RSYNC proxy:" + +#: gli-dialog.py:197 +msgid "Sorry, but the network could not be set up successfully. Please configure yourself manually and restart the installer." +msgstr "Sajnálom, de a hálózatot nem sikerült sikeresen beállítani. Kérlek, állítsd be magadnak kézzel, és indítsd újra a telepítőt." + +#: gli-dialog.py:199 +msgid "ERROR! Could not setup networking!" +msgstr "HIBA! Nem lehet beállítani a hálózatot!" + +#: gli-dialog.py:207 +msgid "Do you want SSH enabled during the install? This will allow you to login remotely during the installation process. If choosing Yes, be sure you select a new LiveCD root password!" +msgstr "Engedélyezed az SSH kapcsolódást a telepítés idejére? Ezzel távolról is be tudsz jelentkezni, és felügyelheted a telepítési folyamatot. Ha Igennel válaszolsz, akkor ne felejts el beállítani egy új LiveCD root jelszót!" + +#: gli-dialog.py:211 +msgid "ERROR! : Could not start the SSH daemon!" +msgstr "HIBA! Nem tudom elindítani az SSH démont!" + +#: gli-dialog.py:219 +msgid "" +"If you want to be able to login to your machine from another console during the installation,\n" +"\tyou will want to enter a new root password for the LIVECD.\n" +"\tNote that this can be different from your new system's root password.\n" +"\tPresss Enter twice to skip this step.\n" +"\tEnter the new LIVECD root password (will not be echoed):\t" +msgstr "" +"Ha a telepítés ideje alatt távolról is be szeretnél jelentkezni a gépedre,\n" +"\túj jelszót kell megadnod a LiveCD root felhasználójának.\n" +"\tEz lehet más is, mint a készülő új rendszeredé.\n" +"\tAz Enter kétszeri megnyomásával kihagyhatod ezt a lépést.\n" +"\tÍrd be az új LiveCD root jelszót (semmi nem fog kiíródni):\t" + +#: gli-dialog.py:227 +msgid "Enter the new LIVECD root password again to verify:" +msgstr "Add meg ismét az új LiveCD root jelszavát (ellenőrzésképpen):" + +#: gli-dialog.py:231 +msgid "The passwords do not match. Please try again." +msgstr "A két jelszó nem egyezik. Kérlek, add meg őket újra." + +#: gli-dialog.py:239 +msgid "ERROR! Could not hash the root password on the LiveCD!" +msgstr "HIBA! A root jelszót nem tudom a LiveCD-n titkosítani!" + +#: gli-dialog.py:248 +msgid "ERROR! Could not set the root password on the livecd environment!" +msgstr "HIBA! Nem sikerült a LiveCD-környezet root jelszavát beállítani!" + +#: gli-dialog.py:255 +msgid "" +"Here is a list of modules currently loaded on your machine.\n" +" Please look through and see if any modules are missing\n" +" that you would like loaded.\n" +"\n" +msgstr "" +"Jelenleg ezek a modulok vannak betöltve a gépeden.\n" +" Nézd át őket, hiányzik-e közülük olyan modul, melyet\n" +" szeretnél használni.\n" +"\n" + +#: gli-dialog.py:256 +msgid "Continue" +msgstr "Folytatás" + +#: gli-dialog.py:257 +msgid "Loaded Modules" +msgstr "Betöltött modulok" + +#: gli-dialog.py:258 +msgid "If you have additional modules you would like loaded before the installation begins (ex. a network driver), enter them in a space-separated list." +msgstr "Ha a telepítés megkezdése előtt egyéb modulokat is szeretnél betölteni (pl. egy hálózati eszközét), szóközzel elválasztott listában sorolhatod fel őket." + +#: gli-dialog.py:272 +#, python-format +msgid "ERROR! : Could not load module: %s " +msgstr "HIBA: Az alábbi modult nem lehet betölteni: %s" + +#: gli-dialog.py:277 +msgid "ERROR!: An unknown error occurred during modprobing the modules. Please load them manually and then restart the installer." +msgstr "HIBA! Általam feldolgozhatatlan hiba történt a modulok betöltése közben. Kérlek, töltsd be őket kézzel, és indítsd újra a telepítőt." + +#: gli-dialog.py:304 +#: gli-dialog.py:312 +#: gli-dialog.py:1200 +#: gli-dialog.py:1208 +msgid "Add" +msgstr "Hozzáadás" + +#: gli-dialog.py:304 +msgid "Define a new mountpoint" +msgstr "Új csatolási pont megadása" + +#: gli-dialog.py:305 +msgid "Please define the mountpoints of your partitions for the new system. At minimum, a / mountpoint must be defined. Defining /boot and /home mountpoints is recommended." +msgstr "Kérlek, add meg az új rendszer partícióinak csatolási pontjait. A / csatolási pontot mindenképpen meg kell határoznod, de ajánlott a /boot és a /home csatolási pontok meghatározása is." + +#: gli-dialog.py:305 +#: gli-dialog.py:557 +#: gli-dialog.py:1201 +#: gli-dialog.py:1459 +#: gli-dialog.py:1610 +#: gli-dialog.py:1725 +msgid "Save and Continue" +msgstr "Mentés és folytatás" + +#: gli-dialog.py:310 +msgid "ERROR: Could net set mounts!" +msgstr "HIBA: Nem lehet beállítani a csatolásokat!" + +#: gli-dialog.py:328 +#: gli-dialog.py:467 +#: gli-dialog.py:530 +msgid "Logical (" +msgstr "Logikai (" + +#: gli-dialog.py:330 +#: gli-dialog.py:469 +#: gli-dialog.py:532 +msgid "Primary (" +msgstr "Elsődleges (" + +#: gli-dialog.py:346 +msgid "Select a Partition to define a mountpoint for" +msgstr "Válassz egy partíciót a következő csatolási pontnak:" + +#: gli-dialog.py:366 +#, python-format +msgid "Choose a mountpoint from the list or choose Other to type your own for partition %s. " +msgstr "Válassz a %s partíciónak egy csatolási pontot a listáról, vagy válaszd az Egyebet, és add meg kézzel. " + +#: gli-dialog.py:370 +#: gli-dialog.py:403 +#, python-format +msgid "Enter a mountpoint for partition %s" +msgstr "Add meg a %s partíció csatolási pontját" + +#: gli-dialog.py:375 +#: gli-dialog.py:415 +#, python-format +msgid "Enter mount options for mountpoint %s. Leave blank for defaults" +msgstr "Add meg a %s csatolási pont beállításait. Ha üresen hagyod, az alapértelmezettet jelent." + +#: gli-dialog.py:389 +#: gli-dialog.py:397 +msgid "Change Mountpoint" +msgstr "Csatolási pont választása" + +#: gli-dialog.py:390 +#: gli-dialog.py:406 +msgid "Change Filesystem Type" +msgstr "Fájlrendszer választása" + +#: gli-dialog.py:391 +#: gli-dialog.py:414 +msgid "Change Mountoptions" +msgstr "Csatolási opciók választása" + +#: gli-dialog.py:392 +#: gli-dialog.py:419 +msgid "Delete This Mountpoint" +msgstr "A csatolási pont törlése" + +#: gli-dialog.py:393 +#, python-format +msgid "Select an option for device %(dev)s : Mountpoint: %(mt)s, Type: %(type)s, Options: %(opt)s" +msgstr "Add meg a %(dev)s eszköz adatait : csatolási pont: %(mt)s, típus: %(type)s, opciók: %(opt)s" + +#: gli-dialog.py:399 +#, python-format +msgid "Choose a mountpoint from the list or choose Other to type your own for partition %(part)s. Current mountpoint is: %(mt)s" +msgstr "Válaszd ki a listáról a %(part)s partíció csatolási pontját, vagy válaszd az Egyebet, és add meg kézzel. A jelenlegi csatolási pont: %(mt)s" + +#: gli-dialog.py:409 +#, python-format +msgid "Select the filesystem for partition %(part)s. It is currently %(fs)s." +msgstr "Válaszd ki, milyen fájlrendszerkerüljön a %(part)s partícióra. A jelenlegi: %(fs)s." + +#: gli-dialog.py:423 +msgid "" +"The first thing on the new system to setup is the partitoning.\n" +"\tYou will first select a drive and then edit its partitions.\n" +"\tWARNING: CHANGES ARE MADE IMMEDIATELY TO DISK. BE CAREFUL\n" +"\tNOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION \"/\"\n" +"\tIf your drive is pre-partitioned, just select the mountpoints and make \n" +"\tsure that the format option is set to FALSE or it will erase your data.\n" +"\tThe installer does not yet support resizing of partitions (its not safe).\n" +"\tWhen in doubt, **Partition it yourself and then re-run the installer**\n" +"\tPlease refer to the Gentoo Installation Handbook for more information\n" +"\ton partitioning and the various filesystem types available in Linux." +msgstr "" +"Elsőnek az új rendszer partícióit kell beállítani.\n" +"\tElősször válassz egy meghajtót, majd szerkeszd a partíciós tábláját.\n" +"\tFIGYELEM: A VÁLTOZÁSOK AZONNAL A LEMEZRE ÍRÓDNAK. LÉGY ÓVATOS!\n" +"\tMEGJEGYZÉS: LEGALÁBB EGY PARTÍCIÓT KI KELL VÁLASZTANOD GYÖKÉR-PARTÍCIÓNAK \"/\"\n" +"\tA a meghajtód már partícionálva van, csak válaszd ki a csatolási pontokat, \n" +"\tés a formázási beállítást állítsd HAMIS-ra, egyébként mindent letöröl.\n" +"\tA telepítő még nem támogatja a partíciók átméretezését (nem biztonságos).\n" +"\tHa kétségeid vannak, **partícionálj kézzel, majd futtasd újra a telepítőt**\n" +"\tA partícionálásról és a Linuxon elérhető különféle fájlrendszerekről\n" +"\ta Gentoo Telepítési Kézikönyvben találsz további információt." + +#: gli-dialog.py:446 +msgid "" +"Which drive would you like to partition?\n" +" Info provided: Type, Size in MB" +msgstr "" +"Melyik meghajtót szeretnéd partícionálni?\n" +" Kiírt adatok: típus, méret MB-ban" + +#: gli-dialog.py:446 +#: gli-dialog.py:845 +#: gli-dialog.py:880 +#: gli-dialog.py:1012 +msgid "Done" +msgstr "Rendben" + +#: gli-dialog.py:456 +msgid " - Unallocated space (" +msgstr " - Felhasználatlan terület (" + +#: gli-dialog.py:458 +msgid "logical, " +msgstr "logikai, " + +#: gli-dialog.py:462 +msgid " - Extended Partition (" +msgstr " - Kiterjesztett partíció (" + +#: gli-dialog.py:474 +#: gli-dialog.py:480 +msgid "Set Recommended Layout" +msgstr "Ajánlott partíció-kiosztás beállítása" + +#: gli-dialog.py:475 +#: gli-dialog.py:485 +msgid "Clear Partitions On This Drive." +msgstr "Partíciók törlése a meghajtóról." + +#: gli-dialog.py:476 +msgid "" +"Select a partition or unallocated space to edit\n" +"Key: Minor, Pri/Ext, Filesystem, Size." +msgstr "" +"Válassz ki egy partíciót, vagy felhasználatlan területet szerkesztésre\n" +"Key: minor, Els/Kit, fájlrendszer, méret." + +#: gli-dialog.py:476 +#: gli-dialog.py:536 +#: gli-dialog.py:584 +#: gli-dialog.py:625 +#: gli-dialog.py:1761 +msgid "Back" +msgstr "Vissza" + +#: gli-dialog.py:481 +msgid "This will ERASE YOUR DRIVE and apply a recommended layout. Are you sure you wish to do this?" +msgstr "Teljesen TÖRÖLVE LESZ A MEGHAJTÓD, és az ajánlott beálításokat érvényesítem rajta. Tényleg ezt akarod?" + +#: gli-dialog.py:482 +msgid "This is your last chance. Are you SURE you want to CLEAR this drive and set a recommended layout? THERE IS NO TURNING BACK IF YOU SELECT YES." +msgstr "Ez az utolsó esély. TÉNYLEG teljesen LETÖRLÖK mindent, és az ajánlott beállítások lesznek rajta. HA MOST IGENNEL VÁLASZOLSZ, AKKOR NEM LEHET MÁR VISSZATÁNCOLNI!" + +#: gli-dialog.py:486 +msgid "This will remove all partitions on your drive. Are you sure you wish to do this?" +msgstr "El fogok távolítani minden partíciót a meghajtódról. Tényleg ezt akarod?" + +#: gli-dialog.py:487 +msgid "This is your last chance. Are you SURE you want to CLEAR this drive? THIS WILL DELETE ANY DATA ON THE DRIVE!" +msgstr "Ez az utolsó esély. TÉNYLEG le akarsz TÖRÖLNI mindent a meghajtódról? EZ AZ ÚT MINDEN ESETBEN ADATVESZTÉSSEL JÁR!" + +#: gli-dialog.py:499 +#, python-format +msgid "Enter the size of the new partition in MB (max %s MB). If creating an extended partition input its entire size (not just the first logical size):" +msgstr "Add meg az új partíció méretét MB-ban (max. %s MB). Ha ez egy kiterjesztett partíció, akkor a teljes szabad területet add meg neki (ne az első logikai partíció méretét):" + +#: gli-dialog.py:502 +#, python-format +msgid "The size you entered (%(entered)s MB) is larger than the maximum of %(max)s MB" +msgstr "A megadott méret (%(entered)s MB) nagyobb, mint a maximális (%(max)s) méret" + +#: gli-dialog.py:505 +msgid "Old, stable, but no journaling" +msgstr "Régi, stabil, de nem naplóz" + +#: gli-dialog.py:506 +msgid "ext2 with journaling and b-tree indexing (RECOMMENDED)" +msgstr "ext2 naplózással és b-fa indexxel (AJÁNLOTT)" + +#: gli-dialog.py:507 +msgid "Swap partition for memory overhead" +msgstr "Swap partíció a memória kiegészítéséhez" + +#: gli-dialog.py:508 +msgid "Windows filesystem format used in Win9X and XP" +msgstr "Windows fájlrendszer. A Win9X és XP használja." + +#: gli-dialog.py:512 +msgid "B*-tree based filesystem. great performance. Only V3 supported." +msgstr "B*-fa alapú fájlrendszer. Jó teljesítmény. Csak V3 támogatás." + +#: gli-dialog.py:513 +msgid "Create an extended partition containing other logical partitions" +msgstr "Létrehoz egy kiterjesztett partíciót más logikai partíciók számára" + +#: gli-dialog.py:514 +msgid "Something else we probably don't support." +msgstr "Válassz valami mást, mert ez nem támogatott." + +#: gli-dialog.py:515 +msgid "Choose the filesystem type for this new partition." +msgstr "Válassz egy fájlrendszert az új partíciónak." + +#: gli-dialog.py:520 +msgid "Please enter the new partition's type:" +msgstr "Kérem, add meg az új partíció típusát:" + +#: gli-dialog.py:535 +#: gli-dialog.py:539 +#: gli-dialog.py:1249 +#: gli-dialog.py:1760 +#: gli-dialog.py:1823 +msgid "Delete" +msgstr "Törlés" + +#: gli-dialog.py:535 +#: gli-dialog.py:545 +msgid "Extra mkfs.* Parameters" +msgstr "Extra mkfs.* paraméterek" + +#: gli-dialog.py:540 +msgid "Are you sure you want to delete the partition " +msgstr "Biztosan véglegesen törölni akarod a partíciót" + +#: gli-dialog.py:546 +msgid "This feature is coming soon. Please go to console and do it yourself for now." +msgstr "Ezt a telepítő még nem tudja megcsinálni. Kérlek, válts át konzolra, és csináld meg kézzel!" + +#: gli-dialog.py:555 +#: gli-dialog.py:565 +msgid "Add a new network mount" +msgstr "Új hálózati csatolás felvétele" + +#: gli-dialog.py:557 +msgid "If you have any network shares you would like to mount during the install and for your new system, define them here. Select a network mount to edit or add a new mount. Currently GLI only supports NFS mounts." +msgstr "Ha van hálózati megosztásod, és szeretnéd a a telepítés idején, valamint az új rendszereden ezt beállítani, akkor itt most megadhatod. Válaszd ki a a szerkesztendő hálózati csatolást, vagy adj hozzá egy újat. A GLI jelenleg csak az NFS csatolásokat támogatja." + +#: gli-dialog.py:562 +msgid "ERROR: Could net set network mounts!" +msgstr "HIBA! Nem tudom beállítani a hálózati csatolásokat!" + +#: gli-dialog.py:569 +msgid "Do you want to start portmap to be able to search for NFS mounts?" +msgstr "El akarod indítani a portmap-et? Ez meg tudja keresni az elérhető NFS megosztásokat." + +#: gli-dialog.py:572 +msgid "ERROR: Could not start portmap!" +msgstr "HIBA: Nem tudtam elindítani a portmap-et!" + +#: gli-dialog.py:574 +msgid "Enter NFS mount or just enter the IP/hostname to search for available mounts" +msgstr "Add meg az NFS csatolást, vagy az IP/gépnevet, hogy megkeresem az elérhető megosztásokat" + +#: gli-dialog.py:582 +msgid "No NFS exports were detected on " +msgstr "Sajnos, itt nem találtam NFS megosztást: " + +#: gli-dialog.py:584 +msgid "Select a NFS export" +msgstr "Válassz ki egy NFS megosztást" + +#: gli-dialog.py:589 +#, python-format +msgid "The address you entered, %s, is not a valid IP or hostname. Please try again." +msgstr "A megadott - %s - nem érvényes IP vagy gépnév. Kérlek, add meg megint." + +#: gli-dialog.py:598 +msgid "There is already an entry for " +msgstr "Már van egy bejegyzés ebből:" + +#: gli-dialog.py:610 +msgid "Enter a mountpoint" +msgstr "Add meg a csatolás helyét" + +#: gli-dialog.py:613 +msgid "Enter mount options" +msgstr "Add meg a csatolás opcióit" + +#: gli-dialog.py:623 +msgid "Stage3 is a basic system that has been built for you (no compiling)." +msgstr "A Stage3 az alaprendszert lefordítva szállítja neked (nem kell fordítani)." + +#: gli-dialog.py:624 +msgid "A Stage3 install but using binaries from the LiveCD when able." +msgstr "Stage3 telepítés, de ahol lehet, a LiveCD-n lévő binárisokat telepíti." + +#: gli-dialog.py:625 +msgid "Which stage do you want to start at?" +msgstr "Melyik alapról (stage) szeretnél kezdeni?" + +#: gli-dialog.py:629 +msgid "WARNING: Since you are doing a GRP install it is HIGHLY recommended you choose Create from CD to avoid a potentially broken installation." +msgstr "FIGYELEM: Mivel GRP telepítést választottál, MINDENKÉPPEN válaszd ki a Létrehoz CD-ről beállítást, különben valószínűleg hibás telepítést kapsz." + +#: gli-dialog.py:633 +#: gli-dialog.py:638 +msgid "ERROR! Could not set install stage!" +msgstr "HIBA: Nem lehet beállítani a telepítés alapját (stage)!" + +#: gli-dialog.py:642 +msgid "Create from CD" +msgstr "Létrehoz CD-ről" + +#: gli-dialog.py:643 +msgid "Specify URI" +msgstr "URI megadása" + +#: gli-dialog.py:644 +msgid "Do you want to generate a stage3 on the fly using the files on the LiveCD (fastest) or do you want to grab your stage tarball from the Internet?\n" +msgstr "A stage3-at röptében generáljam a LiveCD fájljaiból (leggyorsabb), vagy inkább töltsek le egy stage fájlt az internetről?\n" + +#: gli-dialog.py:649 +msgid "ERROR: Could not set the stage tarball URI!" +msgstr "HIBA! Nem tudom beállítani a stage fájl URI-ját!" + +#: gli-dialog.py:664 +msgid "Select a mirror to grab the tarball from or select Cancel to enter an URI manually." +msgstr "Válassz egy tükröt, ahonnan a stage fájl letölthető, vagy válaszd a Mégsemet, és add meg az URI-t kézzel." + +#: gli-dialog.py:670 +msgid "Select your desired stage tarball:" +msgstr "Válaszd ki a neked tetsző stage fájlt:" + +#: gli-dialog.py:681 +msgid "Specify the stage tarball URI or local file:" +msgstr "A stage fájl elérési útja, vagy helyi fájl:" + +#: gli-dialog.py:687 +#: gli-dialog.py:720 +#: gli-dialog.py:1076 +msgid "The specified URI is invalid. It was not saved. Please go back and try again." +msgstr "A megadott URI nem értelmezhető, ezért nem lett elmentve. Kérlek, menj vissza és add meg ismét." + +#: gli-dialog.py:689 +msgid "No URI was specified!" +msgstr "Nem adtál meg URI-t!" + +#: gli-dialog.py:699 +msgid "ERROR! Could not set the portage cd snapshot URI!" +msgstr "HIBA! Nem lehet beállítani a portage-pillanatkép URI-ját!" + +#: gli-dialog.py:703 +msgid "Normal. Use emerge sync RECOMMENDED!" +msgstr "Normál. AJÁNLOTT az emerge sync használata!" + +#: gli-dialog.py:704 +msgid "HTTP daily snapshot. Use when rsync is firewalled." +msgstr "HTTP napi pillanatkép. Akkor használd, ha a tűzfal szűri az rsync-et." + +#: gli-dialog.py:705 +msgid "Use a portage snapshot, either a local file or a URL" +msgstr "Portage pillanatkép használata helyi fájlból, vagy egy URL-ről" + +#: gli-dialog.py:706 +msgid "Extra cases such as if /usr/portage is an NFS mount" +msgstr "Extra esetek, pl. ha a /usr/portage egy NFS megosztáson van" + +#: gli-dialog.py:707 +msgid "Which method do you want to use to sync the portage tree for the installation? If choosing a snapshot you will need to provide the URI for the snapshot if it is not on the livecd." +msgstr "Milyen módszert szeretnéd használni a portage fa szinkronizálásához? Ha a pillanatfelvétel lehetőségét választod, akkor vagy a LiveCD-ét használd, vagy adj meg az URI-jét." + +#: gli-dialog.py:716 +msgid "Enter portage tree snapshot URI" +msgstr "Add meg a portage fa pillanatképének URI-ját" + +#: gli-dialog.py:725 +msgid "No URI was specified! Returning to default emerge sync." +msgstr "Nincs URI megadva. Megpróbálom az alapértelmezett emerge sync használatát." + +#: gli-dialog.py:742 +msgid "" +"The installer will now gather information regarding the contents of /etc/make.conf\n" +"\tOne of the unique (and best) features of Gentoo is the ability to\n" +"\tdefine flags (called USE flags) that define what components are \n" +"\tcompiled into applications. For example, you can enable the alsa\n" +"\tflag and programs that have alsa capability will use it. \n" +"\tThe result is a finely tuned OS with no unnecessary components to\n" +"\tslow you down.\n" +"\tThe installer divides USE flag selection into two screens, one for\n" +"\tglobal USE flags and one for local flags specific to each program.\n" +"\tPlease be patient while the screens load. It may take awhile." +msgstr "" +"A telepítő most a /etc/make.conf beállításához gyűjt információt.\n" +"\tEgy egyedi (és a legjobb) tulajdonsága a Gentoonak, hogy úgynevezett\n" +"\tzászlókat (továbbiakban USE flag) használ, amelyek meghatározzák a fordítandó \n" +"\talkalmazások tartalmát. Például engedélyezheted az alsa flag használatát, \n" +"\tígy azok az alkalmazások, melyek képesek rá, használni fogják az ALSA-t. \n" +"\tEnnek eredménye egy finomhangolt rendszer lesz, felesleges és\n" +"\tlassító részek nélkül.\n" +"\tA telepítő két képernyőre osztja a USE flagek kiválasztását, egyet\n" +"\ta globális és egyet a lokális (csomagszintű) flagek számára.\n" +"\tLégy türelemmel, míg a képernyő betöltődik - elég sokáig eltarthat." + +#: gli-dialog.py:781 +msgid "Choose which *global* USE flags you want on the new system" +msgstr "Válaszd ki, milyen *globális* USE flageket akarsz az új rendszeren használni" + +#: gli-dialog.py:789 +msgid "Choose which *local* USE flags you want on the new system" +msgstr "Válaszd ki, milyen *lokális* USE flageket akarsz az új rendszeren használni" + +#: gli-dialog.py:822 +msgid "Stable" +msgstr "Stabil" + +#: gli-dialog.py:823 +msgid "Unstable" +msgstr "Nem stabil" + +#: gli-dialog.py:824 +#, python-format +msgid "Do you want to run the normal stable portage tree, or the bleeding edge unstable (i.e. ACCEPT_KEYWORDS=%s)? If unsure select stable. Stable is required for GRP installs." +msgstr "Normál stabil Portage-fát szeretnél használni, vagy inkább izzadsz vért az instabillal (ACCEPT_KEYWORDS=%s)? Ha bizonytalan vagy, válaszd a stabilt. A GRP telepítéshez stabilt kell használnod." + +#: gli-dialog.py:831 +#: gli-dialog.py:839 +msgid "Edit your C Flags and Optimization level" +msgstr "A C-flagek és az optimalizáció szintjének szerkesztése" + +#: gli-dialog.py:832 +msgid "Change the Host Setting" +msgstr "Hoszt-beállítások megváltoztatása" + +#: gli-dialog.py:833 +#: gli-dialog.py:840 +msgid "Specify number of parallel makes (-j) to perform." +msgstr "Párhuzamosan futtatható make parancsok száma (-j)" + +#: gli-dialog.py:834 +#: gli-dialog.py:841 +msgid "Change portage functionality settings. (distcc/ccache)" +msgstr "Válaszd ki a portage funkcionális beállításait. (distcc/ccache)" + +#: gli-dialog.py:835 +#: gli-dialog.py:842 +msgid "Specify mirrors to use for source retrieval." +msgstr "Add meg a források letöltéséhez használt tükörszervereket." + +#: gli-dialog.py:836 +#: gli-dialog.py:843 +msgid "Specify server used by rsync to sync the portage tree." +msgstr "Rsync szerver választása a portage fa szinkronizálásához." + +#: gli-dialog.py:837 +#: gli-dialog.py:844 +msgid "Specify your own variable and value." +msgstr "Egyedi változó és értékének megadása." + +#: gli-dialog.py:845 +msgid "For experienced users, the following /etc/make.conf variables can also be defined. Choose a variable to edit or Done to continue." +msgstr "A tapasztalt felhasználók a következő /etc/make.conf értékeket is beállíthatják. Válassz szerkesztésre egy változót, vagy nyomd meg a Rendbent a folytatáshoz." + +#: gli-dialog.py:849 +msgid "Enter the variable name: " +msgstr "Add meg a változó nevét:" + +#: gli-dialog.py:856 +#: gli-dialog.py:886 +#: gli-dialog.py:933 +msgid "Enter new value for " +msgstr "Új érték megadása " + +#: gli-dialog.py:871 +#: gli-dialog.py:883 +msgid "CLEAR" +msgstr "TÖRLÉS" + +#: gli-dialog.py:871 +msgid "Erase the current value and start over." +msgstr "Töröld a jelenlegi értéket és kezdjük elölről." + +#: gli-dialog.py:872 +msgid "Add a CPU optimization (deprecated in GCC 3.4)" +msgstr "CPU optimalizáció (GCC 3.4-gyel bezárólag)" + +#: gli-dialog.py:873 +msgid "Add a CPU optimization (GCC 3.4+)" +msgstr "CPU optimalizáció (GCC 3.4-től)" + +#: gli-dialog.py:874 +msgid "Add an Architecture optimization" +msgstr "Architektúra optimalizáció megadása" + +#: gli-dialog.py:875 +msgid "Add optimization level (please do NOT go over 2)" +msgstr "Optimalizáció szintje (kérlek, NE ADJ MEG 2-nél nagyobbat)" + +#: gli-dialog.py:876 +msgid "For advanced users only." +msgstr "Csak tapasztalt felhasználóknak." + +#: gli-dialog.py:877 +msgid "Common additional flag" +msgstr "Egyéb közös flag" + +#: gli-dialog.py:878 +#: gli-dialog.py:885 +#: gli-dialog.py:1455 +#: gli-dialog.py:1473 +msgid "Manual" +msgstr "Egyéni" + +#: gli-dialog.py:878 +msgid "Specify your CFLAGS manually" +msgstr "A CFLAGS kézi beállítása" + +#: gli-dialog.py:880 +msgid "Choose a flag to add to the CFLAGS variable or Done to go back. The current value is: " +msgstr "Válassz egy flaget, és add hozzá a CFLAGS változóhoz, vagy nyomd meg a Rendbent a visszalépéshez. A jelenlegi érték: " + +#: gli-dialog.py:891 +#, python-format +msgid "Enter the new value for %s (value only):" +msgstr "Adj meg új értéket %s számára (csak értéket):" + +#: gli-dialog.py:902 +msgid "Choose from the available CHOSTs for your architecture." +msgstr "Válaszd ki az elérhető CHOSTok közül a saját architektúrádat." + +#: gli-dialog.py:908 +msgid "Presently the only use is for specifying the number of parallel makes (-j) to perform. The suggested number for parallel makes is CPUs+1. Enter the NUMBER ONLY:" +msgstr "Jelenleg csak arra jó, hogy megadd, egyszerre hány szálon fussanak a párhuzamos fordítások (-j). Az ajánlott érték a processzorok száma+1. Add meg CSAK A SZÁMOT:" + +#: gli-dialog.py:914 +msgid "enables sandboxing when running emerge and ebuild." +msgstr "sandbox engedélyezése az emerge és ebuild parancsokhoz." + +#: gli-dialog.py:915 +msgid "enables ccache support via CC." +msgstr "ccache engedélyezése a C fordításhoz." + +#: gli-dialog.py:916 +msgid "enables distcc support via CC." +msgstr "distcc engedélyezése a C fordításhoz." + +#: gli-dialog.py:917 +msgid "enables distfiles locking using fcntl or hardlinks." +msgstr "engedélyezi a distfiles zárolását fcntl vagy hardlink használatával" + +#: gli-dialog.py:918 +msgid "create binaries of all packages emerged" +msgstr "binárisok létrehozása minden emergelt csomagból" + +#: gli-dialog.py:919 +msgid "Input your list of FEATURES manually." +msgstr "A FEATURES változó kézzel történő beállítása." + +#: gli-dialog.py:920 +msgid "FEATURES are settings that affect the functionality of portage. Most of these settings are for developer use, but some are available to non-developers as well." +msgstr "A FEATURES beállítása a portage funkcionalitására van hatással. A legtöbb opció fejlesztőknek való, de némelyik mások számára is hasznos lehet." + +#: gli-dialog.py:925 +msgid "Enter the value of FEATURES: " +msgstr "Add meg a FEATURES értékét:" + +#: gli-dialog.py:942 +#: gli-dialog.py:999 +msgid "ERROR! Could not set the make_conf correctly!" +msgstr "HIBA! Nem tudtam a make_conf fájlt helyesen beállítani!" + +#: gli-dialog.py:948 +msgid "Do you want to use distcc to compile your extra packages during the install and for future compilations as well?" +msgstr "Szeretnél distcc-t használni az exta csomagok fordításához a telepítés ideje alatt és a jövőben?" + +#: gli-dialog.py:963 +#: gli-dialog.py:1517 +#: gli-dialog.py:1582 +msgid "ERROR! Could not set the services list." +msgstr "HIBA! Nem lehet beállítani a szolgáltatáslistát!" + +#: gli-dialog.py:969 +msgid "ERROR! Could not set the install distcc flag!" +msgstr "HOBA! Nem tudtam beállítani a telepítéshez a distcc flaget!" + +#: gli-dialog.py:990 +msgid "" +"Enter the hosts to be used by distcc for compilation:\n" +"Example: localhost 192.168.0.2 192.168.0.3:4000/10" +msgstr "" +"Add meg a distcc fordításhoz használható gépeket:\n" +"Például: localhost 192.168.0.2 192.168.0.3:4000/10" + +#: gli-dialog.py:1007 +msgid "A list of DEPEND atoms to mask." +msgstr "Maszkolható DEPEND (függőségi) beállítások listája." + +#: gli-dialog.py:1008 +msgid "A list of packages to unmask." +msgstr "Az unmaszkolható csomagok listája." + +#: gli-dialog.py:1009 +msgid "Per-package KEYWORDS (like ACCEPT_KEYWORDS)." +msgstr "Csomagonkénti KEYWORDS (ACCEPT_KEYWORDS-szerű)." + +#: gli-dialog.py:1010 +msgid "Per-package USE flags." +msgstr "Csomagonkénti USE flagek." + +#: gli-dialog.py:1011 +msgid "Type your own name of a file to edit in /etc/" +msgstr "Írd be a /etc/ könyvtárban található, szerkeszteni kívánt fájl nevét" + +#: gli-dialog.py:1012 +msgid "For experienced users, the following /etc/* variables can also be defined. Choose a variable to edit or Done to continue." +msgstr "Tapasztalt felhasználók a következő /etc/* változókat is megadhatják. Válaszd ki a szerkesztendőt, vagy a Rendbennel folytathatod." + +#: gli-dialog.py:1017 +msgid "Enter the name of the /etc/ file you would like to edit (DO NOT type /etc/)" +msgstr "Add meg a /etc/ könyvtárban lévő szerkesztendő fájl nevét (NE ÍRD be a /etc/-t)" + +#: gli-dialog.py:1024 +msgid "" +"Enter new contents (use \\n" +" for newline) of " +msgstr "" +"Add meg az új tartalmat (használd a \\n" +" -t új sorhoz):" + +#: gli-dialog.py:1031 +msgid "ERROR! Could not set etc/portage/* correctly!" +msgstr "HIBA! Nem tudom helyesen beállítani az /etc/portage/*-ot!" + +#: gli-dialog.py:1038 +msgid "Copy over the current running kernel (fastest)" +msgstr "Egyszerűen másoljuk át a futó kernelt (leggyorsabb)" + +#: gli-dialog.py:1039 +msgid "The Unaltered Linux Kernel ver 2.6+ (safest)" +msgstr "Az eredeti Linux Kernel 2.6+ (legbiztonságosabb)" + +#: gli-dialog.py:1040 +msgid "Gentoo's optimized 2.6+ kernel. (less safe)" +msgstr "Gentoo optimalizált 2.6+ kernel (kevésbé biztonságos)" + +#: gli-dialog.py:1041 +msgid "Hardened sources for the 2.6 kernel tree" +msgstr "Hardened forrás a 2.6-os kernelfához" + +#: gli-dialog.py:1042 +msgid "Vanilla sources with grsecurity patches" +msgstr "Vanilla forrás a grsecurity folttal" + +#: gli-dialog.py:1043 +msgid "Choose one of the other sources available." +msgstr "Egy másik kernel használata az elérhetőekből." + +#: gli-dialog.py:1044 +msgid "Choose which kernel sources to use for your system. If using a previously-made kernel configuration, make sure the sources match the kernel used to create the configuration." +msgstr "Válaszd ki, hogy melyik kernelt szeretnéd használni a rendszereden. Ha egy előkészített kernelkonfigurációt szeretnél használni, akkor kérlek, győződj meg arról, hogy az használható a kernel létrehozásához." + +#: gli-dialog.py:1048 +msgid "Please enter the desired kernel sources package name:" +msgstr "Kérlek, add meg a számodra szimpatikus kernelforrás csomagnevét:" + +#: gli-dialog.py:1053 +msgid "ERROR! Could not set the kernel source package!" +msgstr "HIBA! Nem tudom beállítani a kernelforrás csomagját!" + +#: gli-dialog.py:1056 +msgid "Genkernel" +msgstr "Genkernel" + +#: gli-dialog.py:1057 +msgid "Traditional (requires a config!)" +msgstr "Tradícionális (kell neki egy konfig!)" + +#: gli-dialog.py:1058 +msgid "" +"There are currently two ways the installer can compile a kernel for your new system. You can either provide a previously-made kernel configuration file and use the traditional kernel-compiling procedure (no initrd) or have genkernel automatically create your kernel for you (with initrd). \n" +"\n" +" If you do not have a previously-made kernel configuration, YOU MUST CHOOSE Genkernel. Choose which method you want to use." +msgstr "" +"Jelenleg a telepítő kétféleképpen tudja a kernelt az új rendszeredre fordítani. Vagy megadsz egy kernel-konfigurációs fájlt, és a hagyományos fordítási eljárással fordít egy kernelt (nincs initrd), vagy a genkernelt használva automatikusan fordít számodra egyet.\n" +"\n" +" Ha nincs előkészített kernel-konfigurációd, akkor MUSZÁJ a Genkernelt használnod. Kérlek, válassz a módszerek közül." + +#: gli-dialog.py:1065 +msgid "Do you want the bootsplash screen to show up on bootup?" +msgstr "Használjon bootsplash képernyőt a bootfolyamat közben?" + +#: gli-dialog.py:1072 +msgid "If you have a custom kernel configuration, enter its location (otherwise just press Enter to continue):" +msgstr "Ha egyedi kernel-konfigurációt használsz, meg kell adnod a helyét (egyébb esetben nyomjál Rendbent a folytatáshoz):" + +#: gli-dialog.py:1081 +msgid "ERROR! Could not set the kernel config URI!" +msgstr "HIBA! Nem tudom beállítani a kernel-konfiguráció URI-ját!" + +#: gli-dialog.py:1104 +#: gli-dialog.py:1106 +msgid "GRand Unified Bootloader, newer, RECOMMENDED" +msgstr "GRand Unified Bootloadre, újabb, AJÁNLOTT" + +#: gli-dialog.py:1108 +msgid "LInux LOader, older, traditional.(detects windows partitions)" +msgstr "Linux LOader, régebbi, hagyományos. (észleli a windows partícióit)" + +#: gli-dialog.py:1110 +msgid "Do not install a bootloader. (System may be unbootable!)" +msgstr "Ne települjön rendszertöltő. (A rendszer nem biztos, hogy el tud indulni!)" + +#: gli-dialog.py:1111 +msgid "To boot successfully into your new Linux system, a bootloader will be needed. If you already have a bootloader you want to use you can select None here. The bootloader choices available are dependent on what GLI supports and what architecture your system is. Choose a bootloader" +msgstr "Ahhoz, hogy az új Linux rendszered sikeresen elinduljon, szükséges egy bootloader. Ha már fel van telepítve egy, és azt akarod használni, akkor a Nemet válaszd. A választható rendszertöltők listája függ a GLI támogatásától, és a számítógéped architektúrájától. Válassz egy rendszertöltőt:" + +#: gli-dialog.py:1118 +msgid "ERROR! Could not set boot loader pkg! " +msgstr "HIBA! Nem tudom beállítani a rendszerbetöltő csomagját! " + +#: gli-dialog.py:1123 +msgid "Most bootloaders have the ability to install to either the Master Boot Record (MBR) or some other partition. Most people will want their bootloader installed on the MBR for successful boots, but if you have special circumstances, you can have the bootloader installed to the /boot partition instead. Do you want the boot loader installed in the MBR? (YES is RECOMMENDED)" +msgstr "A letöbb rendszertöltőnek a Mester Boot Rekordba (MBR), vagy egy pásik partícióra kell települnie. A legtöbben az MBR-t használják a sikeres bootoláshoz, de egyes esetekben érdemes lehet a /boot partícióba telepíteni. Akarod, hogy a rendszertöltő az MBR-be települjön? (EZ AZ AJÁNLOTT)" + +#: gli-dialog.py:1131 +#, python-format +msgid "Your boot device may not be correct. It is currently set to %s, but this device may not be the first to boot. Usually boot devices end in 'a' such as hda or sda." +msgstr "A booteszközöd nem korrekt. A jelenlegi beállítás %s, de az eszköz nem az első a bootfolyamat során. Ezek neve többnyire 'a'-ra végződik, például hda vagy sda." + +#: gli-dialog.py:1132 +msgid " Please confirm your boot device by choosing it from the menu." +msgstr " Kérlek, hagyd jóvá a booteszközöd, amit a menüben választottál." + +#: gli-dialog.py:1136 +msgid "ERROR: No drives set up. Please complete the Partitioning screen first!" +msgstr "HIBA: Nincs beállított meghajtó. Kérlek, fejezd be előbb a Partícionálás képernyőt!" + +#: gli-dialog.py:1145 +msgid "ERROR! Could not set the boot device!" +msgstr "HIBA! Nem lehet beállítani a boot eszközt!" + +#: gli-dialog.py:1147 +msgid "If you have any additional optional arguments you want to pass to the kernel at boot, type them here or just press Enter to continue:" +msgstr "Ha egyéb bootolási opciókat is meg szeretnél adni a kernelnek, akkor azt itt tudod felsorolni, egyéb esetben nyomj Rendbent a folytatáshoz:" + +#: gli-dialog.py:1152 +#: gli-dialog.py:1157 +msgid "ERROR! Could not set bootloader kernel arguments! " +msgstr "HIBA! Nem tudom beállítani a rendszertöltőben a kernel argumentumait!" + +#: gli-dialog.py:1171ß +msgid "Please select the timezone for the new installation. Entries ending with a / can be selected to reveal a sub-list of more specific locations. For example, you can select America/ and then Chicago." +msgstr "Kérlek, válaszd ki az új telepítés időzónáját. A /-rel végződő bejegyzésekre kattintva egy allistát hozhatsz elő, amiben pontosabb helyek vannak felsorolva. Például az Europa/-ra kattintva ki tudod választani Budapestet." + +#: gli-dialog.py:1185 +msgid "ERROR: Could not set that timezone!" +msgstr "HIBA! Ezt az időzónát nem lehet beállítani!" + +#: gli-dialog.py:1192 +msgid "Here you will enter all of your network interface information for the new system. You can either choose a network interface to edit, add a network interface, delete an interface, or edit the miscellaneous options such as hostname and proxy servers." +msgstr "Itt tudod megadni az új rendszered összes hálózati interfészének adatát. Kiválaszthatsz egyet szerkesztésre, hozzáadhatsz egy újat, törölhetsz, vagy egyéb beállításokat szerkeszthetsz, mint pl. gépnév és proxy szerver." + +#: gli-dialog.py:1197 +#: gli-dialog.py:1285 +msgid "Settings: DHCP. Options: " +msgstr "Beállítások: DHCP. Opciók:" + +#: gli-dialog.py:1199 +#: gli-dialog.py:1287 +msgid "IP: " +msgstr "IP:" + +#: gli-dialog.py:1199 +#: gli-dialog.py:1287 +msgid " Broadcast: " +msgstr " Broadcast:" + +#: gli-dialog.py:1199 +#: gli-dialog.py:1287 +msgid " Netmask: " +msgstr " Hálózati maszk:" + +#: gli-dialog.py:1200 +msgid "Add a new network interface" +msgstr "Új hálózati eszköz felvétele" + +#: gli-dialog.py:1206 +msgid "ERROR! Could not set the network interfaces!" +msgstr "HIBA! Nem lehet beállítani a hálózati eszközt!" + +#: gli-dialog.py:1216 +msgid "Choose an interface from the list or Other to type your own if it was not detected." +msgstr "Válassz egy interfészt a listáról, vagy az Egyéb opciót, ha nem lett felismerve." + +#: gli-dialog.py:1219 +msgid "Enter name for new interface (eth0, ppp0, etc.)" +msgstr "Add meg az új interfész nevét (eth0, ppp0, stb.)" + +#: gli-dialog.py:1223 +msgid "An interface with the name is already defined." +msgstr "Ezen a néven már létezik egy interfész." + +#: gli-dialog.py:1237 +#: gli-dialog.py:1262 +msgid "Enter your networking information: (See Chapter 3 of the Handbook for more information) Your broadcast address is probably your IP address with 255 as the last tuple. Do not press Enter until all fields are complete!" +msgstr "Add meg a hálózatod információit: (Lásd a Kézikönyv 3. fejezetét további információért) A broadcast címed valószínűleg ugyanaz, mint az IP címed, csak 255-re végződik. Ne nyomj Entert, amíg nem töltöttél ki mindent helyesen!" + +#: gli-dialog.py:1248 +msgid "Edit" +msgstr "Szerkesztés" + +#: gli-dialog.py:1250 +#, python-format +msgid "For interface %s, you can either edit the interface information (IP Address, Broadcast, Netmask) or Delete the interface." +msgstr "%s interfész. Szerkesztheted az adatait (IP cím, broadcast, hálózati maszk) vagy Törölheted az interfészt." + +#: gli-dialog.py:1276 +msgid "Are you sure you want to remove the interface " +msgstr "Biztosan törölni akarod az interfészt " + +#: gli-dialog.py:1288 +msgid "" +"To be able to surf on the internet, you must know which host shares the Internet connection. This host is called the gateway. It is usually similar to your IP address, but ending in .1\n" +"If you have DHCP then just select your primary Internet interface (no IP will be needed) Start by choosing which interface accesses the Internet:" +msgstr "" +"Ahoz, hogy szörfölj az interneten, tudnod kell, hogy melyik gép osztja meg az internetkapcsolat. Ez rendszerint hasonló IP címmel rendelkezik, mint te, de 1-essel végződik.\n" +"Ha a hálózaton van DHCP, akkor válaszd ki az elsődleges Internet-csatolódat (nem kell hozzá az IP cím ismerete). Válaszd ki, hogy melyik interfészen keresztül éred el az internetet:" + +#: gli-dialog.py:1296 +msgid "Enter the gateway IP address for " +msgstr "Add meg az átjáró IP címét ennek: " + +#: gli-dialog.py:1300 +msgid "Invalid IP Entered! Please try again." +msgstr "Hibás IP! Kérlek, add meg ismét." + +#: gli-dialog.py:1305 +#, python-format +msgid "ERROR! Coult not set the default gateway with IP %(ip)s for interface %(iface)s" +msgstr "HIBA! Nem tudom beállítani a %(iface)s interfész alapértelmezett átjáróját %(ip)s értékre." + +#: gli-dialog.py:1320 +#: gli-dialog.py:1333 +msgid "Fill out the remaining networking settings. The hostname is manditory as that is the name of your computer. Leave the other fields blank if you are not using them. If using DHCP you do not need to enter DNS servers. Do not press Enter until all fields are complete!" +msgstr "Töltsd ki a hátramaradt hálózati beállításokat. A hosztnév a számítógéped neve, mindenképpen meg kell adni. A többit üresen hagyhatod, ha nem használod őket. Ha DHCP-t használsz, akkor nem kell DNS szervert megadnod. Ne nyomj Entert, amíg nem töltöttél ki teljesen minden mezőt!" + +#: gli-dialog.py:1321 +#: gli-dialog.py:1334 +msgid "Enter your Hostname:" +msgstr "Add meg a géped nevét:" + +#: gli-dialog.py:1322 +#: gli-dialog.py:1335 +msgid "Enter your Domain Name:" +msgstr "Add meg a doméned nevét:" + +#: gli-dialog.py:1323 +msgid "Enter your NIS Domain Name:" +msgstr "Add meg a NIS doméned nevét:" + +#: gli-dialog.py:1324 +#: gli-dialog.py:1336 +msgid "Enter a primary DNS server:" +msgstr "Add meg az elsődleges DNS kiszolgálót:" + +#: gli-dialog.py:1325 +#: gli-dialog.py:1337 +msgid "Enter a backup DNS server:" +msgstr "Add meg a háttér DNS kiszolgálót:" + +#: gli-dialog.py:1344 +msgid "Incorrect hostname! It must be a string. Not saved." +msgstr "Hibás hostname! Muszáj szövegnek lennie. Nem lett elmentve." + +#: gli-dialog.py:1350 +msgid "ERROR! Could not set the hostname:" +msgstr "HIBA! Nem lehet beállítani a hostname-t:" + +#: gli-dialog.py:1354 +msgid "Incorrect domainname! It must be a string. Not saved." +msgstr "Hibás doménnév! Muszáj szövegnek lennie. Nem lett elmentve." + +#: gli-dialog.py:1360 +msgid "ERROR! Could not set the domainname:" +msgstr "HIBA! Nem lehet beállítani a doménnevet:" + +#: gli-dialog.py:1364 +msgid "Incorrect nisdomainname! It must be a string. Not saved." +msgstr "Hibás nisdoménnév! Muszáj szövegnek lennie. Nem lett elmentve." + +#: gli-dialog.py:1370 +msgid "ERROR! Could not set the nisdomainname:" +msgstr "HIBA! Nem lehet beállítani a nisdomainname-t:" + +#: gli-dialog.py:1374 +msgid "Incorrect Primary DNS Server! Not saved." +msgstr "Hibás elsődleges DNS szerver! Nem lett elmentve." + +#: gli-dialog.py:1379 +msgid "Incorrect Backup DNS Server! Not saved." +msgstr "Hibás háttér DNS szerver! Nem lett elmentve." + +#: gli-dialog.py:1386 +msgid "ERROR! Could not set the DNS Servers:" +msgstr "HIBA! Nem lehet beállítani a DNS szervereket:" + +#: gli-dialog.py:1390 +msgid "Incorrect HTTP Proxy! It must be a uri. Not saved." +msgstr "Hibás HTTP proxy! Egy URI-t kell megadni. Nem lett elmentve." + +#: gli-dialog.py:1396 +msgid "ERROR! Could not set the HTTP Proxy:" +msgstr "HIBA! Nem lehet beállítani a HTTP proxyt:" + +#: gli-dialog.py:1400 +msgid "Incorrect FTP Proxy! It must be a uri. Not saved." +msgstr "Hibás FTP proxy! Egy URI-t kell megadni. Nem lett elmentve." + +#: gli-dialog.py:1406 +msgid "ERROR! Could not set the FTP Proxy:" +msgstr "HIBA! Nem lehet beállítani az FTP proxyt:" + +#: gli-dialog.py:1410 +msgid "Incorrect RSYNC Proxy! It must be a uri. Not saved." +msgstr "Hibás RSYNC proxy! Egy URI-t kell megadni. Nem lett elmentve." + +#: gli-dialog.py:1416 +msgid "ERROR! Could not set the RSYNC Proxy:" +msgstr "HIBA! Nem lehet beállítani az RSYNC proxyt:" + +#: gli-dialog.py:1422 +msgid "Paul Vixie's cron daemon, fully featured, RECOMMENDED." +msgstr "Paul Wixie cron démonja, mindentudó, AJÁNLOTT." + +#: gli-dialog.py:1423 +msgid "A cute little cron from Matt Dillon." +msgstr "Egy kis cron Matt Dilontól." + +#: gli-dialog.py:1424 +msgid "A scheduler with extended capabilities over cron & anacron" +msgstr "Egy ütemező, a cron & anacron tudásával felvértezve" + +#: gli-dialog.py:1425 +msgid "Don't use a cron daemon. (NOT Recommended!)" +msgstr "Nem akarok cron démont használni. (NEM ajánlott!)" + +#: gli-dialog.py:1426 +msgid "A cron daemon executes scheduled commands. It is very handy if you need to execute some command regularly (for instance daily, weekly or monthly). Gentoo offers three possible cron daemons: dcron, fcron and vixie-cron. Installing one of them is similar to installing a system logger. However, dcron and fcron require an extra configuration command, namely crontab /etc/crontab. If you don't know what to choose, use vixie-cron. If doing a networkless install, choose vixie-cron. Choose your cron daemon:" +msgstr "Egy cron démon előre beállított időpontok alapján tud parancsokat futtatni. Ez akkor hasznos, ha néhány dolgot szabályos időközönként (például naponta, hetente vagy havonként) kell futtatni. A Gentoo három különböző cron démont tartalmaz: dcron, fcron és vixie-cron. Ugyanúgy, mint a rendszernaplózóból, ebből is csak egyet kell telepítened. A dcron és az fdron használata egy speciális parancsot igényel: /etc/crontab. Ha nem tudod, hogy melyik a neked legmegfelelőbb, vagy hálózat nélküli telepítést csinálsz, akkor válaszd a vixie-cront. Most adj meg egy cron démont:" + +#: gli-dialog.py:1435 +msgid "An advanced system logger." +msgstr "Fejlett rendszernaplózó." + +#: gli-dialog.py:1436 +msgid "A Highly-configurable system logger." +msgstr "Egy kiválóan konfigurálható rendszernaplózó." + +#: gli-dialog.py:1437 +msgid "The traditional set of system logging daemons." +msgstr "A rendszernaplózók hagyományos készlete." + +#: gli-dialog.py:1438 +msgid "Linux has an excellent history of logging capabilities -- if you want you can log everything that happens on your system in logfiles. This happens through the system logger. Gentoo offers several system loggers to choose from. If you plan on using sysklogd or syslog-ng you might want to install logrotate afterwards as those system loggers don't provide any rotation mechanism for the log files. If doing networkless, choose syslog-ng. Choose a system logger:" +msgstr "A Linux kitűnő eseménynaplózó képességekkel rendelkezik -- ha akarod, a naplófájlokból mindent megtudhatsz, ami valaha is történt a számítógépeden. Ezt bármelyik rendszernaplózó tudja neked biztosítani. Ha sysklogd-t vagy syslog-ng-t tervezel használni, akkor a későbbiekben érdemes lehet telepíteni a logrotate csomagot, mert ezek nem rendelkeznek beépített naplóforgató mechanizmussal. Ha hálózat nélküli telepítést hajtasz végre, akkor mindenképpen a syslog-ng-t válaszd. Most pedig jelöld ki a telepítendő rendszernaplózót:" + +#: gli-dialog.py:1458 +msgid "There are thousands of applications available to Gentoo users through Portage, Gentoo's package management system. Select some of the more common ones below or add your own additional package list by choosing 'Manual'." +msgstr "Van még számos olyan csomag, amit a Gentoo felhasználók a Portage rendszer segítségével elérhetnek. Ha szeretnél még telepíteni csomagokat, akkor válaszd ki őket, és a 'Kézi' rovatban sorold fel a pontos nevüket." + +#: gli-dialog.py:1459 +msgid "" +"\n" +"Your current package list is: " +msgstr "" +"\n" +"A saját csomaglistád: " + +#: gli-dialog.py:1466 +msgid "ERROR! Could not set the install packages! List of packages:" +msgstr "HIBA! Nem tudom beállítani a feltelepítendő csomagok listáját! A csomaglista:" + +#: gli-dialog.py:1474 +msgid "Enter a space-separated list of extra packages to install on the system" +msgstr "Add meg szóközzel elválasztva azokat az extra csomagokat, amelyeket pluszban szeretnél feltelepíteni a rendszeredre" + +#: gli-dialog.py:1489 +msgid "Choose from the listed packages. If doing a networkless install, only choose (GRP) packages." +msgstr "Válassz a csomaglistából. Ha hálózat nélküli telepítést csinálsz, akkor csak (GRP) jelzésű csomagokat válassz." + +#: gli-dialog.py:1508 +msgid "Do you want to start X on bootup?" +msgstr "Szeretnéd bootoláskor elindítani az X-et?" + +#: gli-dialog.py:1553 +msgid "ALSA Sound Daemon" +msgstr "ALSA hang démon" + +#: gli-dialog.py:1554 +msgid "Common web server (version 1.x)" +msgstr "Általános webszerver (1.x verzió)" + +#: gli-dialog.py:1555 +msgid "Common web server (version 2.x)" +msgstr "Általános web szerver (2.x verzió)" + +#: gli-dialog.py:1556 +msgid "Distributed Compiling System" +msgstr "Elosztott Fordító Rendszer" + +#: gli-dialog.py:1557 +msgid "ESD Sound Daemon" +msgstr "ESD hang démon" + +#: gli-dialog.py:1558 +msgid "Hard Drive Tweaking Utility" +msgstr "Merevlemez-beállító segédprogram" + +#: gli-dialog.py:1559 +msgid "Run scripts found in /etc/conf.d/local.start" +msgstr "A /etc/conf.d/local.start-ban található szkripteket futtatja" + +#: gli-dialog.py:1560 +msgid "Port Mapping Service" +msgstr "Port Mapping szolgáltatás" + +#: gli-dialog.py:1561 +msgid "Common FTP server" +msgstr "Általános FTP szerver" + +#: gli-dialog.py:1562 +msgid "SSH Daemon (allows remote logins)" +msgstr "SSH démon (fogadja a távoli bejelentkezéseket)" + +#: gli-dialog.py:1563 +msgid "X Font Server" +msgstr "X Betűtípus kiszolgáló" + +#: gli-dialog.py:1564 +msgid "X Daemon" +msgstr "X démon" + +#: gli-dialog.py:1565 +msgid "Manually specify your services in a comma-separated list." +msgstr "Kézzel meghatározott szolgáltatások, vesszővel elválasztva." + +#: gli-dialog.py:1566 +msgid "Choose the services you want started on bootup. Note that depending on what packages are selected, some services listed will not exist." +msgstr "Válaszd ki azokat a szolgáltatásokat, amiket a bootfolyamat során el szeretnél indítani. Megjegyzem, a csomagok kiválasztásától függ, hogy mely szolgáltatások fognak a valóságban is létezni." + +#: gli-dialog.py:1574 +msgid "Enter a comma-separated list of services to start on boot" +msgstr "Add meg a bootfolyamat során elinduló szolgáltatások listáját, vesszővel elválasztva" + +#: gli-dialog.py:1599 +msgid "" +"Additional configuration settings for Advanced users (rc.conf)\n" +"Here are some other variables you can set in various configuration files on the new system. If you don't know what a variable does, don't change it!" +msgstr "" +"Egyéb beállítási lehetőségek a tapasztalt felhasználóknak (rc.conf)\n" +"Itt több konfigurációs állományban található változót tudsz beállítani az új rendszered számára. Ha nem tudod, hogy egy változó megváltoztatása mivel jár, akkor inkább ne nyúlj hozzá!" + +#: gli-dialog.py:1600 +msgid "Use KEYMAP to specify the default console keymap." +msgstr "A KEYMAP határozza meg az alapértelmezett konzol-billentyűzetkiosztást." + +#: gli-dialog.py:1601 +msgid "Decision to first load the 'windowkeys' console keymap" +msgstr "A konzol-billentyűzetkiosztás használja-e a 'windowkeys'-t" + +#: gli-dialog.py:1602 +msgid "maps to load for extended keyboards. Most users will leave this as is." +msgstr "kiterjesztett billentyűzet-kiosztások betöltése. A legtöbb felhasználónak nem kell." + +#: gli-dialog.py:1603 +msgid "Specifies the default font that you'd like Linux to use on the console." +msgstr "Az alapértelmezett karakterkészlet a Linux konzol számára." + +#: gli-dialog.py:1604 +msgid "The charset map file to use." +msgstr "A használandó karakter-kiosztás." + +#: gli-dialog.py:1605 +msgid "Set the clock to either UTC or local" +msgstr "Óra beállítása UTC-re vagy helyire" + +#: gli-dialog.py:1606 +msgid "Set EDITOR to your preferred editor." +msgstr "Állitsd be az EDITOR értékét a kedvenc szerkesztődre." + +#: gli-dialog.py:1607 +msgid "What display manager do you use ? [ xdm | gdm | kdm | entrance ]" +msgstr "Melyik képernyőkezelőt használnád? [ xdm | gdm | kdm | entance ]" + +#: gli-dialog.py:1608 +msgid "a new variable to control what window manager to start default with X" +msgstr "egy új változó, amely megadja, alapesetben melyik ablakkezelő induljon el az X indulásakor" + +#: gli-dialog.py:1615 +msgid "Choose your desired keymap:" +msgstr "Válassz billentyűzet-kiosztást:" + +#: gli-dialog.py:1624 +msgid "Should we first load the 'windowkeys' console keymap? Most x86 users will say 'yes' here. Note that non-x86 users should leave it as 'no'." +msgstr "Elsőnek legyen betöltve a 'windowkeys' konzolos billentyűzetkiosztás? A legtöbb x86 felhasználónak az 'Igen' a megfelelő. Megjegyzem, hogy a nem-x86 felhasználók mindenképpen a 'Nem'-et válasszák." + +#: gli-dialog.py:1629 +msgid "This sets the maps to load for extended keyboards. Most users will leave this as is. Enter new value for EXTENDED_KEYMAPS" +msgstr "Ez a beállítás a bővített billentyűzetekhez használatos. A legtöbb felhasználónak nincs rá szüksége. Add meg az új értékét az EXTENDED_KEYMAPS-nak" + +#: gli-dialog.py:1632 +msgid "Choose your desired console font:" +msgstr "Válassz egy szimpatikus konzol-fontot:" + +#: gli-dialog.py:1638 +msgid "Choose your desired console translation:" +msgstr "Válassz egy megfelelő konzol-kódkiosztást:" + +#: gli-dialog.py:1646 +msgid "Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local." +msgstr "A CLOCK (óra) beállítása UTC vagy helyi? Ha nem UTC-re állítottad az időzónádat, válaszd a helyit." + +#: gli-dialog.py:1651 +msgid "Default editor." +msgstr "Alapértelmezett szerkesztő." + +#: gli-dialog.py:1651 +msgid "vi improved editor." +msgstr "Vi IMproved szerkesztő." + +#: gli-dialog.py:1651 +msgid "The emacs editor." +msgstr "Az emacs szerkesztő." + +#: gli-dialog.py:1652 +msgid "Choose your default editor: " +msgstr "Válassz alapértelmezett szövegszerkesztőt: " + +#: gli-dialog.py:1654 +msgid "X Display Manager" +msgstr "X képernyőkezelő" + +#: gli-dialog.py:1655 +msgid "Gnome Display Manager" +msgstr "Gnome képernyőkezelő" + +#: gli-dialog.py:1656 +msgid "KDE Display Manager" +msgstr "KDE képernyőkezelő" + +#: gli-dialog.py:1657 +msgid "Login Manager for Enlightenment" +msgstr "Enlightenment belépéskezelő" + +#: gli-dialog.py:1658 +msgid "Choose your desired display manager to use when starting X (note you must make sure that package also gets installed for it to work):" +msgstr "Válaszd ki, hogy melyik képernyőkezelőt szeretnéd használni az X inulásakor (megjegyzés: győződj meg rőla, hogy a működéshez szükséges csomag fel legyen telepítve):" + +#: gli-dialog.py:1660 +msgid "Choose what window manager you want to start default with X if run with xdm, startx, or xinit. (common options are Gnome or Xsession):" +msgstr "Válassz egy ablakkezelőt, amit az X alapértelmezetten indíthat, ha fut az xdm, startx vagy az xinit. (közös opció a Gnome vagy az Xsession):" + +#: gli-dialog.py:1697 +msgid "Please enter your desired password for the root account. (note it will not show the password. Also do not try to use backspace.):" +msgstr "Kérlek, adj meg egy te általad választott jelszót a root felhasználónak (nem fog megjelenni a jelszó, valamint ne használj backspace-t.):" + +#: gli-dialog.py:1700 +msgid "Enter the new root password again for confirmation" +msgstr "Add meg még egyszer az új root jelszót a jóváhagyáshoz" + +#: gli-dialog.py:1704 +msgid "The passwords do not match. Please try again or cancel." +msgstr "A jelszavak nem egyeztek. Kérlek, add meg ismét, vagy mégsem." + +#: gli-dialog.py:1709 +msgid "ERROR! Could not set the new system root password!" +msgstr "HIBA! Nem tudom beállítani az új rendszer root jelszavát!" + +#: gli-dialog.py:1710 +#: gli-dialog.py:1775 +msgid "Password saved. Press Enter to continue." +msgstr "Jelszó elmentve. Nyomj Entert a folytatáshoz." + +#: gli-dialog.py:1723 +#: gli-dialog.py:1737 +msgid "Add user" +msgstr "Felhasználó hozzáadása" + +#: gli-dialog.py:1724 +msgid "Working as root on a Unix/Linux system is dangerous and should be avoided as much as possible. Therefore it is strongly recommended to add a user for day-to-day use. Choose a user to edit:" +msgstr "Rootként dolgozni egy UNIX/Linux rendszeren nagyon veszélyes, így hacsak lehetséges, kerüld. Erősen ajánlott a számítógép napi használatára egy felhasználót létrehozni. Válassz egy felhasználót szerkesztésre:" + +#: gli-dialog.py:1734 +msgid "ERROR! Could not set the additional users!" +msgstr "HIBA! Nem lehet beállítani az új felhasználót." + +#: gli-dialog.py:1738 +msgid "Enter the username for the new user" +msgstr "Add meg az új felhasználó felhasználónevét" + +#: gli-dialog.py:1742 +msgid "A user with that name already exists" +msgstr "Ilyen nevű felhasználó már létezik" + +#: gli-dialog.py:1746 +#, python-format +msgid "Enter the new password for user %s. (will not be echoed)" +msgstr "Add meg a %s felhasználó új jelszavát. (nem fog megjelenni)" + +#: gli-dialog.py:1747 +msgid "Enter the new password again for confirmation" +msgstr "Add meg az új jelszót ismét a hitelesítéshez" + +#: gli-dialog.py:1750 +msgid "The passwords do not match! Please try again." +msgstr "A két jelszó nem egyezik. Kérlek, add meg őket újra." + +#: gli-dialog.py:1754 +msgid "You must enter a password for the user! Even a blank password will do. You can always edit it again later from the menu." +msgstr "Muszáj megadnod egy jelszót! Akár egy üres is megteszi. Később bármikor átírhatod a menüben." + +#: gli-dialog.py:1760 +#: gli-dialog.py:1765 +msgid "Password" +msgstr "Jelszó" + +#: gli-dialog.py:1760 +#: gli-dialog.py:1777 +msgid "Group Membership" +msgstr "Csoport-tagság" + +#: gli-dialog.py:1760 +#: gli-dialog.py:1801 +msgid "Shell" +msgstr "Parancsértelmező" + +#: gli-dialog.py:1760 +#: gli-dialog.py:1806 +msgid "Home Directory" +msgstr "Saját könyvtár" + +#: gli-dialog.py:1760 +#: gli-dialog.py:1811 +msgid "UID" +msgstr "UID" + +#: gli-dialog.py:1760 +#: gli-dialog.py:1818 +msgid "Comment" +msgstr "Megjegyzés" + +#: gli-dialog.py:1761 +#, python-format +msgid "Choose an option for user %s" +msgstr "%s felhasználó beállításainak kiválasztása" + +#: gli-dialog.py:1766 +msgid "Enter the new password" +msgstr "Add meg az új jelszót" + +#: gli-dialog.py:1769 +msgid "Enter the new password again" +msgstr "Új jelszó ismét" + +#: gli-dialog.py:1773 +msgid "The passwords do not match! Try again." +msgstr "A két jelszó nem egyezik! Add meg őket újra." + +#: gli-dialog.py:1779 +msgid "The usual group for normal users." +msgstr "A normál felhasználók szokásos csoportja." + +#: gli-dialog.py:1780 +msgid "Allows users to attempt to su to root." +msgstr "A csoport tagjai a su paranccsal root felhasználók lehetnek." + +#: gli-dialog.py:1781 +msgid "Allows access to audio devices." +msgstr "Jogosultság adása a hangeszközökhöz." + +#: gli-dialog.py:1782 +msgid "Allows access to games." +msgstr "Jogosultság adása a játékokhoz." + +#: gli-dialog.py:1783 +#: gli-dialog.py:1784 +#: gli-dialog.py:1785 +#: gli-dialog.py:1786 +msgid "For users who know what they're doing only." +msgstr "Csak azok számára, akik tudják, mit csinálnak." + +#: gli-dialog.py:1787 +msgid "Manually specify your groups in a comma-separated list." +msgstr "Add meg a csoportokat egymás után, vesszővel elválasztva." + +#: gli-dialog.py:1788 +#, python-format +msgid "Select which groups you would like the user %s to be in." +msgstr "Válaszd ki, a %s felhasználó milyen csoportok tagja legyen." + +#: gli-dialog.py:1798 +msgid "Enter a comma-separated list of groups the user is to be in" +msgstr "Add meg azokat a csoportokat (vesszővel elválasztva), amelyeknek a felhasználó tagja lesz" + +#: gli-dialog.py:1802 +msgid "Enter the shell you want the user to use. default is /bin/bash. " +msgstr "Add meg, melyik parancsértelmezőt használja majd a felhasználó. Az alapértelmezett a /bin/bash." + +#: gli-dialog.py:1807 +msgid "Enter the user's home directory. default is /home/username. " +msgstr "Add meg a felhasználó saját könyvtárát. Az alapértelmezett a /home/felhasználónév." + +#: gli-dialog.py:1812 +msgid "Enter the user's UID. If left blank the system will choose a default value (this is recommended)." +msgstr "Add meg a felhasználó UID-jét (egyedi azonosító). Ha üresen hagyod, a rendszer adja meg az alapértelmezett értéket (ez a javasolt beállítás)." + +#: gli-dialog.py:1819 +msgid "Enter the user's comment. This is completely optional." +msgstr "Add meg a felhasználóhoz fűzött megjegyzéseket. Egyáltalán nem kötelező..." + +#: gli-dialog.py:1827 +#, python-format +msgid "Are you sure you want to delete the user %s ?" +msgstr "Biztosan törlöd a %s nevű felhasználót?" + +#: gli-dialog.py:1835 +msgid "Would you like to save these install settings for use again later?" +msgstr "Szeretnéd elmenteni a jelenlegi telepítési beállításokat, hogy később is felhasználhasd?" + +#: gli-dialog.py:1839 +msgid "Enter a filename for the XML file. Use full path!" +msgstr "Add meg az XML fájl nevét (teljes elérési úttal)!" + +#: gli-dialog.py:1843 +#, python-format +msgid "The file %s already exists. Do you want to overwrite it?" +msgstr "A %s nevű fájl már létezik. Biztosan felülírod?" + +#: gli-dialog.py:1850 +msgid "Error. File couldn't be saved. Saving to /tmp/installprofile.xml instead." +msgstr "Hiba történt. A fájl nem menthető el. Megpróbálom a /tmp/installprofile.xml helyre menteni." + +#: gli-dialog.py:1856 +msgid "Complete failure to save install profile!" +msgstr "Egyáltalán nem sikerült elmenteni a telepítési profilt!" + +#: gli-dialog.py:1952 +msgid "Install completed!" +msgstr "A telepítés elkészült!" + +#: gli-dialog.py:1954 +msgid "Install done!" +msgstr "A telepítés kész!" + +#: gli-dialog.py:1970 +#, python-format +msgid "" +"There was an Exception received during the install that is outside of the normal install errors. This is a bad thing. The error was: %s \n" +" You have several ways of handling this. If you cannot resolve it, please submit a bug report (after searching to make sure it's not a known issue and verifying you didn't do something stupid) with the contents of /var/log/install.log and /tmp/installprofile.xml and the version of the installer you used." +msgstr "" +"Egy olyan hiba történt a telepítés során, amely nem tartozik a szokásosak közé. Ez elég rossz dolog... A hiba maga: %s \n" +"Többféle módon kezelheted a helyzetet. Ha nem tudod megoldani, kérlek, készíts hibajelentést (miután rákerestél, s meggyőződtél róla, hogy nem egy már ismert hiba, és nem csináltál valami hülyeséget). Ehhez csatold a /var/log/install.log és a /tmp/installprofile.xml fájlok tartalmát is, valamint a használt telepítő verzióját!" + +#: gli-dialog.py:2002 +msgid "Installation Started!" +msgstr "A telepítés elkezdődött!" + +#: gli-dialog.py:2002 +#: gli-dialog.py:2005 +msgid "Installation progress" +msgstr "Telepítési folyamat" + +#: gli-dialog.py:2005 +msgid "Continuing Installation" +msgstr "Telepítés folytatása" + +#: gli-dialog.py:2025 +#, python-format +msgid "" +"On step %(A)d of %(B)d. Current step: %(C)s\n" +"%(D)s" +msgstr "" +"%(A)d. lépés (összesen %(B)d). Jelenlegi lépés: %(C)s\n" +"%(D)s" + +#: gli-dialog.py:2036 +#, python-format +msgid "On step %(A)d of %(B)d. Current step: %(C)s" +msgstr "%(A)d. lépés (összesen %(B)d). Jelenlegi lépés: %(C)s" + diff --git a/src/fe/dialog/languages/zh/GLIInstallProfile.po b/src/fe/dialog/languages/zh/GLIInstallProfile.po new file mode 100644 index 0000000..2897489 --- /dev/null +++ b/src/fe/dialog/languages/zh/GLIInstallProfile.po @@ -0,0 +1,313 @@ +# Gentoo Linux Installer. +# Copyright (C) 2007 +# This file is distributed under the same license as the Gentoo Linux Installer. +# Preston Cody <codeman@gentoo.org>, 2007. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: InstallProfile 2007.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-09-02 11:58-0400\n" +"PO-Revision-Date: 2007-03-09 00:06+0800\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: GLIInstallProfile.py:586 +msgid "Popular Desktop Applications" +msgstr "常见桌面应用程序" + +#: GLIInstallProfile.py:587 +msgid "GTK+ music player" +msgstr "基于GTK+的音乐播放器" + +#: GLIInstallProfile.py:588 +msgid "A GTK+ tagging program for MP3, OGG, FLAC, and more" +msgstr "一个基于GTK+的MP3、OGG和FLAC等音乐文件的标签编辑管理器" + +#: GLIInstallProfile.py:589 +msgid "A GNOME groupware application, a Microsoft Outlook workalike" +msgstr "一个GNOME的组件应用程序,类似Microsoft Outlook" + +#: GLIInstallProfile.py:590 +msgid "GTK+ Instant Messenger client" +msgstr "基于GTK+的即时通信客户端" + +#: GLIInstallProfile.py:591 +msgid "GTK+ FTP Client" +msgstr "基于GTK+的FTP客户端" + +#: GLIInstallProfile.py:592 +msgid "GNU Image Manipulation Program" +msgstr "GNU图象处理程序" + +#: GLIInstallProfile.py:593 +msgid "GNOME CD Writing Software" +msgstr "GNOME的CD刻录软件" + +#: GLIInstallProfile.py:594 +msgid "GTK+ application for transferring pictures from a digital camera" +msgstr "基于GTK+的应用程序,用于从数码相机中传输照片" + +#: GLIInstallProfile.py:595 +msgid "A SVG based generic vector-drawing program" +msgstr "一个通用的SVG矢量图绘制程序" + +#: GLIInstallProfile.py:596 +msgid "KDE CD Writing Software" +msgstr "KDE的CD刻录软件" + +#: GLIInstallProfile.py:597 +msgid "An integrated office suite for KDE, the K Desktop Environment" +msgstr "KDE桌面环境下的一个完整办公套件" + +#: GLIInstallProfile.py:598 +msgid "The Mozilla Suite" +msgstr "Mozilla套件" + +#: GLIInstallProfile.py:599 +msgid "The Mozilla Firefox Web Browser" +msgstr "Mozilla Firefox网页浏览器" + +#: GLIInstallProfile.py:600 +msgid "Thunderbird Mail Client" +msgstr "Thunderbird邮件客户端" + +#: GLIInstallProfile.py:601 +msgid "Media Player for Linux" +msgstr "Linux下的媒体播放器" + +#: GLIInstallProfile.py:602 +msgid "OpenOffice.org, a full office productivity suite." +msgstr "OpenOffice.org,一个完整的办公生产套件" + +#: GLIInstallProfile.py:603 +msgid "Same as OpenOffice but a binary package (no compiling!)" +msgstr "与OpenOffice一样,不过是二进制软件包(无需编译!)" + +#: GLIInstallProfile.py:604 +msgid "GTK news reader" +msgstr "基于GTK的新闻阅读器" + +#: GLIInstallProfile.py:605 +msgid "Music management and playback software for GNOME" +msgstr "GNOME的音乐管理和播放软件" + +#: GLIInstallProfile.py:606 +msgid "Open replacement for the Mozilla Suite" +msgstr "Mozilla套件的开放替代品" + +#: GLIInstallProfile.py:607 GLIInstallProfile.py:608 +msgid "A light weight email client and news reader" +msgstr "一个轻量级的邮件客户端和新闻阅读器" + +#: GLIInstallProfile.py:609 +msgid "VLC media player - Video player and streamer" +msgstr "VLC媒体播放器——视频播放和流处理工具" + +#: GLIInstallProfile.py:610 +msgid "GTK+ Graphical IRC Client" +msgstr "基于GTK+的图形界面IRC客户端" + +#: GLIInstallProfile.py:611 +msgid "Xine movie player" +msgstr "Xine电影播放器" + +#: GLIInstallProfile.py:612 +msgid "X MultiMedia System" +msgstr "X多媒体系统" + +#: GLIInstallProfile.py:613 +msgid "Applications often found on servers." +msgstr "常用的服务器端应用程序" + +#: GLIInstallProfile.py:614 +msgid "Apache Web Server" +msgstr "Apache Web服务器" + +#: GLIInstallProfile.py:615 +msgid "The Common Unix Printing System" +msgstr "通用Unix打印系统" + +#: GLIInstallProfile.py:616 +msgid "A highly configurable, drop-in replacement for sendmail" +msgstr "一个高度可配置的sendmail的完全替代品" + +#: GLIInstallProfile.py:617 +msgid "Linux kernel (2.4+) firewall, NAT and packet mangling tools" +msgstr "Linux内核(2.4+)下的防火墙、NAT和数据包处理工具" + +#: GLIInstallProfile.py:618 +msgid "Apache module for PHP" +msgstr "Apache的PHP支持模块" + +#: GLIInstallProfile.py:619 +msgid "A fast, multi-threaded, multi-user SQL database server" +msgstr "一个快速的、多线程、多用户的SQL数据库服务器" + +#: GLIInstallProfile.py:620 +msgid "The PHP scripting language" +msgstr "PHP脚本语言" + +#: GLIInstallProfile.py:621 +msgid "A fast and secure drop-in replacement for sendmail" +msgstr "一个快速且安全的sendmail完全替代品" + +#: GLIInstallProfile.py:622 +msgid "sophisticated Object-Relational DBMS" +msgstr "成熟的对象-关系模型数据库管理系统" + +#: GLIInstallProfile.py:623 +msgid "ProFTP Server" +msgstr "ProFTP服务器" + +#: GLIInstallProfile.py:624 +msgid "SAMBA client/server programs for UNIX" +msgstr "UNIX下的SAMBA客户端/服务器程序" + +#: GLIInstallProfile.py:625 +msgid "Widely-used Mail Transport Agent (MTA)" +msgstr "应用广泛的邮件传输代理(MTA)" + +#: GLIInstallProfile.py:626 +msgid "Window managers and X selection." +msgstr "窗口管理器和X选择" + +#: GLIInstallProfile.py:627 +msgid "The Gnome Desktop Environment" +msgstr "Gnome桌面环境" + +#: GLIInstallProfile.py:628 +msgid "The K Desktop Environment" +msgstr "K桌面环境" + +#: GLIInstallProfile.py:629 +msgid "A small, fast, full-featured window manager for X" +msgstr "一个小巧、快速且功能全面的X窗口管理器" + +#: GLIInstallProfile.py:630 +msgid "Enlightenment Window Manager" +msgstr "Enlightenment窗口管理器" + +#: GLIInstallProfile.py:631 +msgid "Fluxbox is an X11 window manager featuring tabs and an iconbar" +msgstr "Fluxbox是一个具有标签和图标栏的X11窗口管理器" + +#: GLIInstallProfile.py:632 +msgid "IceWM is designed for speed, size, and simplicity" +msgstr "IceWM是为快速、小巧和简朴而设计的" + +#: GLIInstallProfile.py:633 +msgid "Windowmaker is a window manager featuring the look and feel of NEXTSTEP" +msgstr "Windowmaker是一个具有NEXTSTEP的外观和感觉的窗口管理器" + +#: GLIInstallProfile.py:634 +msgid "XFCE Desktop Environment" +msgstr "XFCE桌面环境" + +#: GLIInstallProfile.py:635 +msgid "An X11 implementation maintained by the X.Org Foundation" +msgstr "一个由X.Org基金会维护的X11实现" + +#: GLIInstallProfile.py:636 +msgid "Miscellaneous Applications you may want." +msgstr "你可能需要的各种应用程序" + +#: GLIInstallProfile.py:637 +msgid "tool for distributing files via a distributed network of nodes" +msgstr "通过分布式网络节点发布文件的工具" + +#: GLIInstallProfile.py:638 +msgid "GTK+ Web IDE" +msgstr "基于GTK+的网页集成开发环境" + +#: GLIInstallProfile.py:639 +msgid "An incredibly powerful, extensible text editor" +msgstr "一个异常强大、可扩展的文本编辑器" + +#: GLIInstallProfile.py:640 +msgid "Single process stack of various system monitors" +msgstr "单进程的各种系统监视程序集" + +#: GLIInstallProfile.py:641 +msgid "GUI version of the Vim text editor" +msgstr "GUI版本的Vim文本编辑器" + +#: GLIInstallProfile.py:642 +msgid "ssh-agent manager" +msgstr "ssh-agent密钥管理工具" + +#: GLIInstallProfile.py:643 +msgid "Rotates, compresses, and mails system logs" +msgstr "替换、压缩和邮寄系统日志" + +#: GLIInstallProfile.py:644 +msgid "Network Time Protocol suite/programs" +msgstr "网络时间协议套件/程序" + +#: GLIInstallProfile.py:645 +msgid "A Remote Desktop Protocol Client" +msgstr "一个远程桌面协议客户端" + +#: GLIInstallProfile.py:646 +msgid "Secure way to index and quickly search for files on your system" +msgstr "安全快速地在你的系统中索引和查找文件" + +#: GLIInstallProfile.py:647 +msgid "Utility to trace the route of IP packets" +msgstr "用于跟踪IP数据包的路由的工具" + +#: GLIInstallProfile.py:648 +msgid "Gentoo Linux USE flags editor" +msgstr "Gentoo Linux USE标记编辑器" + +#: GLIInstallProfile.py:649 +msgid "Vim, an improved vi-style text editor" +msgstr "Vim,加强版vi风格的文本编辑器" + +#: GLIInstallProfile.py:650 +msgid "A commercial-quality network protocol analyzer" +msgstr "一个具有商业品质的网络协议分析器" + +#: GLIInstallProfile.py:651 +msgid "Applications recommended by the GLI Team." +msgstr "GLI团队推荐的应用程序" + +#: GLIInstallProfile.py:652 +msgid "A versatile IDE for GNOME" +msgstr "GNOME的多用途集成开发环境" + +#: GLIInstallProfile.py:653 +msgid "a tool to locally check for signs of a rootkit" +msgstr "用于在本地检查rootkit木马征兆的工具" + +#: GLIInstallProfile.py:654 +msgid "Addictive OpenGL-based block game" +msgstr "令人着迷的俄罗斯方块,基于OpenGL" + +#: GLIInstallProfile.py:655 +msgid "The GNU Privacy Guard, a GPL PGP replacement" +msgstr "GNU隐私卫士,GPL PGP的替代品" + +#: GLIInstallProfile.py:656 +msgid "Software for generating and retrieving SNMP data" +msgstr "用来产生和收集SNMP数据的软件" + +#: GLIInstallProfile.py:657 +msgid "the network swiss army knife" +msgstr "网络瑞士军刀" + +#: GLIInstallProfile.py:658 +msgid "A utility for network exploration or security auditing" +msgstr "用于网络探测和安全检查的工具" + +#: GLIInstallProfile.py:659 +msgid "full-screen window manager that multiplexes between several processes" +msgstr "全屏窗口管理器,支持多任务分屏" + +#: GLIInstallProfile.py:660 +msgid "An X Viewer for PDF Files" +msgstr "一个基于X的PDF文件浏览器" diff --git a/src/fe/dialog/languages/zh/LC_MESSAGES/GLIInstallProfile.mo b/src/fe/dialog/languages/zh/LC_MESSAGES/GLIInstallProfile.mo Binary files differnew file mode 100644 index 0000000..1e90970 --- /dev/null +++ b/src/fe/dialog/languages/zh/LC_MESSAGES/GLIInstallProfile.mo diff --git a/src/fe/dialog/languages/zh/LC_MESSAGES/gli-dialog.mo b/src/fe/dialog/languages/zh/LC_MESSAGES/gli-dialog.mo Binary files differnew file mode 100644 index 0000000..1fd78e0 --- /dev/null +++ b/src/fe/dialog/languages/zh/LC_MESSAGES/gli-dialog.mo diff --git a/src/fe/dialog/languages/zh/gli-dialog.po b/src/fe/dialog/languages/zh/gli-dialog.po new file mode 100644 index 0000000..55fd981 --- /dev/null +++ b/src/fe/dialog/languages/zh/gli-dialog.po @@ -0,0 +1,1822 @@ +# Gentoo Linux Installer. +# Copyright (C) 2007 +# This file is distributed under the same license as the Gentoo Linux Installer. +# Preston Cody <codeman@gentoo.org>, 2007. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: gli-dialog 2007.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-02-20 21:19-0500\n" +"PO-Revision-Date: 2007-03-21 03:01+0800\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gli-dialog.py:62 +msgid "" +"Welcome to the Gentoo Linux Installer! This program will help install " +"Gentoo on your computer.\n" +"Before proceeding please thoroughly read the Gentoo Installation Handbook " +"available at \n" +"http://www.gentoo.org/doc/en/handbook/index.xml \n" +"\n" +"Press OK to continue" +msgstr "" +"欢迎使用Gentoo Linux Installer!本程序帮助你将Gentoo安装到你的电脑。\n" +"开始之前请先通读Gentoo安装手册:\n" +"http://www.gentoo.org/doc/en/handbook/index.xml \n" +"\n" +"Press OK to continue" + +#: gli-dialog.py:66 +msgid "Welcome" +msgstr "欢迎" + +#: gli-dialog.py:70 +msgid "Standard" +msgstr "标准" + +#: gli-dialog.py:71 +msgid "Advanced" +msgstr "高级" + +#: gli-dialog.py:72 +msgid "" +"This installer has two modes, an advanced mode for those knowledgable with " +"the inner details of their computer and a standard mode where many of the " +"defaults will be chosen for the user for simplicity and to speed up the " +"install process. The advanced mode offers full customizability and is " +"required for generating profiles to be used other computers. \n" +"The advanced mode is recommended by the developers.\n" +"\t\t" +msgstr "" +"本安装程序提供两种安装模式,高级模式给那些很了解自己电脑内部细节的人用;标准模式下,为了简单起见和加快安装过程,将会为用户选择很多默认设置。高级模式下提供很强的可定制性,且如果要生成可用在其他电脑上的配置文件必须使用高级模式。\n" +"开发人员推荐使用高级模式。\n" +"\\t\\t" + +#: gli-dialog.py:80 +msgid "" +"Do you want to do a networkless installation? This will limit the " +"customizability of your install due to the limitations of the LiveCD. For " +"example, choosing networkless will set your installation stage, portage " +"snapshot, and limit your extra packages selections. NOTE: It is easily " +"possible to do a networkless installation on a machine with an active " +"Internet connection; in fact this may result in the fastest installations " +"for many users." +msgstr "你是否想采用无网络安装方式?由于LiveCD的局限性,安装的可定制性将会受到限制。例如,无网络方式将为你设置安装的stage、portage快照,并且限制你选择额外的软件包。注意:你可以很容易地在一台网络连接运行良好的机器上进行无网络安装方式;实际上对大多数用户来说这是最快捷的安装方式" + +#: gli-dialog.py:82 +msgid "Networkless" +msgstr "无网络方式" + +#: gli-dialog.py:83 +msgid "Internet enabled" +msgstr "有网络方式" + +#: gli-dialog.py:97 +msgid "ERROR: Could not set networkless information in the profile" +msgstr "错误:无法在配置文件中设置无网络信息" + +#: gli-dialog.py:103 gli-dialog.py:141 gli-dialog.py:204 gli-dialog.py:567 +#: gli-dialog.py:946 gli-dialog.py:1063 gli-dialog.py:1121 gli-dialog.py:1274 +#: gli-dialog.py:1506 gli-dialog.py:1622 gli-dialog.py:1825 gli-dialog.py:1833 +#: gli-dialog.py:1968 +msgid "Yes" +msgstr "是" + +#: gli-dialog.py:104 gli-dialog.py:142 gli-dialog.py:205 gli-dialog.py:568 +#: gli-dialog.py:947 gli-dialog.py:1064 gli-dialog.py:1122 gli-dialog.py:1275 +#: gli-dialog.py:1507 gli-dialog.py:1623 gli-dialog.py:1826 gli-dialog.py:1834 +#: gli-dialog.py:1969 +msgid "No" +msgstr "否" + +#: gli-dialog.py:107 +msgid "" +"\n" +"\tAll of the installation settings are stored in an XML file, which we call " +"the InstallProfile. If you have a previously-created profile, you can load " +"it now\n" +"\tfor use in this installation.\n" +"\tDo you have a previously generated profile for the installer?\n" +"\t" +msgstr "" +"\n" +"\t所有的安装设置存储在一个XML文件中,我们称之为InstallProfile。如果你有之前创建过的配置文件,现在可以将它载入,\n" +"\t用于本次安装。\t你有以前为安装程序生成的配置文件么?\n" +"\t" + +#: gli-dialog.py:113 +msgid "Enter the filename of the XML file" +msgstr "输入XML配置文件名" + +#: gli-dialog.py:118 +#, python-format +msgid "Cannot open file %s" +msgstr "无法打开文件%s" + +#: gli-dialog.py:143 +msgid "" +"Do you want debugging output enabled during the install? This is mainly " +"meant to help the developers debug any bugs." +msgstr "你是否想要在安装过程中打开调试信息输出?这样做主要是为了帮助开发人员除错。" + +#: gli-dialog.py:158 gli-dialog.py:162 gli-dialog.py:365 gli-dialog.py:369 +#: gli-dialog.py:398 gli-dialog.py:402 gli-dialog.py:514 gli-dialog.py:519 +#: gli-dialog.py:837 gli-dialog.py:844 gli-dialog.py:848 gli-dialog.py:919 +#: gli-dialog.py:924 gli-dialog.py:1011 gli-dialog.py:1016 gli-dialog.py:1043 +#: gli-dialog.py:1047 gli-dialog.py:1215 gli-dialog.py:1218 gli-dialog.py:1565 +#: gli-dialog.py:1573 gli-dialog.py:1787 gli-dialog.py:1797 +msgid "Other" +msgstr "其他" + +#: gli-dialog.py:158 gli-dialog.py:1215 +msgid "Type your own." +msgstr "自己输入。" + +#: gli-dialog.py:159 +msgid "" +"In order to complete most installs, an active Internet connection is " +"required. Listed are the network devices already detected. In this step " +"you will need to setup one network connection for GLI to use to connect to " +"the Internet. If your desired device does not show up in the list, you can " +"select Other and input the device name manually." +msgstr "为了完成大部分安装任务,需要一个正常的Internet连接。所列出的是已检测到的网络设备。这一步你必需设置一个网络连接让GLI连接到Internet。如果你想要的设备没有显示在列表中,你可以选择“其他”然后手动输入设备名。" + +#: gli-dialog.py:163 +msgid "" +"Enter the interface (NIC) you would like to use for installation (e.g. eth0):" +msgstr "输入你想在安装过程中使用的网络接口(NIC,比如eth0):" + +#: gli-dialog.py:170 gli-dialog.py:1228 gli-dialog.py:1253 +msgid "DHCP" +msgstr "DHCP" + +#: gli-dialog.py:171 gli-dialog.py:1229 gli-dialog.py:1254 +msgid "Static IP/Manual" +msgstr "静态IP/手动方式" + +#: gli-dialog.py:172 gli-dialog.py:1193 +msgid "" +"To setup your network interface, you can either use DHCP if enabled, or " +"manually enter your network information.\n" +" DHCP (Dynamic Host Configuration Protocol) makes it possible to " +"automatically receive networking information (IP address, netmask, broadcast " +"address, gateway, nameservers etc.). This only works if you have a DHCP " +"server in your network (or if your provider provides a DHCP service). If " +"you do not, you must enter the information manually. Please select your " +"networking configuration method:" +msgstr "" +"设置网络接口可以使用DHCP(如果可用)或者手动输入你的网络信息。\n" +" DHCP(动态主机配置协议)能够自动获取网络信息(IP地址、子网掩码、广播地址、网关以及域名服务器等)。只有当你的网络中拥有一台DHCP服务器时才能获取(或者你的网络服务提供商提供DHCP服务)。否则,你必须手动输入网络信息。请选择网络配置方式:" + +#: gli-dialog.py:176 gli-dialog.py:1233 gli-dialog.py:1258 +msgid "" +"If you have any additional DHCP options to pass, type them here in a space-" +"separated list. If you have none, just press Enter." +msgstr "如果你需要传递任何附加的DHCP选项,请在这里列出,以空格分开。如果没有,请按回车。" + +#: gli-dialog.py:179 +msgid "" +"Enter your networking information: (See Chapter 3 of the Handbook for more " +"information) Your broadcast address is probably your IP address with 255 as " +"the last tuple. DO NOT PRESS ENTER until all fields you intend to fill out " +"are complete!" +msgstr "输入你的网络信息:(更多资料请参考手册第3章)你的广播地址很可能就是你的IP地址把最后一个单元改成255。请在填完所有字段后再按回车!" + +#: gli-dialog.py:180 gli-dialog.py:1238 gli-dialog.py:1263 +msgid "Enter your IP address:" +msgstr "输入你的IP地址:" + +#: gli-dialog.py:181 gli-dialog.py:1239 gli-dialog.py:1264 +msgid "Enter your Broadcast address:" +msgstr "输入广播地址:" + +#: gli-dialog.py:182 gli-dialog.py:1240 gli-dialog.py:1265 +msgid "Enter your Netmask:" +msgstr "输入子网掩码:" + +#: gli-dialog.py:183 +msgid "Enter your default gateway:" +msgstr "输入默认的网关:" + +#: gli-dialog.py:184 +msgid "Enter a DNS server:" +msgstr "输入一个DNS服务器:" + +#: gli-dialog.py:185 gli-dialog.py:1326 +msgid "Enter a HTTP Proxy IP:" +msgstr "输入一个HTTP代理的IP:" + +#: gli-dialog.py:186 gli-dialog.py:1327 +msgid "Enter a FTP Proxy IP:" +msgstr "输入一个FTP代理的IP:" + +#: gli-dialog.py:187 gli-dialog.py:1328 +msgid "Enter a RSYNC Proxy:" +msgstr "输入一个RSYNC代理:" + +#: gli-dialog.py:197 +msgid "" +"Sorry, but the network could not be set up successfully. Please configure " +"yourself manually and restart the installer." +msgstr "很抱歉,网络无法设置成功。请你自己手动配置并重新启动安装程序。" + +#: gli-dialog.py:199 +msgid "ERROR! Could not setup networking!" +msgstr "错误!无法设置网络!" + +#: gli-dialog.py:207 +msgid "" +"Do you want SSH enabled during the install? This will allow you to login " +"remotely during the installation process. If choosing Yes, be sure you " +"select a new LiveCD root password!" +msgstr "" +"你是否想在安装时启用SSH?这样将允许你在安装过程中从远程登录。如果选择是,要记" +"得为LiveCD挑选一个新的root密码!" + +#: gli-dialog.py:211 +msgid "ERROR! : Could not start the SSH daemon!" +msgstr "错误!:无法开启SSH守护进程!" + +#: gli-dialog.py:219 +msgid "" +"If you want to be able to login to your machine from another console during " +"the installation,\n" +"\tyou will want to enter a new root password for the LIVECD.\n" +"\tNote that this can be different from your new system's root password.\n" +"\tPresss Enter twice to skip this step.\n" +"\tEnter the new LIVECD root password (will not be echoed):\t" +msgstr "" +"如果你想要在安装时从另一个控制台登录到你的机器,\n" +"\t那么你需要为LIVECD输入一个新的root密码。\n" +"\t注意这个密码可以跟你新系统的root密码不同。\n" +"\t按两次Enter忽略这个步骤。\n" +"\t输入新的LIVECD root密码(不会回显):\t" + +#: gli-dialog.py:227 +msgid "Enter the new LIVECD root password again to verify:" +msgstr "再次输入新的LIVECD root密码以确认:" + +#: gli-dialog.py:231 +msgid "The passwords do not match. Please try again." +msgstr "密码不匹配。请重试。" + +#: gli-dialog.py:239 +msgid "ERROR! Could not hash the root password on the LiveCD!" +msgstr "错误!无法为LiveCD的root密码计算散列值!" + +#: gli-dialog.py:248 +msgid "ERROR! Could not set the root password on the livecd environment!" +msgstr "错误!无法在livecd环境下设置root密码!" + +#: gli-dialog.py:255 +msgid "" +"Here is a list of modules currently loaded on your machine.\n" +" Please look through and see if any modules are missing\n" +" that you would like loaded.\n" +"\n" +msgstr "" +"这是你机器上当前加载的模块列表。\n" +" 请检查一遍看看是否遗漏了哪些你要加载的模块。\n" +"\n" + +#: gli-dialog.py:256 +msgid "Continue" +msgstr "继续" + +#: gli-dialog.py:257 +msgid "Loaded Modules" +msgstr "已加载的模块" + +#: gli-dialog.py:258 +msgid "" +"If you have additional modules you would like loaded before the installation " +"begins (ex. a network driver), enter them in a space-separated list." +msgstr "如果你有其他模块想要在安装之前加载(比如一个网络模块),请将它们列出,以空格分开。" + +#: gli-dialog.py:272 +#, python-format +msgid "ERROR! : Could not load module: %s " +msgstr "错误!:无法加载模块:%s " + +#: gli-dialog.py:277 +msgid "" +"ERROR!: An unknown error occurred during modprobing the modules. Please " +"load them manually and then restart the installer." +msgstr "" +"错误!:modprobe模块的时候发生未知错误。请手动加载它们并重新启动安装程序。" + +#: gli-dialog.py:304 gli-dialog.py:312 gli-dialog.py:1200 gli-dialog.py:1208 +msgid "Add" +msgstr "添加" + +#: gli-dialog.py:304 +msgid "Define a new mountpoint" +msgstr "定义一个新的挂载点" + +#: gli-dialog.py:305 +msgid "" +"Please define the mountpoints of your partitions for the new system. At " +"minimum, a / mountpoint must be defined. Defining /boot and /home " +"mountpoints is recommended." +msgstr "" +"请为你新系统的分区定义挂载点。必须至少定义一个“/”挂载点。推荐定义“/boot”和“/" +"home”挂载点。" + +#: gli-dialog.py:305 gli-dialog.py:557 gli-dialog.py:1201 gli-dialog.py:1459 +#: gli-dialog.py:1610 gli-dialog.py:1725 +msgid "Save and Continue" +msgstr "保存并继续" + +#: gli-dialog.py:310 +msgid "ERROR: Could net set mounts!" +msgstr "错误:无法设定挂载点!" + +#: gli-dialog.py:328 gli-dialog.py:467 gli-dialog.py:530 +msgid "Logical (" +msgstr "逻辑分区(" + +#: gli-dialog.py:330 gli-dialog.py:469 gli-dialog.py:532 +msgid "Primary (" +msgstr "主分区(" + +#: gli-dialog.py:346 +msgid "Select a Partition to define a mountpoint for" +msgstr "选择一个分区为其定义一个挂载点" + +#: gli-dialog.py:366 +#, python-format +msgid "" +"Choose a mountpoint from the list or choose Other to type your own for " +"partition %s. " +msgstr "从列表中为分区%s选择一个挂载点,或者选择“其他”然后自己输入一个。" + +#: gli-dialog.py:370 gli-dialog.py:403 +#, python-format +msgid "Enter a mountpoint for partition %s" +msgstr "为分区%s输入一个挂载点" + +#: gli-dialog.py:375 gli-dialog.py:415 +#, python-format +msgid "Enter mount options for mountpoint %s. Leave blank for defaults" +msgstr "为挂载点%s输入挂载选项。如选用默认请置空" + +#: gli-dialog.py:389 gli-dialog.py:397 +msgid "Change Mountpoint" +msgstr "更改挂载点" + +#: gli-dialog.py:390 gli-dialog.py:406 +msgid "Change Filesystem Type" +msgstr "更改文件系统类型" + +#: gli-dialog.py:391 gli-dialog.py:414 +msgid "Change Mountoptions" +msgstr "更改挂载选项" + +#: gli-dialog.py:392 gli-dialog.py:419 +msgid "Delete This Mountpoint" +msgstr "删除这个挂载点" + +#: gli-dialog.py:393 +#, python-format +msgid "" +"Select an option for device %(dev)s : Mountpoint: %(mt)s, Type: %(type)s, " +"Options: %(opt)s" +msgstr "" +"为设备%(dev)s选择一个选项:挂载点:%(mt)s,类型:%(type)s,选项:%(opt)s" + +#: gli-dialog.py:399 +#, python-format +msgid "" +"Choose a mountpoint from the list or choose Other to type your own for " +"partition %(part)s. Current mountpoint is: %(mt)s" +msgstr "" +"从列表中为分区%(part)s选择一个挂载点,或者选择“其他”然后自己输入一个。当前挂" +"载点是:%(mt)s" + +#: gli-dialog.py:409 +#, python-format +msgid "Select the filesystem for partition %(part)s. It is currently %(fs)s." +msgstr "为分区%(part)s选择一个文件系统。当前为%(fs)s。" + +#: gli-dialog.py:423 +msgid "" +"The first thing on the new system to setup is the partitoning.\n" +"\tYou will first select a drive and then edit its partitions.\n" +"\tWARNING: CHANGES ARE MADE IMMEDIATELY TO DISK. BE CAREFUL\n" +"\tNOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION \"/\"\n" +"\tIf your drive is pre-partitioned, just select the mountpoints and make \n" +"\tsure that the format option is set to FALSE or it will erase your data.\n" +"\tThe installer does not yet support resizing of partitions (its not safe).\n" +"\tWhen in doubt, **Partition it yourself and then re-run the installer**\n" +"\tPlease refer to the Gentoo Installation Handbook for more information\n" +"\ton partitioning and the various filesystem types available in Linux." +msgstr "" +"新系统上要做的第一件事是分区。\n" +"\t首先选择一个硬盘驱动器编辑它的分区。\n" +"\t警告:对磁盘所作的修改将立即生效。请小心\n" +"\t注意:你必须至少选择一个分区作为根分区“/”\n" +"\t如果你的驱动器之前已做好分区,则只要选择挂载点\n" +"\t并确保格式化选项设置为FALSE,否则将清除你的数据。\n" +"\t安装程序不支持改变分区大小(这是不安全的)。\n" +"\t如果感到不确定,**可以自己分区然后重新启动安装程序**\n" +"\t请参考Gentoo安装手册以获得更多关于分区以及Linux下可用\n" +"\t的各种文件系统的资料。" + +#: gli-dialog.py:446 +msgid "" +"Which drive would you like to partition?\n" +" Info provided: Type, Size in MB" +msgstr "" +"你想给哪个驱动器分区?\n" +" 提供的信息:类型,大小(单位MB)" + +#: gli-dialog.py:446 gli-dialog.py:845 gli-dialog.py:880 gli-dialog.py:1012 +msgid "Done" +msgstr "完成" + +#: gli-dialog.py:456 +msgid " - Unallocated space (" +msgstr " - 未分配的空间(" + +#: gli-dialog.py:458 +msgid "logical, " +msgstr "逻辑分区," + +#: gli-dialog.py:462 +msgid " - Extended Partition (" +msgstr " - 扩展分区(" + +#: gli-dialog.py:474 gli-dialog.py:480 +msgid "Set Recommended Layout" +msgstr "使用推荐的分区布局" + +#: gli-dialog.py:475 gli-dialog.py:485 +msgid "Clear Partitions On This Drive." +msgstr "清除这个驱动器上的分区。" + +#: gli-dialog.py:476 +msgid "" +"Select a partition or unallocated space to edit\n" +"Key: Minor, Pri/Ext, Filesystem, Size." +msgstr "" +"选择一个分区或未分配的空间来编辑\n" +"关键字:分区号,主分区/扩展分区,文件系统,大小。" + +#: gli-dialog.py:476 gli-dialog.py:536 gli-dialog.py:584 gli-dialog.py:625 +#: gli-dialog.py:1761 +msgid "Back" +msgstr "后退" + +#: gli-dialog.py:481 +msgid "" +"This will ERASE YOUR DRIVE and apply a recommended layout. Are you sure you " +"wish to do this?" +msgstr "这将清空你的驱动器并按照推荐的布局分区。你确定要这么做吗?" + +#: gli-dialog.py:482 +msgid "" +"This is your last chance. Are you SURE you want to CLEAR this drive and set " +"a recommended layout? THERE IS NO TURNING BACK IF YOU SELECT YES." +msgstr "请最后确认一下。你确实要清空这个驱动器并建立一个推荐的分区布局吗?选择是的话就不能后退了。" + +#: gli-dialog.py:486 +msgid "" +"This will remove all partitions on your drive. Are you sure you wish to do " +"this?" +msgstr "这将删除你驱动器上的所有分区。你确定要这么做吗?" + +#: gli-dialog.py:487 +msgid "" +"This is your last chance. Are you SURE you want to CLEAR this drive? THIS " +"WILL DELETE ANY DATA ON THE DRIVE!" +msgstr "请最后确认一下。你确实要清空这个驱动器?这将删除驱动器上的所有数据!" + +#: gli-dialog.py:499 +#, python-format +msgid "" +"Enter the size of the new partition in MB (max %s MB). If creating an " +"extended partition input its entire size (not just the first logical size):" +msgstr "输入新分区的大小,以MB为单位(最大%s MB)。如果是创建一个扩展分区则输入全部大小(而不是仅第一个逻辑分区的大小):" + +#: gli-dialog.py:502 +#, python-format +msgid "" +"The size you entered (%(entered)s MB) is larger than the maximum of %(max)s " +"MB" +msgstr "你输入的大小(%(entered)s MB)大于最大的%(max)s MB" + +#: gli-dialog.py:505 +msgid "Old, stable, but no journaling" +msgstr "旧的,稳定,但没有日志" + +#: gli-dialog.py:506 +msgid "ext2 with journaling and b-tree indexing (RECOMMENDED)" +msgstr "带日志和b-tree索引的ext2推荐)" + +#: gli-dialog.py:507 +msgid "Swap partition for memory overhead" +msgstr "用于内存额外开销的交换分区" + +#: gli-dialog.py:508 +msgid "Windows filesystem format used in Win9X and XP" +msgstr "用于Win9X和XP的Windows文件系统格式" + +#: gli-dialog.py:512 +msgid "B*-tree based filesystem. great performance. Only V3 supported." +msgstr "基于B*-tree的文件系统。性能表现卓越。仅支持V3版本。" + +#: gli-dialog.py:513 +msgid "Create an extended partition containing other logical partitions" +msgstr "创建一个扩展分区,包含其它逻辑分区" + +#: gli-dialog.py:514 +msgid "Something else we probably don't support." +msgstr "我们可能不支持的其它类型。" + +#: gli-dialog.py:515 +msgid "Choose the filesystem type for this new partition." +msgstr "给这个新分区选择文件系统类型。" + +#: gli-dialog.py:520 +msgid "Please enter the new partition's type:" +msgstr "请输入新分区的类型:" + +#: gli-dialog.py:535 gli-dialog.py:539 gli-dialog.py:1249 gli-dialog.py:1760 +#: gli-dialog.py:1823 +msgid "Delete" +msgstr "删除" + +#: gli-dialog.py:535 gli-dialog.py:545 +msgid "Extra mkfs.* Parameters" +msgstr "mkfs.*的附加参数" + +#: gli-dialog.py:540 +msgid "Are you sure you want to delete the partition " +msgstr "你确定要删除这个分区吗 " + +#: gli-dialog.py:546 +msgid "" +"This feature is coming soon. Please go to console and do it yourself for " +"now." +msgstr "这个功能即将完成。现在请你到控制台下自己做。" + +#: gli-dialog.py:555 gli-dialog.py:565 +msgid "Add a new network mount" +msgstr "添加一个网络挂载点" + +#: gli-dialog.py:557 +msgid "" +"If you have any network shares you would like to mount during the install " +"and for your new system, define them here. Select a network mount to edit or " +"add a new mount. Currently GLI only supports NFS mounts." +msgstr "" +"如果你想在安装时为你的新系统挂载一些网络共享设备,请在这里定义它们。选择一个" +"网络挂载点来编辑或者添加一个新的挂载点。当前GLI仅支持NFS网络挂载。" + +#: gli-dialog.py:562 +msgid "ERROR: Could net set network mounts!" +msgstr "错误:无法设置网络挂载点!" + +#: gli-dialog.py:569 +msgid "Do you want to start portmap to be able to search for NFS mounts?" +msgstr "你想启动portmap服务来搜索NFS网络挂载吗?" + +#: gli-dialog.py:572 +msgid "ERROR: Could not start portmap!" +msgstr "错误:无法启动portmap服务!" + +#: gli-dialog.py:574 +msgid "" +"Enter NFS mount or just enter the IP/hostname to search for available mounts" +msgstr "输入NFS挂载点或者直接输入IP/主机名搜索可用的挂载点" + +#: gli-dialog.py:582 +msgid "No NFS exports were detected on " +msgstr "没有检测到NFS export于" + +#: gli-dialog.py:584 +msgid "Select a NFS export" +msgstr "选择一个NFS export" + +#: gli-dialog.py:589 +#, python-format +msgid "" +"The address you entered, %s, is not a valid IP or hostname. Please try " +"again." +msgstr "你输入的地址——%s,不是一个有效的IP或主机名。请重试。" + +#: gli-dialog.py:598 +msgid "There is already an entry for " +msgstr "此挂载点已有一个条目" + +#: gli-dialog.py:610 +msgid "Enter a mountpoint" +msgstr "输入一个挂载点" + +#: gli-dialog.py:613 +msgid "Enter mount options" +msgstr "输入挂载选项" + +#: gli-dialog.py:623 +msgid "Stage3 is a basic system that has been built for you (no compiling)." +msgstr "Stage3是一个已经为你构建好的基础系统(无需编译)。" + +#: gli-dialog.py:624 +msgid "A Stage3 install but using binaries from the LiveCD when able." +msgstr "使用Stage3安装,但用的是LiveCD中的二进制包(如果可用)。" + +#: gli-dialog.py:625 +msgid "Which stage do you want to start at?" +msgstr "你想从哪个stage开始安装?" + +#: gli-dialog.py:629 +msgid "" +"WARNING: Since you are doing a GRP install it is HIGHLY recommended you " +"choose Create from CD to avoid a potentially broken installation." +msgstr "警告:因为你正在进行的是GRP安装方式,所以强烈推荐你选择“从光盘创建”以防止安装失败。" + +#: gli-dialog.py:633 gli-dialog.py:638 +msgid "ERROR! Could not set install stage!" +msgstr "错误!无法设置安装用的stage!" + +#: gli-dialog.py:642 +msgid "Create from CD" +msgstr "从光盘创建" + +#: gli-dialog.py:643 +msgid "Specify URI" +msgstr "指定URI" + +#: gli-dialog.py:644 +msgid "" +"Do you want to generate a stage3 on the fly using the files on the LiveCD " +"(fastest) or do you want to grab your stage tarball from the Internet?\n" +msgstr "你想使用LiveCD中的文件即时生成一个stage3(速度最快)还是想从Internet抓取stage文件包?\n" + +#: gli-dialog.py:649 +msgid "ERROR: Could not set the stage tarball URI!" +msgstr "错误:无法设置stage文件包的URI!" + +#: gli-dialog.py:664 +msgid "" +"Select a mirror to grab the tarball from or select Cancel to enter an URI " +"manually." +msgstr "选择一个镜像来抓取文件包,或者手动输入一个URI。" + +#: gli-dialog.py:670 +msgid "Select your desired stage tarball:" +msgstr "选择你需要的stage文件包:" + +#: gli-dialog.py:681 +msgid "Specify the stage tarball URI or local file:" +msgstr "指定stage文件包的URI或本地文件:" + +#: gli-dialog.py:687 gli-dialog.py:720 gli-dialog.py:1076 +msgid "" +"The specified URI is invalid. It was not saved. Please go back and try " +"again." +msgstr "指定的URI无效。未保存。请返回重试。" + +#: gli-dialog.py:689 +msgid "No URI was specified!" +msgstr "未指定任何URI!" + +#: gli-dialog.py:699 +msgid "ERROR! Could not set the portage cd snapshot URI!" +msgstr "错误!无法设置portage cd快照的URI!" + +#: gli-dialog.py:703 +msgid "Normal. Use emerge sync RECOMMENDED!" +msgstr "一般情况。推荐使用emerge sync!" + +#: gli-dialog.py:704 +msgid "HTTP daily snapshot. Use when rsync is firewalled." +msgstr "HTTP每日快照。当rsync被防火墙挡住时使用。" + +#: gli-dialog.py:705 +msgid "Use a portage snapshot, either a local file or a URL" +msgstr "使用portage快照,一个本地文件或一个URL地址" + +#: gli-dialog.py:706 +msgid "Extra cases such as if /usr/portage is an NFS mount" +msgstr "其它情况,比如/usr/portage是通过NFS挂载的" + +#: gli-dialog.py:707 +msgid "" +"Which method do you want to use to sync the portage tree for the " +"installation? If choosing a snapshot you will need to provide the URI for " +"the snapshot if it is not on the livecd." +msgstr "" +"你想在安装过程中使用哪种方法来更新portage树?如果选择使用一个快照而它又不在" +"livecd中,那么你必须提供这个快照的URI。" + +#: gli-dialog.py:716 +msgid "Enter portage tree snapshot URI" +msgstr "输入portage树的快照的URI" + +#: gli-dialog.py:725 +msgid "No URI was specified! Returning to default emerge sync." +msgstr "未指定任何URI!返回使用默认的emerge sync。" + +#: gli-dialog.py:742 +msgid "" +"The installer will now gather information regarding the contents of /etc/" +"make.conf\n" +"\tOne of the unique (and best) features of Gentoo is the ability to\n" +"\tdefine flags (called USE flags) that define what components are \n" +"\tcompiled into applications. For example, you can enable the alsa\n" +"\tflag and programs that have alsa capability will use it. \n" +"\tThe result is a finely tuned OS with no unnecessary components to\n" +"\tslow you down.\n" +"\tThe installer divides USE flag selection into two screens, one for\n" +"\tglobal USE flags and one for local flags specific to each program.\n" +"\tPlease be patient while the screens load. It may take awhile." +msgstr "" +"现在安装程序将收集与/etc/make.conf的内容相关的信息\n" +"\tGentoo独有的(最好的)特性之一就是定义一些用来定义哪些组件会被编译进\n" +"\t应用程序的标记(叫做USE标记)。举个例子,你可以启用alsa标记,然后能够使用alsa\n" +"\t的程序就会用到它。这样产生的结果是一个经过细致调整的操作系统,没有能使你变慢的\n" +"\t不必要的组件\n" +"\t安装程序将USE标记的选择分成两个屏幕,一个是全局USE标记,另一个是给每个程序指定\n" +"\t的局部标记。请耐心等待屏幕加载。这可能会花一点时间。" + +#: gli-dialog.py:781 +msgid "Choose which *global* USE flags you want on the new system" +msgstr "选择你想在新系统中使用哪些*全局*USE标记" + +#: gli-dialog.py:789 +msgid "Choose which *local* USE flags you want on the new system" +msgstr "选择你想在新系统中使用哪些*局部*USE标记" + +#: gli-dialog.py:822 +msgid "Stable" +msgstr "稳定" + +#: gli-dialog.py:823 +msgid "Unstable" +msgstr "不稳定" + +#: gli-dialog.py:824 +#, python-format +msgid "" +"Do you want to run the normal stable portage tree, or the bleeding edge " +"unstable (i.e. ACCEPT_KEYWORDS=%s)? If unsure select stable. Stable is " +"required for GRP installs." +msgstr "你想运行portage树正常的稳定分支,还是软件版本最新的不稳定分支(比如ACCEPT_KEYWORDS=%s)?如果不确定请选择稳定。GRP安装方式要求使用稳定分支。" + +#: gli-dialog.py:831 gli-dialog.py:839 +msgid "Edit your C Flags and Optimization level" +msgstr "编辑CFlags以及优化级别" + +#: gli-dialog.py:832 +msgid "Change the Host Setting" +msgstr "更改Host设置" + +#: gli-dialog.py:833 gli-dialog.py:840 +msgid "Specify number of parallel makes (-j) to perform." +msgstr "指定并行执行make(-j)的数量。" + +#: gli-dialog.py:834 gli-dialog.py:841 +msgid "Change portage functionality settings. (distcc/ccache)" +msgstr "更改portage的功能设置。(distcc/ccache)" + +#: gli-dialog.py:835 gli-dialog.py:842 +msgid "Specify mirrors to use for source retrieval." +msgstr "指定用于下载软件源代码的镜像。" + +#: gli-dialog.py:836 gli-dialog.py:843 +msgid "Specify server used by rsync to sync the portage tree." +msgstr "指定rsync同步portage树用的服务器。" + +#: gli-dialog.py:837 gli-dialog.py:844 +msgid "Specify your own variable and value." +msgstr "指定你自己的变量和值。" + +#: gli-dialog.py:845 +msgid "" +"For experienced users, the following /etc/make.conf variables can also be " +"defined. Choose a variable to edit or Done to continue." +msgstr "对于有经验的用户,还可以在/etc/make.conf中定义以下变量。选择一个变量来编辑或者选择“完成”来继续安装。" + +#: gli-dialog.py:849 +msgid "Enter the variable name: " +msgstr "输入变量名:" + +#: gli-dialog.py:856 gli-dialog.py:886 gli-dialog.py:933 +msgid "Enter new value for " +msgstr "为此变量输入新的值" + +#: gli-dialog.py:871 gli-dialog.py:883 +msgid "CLEAR" +msgstr "清空" + +#: gli-dialog.py:871 +msgid "Erase the current value and start over." +msgstr "清除当前值并重新输入。" + +#: gli-dialog.py:872 +msgid "Add a CPU optimization (deprecated in GCC 3.4)" +msgstr "添加一个CPU优化参数(只适用GCC 3.4之前版本)" + +#: gli-dialog.py:873 +msgid "Add a CPU optimization (GCC 3.4+)" +msgstr "添加一个CPU优化参数(GCC 3.4+)" + +#: gli-dialog.py:874 +msgid "Add an Architecture optimization" +msgstr "添加一个体系结构的优化参数" + +#: gli-dialog.py:875 +msgid "Add optimization level (please do NOT go over 2)" +msgstr "添加优化级别(请不要大于2)" + +#: gli-dialog.py:876 +msgid "For advanced users only." +msgstr "只供高级用户使用。" + +#: gli-dialog.py:877 +msgid "Common additional flag" +msgstr "常见的附加标记" + +#: gli-dialog.py:878 gli-dialog.py:885 gli-dialog.py:1455 gli-dialog.py:1473 +msgid "Manual" +msgstr "手动配置" + +#: gli-dialog.py:878 +msgid "Specify your CFLAGS manually" +msgstr "手动指定CFLAGS" + +#: gli-dialog.py:880 +msgid "" +"Choose a flag to add to the CFLAGS variable or Done to go back. The current " +"value is: " +msgstr "选择一个标记添加到CFLAGS变量或者选择“完成”返回。当前值为:" + +#: gli-dialog.py:891 +#, python-format +msgid "Enter the new value for %s (value only):" +msgstr "为%s输入新的值(只需输入值):" + +#: gli-dialog.py:902 +msgid "Choose from the available CHOSTs for your architecture." +msgstr "为你的体系结构选择一个可用的CHOST。" + +#: gli-dialog.py:908 +msgid "" +"Presently the only use is for specifying the number of parallel makes (-j) " +"to perform. The suggested number for parallel makes is CPUs+1. Enter the " +"NUMBER ONLY:" +msgstr "" +"目前唯一的用处是指定并行执行make(-j)的数量。建议使用的并行make数量为CPU数加" +"一。请输入数量即可:" + +#: gli-dialog.py:914 +msgid "enables sandboxing when running emerge and ebuild." +msgstr "当执行emerge和ebuild的时候启用sandbox功能。" + +#: gli-dialog.py:915 +msgid "enables ccache support via CC." +msgstr "通过CC启用ccache支持。" + +#: gli-dialog.py:916 +msgid "enables distcc support via CC." +msgstr "通过CC启用distcc支持。" + +#: gli-dialog.py:917 +msgid "enables distfiles locking using fcntl or hardlinks." +msgstr "使用fcntl或硬链接启用distfiles锁定。" + +#: gli-dialog.py:918 +msgid "create binaries of all packages emerged" +msgstr "为所有已安装的软件包建立二进制包" + +#: gli-dialog.py:919 +msgid "Input your list of FEATURES manually." +msgstr "手动输入你的FEATURES列表。" + +#: gli-dialog.py:920 +msgid "" +"FEATURES are settings that affect the functionality of portage. Most of " +"these settings are for developer use, but some are available to non-" +"developers as well." +msgstr "FEATURES是一些影响portage功能的设置。这些设置大多数是给开发人员用的,但也有一些是非开发人员也可以用的。" + +#: gli-dialog.py:925 +msgid "Enter the value of FEATURES: " +msgstr "输入FEATURES的值:" + +#: gli-dialog.py:942 gli-dialog.py:999 +msgid "ERROR! Could not set the make_conf correctly!" +msgstr "错误!无法正确设置make_conf!" + +#: gli-dialog.py:948 +msgid "" +"Do you want to use distcc to compile your extra packages during the install " +"and for future compilations as well?" +msgstr "你想使用distcc来编译安装过程中额外的软件包并且在将来也用它来编译吗?" + +#: gli-dialog.py:963 gli-dialog.py:1517 gli-dialog.py:1582 +msgid "ERROR! Could not set the services list." +msgstr "错误!无法设置服务列表。" + +#: gli-dialog.py:969 +msgid "ERROR! Could not set the install distcc flag!" +msgstr "错误!无法设置安装时distcc标记!" + +#: gli-dialog.py:990 +msgid "" +"Enter the hosts to be used by distcc for compilation:\n" +"Example: localhost 192.168.0.2 192.168.0.3:4000/10" +msgstr "" +"输入distcc用来编译的主机:\n" +"范例:localhost 192.168.0.2 192.168.0.3:4000/10" + +#: gli-dialog.py:1007 +msgid "A list of DEPEND atoms to mask." +msgstr "需要屏蔽的DEPEND软件包列表。" + +#: gli-dialog.py:1008 +msgid "A list of packages to unmask." +msgstr "需要取消屏蔽的软件包列表。" + +#: gli-dialog.py:1009 +msgid "Per-package KEYWORDS (like ACCEPT_KEYWORDS)." +msgstr "单个软件包的KEYWORDS(如ACCEPT_KEYWORDS)。" + +#: gli-dialog.py:1010 +msgid "Per-package USE flags." +msgstr "单个软件包的USE标记。" + +#: gli-dialog.py:1011 +msgid "Type your own name of a file to edit in /etc/" +msgstr "自己输入一个在/etc/目录下的文件名来编辑" + +#: gli-dialog.py:1012 +msgid "" +"For experienced users, the following /etc/* variables can also be defined. " +"Choose a variable to edit or Done to continue." +msgstr "对于有经验的用户,还可以定义以下/etc/*变量。选择一个变量来编辑或者选择“完成”来继续安装。" + +#: gli-dialog.py:1017 +msgid "" +"Enter the name of the /etc/ file you would like to edit (DO NOT type /etc/)" +msgstr "输入/etc/下你想编辑的文件名(不要输入“/etc/”)" + +#: gli-dialog.py:1024 +msgid "Enter new contents (use \\n for newline) of " +msgstr "为此文件输入新的内容(使用\\n来换行)" + +#: gli-dialog.py:1031 +msgid "ERROR! Could not set etc/portage/* correctly!" +msgstr "错误!无法正确设置etc/portage/* !" + +#: gli-dialog.py:1038 +msgid "Copy over the current running kernel (fastest)" +msgstr "拷贝当前运行的内核(最快捷)" + +#: gli-dialog.py:1039 +msgid "The Unaltered Linux Kernel ver 2.6+ (safest)" +msgstr "未作修改的2.6+版本Linux内核(最安全)" + +#: gli-dialog.py:1040 +msgid "Gentoo's optimized 2.6+ kernel. (less safe)" +msgstr "Gentoo优化过的2.6+版本内核(较安全)" + +#: gli-dialog.py:1041 +msgid "Hardened sources for the 2.6 kernel tree" +msgstr "提高了安全性的2.6内核树的加强版源代码" + +#: gli-dialog.py:1042 +msgid "Vanilla sources with grsecurity patches" +msgstr "采用grsecurity内核补丁的原始代码" + +#: gli-dialog.py:1043 +msgid "Choose one of the other sources available." +msgstr "选择一个可用的其它内核源码包。" + +#: gli-dialog.py:1044 +msgid "" +"Choose which kernel sources to use for your system. If using a previously-" +"made kernel configuration, make sure the sources match the kernel used to " +"create the configuration." +msgstr "为你的系统选用一个内核源码包。如果使用一个预先做好的内核配置文件,请确保当初用来创建配置文件的内核与所选的源码包是相匹配的。" + +#: gli-dialog.py:1048 +msgid "Please enter the desired kernel sources package name:" +msgstr "请输入你想要的内核源码包的名字:" + +#: gli-dialog.py:1053 +msgid "ERROR! Could not set the kernel source package!" +msgstr "错误!无法设置内核源码包!" + +#: gli-dialog.py:1056 +msgid "Genkernel" +msgstr "Genkernel方式" + +#: gli-dialog.py:1057 +msgid "Traditional (requires a config!)" +msgstr "传统方式(需要一个配置文件!)" + +#: gli-dialog.py:1058 +msgid "" +"There are currently two ways the installer can compile a kernel for your new " +"system. You can either provide a previously-made kernel configuration file " +"and use the traditional kernel-compiling procedure (no initrd) or have " +"genkernel automatically create your kernel for you (with initrd). \n" +"\n" +" If you do not have a previously-made kernel configuration, YOU MUST CHOOSE " +"Genkernel. Choose which method you want to use." +msgstr "" +"本安装程序当前可以使用两种方式为你的新系统编译一个内核。你可以提供一个预先做好的内核配置文件然后使用传统的内核编译过程(无initrd);或者可以让genkernel为你自动创建内核(带initrd)。\n" +"\n" +" 如果你没有一个预先做好的内核配置文件,就必须选择Genkernel。选择你想使用的方式。" + +#: gli-dialog.py:1065 +msgid "Do you want the bootsplash screen to show up on bootup?" +msgstr "你想在开机的时候显示bootsplash画面吗?" + +#: gli-dialog.py:1072 +msgid "" +"If you have a custom kernel configuration, enter its location (otherwise " +"just press Enter to continue):" +msgstr "如果你有一个定制的内核配置文件,请输入它的位置(否则就按回车继续):" + +#: gli-dialog.py:1081 +msgid "ERROR! Could not set the kernel config URI!" +msgstr "错误!无法设置内核配置文件的URI!" + +#: gli-dialog.py:1104 gli-dialog.py:1106 +msgid "GRand Unified Bootloader, newer, RECOMMENDED" +msgstr "GRand Unified Bootloader,较新,推荐使用" + +#: gli-dialog.py:1108 +msgid "LInux LOader, older, traditional.(detects windows partitions)" +msgstr "LInux LOader,较旧,传统的(可检测windows分区)" + +#: gli-dialog.py:1110 +msgid "Do not install a bootloader. (System may be unbootable!)" +msgstr "不安装引导程序(系统可能无法引导!)" + +#: gli-dialog.py:1111 +msgid "" +"To boot successfully into your new Linux system, a bootloader will be " +"needed. If you already have a bootloader you want to use you can select " +"None here. The bootloader choices available are dependent on what GLI " +"supports and what architecture your system is. Choose a bootloader" +msgstr "要成功引导进入你的新Linux系统,将需要一个引导程序。如果你想使用一个现有的引导程序,那么此处你可以选择不安装。你可以选择使用哪些引导程序取决于GLI是否支持以及你的系统架构是什么。选择一个引导程序" + +#: gli-dialog.py:1118 +msgid "ERROR! Could not set boot loader pkg! " +msgstr "错误!无法设置引导程序软件包!" + +#: gli-dialog.py:1123 +msgid "" +"Most bootloaders have the ability to install to either the Master Boot " +"Record (MBR) or some other partition. Most people will want their " +"bootloader installed on the MBR for successful boots, but if you have " +"special circumstances, you can have the bootloader installed to the /boot " +"partition instead. Do you want the boot loader installed in the MBR? (YES " +"is RECOMMENDED)" +msgstr "大多数引导程序能够被安装到主引导记录(MBR)或其它某个分区。大多数希望成功引导系统的人会把他们的引导程序安装在MBR,但是如果你有特殊情况,也可以将引导程序安装在/boot分区。你是否想把引导程序安装到MBR?(推荐答是)" + +#: gli-dialog.py:1131 +#, python-format +msgid "" +"Your boot device may not be correct. It is currently set to %s, but this " +"device may not be the first to boot. Usually boot devices end in 'a' such " +"as hda or sda." +msgstr "你的引导设备可能不正确。当前设为%s,但是这可能不是第一个要引导的设备。通常引导设备的最后一个字母为“a”,比如hda或sda。" + +#: gli-dialog.py:1132 +msgid " Please confirm your boot device by choosing it from the menu." +msgstr " 请从菜单中选择你的引导设备来确认一下。" + +#: gli-dialog.py:1136 +msgid "" +"ERROR: No drives set up. Please complete the Partitioning screen first!" +msgstr "错误:没有设置好的磁盘驱动器。请先完成分区的步骤!" + +#: gli-dialog.py:1145 +msgid "ERROR! Could not set the boot device!" +msgstr "错误!无法设置引导设备!" + +#: gli-dialog.py:1147 +msgid "" +"If you have any additional optional arguments you want to pass to the kernel " +"at boot, type them here or just press Enter to continue:" +msgstr "" +"如果你有任何额外的可选参数想在引导时传递给内核,请在这里输入它们,否则就按回" +"车继续:" + +#: gli-dialog.py:1152 gli-dialog.py:1157 +msgid "ERROR! Could not set bootloader kernel arguments! " +msgstr "错误!无法为引导程序设置内核参数!" + +#: gli-dialog.py:1171 +msgid "" +"Please select the timezone for the new installation. Entries ending with " +"a / can be selected to reveal a sub-list of more specific locations. For " +"example, you can select America/ and then Chicago." +msgstr "请为新安装的系统选择时区。选择以“/”结尾的项目会显示出一个有更精确位置的子列表。例如,你可以选择“Asia/”然后再选“Shanghai”。" + +#: gli-dialog.py:1185 +msgid "ERROR: Could not set that timezone!" +msgstr "错误:无法设置此时区!" + +#: gli-dialog.py:1192 +msgid "" +"Here you will enter all of your network interface information for the new " +"system. You can either choose a network interface to edit, add a network " +"interface, delete an interface, or edit the miscellaneous options such as " +"hostname and proxy servers." +msgstr "" +"这里你将为新系统输入所有关于你的网络接口的信息。你可以选择一个网络接口来编" +"辑,或者添加一个网络接口,或者删除一个接口,或者编辑各种各样的选项如主机名和" +"代理服务器。" + +#: gli-dialog.py:1197 gli-dialog.py:1285 +msgid "Settings: DHCP. Options: " +msgstr "设置:DHCP。选项:" + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid "IP: " +msgstr "IP:" + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid " Broadcast: " +msgstr "广播地址:" + +#: gli-dialog.py:1199 gli-dialog.py:1287 +msgid " Netmask: " +msgstr "子网掩码:" + +#: gli-dialog.py:1200 +msgid "Add a new network interface" +msgstr "添加一个新的网络接口" + +#: gli-dialog.py:1206 +msgid "ERROR! Could not set the network interfaces!" +msgstr "错误!无法设置网络接口!" + +#: gli-dialog.py:1216 +msgid "" +"Choose an interface from the list or Other to type your own if it was not " +"detected." +msgstr "从列表中选择一个接口,或者如果未检测到的话请自己输入。" + +#: gli-dialog.py:1219 +msgid "Enter name for new interface (eth0, ppp0, etc.)" +msgstr "输入新的网络接口名(比如eth0、ppp0等)" + +#: gli-dialog.py:1223 +msgid "An interface with the name is already defined." +msgstr "这个网络接口名已经被定义了。" + +#: gli-dialog.py:1237 gli-dialog.py:1262 +msgid "" +"Enter your networking information: (See Chapter 3 of the Handbook for more " +"information) Your broadcast address is probably your IP address with 255 as " +"the last tuple. Do not press Enter until all fields are complete!" +msgstr "输入你的网络信息:(更多资料请参考手册第3章)你的广播地址很可能就是你的IP地址把最后一个单元改为255。请在完成所有字段后再按回车!" + +#: gli-dialog.py:1248 +msgid "Edit" +msgstr "编辑" + +#: gli-dialog.py:1250 +#, python-format +msgid "" +"For interface %s, you can either edit the interface information (IP Address, " +"Broadcast, Netmask) or Delete the interface." +msgstr "" +"对于网络接口%s,你可以编辑这个接口的信息(IP地址、广播地址、子网掩码)或者删" +"除这个接口。" + +#: gli-dialog.py:1276 +msgid "Are you sure you want to remove the interface " +msgstr "你是否确定要删除这个网络接口" + +#: gli-dialog.py:1288 +msgid "" +"To be able to surf on the internet, you must know which host shares the " +"Internet connection. This host is called the gateway. It is usually similar " +"to your IP address, but ending in .1\n" +"If you have DHCP then just select your primary Internet interface (no IP " +"will be needed) Start by choosing which interface accesses the Internet:" +msgstr "" +"为了能在互联网上冲浪,你必须知道是哪台主机在分享Internet连接。这台主机称为网" +"关。它通常跟你的IP地址相像,只是末尾为“.1”\n" +"如果你有DHCP则只要选择首要的网络接口(不需要填IP)。首先选择哪个网络接口访问" +"Internet:" + +#: gli-dialog.py:1296 +msgid "Enter the gateway IP address for " +msgstr "为此网络接口输入网关的IP地址" + +#: gli-dialog.py:1300 +msgid "Invalid IP Entered! Please try again." +msgstr "输入的IP无效!请重试。" + +#: gli-dialog.py:1305 +#, python-format +msgid "" +"ERROR! Coult not set the default gateway with IP %(ip)s for interface %" +"(iface)s" +msgstr "错误!无法将IP地址%(ip)s设置为网络接口%(iface)s的默认网关" + +#: gli-dialog.py:1320 gli-dialog.py:1333 +msgid "" +"Fill out the remaining networking settings. The hostname is manditory as " +"that is the name of your computer. Leave the other fields blank if you are " +"not using them. If using DHCP you do not need to enter DNS servers. Do not " +"press Enter until all fields are complete!" +msgstr "填写余下的网络设置。主机名是必填的,因为那是你电脑的名字。其它字段如果你没有用到请留空。如果你使用DHCP,就不需要输入DNS服务器。请在完成所有字段后再按回车!" + +#: gli-dialog.py:1321 gli-dialog.py:1334 +msgid "Enter your Hostname:" +msgstr "输入你的主机名:" + +#: gli-dialog.py:1322 gli-dialog.py:1335 +msgid "Enter your Domain Name:" +msgstr "输入你的域名:" + +#: gli-dialog.py:1323 +msgid "Enter your NIS Domain Name:" +msgstr "输入你的NIS域名:" + +#: gli-dialog.py:1324 gli-dialog.py:1336 +msgid "Enter a primary DNS server:" +msgstr "输入一个主DNS服务器:" + +#: gli-dialog.py:1325 gli-dialog.py:1337 +msgid "Enter a backup DNS server:" +msgstr "输入一个备用DNS服务器:" + +#: gli-dialog.py:1344 +msgid "Incorrect hostname! It must be a string. Not saved." +msgstr "主机名不正确!必须是一个字符串。未保存。" + +#: gli-dialog.py:1350 +msgid "ERROR! Could not set the hostname:" +msgstr "错误!无法设置主机名:" + +#: gli-dialog.py:1354 +msgid "Incorrect domainname! It must be a string. Not saved." +msgstr "域名不正确!必须是一个字符串。未保存。" + +#: gli-dialog.py:1360 +msgid "ERROR! Could not set the domainname:" +msgstr "错误!无法设置域名:" + +#: gli-dialog.py:1364 +msgid "Incorrect nisdomainname! It must be a string. Not saved." +msgstr "NIS域名不正确!必须是一个字符串。未保存。" + +#: gli-dialog.py:1370 +msgid "ERROR! Could not set the nisdomainname:" +msgstr "错误!无法设置NIS域名:" + +#: gli-dialog.py:1374 +msgid "Incorrect Primary DNS Server! Not saved." +msgstr "主DNS服务器不正确!未保存。" + +#: gli-dialog.py:1379 +msgid "Incorrect Backup DNS Server! Not saved." +msgstr "备用DNS服务器不正确!未保存。" + +#: gli-dialog.py:1386 +msgid "ERROR! Could not set the DNS Servers:" +msgstr "错误!无法设置DNS服务器:" + +#: gli-dialog.py:1390 +msgid "Incorrect HTTP Proxy! It must be a uri. Not saved." +msgstr "HTTP代理不正确!必须是一个uri。未保存。" + +#: gli-dialog.py:1396 +msgid "ERROR! Could not set the HTTP Proxy:" +msgstr "错误!无法设置HTTP代理:" + +#: gli-dialog.py:1400 +msgid "Incorrect FTP Proxy! It must be a uri. Not saved." +msgstr "FTP代理不正确!必须是一个uri。未保存。" + +#: gli-dialog.py:1406 +msgid "ERROR! Could not set the FTP Proxy:" +msgstr "错误!无法设置FTP代理:" + +#: gli-dialog.py:1410 +msgid "Incorrect RSYNC Proxy! It must be a uri. Not saved." +msgstr "RSYNC代理不正确!必须是一个uri。未保存。" + +#: gli-dialog.py:1416 +msgid "ERROR! Could not set the RSYNC Proxy:" +msgstr "错误!无法设置RSYNC代理:" + +#: gli-dialog.py:1422 +msgid "Paul Vixie's cron daemon, fully featured, RECOMMENDED." +msgstr "Paul Vixie开发的cron守护进程,功能全面,推荐使用。" + +#: gli-dialog.py:1423 +msgid "A cute little cron from Matt Dillon." +msgstr "来自Matt Dillon的一个小巧的cron程序。" + +#: gli-dialog.py:1424 +msgid "A scheduler with extended capabilities over cron & anacron" +msgstr "对cron和anacron作了性能扩展的的日程计划程序" + +#: gli-dialog.py:1425 +msgid "Don't use a cron daemon. (NOT Recommended!)" +msgstr "不使用cron守护进程(不推荐!)" + +#: gli-dialog.py:1426 +msgid "" +"A cron daemon executes scheduled commands. It is very handy if you need to " +"execute some command regularly (for instance daily, weekly or monthly). " +"Gentoo offers three possible cron daemons: dcron, fcron and vixie-cron. " +"Installing one of them is similar to installing a system logger. However, " +"dcron and fcron require an extra configuration command, namely crontab /etc/" +"crontab. If you don't know what to choose, use vixie-cron. If doing a " +"networkless install, choose vixie-cron. Choose your cron daemon:" +msgstr "cron守护进程执行预先计划的命令。如果你需要有规律地执行一些命令(比如每天、每周或每月),cron就显得非常便利。Gentoo提供三种可能的cron守护进程:dcron、fcron和vixie-cron。安装其中一种的过程跟安装一个系统日志程序类似。不过,dcron和fcron要求在安装后执行一个额外的配置命令:“crontab /etc/crontab”。如果你不知道选择哪一种,请使用vixie-cron。如果正在进行的是无网络安装方式,请选择vixie-cron。选择你的cron守护进程:" + +#: gli-dialog.py:1435 +msgid "An advanced system logger." +msgstr "一个高级的系统日志程序。" + +#: gli-dialog.py:1436 +msgid "A Highly-configurable system logger." +msgstr "一个具有高可配置性的系统日志程序。" + +#: gli-dialog.py:1437 +msgid "The traditional set of system logging daemons." +msgstr "传统的系统日志守护进程集。" + +#: gli-dialog.py:1438 +msgid "" +"Linux has an excellent history of logging capabilities -- if you want you " +"can log everything that happens on your system in logfiles. This happens " +"through the system logger. Gentoo offers several system loggers to choose " +"from. If you plan on using sysklogd or syslog-ng you might want to install " +"logrotate afterwards as those system loggers don't provide any rotation " +"mechanism for the log files. If doing networkless, choose syslog-ng. " +"Choose a system logger:" +msgstr "Linux历来具有出色的日志记录能力——如果你愿意,你可以将系统中发生的任何事情记录到日志文件中。这是通过系统日志程序做到的。Gentoo提供多种系统日志程序给用户选择。如果你打算使用sysklogd或syslog-ng,那么以后你可能要安装logrotate。因为这些系统日志程序没有为日志文件提供任何替换机制。如果是无网络安装方式,请选择syslog-ng。" + +#: gli-dialog.py:1458 +msgid "" +"There are thousands of applications available to Gentoo users through " +"Portage, Gentoo's package management system. Select some of the more common " +"ones below or add your own additional package list by choosing 'Manual'." +msgstr "通过Portage——Gentoo的软件包管理系统,Gentoo可以向用户提供成千上万的应用程序。从以下较常见的软件包中选择一些,或者选择“手动”添加你自己的额外软件包列表。" + +#: gli-dialog.py:1459 +msgid "" +"\n" +"Your current package list is: " +msgstr "" +"\n" +"你当前的软件包列表为:" + +#: gli-dialog.py:1466 +msgid "ERROR! Could not set the install packages! List of packages:" +msgstr "错误!无法设置要安装的软件包!软件包列表:" + +#: gli-dialog.py:1474 +msgid "Enter a space-separated list of extra packages to install on the system" +msgstr "输入要安装到系统上的额外软件包列表,以空格分开" + +#: gli-dialog.py:1489 +msgid "" +"Choose from the listed packages. If doing a networkless install, only " +"choose (GRP) packages." +msgstr "" +"从列出的软件包中选择。如果正在进行的是无网络安装方式,请只选择标有(GRP)的软" +"件包。" + +#: gli-dialog.py:1508 +msgid "Do you want to start X on bootup?" +msgstr "你想在开机的时候启动X图形界面吗?" + +#: gli-dialog.py:1553 +msgid "ALSA Sound Daemon" +msgstr "ALSA声音守护进程" + +#: gli-dialog.py:1554 +msgid "Common web server (version 1.x)" +msgstr "通用的web服务器(1.x版本)" + +#: gli-dialog.py:1555 +msgid "Common web server (version 2.x)" +msgstr "通用的web服务器(2.x版本)" + +#: gli-dialog.py:1556 +msgid "Distributed Compiling System" +msgstr "分布式编译系统" + +#: gli-dialog.py:1557 +msgid "ESD Sound Daemon" +msgstr "ESD声音守护进程" + +#: gli-dialog.py:1558 +msgid "Hard Drive Tweaking Utility" +msgstr "硬盘优化工具" + +#: gli-dialog.py:1559 +msgid "Run scripts found in /etc/conf.d/local.start" +msgstr "运行/etc/conf.d/local.start中的脚本" + +#: gli-dialog.py:1560 +msgid "Port Mapping Service" +msgstr "端口映射(portmap)服务" + +#: gli-dialog.py:1561 +msgid "Common FTP server" +msgstr "通用的FTP服务器" + +#: gli-dialog.py:1562 +msgid "SSH Daemon (allows remote logins)" +msgstr "SSH守护进程(允许远程登录)" + +#: gli-dialog.py:1563 +msgid "X Font Server" +msgstr "X字体服务器" + +#: gli-dialog.py:1564 +msgid "X Daemon" +msgstr "X守护进程" + +#: gli-dialog.py:1565 +msgid "Manually specify your services in a comma-separated list." +msgstr "手动指定你的服务列表,以逗号分开(注:英文逗号)" + +#: gli-dialog.py:1566 +msgid "" +"Choose the services you want started on bootup. Note that depending on what " +"packages are selected, some services listed will not exist." +msgstr "选择你想在开机的时候启动的服务。注意有些列出的服务可能并不存在,这取决于你选择了哪些软件包。" + +#: gli-dialog.py:1574 +msgid "Enter a comma-separated list of services to start on boot" +msgstr "输入一个开机时启动的服务列表,以逗号分开(注:英文逗号)" + +#: gli-dialog.py:1599 +msgid "" +"Additional configuration settings for Advanced users (rc.conf)\n" +"Here are some other variables you can set in various configuration files on " +"the new system. If you don't know what a variable does, don't change it!" +msgstr "" +"给高级用户的额外配置设定(rc.conf)\n" +"这里是一些其它变量,你可以在新系统上的各种配置文件中设置它们。如果你不知道某个变量是用来做什么的,请不要修改它!" + +#: gli-dialog.py:1600 +msgid "Use KEYMAP to specify the default console keymap." +msgstr "使用KEYMAP来指定默认的控制台键盘映射表。" + +#: gli-dialog.py:1601 +msgid "Decision to first load the 'windowkeys' console keymap" +msgstr "决定是否预先载入win键的控制台键映射" + +#: gli-dialog.py:1602 +msgid "maps to load for extended keyboards. Most users will leave this as is." +msgstr "扩展键盘需要载入的映射表。大多数用户将不会动这个变量。" + +#: gli-dialog.py:1603 +msgid "Specifies the default font that you'd like Linux to use on the console." +msgstr "指定你想在Linux控制台下使用的默认字体。" + +#: gli-dialog.py:1604 +msgid "The charset map file to use." +msgstr "要使用的字符集映射表文件。" + +#: gli-dialog.py:1605 +msgid "Set the clock to either UTC or local" +msgstr "将clock设为UTC或local" + +#: gli-dialog.py:1606 +msgid "Set EDITOR to your preferred editor." +msgstr "将EDITOR设为你喜欢的编辑器。" + +#: gli-dialog.py:1607 +msgid "What display manager do you use ? [ xdm | gdm | kdm | entrance ]" +msgstr "你使用哪种显示管理器?[ xdm | gdm | kdm | entrance ]" + +#: gli-dialog.py:1608 +msgid "a new variable to control what window manager to start default with X" +msgstr "这是个新的变量,用来控制X图形界面启动时默认使用什么窗口管理器" + +#: gli-dialog.py:1615 +msgid "Choose your desired keymap:" +msgstr "选择你想要的键盘映射表:" + +#: gli-dialog.py:1624 +msgid "" +"Should we first load the 'windowkeys' console keymap? Most x86 users will " +"say 'yes' here. Note that non-x86 users should leave it as 'no'." +msgstr "我们是否应预先载入win键控制台键映射?大多数x86用户此处将会回答‘yes’。注意非x86用户应置为‘no’。" + +#: gli-dialog.py:1629 +msgid "" +"This sets the maps to load for extended keyboards. Most users will leave " +"this as is. Enter new value for EXTENDED_KEYMAPS" +msgstr "这个变量为扩展键盘设置要加载的映射表。大多数用户将不会动这个选项。为EXTENDED_KEYMAPS输入新的值" + +#: gli-dialog.py:1632 +msgid "Choose your desired console font:" +msgstr "选择你想在控制台下使用的字体:" + +#: gli-dialog.py:1638 +msgid "Choose your desired console translation:" +msgstr "选择你想使用的控制台字符集转换:" + +#: gli-dialog.py:1646 +msgid "" +"Should CLOCK be set to UTC or local? Unless you set your timezone to UTC " +"you will want to choose local." +msgstr "CLOCK设为UTC(0时区)还是local?你应该选择local,除非你想把时区设置为UTC。" + +#: gli-dialog.py:1651 +msgid "Default editor." +msgstr "默认的编辑器。" + +#: gli-dialog.py:1651 +msgid "vi improved editor." +msgstr "加强版vi编辑器。" + +#: gli-dialog.py:1651 +msgid "The emacs editor." +msgstr "emacs编辑器。" + +#: gli-dialog.py:1652 +msgid "Choose your default editor: " +msgstr "选择默认的编辑器:" + +#: gli-dialog.py:1654 +msgid "X Display Manager" +msgstr "X界面显示管理器" + +#: gli-dialog.py:1655 +msgid "Gnome Display Manager" +msgstr "Gnome显示管理器" + +#: gli-dialog.py:1656 +msgid "KDE Display Manager" +msgstr "KDE显示管理器" + +#: gli-dialog.py:1657 +msgid "Login Manager for Enlightenment" +msgstr "Enlightenment的登录管理器" + +#: gli-dialog.py:1658 +msgid "" +"Choose your desired display manager to use when starting X (note you must " +"make sure that package also gets installed for it to work):" +msgstr "" +"选择你想在启动X图形界面时使用的显示管理器(注意你必须安装相应的软件包以确保它" +"能够工作):" + +#: gli-dialog.py:1660 +msgid "" +"Choose what window manager you want to start default with X if run with xdm, " +"startx, or xinit. (common options are Gnome or Xsession):" +msgstr "选择当通过执行xdm、startx或xinit来启动X图形界面时默认使用什么窗口管理器(常见的选项为Gnome或Xsession):" + +#: gli-dialog.py:1697 +msgid "" +"Please enter your desired password for the root account. (note it will not " +"show the password. Also do not try to use backspace.):" +msgstr "请输入你想为root帐户设置的密码(注意密码将不显示出来,并且请不要使用退格键。):" + +#: gli-dialog.py:1700 +msgid "Enter the new root password again for confirmation" +msgstr "再次输入新的root密码以确认一下" + +#: gli-dialog.py:1704 +msgid "The passwords do not match. Please try again or cancel." +msgstr "密码不匹配。请重试或者取消。" + +#: gli-dialog.py:1709 +msgid "ERROR! Could not set the new system root password!" +msgstr "错误!无法设置新系统的root密码!" + +#: gli-dialog.py:1710 gli-dialog.py:1775 +msgid "Password saved. Press Enter to continue." +msgstr "密码已保存。请按回车键继续。" + +#: gli-dialog.py:1723 gli-dialog.py:1737 +msgid "Add user" +msgstr "添加用户" + +#: gli-dialog.py:1724 +msgid "" +"Working as root on a Unix/Linux system is dangerous and should be avoided as " +"much as possible. Therefore it is strongly recommended to add a user for day-" +"to-day use. Choose a user to edit:" +msgstr "" +"在Unix/Linux系统中以root身份工作是很危险的,应当尽量避免这种做法。因此我们强" +"烈建议添加一个用户用于日常使用。选择一个用户来编辑:" + +#: gli-dialog.py:1734 +msgid "ERROR! Could not set the additional users!" +msgstr "错误!无法设置额外的用户!" + +#: gli-dialog.py:1738 +msgid "Enter the username for the new user" +msgstr "输入新用户的用户名" + +#: gli-dialog.py:1742 +msgid "A user with that name already exists" +msgstr "这个用户名已经存在" + +#: gli-dialog.py:1746 +#, python-format +msgid "Enter the new password for user %s. (will not be echoed)" +msgstr "为用户%s输入新密码(不会回显)" + +#: gli-dialog.py:1747 +msgid "Enter the new password again for confirmation" +msgstr "再次输入新密码以确认一下" + +#: gli-dialog.py:1750 +msgid "The passwords do not match! Please try again." +msgstr "密码不匹配!请重试。" + +#: gli-dialog.py:1754 +msgid "" +"You must enter a password for the user! Even a blank password will do. You " +"can always edit it again later from the menu." +msgstr "" +"你必须为这个用户输入一个密码!即便是一个空格也可以作为密码。之后你始终可以再" +"从菜单中来编辑它。" + +#: gli-dialog.py:1760 gli-dialog.py:1765 +msgid "Password" +msgstr "密码" + +#: gli-dialog.py:1760 gli-dialog.py:1777 +msgid "Group Membership" +msgstr "所属用户组" + +#: gli-dialog.py:1760 gli-dialog.py:1801 +msgid "Shell" +msgstr "Shell" + +#: gli-dialog.py:1760 gli-dialog.py:1806 +msgid "Home Directory" +msgstr "主目录" + +#: gli-dialog.py:1760 gli-dialog.py:1811 +msgid "UID" +msgstr "UID" + +#: gli-dialog.py:1760 gli-dialog.py:1818 +msgid "Comment" +msgstr "说明" + +#: gli-dialog.py:1761 +#, python-format +msgid "Choose an option for user %s" +msgstr "为用户%s选择一个选项" + +#: gli-dialog.py:1766 +msgid "Enter the new password" +msgstr "输入新的密码" + +#: gli-dialog.py:1769 +msgid "Enter the new password again" +msgstr "再次输入新密码" + +#: gli-dialog.py:1773 +msgid "The passwords do not match! Try again." +msgstr "密码不匹配!请重试。" + +#: gli-dialog.py:1779 +msgid "The usual group for normal users." +msgstr "常见的普通用户组。" + +#: gli-dialog.py:1780 +msgid "Allows users to attempt to su to root." +msgstr "允许用户通过su切换为root权限。" + +#: gli-dialog.py:1781 +msgid "Allows access to audio devices." +msgstr "允许访问音频设备。" + +#: gli-dialog.py:1782 +msgid "Allows access to games." +msgstr "允许访问游戏。" + +#: gli-dialog.py:1783 gli-dialog.py:1784 gli-dialog.py:1785 gli-dialog.py:1786 +msgid "For users who know what they're doing only." +msgstr "只供那些知道自己正在做什么的用户使用。" + +#: gli-dialog.py:1787 +msgid "Manually specify your groups in a comma-separated list." +msgstr "手动指定用户组,多个组之间用逗号(注:英文逗号)分开。" + +#: gli-dialog.py:1788 +#, python-format +msgid "Select which groups you would like the user %s to be in." +msgstr "选择你想让用户%s归入哪些用户组。" + +#: gli-dialog.py:1798 +msgid "Enter a comma-separated list of groups the user is to be in" +msgstr "输入此用户所属的用户组列表,以逗号(注:英文逗号)分隔" + +#: gli-dialog.py:1802 +msgid "Enter the shell you want the user to use. default is /bin/bash. " +msgstr "输入你想让这个用户使用的shell。默认为/bin/bash。" + +#: gli-dialog.py:1807 +msgid "Enter the user's home directory. default is /home/username. " +msgstr "输入用户的主目录。默认为/home/username。" + +#: gli-dialog.py:1812 +msgid "" +"Enter the user's UID. If left blank the system will choose a default value " +"(this is recommended)." +msgstr "输入用户的UID。如果置空则系统会选择一个默认值(推荐这么做)。" + +#: gli-dialog.py:1819 +msgid "Enter the user's comment. This is completely optional." +msgstr "输入用户的说明。这完全是可有可无的。" + +#: gli-dialog.py:1827 +#, python-format +msgid "Are you sure you want to delete the user %s ?" +msgstr "你确定要删除用户%s?" + +#: gli-dialog.py:1835 +msgid "Would you like to save these install settings for use again later?" +msgstr "你想保存这些安装设置以便再次利用吗?" + +#: gli-dialog.py:1839 +msgid "Enter a filename for the XML file. Use full path!" +msgstr "输入XML文件名。使用绝对路径!" + +#: gli-dialog.py:1843 +#, python-format +msgid "The file %s already exists. Do you want to overwrite it?" +msgstr "文件%s已存在。是否要覆盖它?" + +#: gli-dialog.py:1850 +msgid "" +"Error. File couldn't be saved. Saving to /tmp/installprofile.xml instead." +msgstr "错误。文件无法保存。转而存到/tmp/installprofile.xml" + +#: gli-dialog.py:1856 +msgid "Complete failure to save install profile!" +msgstr "保存安装配置文件失败!" + +#: gli-dialog.py:1952 +msgid "Install completed!" +msgstr "安装完成!" + +#: gli-dialog.py:1954 +msgid "Install done!" +msgstr "安装完毕!" + +#: gli-dialog.py:1970 +#, python-format +msgid "" +"There was an Exception received during the install that is outside of the " +"normal install errors. This is a bad thing. The error was: %s \n" +" You have several ways of handling this. If you cannot resolve it, please " +"submit a bug report (after searching to make sure it's not a known issue and " +"verifying you didn't do something stupid) with the contents of /var/log/" +"install.log and /tmp/installprofile.xml and the version of the installer you " +"used." +msgstr "" +"安装过程中遇到一个普通安装错误之外的异常。这是很糟糕的事情。这个错误是:%s \n" +" 处理的方法有多种。如果你无法解决,请提交一个bug报告(请首先通过搜索以确保这不是一个已知的问题并且确认一下你刚才没有做了某些愚蠢的事),附上/var/log/install.log和/tmp/installprofile.xml的内容以及你所使用的GLI的版本。" + +#: gli-dialog.py:2002 +msgid "Installation Started!" +msgstr "开始安装!" + +#: gli-dialog.py:2002 gli-dialog.py:2005 +msgid "Installation progress" +msgstr "安装进度" + +#: gli-dialog.py:2005 +msgid "Continuing Installation" +msgstr "继续安装" + +#: gli-dialog.py:2025 +#, python-format +msgid "" +"On step %(A)d of %(B)d. Current step: %(C)s\n" +"%(D)s" +msgstr "" +"已完成%(B)d个步骤中的%(A)d个。当前步骤:%(C)s\n" +"%(D)s" + +#: gli-dialog.py:2036 +#, python-format +msgid "On step %(A)d of %(B)d. Current step: %(C)s" +msgstr "已完成%(B)d个步骤中的%(A)d个。当前步骤:%(C)s" diff --git a/src/fe/gtk/Bootloader.py b/src/fe/gtk/Bootloader.py index ff56db7..9346d10 100644 --- a/src/fe/gtk/Bootloader.py +++ b/src/fe/gtk/Bootloader.py @@ -4,163 +4,150 @@ # of which can be found in the main directory of this project. import gtk -import gobject -import GLIScreen +from GLIScreen import * +from ProgressDialog import * -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): title = "Bootloader" active_selection = None - boot_loaders = {} + radio_bootloaders = {} _helptext = """ <b><u>Bootloader</u></b> -The bootloaders available depend on the architecture to be installed. For x86, -the two bootloaders available are grub and lilo. In amd64, only grub is +The bootloaders available depend on the architecture to be installed. For x86, \ +the two bootloaders available are grub and lilo. In amd64, only grub is \ available. Gentoo recommends grub. -For those who still like lilo, it is available. Lilo will also detect windows +For those who still like lilo, it is available. Lilo will also detect windows \ partitions (this support for grub coming soon). - -You almost always will want to check the Install in MBR option, unless you do -not want your system to be bootable using your bootloader. - -Set the boot drive to whatever hard drive is set to boot first on your computer. - -If you have any extra kernel parameters you want to add, such as "doscsi", enter -them in the textbox. Possible parameters can be found in the Handbook. Usually -you will just leave this blank. """ + bootloaders = { + 'none': [ "none" ], + 'x86': [ "grub", "lilo" ], + 'amd64': [ "grub" ], + 'ppc': [ "yaboot" ], + 'hppa': [ "palo" ], + 'mips': [ "arcload", "arcboot", "colo" ], + 'sparc': [ "silo" ] + } + tmpbootloaders = None def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 0) vert.set_border_width(10) - content_str = """Here, you will select which bootloader you would like to use. Each option has -a brief description beside it. -""" - content_label = gtk.Label(content_str) - vert.pack_start(content_label, expand=False, fill=False, padding=0) - - self.boot_loaders['grub'] = gtk.RadioButton(None, "grub") - self.boot_loaders['grub'].set_name("grub") - self.boot_loaders['grub'].connect("toggled", self.loader_selected, "grub") - self.boot_loaders['grub'].set_size_request(125, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.boot_loaders['grub'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("This is the more popular bootloader. If you are installing on AMD64, this is your only choice") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=20) - - self.boot_loaders['lilo'] = gtk.RadioButton(self.boot_loaders['grub'], "lilo") - self.boot_loaders['lilo'].set_name("lilo") - self.boot_loaders['lilo'].connect("toggled", self.loader_selected, "lilo") - self.boot_loaders['lilo'].set_size_request(125, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.boot_loaders['lilo'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("This bootloader isn't as flexible as grub, but some people still prefer it") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=15) - - self.boot_loaders['none'] = gtk.RadioButton(self.boot_loaders['grub'], "None") - self.boot_loaders['none'].set_name("none") - self.boot_loaders['none'].connect("toggled", self.loader_selected, "none") - self.boot_loaders['none'].set_size_request(125, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.boot_loaders['none'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("Choose this if you don't want a bootloader installed") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=15) - - self.check_install_in_mbr = gtk.CheckButton("Install in MBR") - self.check_install_in_mbr.connect("toggled", self.mbr_selected) - self.check_install_in_mbr.set_size_request(125, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.check_install_in_mbr, expand=False, fill=False, padding=5) - tmplabel = gtk.Label("This controls whether the bootloader is installed in the MBR or not") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=15) - - hbox = gtk.HBox(False, 0) - tmplabel = gtk.Label("Boot Drive:") - tmplabel.set_alignment(0.0, 0.5) - tmplabel.set_size_request(160, -1) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=0) -# self.boot_device_data = gtk.ListStore(gobject.TYPE_STRING) -# self.boot_device_combo = gtk.ComboBox(self.boot_drive_data) - self.boot_device_combo = gtk.combo_box_new_text() - hbox.pack_start(self.boot_device_combo, expand=False, fill=False, padding=15) - vert.pack_start(hbox, expand=False, fill=False, padding=15) - - hbox = gtk.HBox(False, 0) - tmplabel = gtk.Label("Extra kernel parameters:") - tmplabel.set_alignment(0.0, 0.5) - tmplabel.set_size_request(160, -1) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=0) - self.kernel_params_entry = gtk.Entry() - self.kernel_params_entry.set_width_chars(40) - hbox.pack_start(self.kernel_params_entry, expand=False, fill=False, padding=15) - vert.pack_start(hbox, expand=False, fill=False, padding=15) +# self.tmpbootloaders = self.bootloaders[self.controller.cc.get_arch()] +# if self.controller.install_type != "networkless": +# self.tmpbootloaders += self.bootloaders['none'] + self.tmpbootloaders = self.bootloaders[self.controller.cc.get_arch()] + self.bootloaders['none'] + if self.controller.install_type == "networkless": + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Your bootloader will be %s</b>' % self.tmpbootloaders[0]) + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + else: + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Choose your bootloader</b>') + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + for bootloader in self.tmpbootloaders: + hbox = gtk.HBox(False, 0) + if bootloader == self.tmpbootloaders[0]: + self.radio_bootloaders[bootloader] = gtk.RadioButton(None, bootloader) + else: + self.radio_bootloaders[bootloader] = gtk.RadioButton(self.radio_bootloaders[self.tmpbootloaders[0]], bootloader) + self.radio_bootloaders[bootloader].set_name(bootloader) + self.radio_bootloaders[bootloader].connect("toggled", self.bootloader_selected, bootloader) + hbox.pack_start(self.radio_bootloaders[bootloader], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + +# self.check_install_in_mbr = gtk.CheckButton("Install in MBR") +# self.check_install_in_mbr.connect("toggled", self.mbr_selected) +# self.check_install_in_mbr.set_size_request(125, -1) +# hbox = gtk.HBox(False, 0) +# hbox.pack_start(self.check_install_in_mbr, expand=False, fill=False, padding=5) +# tmplabel = gtk.Label("This controls whether the bootloader is installed in the MBR or not") +# tmplabel.set_line_wrap(True) +# hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) +# vert.pack_start(hbox, expand=False, fill=False, padding=15) + +# hbox = gtk.HBox(False, 0) +# tmplabel = gtk.Label("Boot Drive:") +# tmplabel.set_alignment(0.0, 0.5) +# tmplabel.set_size_request(160, -1) +# hbox.pack_start(tmplabel, expand=False, fill=False, padding=0) +# self.boot_device_combo = gtk.combo_box_new_text() +# hbox.pack_start(self.boot_device_combo, expand=False, fill=False, padding=15) +# vert.pack_start(hbox, expand=False, fill=False, padding=15) + +# hbox = gtk.HBox(False, 0) +# tmplabel = gtk.Label("Extra kernel parameters:") +# tmplabel.set_alignment(0.0, 0.5) +# tmplabel.set_size_request(160, -1) +# hbox.pack_start(tmplabel, expand=False, fill=False, padding=0) +# self.kernel_params_entry = gtk.Entry() +# self.kernel_params_entry.set_width_chars(40) +# hbox.pack_start(self.kernel_params_entry, expand=False, fill=False, padding=15) +# vert.pack_start(hbox, expand=False, fill=False, padding=15) self.add_content(vert) self.boot_devices = None - def loader_selected(self, widget, data=None): + def bootloader_selected(self, widget, data=None): self.active_selection = data - if data == "none": - self.check_install_in_mbr.set_sensitive(False) - else: - self.check_install_in_mbr.set_sensitive(True) +# if data == "none": +# self.check_install_in_mbr.set_sensitive(False) +# else: +# self.check_install_in_mbr.set_sensitive(True) - def mbr_selected(self, widget, data=None): - if self.check_install_in_mbr.get_active(): - self.boot_device_combo.set_sensitive(True) - else: - self.boot_device_combo.set_sensitive(False) +# def mbr_selected(self, widget, data=None): +# if self.check_install_in_mbr.get_active(): +# self.boot_device_combo.set_sensitive(True) +# else: +# self.boot_device_combo.set_sensitive(False) def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_BACK = False self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - self.active_selection = self.controller.install_profile.get_boot_loader_pkg() or "grub" - self.boot_loaders[self.active_selection].set_active(True) - if self.controller.install_type == "networkless": - self.active_selection = "grub" - self.boot_loaders["lilo"].set_sensitive(False) - self.boot_loaders["grub"].set_active(True) - self.check_install_in_mbr.set_active(self.controller.install_profile.get_boot_loader_mbr()) - self.boot_devices = self.controller.install_profile.get_partition_tables().keys() - self.boot_devices.sort() - self.boot_device_combo.get_model().clear() - boot_device = self.controller.install_profile.get_boot_device() - for i, device in enumerate(self.boot_devices): - self.boot_device_combo.get_model().append([device]) - if boot_device == device: - self.boot_device_combo.set_active(i) - if self.boot_device_combo.get_active() == -1: - self.boot_device_combo.set_active(0) -# self.kernel_params_entry.set_text(self.controller.install_profile.get_bootloader_kernel_args()) - kernel_params = self.controller.install_profile.get_bootloader_kernel_args() - if not "doscsi" in kernel_params.split(): - parts_tmp = self.controller.install_profile.get_partition_tables() - for device in parts_tmp: - if not device.startswith("/dev/sda"): continue - for part in parts_tmp[device]: - if parts_tmp[device][part]['mountpoint'] == "/": - kernel_params += " doscsi" - self.kernel_params_entry.set_text(kernel_params) - - def deactivate(self): + self.active_selection = self.controller.install_profile.get_boot_loader_pkg() or self.tmpbootloaders[0] + self.radio_bootloaders[self.active_selection].set_active(True) +# self.check_install_in_mbr.set_active(self.controller.install_profile.get_boot_loader_mbr()) +# self.boot_devices = self.controller.install_profile.get_partition_tables().keys() +# self.boot_devices.sort() +# self.boot_device_combo.get_model().clear() +# boot_device = self.controller.install_profile.get_boot_device() +# for i, device in enumerate(self.boot_devices): +# self.boot_device_combo.get_model().append([device]) +# if boot_device == device: +# self.boot_device_combo.set_active(i) +# if self.boot_device_combo.get_active() == -1: +# self.boot_device_combo.set_active(0) +# kernel_params = self.controller.install_profile.get_bootloader_kernel_args() +# if not "doscsi" in kernel_params.split(): +# parts_tmp = self.controller.install_profile.get_partition_tables() +# for device in parts_tmp: +# if not device.startswith("/dev/sda"): continue +# for part in parts_tmp[device]: +# if parts_tmp[device][part]['mountpoint'] == "/": +# kernel_params += " doscsi" +# self.kernel_params_entry.set_text(kernel_params) + + def next(self): self.controller.install_profile.set_boot_loader_pkg(None, self.active_selection, None) - self.controller.install_profile.set_boot_loader_mbr(None, self.check_install_in_mbr.get_active(), None) - if self.check_install_in_mbr.get_active(): - self.controller.install_profile.set_boot_device(None, self.boot_devices[self.boot_device_combo.get_active()], None) - self.controller.install_profile.set_bootloader_kernel_args(None, self.kernel_params_entry.get_text(), None) - return True + self.controller.install_profile.set_boot_loader_mbr(None, True, None) +# if self.check_install_in_mbr.get_active(): +# self.controller.install_profile.set_boot_device(None, self.boot_devices[self.boot_device_combo.get_active()], None) +# self.controller.install_profile.set_bootloader_kernel_args(None, self.kernel_params_entry.get_text(), None) + progress = ProgressDialog(self.controller, ('install_bootloader', 'setup_and_run_bootloader' ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("Users") + else: + GLIScreen.progress_callback(self, result, data) diff --git a/src/fe/gtk/ChangeLog b/src/fe/gtk/ChangeLog index 2ad2417..ad020d3 100644 --- a/src/fe/gtk/ChangeLog +++ b/src/fe/gtk/ChangeLog @@ -2,10 +2,6 @@ # Copyright 2004 Gentoo Technologies, Inc. # $Header: /var/cvsroot/gentoo/src/installer/src/fe/gtk/ChangeLog,v 1.233 2006/09/11 12:18:42 agaffney Exp $ - 16 Dec 2006; Andrew Gaffney <agaffney@gentoo.org> - src/fe/gtk/Partitioning.py: - bail immediately if unknown partitions detected - 11 Sep 2006; Andrew Gaffney <agaffney@gentoo.org> src/fe/gtk/PartProperties.py: pull list of supported filesystems from GLISD instead of parent diff --git a/src/fe/gtk/ClientConfig.py b/src/fe/gtk/ClientConfig.py deleted file mode 100644 index 8124c95..0000000 --- a/src/fe/gtk/ClientConfig.py +++ /dev/null @@ -1,461 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. - -import gtk -import GLIScreen -import GLIUtility -from gettext import gettext as _ - -class Panel(GLIScreen.GLIScreen): - - title = _("Pre-install Configuration") - _helptext = """ -<b><u>Pre-install Config - aka Client Configuration</u></b> - -If your network is already set up and you can ping www.gentoo.org, then the -checkbox labeled "My network is already set up and running (or no network)" -will be checked. In that case you do not need to set up any pre-install -networking. If it is not, you need to set up your networking. If you are not -connected to a network, you should check that box, so the installer does not try -to find a DHCP server. - -Note: If you intend to use wireless to connect to the Internet from the Livecd, -you will need to set up your connection before starting the installer. See the -Wireless Networking guide at -http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4 - -To connect to the Internet you will need to configure one network device, -usually eth0. In most cases you can select DHCP unless you have a specific IP -address or network configuration where you need to give Static information. - -In the rare case that you need to connect to the Internet through a proxy, there -are three proxy types to enter. - -In the Misc. tab there are a few customizable items: - -Chroot directory: This is the directory the the installer mounts your / -partition to and then chroots to in order to do the installation. It is best to -not change this unless you need to. - -Logfile: The path and filename of the installer logfile. The default is -recommended. - -SSH: If you want to start sshd to allow remote access to your machine during -the installation, select Yes, otherwise No. No is recommended since it is not -necessary for an installation. - -Root password: This sets the root password for the <i>Livecd environment <b>only</b></i>. -If you chose Yes for SSH then you will need to enter a root password or you will -not be able to login remotely. - -Kernel Modules: If you have additional modules (ex. some rare networking module -that didn't autoload) you need to load that are not in the Loaded modules list -on the right, you can enter them here. - -Verbose logging: This adds a lot of debugging information to the logfiles, -which is useful for reporting bugs. - -Install mode: You want "Normal". the Chroot mode is still under development -and will not leave you with a bootable system. -""" - - def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) - vert = gtk.VBox(False, 0) - vert.set_border_width(10) - - content_str = _("""On this screen, you will set all your pre-install options such as networking, - chroot directory, logfile location, architecture, etc.""") - - content_label = gtk.Label(content_str) - vert.pack_start(content_label, expand=False, fill=False, padding=5) - - self.notebook = gtk.Notebook() - - basicbox = gtk.VBox(False, 0) - basicbox.set_border_width(10) - hbox = gtk.HBox(False, 0) - tmplabel = gtk.Label() - tmplabel.set_markup("<b><u>" + _("Network setup (for install only):") + "</u></b>") - hbox.pack_start(tmplabel, expand=False, fill=False, padding=0) - basicbox.pack_start(hbox, expand=False, fill=False, padding=0) - hbox = gtk.HBox(False, 0) - self.already_setup_check = gtk.CheckButton() - self.already_setup_check.set_active(False) - self.already_setup_check.connect("toggled", self.already_setup_toggled) - hbox.pack_start(self.already_setup_check, expand=False, fill=False, padding=0) - hbox.pack_start(gtk.Label("My network is already setup and running (or no network)"), expand=False, fill=False, padding=10) - basicbox.pack_start(hbox, expand=False, fill=False, padding=3) - hbox = gtk.HBox(False, 0) - hbox.pack_start(gtk.Label(_("Interface:")), expand=False, fill=False, padding=0) - self.interface_combo = gtk.combo_box_entry_new_text() - self.interface_combo.get_child().set_width_chars(9) - self.interface_combo.connect("changed", self.interface_changed) - self.interfaces = GLIUtility.get_eth_devices() - for device in self.interfaces: - self.interface_combo.append_text(device) - hbox.pack_start(self.interface_combo, expand=False, fill=False, padding=10) - basicbox.pack_start(hbox, expand=False, fill=False, padding=7) - hbox = gtk.HBox(False, 0) - self.basic_dhcp_radio = gtk.RadioButton(label=_("DHCP")) - self.basic_dhcp_radio.connect("toggled", self.dhcp_static_toggled, "dhcp") - hbox.pack_start(self.basic_dhcp_radio, expand=False, fill=False, padding=0) - basicbox.pack_start(hbox, expand=False, fill=False, padding=0) - hbox = gtk.HBox(False, 0) - tmptable = gtk.Table(rows=1, columns=3) - tmptable.set_col_spacings(6) - tmptable.set_row_spacings(5) - tmptable.attach(gtk.Label(" "), 0, 1, 0, 1) - tmplabel = gtk.Label(_("DHCP options:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 1, 2, 0, 1) - self.dhcp_options_entry = gtk.Entry() - self.dhcp_options_entry.set_width_chars(35) - tmptable.attach(self.dhcp_options_entry, 2, 3, 0, 1) - hbox.pack_start(tmptable, expand=False, fill=False, padding=0) - basicbox.pack_start(hbox, expand=False, fill=False, padding=3) - hbox = gtk.HBox(False, 0) - self.basic_static_radio = gtk.RadioButton(group=self.basic_dhcp_radio, label=_("Static")) - self.basic_static_radio.connect("toggled", self.dhcp_static_toggled, "static") - hbox.pack_start(self.basic_static_radio, expand=False, fill=False, padding=0) - basicbox.pack_start(hbox, expand=False, fill=False, padding=3) - hbox = gtk.HBox(False, 0) - tmptable = gtk.Table(rows=5, columns=1) - tmptable.set_col_spacings(6) - tmptable.set_row_spacings(5) - tmptable.attach(gtk.Label(" "), 0, 1, 0, 1) - tmplabel = gtk.Label(_("IP address:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 1, 2, 0, 1) - self.ip_address_entry = gtk.Entry() - self.ip_address_entry.set_width_chars(20) - tmptable.attach(self.ip_address_entry, 2, 3, 0, 1) - tmptable.attach(gtk.Label(" "), 3, 4, 0, 1) - tmplabel = gtk.Label(_("Netmask:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 4, 5, 0, 1) - self.netmask_entry = gtk.Entry() - self.netmask_entry.set_width_chars(20) - tmptable.attach(self.netmask_entry, 5, 6, 0, 1) - tmplabel = gtk.Label(_("Broadcast:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 1, 2, 1, 2) - self.broadcast_entry = gtk.Entry() - self.broadcast_entry.set_width_chars(20) - tmptable.attach(self.broadcast_entry, 2, 3, 1, 2) - tmplabel = gtk.Label(_("Gateway:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 4, 5, 1, 2) - self.gateway_entry = gtk.Entry() - self.gateway_entry.set_width_chars(20) - tmptable.attach(self.gateway_entry, 5, 6, 1, 2) - tmplabel = gtk.Label(_("DNS servers:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 1, 2, 2, 3) - self.dns_entry = gtk.Entry() - self.dns_entry.set_width_chars(20) - tmptable.attach(self.dns_entry, 2, 3, 2, 3) - hbox.pack_start(tmptable, expand=False, fill=False, padding=0) - basicbox.pack_start(hbox, expand=False, fill=False, padding=3) - hbox = gtk.HBox(False, 0) - tmptable = gtk.Table(rows=1, columns=5) - tmptable.set_col_spacings(6) - tmptable.set_row_spacings(5) -# tmptable.attach(gtk.Label(" "), 0, 2, 0, 1) - tmplabel = gtk.Label() - tmplabel.set_markup("<b><u>" + _("Proxies:") + "</u></b>") - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 0, 5, 0, 1) - - tmpbox = gtk.HBox(False, 5) - tmplabel = gtk.Label(_("HTTP:")) - tmplabel.set_alignment(0, 0.5) -# tmptable.attach(tmplabel, 0, 1, 2, 3) - tmpbox.pack_start(tmplabel, expand=False, fill=False) - self.http_proxy_entry = gtk.Entry() - tmpbox.pack_start(self.http_proxy_entry, expand=False, fill=False) -# tmptable.attach(self.http_proxy_entry, 1, 2, 2, 3) - tmptable.attach(tmpbox, 0, 1, 1, 2) - tmptable.attach(gtk.Label(" "), 1, 2, 1, 2) - - tmpbox = gtk.HBox(False, 5) - tmplabel = gtk.Label(_("FTP:")) - tmplabel.set_alignment(0, 0.5) -# tmptable.attach(tmplabel, 0, 1, 3, 4) - tmpbox.pack_start(tmplabel, expand=False, fill=False) - self.ftp_proxy_entry = gtk.Entry() - tmpbox.pack_start(self.ftp_proxy_entry, expand=False, fill=False) -# tmptable.attach(self.ftp_proxy_entry, 1, 2, 3, 4) - tmptable.attach(tmpbox, 2, 3, 1, 2) - tmptable.attach(gtk.Label(" "), 3, 4, 1, 2) - - tmpbox = gtk.HBox(False, 5) - tmplabel = gtk.Label(_("Rsync:")) - tmplabel.set_alignment(0, 0.5) -# tmptable.attach(tmplabel, 0, 1, 4, 5) - tmpbox.pack_start(tmplabel, expand=False, fill=False) - self.rsync_proxy_entry = gtk.Entry() - tmpbox.pack_start(self.rsync_proxy_entry, expand=False, fill=False) -# tmptable.attach(self.rsync_proxy_entry, 1, 2, 4, 5) - tmptable.attach(tmpbox, 4, 5, 1, 2) - - hbox.pack_start(tmptable, expand=False, fill=False, padding=0) - basicbox.pack_start(hbox, expand=False, fill=False, padding=3) - self.notebook.append_page(basicbox, gtk.Label(_("Networking"))) - - advbox = gtk.VBox(False, 0) - advbox.set_border_width(10) - hbox = gtk.HBox(False, 0) - tmptable = gtk.Table(rows=5, columns=1) - tmptable.set_col_spacings(6) - tmptable.set_row_spacings(5) -# tmplabel = gtk.Label() -# tmplabel.set_markup("<b><u>" + _("Directories and logfiles:") + "</u></b>") -# tmplabel.set_alignment(0.0, 0.5) -# tmptable.attach(tmplabel, 0, 2, 0, 1) - tmplabel = gtk.Label(_("Chroot directory:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 0, 1, 1, 2) - self.chroot_dir_entry = gtk.Entry() - self.chroot_dir_entry.set_width_chars(25) - tmptable.attach(self.chroot_dir_entry, 1, 2, 1, 2) - tmplabel = gtk.Label(_("Logfile:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 0, 1, 2, 3) - self.logfile_entry = gtk.Entry() - self.logfile_entry.set_width_chars(25) - tmptable.attach(self.logfile_entry, 1, 2, 2, 3) - tmplabel = gtk.Label(" ") - tmptable.attach(tmplabel, 0, 1, 3, 4) -# tmplabel = gtk.Label() -# tmplabel.set_markup("<b><u>" + _("SSH:") + "</u></b>") -# tmplabel.set_alignment(0.0, 0.5) -# tmptable.attach(tmplabel, 0, 2, 4, 5) - tmplabel = gtk.Label(_("Start SSHd:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 0, 1, 5, 6) - tmphbox = gtk.HBox(False, 0) - self.sshd_yes_radio = gtk.RadioButton(label=_("Yes")) - tmphbox.pack_start(self.sshd_yes_radio, expand=False, fill=False, padding=0) - self.sshd_no_radio = gtk.RadioButton(group=self.sshd_yes_radio, label=_("No")) - tmphbox.pack_start(self.sshd_no_radio, expand=False, fill=False, padding=15) - tmptable.attach(tmphbox, 1, 2, 5, 6) - tmplabel = gtk.Label(_("Root password:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 0, 1, 6, 7) - self.root_password_entry = gtk.Entry() - self.root_password_entry.set_width_chars(25) - self.root_password_entry.set_visibility(False) - tmptable.attach(self.root_password_entry, 1, 2, 6, 7, xoptions=0) - tmplabel = gtk.Label(_("Verify root password:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 0, 1, 7, 8) - self.verify_root_password_entry = gtk.Entry() - self.verify_root_password_entry.set_width_chars(25) - self.verify_root_password_entry.set_visibility(False) - tmptable.attach(self.verify_root_password_entry, 1, 2, 7, 8, xoptions=0) - tmplabel = gtk.Label(" ") - tmptable.attach(tmplabel, 0, 1, 8, 9) -# tmplabel = gtk.Label() -# tmplabel.set_markup("<b><u>" + _("Other:") + "</u></b>") -# tmplabel.set_alignment(0.0, 0.5) -# tmptable.attach(tmplabel, 0, 2, 9, 10) - tmplabel = gtk.Label(_("Kernel modules:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 0, 1, 10, 11) - self.modules_entry = gtk.Entry() - self.modules_entry.set_width_chars(25) - tmptable.attach(self.modules_entry, 1, 2, 10, 11) -# tmplabel = gtk.Label(" ") -# tmptable.attach(tmplabel, 0, 1, 11, 12) -# tmplabel = gtk.Label() -# tmplabel.set_markup("<b><u>" + _("Debug:") + "</u></b>") -# tmplabel.set_alignment(0.0, 0.5) -# tmptable.attach(tmplabel, 0, 2, 12, 13) - tmplabel = gtk.Label(_("Verbose logging:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 0, 1, 11, 12) - tmphbox = gtk.HBox(False, 0) - self.verbose_no_radio = gtk.RadioButton(label=_("No")) - tmphbox.pack_start(self.verbose_no_radio, expand=False, fill=False, padding=0) - self.verbose_yes_radio = gtk.RadioButton(group=self.verbose_no_radio, label=_("Yes")) - tmphbox.pack_start(self.verbose_yes_radio, expand=False, fill=False, padding=15) - tmptable.attach(tmphbox, 1, 2, 11, 12) - tmplabel = gtk.Label(_("Install mode:")) - tmplabel.set_alignment(0.0, 0.5) - tmptable.attach(tmplabel, 0, 1, 12, 13) - self.install_mode_combo = gtk.combo_box_new_text() - self._install_modes = ( "Normal", "Chroot" ) - for install_mode in self._install_modes: - self.install_mode_combo.append_text(install_mode) - self.install_mode_combo.set_active(0) - tmptable.attach(self.install_mode_combo, 1, 2, 12, 13) - - hbox.pack_start(tmptable, expand=False, fill=False, padding=0) - - # Currently loaded modules - loaded_mod_frame = gtk.Frame(label="Loaded modules") - loaded_mod_frame.set_size_request(200, -1) - module_list_box = gtk.VBox(False, 3) - module_list_box.set_border_width(7) - module_scroll = gtk.ScrolledWindow() - module_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - module_scroll.set_shadow_type(gtk.SHADOW_NONE) - module_viewport = gtk.Viewport() - module_viewport.set_shadow_type(gtk.SHADOW_NONE) - module_viewport.add(module_list_box) - module_scroll.add(module_viewport) - loaded_mod_frame.add(module_scroll) - loaded_modules = GLIUtility.spawn(r"lsmod | grep -v ^Module | cut -d ' ' -f 1", return_output=True)[1].strip().split("\n") - for module in loaded_modules: - tmplabel = gtk.Label(module) - tmplabel.set_alignment(0.0, 0.5) - module_list_box.pack_start(tmplabel, expand=False, fill=False, padding=0) - hbox.pack_end(loaded_mod_frame, expand=False, fill=False, padding=5) - - advbox.pack_start(hbox, expand=False, fill=False, padding=0) - self.notebook.append_page(advbox, gtk.Label(_("Misc."))) - - vert.pack_start(self.notebook, expand=True, fill=True, padding=0) - - self.add_content(vert) - - def interface_changed(self, combobox): - hw_addr, ip_addr, mask, bcast, gw, up = ("", "", "", "", "", "") - interface = combobox.child.get_text() - try: - if interface.startswith("eth"): - hw_addr, ip_addr, mask, bcast, gw, up = GLIUtility.get_eth_info(interface[-1:]) - except: - pass - self.ip_address_entry.set_text(ip_addr) - self.netmask_entry.set_text(mask) - self.broadcast_entry.set_text(bcast) -# self.gateway_entry.set_text(gw) - - def dhcp_static_toggled(self, radiobutton, data=None): - if radiobutton.get_active(): - # This one was just toggled ON - if data == "dhcp": - self.ip_address_entry.set_sensitive(False) - self.netmask_entry.set_sensitive(False) - self.broadcast_entry.set_sensitive(False) - self.gateway_entry.set_sensitive(False) - self.dns_entry.set_sensitive(False) - self.dhcp_options_entry.set_sensitive(True) - else: - self.ip_address_entry.set_sensitive(True) - self.netmask_entry.set_sensitive(True) - self.broadcast_entry.set_sensitive(True) - self.gateway_entry.set_sensitive(True) - self.dns_entry.set_sensitive(True) - self.dhcp_options_entry.set_sensitive(False) - - def already_setup_toggled(self, widget): - if self.already_setup_check.get_active(): - self.interface_combo.set_sensitive(False) - self.basic_dhcp_radio.set_sensitive(False) - self.basic_static_radio.set_sensitive(False) - self.ip_address_entry.set_sensitive(False) - self.netmask_entry.set_sensitive(False) - self.broadcast_entry.set_sensitive(False) - self.gateway_entry.set_sensitive(False) - self.dns_entry.set_sensitive(False) - self.dhcp_options_entry.set_sensitive(False) - else: - self.interface_combo.set_sensitive(True) - self.basic_dhcp_radio.set_sensitive(True) - self.basic_static_radio.set_sensitive(True) - if self.basic_static_radio.get_active(): - self.ip_address_entry.set_sensitive(True) - self.netmask_entry.set_sensitive(True) - self.broadcast_entry.set_sensitive(True) - self.gateway_entry.set_sensitive(True) - self.dns_entry.set_sensitive(True) - else: - self.dhcp_options_entry.set_sensitive(True) - - def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = False - self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - - interface = self.controller.client_profile.get_network_interface() - ip = self.controller.client_profile.get_network_ip() - if not interface: - self.interface_combo.set_active(0) - else: - self.interface_combo.child.set_text(interface) - for i, dev in enumerate(self.interfaces): - if dev == interface: - self.interface_combo.set_active(i) - if ip == "dhcp" or not ip: - self.basic_dhcp_radio.set_active(True) - self.dhcp_static_toggled(self.basic_dhcp_radio, "dhcp") - self.dhcp_options_entry.set_text(self.controller.client_profile.get_network_dhcp_options()) - else: - self.basic_static_radio.set_active(True) - self.chroot_dir_entry.set_text(self.controller.client_profile.get_root_mount_point()) - self.logfile_entry.set_text(self.controller.client_profile.get_log_file()) - if self.controller.client_profile.get_enable_ssh(): - self.sshd_yes_radio.set_active(True) - else: - self.sshd_no_radio.set_active(True) - dns_servers = GLIUtility.spawn(r"grep -e '^nameserver' /etc/resolv.conf | sed -e 's:^nameserver ::'", return_output=True)[1].strip().split('\n') - dns_servers = " ".join(dns_servers) - self.dns_entry.set_text(dns_servers) - self.gateway_entry.set_text(GLIUtility.spawn(r"/sbin/route -n | grep -e '^0\.0\.0\.0' | sed -e 's:^0\.0\.0\.0 \+::' -e 's: \+.\+$::'", return_output=True)[1].strip()) - self.modules_entry.set_text(" ".join(self.controller.client_profile.get_kernel_modules())) - if self.controller.client_profile.get_verbose(): - self.verbose_yes_radio.set_active(True) - else: - self.verbose_no_radio.set_active(True) - if self.controller.install_type == "networkless": - self.already_setup_check.set_active(True) - self.notebook.set_show_tabs(False) - self.notebook.set_current_page(1) - self.sshd_yes_radio.set_sensitive(False) - self.sshd_no_radio.set_sensitive(False) - self.root_password_entry.set_sensitive(False) - self.verify_root_password_entry.set_sensitive(False) - else: - if GLIUtility.ping("www.gentoo.org"): - self.already_setup_check.set_active(True) - - def deactivate(self): - self.controller.client_profile.set_network_interface(None, self.interface_combo.get_child().get_text(), None) - if self.already_setup_check.get_active(): - self.controller.client_profile.set_network_type(None, "none", None) - else: - if self.basic_dhcp_radio.get_active(): - self.controller.client_profile.set_network_type(None, "dhcp", None) - self.controller.client_profile.set_network_dhcp_options(None, self.dhcp_options_entry.get_text(), None) - else: - self.controller.client_profile.set_network_type(None, "static", None) - self.controller.client_profile.set_network_ip(None, self.ip_address_entry.get_text(), None) - self.controller.client_profile.set_network_netmask(None, self.netmask_entry.get_text(), None) - self.controller.client_profile.set_network_broadcast(None, self.broadcast_entry.get_text(), None) - self.controller.client_profile.set_network_gateway(None, self.gateway_entry.get_text(), None) - self.controller.client_profile.set_dns_servers(None, self.dns_entry.get_text(), None) - self.controller.client_profile.set_http_proxy(None, self.http_proxy_entry.get_text(), None) - self.controller.client_profile.set_ftp_proxy(None, self.ftp_proxy_entry.get_text(), None) - self.controller.client_profile.set_rsync_proxy(None, self.rsync_proxy_entry.get_text(), None) - self.controller.client_profile.set_root_mount_point(None, self.chroot_dir_entry.get_text(), None) - self.controller.client_profile.set_log_file(None, self.logfile_entry.get_text(), None) - self.controller.client_profile.set_enable_ssh(None, self.sshd_yes_radio.get_active(), None) - if self.root_password_entry.get_text() == self.verify_root_password_entry.get_text(): - self.controller.client_profile.set_root_passwd(None, GLIUtility.hash_password(self.root_password_entry.get_text()), None) - self.controller.client_profile.set_kernel_modules(None, self.modules_entry.get_text(), None) - self.controller.client_profile.set_verbose(None, self.verbose_yes_radio.get_active(), None) - arch = GLIUtility.spawn(r"uname -m | sed -e 's:i[3-6]86:x86:' -e 's:x86_64:amd64:' -e 's:parisc:hppa:'", return_output=True)[1].strip() - self.controller.client_profile.set_architecture_template(None, arch, None) - self.controller.client_profile.set_install_mode(None, self._install_modes[self.install_mode_combo.get_active()].lower(), None) - - self.controller.cc.set_configuration(self.controller.client_profile) - self.controller.cc.start_pre_install() - - return True diff --git a/src/fe/gtk/CronDaemon.py b/src/fe/gtk/CronDaemon.py new file mode 100644 index 0000000..2bf1ae2 --- /dev/null +++ b/src/fe/gtk/CronDaemon.py @@ -0,0 +1,77 @@ +# Copyright 1999-2005 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import gtk +from GLIScreen import * +from ProgressDialog import * + +class Panel(GLIScreen): + + title = "Cron Daemon" + active_selection = None + radio_crons = {} + _helptext = """ +<b><u>Cron Daemon</u></b> + +Pick a cron daemon. The most common choice is vixie-cron. This option is \ +not available in Networkless mode. +""" + crons = [ "vixie-cron", "fcron", "dcron", "None" ] + + def __init__(self, controller): + GLIScreen.__init__(self, controller) + vert = gtk.VBox(False, 0) + vert.set_border_width(10) + + if self.controller.install_type == "networkless": + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Your cron daemon will be %s</b>' % self.crons[0]) + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + else: + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Choose your cron daemon</b>') + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + for cron in self.crons: + hbox = gtk.HBox(False, 0) + if cron == self.crons[0]: + self.radio_crons[cron] = gtk.RadioButton(None, cron) + else: + self.radio_crons[cron] = gtk.RadioButton(self.radio_crons[self.crons[0]], cron) + self.radio_crons[cron].set_name(cron) + self.radio_crons[cron].connect("toggled", self.cron_selected, cron) + hbox.pack_start(self.radio_crons[cron], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + self.add_content(vert) + self.boot_devices = None + + def cron_selected(self, widget, data=None): + self.active_selection = data + + def activate(self): + self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_FORWARD = True + if self.controller.install_type != "networkless": + self.active_selection = self.controller.install_profile.get_cron_daemon_pkg() or self.crons[0] + self.radio_crons[self.active_selection].set_active(True) + + def next(self): + if self.controller.install_type == "networkless": + self.controller.install_profile.set_cron_daemon_pkg(None, self.crons[0], None) + else: + self.controller.install_profile.set_cron_daemon_pkg(None, self.active_selection, None) + progress = ProgressDialog(self.controller, ('install_logging_daemon', 'install_cron_daemon', 'install_filesystem_tools'), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("Bootloader") + else: + GLIScreen.progress_callback(self, result, data) diff --git a/src/fe/gtk/Daemons.py b/src/fe/gtk/Daemons.py deleted file mode 100644 index 8181848..0000000 --- a/src/fe/gtk/Daemons.py +++ /dev/null @@ -1,189 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. - -import gtk -import GLIScreen - -class Panel(GLIScreen.GLIScreen): - - title = "Daemons" - active_selection_cron = None - active_selection_logger = None - cron_daemons = {} - log_daemons = {} - _helptext = """ -<b><u>Daemons</u></b> - -System Logger: - -Some tools are missing from the stage3 archive because several packages provide -the same functionality. - -Unix and Linux have an excellent history of logging capabilities -- if you want -you can log everything that happens on your system in logfiles. This happens -through the system logger. - -Gentoo offers several system loggers to choose from. There are sysklogd, which -is the traditional set of system logging daemons, syslog-ng, an advanced system -logger, and metalog which is a highly-configurable system logger. Others might -be available through Portage as well - our number of available packages -increases on a daily basis. - -If you plan on using sysklogd or syslog-ng you might want to install logrotate -afterwards as those system loggers don't provide any rotation mechanism for the -log files. - -Syslog-ng is provided by GRP and is the default, though the others are just as -good. - -Cron Daemon: - -Although it is optional and not required for your system, it is wise to install -one. But what is a cron daemon? A cron daemon executes scheduled commands. It is -very handy if you need to execute some command regularly (for instance daily, -weekly or monthly). - -Gentoo offers three possible cron daemons: dcron, fcron and vixie-cron. -Installing one of them is similar to installing a system logger. However, dcron -and fcron require an extra configuration command, namely crontab /etc/crontab. -If you don't know what to choose, use vixie-cron. - -Vixie-cron is provided by GRP and is the recommended default. -""" - - def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) - vert = gtk.VBox(False, 0) - vert.set_border_width(10) - - content_str = """Here, you will select which cron and logger daemons you would like to use. Each option has -a brief description beside it. -""" - content_label = gtk.Label(content_str) - vert.pack_start(content_label, expand=False, fill=False, padding=0) - - hbox = gtk.HBox(False, 0) - label = gtk.Label() - label.set_markup("<b>Cron Daemon</b> (runs tasks at scheduled times)") - hbox.pack_start(label, False, fill=False, padding=0) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.cron_daemons['vixie-cron'] = gtk.RadioButton(None, "vixie-cron") - self.cron_daemons['vixie-cron'].set_name("vixie-cron") - self.cron_daemons['vixie-cron'].connect("toggled", self.cron_selected, "vixie-cron") - self.cron_daemons['vixie-cron'].set_size_request(150, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.cron_daemons['vixie-cron'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("Paul Vixie's cron daemon, a fully featured crond implementation") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.cron_daemons['fcron'] = gtk.RadioButton(self.cron_daemons['vixie-cron'], "fcron") - self.cron_daemons['fcron'].set_name("fcron") - self.cron_daemons['fcron'].connect("toggled", self.cron_selected, "fcron") - self.cron_daemons['fcron'].set_size_request(150, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.cron_daemons['fcron'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("A command scheduler with extended capabilities over cron and anacron") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.cron_daemons['dcron'] = gtk.RadioButton(self.cron_daemons['vixie-cron'], "dcron") - self.cron_daemons['dcron'].set_name("dcron") - self.cron_daemons['dcron'].connect("toggled", self.cron_selected, "dcron") - self.cron_daemons['dcron'].set_size_request(150, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.cron_daemons['dcron'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("A cute little cron from Matt Dillon") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.cron_daemons['none'] = gtk.RadioButton(self.cron_daemons['vixie-cron'], "None") - self.cron_daemons['none'].set_name("none") - self.cron_daemons['none'].connect("toggled", self.cron_selected, "none") - self.cron_daemons['none'].set_size_request(150, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.cron_daemons['none'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("Choose this if you don't want a cron daemon") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - - hbox = gtk.HBox(False, 0) - label = gtk.Label() - label.set_markup("<b>System Logger</b> (provides logging facilities)") - hbox.pack_start(label, False, fill=False, padding=0) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.log_daemons['syslog-ng'] = gtk.RadioButton(None, "syslog-ng") - self.log_daemons['syslog-ng'].set_name("syslog-ng") - self.log_daemons['syslog-ng'].connect("toggled", self.logger_selected, "syslog-ng") - self.log_daemons['syslog-ng'].set_size_request(150, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.log_daemons['syslog-ng'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("syslog replacement with advanced filtering features") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.log_daemons['metalog'] = gtk.RadioButton(self.log_daemons['syslog-ng'], "metalog") - self.log_daemons['metalog'].set_name("metalog") - self.log_daemons['metalog'].connect("toggled", self.logger_selected, "metalog") - self.log_daemons['metalog'].set_size_request(150, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.log_daemons['metalog'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("A highly configurable replacement for syslogd/klogd") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.log_daemons['sysklogd'] = gtk.RadioButton(self.log_daemons['syslog-ng'], "sysklogd") - self.log_daemons['sysklogd'].set_name("sysklogd") - self.log_daemons['sysklogd'].connect("toggled", self.logger_selected, "sysklogd") - self.log_daemons['sysklogd'].set_size_request(150, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.log_daemons['sysklogd'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("Standard log daemon") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.add_content(vert) - - def cron_selected(self, widget, data=None): - self.active_selection_cron = data - - def logger_selected(self, widget, data=None): - self.active_selection_logger = data - - def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True - self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - self.active_selection_cron = self.controller.install_profile.get_cron_daemon_pkg() or "vixie-cron" - self.active_selection_logger = self.controller.install_profile.get_logging_daemon_pkg() or "syslog-ng" - self.cron_daemons[self.active_selection_cron].set_active(True) - self.log_daemons[self.active_selection_logger].set_active(True) - if self.controller.install_type == "networkless": - self.active_selection_cron = "vixie-cron" - self.cron_daemons['vixie-cron'].set_active(True) - self.cron_daemons['fcron'].set_sensitive(False) - self.cron_daemons['dcron'].set_sensitive(False) -# self.cron_daemons['none'].set_sensitive(False) - self.active_selection_logger = "syslog-ng" - self.log_daemons['syslog-ng'].set_active(True) - self.log_daemons['metalog'].set_sensitive(False) - self.log_daemons['sysklogd'].set_sensitive(False) - - def deactivate(self): - self.controller.install_profile.set_cron_daemon_pkg(None, self.active_selection_cron, None) - self.controller.install_profile.set_logging_daemon_pkg(None, self.active_selection_logger, None) - return True diff --git a/src/fe/gtk/ExtraPackages.py b/src/fe/gtk/ExtraPackages.py index 0e03c38..47567d4 100644 --- a/src/fe/gtk/ExtraPackages.py +++ b/src/fe/gtk/ExtraPackages.py @@ -4,11 +4,11 @@ # of which can be found in the main directory of this project. import gtk, gobject, copy -import GLIScreen +from GLIScreen import * from Widgets import Widgets import GLIUtility -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): """ The extrapackages section of the installer. @@ -20,27 +20,25 @@ class Panel(GLIScreen.GLIScreen): _helptext = """ <b><u>Extra Packages</u></b> -Packages available via GRP (pre-compiled binaries on the livecd that get copied -over) are labeled with (GRP), and include all of their dependencies. For -instance gnome (GRP) includes all of gnome, including xorg-x11. Fluxbox, -however, is not available in GRP and must be compiled. The list of packages is -very limited, as Portage has a vast list of available packages. If you have -packages you need to install in addition to the list, enter them in a space -separated list in the text field. The installer is designed to get you a system -capable of booting into a graphical environment, not install every single -package you will ever use. That would just massively increase the changes of a -failed package ruining your installation. +If you're doing a networkless install, all of the packages listed on the right \ +are available for the installer to install directly from the LiveCD (including \ +dependencies) without access to the internet. -If you choose a graphical desktop such as gnome, kde, or fluxbox, be sure to -choose xdm from the startup services and to set your Display Manager (and/or -XSession for fluxbox) in the Other Settings screen. +If you're not doing a networkless install, all of your packages will be \ +compiled from source. The list on the right is by no means comprehensive. If \ +there are other packages you wish to install, enter them below separated by \ +spaces. + +If you choose a graphical desktop such as gnome, kde, or fluxbox, be sure to \ +also select xorg-x11 from the list. Otherwise, you will not have a fully \ +functioning graphical environment. """ # list of packages to emerge from the checked off items. checked_items = [] def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) self.vert = gtk.VBox(False, 10) self.vert2 = gtk.VBox(False, 10) @@ -112,11 +110,8 @@ caution. These trouble packages can be installed manually after you reboot. self.add_content(self.vert) def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True self.controller.SHOW_BUTTON_BACK = True self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False # remove all checked items to start with self.checked_items = [] @@ -154,8 +149,7 @@ caution. These trouble packages can be installed manually after you reboot. s=" ".join(unjoined_reduced) self.entry.set_text(s) - def deactivate(self): - return_value = False + def next(self): # save the space seperated list #print self.custom_box.get_text() try: @@ -164,13 +158,18 @@ caution. These trouble packages can be installed manually after you reboot. self.controller.install_profile.set_install_packages(None, packages_to_emerge, None) #print packages_to_emerge - return_value = True except: box = Widgets().error_Box("Error saving packages","You need to fix your input! \n Theres a problem, are you sure didn't enter \n funny characters?") box.show() - return_value = False - - return return_value + return + progress = ProgressDialog(self.controller, ('install_mta','install_packages'), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("StartupServices") + else: + GLIScreen.progress_callback(self, result, data) class Category: diff --git a/src/fe/gtk/GLIFutureBar.py b/src/fe/gtk/GLIFutureBar.py deleted file mode 100644 index 8cbbb7d..0000000 --- a/src/fe/gtk/GLIFutureBar.py +++ /dev/null @@ -1,177 +0,0 @@ -# $Id: GLIFutureBar.py,v 1.4 2006/06/05 02:11:48 agaffney Exp $ -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -import gtk - -class GLIFutureBar(gtk.HBox): - - def __init__(self, titles): - """ - future bar - """ - gtk.HBox.__init__( - self, - False, - 0 - ) - self.set_border_width(2) - - # Widths - self.arrow_width = 15 #20 - self.text_width = 139 #144 - - # state - self.pos = 0 - self.titles = titles -# self.titles = [ -# "Welcome", -# "Client Config", -# "Partitioning", -# "Network Mounts", -# "Stage", -# "Portage Tree", -# "make.conf", -# "Kernel", -# "Bootloader", -# "Timezone", -# "Networking", -# "Daemons", -# "Extra Packages", -# "rc.conf", -# "Users", -# "Review", -# ] - - # markup - self.l2_color = "#ABA9A5" - self.l2_size = "-2" - self.l1_color = "#787674" - self.l1_size = "-1" - self.cur_color = "#000000" - self.cur_size = "-0" - self.arrowl = unichr(8672) - self.arrowr = unichr(8674) - - # l2 (level 2 on the left) - self.l2 = gtk.HBox(False, 0) - self.l2.label = gtk.Label() - self.l2.label.set_use_markup(True) - self.l2.label.set_size_request(self.text_width, -1) - self.l2.pack_start(self.l2.label, True, True, 0) - self.l2.arrow = gtk.Label() - self.l2.arrow.set_use_markup(True) - self.l2.arrow.set_size_request(self.arrow_width, -1) - self.l2.pack_start(self.l2.arrow, False, False, 0) - self.pack_start(self.l2, True, True, 0) - - # l1 (level 1 on the left) - self.l1 = gtk.HBox(False, 0) - self.l1.label = gtk.Label() - self.l1.label.set_use_markup(True) - self.l1.label.set_size_request(self.text_width, -1) - self.l1.pack_start(self.l1.label, True, True, 0) - self.l1.arrow = gtk.Label() - self.l1.arrow.set_use_markup(True) - self.l1.arrow.set_size_request(self.arrow_width, -1) - self.l1.pack_start(self.l1.arrow, False, False, 0) - self.pack_start(self.l1, True, True, 0) - - # cur (current in the middle) - self.cur = gtk.Label() - self.cur.set_use_markup(True) - self.cur.set_size_request(self.text_width + 40, -1) - self.pack_start(self.cur, True, True, 0) - - # r1 (level 1 on the right) - self.r1 = gtk.HBox(False, 0) - self.r1.arrow = gtk.Label() - self.r1.arrow.set_use_markup(True) - self.r1.arrow.set_size_request(self.arrow_width, -1) - self.r1.pack_start(self.r1.arrow, False, False, 0) - self.r1.label = gtk.Label() - self.r1.label.set_use_markup(True) - self.r1.label.set_size_request(self.text_width, -1) - self.r1.pack_start(self.r1.label, True, True, 0) - self.pack_start(self.r1, True, True, 0) - - # r2 (level 2 on the right) - self.r2 = gtk.HBox(False, 0) - self.r2.arrow = gtk.Label() - self.r2.arrow.set_use_markup(True) - self.r2.arrow.set_size_request(self.arrow_width, -1) - self.r2.pack_start(self.r2.arrow, False, False, 0) - self.r2.label = gtk.Label() - self.r2.label.set_use_markup(True) - self.r2.label.set_size_request(self.text_width, -1) - self.r2.pack_start(self.r2.label, True, True, 0) - self.pack_start(self.r2, True, True, 0) - - # init positions - self.setpos(0) - - def getpos(self): - return self.pos - - def setpos(self, pos): - if pos >= 0 and pos < len(self.titles): - # set position variable - self.pos = pos - - # create a reference label - label = gtk.Label("Hello") - - if (self.pos - 2) >= 0: - self.l2.label.set_markup("<span size=\"" + str(((label.get_pango_context().get_font_description().get_size() / 1024) + int(self.l2_size)) * 1024) + "\" weight=\"bold\" foreground=\"" + self.l2_color + "\">" + self.titles[self.pos - 2] + "</span>") - self.l2.arrow.set_markup("<span size=\"" + str(((label.get_pango_context().get_font_description().get_size() / 1024) + int(self.l2_size) + 7) * 1024) + "\" weight=\"bold\" foreground=\"" + self.l2_color + "\">" + self.arrowl + "</span>") - else: - self.l2.label.set_markup("") - self.l2.arrow.set_markup("") - - if (self.pos - 1) >= 0: - self.l1.label.set_markup("<span size=\"" + str(((label.get_pango_context().get_font_description().get_size() / 1024) + int(self.l1_size)) * 1024) + "\" weight=\"bold\" foreground=\"" + self.l1_color + "\">" + self.titles[self.pos - 1] + "</span>") - self.l1.arrow.set_markup("<span size=\"" + str(((label.get_pango_context().get_font_description().get_size() / 1024) + int(self.l1_size) + 7) * 1024) + "\" weight=\"bold\" foreground=\"" + self.l1_color + "\">" + self.arrowl + "</span>") - else: - self.l1.label.set_markup("") - self.l1.arrow.set_markup("") - - self.cur.set_markup("<span size=\"" + str(((label.get_pango_context().get_font_description().get_size() / 1024) + int(self.cur_size)) * 1024) + "\" weight=\"bold\" foreground=\"" + self.cur_color + "\">" + self.titles[self.pos] + "(" + str(self.pos+1) + "/" + str(len(self.titles)) + ")</span>") - - if (self.pos + 1) < len(self.titles): - self.r1.label.set_markup("<span size=\"" + str(((label.get_pango_context().get_font_description().get_size() / 1024) + int(self.l1_size)) * 1024) + "\" weight=\"bold\" foreground=\"" + self.l1_color + "\">" + self.titles[self.pos + 1] + "</span>") - self.r1.arrow.set_markup("<span size=\"" + str(((label.get_pango_context().get_font_description().get_size() / 1024) + int(self.l1_size) + 7) * 1024) + "\" weight=\"bold\" foreground=\"" + self.l1_color + "\">" + self.arrowr + "</span>") - else: - self.r1.label.set_markup("") - self.r1.arrow.set_markup("") - - if (self.pos + 2) < len(self.titles): - self.r2.label.set_markup("<span size=\"" + str(((label.get_pango_context().get_font_description().get_size() / 1024) + int(self.l2_size)) * 1024) + "\" weight=\"bold\" foreground=\"" + self.l2_color + "\">" + self.titles[self.pos + 2] + "</span>") - self.r2.arrow.set_markup("<span size=\"" + str(((label.get_pango_context().get_font_description().get_size() / 1024) + int(self.l2_size) + 7) * 1024) + "\" weight=\"bold\" foreground=\"" + self.l2_color + "\">" + self.arrowr + "</span>") - else: - self.r2.label.set_markup("") - self.r2.arrow.set_markup("") - - self.show_all() - - return True - else: - return False - - def prev(self): - return self.setpos(self.pos - 1) - - def next(self): - return self.setpos(self.pos + 1) diff --git a/src/fe/gtk/GLIScreen.py b/src/fe/gtk/GLIScreen.py index 0f26582..6ea0bfc 100644 --- a/src/fe/gtk/GLIScreen.py +++ b/src/fe/gtk/GLIScreen.py @@ -5,6 +5,7 @@ import gtk import os.path +from ProgressDialog import * class GLIScreen(gtk.VBox): @@ -28,5 +29,16 @@ class GLIScreen(gtk.VBox): def activate(self): print "Bad boy! You should really impliment this function in your subclass." - def deactivate(self): - return True + def progress_callback(self, result, data=None): + if result == PROGRESS_CANCEL: + self.controller.exit(0) + elif result == PROGRESS_EXCEPTION: +# msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format="Your install has failed. The installer will exit now. The error was:\n\n" + str(data)) +# msgdlg.run() +# msgdlg.destroy() +# self.controller.exit(1) + progress = ProgressDialog(self.controller, ("install_failed_cleanup", ), None) + progress.run() + self.controller.load_screen("InstallFailed") + + diff --git a/src/fe/gtk/HelpDialog.py b/src/fe/gtk/HelpDialog.py deleted file mode 100755 index fc2eb37..0000000 --- a/src/fe/gtk/HelpDialog.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. - -import gtk, pango -from gettext import gettext as _ -import TextBufferMarkup - -class HelpDialog(gtk.Window): - - def __init__(self, parent, helptext): - gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) - - self.connect("delete_event", self.delete_event) - self.connect("destroy", self.destroy_event) - self.set_default_size(500,400) -# self.set_resizable(True) - self.set_title("Gentoo Installer Help") - - self.globalbox = gtk.VBox(False, 0) - - self.textbuff = TextBufferMarkup.PangoBuffer() - - # Here is where we chop up the text a bit -# helptext = " ".join(helptext.split("\n")) -# helptext = "\n".join(helptext.split('<br>')) - - self.textbuff.set_text(helptext) - self.textview = gtk.TextView(self.textbuff) - self.textview.set_editable(False) - self.textview.set_wrap_mode(gtk.WRAP_CHAR) - self.textview.modify_base(gtk.STATE_NORMAL, gtk.gdk.color_parse('#f4ffa9')) - self.textviewscroll = gtk.ScrolledWindow() - self.textviewscroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - self.textviewscroll.add(self.textview) - self.globalbox.pack_start(self.textviewscroll, expand=True, fill=True) - - self.add(self.globalbox) - self.set_modal(True) -# self.set_transient_for(parent) - - def run(self): - self.show_all() - - def delete_event(self, widget, event, data=None): - return False - - def destroy_event(self, widget, data=None): - return True - diff --git a/src/fe/gtk/InstallDone.py b/src/fe/gtk/InstallDone.py new file mode 100644 index 0000000..2f656b8 --- /dev/null +++ b/src/fe/gtk/InstallDone.py @@ -0,0 +1,37 @@ +# Copyright 1999-2005 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import gtk +from GLIScreen import * + +class Panel(GLIScreen): + + _helptext = """ +<b><u>Install Complete!</u></b> + +Your install has finished. Click the Exit button, restart your computer, \ +and enjoy! +""" + + def __init__(self, controller): + GLIScreen.__init__(self, controller) + vert = gtk.VBox(False, 0) + vert.set_border_width(10) + + self.controller.install_done = True + + hbox = gtk.HBox(False, 0) + label = gtk.Label() + label_markup = '<b>Your install is complete!</b>' + label.set_markup(label_markup) + label.set_line_wrap(True) + hbox.pack_start(label, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=10) + + self.add_content(vert) + + def activate(self): + self.controller.SHOW_BUTTON_BACK = False + self.controller.SHOW_BUTTON_FORWARD = False diff --git a/src/fe/gtk/InstallFailed.py b/src/fe/gtk/InstallFailed.py new file mode 100644 index 0000000..5fdcf52 --- /dev/null +++ b/src/fe/gtk/InstallFailed.py @@ -0,0 +1,39 @@ +# Copyright 1999-2005 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import gtk +from GLIScreen import * + +class Panel(GLIScreen): + + _helptext = """ +<b><u>Install Failed</u></b> + +Your install has failed for one of numerous reasons. You can find the error in \ +the logfile at /tmp/installer.log.failed. Once you determine that the error was \ +not caused by you, please file a bug at http://bugs.gentoo.org/ in the \ +Gentoo Hosted Projects/Installer component. +""" + + def __init__(self, controller): + GLIScreen.__init__(self, controller) + vert = gtk.VBox(False, 0) + vert.set_border_width(10) + + self.controller.install_done = True + + hbox = gtk.HBox(False, 0) + label = gtk.Label() + label_markup = '<b>Your install has failed.</b>' + label.set_markup(label_markup) + label.set_line_wrap(True) + hbox.pack_start(label, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=10) + + self.add_content(vert) + + def activate(self): + self.controller.SHOW_BUTTON_BACK = False + self.controller.SHOW_BUTTON_FORWARD = False diff --git a/src/fe/gtk/InstallMode.py b/src/fe/gtk/InstallMode.py new file mode 100644 index 0000000..af09714 --- /dev/null +++ b/src/fe/gtk/InstallMode.py @@ -0,0 +1,66 @@ +# Copyright 1999-2005 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import gtk +from GLIScreen import * +from gettext import gettext as _ + +class Panel(GLIScreen): + + title = _("Welcome to the Gentoo Linux Installer") + _helptext = """ +<b><u>Install Mode</u></b> + +Welcome to the GTK+ front-end for the Gentoo Linux Installer. It is highly \ +recommended that you have gone through the manual install process a time or \ +two, or at least read through the install guide. + +There are 3 install modes you can choose from: Networkless, Standard, and \ +Advanced. The "Networkless" mode is used for installs where you have no access \ +to the internet, or you just want a fast install using what's available on the \ +LiveCD. The "Standard" mode is used for networked installs. It allows you \ +some flexibility, but it makes safe assumptions on some advanced options. The \ +"Advanced" mode is for people who want to play around with more settings. If \ +you break your install in this mode, don't come crying to us. +""" + + def __init__(self, controller): + GLIScreen.__init__(self, controller) + vert = gtk.VBox(False, 10) + vert.set_border_width(10) + + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Choose your install mode</b>') + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=15) + + hbox = gtk.HBox(False) + self.install_type_standard = gtk.RadioButton(label=_("Standard")) + hbox.pack_start(self.install_type_standard, expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=False, padding=5) + hbox = gtk.HBox(False) + self.install_type_networkless = gtk.RadioButton(group=self.install_type_standard, label=_("Networkless")) + hbox.pack_start(self.install_type_networkless, expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=False, padding=5) + hbox = gtk.HBox(False) + self.install_type_advanced = gtk.RadioButton(group=self.install_type_networkless, label=_("Advanced")) + hbox.pack_start(self.install_type_advanced, expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=False, padding=5) + + self.add_content(vert) + + def activate(self): + self.controller.SHOW_BUTTON_BACK = False + self.controller.SHOW_BUTTON_FORWARD = True + + def next(self): + if self.install_type_networkless.get_active(): + self.controller.install_type = "networkless" + elif self.install_type_standard.get_active(): + self.controller.install_type = "standard" + elif self.install_type_advanced.get_active(): + self.controller.install_type = "advanced" + self.controller.load_screen("Partition") diff --git a/src/fe/gtk/InstallSummary.py b/src/fe/gtk/InstallSummary.py deleted file mode 100644 index d0076ad..0000000 --- a/src/fe/gtk/InstallSummary.py +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. - -import gtk -import GLIScreen -from Widgets import Widgets - -class Panel(GLIScreen.GLIScreen): - """ - The summary of all installation options. - - @author: John N. Laliberte <allanonl@bu.edu> - @license: GPL - """ - # Attributes: - title="Summary of Installation Options" - _helptext = """ -<b><u>Review</u></b> - -The review screen currently doesn't do anything. This is still a work in -progress, and is almost completed. If you want to review any of your settings -you can use the back arrow and go to them. Otherwise, you have reached the point -of no return. Click Install to begin the installation. This is the point at -which changes are made to your disk and your system will be completely installed -without any user intervention necessary. There will be an overall progress bar -at the bottom as well as a sub-progress bar above it giving progress for that -individual step. - -The log output is shown on the main tab, but compile output is also available in -the Output tab. If an installation fails, these tabs will usually contain the -relevant error information necessary to provide to the developers when reporting -a bug. -""" - - # Operations - def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) - - vert = gtk.VBox(False, 10) # This box is content so it should fill space to force title to top - horiz = gtk.HBox(False, 10) - - content_str = """ -If you click Install here, the installer will generate the xml profile. -""" - # pack the description - vert.pack_start(gtk.Label(content_str), expand=False, fill=False, padding=10) - - widgets=Widgets() - self.treestore = gtk.TreeStore(str) - - # we'll add some data now - 4 rows with 3 child rows each - #for parent in range(5): - # piter = self.treestore.append(None, ['parent %i' % parent]) - # for child in range(4): - # self.treestore.append(piter, ['child %i of parent %i' % (child, parent)]) - for item in self.controller.menuItems: - self.treestore.append(None, [item['text']]) - self.treeview = gtk.TreeView(self.treestore) - self.tvcolumn = gtk.TreeViewColumn('Current Install Options') - self.treeview.append_column(self.tvcolumn) - self.cell = gtk.CellRendererText() - self.tvcolumn.pack_start(self.cell, True) - self.tvcolumn.add_attribute(self.cell, 'text', 0) - self.treeview.set_search_column(0) - - scrolled_window = gtk.ScrolledWindow() - scrolled_window.set_border_width(10) - scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - vert.pack_start(scrolled_window, True, True, 0) - scrolled_window.show() - scrolled_window.add_with_viewport(self.treeview) - #vert.pack_start(self.treeview, expand=False, fill=False, padding=10) - - self.add_content(vert) - - def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True - self.controller.SHOW_BUTTON_FORWARD = False - self.controller.SHOW_BUTTON_FINISH = True diff --git a/src/fe/gtk/Kernel.py b/src/fe/gtk/Kernel.py index db8843a..6ecdbad 100644 --- a/src/fe/gtk/Kernel.py +++ b/src/fe/gtk/Kernel.py @@ -4,149 +4,72 @@ # of which can be found in the main directory of this project. import gtk -import GLIScreen -import URIBrowser +from GLIScreen import * +from ProgressDialog import * -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): - title = "Kernel Sources" - active_selection = None - kernel_sources = {} - sources = [("gentoo-sources", "These are the vanilla sources patched with the Gentoo patchset. These are generally considered stable."), - ("vanilla-sources", "These are the kernel sources straight from kernel.org without patches (except where necessary)"), - ("hardened-sources", "These are the vanilla sources patched with the hardened patchset. This results in a more secure system. Do not use these unless you have read the hardened guide first."), - ("livecd-kernel", "This will install the LiveCD's kernel/initrd into your new system. Use this option to get your system up and running quickly. You should not tell the installer to emerge any packages that require kernel sources as they won't be present.")] + title = "Kernel" _helptext = """ -<b><u>Choosing a Kernel</u></b> +<b><u>Kernel</u></b> -The core around which all distributions are built is the Linux kernel. It is the -layer between the user programs and your system hardware. Gentoo provides its -users several possible kernel sources. A full listing with description is -available at the Gentoo Kernel Guide at -http://www.gentoo.org/doc/en/gentoo-kernel.xml. +There are 2 different methods for getting a kernel for your new install: \ +using the kernel/modules from the LiveCD that you are currently booted from \ +and building your own. Pick one. -For x86-based systems we have, amongst other kernels, vanilla-sources (the -default kernel source as developed by the linux-kernel developers), -gentoo-sources (kernel source patched with performance-enhancing features) (less -stable), - -livecd-kernel: This will copy the currently running kernel over to the new -system, just as if genkernel had created your kernel. This is generally -recommended since it is much faster than genkernel and just as good, except that -once your system is installed you will eventually need to recreate a kernel -again. - -If you're not concerned about time, select vanilla-sources or gentoo-sources if -you're feeling lucky. If you have a pre-made .config file, you can specify it in -the entry field at the bottom, and it will be used when the kernel is built. +These choices are only available in Standard and Advanced mode. """ -#For non-livecd-kernel sources, selecting Enable Bootsplash gives you a colorful -#background image in a frame buffer. - def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 0) vert.set_border_width(10) - content_str = """Here, you will select which kernel sources package you would like to use. Each option has -a brief description beside it. -""" - content_label = gtk.Label(content_str) - vert.pack_start(content_label, expand=False, fill=False, padding=0) + if self.controller.install_type == "networkless": + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>The kernel, initramfs, and modules from the LiveCD will be used</b>') + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + else: + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>How do you want to get a kernel?</b>') + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) - for source in self.sources: - parent = None - name, descr = source - if name != self.sources[0][0]: - parent = self.kernel_sources[self.sources[0][0]] - self.kernel_sources[name] = gtk.RadioButton(parent, name) - self.kernel_sources[name].set_name(name) - self.kernel_sources[name].connect("toggled", self.kernel_selected, name) - self.kernel_sources[name].set_size_request(150, -1) hbox = gtk.HBox(False, 0) - hbox.pack_start(self.kernel_sources[name], expand=False, fill=False, padding=0) - tmplabel = gtk.Label(descr) - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - -# hbox = gtk.HBox(False, 0) -# self.bootsplash_check = gtk.CheckButton("Enable bootsplash") -# self.bootsplash_check.set_size_request(150, -1) -# hbox.pack_start(self.bootsplash_check, expand=False, fill=False, padding=0) -# tmplabel = gtk.Label("This enables a colorful background image during system boot.") -# tmplabel.set_line_wrap(True) -# hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) + self.radio_livecd_kernel = gtk.RadioButton(None, "Use the kernel, initramfs, and modules from the LiveCD") + hbox.pack_start(self.radio_livecd_kernel, expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=False, padding=20) - hbox = gtk.HBox(False, 0) - hbox.pack_start(gtk.Label("Kernel config URI:"), expand=False, fill=False, padding=5) - self.kernel_config_uri = gtk.Entry() - self.kernel_config_uri.set_width_chars(50) - hbox.pack_start(self.kernel_config_uri, expand=False, fill=False, padding=10) - self.browse_uri = gtk.Button(" ... ") - self.browse_uri.connect("clicked", self.browse_uri_clicked) - hbox.pack_start(self.browse_uri, expand=False, fill=False, padding=5) - vert.pack_end(hbox, expand=False, fill=False, padding=0) + hbox = gtk.HBox(False, 0) + self.radio_build_kernel = gtk.RadioButton(self.radio_livecd_kernel, "Build your own from sources") + hbox.pack_start(self.radio_build_kernel, expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=True, padding=20) self.add_content(vert) - def browse_uri_clicked(self, widget): - uribrowser = URIBrowser.URIBrowser(self, self.kernel_config_uri) - uribrowser.run(self.kernel_config_uri.get_text()) - - def kernel_selected(self, widget, data=None): - self.active_selection = data - if data == "livecd-kernel": -# self.bootsplash_check.set_sensitive(False) - self.kernel_config_uri.set_sensitive(False) - self.browse_uri.set_sensitive(False) - else: -# self.bootsplash_check.set_sensitive(True) - self.kernel_config_uri.set_sensitive(True) - self.browse_uri.set_sensitive(True) - def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_BACK = False self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - self.active_selection = self.controller.install_profile.get_kernel_source_pkg() or "gentoo-sources" - self.kernel_sources[self.active_selection].set_active(True) -# self.bootsplash_check.set_active(self.controller.install_profile.get_kernel_bootsplash()) -# if self.controller.install_type == "networkless": - if self.controller.install_profile.get_grp_install(): - self.active_selection = "livecd-kernel" - self.kernel_sources[self.active_selection].set_active(True) -# self.bootsplash_check.set_active(False) - for kernel_source in self.kernel_sources: - if not kernel_source == "livecd-kernel": - self.kernel_sources[kernel_source].set_sensitive(False) -# self.bootsplash_check.set_sensitive(False) + if self.controller.install_type != "networkless": + kernel_pkg = self.controller.install_profile.get_kernel_source_pkg() + if not kernel_pkg or kernel_pkg == "livecd-kernel": + self.radio_livecd_kernel.set_active(True) + else: + self.radio_build_kernel.set_active(True) + + def next(self): + if self.controller.install_type == "networkless" or self.radio_livecd_kernel.get_active(): + self.controller.install_profile.set_kernel_source_pkg(None, "livecd-kernel", None) + progress = ProgressDialog(self.controller, ("emerge_kernel_sources", ), self.progress_callback) + progress.run() + else: + self.controller.load_screen("KernelSources") - def deactivate(self): - self.controller.install_profile.set_kernel_source_pkg(None, self.active_selection, None) - # For now - self.controller.install_profile.set_kernel_build_method(None, "genkernel", None) - if self.kernel_config_uri.get_text(): - self.controller.install_profile.set_kernel_config_uri(None, self.kernel_config_uri.get_text(), None) -# if self.active_selection == "livecd-kernel": - self.controller.install_profile.set_kernel_bootsplash(None, False, None) -# else: -# self.controller.install_profile.set_kernel_bootsplash(None, self.bootsplash_check.get_active(), None) -# if self.bootsplash_check.get_active() and not self.controller.install_profile.get_bootloader_kernel_args(): -# proc_cmdline = open("/proc/cmdline", "r") -# cmdline = proc_cmdline.readline().strip() -# proc_cmdline.close() -# vga = None -# splash = None -# for x in cmdline.split(" "): -# parts = x.split("=") -# if len(parts) < 2: continue -# if parts[0] == "vga": -# vga = parts[1] -# elif parts[0] == "splash": -# splash = parts[1] -# self.controller.install_profile.set_bootloader_kernel_args(None, "vga=%s splash=%s CONSOLE=/dev/tty1 quiet" % (vga, splash), None) - return True + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("Networking") + else: + GLIScreen.progress_callback(self, result, data) diff --git a/src/fe/gtk/KernelConfig.py b/src/fe/gtk/KernelConfig.py new file mode 100644 index 0000000..d0bfd9b --- /dev/null +++ b/src/fe/gtk/KernelConfig.py @@ -0,0 +1,145 @@ +# Copyright 1999-2005 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import gtk +from GLIScreen import * +import GLIUtility +import URIBrowser +from ProgressDialog import * + +class Panel(GLIScreen): + + title = "Kernel Config" + active_selection = None + radio_configs = {} + _helptext = """ +<b><u>Kernel Configuration</u></b> + +There are a few different ways you can configure your new kernel. The easiest \ +method is to just use the default configuration for your kernel. The other \ +options are to configure the kernel yourself using the kernel's menuconfig process \ +or to specify a URI pointing to a pre-made kernel .config file. + +These options are only available in Advanced mode. +""" + + def __init__(self, controller): + GLIScreen.__init__(self, controller) + vert = gtk.VBox(False, 0) + vert.set_border_width(10) + + if self.controller.install_type == "standard": + hbox = gtk.HBox(False, 0) + label = gtk.Label() + label_markup = '<b>Your kernel will be built with the default configuration.</b>' + label.set_markup(label_markup) + label.set_line_wrap(True) + hbox.pack_start(label, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=10) + else: + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Choose your kernel configuration method</b>') + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + hbox = gtk.HBox(False, 0) + self.radio_configs['auto'] = gtk.RadioButton(None, "Use default configuration") + self.radio_configs['auto'].set_name("auto") + self.radio_configs['auto'].connect("toggled", self.config_selected, "auto") + hbox.pack_start(self.radio_configs['auto'], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + hbox = gtk.HBox(False, 0) + self.radio_configs['menuconfig'] = gtk.RadioButton(self.radio_configs['auto'], "Use the kernel's menuconfig process") + self.radio_configs['menuconfig'].set_name("menuconfig") + self.radio_configs['menuconfig'].connect("toggled", self.config_selected, "menuconfig") + hbox.pack_start(self.radio_configs['menuconfig'], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=True, padding=20) + + hbox = gtk.HBox(False, 0) + self.radio_configs['configuri'] = gtk.RadioButton(self.radio_configs['auto'], "Specify a pre-made kernel .config") + self.radio_configs['configuri'].set_name("configuri") + self.radio_configs['configuri'].connect("toggled", self.config_selected, "configuri") + hbox.pack_start(self.radio_configs['configuri'], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=True, padding=20) + + hbox = gtk.HBox(False, 0) + hbox.pack_start(gtk.Label(" "), expand=False, fill=False, padding=15) + hbox.pack_start(gtk.Label("URI:"), expand=False, fill=False, padding=5) + self.entry_kernel_config_uri = gtk.Entry() + self.entry_kernel_config_uri.set_width_chars(50) + self.entry_kernel_config_uri.set_sensitive(False) + hbox.pack_start(self.entry_kernel_config_uri, expand=False, fill=False, padding=0) + self.browse_uri = gtk.Button("Browse") + self.browse_uri.connect("clicked", self.browse_uri_clicked) + self.browse_uri.set_sensitive(False) + hbox.pack_start(self.browse_uri, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=0) + + self.add_content(vert) + + def browse_uri_clicked(self, widget): + uribrowser = URIBrowser.URIBrowser(self, self.entry_kernel_config_uri) + uribrowser.run(self.entry_kernel_config_uri.get_text()) + + def config_selected(self, widget, data=None): + self.active_selection = data + if data == "configuri": + self.entry_kernel_config_uri.set_sensitive(True) + self.browse_uri.set_sensitive(True) + else: + self.entry_kernel_config_uri.set_sensitive(False) + self.browse_uri.set_sensitive(False) + + def activate(self): + self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_FORWARD = True + if self.controller.install_type != "standard": + kernel_config_uri = self.controller.install_profile.get_kernel_config_uri() + if kernel_config_uri: + if kernel_config_uri == "file://%s/usr/src/linux/.config" % self.controller.install_profile.get_root_mount_point(): + self.radio_configs['menuconfig'].set_active(True) + else: + self.entry_kernel_config_uri.set_text(kernel_config_uri) +# if self.controller.install_profile.get_kernel_source_pkg() != "gentoo-sources": +# self.radio_configs['auto'].set_sensitive(False) +# self.radio_configs['menuconfig'].set_active(True) + + def next(self): + self.controller.install_profile.set_kernel_build_method(None, "genkernel", None) + if self.controller.install_type != "standard": + if self.active_selection == "configuri": + if not self.entry_kernel_config_uri.get_text(): + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="You did not enter a kernel configuration URI. You cannot continue until you enter a kernel configuration URI or choose a different configuration method.") + msgdlg.run() + msgdlg.destroy() + return + elif not GLIUtility.validate_uri(self.entry_kernel_config_uri.get_text()): + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="The kernel configuration URI you entered does not exist or is not a valid URI. You cannot continue unless you enter a valid URI or choose another configuration method.") + msgdlg.run() + msgdlg.destroy() + return + elif self.active_selection == "menuconfig": + fo = open(self.controller.install_profile.get_root_mount_point() + "/var/tmp/menuconfig.sh", "w") + fo.write("#!/bin/bash -l\ncd /usr/src/linux\nmake menuconfig") + fo.close() + while True: + GLIUtility.spawn("xterm -e 'chroot %s /var/tmp/menuconfig.sh'" % self.controller.install_profile.get_root_mount_point()) + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="Are you finished configuring your kernel?") + resp = msgdlg.run() + msgdlg.destroy() + if resp == gtk.RESPONSE_YES: + self.controller.install_profile.set_kernel_config_uri(None, "file://%s/usr/src/linux/.config", None) + GLIUtility.spawn("rm %s/var/tmp/spawn.sh" % self.controller.install_profile.get_root_mount_point()) + break + progress = ProgressDialog(self.controller, ("build_kernel", ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("Networking") + else: + GLIScreen.progress_callback(self, result, data) diff --git a/src/fe/gtk/KernelSources.py b/src/fe/gtk/KernelSources.py new file mode 100644 index 0000000..13c4b80 --- /dev/null +++ b/src/fe/gtk/KernelSources.py @@ -0,0 +1,99 @@ +# Copyright 1999-2005 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import gtk +from GLIScreen import * +from ProgressDialog import * + +class Panel(GLIScreen): + + title = "Kernel Sources" + active_selection = None + radio_sources = {} + _helptext = """ +<b><u>Kernel Sources</u></b> + +You have a few different choices when it comes to kernel source packages. + +The most popular (and usually most stable) one is <i>gentoo-sources</i>. This \ +is the vanilla kernel source tree with the Gentoo kernel patchset applied. \ +These patches are usually non-invasive and add desired functionality. + +The other standard choice is <i>vanilla-sources</i>, which is the unmolested \ +vanilla kernel source tree as found at http://kernel.org/. + +If you are a bit more paranoid about security, you use <i>hardened-sources</i>, \ +which is similar to gentoo-sources, but it has additional functionality patched \ +in like PaX and Grsecurity. You should probably read up at \ +http://hardened.gentoo.org/ before you use these. + +These choices are only available in Advanced mode. +""" + sources = { + 'all': [ "gentoo-sources", "vanilla-sources", "hardened-sources" ], + 'ppc': [ "ppc-sources" ], + 'hppa': [ "hppa-sources" ], + 'mips': [ "mips-sources" ], + 'sparc': [ "sparc-sources" ] + } + + def __init__(self, controller): + GLIScreen.__init__(self, controller) + vert = gtk.VBox(False, 0) + vert.set_border_width(10) + + if self.controller.install_type == "standard": + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Your kernel will be built using gentoo-sources</b>') + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + else: + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Choose which kernel sources you want to use to build your kernel</b>') + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + tmpsources = self.sources['all'] + self.sources.get(self.controller.cc.get_arch(), []) + for source in tmpsources: + hbox = gtk.HBox(False, 0) + if source == tmpsources[0]: + self.radio_sources[source] = gtk.RadioButton(None, source) + else: + self.radio_sources[source] = gtk.RadioButton(self.radio_sources[tmpsources[0]], source) + self.radio_sources[source].set_name(source) + self.radio_sources[source].connect("toggled", self.sources_selected, source) + hbox.pack_start(self.radio_sources[source], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + self.add_content(vert) + + def sources_selected(self, widget, data=None): + self.active_selection = data + + def activate(self): + self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_FORWARD = True + if self.controller.install_type != "standard": + self.active_selection = self.controller.install_profile.get_kernel_source_pkg() or "gentoo-sources" + self.radio_sources[self.active_selection].set_active(True) + + def next(self): + if self.controller.install_type == "standard": + self.controller.install_profile.set_kernel_source_pkg(None, "gentoo-sources", None) + else: + self.controller.install_profile.set_kernel_source_pkg(None, self.active_selection, None) + progress = ProgressDialog(self.controller, ("emerge_kernel_sources", ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("KernelConfig") + else: + GLIScreen.progress_callback(self, result, data) + + def previous(self): + self.controller.load_screen("Kernel") diff --git a/src/fe/gtk/LocalMounts.py b/src/fe/gtk/LocalMounts.py new file mode 100644 index 0000000..34f439c --- /dev/null +++ b/src/fe/gtk/LocalMounts.py @@ -0,0 +1,238 @@ +# Copyright 1999-2005 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import gtk, gobject +from GLIScreen import * +import Widgets +import commands, string +import copy +from ProgressDialog import * + +class Panel(GLIScreen): + + title = "Local Mounts" + columns = [] + localmounts = [] + active_entry = -1 + _helptext = """ +<b><u>Local Mounts</u></b> + +Here, you can add partitions and special devices to mount during (and after) \ +the install. All mountpoints are relative to /mnt/gentoo during the install. + +To start, click the button labeled 'Add'. Enter a device name or select if from \ +the list. If you entered a device name yourself, you'll need to fill in the \ +type in the next field. Then enter the mountpoint and mount options (defaults to \ +"defaults"). Click 'Update' to save the new mount. + +To edit a mount that you've already added to the list list, select it by \ +clicking on it. Edit any of the fields below and click the 'Update' button. You \ +can remove it from the list by clicking the 'Delete' button. +""" + + def __init__(self, controller): + GLIScreen.__init__(self, controller) + vert = gtk.VBox(False, 0) + vert.set_border_width(10) + + self.treedata = gtk.ListStore(gobject.TYPE_INT, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) + self.treedatasort = gtk.TreeModelSort(self.treedata) + self.treeview = gtk.TreeView(self.treedatasort) + self.treeview.connect("cursor-changed", self.selection_changed) + self.columns.append(gtk.TreeViewColumn("Device", gtk.CellRendererText(), text=1)) + self.columns.append(gtk.TreeViewColumn("Type", gtk.CellRendererText(), text=2)) + self.columns.append(gtk.TreeViewColumn("Mount Point", gtk.CellRendererText(), text=3)) + self.columns.append(gtk.TreeViewColumn("Mount Options", gtk.CellRendererText(), text=4)) + col_num = 0 + for column in self.columns: + column.set_resizable(True) + column.set_sort_column_id(col_num) + self.treeview.append_column(column) + col_num += 1 + self.treewindow = gtk.ScrolledWindow() + self.treewindow.set_size_request(-1, 130) + self.treewindow.set_shadow_type(gtk.SHADOW_IN) + self.treewindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) + self.treewindow.add(self.treeview) + vert.pack_start(self.treewindow, expand=False, fill=False, padding=0) + + self.mount_info_box = gtk.HBox(False, 0) + mount_info_table = gtk.Table(5, 3, False) + mount_info_table.set_col_spacings(10) + mount_info_table.set_row_spacings(6) + mount_info_device_label = gtk.Label("Device:") + mount_info_device_label.set_alignment(0.0, 0.5) + mount_info_table.attach(mount_info_device_label, 0, 1, 0, 1) + self.mount_info_device = gtk.ComboBoxEntry(gtk.ListStore(gobject.TYPE_STRING)) + if not self.mount_info_device.get_text_column() == 0: + self.mount_info_device.set_text_column(0) + mount_info_table.attach(self.mount_info_device, 1, 2, 0, 1) + mount_info_type_label = gtk.Label("Type:") + mount_info_type_label.set_alignment(0.0, 0.5) + mount_info_table.attach(mount_info_type_label, 0, 1, 1, 2) + self.mount_info_type = gtk.Entry() + self.mount_info_type.set_width_chars(20) + mount_info_table.attach(self.mount_info_type, 1, 2, 1, 2) + mount_info_mountpoint_label = gtk.Label("Mount point:") + mount_info_mountpoint_label.set_alignment(0.0, 0.5) + mount_info_table.attach(mount_info_mountpoint_label, 0, 1, 2, 3) + self.mount_info_mountpoint = gtk.Entry() + self.mount_info_mountpoint.set_width_chars(30) + mount_info_table.attach(self.mount_info_mountpoint, 1, 2, 2, 3) + mount_info_mountopts_label = gtk.Label("Mount options:") + mount_info_mountopts_label.set_alignment(0.0, 0.5) + mount_info_table.attach(mount_info_mountopts_label, 0, 1, 3, 4) + self.mount_info_mountopts = gtk.Entry() + self.mount_info_mountopts.set_width_chars(30) + mount_info_table.attach(self.mount_info_mountopts, 1, 2, 3, 4) + self.mount_info_box.pack_start(mount_info_table, expand=False, fill=False) + vert.pack_start(self.mount_info_box, expand=False, fill=False, padding=10) + + mount_button_box = gtk.HBox(False, 0) + mount_button_add = gtk.Button(" _Add ") + mount_button_add.connect("clicked", self.new_mount) + mount_button_box.pack_start(mount_button_add, expand=False, fill=False, padding=10) + self.mount_button_update = gtk.Button(" _Update ") + self.mount_button_update.connect("clicked", self.update_mount) + self.mount_button_update.set_sensitive(False) + mount_button_box.pack_start(self.mount_button_update, expand=False, fill=False, padding=10) + self.mount_button_delete = gtk.Button(" _Delete ") + self.mount_button_delete.connect("clicked", self.delete_mount) + self.mount_button_delete.set_sensitive(False) + mount_button_box.pack_start(self.mount_button_delete, expand=False, fill=False, padding=10) + vert.pack_start(mount_button_box, expand=False, fill=False, padding=10) + + self.add_content(vert) + + def disable_all_fields(self): + self.mount_info_device.get_child().set_text("") + self.mount_info_device.set_model(gtk.ListStore(gobject.TYPE_STRING)) + self.mount_info_type.set_text("") + self.mount_info_mountpoint.set_text("") + self.mount_info_mountopts.set_text("") + self.mount_info_device.set_sensitive(False) + self.mount_info_type.set_sensitive(False) + self.mount_info_mountpoint.set_sensitive(False) + self.mount_info_mountopts.set_sensitive(False) + + def enable_all_fields(self): + self.mount_info_device.get_child().set_text("") + self.mount_info_device.set_model(gtk.ListStore(gobject.TYPE_STRING)) + self.mount_info_mountpoint.set_text("") + self.mount_info_mountopts.set_text("") + self.mount_info_device.set_sensitive(True) + self.mount_info_type.set_sensitive(True) + self.mount_info_mountpoint.set_sensitive(True) + self.mount_info_mountopts.set_sensitive(True) + + def refresh_list_at_top(self): +# self.treedata = gtk.ListStore(gobject.TYPE_INT, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) + self.treedata.clear() + for i, mount in enumerate(self.localmounts): + self.treedata.append([i, mount['devnode'], mount['type'], mount['mountpoint'], mount['mountopts']]) + self.treedatasort = gtk.TreeModelSort(self.treedata) + self.treeview.set_model(self.treedatasort) + self.treeview.show_all() + + def selection_changed(self, treeview, data=None): + treeselection = treeview.get_selection() + treemodel, treeiter = treeselection.get_selected() + row = treemodel.get(treeiter, 0) + self.active_entry = row[0] + mount = self.localmounts[self.active_entry] + self.enable_all_fields() +# self.mount_info_export.set_model(gtk.ListStore(gobject.TYPE_STRING)) +# self.mount_info_export.get_child().set_text(mount['export']) +# i = 0 +# for mounttype in self.mount_types: +# if mounttype == mount['type']: +# self.mount_info_type.set_active(i) +# else: +# i = i + 1 + self.mount_info_device.get_child().set_text(mount['devnode']) + self.mount_info_type.set_text(mount['type']) + self.mount_info_mountpoint.set_text(mount['mountpoint']) + self.mount_info_mountopts.set_text(mount['mountopts']) + self.mount_button_update.set_sensitive(True) + self.mount_button_delete.set_sensitive(True) + + def new_mount(self, button, data=None): + self.active_entry = -1 + self.mount_button_update.set_sensitive(True) + self.mount_button_delete.set_sensitive(False) + self.enable_all_fields() + self.mount_info_device.grab_focus() + + def update_mount(self, button): + if self.mount_info_device.get_child().get_text().strip() == "": + msgdialog = Widgets.Widgets().error_Box("Invalid Entry", "You must enter a value for the device field") + result = msgdialog.run() + if result == gtk.RESPONSE_ACCEPT: + msgdialog.destroy() + return + if self.mount_info_mountpoint.get_text().strip() == "": + msgdialog = Widgets.Widgets().error_Box("Invalid Entry", "You must enter a mountpoint") + result = msgdialog.run() + if result == gtk.RESPONSE_ACCEPT: + msgdialog.destroy() + return + if self.mount_info_type.get_text().strip() == "": + self.mount_info_type.set_text("auto") + if self.mount_info_mountopts.get_text().strip() == "": + self.mount_info_mountopts.set_text("defaults") + if self.active_entry == -1: + self.localmounts.append({ 'devnode': self.mount_info_device.get_child().get_text(), 'type': self.mount_info_type.get_text(), 'mountpoint': self.mount_info_mountpoint.get_text(), 'mountopts': self.mount_info_mountopts.get_text() }) + self.active_entry = -1 + self.mount_button_update.set_sensitive(False) + self.mount_button_delete.set_sensitive(False) + else: + self.localmounts[self.active_entry]['devnode'] = self.mount_info_device.get_child().get_text() + self.localmounts[self.active_entry]['type'] = self.mount_info_type.get_text() + self.localmounts[self.active_entry]['mountpoint'] = self.mount_info_mountpoint.get_text() + self.localmounts[self.active_entry]['mountopts'] = self.mount_info_mountopts.get_text() + self.refresh_list_at_top() + self.disable_all_fields() + + def delete_mount(self, button): + self.localmounts.pop(self.active_entry) + self.active_entry = -1 + self.mount_button_update.set_sensitive(False) + self.mount_button_delete.set_sensitive(False) + self.refresh_list_at_top() + self.disable_all_fields() + + def activate(self): + self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_FORWARD = True + self.localmounts = copy.deepcopy(self.controller.install_profile.get_mounts()) + self.refresh_list_at_top() + self.disable_all_fields() + self.mount_button_update.set_sensitive(False) + self.mount_button_delete.set_sensitive(False) + + def next(self): + for mount in self.localmounts: + if mount['mountpoint'] == "/": + break + else: + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format=_("You must specify a mount at / to continue")) + resp = msgdlg.run() + msgdlg.destroy() + return + self.controller.install_profile.set_mounts(self.localmounts) + self.controller.load_screen("NetworkMounts") + +# progress = ProgressDialog(self.controller, ("mount_local_partitions", ), self.progress_callback) +# progress.run() + +# def progress_callback(self, result, data=None): +# if result == PROGRESS_DONE: +# self.controller.load_screen("Network Mounts") +# else: +# GLIScreen.progress_callback(self, result, data) + + def previous(self): + self.controller.install_profile.set_mounts(self.localmounts) + self.controller.load_screen("Partition") diff --git a/src/fe/gtk/Logger.py b/src/fe/gtk/Logger.py new file mode 100644 index 0000000..74934ee --- /dev/null +++ b/src/fe/gtk/Logger.py @@ -0,0 +1,78 @@ +# Copyright 1999-2005 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import gtk +from GLIScreen import * +from ProgressDialog import * + +class Panel(GLIScreen): + + title = "Logging Daemon" + active_selection = None + radio_loggers = {} + _helptext = """ +<b><u>Logging Daemon</u></b> + +Pick a logging daemon. The most common choice is syslog-ng. This option is not \ +available in Networkless mode. +""" + loggers = [ "syslog-ng", "metalog", "sysklogd" ] + + def __init__(self, controller): + GLIScreen.__init__(self, controller) + vert = gtk.VBox(False, 0) + vert.set_border_width(10) + + if self.controller.install_type == "networkless": + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Your logger will be %s</b>' % self.loggers[0]) + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + else: + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Choose your logger</b>') + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + for logger in self.loggers: + hbox = gtk.HBox(False, 0) + if logger == self.loggers[0]: + self.radio_loggers[logger] = gtk.RadioButton(None, logger) + else: + self.radio_loggers[logger] = gtk.RadioButton(self.radio_loggers[self.loggers[0]], logger) + self.radio_loggers[logger].set_name(logger) + self.radio_loggers[logger].connect("toggled", self.logger_selected, logger) + hbox.pack_start(self.radio_loggers[logger], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + self.add_content(vert) + self.boot_devices = None + + def logger_selected(self, widget, data=None): + self.active_selection = data + + def activate(self): + self.controller.SHOW_BUTTON_BACK = False + self.controller.SHOW_BUTTON_FORWARD = True + if self.controller.install_type != "networkless": + self.active_selection = self.controller.install_profile.get_logging_daemon_pkg() or self.loggers[0] + self.radio_loggers[self.active_selection].set_active(True) + + def next(self): + if self.controller.install_type == "networkless": + self.controller.install_profile.set_logging_daemon_pkg(None, self.loggers[0], None) + else: + self.controller.install_profile.set_logging_daemon_pkg(None, self.active_selection, None) + self.controller.load_screen("CronDaemon") +# progress = ProgressDialog(self.controller, ("install_logger", ), self.progress_callback) +# progress.run() + +# def progress_callback(self, result, data=None): +# if result == PROGRESS_DONE: +# self.controller.load_screen("Timezone") +# else: +# GLIScreen.progress_callback(self, result, data) diff --git a/src/fe/gtk/MakeDotConf.py b/src/fe/gtk/MakeDotConf.py index baa7d0a..e41dd63 100644 --- a/src/fe/gtk/MakeDotConf.py +++ b/src/fe/gtk/MakeDotConf.py @@ -4,18 +4,21 @@ # of which can be found in the main directory of this project. import gtk -import GLIScreen +from GLIScreen import * import commands import gobject import GLIUtility -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): title = "make.conf" make_conf_values = {} use_flags = [] use_desc = {} + use_local_desc = {} columns = [] + columns_local = [] + profile_use = [] arch_procs = { 'alpha': ("ev4", "ev5", "ev56", "pca56", "ev6", "ev67"), 'amd64': ("athlon64", "opteron", "athlon-fx", "k8", "nocona"), 'ppc': ("G3", "G4", "G5", "power", "common", "powerpc"), @@ -25,89 +28,82 @@ class Panel(GLIScreen.GLIScreen): _helptext = """ <b><u>Make.conf</u></b> -One of the unique (and best) features of Gentoo is the ability to define flags -(called USE flags) that determine what components are compiled into -applications. For example, you can enable the "alsa" flag and programs that -have alsa capability will compile in support for alsa. Otherwise they will -leave it out, resulting in smaller, faster applications. The result is a -finely-tuned OS with no unnecessary components to slow you down. +One of the unique (and best) features of Gentoo is the ability to define flags \ +(called USE flags) that determine what components are compiled into \ +applications. For example, you can enable the "alsa" flag and programs that \ +have alsa capability will compile in support for alsa. Otherwise they will \ +leave it out, resulting in smaller, faster applications. The result is a \ +finely-tuned OS with no unnecessary components to slow you down. \ -There are two types of USE flags, local (for only one application), and global -(for all apps). The local use flags will tell you which package they refer to -in the Description. Note that the names of the USE flags can sometimes be -misleading since they often refer to only one package. +There are two types of USE flags, local (for only one application), and global \ +(for all apps). The local use flags will tell you which package they refer to \ +in the Description. Note that the names of the USE flags can sometimes be \ +misleading since they often refer to only one package. \ CFLAGS: -The CFLAGS variable defines the optimization flags for the gcc C and C++ -compilers. Although we define those generally here, you will only have maximum -performance if you optimize these flags for each program separately. The reason +The CFLAGS variable defines the optimization flags for the gcc C and C++ \ +compilers. Although we define those generally here, you will only have maximum \ +performance if you optimize these flags for each program separately. The reason \ for this is because every program is different. -A first setting is the processor, which specifies the name of the target +A first setting is the processor, which specifies the name of the target \ architecture. Select your Proc from the list. -A second one is the -O flag (that is a capital O, not a zero), which specifies -the gcc optimization class flag. Possible classes are s (for size-optimized), -0 (zero - for no optimizations), 1, 2 or 3 for more speed-optimization flags -(every class has the same flags as the one before, plus some extras). 2 is a +A second one is the -O flag (that is a capital O, not a zero), which specifies \ +the gcc optimization class flag. Possible classes are s (for size-optimized), \ +0 (zero - for no optimizations), 1, 2 or 3 for more speed-optimization flags \ +(every class has the same flags as the one before, plus some extras). 2 is a \ safe level of optimization. You can add additional custom CFLAGS with the textbox. -Another popular optimization flag is -pipe (use pipes rather than temporary +Another popular optimization flag is -pipe (use pipes rather than temporary \ files for communication between the various stages of compilation). -Mind you that using -fomit-frame-pointer (which doesn't keep the frame pointer -in a register for functions that don't need one) might have serious +Mind you that using -fomit-frame-pointer (which doesn't keep the frame pointer \ +in a register for functions that don't need one) might have serious \ repercussions on the debugging of applications! Other: -Select Use unstable only if you are an expert Gentoo user or want to use -bleeding edge unstable applications. This is highly NOT recommended because it -will often result in failed installations due to compilation errors in unstable +Select Use unstable only if you are an expert Gentoo user or want to use \ +bleeding edge unstable applications. This is highly NOT recommended because it \ +will often result in failed installations due to compilation errors in unstable \ applications. -Select Build binary packages if you plan on using the compiled packages +Select Build binary packages if you plan on using the compiled packages \ elsewhere (very rarely needed). -DistCC functionality has not yet been implemented with the GTK+ frontend. If +DistCC functionality has not yet been implemented with the GTK+ frontend. If \ you need this, use gli-dialog, the command-line frontend to GLI. Select ccache to enable ccache support via CC. -The CHOST variable declares the target build host for your system. This variable -should already be set to the correct value. Do not edit it as that might break -your system. If the CHOST variable does not look correct to you, you might be +The CHOST variable declares the target build host for your system. This variable \ +should already be set to the correct value. Do not edit it as that might break \ +your system. If the CHOST variable does not look correct to you, you might be \ using the wrong stage3 tarball. -With MAKEOPTS you define how many parallel compilations should occur when you -install a package. A good choice is the number of CPUs in your system plus one, -but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is -"-jN" where N is the number of parallel compilations (for example: -j2). +With MAKEOPTS you define how many parallel compilations should occur when you \ +install a package. A good choice is the number of CPUs in your system plus one, \ +but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is \ +"-jN" where N is the number of parallel compilations (for example: -j2). """ def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) - self.system_use_flags = commands.getoutput("portageq envvar USE").strip() - self.system_cflags = commands.getoutput("portageq envvar CFLAGS").strip() - self.system_chost = commands.getoutput("portageq envvar CHOST").strip() - self.system_makeopts = commands.getoutput("portageq envvar MAKEOPTS").strip() - self.system_features = commands.getoutput("portageq envvar FEATURES").strip() - self.system_accept_keywords = commands.getoutput("portageq envvar ACCEPT_KEYWORDS").strip() + self.portage_info = {} + for line in GLIUtility.spawn(r"emerge --info 2>/dev/null | grep '^[A-Z0-9_]\+=' | sed -e 's:\" \([A-Z]\):\"\n\1:g'", chroot=self.controller.install_profile.get_root_mount_point(), return_output=True)[1].strip().split("\n"): + parts = line.split("=", 1) + if len(parts) > 1: + self.portage_info[parts[0]] = parts[1].strip("'\"") vert = gtk.VBox(False, 0) vert.set_border_width(10) - content_str = """On this screen, you'll define all of your /etc/make.conf settings. -""" - - content_label = gtk.Label(content_str) - vert.pack_start(content_label, expand=False, fill=False, padding=0) - - f = open("/usr/portage/profiles/use.desc", "r") + f = open(self.controller.install_profile.get_root_mount_point() + "/usr/portage/profiles/use.desc", "r") for line in f: line = line.strip() if not line or line.startswith("#"): continue @@ -118,7 +114,7 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is self.use_desc[flagname] = desc f.close() - f = open("/usr/portage/profiles/use.local.desc", "r") + f = open(self.controller.install_profile.get_root_mount_point() + "/usr/portage/profiles/use.local.desc", "r") for line in f: line = line.strip() if not line or line.startswith("#"): continue @@ -127,8 +123,8 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is colon_pos = line.find(":", 0, dash_pos) pkg = line[:colon_pos] flagname = line[colon_pos+1:dash_pos] or line[colon_pos+1] - desc = "(" + pkg + ") " + line[dash_pos+3:] - self.use_desc[flagname] = desc + desc = line[dash_pos+3:] + self.use_local_desc[flagname] = (pkg, desc) f.close() hbox = gtk.HBox(False, 0) @@ -137,15 +133,17 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is hbox.pack_start(label, expand=False, fill=False, padding=0) vert.pack_start(hbox, expand=False, fill=False, padding=5) - sorted_use = self.use_desc.keys() - sorted_use.sort() + self.use_notebook = gtk.Notebook() + +# sorted_use = self.use_desc.keys() +# sorted_use.sort() self.treedata = gtk.ListStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING) - for flag in sorted_use: - self.treedata.append([(flag in self.use_flags and self.use_flags[flag] == 1), flag, self.use_desc[flag]]) +# for flag in sorted_use: +# self.treedata.append([(flag in self.use_flags and self.use_flags[flag] == 1), flag, self.use_desc[flag]]) self.treeview = gtk.TreeView(self.treedata) self.toggle_renderer = gtk.CellRendererToggle() self.toggle_renderer.set_property("activatable", True) - self.toggle_renderer.connect("toggled", self.flag_toggled) + self.toggle_renderer.connect("toggled", self.flag_toggled, self.treeview) self.columns.append(gtk.TreeViewColumn("Active", self.toggle_renderer, active=0)) self.columns.append(gtk.TreeViewColumn("Flag", gtk.CellRendererText(), text=1)) self.columns.append(gtk.TreeViewColumn("Description", gtk.CellRendererText(), text=2)) @@ -157,7 +155,32 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is self.treewindow.set_shadow_type(gtk.SHADOW_IN) self.treewindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.treewindow.add(self.treeview) - vert.pack_start(self.treewindow, expand=False, fill=False, padding=10) + self.use_notebook.append_page(self.treewindow, tab_label=gtk.Label("Global")) + +# sorted_use = self.use_local_desc.keys() +# sorted_use.sort() + self.treedata_local = gtk.ListStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) +# for flag in sorted_use: +# self.treedata_local.append([(flag in self.use_flags and self.use_flags[flag] == 1), flag, self.use_local_desc[flag][0], self.use_local_desc[flag][1]]) + self.treeview_local = gtk.TreeView(self.treedata_local) + self.toggle_renderer_local = gtk.CellRendererToggle() + self.toggle_renderer_local.set_property("activatable", True) + self.toggle_renderer_local.connect("toggled", self.flag_toggled, self.treeview_local) + self.columns_local.append(gtk.TreeViewColumn("Active", self.toggle_renderer, active=0)) + self.columns_local.append(gtk.TreeViewColumn("Flag", gtk.CellRendererText(), text=1)) + self.columns_local.append(gtk.TreeViewColumn("Package", gtk.CellRendererText(), text=2)) + self.columns_local.append(gtk.TreeViewColumn("Description", gtk.CellRendererText(), text=3)) + for column in self.columns_local: + column.set_resizable(True) + self.treeview_local.append_column(column) + self.treewindow_local = gtk.ScrolledWindow() + self.treewindow_local.set_size_request(-1, 180) + self.treewindow_local.set_shadow_type(gtk.SHADOW_IN) + self.treewindow_local.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) + self.treewindow_local.add(self.treeview_local) + self.use_notebook.append_page(self.treewindow_local, tab_label=gtk.Label("Local")) + + vert.pack_start(self.use_notebook, expand=False, fill=False, padding=10) hbox = gtk.HBox(False, 0) label = gtk.Label() @@ -168,7 +191,7 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is hbox = gtk.HBox(False, 0) hbox.pack_start(gtk.Label("Proc:"), expand=False, fill=False, padding=0) self.proc_combo = gtk.combo_box_new_text() -# for proc in self.arch_procs[self.controller.client_profile.get_architecture_template()]: +# for proc in self.arch_procs[self.controller.cc.get_arch()]: # self.proc_combo.append_text(proc) # self.proc_combo.set_active(0) hbox.pack_start(self.proc_combo, expand=False, fill=False, padding=10) @@ -178,6 +201,8 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is self.optimizations_combo.append_text(opt) self.optimizations_combo.set_active(0) hbox.pack_start(self.optimizations_combo, expand=False, fill=False, padding=10) + vert.pack_start(hbox, expand=False, fill=False, padding=5) + hbox = gtk.HBox(False, 0) hbox.pack_start(gtk.Label("Custom:"), expand=False, fill=False, padding=0) self.custom_cflags_entry = gtk.Entry() self.custom_cflags_entry.set_width_chars(25) @@ -196,30 +221,26 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is hbox.pack_start(self.unstable_packages_check, expand=False, fill=False, padding=0) self.build_binary_check = gtk.CheckButton("Build binary packages") hbox.pack_start(self.build_binary_check, expand=False, fill=False, padding=20) - self.use_distcc_check = gtk.CheckButton("DistCC") - hbox.pack_start(self.use_distcc_check, expand=False, fill=False, padding=0) - self.use_ccache_check = gtk.CheckButton("ccache") - hbox.pack_start(self.use_ccache_check, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=5) - - hbox = gtk.HBox(False, 0) - hbox.pack_start(gtk.Label("CHOST:"), expand=False, fill=False, padding=0) - self.chost_combo = gtk.combo_box_new_text() -# for chost in GLIUtility.get_chosts(self.controller.client_profile.get_architecture_template()): -# self.chost_combo.append_text(chost) -# self.chost_combo.set_active(0) - hbox.pack_start(self.chost_combo, expand=False, fill=False, padding=10) - hbox.pack_start(gtk.Label(" "), expand=False, fill=False, padding=15) hbox.pack_start(gtk.Label("MAKEOPTS:"), expand=False, fill=False, padding=0) self.makeopts_entry = gtk.Entry() self.makeopts_entry.set_width_chars(7) hbox.pack_start(self.makeopts_entry, expand=False, fill=False, padding=10) vert.pack_start(hbox, expand=False, fill=False, padding=5) + hbox = gtk.HBox(False, 0) + self.use_distcc_check = gtk.CheckButton("DistCC") + hbox.pack_start(self.use_distcc_check, expand=False, fill=False, padding=0) + hbox.pack_start(gtk.Label(" "), expand=False, fill=False, padding=15) + hbox.pack_start(gtk.Label("Hosts:"), expand=False, fill=False, padding=10) + self.entry_distcc_hosts = gtk.Entry() + self.entry_distcc_hosts.set_width_chars(40) + hbox.pack_start(self.entry_distcc_hosts, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=5) + self.add_content(vert) - def flag_toggled(self, cell, path): - model = self.treeview.get_model() + def flag_toggled(self, cell, path, treeview): + model = treeview.get_model() model[path][0] = not model[path][0] flag = model[path][1] if model[path][0]: @@ -227,39 +248,40 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is else: if flag in self.use_flags: self.use_flags[flag] = 0 - return def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_BACK = False self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False self.etc_files = self.controller.install_profile.get_etc_files() if not "make.conf" in self.etc_files: self.etc_files['make.conf'] = {} self.make_conf_values = self.etc_files['make.conf'] # Parsing USE self.use_flags = {} - if not self.make_conf_values.has_key('USE') or not self.make_conf_values['USE']: - self.make_conf_values['USE'] = self.system_use_flags - for flag in self.make_conf_values['USE'].split(" "): + self.profile_use = self.portage_info.get("USE", "").split(" ") +# if not self.make_conf_values.has_key('USE') or not self.make_conf_values['USE']: +# self.make_conf_values['USE'] = self.portage_info.get("USE", "") + combined_use = self.profile_use + self.make_conf_values.get("USE", "").split(" ") + for flag in combined_use: if flag.startswith("-"): flag = flag[1:] self.use_flags[flag] = 0 else: self.use_flags[flag] = 1 + sorted_use = self.use_desc.keys() sorted_use.sort() - self.treedata = gtk.ListStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING) for flag in sorted_use: - if flag in self.use_flags and self.use_flags[flag] == 1: - self.treedata.append([True, flag, self.use_desc[flag]]) - else: - self.treedata.append([False, flag, self.use_desc[flag]]) - self.treeview.set_model(self.treedata) + self.treedata.append([(flag in self.use_flags and self.use_flags[flag] == 1), flag, self.use_desc[flag]]) + + sorted_use = self.use_local_desc.keys() + sorted_use.sort() + for flag in sorted_use: + self.treedata_local.append([(flag in self.use_flags and self.use_flags[flag] == 1), flag, self.use_local_desc[flag][0], self.use_local_desc[flag][1]]) + if self.controller.install_profile.get_grp_install(): self.treeview.set_sensitive(False) + self.treeview_local.set_sensitive(False) self.unstable_packages_check.set_sensitive(False) self.unstable_packages_check.set_active(False) else: @@ -267,7 +289,7 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is self.unstable_packages_check.set_sensitive(True) # Parsing CFLAGS if not self.make_conf_values.has_key('CFLAGS') or not self.make_conf_values['CFLAGS']: - self.make_conf_values['CFLAGS'] = self.system_cflags + self.make_conf_values['CFLAGS'] = self.portage_info.get("CFLAGS", "") custom_cflags = "" arch = "" for flag in self.make_conf_values['CFLAGS'].split(" "): @@ -284,7 +306,7 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is else: custom_cflags = custom_cflags + " " + flag self.proc_combo.get_model().clear() - for i, proc in enumerate(self.arch_procs[self.controller.client_profile.get_architecture_template()]): + for i, proc in enumerate(self.arch_procs[self.controller.cc.get_arch()]): self.proc_combo.append_text(proc) if proc == arch: self.proc_combo.set_active(i) @@ -293,55 +315,44 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is self.custom_cflags_entry.set_text(custom_cflags.strip()) # Parsing ACCEPT_KEYWORDS if not self.make_conf_values.has_key('ACCEPT_KEYWORDS') or not self.make_conf_values['ACCEPT_KEYWORDS']: - self.make_conf_values['ACCEPT_KEYWORDS'] = self.system_accept_keywords - if self.make_conf_values['ACCEPT_KEYWORDS'][0] == "~": + self.make_conf_values['ACCEPT_KEYWORDS'] = self.portage_info.get("ACCEPT_KEYWORDS", "") + if self.make_conf_values['ACCEPT_KEYWORDS'] and self.make_conf_values['ACCEPT_KEYWORDS'][0] == "~": self.unstable_packages_check.set_active(True) else: self.unstable_packages_check.set_active(False) # Parsing FEATURES if not self.make_conf_values.has_key('FEATURES') or not self.make_conf_values['FEATURES']: - self.make_conf_values['FEATURES'] = self.system_features + self.make_conf_values['FEATURES'] = self.portage_info.get("FEATURES", "") self.use_distcc_check.set_active(False) - self.use_ccache_check.set_active(False) self.build_binary_check.set_active(False) for feature in self.make_conf_values['FEATURES'].split(" "): feature = feature.strip() if feature == "distcc": self.use_distcc_check.set_active(True) - elif feature == "ccache": - self.use_ccache_check.set_active(True) + self.entry_distcc_hosts.set_text(self.make_conf_values.get("DISTCC_HOSTS", "")) elif feature == "buildpkg": self.build_binary_check.set_active(True) - # Parsing CHOST - if not self.make_conf_values.has_key('CHOST') or not self.make_conf_values['CHOST']: - self.make_conf_values['CHOST'] = self.system_chost - self.chost_combo.get_model().clear() - for i, chost in enumerate(GLIUtility.get_chosts(self.controller.client_profile.get_architecture_template())): - self.chost_combo.append_text(chost) - if chost == self.make_conf_values['CHOST'] or i == 0: - self.chost_combo.set_active(i) - if self.controller.install_profile.get_install_stage() > 1: - self.chost_combo.set_sensitive(False) - else: - self.chost_combo.set_sensitive(True) # Parsing MAKEOPTS if not self.make_conf_values.has_key('MAKEOPTS') or not self.make_conf_values['MAKEOPTS']: - self.make_conf_values['MAKEOPTS'] = self.system_makeopts + self.make_conf_values['MAKEOPTS'] = self.portage_info.get("MAKEOPTS", "") self.makeopts_entry.set_text(self.make_conf_values['MAKEOPTS']) - def deactivate(self): + def next(self): temp_use = "" sorted_use = self.use_flags.keys() sorted_use.sort() for flag in sorted_use: - if self.use_flags[flag]: - temp_use += " " + flag - else: - temp_use += " -" + flag + if flag in self.use_flags: + if self.use_flags[flag] == 1: + if not flag in self.profile_use: + temp_use += " " + flag + else: + if flag in self.profile_use: + temp_use += " -" + flag self.make_conf_values['USE'] = temp_use - self.make_conf_values['CFLAGS'] = "-march=" + self.arch_procs[self.controller.client_profile.get_architecture_template()][self.proc_combo.get_active()] + " " + self.optimizations[self.optimizations_combo.get_active()] + " " + self.custom_cflags_entry.get_text() + self.make_conf_values['CFLAGS'] = "-march=" + self.arch_procs[self.controller.cc.get_arch()][self.proc_combo.get_active()] + " " + self.optimizations[self.optimizations_combo.get_active()] + " " + self.custom_cflags_entry.get_text() if self.unstable_packages_check.get_active(): - self.make_conf_values['ACCEPT_KEYWORDS'] = "~" + self.controller.client_profile.get_architecture_template() + self.make_conf_values['ACCEPT_KEYWORDS'] = "~" + self.controller.cc.get_arch() else: self.make_conf_values['ACCEPT_KEYWORDS'] = "" temp_features = "" @@ -349,15 +360,18 @@ but this guideline isn't always perfect. The syntax for the MAKEOPTS varaible is temp_features += "buildpkg " if self.use_distcc_check.get_active(): temp_features += "distcc " - if self.use_ccache_check.get_active(): - temp_features += "ccache " + self.make_conf_values['DISTCC_HOSTS'] = self.entry_distcc_hosts.get_text() self.make_conf_values['FEATURES'] = temp_features.strip() - if self.controller.install_profile.get_install_stage() > 1: - if 'CHOST' in self.make_conf_values: - del self.make_conf_values['CHOST'] - else: - self.make_conf_values['CHOST'] = GLIUtility.get_chosts(self.controller.client_profile.get_architecture_template())[self.chost_combo.get_active()] self.make_conf_values['MAKEOPTS'] = self.makeopts_entry.get_text() self.etc_files['make.conf'] = self.make_conf_values self.controller.install_profile.set_etc_files(self.etc_files) - return True + + progress = ProgressDialog(self.controller, ("configure_make_conf", ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("RootPass") + else: + GLIScreen.progress_callback(self, result, data) + diff --git a/src/fe/gtk/NetworkMounts.py b/src/fe/gtk/NetworkMounts.py index ead3bce..1875dba 100644 --- a/src/fe/gtk/NetworkMounts.py +++ b/src/fe/gtk/NetworkMounts.py @@ -4,13 +4,14 @@ # of which can be found in the main directory of this project. import gtk, gobject -import GLIScreen +from GLIScreen import * import GLIUtility import Widgets import commands, string import copy +from ProgressDialog import * -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): title = "Network Mounts" columns = [] @@ -20,26 +21,26 @@ class Panel(GLIScreen.GLIScreen): _helptext = """ <b><u>Network Mounts</u></b> -Here, you can specify network shares to mount during (and after) the install. -They will be mounted along with the local partitions you specified on the -previous screen when the install starts. This is useful for using a NFS mounted +Here, you can specify network shares to mount during (and after) the install. \ +They will be mounted along with the local partitions you specified on the \ +previous screen when the install starts. This is useful for using a NFS mounted \ /usr/portage. -To start, click the button labeled 'New'. Then, select a mount type. Currently, -the only supported type is NFS. If you get this choice wrong, you shall be -shunned. Next, enter a hostname or IP address. Then, you can either enter the -name of the share/export or click the button next to the field to have it -auto-populated with the available shares on the host you entered in the box -above. Enter a local mountpoint and mount options. Click the button labeled +To start, click the button labeled 'New'. Then, select a mount type. Currently, \ +the only supported type is NFS. If you get this choice wrong, you shall be \ +shunned. Next, enter a hostname or IP address. Then, you can either enter the \ +name of the share/export or click the button next to the field to have it \ +auto-populated with the available shares on the host you entered in the box \ +above. Enter a local mountpoint and mount options. Click the button labeled \ 'Update' to save the new network mount. -To edit an existing mount, select it in the list above. Edit any fields below -and then click the 'Update' button. You can remove it from the list by clicking +To edit an existing mount, select it in the list above. Edit any fields below \ +and then click the 'Update' button. You can remove it from the list by clicking \ the 'Delete' button. """ def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 0) vert.set_border_width(10) @@ -270,11 +271,8 @@ only NFS is supported. msgdialog.destroy() def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True self.controller.SHOW_BUTTON_BACK = True self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False self.netmounts = copy.deepcopy(self.controller.install_profile.get_network_mounts()) self.refresh_list_at_top() self.disable_all_fields() @@ -282,6 +280,16 @@ only NFS is supported. self.mount_button_delete.set_sensitive(False) self.mount_button_populate.set_sensitive(False) - def deactivate(self): + def previous(self): + self.controller.load_screen("LocalMounts") + + def next(self): self.controller.install_profile.set_network_mounts(self.netmounts) - return True + progress = ProgressDialog(self.controller, ("mount_local_partitions", "mount_network_shares", ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("Stage") + else: + GLIScreen.progress_callback(self, result, data) diff --git a/src/fe/gtk/Networking.py b/src/fe/gtk/Networking.py index a5e776c..eff3826 100644 --- a/src/fe/gtk/Networking.py +++ b/src/fe/gtk/Networking.py @@ -6,14 +6,14 @@ import gtk,gobject import os import re -import GLIScreen +from GLIScreen import * import GLIUtility import commands, string import copy #import subprocess from Widgets import Widgets -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): """ The Networking section of the installer. @@ -25,24 +25,21 @@ class Panel(GLIScreen.GLIScreen): _helptext = """ <b><u>Networking</u></b> -If you previously set up a network interface in the Pre-install Configuration -screen, it should show up configured again in the Device list. - -All detected interfaces should show up in the list, but you also have the option -to type in your own interface. Once you select an interface, select DHCP or -Static Configuration. Then once you have set your network settings make sure to +All detected interfaces should show up in the list, but you also have the option \ +to type in your own interface. Once you select an interface, select DHCP or \ +Static Configuration. Then once you have set your network settings make sure to \ click Save to add the interface to the list. -Wireless support currently is unavailable, but coming soon! We even have the +Wireless support currently is unavailable, but coming soon! We even have the \ boxes for it all ready to go. -Don't forget to set a hostname and domain name in the +Don't forget to set a hostname and domain name in the \ "Hostname / Proxy Information / Other" tab! """ # Operations def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 0) vert.set_border_width(10) @@ -551,7 +548,7 @@ Don't forget to set a hostname and domain name in the while(iter != None): dev = store.get_value(iter, 1) - print dev + " " + device +# print dev + " " + device #print model.get_path(iter) #temp_row_ref = gtk.TreeRowReference(model, model.get_path(iter)) #if selected_row.get_path() == temp_row_ref.get_path(): @@ -645,7 +642,8 @@ Don't forget to set a hostname and domain name in the info = info[0] except: - print "Error" +# print "Error" + pass return info def get_information(self): @@ -726,14 +724,14 @@ Don't forget to set a hostname and domain name in the interfaces = self.controller.install_profile.get_network_interfaces() # Preload networking info from CC...stolen from gli-dialog - CC_iface = self.controller.client_profile.get_network_interface() - if CC_iface and (CC_iface not in interfaces): - #The CC has a network config that's not already there. Preload it. - CC_net_type = self.controller.client_profile.get_network_type() - if CC_net_type == 'dhcp': - interfaces[CC_iface] = ('dhcp', self.controller.client_profile.get_network_dhcp_options(), None) - elif CC_net_type == 'static': - interfaces[CC_iface] = (self.controller.client_profile.get_network_ip(), self.controller.client_profile.get_network_broadcast(), self.controller.client_profile.get_network_netmask()) +# CC_iface = self.controller.client_profile.get_network_interface() +# if CC_iface and (CC_iface not in interfaces): +# #The CC has a network config that's not already there. Preload it. +# CC_net_type = self.controller.client_profile.get_network_type() +# if CC_net_type == 'dhcp': +# interfaces[CC_iface] = ('dhcp', self.controller.client_profile.get_network_dhcp_options(), None) +# elif CC_net_type == 'static': +# interfaces[CC_iface] = (self.controller.client_profile.get_network_ip(), self.controller.client_profile.get_network_broadcast(), self.controller.client_profile.get_network_netmask()) try: dev, gatewayip = self.controller.install_profile.get_default_gateway() @@ -763,13 +761,10 @@ Don't forget to set a hostname and domain name in the self.widgets["hostname"].set_text(self.controller.install_profile.get_hostname()) self.widgets["domainname"].set_text(self.controller.install_profile.get_domainname()) - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_BACK = False self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - def deactivate(self): + def next(self): return_value = False # save everything to profile @@ -784,7 +779,7 @@ Don't forget to set a hostname and domain name in the if ip != "dhcp": interfaces[device] = (ip, broadcast, netmask) else: - print options +# print options interfaces[device]=(ip, options, None) if gateway != "": @@ -796,7 +791,7 @@ Don't forget to set a hostname and domain name in the msgdialog=Widgets().error_Box("Malformed IP","Malformed IP address in your gateway!") result = msgdialog.run() msgdialog.destroy() - return False + return iter = store.iter_next(iter) @@ -806,7 +801,7 @@ Don't forget to set a hostname and domain name in the resp = msgdlg.run() msgdlg.destroy() if resp == gtk.RESPONSE_NO: - return False + return # store the stuff try: @@ -815,7 +810,7 @@ Don't forget to set a hostname and domain name in the msgdialog=Widgets().error_Box("Malformed IP","Malformed IP address in one of your interfaces!") result = msgdialog.run() msgdialog.destroy() - return False + return # store dnsdomainname and hostname hostname = self.widgets["hostname"].get_text() @@ -823,13 +818,17 @@ Don't forget to set a hostname and domain name in the if( hostname != "" and domainname != ""): self.controller.install_profile.set_hostname(None, hostname, None) self.controller.install_profile.set_domainname(None, domainname, None) - return_value = True elif( self.first_run == True): msgdialog=Widgets().error_Box("Missing information","You didn't set your hostname and/or dnsdomainname!") result = msgdialog.run() msgdialog.destroy() - return_value = False + return + progress = ProgressDialog(self.controller, ("setup_network_post", ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("Logger") else: - return_value = True - - return return_value + GLIScreen.progress_callback(self, result, data) + diff --git a/src/fe/gtk/OtherSettings.py b/src/fe/gtk/OtherSettings.py index 5848cdd..6b2c68b 100644 --- a/src/fe/gtk/OtherSettings.py +++ b/src/fe/gtk/OtherSettings.py @@ -5,11 +5,11 @@ import gtk import os -import GLIScreen +from GLIScreen import * import GLIUtility from Widgets import Widgets -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): """ Other settings for an install. @@ -22,7 +22,7 @@ class Panel(GLIScreen.GLIScreen): <b><u>Other Settings</u></b> Display Manager: -If you installed gnome, choose gdm. If you installed kde, choose kdm. If you +If you installed gnome, choose gdm. If you installed kde, choose kdm. If you \ installed anything else specified in XSession, choose xdm. Console Font: @@ -32,18 +32,18 @@ Extended Keymaps: You probably don't want to mess with this. Windowkeys: -If installing on x86 you are safe with Yes, otherwise you'll probably want to +If installing on x86 you are safe with Yes, otherwise you'll probably want to \ say No. Keymap: -This defaults to "us" if not set (recommended). If you don't want an English +This defaults to "us" if not set (recommended). If you don't want an English \ keymap, choose it from the list. XSession: Choose this only if you didn't choose gdm or kdm from the Display Manager list. Clock: -If you chose a local timezone, you'll want to choose "local" for the clock +If you chose a local timezone, you'll want to choose "local" for the clock \ setting. Otherwise if you chose UTC in the Timezone screen, choose UTC here. Default Editor: @@ -52,7 +52,7 @@ Pick one. Nano is the default and recommended. # Operations def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 10) # This box is content so it should fill space to force title to top horiz = gtk.HBox(False, 0) @@ -188,15 +188,10 @@ Pick one. Nano is the default and recommended. self.xsession.SetValue(etc_files['rc.conf']['XSESSION']) - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True self.controller.SHOW_BUTTON_BACK = True self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - - def deactivate(self): - value = True + def next(self): etc_files = self.controller.install_profile.get_etc_files() etc_files = self.create_etc_files(etc_files) @@ -223,7 +218,16 @@ Pick one. Nano is the default and recommended. msgbox.run() msgbox.destroy() - return value + progress = ProgressDialog(self.controller, ("update_config_files", 'finishing_cleanup' ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("InstallDone") + else: + GLIScreen.progress_callback(self, result, data) + + class Option: diff --git a/src/fe/gtk/PartProperties.py b/src/fe/gtk/PartProperties.py index eb2832d..98d265e 100755 --- a/src/fe/gtk/PartProperties.py +++ b/src/fe/gtk/PartProperties.py @@ -3,83 +3,57 @@ # General Public License as published by the Free Software Foundation, a copy # of which can be found in the main directory of this project. -import gtk +import gtk, pango import PartitionButton from gettext import gettext as _ -# keep these in sync with GLIStorageDevice! -# these are here so that we can change them easily in future -# the values were chosen to represent perfect floating point representations -FREE_MINOR_FRAC_PRI = 1.0/32.0 -FREE_MINOR_FRAC_LOG = 1.0/8.0 - class PartProperties(gtk.Window): - def __init__(self, controller, device, minor, cur_size, min_size, max_size, fstype, bytes_in_sector=512, format=True): + def __init__(self, controller, partition): gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) self.controller = controller - self.device = device - self.minor = minor - self.min_size = min_size - self.max_size = max_size - self.cur_size = cur_size - self.fstype = fstype - self.bytes_in_sector = bytes_in_sector - self.format = format + self.device = partition['device'].get_device() + self.part = partition + self.idx = self.part['device'].get_partition_idx_from_start_end(partition['start'], partition['end']) + self.minor = self.part['minor'] + self.min_size = self.part['min_size'] + self.max_size = self.part['max_size'] + self.cur_size = self.part['mb'] + self.fstype = self.part['type'] if self.min_size == -1 or self.max_size == -1: self.min_size = self.cur_size self.max_size = self.cur_size - self.sync_slider_to_text = True self.supported_filesystems = self.controller.devices[self.device].get_supported_filesystems() self.connect("delete_event", self.delete_event) self.connect("destroy", self.destroy_event) - self.set_default_size(400,300) + self.set_default_size(400,200) if self.fstype == "free": - self.set_title(_("New partition on ") + device) + self.set_title(_("New partition on ") + self.device) else: - self.set_title(_("Properties for ") + self.controller.devices[self.device][minor]['devnode']) + self.set_title(_("Properties for ") + self.part['devnode']) self.globalbox = gtk.VBox(False, 0) self.globalbox.set_border_width(10) self.resize_box = gtk.VBox(False, 0) - self.resize_hpaned = gtk.HPaned() -# self.resize_hpaned.set_size_request(400, -1) - self.resize_hpaned.connect("size-allocate", self.part_resized) - self.resize_part_space_frame = gtk.Frame() - self.resize_part_space_frame.set_shadow_type(gtk.SHADOW_IN) - self.resize_part_space = PartitionButton.Partition(color1=self.controller.colors['linux-swap'], color2=self.controller.colors['free'], division=0, label="") - self.resize_part_space.set_sensitive(False) - self.resize_part_space_frame.add(self.resize_part_space) - if self.type == "free" or self.min_size <= 1: - self.resize_hpaned.pack1(self.resize_part_space_frame, resize=True, shrink=True) - else: - self.resize_hpaned.pack1(self.resize_part_space_frame, resize=True, shrink=False) - self.resize_unalloc_space_frame = gtk.Frame() - self.resize_unalloc_space_frame.set_shadow_type(gtk.SHADOW_IN) - self.resize_unalloc_space = PartitionButton.Partition(color1=self.controller.colors['unalloc'], color2=self.controller.colors['unalloc'], label="") - self.resize_unalloc_space.set_sensitive(False) - self.resize_unalloc_space_frame.add(self.resize_unalloc_space) - self.resize_hpaned.add2(self.resize_unalloc_space_frame) - self.resize_hpaned.set_position(0) - self.resize_box.pack_start(self.resize_hpaned, expand=False, fill=False, padding=0) - self.resize_box.pack_start(gtk.Label(_("You can slide above or enter values below")), expand=False, padding=2) resize_text_box = gtk.HBox(False, 0) resize_text_box.pack_start(gtk.Label(_("New size:")), expand=False, fill=False, padding=0) self.resize_info_part_size = gtk.Entry(max=9) self.resize_info_part_size.set_width_chars(7) + self.resize_info_part_size.set_text(str(int(self.cur_size))) self.resize_info_part_size.connect("insert-text", self.validate_keypress) - self.resize_info_part_size.connect("focus-out-event", self.update_slider_and_entries, "part-size") + self.resize_info_part_size.connect("focus-out-event", self.update_entries, "part-size") resize_text_box.pack_start(self.resize_info_part_size, expand=False, fill=False, padding=6) resize_text_box.pack_start(gtk.Label(_("MB")), expand=False, fill=False, padding=0) resize_text_box.pack_start(gtk.Label(" "), expand=False, fill=False, padding=20) resize_text_box.pack_start(gtk.Label(_("Unalloc. size:")), expand=False, fill=False, padding=6) self.resize_info_unalloc_size = gtk.Entry(max=9) self.resize_info_unalloc_size.set_width_chars(7) + self.resize_info_unalloc_size.set_text(str(int(self.max_size - self.cur_size))) self.resize_info_unalloc_size.connect("insert-text", self.validate_keypress) - self.resize_info_unalloc_size.connect("focus-out-event", self.update_slider_and_entries, "unalloc-size") + self.resize_info_unalloc_size.connect("focus-out-event", self.update_entries, "unalloc-size") resize_text_box.pack_start(self.resize_info_unalloc_size, expand=False, fill=False, padding=0) resize_text_box.pack_start(gtk.Label("MB"), expand=False, fill=False, padding=3) self.resize_box.pack_start(resize_text_box, expand=False, fill=False, padding=10) @@ -96,55 +70,30 @@ class PartProperties(gtk.Window): self.info_partition.set_alignment(0.0, 0.5) part_info_table.attach(self.info_partition, 1, 2, 0, 1) - info_partition_format = gtk.Label(_("Format:")) - info_partition_format.set_alignment(0.0, 0.5) - part_info_table.attach(info_partition_format, 0, 1, 1, 2) - resize_info_part_format_box = gtk.HBox(False, 0) - self.resize_info_part_format_yes = gtk.RadioButton(label=_("Yes")) - self.resize_info_part_format_no = gtk.RadioButton(label=_("No"), group=self.resize_info_part_format_yes) - if self.fstype == "free": - self.resize_info_part_format_yes.set_sensitive(False) - self.resize_info_part_format_no.set_sensitive(False) - else: - if self.format: - self.resize_info_part_format_yes.set_active(True) - else: - self.resize_info_part_format_no.set_active(True) - resize_info_part_format_box.pack_start(self.resize_info_part_format_yes, expand=False, fill=False) - resize_info_part_format_box.pack_start(self.resize_info_part_format_no, expand=False, fill=False, padding=10) - part_info_table.attach(resize_info_part_format_box, 1, 2, 1, 2) - info_partition_type = gtk.Label(_("Type:")) info_partition_type.set_alignment(0.0, 0.5) - part_info_table.attach(info_partition_type, 0, 1, 2, 3) + part_info_table.attach(info_partition_type, 0, 1, 1, 2) self.resize_info_part_type = gtk.combo_box_new_text() self.resize_info_part_type.append_text(_("Primary")) self.resize_info_part_type.append_text(_("Logical")) self.resize_info_part_type.set_active(0) - part_info_table.attach(self.resize_info_part_type, 1, 2, 2, 3) + part_info_table.attach(self.resize_info_part_type, 1, 2, 1, 2) info_partition_fs = gtk.Label(_("Filesystem:")) info_partition_fs.set_alignment(0.0, 0.5) - part_info_table.attach(info_partition_fs, 0, 1, 3, 4) + part_info_table.attach(info_partition_fs, 0, 1, 2, 3) self.resize_info_part_filesystem = gtk.combo_box_new_text() -# for fs in self.controller.supported_filesystems: for fs in self.supported_filesystems: self.resize_info_part_filesystem.append_text(fs) self.resize_info_part_filesystem.set_active(0) - self.resize_info_part_filesystem.connect("changed", self.filesystem_changed) - part_info_table.attach(self.resize_info_part_filesystem, 1, 2, 3, 4) - - info_partition_mountpoint = gtk.Label(_("Mount point:")) - info_partition_mountpoint.set_alignment(0.0, 0.5) - part_info_table.attach(info_partition_mountpoint, 0, 1, 4, 5) - self.part_mount_point_entry = gtk.Entry() - part_info_table.attach(self.part_mount_point_entry, 1, 2, 4, 5) + part_info_table.attach(self.resize_info_part_filesystem, 1, 2, 2, 3) - info_partition_mountopts = gtk.Label(_("Mount options:")) - info_partition_mountopts.set_alignment(0.0, 0.5) - part_info_table.attach(info_partition_mountopts, 0, 1, 5, 6) - self.part_mount_opts_entry = gtk.Entry() - part_info_table.attach(self.part_mount_opts_entry, 1, 2, 5, 6) + if self.fstype == "free": + info_partition_mkfsopts = gtk.Label(_("Format options:")) + info_partition_mkfsopts.set_alignment(0.0, 0.5) + part_info_table.attach(info_partition_type, 0, 1, 3, 4) + self.resize_info_part_mkfsopts = gtk.Entry(30) + part_info_table.attach(self.resize_info_part_mkfsopts, 1, 2, 3, 4) self.part_info_box.pack_start(part_info_table, expand=False, fill=False, padding=0) self.globalbox.pack_start(self.part_info_box, expand=False, fill=False, padding=10) @@ -165,19 +114,13 @@ class PartProperties(gtk.Window): ok_button.grab_default() self.set_modal(True) self.set_transient_for(self.controller.controller.window) - self.make_visible() + self.show_all() def run(self): - hpaned_width = self.resize_hpaned.get_allocation().width - self.resize_hpaned.style_get_property("handle-size") if self.fstype == "free": - hpaned_pos = hpaned_width - self.resize_hpaned.set_position(hpaned_pos) -# print "min_size = %s, max_size = %s, hpaned_width = %s, hpaned_pos = %s" % (str(self.min_size), str(self.max_size), str(hpaned_width), str(hpaned_pos)) self.info_partition.set_text(self.device + _(" (unallocated)")) - self.resize_part_space.set_division(0) - self.resize_part_space.set_colors(self.controller.colors['ext3'], self.controller.colors['ext3']) - if self.controller.devices[self.device].get_extended_partition(): - if self.controller.devices[self.device].get_partition(self.minor).is_logical(): + if self.part['device'].get_extended_partition(): + if self.part.is_logical(): self.resize_info_part_type.set_active(1) else: self.resize_info_part_type.set_active(0) @@ -188,45 +131,17 @@ class PartProperties(gtk.Window): self.resize_info_part_filesystem.set_active(0) self.resize_info_part_filesystem.set_sensitive(True) else: - tmppart = self.controller.devices[self.device].get_partition(self.minor) - self.info_partition.set_text(tmppart['devnode']) - if self.minor < 5: - self.resize_info_part_type.set_active(0) - else: + self.info_partition.set_text(self.part['devnode']) + if self.part.is_logical(): self.resize_info_part_type.set_active(1) + else: + self.resize_info_part_type.set_active(0) self.resize_info_part_type.set_sensitive(False) self.resize_info_part_filesystem.set_sensitive(False) -# for i, fs in enumerate(self.controller.supported_filesystems): for i, fs in enumerate(self.supported_filesystems): if fs == self.fstype: self.resize_info_part_filesystem.set_active(i) break - hpaned_pos = int(hpaned_width * (float(self.cur_size) / self.max_size)) - self.resize_hpaned.set_position(hpaned_pos) -# print "min_size = %s, max_size = %s, hpaned_width = %s, hpaned_pos = %s" % (str(self.min_size), str(self.max_size), str(hpaned_width), str(hpaned_pos)) - if self.max_size == self.cur_size and self.min_size == self.cur_size: - # Non-resizeable - self.resize_part_space.set_division(0) - self.resize_part_space.set_colors(self.controller.colors[self.fstype], self.controller.colors[self.fstype]) - self.resize_hpaned.set_sensitive(False) - else: - # Resizeable - division = int(hpaned_pos * (float(self.min_size) / self.cur_size)) - 13 - self.resize_part_space.set_division(division) - if self.min_size <= 1: - self.resize_part_space.set_colors(self.controller.colors[self.fstype], self.controller.colors[self.fstype]) - else: - self.resize_part_space.set_colors(self.controller.colors[self.fstype], self.controller.colors["free"]) - self.resize_hpaned.set_sensitive(True) - self.part_mount_point_entry.set_text(tmppart.get_mountpoint()) - self.part_mount_opts_entry.set_text(tmppart.get_mountopts()) - - def make_visible(self): - self.show_all() - self.present() - - def make_invisible(self): - self.hide_all() def ok_clicked(self, button): if not int(self.resize_info_part_size.get_text()): @@ -234,54 +149,27 @@ class PartProperties(gtk.Window): resp = msgdlg.run() msgdlg.destroy() return - if self.supported_filesystems[self.resize_info_part_filesystem.get_active()] == "linux-swap": - self.part_mount_point_entry.set_text("") - self.part_mount_opts_entry.set_text("") - else: - if self.part_mount_point_entry.get_text() and not self.part_mount_opts_entry.get_text(): - # Mount point but no mount options - self.part_mount_opts_entry.set_text("defaults") if self.fstype == "free": - hpaned_width = self.resize_hpaned.get_allocation().width - self.resize_hpaned.style_get_property("handle-size") - hpaned_pos = self.resize_hpaned.get_position() - part_space = float(hpaned_width - (hpaned_width - hpaned_pos)) / hpaned_width -# part_size = round(self.max_size * part_space) part_size = int(self.resize_info_part_size.get_text()) if self.resize_info_part_type.get_active() == 1 and self.controller.devices[self.device].get_extended_partition() == 0: # Logical and no extended partition - self.controller.devices[self.device].add_partition(self.minor, self.max_size, 0, 0, "extended") - self.minor = 4 + FREE_MINOR_FRAC_LOG + extidx = self.part['device'].add_partition(self.idx, self.max_size, "extended") + extpart = self.part['device'][extidx] + for idx, tmppart in enumerate(self.part['device']): + if tmppart['type'] == "free" and tmppart['start'] >= extpart['start'] and tmppart['end'] <= extpart['end']: + self.idx = idx fstype = self.supported_filesystems[self.resize_info_part_filesystem.get_active()] - new_minor = self.controller.devices[self.device].add_partition(self.minor, part_size, 0, 0, fstype, mountpoint=self.part_mount_point_entry.get_text(), mountopts=self.part_mount_opts_entry.get_text()) + newidx = self.controller.devices[self.device].add_partition(self.idx, part_size, fstype, mkfsopts=self.resize_info_part_mkfsopts.get_text()) self.controller.draw_part_box() - self.controller.part_selected(None, self.device, new_minor) + self.controller.part_selected(None, self.device, newidx) else: - tmppart = self.controller.devices[self.device].get_partition(self.minor) - tmppart.set_mountpoint(self.part_mount_point_entry.get_text()) - tmppart.set_mountopts(self.part_mount_opts_entry.get_text()) - tmppart.set_format(self.resize_info_part_format_yes.get_active()) - new_size = int(self.resize_info_part_size.get_text()) - if new_size != self.cur_size: - tmppart.resize(new_size) self.controller.draw_part_box() - self.controller.part_selected(None, self.device, int(self.minor)) + self.controller.part_selected(None, self.device, self.idx) self.destroy() def cancel_clicked(self, button): self.destroy() - def part_resized(self, widget, allocation): - if not self.sync_slider_to_text: - self.sync_slider_to_text = True - return - hpaned_width = self.resize_hpaned.get_allocation().width - self.resize_hpaned.style_get_property("handle-size") - hpaned_pos = self.resize_hpaned.get_position() - part_space = float(hpaned_width - (hpaned_width - hpaned_pos)) / hpaned_width - part_size_mb = int(round(part_space * self.max_size)) - self.resize_info_part_size.set_text(str(part_size_mb)) - part_unalloc_mb = int(self.max_size - part_size_mb) - self.resize_info_unalloc_size.set_text(str(part_unalloc_mb)) - def validate_keypress(self, editable, new_text, new_text_length, position): if new_text == ".": return try: @@ -289,45 +177,23 @@ class PartProperties(gtk.Window): except: editable.stop_emission("insert-text") - def update_slider_and_entries(self, widget, event, which_one): - hpaned_width = self.resize_hpaned.get_allocation().width - self.resize_hpaned.style_get_property("handle-size") - hpaned_pos = self.resize_hpaned.get_position() + def update_entries(self, widget, event, which_one): if which_one == "part-size": part_size_mb = int(round(long(self.resize_info_part_size.get_text()))) if part_size_mb > self.max_size: part_size_mb = self.max_size elif part_size_mb < self.min_size: part_size_mb = self.min_size - self.resize_info_part_size.set_text(str(part_size_mb)) + self.resize_info_part_size.set_text(str(int(part_size_mb))) part_unalloc_mb = int(self.max_size - part_size_mb) self.resize_info_unalloc_size.set_text(str(part_unalloc_mb)) - if part_size_mb >= self.min_size and part_size_mb <= self.max_size: - hpaned_pos = round((float(part_size_mb) / self.max_size) * hpaned_width) else: part_unalloc_mb = int(round(long(self.resize_info_unalloc_size.get_text()))) if part_unalloc_mb > (self.max_size - self.min_size): - part_unalloc_mb = self.max_size = self.min_size + part_unalloc_mb = int(self.max_size - self.min_size) self.resize_info_unalloc_size.set_text(str(part_unalloc_mb)) part_size_mb = int(round(self.max_size - part_unalloc_mb)) self.resize_info_part_size.set_text(str(part_size_mb)) - if (self.max_size - part_unalloc_mb) >= self.min_size: - hpaned_pos = hpaned_width - round((float(part_unalloc_mb) / self.max_size) * hpaned_width) - self.sync_slider_to_text = False - if hpaned_pos <= hpaned_width: - self.resize_hpaned.set_position(int(hpaned_pos)) - else: - self.resize_hpaned.set_position(self.resize_hpaned.get_position()) - - def filesystem_changed(self, widget, data=None): - fs = self.supported_filesystems[self.resize_info_part_filesystem.get_active()] - self.resize_part_space.set_colors(self.controller.colors[fs], self.controller.colors[fs]) - if self.fstype == "free": self.resize_part_space.get_child().expose_event(None, None) - if fs == "linux-swap": - self.part_mount_point_entry.set_sensitive(False) - self.part_mount_opts_entry.set_sensitive(False) - else: - self.part_mount_point_entry.set_sensitive(True) - self.part_mount_opts_entry.set_sensitive(True) def delete_event(self, widget, event, data=None): return False diff --git a/src/fe/gtk/Partitioning.py b/src/fe/gtk/Partition.py index c20b694..455397c 100644 --- a/src/fe/gtk/Partitioning.py +++ b/src/fe/gtk/Partition.py @@ -4,101 +4,71 @@ # of which can be found in the main directory of this project. import gtk -import GLIScreen -import GLIStorageDevice +from GLIScreen import * +import Partitioning from GLIException import * import re import PartitionButton import PartProperties from gettext import gettext as _ -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): title = _("Partitioning") part_buttons = {} drives = [] devices = {} active_device = "" - active_device_bytes_in_cylinder = 0 active_device_bytes_in_sector = 0 - active_device_cylinders = 0 - active_part_min_size = 0 - active_part_max_size = 0 - active_part_cur_size = 0 - active_part_start_cyl = 0 - active_part_minor = 0 + active_part_idx = -1 colors = { 'ext2': '#0af2fe', 'ext3': '#0af2fe', 'unalloc': '#a2a2a2', 'unknown': '#ed03e0', 'free': '#ffffff', 'ntfs': '#f20600', 'fat16': '#3d07f9', 'fat32': '#3d07f9', 'reiserfs': '#f0ff00', 'linux-swap': '#12ff09', 'xfs': '#006600', 'jfs': '#ffb400', 'hfs': '#fdb0ff', 'hfs+': '#fdb0ff', 'apple_bootstrap': '#fdb0ff' } supported_filesystems = ["ext2", "ext3", "linux-swap", "xfs", "jfs", "reiserfs", "fat16", "fat32", "ntfs", "hfs", "hfs+"] _helptext = """ <b><u>Partitioning</u></b> -The choices you make on this screen are very important. There are 2 ways to do -your partitioning. +The choices you make on this screen are very important. There are three ways \ +to do your partitioning. -The first method is the Recommended Layout. If you really have no idea how you -should lay out your partitions, this is probably the best option. You will need -at least 4GB of concurrent disk space to use this option. If you have any -existing partitions, they will be kept intact. Three partitions will be created: -/boot (100MB), swap (calculated based on physical memory, up to 512MB), and -/ (remaining concurrent space). The mountpoints and default mount options will -be automatically set for you. If you would like to mount any of your previously -existing partitions, you will need to edit those manually. +The first method is the Recommended Layout. If you really have no idea how you \ +should lay out your partitions, this is probably the best option. You will need \ +at least 4GB of disk space to use this option. If you have any existing \ +partitions, they will be deleted. Three partitions will be created: \ +/boot (100MB), swap (calculated based on physical memory, up to 512MB), and \ +/ (remaining concurrent space). -The second method is the old fashioned one: doing it yourself. The partition -edit is fairly straightforward (although, not <i>that</i> straightforward as +The second method is the old fashioned one: doing it yourself. The partition \ +edit is fairly straightforward (although, not <i>that</i> straightforward as \ this help would not need to exist). -The currently active disk is represented by the bar near the top of the screen. -If you have more than one disk present in your system, you can change the -active disk by choosing another disk from the drop down box labeled 'Devices'. -Along the bottom of the screen, there is a color key for the disk representation +The third method is doing it completely "by hand". You can open up a terminal \ +and use <i>fdisk</i>, <i>cfdisk</i>, or some other partitioning program. You \ +will need to create filesystems on all partitions that you create. + +The currently active disk is represented by the bar near the top of the screen. \ +If you have more than one disk present in your system, you can change the \ +active disk by choosing another disk from the drop down box labeled 'Devices'. \ +Along the bottom of the screen, there is a color key for the disk representation \ above. -To edit an existing partition, you must first select it by clicking it in the -bar above. You will get a brief overview of the partition below the bar. To edit -the partition's properties, click the button labeled 'Properties'. To delete it, -click the 'Delete' button. You will be asked for confirmation before the -partition is removed. - -When you edit a partition's properties, you'll get a popup dialog with a few -options. If the installer is able to resize the partition, you will be able to -slide the bar at the top or enter a new size in the fields below the slider. -You can choose whether or not you want the partition to be formatted. If you -to keep the data, you should leave this as No. You can also choose a mountpoint -and mount options for the partition. If you don't enter a mountpoint, the -partition will not be mounted during the install and will not be added to your -/etc/fstab. Click 'OK' to save the changes you have made or 'Cancel' to leave it -as it was. - -To create a new partition, select some unallocated space in the bar at the top. -The popup dialog that appears is the same one used for editing an existing -partition. The difference is that you will be able to select a partition type -(primary or logical for x86/amd64) and a filesystem type. If you select logical -for the type, an extended partition will be created automatically and take up -all of the remaining unallocated space. All partitions created after this will -automatically be logical. For a partition for use by Linux, you will want to use -ext2, ext3, reiserfs, jfs, or xfs. Ext3 is the recommended type. - -Keep in mind that none of the changes to your partition table and filesystems -will be committed until you click the 'Install' button on the last screen of the -installer. Also, if your existing partitions are out of disk order, the -installer will reorder the partition numbers so that they match the physical -disk order. +To view an existing partition's properties, you must select it by clicking it in \ +the bar above. You will get a brief overview of the partition below the bar. To \ +delete it, click the 'Delete' button. You will be asked for confirmation before \ +the partition is removed. + +To create a new partition, select some unallocated space in the bar at the top. \ +For a partition for use by Linux, you will want to use ext2, ext3, reiserfs, \ +jfs, or xfs. Ext3 is the recommended type. + +Keep in mind that all changes are committed to disk immediately. If you just \ +click the Next button, your partition table will remain untouched. """ def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller, show_title=True) + GLIScreen.__init__(self, controller, show_title=True) vert = gtk.VBox(False, 0) vert.set_border_width(10) - content_str = _(""" - On this screen, you will be presented with a list of detected partitionable devices. Selecting - a device will show you the current partitions on it (if any) and allow you to add, remove, and - resize partitions.""") - - content_label = gtk.Label(content_str) - vert.pack_start(content_label, expand=False, fill=False, padding=0) # This was removed for screen space container = gtk.HBox(False, 0) detected_dev_label = gtk.Label(_("Devices:")) container.pack_start(detected_dev_label, expand=False, fill=False, padding=0) @@ -111,9 +81,6 @@ disk order. self.part_button_clear = gtk.Button(_(" Clear partitions ")) self.part_button_clear.connect("clicked", self.part_button_clear_clicked) container.pack_end(self.part_button_clear, expand=False, fill=False, padding=10) - self.part_button_dump_info = gtk.Button(_(" Dump to console (debug) ")) - self.part_button_dump_info.connect("clicked", self.dump_part_info_to_console) - container.pack_end(self.part_button_dump_info, expand=False, fill=False, padding=0) vert.pack_start(container, expand=False, fill=False, padding=10) @@ -141,10 +108,6 @@ disk order. info_filesystem_label.set_alignment(0.0, 0.5) self.info_filesystem = gtk.Label() self.info_filesystem.set_alignment(0.0, 0.5) - info_mountpoint_label = gtk.Label(_("Mountpoint:")) - info_mountpoint_label.set_alignment(0.0, 0.5) - self.info_mountpoint = gtk.Label() - self.info_mountpoint.set_alignment(0.0, 0.5) info_size_label = gtk.Label(_("Size:")) info_size_label.set_alignment(0.0, 0.5) self.info_size = gtk.Label() @@ -155,11 +118,8 @@ disk order. part_info_table.attach(self.info_type, 1, 2, 1, 2) part_info_table.attach(info_filesystem_label, 0, 1, 2, 3) part_info_table.attach(self.info_filesystem, 1, 2, 2, 3) - part_info_table.attach(info_mountpoint_label, 0, 1, 3, 4) - part_info_table.attach(self.info_mountpoint, 1, 2, 3, 4) - - part_info_table.attach(info_size_label, 0, 1, 5, 6) - part_info_table.attach(self.info_size, 1, 2, 5, 6) + part_info_table.attach(info_size_label, 0, 1, 3, 4) + part_info_table.attach(self.info_size, 1, 2, 3, 4) self.part_info_box.pack_start(part_info_table, expand=False, fill=False) vert.pack_start(self.part_info_box, expand=False, fill=False, padding=10) @@ -168,12 +128,9 @@ disk order. self.part_button_delete = gtk.Button(_(" Delete ")) self.part_button_delete.connect("clicked", self.part_button_delete_clicked) self.part_button_box.pack_start(self.part_button_delete, expand=False, fill=False, padding=0) -# self.part_button_recommended = gtk.Button(_(" Recommended ")) -# self.part_button_recommended.connect("clicked", self.part_button_recommended_clicked) -# self.part_button_box.pack_start(self.part_button_recommended, expand=False, fill=False, padding=10) - self.part_button_properties = gtk.Button(_(" Properties ")) - self.part_button_properties.connect("clicked", self.part_button_properties_clicked) - self.part_button_box.pack_start(self.part_button_properties, expand=False, fill=False, padding=10) +# self.part_button_properties = gtk.Button(_(" Properties ")) +# self.part_button_properties.connect("clicked", self.part_button_properties_clicked) +# self.part_button_box.pack_start(self.part_button_properties, expand=False, fill=False, padding=10) vert.pack_start(self.part_button_box, expand=False, fill=False, padding=10) # This builds the color key at the bottom @@ -189,9 +146,19 @@ disk order. # { 'label': "Free space", 'color': '#ffffff' }, { 'label': _("Unallocated"), 'color': '#a2a2a2' } ] - color_codes_box = gtk.HBox(False, 0) - vert.pack_end(color_codes_box, expand=False, fill=False, padding=2) + color_codes_table = gtk.Table(rows=2, columns=6) + color_codes_table.set_row_spacings(5) + color_codes_table.set_col_spacings(10) + vert.pack_end(color_codes_table, expand=False, fill=True, padding=2) +# color_codes_box = gtk.HBox(False, 0) +# vert.pack_end(color_codes_box, expand=False, fill=False, padding=2) + col = -1 + row = 0 for color in color_codes: + col += 1 + if col == 6: + col = 0 + row += 1 temp_xpm = [ "12 12 2 1", "B c #000000", "C c " + color['color'], @@ -214,33 +181,27 @@ disk order. tmpbox = gtk.HBox(False, 0) tmpbox.pack_start(tmp_image, expand=False, fill=False, padding=3) tmpbox.pack_start(gtk.Label(color['label']), expand=False, fill=False, padding=3) - color_codes_box.pack_start(tmpbox, expand=False, fill=False, padding=6) +# color_codes_box.pack_start(tmpbox, expand=False, fill=False, padding=6) + color_codes_table.attach(tmpbox, col, col + 1, row, row + 1) self.add_content(vert) -# self.detected_dev_combo.set_active(0) def drive_changed(self, combobox, data=None): self.active_device = self.drives[self.detected_dev_combo.get_active()] self.draw_part_box() - self.active_device_cylinders = self.devices[self.active_device].get_num_cylinders() - self.active_device_bytes_in_cylinder = self.devices[self.active_device].get_cylinder_size() - self.active_device_bytes_in_sector = self.devices[self.active_device].get_sector_size() + self.active_device_bytes_in_sector = self.devices[self.active_device].get_geometry()['sector_size'] self.info_partition.set_text("") self.info_type.set_text("") self.info_filesystem.set_text("") - self.info_mountpoint.set_text("") -# self.info_end.set_text("") self.info_size.set_text("") self.part_info_box.hide_all() -# self.resize_box.hide_all() self.part_button_box.hide_all() -# self.part_mount_info_box.hide_all() +# self.part_selected(None, self.drives[self.detected_dev_combo.get_active()], 0) - def part_selected(self, button, dev=None, minor=None): - minor = int(minor) - tmppart = self.devices[dev].get_partition(minor) + def part_selected(self, button, dev=None, idx=None): + tmppart = self.devices[dev][idx] self.info_partition.set_text(tmppart['devnode']) - if self.devices[dev]._labelinfo['extended'] and minor > 4: + if tmppart.is_logical(): self.info_type.set_text(_("Logical")) elif tmppart.get_type() == "extended": self.info_type.set_text(_("Extended")) @@ -251,43 +212,42 @@ disk order. self.info_filesystem.set_text(_("N/A")) else: self.info_filesystem.set_text(fstype) - self.info_mountpoint.set_text(tmppart.get_mountpoint() or "none") - start = tmppart.get_start() - end = tmppart.get_end() -# self.info_start.set_text(str(start)) -# self.info_end.set_text(str(end)) -# part_size = int(round(float(self.devices[dev].get_sector_size()) * (end - start + 1) / 1024 / 1024)) - part_size = int(tmppart.get_mb()) + part_size = int(tmppart['mb']) self.info_size.set_text(str(part_size) + _(" MB")) - self.active_part_minor = int(tmppart.get_minor()) + self.active_part_idx = idx self.part_button_delete.set_sensitive(True) self.part_info_box.show_all() self.part_button_box.show_all() - def unalloc_selected(self, button, dev=None, extended=False, mb=0, minor=0): - props = PartProperties.PartProperties(self, self.active_device, minor, 0, 0, mb, "free", self.active_device_bytes_in_sector) + def unalloc_selected(self, button, idx=None): + tmppart = self.devices[self.active_device][idx] + props = PartProperties.PartProperties(self, tmppart) props.run() def part_button_delete_clicked(self, button, data=None): - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("Are you sure you want to delete ") + self.devices[self.active_device][self.active_part_minor]['devnode']) + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("Are you sure you want to delete ") + self.devices[self.active_device][self.active_part_idx]['devnode']) resp = msgdlg.run() msgdlg.destroy() if resp == gtk.RESPONSE_YES: - self.devices[self.active_device].remove_partition(self.active_part_minor) - if self.devices[self.active_device]._labelinfo['extended'] and self.active_part_minor > 4: - ext_part = self.devices[self.active_device].get_extended_partition() - if not len(self.devices[self.active_device].get_partition(ext_part).get_logicals()): - self.devices[self.active_device].remove_partition(ext_part) + self.devices[self.active_device].remove_partition(self.active_part_idx) + if self.devices[self.active_device]._labelinfo['extended']: + ext_idx = self.devices[self.active_device].get_extended_partition() + if ext_idx > -1 and not len([x for x in self.devices[self.active_device][ext_idx].get_logicals() if x['type'] != "free"]): + self.devices[self.active_device].remove_partition(ext_idx) self.drive_changed(None) def part_button_recommended_clicked(self, button): - try: - self.devices[self.active_device].do_recommended() - except GLIException, error: - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format=error.get_error_msg()) - msgdlg.run() - msgdlg.destroy() - self.draw_part_box() + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("This will clear your drive and apply a recommended partition layout. Are you sure you want to do this?")) + resp = msgdlg.run() + msgdlg.destroy() + if resp == gtk.RESPONSE_YES: + try: + self.devices[self.active_device].do_recommended() + except GLIException, error: + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format=error.get_error_msg()) + msgdlg.run() + msgdlg.destroy() + self.draw_part_box() def part_button_clear_clicked(self, button): msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("Are you sure you wish to clear the partition table for " + self.active_device + "?")) @@ -299,9 +259,7 @@ disk order. def draw_part_box(self): # partlist = self.devices[self.active_device].get_ordered_partition_list() - cylinders = self.devices[self.active_device].get_num_cylinders() - sectors = self.devices[self.active_device].get_num_sectors() - total_mb = self.devices[self.active_device].get_total_mb() + total_mb = self.devices[self.active_device].get_geometry()['total_mb'] for button in self.part_buttons.keys(): self.part_table.remove(self.part_buttons[button]) self.part_table.resize(1, 100) @@ -310,8 +268,8 @@ disk order. last_log_percent = 0 extended_part = 0 extended_table = None - for part in self.devices[self.active_device]: #.get_partitions(): - tmppart = self.devices[self.active_device][part] + for idx, tmppart in enumerate(self.devices[self.active_device]): +# tmppart = self.devices[self.active_device][part] if tmppart.get_type() == "free": partsize = tmppart.get_mb() percent = (float(partsize) / float(total_mb)) * 100 @@ -320,16 +278,16 @@ disk order. # print "minor: " + str(part) + ", mb: " + str(partsize) + ", percent: " + str(percent) + ", last_percent: " + str(last_percent) if tmppart.is_logical(): tmpbutton = PartitionButton.Partition(color1=self.colors['unalloc'], color2=self.colors['unalloc'], label="", division=0) - tmpbutton.connect("clicked", self.unalloc_selected, self.active_device, False, partsize, tmppart.get_minor()) + tmpbutton.connect("clicked", self.unalloc_selected, idx) extended_table.attach(tmpbutton, last_log_percent, (last_log_percent + percent), 0, 1) last_log_percent = last_log_percent + percent else: - self.part_buttons['free_' + str(tmppart.get_minor())] = PartitionButton.Partition(color1=self.colors['unalloc'], color2=self.colors['unalloc'], label="", division=0) - if self.devices[self.active_device]._labelinfo['extended'] and self.devices[self.active_device].get_partition(1) and self.devices[self.active_device].get_partition(2) and self.devices[self.active_device].get_partition(3) and self.devices[self.active_device].get_partition(4): - self.part_buttons['free_' + str(tmppart.get_minor())].connect("clicked", self.show_no_more_primary_message) + self.part_buttons['free_' + str(idx)] = PartitionButton.Partition(color1=self.colors['unalloc'], color2=self.colors['unalloc'], label="", division=0) + if self.devices[self.active_device]._labelinfo['extended'] and self.devices[self.active_device].get_partition_idx_from_minor(1) > -1 and self.devices[self.active_device].get_partition_idx_from_minor(2) > -1 and self.devices[self.active_device].get_partition_idx_from_minor(3) > -1 and self.devices[self.active_device].get_partition_idx_from_minor(4) > -1: + self.part_buttons['free_' + str(idx)].connect("clicked", self.show_no_more_primary_message) else: - self.part_buttons['free_' + str(tmppart.get_minor())].connect("clicked", self.unalloc_selected, self.active_device, False, partsize, tmppart.get_minor()) - self.part_table.attach(self.part_buttons['free_' + str(tmppart.get_minor())], last_percent, (last_percent + percent), 0, 1) + self.part_buttons['free_' + str(idx)].connect("clicked", self.unalloc_selected, idx) + self.part_table.attach(self.part_buttons['free_' + str(idx)], last_percent, (last_percent + percent), 0, 1) last_percent = last_percent + percent else: partsize = tmppart.get_mb() @@ -352,12 +310,12 @@ disk order. tmpbutton.set_label(tmppart['devnode']) extended_table.attach(tmpbutton, last_log_percent, (last_log_percent + percent), 0, 1) last_log_percent = last_log_percent + percent - tmpbutton.connect("clicked", self.part_selected, tmpdevice, tmpminor) + tmpbutton.connect("clicked", self.part_selected, tmpdevice, idx) else: self.part_buttons[tmpminor] = PartitionButton.Partition(color1=self.colors[tmppart.get_type()], color2=self.colors[tmppart.get_type()], label="", division=0) if percent >= 15: self.part_buttons[tmpminor].set_label(tmppart['devnode']) - self.part_buttons[tmpminor].connect("clicked", self.part_selected, tmpdevice, tmpminor) + self.part_buttons[tmpminor].connect("clicked", self.part_selected, tmpdevice, idx) self.part_table.attach(self.part_buttons[tmpminor], last_percent, (last_percent + percent), 0, 1) last_percent = last_percent + percent self.part_table.show_all() @@ -367,43 +325,29 @@ disk order. msgdlg.run() msgdlg.destroy() - def dump_part_info_to_console(self, button, data=None): - import pprint - pp = pprint.PrettyPrinter(indent=4) - pp.pprint(self.devices[self.active_device].get_install_profile_structure()) - def part_button_properties_clicked(self, widget, data=None): - tmppart = self.devices[self.active_device].get_partition(self.active_part_minor) - props = PartProperties.PartProperties(self, self.active_device, self.active_part_minor, tmppart.get_mb(), tmppart.get_min_mb_for_resize(), tmppart.get_max_mb_for_resize(), tmppart.get_type(), self.active_device_bytes_in_sector, format=tmppart.get_format()) + tmppart = self.devices[self.active_device][self.active_part_idx] + props = PartProperties.PartProperties(self, tmppart) props.run() def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True self.controller.SHOW_BUTTON_BACK = False self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - self.devices = self.controller.install_profile.get_partition_tables() - if not self.devices: - part_load_error = 0 - tmp_drives = GLIStorageDevice.detect_devices() - tmp_drives.sort() - for drive in tmp_drives: - try: - self.devices[drive] = GLIStorageDevice.Device(drive, arch=self.controller.client_profile.get_architecture_template()) - self.devices[drive].set_partitions_from_disk() - self.detected_dev_combo.append_text(drive) - self.drives.append(drive) - except: - print _("Exception received while loading partitions") - if self.devices.has_key(drive): del self.devices[drive] - part_load_error = 1 - if part_load_error: - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="There was an error loading one or more drives' partition table. Possible causes are running as a normal user or partitions being out of disk order.") + part_load_error = 0 + tmp_drives = Partitioning.detect_devices() + tmp_drives.sort() + for drive in tmp_drives: + try: + self.devices[drive] = Partitioning.Device(drive, self.controller.cc.get_arch(), self.controller.install_profile) + self.detected_dev_combo.append_text(drive) + self.drives.append(drive) + except: + print _("Exception received while loading partitions from device " + drive) + if self.devices.has_key(drive): del self.devices[drive] + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="There was an error loading the partition table from device " + drive + ". It will not be displayed.") msgdlg.run() msgdlg.destroy() - return if not self.drives: tmp_drives = self.devices.keys() @@ -417,32 +361,5 @@ disk order. self.detected_dev_combo.set_active(0) self.drive_changed(None) - for device in self.devices: - for tmppart in self.devices[device].get_partitions(): - if tmppart.get_type() == "unknown": - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="One of your disks (%s) contains a partition (minor %s) of a type that the installer cannot currently handle. The installer cannot continue. Click OK to exit." % (device, str(tmppart.get_minor()))) - msgdlg.run() - msgdlg.destroy() - self.controller.exit() - - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="The installer still cannot handle some weirder partition layouts. If you have anything weird such as primary partitions after logicals or partitions out of physical disk order, you should probably exit now and re-partition by hand before running the installer. If you don't, the installer will very likely mess up your partitions. You have been warned!") - msgdlg.run() - msgdlg.destroy() - - def deactivate(self): - parts_tmp = {} - for device in self.devices.keys(): - parts_tmp[device] = self.devices[device].get_install_profile_structure() - for device in parts_tmp: - for part in parts_tmp[device]: - if part['mountpoint'] == "/": - self.controller.install_profile.set_partition_tables(self.devices) - return True - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("You have not specified a partition to mount as /. Do you want to continue?")) - resp = msgdlg.run() - msgdlg.destroy() - if resp == gtk.RESPONSE_YES: - self.controller.install_profile.set_partition_tables(self.devices) - return True - else: - return False + def next(self): + self.controller.load_screen("LocalMounts") diff --git a/src/fe/gtk/PartitionButton.py b/src/fe/gtk/PartitionButton.py index c26abd1..82bbce1 100644 --- a/src/fe/gtk/PartitionButton.py +++ b/src/fe/gtk/PartitionButton.py @@ -81,4 +81,4 @@ if __name__ == "__main__": window.add(Partition(label = 4)) window.connect("delete-event", lambda *ignored: gtk.main_quit()) window.show_all() - gtk.mainloop() + gtk.main() diff --git a/src/fe/gtk/PortageTree.py b/src/fe/gtk/PortageTree.py index 64d9bf3..c6f84c5 100644 --- a/src/fe/gtk/PortageTree.py +++ b/src/fe/gtk/PortageTree.py @@ -4,11 +4,12 @@ # of which can be found in the main directory of this project. import gtk -import GLIScreen +from GLIScreen import * import GLIUtility import URIBrowser +from ProgressDialog import * -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): title = "Portage Tree" active_selection = None @@ -16,96 +17,92 @@ class Panel(GLIScreen.GLIScreen): _helptext = """ <b><u>Portage Tree</u></b> -Portage is probably Gentoo's most notable innovation in software management. -When we talk about packages, we often mean software titles that are available -to the Gentoo users through the Portage tree. The Portage tree is a collection -of ebuilds, files that contain all information Portage needs to maintain -software (install, search, query, ...). These ebuilds reside in /usr/portage by +Portage is probably Gentoo's most notable innovation in software management. \ +When we talk about packages, we often mean software titles that are available \ +to the Gentoo users through the Portage tree. The Portage tree is a collection \ +of ebuilds, files that contain all information Portage needs to maintain \ +software (install, search, query, ...). These ebuilds reside in /usr/portage by \ default. -Whenever you ask Portage to perform some action regarding software titles, it -will use the ebuilds on your system as a base. It is therefore important that -you regularly update the ebuilds on your system so Portage knows about new +Whenever you ask Portage to perform some action regarding software titles, it \ +will use the ebuilds on your system as a base. It is therefore important that \ +you regularly update the ebuilds on your system so Portage knows about new \ software, security updates, etc. There are several ways of obtaining an initial Portage tree. -Normal: This is the normal method of downloading and syncing the Portage tree +Normal: This is the normal method of downloading and syncing the Portage tree \ from the Internet. It will give you the most up-to-date tree. -Webrsync: This is similar to Normal. It will download via http a dialy Portage +Webrsync: This is similar to Normal. It will download via http a dialy Portage \ snapshot and sync that. -Snapshot: This is if you have a specially-built portage snapshot you want to use -or if you want to use the copy on the Livecd to save downloading the tree -(useful for those on dial-up). This is the least up-to-date way to get an -initial Portage tree. It is necessary to choose the Livecd snapshot if you are -doing a Dynamic or GRP install. +Snapshot: This is if you have a specially-built portage snapshot you want to use \ +or if you want to use the copy on the Livecd to save downloading the tree \ +(useful for those on dial-up). This is the least up-to-date way to get an \ +initial Portage tree. """ def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 0) vert.set_border_width(10) - content_str = """Here, you will select how you would like to obtain a portage tree. Each option has -a brief description beside it. -""" - content_label = gtk.Label(content_str) - vert.pack_start(content_label, expand=False, fill=False, padding=0) - self.radio_syncs['sync'] = gtk.RadioButton(None, "Normal") - self.radio_syncs['sync'].set_name("sync") - self.radio_syncs['sync'].connect("toggled", self.stage_selected, "sync") - self.radio_syncs['sync'].set_size_request(100, -1) -# self.radio_syncs['sync'].set_sensitive(False) # temporary - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.radio_syncs['sync'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("This will run 'emerge sync' to get a local copy of the portage tree") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=15) - self.radio_syncs['webrsync'] = gtk.RadioButton(self.radio_syncs['sync'], "Webrsync") - self.radio_syncs['webrsync'].set_name("webrsync") - self.radio_syncs['webrsync'].connect("toggled", self.stage_selected, "webrsync") - self.radio_syncs['webrsync'].set_size_request(100, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.radio_syncs['webrsync'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("This will download a portage snapshot from a Gentoo mirror and sync it locally. Use this option if you are behind a restrictive firewall that blocks outgoing rsync traffic") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=15) - self.radio_syncs['snapshot'] = gtk.RadioButton(self.radio_syncs['sync'], "Snapshot") - self.radio_syncs['snapshot'].set_name("snapshot") - self.radio_syncs['snapshot'].connect("toggled", self.stage_selected, "snapshot") - self.radio_syncs['snapshot'].set_size_request(100, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.radio_syncs['snapshot'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("Use this option to if you have a portage snapshot. You will need to enter the URI below") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=15) - self.radio_syncs['none'] = gtk.RadioButton(self.radio_syncs['sync'], "None") - self.radio_syncs['none'].set_name("none") - self.radio_syncs['none'].connect("toggled", self.stage_selected, "none") - self.radio_syncs['none'].set_size_request(100, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.radio_syncs['none'], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("This option leaves /usr/portage untouched. Use this if you are NFS mounting the tree.") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=15) - - hbox = gtk.HBox(False, 0) - hbox.pack_start(gtk.Label("Portage snapshot URI:"), expand=False, fill=False, padding=5) - self.entry_portage_snapshot_uri = gtk.Entry() - self.entry_portage_snapshot_uri.set_width_chars(50) - self.entry_portage_snapshot_uri.set_sensitive(False) - hbox.pack_start(self.entry_portage_snapshot_uri, expand=False, fill=False, padding=10) - self.browse_uri = gtk.Button(" ... ") - self.browse_uri.connect("clicked", self.browse_uri_clicked) - self.browse_uri.set_sensitive(False) - hbox.pack_start(self.browse_uri, expand=False, fill=False, padding=5) - vert.pack_end(hbox, expand=False, fill=False, padding=0) + if self.controller.install_profile.get_dynamic_stage3(): + hbox = gtk.HBox(False, 0) + label = gtk.Label() + label_markup = '<b>Your portage tree will be extracted from the release snapshot included on the LiveCD.</b>' + label.set_markup(label_markup) + label.set_line_wrap(True) + hbox.pack_start(label, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=10) + else: + hbox = gtk.HBox(False) + label = gtk.Label() + label.set_markup('<b>Choose your portage tree sync method</b>') + hbox.pack_start(label, expand=False, fill=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + hbox = gtk.HBox(False, 0) + self.radio_syncs['sync'] = gtk.RadioButton(None, "Normal") + self.radio_syncs['sync'].set_name("sync") + self.radio_syncs['sync'].connect("toggled", self.sync_selected, "sync") + hbox.pack_start(self.radio_syncs['sync'], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + hbox = gtk.HBox(False, 0) + self.radio_syncs['webrsync'] = gtk.RadioButton(self.radio_syncs['sync'], "Webrsync") + self.radio_syncs['webrsync'].set_name("webrsync") + self.radio_syncs['webrsync'].connect("toggled", self.sync_selected, "webrsync") + hbox.pack_start(self.radio_syncs['webrsync'], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=True, padding=20) + + hbox = gtk.HBox(False, 0) + self.radio_syncs['snapshot'] = gtk.RadioButton(self.radio_syncs['sync'], "Snapshot") + self.radio_syncs['snapshot'].set_name("snapshot") + self.radio_syncs['snapshot'].connect("toggled", self.sync_selected, "snapshot") + hbox.pack_start(self.radio_syncs['snapshot'], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=True, padding=20) + + hbox = gtk.HBox(False, 0) + hbox.pack_start(gtk.Label(" "), expand=False, fill=False, padding=15) + hbox.pack_start(gtk.Label("URI:"), expand=False, fill=False, padding=5) + self.entry_portage_snapshot_uri = gtk.Entry() + self.entry_portage_snapshot_uri.set_width_chars(50) + self.entry_portage_snapshot_uri.set_sensitive(False) + hbox.pack_start(self.entry_portage_snapshot_uri, expand=False, fill=False, padding=0) + self.browse_uri = gtk.Button("Browse") + self.browse_uri.connect("clicked", self.browse_uri_clicked) + self.browse_uri.set_sensitive(False) + hbox.pack_start(self.browse_uri, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=0) + + hbox = gtk.HBox(False, 0) + self.radio_syncs['none'] = gtk.RadioButton(self.radio_syncs['sync'], "None") + self.radio_syncs['none'].set_name("none") + self.radio_syncs['none'].connect("toggled", self.sync_selected, "none") + hbox.pack_start(self.radio_syncs['none'], expand=False, fill=False, padding=20) + vert.pack_start(hbox, expand=False, fill=True, padding=40) self.add_content(vert) @@ -113,7 +110,7 @@ a brief description beside it. uribrowser = URIBrowser.URIBrowser(self, self.entry_portage_snapshot_uri) uribrowser.run(self.entry_portage_snapshot_uri.get_text()) - def stage_selected(self, widget, data=None): + def sync_selected(self, widget, data=None): self.active_selection = data if data == "snapshot": self.entry_portage_snapshot_uri.set_sensitive(True) @@ -123,46 +120,43 @@ a brief description beside it. self.browse_uri.set_sensitive(False) def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True self.controller.SHOW_BUTTON_BACK = True self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - if self.controller.install_profile.get_dynamic_stage3(): - self.entry_portage_snapshot_uri.set_text(GLIUtility.get_cd_snapshot_uri()) - self.radio_syncs["snapshot"].set_active(True) - self.active_selection = "snapshot" - for radio in self.radio_syncs: - self.radio_syncs[radio].set_sensitive(False) - self.entry_portage_snapshot_uri.set_sensitive(False) - self.browse_uri.set_sensitive(False) - else: - for radio in self.radio_syncs: - self.radio_syncs[radio].set_sensitive(True) - self.entry_portage_snapshot_uri.set_sensitive(True) - self.browse_uri.set_sensitive(True) + if not self.controller.install_profile.get_dynamic_stage3(): +# for radio in self.radio_syncs: +# self.radio_syncs[radio].set_sensitive(True) +# self.entry_portage_snapshot_uri.set_sensitive(True) +# self.browse_uri.set_sensitive(True) self.active_selection = self.controller.install_profile.get_portage_tree_sync_type() or "sync" self.radio_syncs[self.active_selection].set_active(True) - self.stage_selected(self.radio_syncs[self.active_selection], self.active_selection) + self.sync_selected(self.radio_syncs[self.active_selection], self.active_selection) self.entry_portage_snapshot_uri.set_text(self.controller.install_profile.get_portage_tree_snapshot_uri()) if not self.entry_portage_snapshot_uri.get_text(): self.entry_portage_snapshot_uri.set_text(GLIUtility.get_cd_snapshot_uri()) - def deactivate(self): - if self.active_selection == "snapshot": - if not self.entry_portage_snapshot_uri.get_text(): - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="You did not enter a portage snapshot URI. Continue?") - resp = msgdlg.run() - msgdlg.destroy() - if resp == gtk.RESPONSE_NO: - return False - elif not GLIUtility.validate_uri(self.entry_portage_snapshot_uri.get_text()): - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="The portage snapshot URI you entered does not exist. Continue?") - resp = msgdlg.run() - msgdlg.destroy() - if resp == gtk.RESPONSE_NO: - return False - self.controller.install_profile.set_portage_tree_sync_type(None, self.active_selection, None) - try: self.controller.install_profile.set_portage_tree_snapshot_uri(None, self.entry_portage_snapshot_uri.get_text(), None) - except: pass - return True + def next(self): + if self.controller.install_profile.get_dynamic_stage3(): + self.controller.install_profile.set_portage_tree_snapshot_uri(None, GLIUtility.get_cd_snapshot_uri(), None) + self.controller.install_profile.set_portage_tree_sync_type(None, "snapshot", None) + else: + if self.active_selection == "snapshot": + if not self.entry_portage_snapshot_uri.get_text(): + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="You did not enter a portage snapshot URI. You cannot continue until you enter a snapshot URI or choose a different sync method.") + msgdlg.run() + msgdlg.destroy() + return + elif not GLIUtility.validate_uri(self.entry_portage_snapshot_uri.get_text()): + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="The portage snapshot URI you entered does not exist or is not a valid URI. You cannot continue unless you enter a valid URI or choose another sync method.") + msgdlg.run() + msgdlg.destroy() + return + self.controller.install_profile.set_portage_tree_sync_type(None, self.active_selection, None) + self.controller.install_profile.set_portage_tree_snapshot_uri(None, self.entry_portage_snapshot_uri.get_text(), None) + progress = ProgressDialog(self.controller, ("unpack_stage_tarball", "prepare_chroot", "install_portage_tree", ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("MakeDotConf") + else: + GLIScreen.progress_callback(self, result, data) diff --git a/src/fe/gtk/ProgressDialog.py b/src/fe/gtk/ProgressDialog.py new file mode 100755 index 0000000..0bdaece --- /dev/null +++ b/src/fe/gtk/ProgressDialog.py @@ -0,0 +1,105 @@ +# Copyright 1999-2005 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import gtk, pango, gobject +from gettext import gettext as _ +from GLIClientController import NEXT_STEP_READY + +PROGRESS_DONE = 1 +PROGRESS_CANCEL = 2 +PROGRESS_EXCEPTION = 3 + +class ProgressDialog(gtk.Window): + + def __init__(self, controller, install_steps, callback): + gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) + + self.controller = controller + self.install_steps = list(install_steps) + self.callback = callback + + self.connect("delete_event", self.delete_event) + self.connect("destroy", self.destroy_event) + self.set_default_size(500, -1) + self.set_resizable(True) + self.set_title("Gentoo Linux Installer - Installation Progress") + self.set_modal(True) + self.set_transient_for(controller.window) + + self.globalbox = gtk.VBox(False, 0) + self.globalbox.set_border_width(10) + hbox = gtk.HBox(False) + step_label = gtk.Label("Step:") + hbox.pack_start(step_label, expand=False, fill=False, padding=0) + self.step_text = gtk.Label() + self.step_text.set_text("Step description here") + hbox.pack_start(self.step_text, expand=False, fill=False, padding=15) + self.globalbox.pack_start(hbox, expand=True, fill=False, padding=0) + self.progress_bar = gtk.ProgressBar() + self.globalbox.pack_start(self.progress_bar, expand=True, fill=False, padding=5) + hbox = gtk.HBox(True) + self.cancel_button = gtk.Button(label="_Cancel") + self.cancel_button.connect("clicked", self.cancel_clicked) + if not self.callback: + self.cancel_button.set_sensitive(False) + hbox.pack_start(self.cancel_button, expand=False, fill=False) + self.globalbox.pack_end(hbox, expand=False, fill=False, padding=0) + self.add(self.globalbox) + + def cancel_clicked(self, button): + msgdlg = gtk.MessageDialog(parent=self, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("Do you really want to cancel before the install is complete?")) + resp = msgdlg.run() + msgdlg.destroy() + if resp == gtk.RESPONSE_YES: + self.destroy() + if self.callback: + self.callback(PROGRESS_CANCEL) + + def run(self): + self.show_all() + self.call_next_step() + gobject.timeout_add(500, self.poll_notifications) + + def delete_event(self, widget, event): + self.cancel_clicked(self.cancel_button) + return True + + def destroy_event(self, widget, data=None): + return True + + def call_next_step(self): + step_name = self.install_steps.pop(0) + step_descr = self.controller.cc.get_step_info(step_name) + self.step_text.set_text(step_descr) + self.progress_bar.set_fraction(0) + self.progress_bar.set_text("Working...") + self.controller.cc.run_step(step_name) + + def poll_notifications(self): + notification = self.controller.cc.getNotification() + if not notification: + return True + ntype = notification.get_type() + ndata = notification.get_data() + if ntype == "exception": + self.destroy() + if self.callback: + self.callback(PROGRESS_EXCEPTION, ndata) + return False + elif ntype == "int": + if ndata == NEXT_STEP_READY: + self.progress_bar.set_fraction(1) + self.progress_bar.set_text("Done") + if not len(self.install_steps): + self.destroy() + if self.callback: + self.callback(PROGRESS_DONE) + return False + self.call_next_step() + elif ntype == "progress": + self.progress_bar.set_fraction(ndata[0]) + self.progress_bar.set_text(ndata[1]) + return True + return True diff --git a/src/fe/gtk/RcDotConf.py b/src/fe/gtk/RcDotConf.py deleted file mode 100644 index 716cd36..0000000 --- a/src/fe/gtk/RcDotConf.py +++ /dev/null @@ -1,331 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. - -import gtk -import os -import GLIScreen -import GLIUtility -from Widgets import Widgets - -class Panel(GLIScreen.GLIScreen): - """ - The make.conf section of the installer. - - @author: John N. Laliberte <allanonl@bu.edu> - @license: GPL - """ - # Attributes: - title="rc.conf Settings" - - # Operations - def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) - - vert = gtk.VBox(False, 10) # This box is content so it should fill space to force title to top - horiz = gtk.HBox(False, 10) - - content_str = """ -This is where you setup rc.conf.""" - # pack the description - vert.pack_start(gtk.Label(content_str), expand=False, fill=False, padding=10) - - # keymap - hbox = gtk.HBox(False, 0) - label = gtk.Label("KEYMAP:") - label.set_size_request(150, -1) - #label.set_justify(gtk.JUSTIFY_LEFT) - hbox.pack_start(label, expand=False, fill=False, padding=25) - self.keymap = gtk.combo_box_new_text() - self.keymap.set_name("KEYMAP") - self.keymap.set_size_request(150, -1) - hbox.pack_start(self.keymap, expand=False, fill=False, padding=5) - vert.pack_start(hbox,expand=False,fill=False,padding=0) - - # set_windowskeys - hbox = gtk.HBox(False, 0) - label = gtk.Label("SET_WINDOWKEYS:") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=25) - self.windowkeys = gtk.combo_box_new_text() - self.windowkeys.set_name("SET_WINDOWKEYS") - self.windowkeys.set_size_request(150, -1) - hbox.pack_start(self.windowkeys, expand=False, fill=False, padding=5) - vert.pack_start(hbox,expand=False,fill=False,padding=0) - - # extended_keymaps - hbox = gtk.HBox(False, 0) - label = gtk.Label("EXTENDED_KEYMAPS:") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=25) - self.extended_keymaps = gtk.Entry() - self.extended_keymaps.set_name("EXTENDED_KEYMAPS") - self.extended_keymaps.set_size_request(150, -1) - hbox.pack_start(self.extended_keymaps, expand=False, fill=False, padding=5) - vert.pack_start(hbox,expand=False,fill=False,padding=0) - - # consolefont - hbox = gtk.HBox(False, 0) - label = gtk.Label("CONSOLEFONT:") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=25) - self.consolefont = gtk.combo_box_new_text() - self.consolefont.set_name("CONSOLEFONT") - self.consolefont.set_size_request(150, -1) - hbox.pack_start(self.consolefont, expand=False, fill=False, padding=5) - vert.pack_start(hbox,expand=False,fill=False,padding=0) - - # consoletranslation - hbox = gtk.HBox(False, 0) - label = gtk.Label("CONSOLETRANSLATION:") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=25) - self.consoletranslation = gtk.combo_box_new_text() - self.consoletranslation.set_name("CONSOLETRANSLATION") - self.consoletranslation.set_size_request(150, -1) - hbox.pack_start(self.consoletranslation, expand=False, fill=False, padding=5) - vert.pack_start(hbox,expand=False,fill=False,padding=0) - - # clock - hbox = gtk.HBox(False, 0) - label = gtk.Label("CLOCK:") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=25) - self.clock = gtk.combo_box_new_text() - self.clock.set_name("CLOCK") - self.clock.set_size_request(150, -1) - hbox.pack_start(self.clock, expand=False, fill=False, padding=5) - vert.pack_start(hbox,expand=False,fill=False,padding=0) - - # editor - hbox = gtk.HBox(False, 0) - label = gtk.Label("EDITOR:") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=25) - self.editor = gtk.combo_box_entry_new_text() - self.editor.set_name("EDITOR") - self.editor.set_size_request(150, -1) - hbox.pack_start(self.editor, expand=False, fill=False, padding=5) - vert.pack_start(hbox,expand=False,fill=False,padding=0) - - # protocols - hbox = gtk.HBox(False, 0) - label = gtk.Label("PROTOCOLS:") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=25) - self.protocols = gtk.Entry() - self.protocols.set_name("PROTOCOLS") - self.protocols.set_size_request(150, -1) - hbox.pack_start(self.protocols, expand=False, fill=False, padding=5) - vert.pack_start(hbox,expand=False,fill=False,padding=0) - - # displaymanager - hbox = gtk.HBox(False, 0) - label = gtk.Label("DISPLAYMANAGER:") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=25) - self.displaymanager = gtk.combo_box_new_text() - self.displaymanager.set_name("DISPLAYMANAGER") - self.displaymanager.set_size_request(150, -1) - hbox.pack_start(self.displaymanager, expand=False, fill=False, padding=5) - vert.pack_start(hbox,expand=False,fill=False,padding=0) - - # xsession - hbox = gtk.HBox(False, 0) - label = gtk.Label("XSESSION:") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=25) - self.xsession = gtk.combo_box_entry_new_text() - self.xsession.set_name("XSESSION") - self.xsession.set_size_request(150, -1) - hbox.pack_start(self.xsession, expand=False, fill=False, padding=5) - vert.pack_start(hbox,expand=False,fill=False,padding=0) - - # populate the gui elements - self.populate_keymap_combo() - self.populate_windowkeys_combo() - self.populate_consolefont_combo() - self.populate_consoletranslation_combo() - self.populate_clock_combo() - self.populate_editor_combo() - self.protocols.set_text("1 2") - self.populate_displaymanager_combo() - self.populate_xsession_combo() - - self.add_content(vert) - - # setup the types of gui elements for access later - self.data = {self.keymap:"combo", - self.windowkeys:"combo", - self.extended_keymaps:"entry", - self.consolefont:"combo", - self.consoletranslation:"combo", - self.clock:"combo", - self.editor:"comboentry", - self.protocols:"entry", - self.displaymanager:"combo", - self.xsession:"comboentry" - } - - - def populate_keymap_combo(self, default="us"): - # Adds all the keymaps to the dropdown - keymaps = GLIUtility.generate_keymap_list() - - for i in range(len(keymaps)): - keymap = keymaps[i] - self.keymap.append_text(keymap) - - # select the default - if keymap == default: - self.keymap.set_active(i) - - def populate_windowkeys_combo(self, default=1): - self.windowkeys.append_text("No") - self.windowkeys.append_text("Yes") - self.windowkeys.set_active(default) - - def populate_consolefont_combo(self, default="default8x16"): - # Adds all the consolefonts - consolefonts = GLIUtility.generate_consolefont_list() - for i in range(len(consolefonts)): - consolefont = consolefonts[i] - self.consolefont.append_text(consolefont) - - # select the default - if consolefont == default: - self.consolefont.set_active(i) - - def populate_consoletranslation_combo(self, default=0): - self.consoletranslation.append_text("commented out") - - consoletranslations = GLIUtility.generate_consoletranslation_list() - - for i in range(len(consoletranslations)): - consoletran = consoletranslations[i] - self.consoletranslation.append_text(consoletran) - - self.consoletranslation.set_active(default) - - def populate_clock_combo(self, default=0): - self.clock.append_text("UTC") - self.clock.append_text("local") - self.clock.set_active(default) - - def populate_editor_combo(self,default=0): - self.editor.append_text("/bin/nano") - self.editor.append_text("/usr/bin/vim") - self.editor.append_text("/usr/bin/emacs") - self.editor.set_active(default) - - def populate_displaymanager_combo(self,default=0): - self.displaymanager.append_text("commented out") - self.displaymanager.append_text("xdm") - self.displaymanager.append_text("kdm") - self.displaymanager.append_text("gdm") - self.displaymanager.append_text("entrance") - self.displaymanager.set_active(0) - - def populate_xsession_combo(self,default=-1): - self.xsession.append_text("Gnome") - self.xsession.append_text("fluxbox") - self.xsession.append_text("Xsession") - self.xsession.set_active(-1) - - def get_combo_current_text(self, widget): - model = widget.get_model() - active = widget.get_active() - - return model[active][0] - - def set_combo_current_text(self, widget , text): - if text=="##commented##": text = "commented out" - # need to find the element in the combo box - # that they selected in the file, and activate it. - #iter = widget.get_active_iter() - model = widget.get_model() - iter = model.get_iter_first() - - i=0 # keep track of what to set active. - while iter != None: - # retrieve the text and test. - #print model.get_value(iter,0) - # if the value in the combobox equals whats in the xmlfile, - # select it! - if model.get_value(iter,0) == text: - widget.set_active(i) - - iter = model.iter_next(iter) - i+=1 - - def generate_rc_conf_dictionary(self): - rc_conf = {} - - for item in self.data.keys(): - # depending on what kind of gui element it is, - # we need to get the data out of it differently. - # equivalent of a switch statement in python... - result = { - 'combo': lambda item: self.get_combo_current_text(item), - 'entry': lambda item: item.get_text(), - 'comboentry': lambda item: item.get_child().get_text() - }[self.data[item]](item) - - # put it into the dictionary to be returned - # consoletransation / displaymanager can be commented out - # if result is commented out, set it to the 'special' string - # so _edit_config can know to comment it out. - if result == "commented out": - result = "##commented##" - - rc_conf[item.get_name()] = result - - - return rc_conf - - def load_rc_conf_dictionary(self, rc_conf): - for item in self.data.keys(): - # depending on what kind of gui element it is, - # we need to get the data out of it differently. - # equivalent of a switch statement in python... - try: - result = { - 'combo': lambda item: self.set_combo_current_text(item,rc_conf[item.get_name()]), - 'entry': lambda item: item.set_text(rc_conf[item.get_name()]), - 'comboentry': lambda item: item.get_child().set_text(rc_conf[item.get_name()]) - }[self.data[item]](item) - except KeyError: - # that value didn't exist in the stored profile - # debugging only here - #print "KeyError" - pass - - def activate(self): - # FIXME: <codeman> this is a temp hack fix for rc.conf as it will not work with new baselayout. - self.etc_files = self.controller.install_profile.get_etc_files() - if not "rc.conf" in self.etc_files: - self.etc_files['rc.conf'] = {} - rc_conf = self.etc_files['rc.conf'] - self.load_rc_conf_dictionary(rc_conf) - #print "loaded: "+str(rc_conf) - - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True - self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - - def deactivate(self): - value = True - rc_conf = self.generate_rc_conf_dictionary() - #print "saving:"+str(rc_conf) - - try: - self.etc_files['rc.conf'] = rc_conf - self.controller.install_profile.set_etc_files(self.etc_files) - except: - msgbox=Widgets().error_Box("Error","An internal error occurred!") - msgbox.run() - msgbox.destroy() - return value diff --git a/src/fe/gtk/RootPass.py b/src/fe/gtk/RootPass.py new file mode 100644 index 0000000..8c3d397 --- /dev/null +++ b/src/fe/gtk/RootPass.py @@ -0,0 +1,76 @@ +# Copyright 1999-2005 Gentoo Foundation +# This source code is distributed under the terms of version 2 of the GNU +# General Public License as published by the Free Software Foundation, a copy +# of which can be found in the main directory of this project. + +import gtk +from GLIScreen import * +import GLIUtility +from ProgressDialog import * + +class Panel(GLIScreen): + + title = "Root Password" + _helptext = """ +<b><u>Root Password</u></b> + +Enter the password for the root user in your new install. Enter it again to \ +confirm it (to prevent typos). +""" + + def __init__(self, controller): + GLIScreen.__init__(self, controller) + + vert = gtk.VBox(False, 0) + vert.set_border_width(10) + + hbox = gtk.HBox(False, 0) + label = gtk.Label() + label.set_markup('<b>Enter a root password</b>') + hbox.pack_start(label, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=10) + + table = gtk.Table(2, 2, False) + table.set_row_spacings(5) + table.set_col_spacings(10) + + label = gtk.Label("Password") + label.set_alignment(0.0, 0.5) + table.attach(label, 0, 1, 0, 1) + self.entry_password = gtk.Entry() + self.entry_password.set_width_chars(30) + self.entry_password.set_visibility(False) + table.attach(self.entry_password, 1, 2, 0, 1) + + label = gtk.Label("Confirm") + label.set_alignment(0.0, 0.5) + table.attach(label, 0, 1, 1, 2) + self.entry_confirm = gtk.Entry() + self.entry_confirm.set_width_chars(30) + self.entry_confirm.set_visibility(False) + table.attach(self.entry_confirm, 1, 2, 1, 2) + + hbox = gtk.HBox(False) + hbox.set_border_width(15) + hbox.pack_start(table, fill=False, expand=False, padding=0) + vert.pack_start(hbox, expand=False, fill=False, padding=20) + + self.add_content(vert) + + def activate(self): + self.controller.SHOW_BUTTON_BACK = False + self.controller.SHOW_BUTTON_FORWARD = True + + def next(self): + if self.entry_password.get_text() == self.entry_confirm.get_text(): + if self.entry_password.get_text()[:3] == "$1$": + root_hash = self.entry_password.get_text() + else: + root_hash = GLIUtility.hash_password(self.entry_password.get_text()) + self.controller.install_profile.set_root_pass_hash(None, root_hash, None) + else: + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format="The passwords you entered do not match!") + msgdlg.run() + msgdlg.destroy() + return + self.controller.load_screen("Timezone") diff --git a/src/fe/gtk/RunInstall.py b/src/fe/gtk/RunInstall.py deleted file mode 100755 index 845aea8..0000000 --- a/src/fe/gtk/RunInstall.py +++ /dev/null @@ -1,251 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. - -import GLIInstallProfile -import GLIClientConfiguration -import GLIClientController -import GLIUtility -import gtk -import gobject -import sys -import time -import os -import select -import re - -class RunInstall(gtk.Window): - - which_step = 0 - install_done = False - install_fail = False - output_log_is_link = False - pulsing = False - outputfile_contents = [] - logfile_contents = [] - - def __init__(self, controller): - gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) - - self.controller = controller - self.connect("delete_event", self.delete_event) - self.connect("destroy", self.destroy) - self.set_default_size(800,600) - self.set_geometry_hints(None, min_width=800, min_height=600, max_width=800, max_height=600) - self.set_title("Gentoo Linux Installer") - - self.globalbox = gtk.VBox(False, 0) - self.globalbox.set_border_width(10) - - self.notebook = gtk.Notebook() - - self.logpage = gtk.VBox(False, 0) - self.logtextbuff = gtk.TextBuffer() - self.logtextbuff.set_text("") - self.logtextview = gtk.TextView(self.logtextbuff) - self.logtextview.set_editable(False) - self.logtextview.set_wrap_mode(gtk.WRAP_CHAR) - self.logtextviewscroll = gtk.ScrolledWindow() - self.logtextviewscroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - self.logtextviewscroll.add(self.logtextview) - self.logpage.pack_start(self.logtextviewscroll, expand=True, fill=True) - self.notebook.append_page(self.logpage, tab_label=gtk.Label("Log")) - - self.tailpage = gtk.VBox(False, 0) - self.textbuffer = gtk.TextBuffer() - self.textbuffer.set_text("") - self.textview = gtk.TextView(self.textbuffer) - self.textview.set_editable(False) - self.textview.set_wrap_mode(gtk.WRAP_CHAR) -# self.textbuffer.create_tag(tag_name="good", foreground="green") -# self.textbuffer.create_tag(tag_name="warn", foreground="yellow") -# self.textbuffer.create_tag(tag_name="bad", foreground="red") - self.textviewscroll = gtk.ScrolledWindow() - self.textviewscroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - self.textviewscroll.add(self.textview) - self.tailpage.pack_start(self.textviewscroll, expand=True, fill=True) - self.notebook.append_page(self.tailpage, tab_label=gtk.Label("Output")) - -# self.docpage = gtk.VBox(False, 0) - # documentation -# self.notebook.append_page(self.docpage, tab_label=gtk.Label("Documentation")) - - self.globalbox.add(self.notebook) - - # This one comes first because it needs to be at the bottom....yes, that confuses me too :P - self.progress = gtk.ProgressBar() - self.progress.set_orientation(gtk.PROGRESS_LEFT_TO_RIGHT) - self.progress.set_text("Preparing...") - self.globalbox.pack_end(self.progress, expand=False, fill=False, padding=10) - - self.subprogress = gtk.ProgressBar() - self.subprogress.set_orientation(gtk.PROGRESS_LEFT_TO_RIGHT) - self.subprogress.set_text("Working...") - self.subprogress.set_pulse_step(0.03) - self.globalbox.pack_end(self.subprogress, expand=False, fill=False, padding=10) - - self.add(self.globalbox) - self.make_visible() - - self.controller.cc.set_install_profile(self.controller.install_profile) - self.controller.cc.start_install() - - self.output_log = None - self.install_log = None - gobject.timeout_add(500, self.tail_outputfile) - gobject.timeout_add(500, self.tail_logfile) - gobject.timeout_add(500, self.poll_notifications) - - def poll_notifications(self): - if self.install_done: return False - notification = self.controller.cc.getNotification() - if notification == None: - if self.pulsing: - self.subprogress.pulse() - self.subprogress.set_text("Working...") - return True - ntype = notification.get_type() - ndata = notification.get_data() - if ntype == "exception": -# msgdlg = gtk.MessageDialog(parent=self, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format="An error occured during the install. Consult the output display for more information.") -# msgdlg.run() -# msgdlg.destroy() - error_msg = "Exception received:\n" + str(ndata) + "\nPlease submit a bug report (after searching to make sure it's not a known issue and verifying you didn't do something stupid) with the contents of /var/log/installer.log.failed, /tmp/installprofile.xml, the last ~50 lines of /tmp/compile_output.log, and the version of the installer you used (release or CVS snapshot w/ date)\n" - iter_end = self.textbuffer.get_iter_at_offset(-1) - self.textbuffer.insert(iter_end, error_msg, -1) - iter_end = self.textbuffer.get_iter_at_offset(-1) - self.textview.scroll_to_iter(iter_end, 0.0) - self.progress.set_fraction(1) - self.progress.set_text("Performing install failure cleanup") - self.controller.cc.start_failure_cleanup() - self.progress.set_text("Install failed!") - self.install_fail = True - return False - elif ntype == "int" and not self.install_fail: - if ndata == GLIClientController.NEXT_STEP_READY: - num_steps = self.controller.cc.get_num_steps() - if self.controller.cc.has_more_steps(): - next_step = self.controller.cc.get_next_step_info() -# print "Next step: " + next_step - self.progress.set_fraction(round(float(self.which_step)/num_steps, 2)) - self.progress.set_text(self.controller.cc.get_next_step_info()) - self.which_step += 1 - self.controller.cc.next_step() - self.pulsing = True - return True - elif ndata == GLIClientController.INSTALL_DONE: - self.install_done = True - self.progress.set_fraction(1) - self.progress.set_text("Install complete!") -# print "Install done!" -# msgdlg = gtk.MessageDialog(parent=self, type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_OK, message_format="Install completed successfully!") -# msgdlg.run() -# msgdlg.destroy() - return False - elif ntype == "progress": - self.pulsing = False - self.subprogress.set_fraction(ndata[0]) - self.subprogress.set_text(ndata[1]) - return True - return True - - def tail_outputfile(self): - if self.install_done: - self.output_log.close() - return False - if not self.output_log: - try: - self.output_log = open("/tmp/compile_output.log") - except: - return True - while 1: - line = self.output_log.readline() - if not line: - if not self.output_log_is_link and os.path.islink("/tmp/compile_output.log"): - filepos = self.output_log.tell() - self.output_log.close() - self.output_log = open("/tmp/compile_output.log") - self.output_log.seek(filepos) - self.output_log_is_link = True - continue - break - if len(self.outputfile_contents) >= 1000: - self.outputfile_contents.pop(0) - self.outputfile_contents.append(line) - self.textbuffer.set_text("".join(self.outputfile_contents)) - self.textview.scroll_to_iter(self.textbuffer.get_iter_at_offset(-1), 0.0) -# vadj = self.textviewscroll.get_vadjustment() -# iter_end = self.textbuffer.get_iter_at_offset(-1) -# self.textbuffer.insert(iter_end, line, -1) -# iter_end = self.textbuffer.get_iter_at_offset(-1) -# self.textview.scroll_to_iter(iter_end, 0.0) -# if vadj.value == vadj.upper: -# vadj = self.textviewscroll.get_vadjustment() -# vadj.value = vadj.upper -# self.textviewscroll.set_vadjustment(vadj) - return True - - def tail_logfile(self): - if self.install_done: - self.install_log.close() - return False - if not self.install_log: - try: - self.install_log = open(self.controller.client_profile.get_log_file()) - except: - return True - while 1: - line = self.install_log.readline() - if not line: break - if len(self.logfile_contents) >= 1000: - self.logfile_contents.pop(0) - self.logfile_contents.append(line) - self.logtextbuff.set_text("".join(self.logfile_contents)) - self.logtextview.scroll_to_iter(self.logtextbuff.get_iter_at_offset(-1), 0.0) -# vadj = self.logtextviewscroll.get_vadjustment() -# vvalue = vadj.value -# vmax = vadj.upper - vadj.page_size -# print "vadj before adding text: upper - " + str(vadj.upper) + ", lower - " + str(vadj.lower) + ", max - " + str(vadj.upper - vadj.page_size) + ", value - " + str(vadj.value) -# iter_end = self.logtextbuff.get_iter_at_offset(-1) -# self.logtextbuff.insert(iter_end, line, -1) -# iter_end = self.logtextbuff.get_iter_at_offset(-1) -# self.logtextview.scroll_to_iter(iter_end, 0.0) -# if vvalue == vmax: -# print "vadj after adding text: upper - " + str(vadj.upper) + ", lower - " + str(vadj.lower) + ", max - " + str(vadj.upper - vadj.page_size) + ", value - " + str(vadj.value) -# vadj.value = vadj.upper - vadj.page_size -# print "vadj after adjusting: upper - " + str(vadj.upper) + ", lower - " + str(vadj.lower) + ", max - " + str(vadj.upper - vadj.page_size) + ", value - " + str(vadj.value) -# print - return True - - def make_visible(self): - self.show_all() - self.present() - - def make_invisible(self): - self.hide_all() - - def delete_event(self, widget, event, data=None): - # If you return FALSE in the "delete_event" signal handler, - # GTK will emit the "destroy" signal. Returning TRUE means - # you don't want the window to be destroyed. - # This is useful for popping up 'are you sure you want to quit?' - # type dialogs. -# print "delete event occurred" - # Change TRUE to FALSE and the main window will be destroyed with - # a "delete_event". - if not self.install_done and not self.install_fail: - msgdlg = gtk.MessageDialog(parent=self, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("Do you really want to exit the installer before the install is complete?")) - resp = msgdlg.run() - msgdlg.destroy() - if resp == gtk.RESPONSE_YES: - return False - else: - return True - return False - - # Destroy callback - def destroy(self, widget, data=None): -# print "destroy function" - gtk.main_quit() - return True diff --git a/src/fe/gtk/Stage.py b/src/fe/gtk/Stage.py index fe91042..946b43b 100644 --- a/src/fe/gtk/Stage.py +++ b/src/fe/gtk/Stage.py @@ -4,129 +4,77 @@ # of which can be found in the main directory of this project. import gtk -import GLIScreen +from GLIScreen import * import GLIUtility import URIBrowser +from ProgressDialog import * -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): title = "Stage Selection" - active_selection = 1 - radio_stages = [None, None, None, None] _helptext = """ -<b><u>Stage</u></b> - -Gentoo has traditionally provided three differently-sized stage tarballs to -install Gentoo. - -The Stage 1 is the smallest to download but takes the longest to compile because -it builds all the standard C libraries and compiler from scratch (meant for -those who are totally obsessed with optimization). - -The Stage 2 tarball is slightly bigger but still requires the compilation of the -base system from scratch. This stage is rarely used by anybody. - -The Stage 3 tarball is the recommended tarball for Gentoo instllations. It -contains a complete base system and is already optimized for whatever -architecture/processor you download the stage3 for. While Gentoo still offers -stage1 and stage2 tarballs, the official installation method uses the stage3 -tarball. - -The Livecd also provides many programs using GRP, which will package up the -livecd files and install them as binaries. This is useful for getting large -applications like gnome installed quickly. If doing a GRP install, the Dynamic -stage3 is also recommended. Dynamic creates a stage3 tarball on the fly from -the contents of the Livecd, and does not involve any downloading, but can be a -bit slow. - -<b>For those doing a networkless installation, you must select "Dynamic" and -"GRP Install" from the Stage screen.</b> Otherwise select a stage and click -the "..." to browse for a tarball location. - -In the URI Browser, select the type (such as http) and then press the "..." next -to Host to choose a mirror address. Once your host has been selected the path -below should change automatically and you should be able to browse through the -folders to find your stage tarball. The path to the tarballs is usually -/releases/{architecture ex. x86}/current/stages/{sub-arch}/filename.tar.bz2 +<b><u>Stage Selection</u></b> + +Installing from stage3 is the recommended (and only supported) method for Gentoo \ +installations. It contains a complete base system and is already optimized for \ +whatever architecture/processor specified in the filename. While Gentoo still \ +offers stage1 and stage2 tarballs, the official installation method uses only \ +the stage3 tarball. + +You have the option of either downloading a stage from the internet or letting \ +the installer create a stage3 equivalent on the fly from the contents of the \ +LiveCD, and does not involve any downloading, but it can be a bit slow. + +To us the URI Browser, select the type (such as http) and then press the "..." next \ +to Host to choose a mirror address. Once your host has been selected the path \ +below should change automatically and you should be able to browse through the \ +folders to find your stage tarball. The path to the tarballs is usually \ +/releases/<architecture ex. x86>/current/stages/<subarch>/filename.tar.bz2 """ def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) - - self.has_systempkgs = GLIUtility.is_file("/usr/livecd/systempkgs.txt") + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 0) vert.set_border_width(10) - content_str = """Here, you will select which stage you would like to start your install from. -Each option has a brief description beside it. -""" - content_label = gtk.Label(content_str) - vert.pack_start(content_label, expand=False, fill=False, padding=0) - self.radio_stages[1] = gtk.RadioButton(None, "Stage 1") - self.radio_stages[1].set_name("1") - self.radio_stages[1].connect("toggled", self.stage_selected, "1") - self.radio_stages[1].set_size_request(100, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.radio_stages[1], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("The entire system will be compiled from scratch with your CHOST and CFLAGS settings (unsupported)") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - self.radio_stages[2] = gtk.RadioButton(self.radio_stages[1], "Stage 2") - self.radio_stages[2].set_name("2") - self.radio_stages[2].connect("toggled", self.stage_selected, "2") - self.radio_stages[2].set_size_request(100, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.radio_stages[2], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("Most of the system will be compiled with your CHOST and CFLAGS settings. Don't use this option unless you have a good reason (unsupported)") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.radio_stages[3] = gtk.RadioButton(self.radio_stages[1], "Stage 3") - self.radio_stages[3].set_name("3") - self.radio_stages[3].connect("toggled", self.stage_selected, "3") - self.radio_stages[3].set_size_request(100, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.radio_stages[3], expand=False, fill=False, padding=5) - tmplabel = gtk.Label("The base system will be installed using precompiled packages. You can recompile later with your custom settings if you choose. This is the fastest option") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.check_grp = gtk.CheckButton("GRP Install") - self.check_grp.set_sensitive(False) - self.check_grp.set_size_request(100, -1) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.check_grp, expand=False, fill=False, padding=5) - tmplabel = gtk.Label("Any extra packages installed (beyond the stage3) will be installed using binaries from the LiveCD that you are installing from") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - self.check_dynamic = gtk.CheckButton("Dynamic") - self.check_dynamic.set_sensitive(False) - self.check_dynamic.connect("toggled", self.dynamic_checked) - self.check_dynamic.set_size_request(100, -1) - if not self.has_systempkgs: - self.check_dynamic.set_sensitive(False) - hbox = gtk.HBox(False, 0) - hbox.pack_start(self.check_dynamic, expand=False, fill=False, padding=5) - tmplabel = gtk.Label("The stage3 will be generated from the packages on the LiveCD") - tmplabel.set_line_wrap(True) - hbox.pack_start(tmplabel, expand=False, fill=False, padding=20) - vert.pack_start(hbox, expand=False, fill=False, padding=10) - - hbox = gtk.HBox(False, 0) - hbox.pack_start(gtk.Label("Stage tarball URI:"), expand=False, fill=False, padding=5) - self.entry_stage_tarball_uri = gtk.Entry() - self.entry_stage_tarball_uri.set_width_chars(50) - hbox.pack_start(self.entry_stage_tarball_uri, expand=False, fill=False, padding=10) - self.browse_uri = gtk.Button(" ... ") - self.browse_uri.connect("clicked", self.browse_uri_clicked) - hbox.pack_start(self.browse_uri, expand=False, fill=False, padding=5) - vert.pack_end(hbox, expand=False, fill=False, padding=0) + if self.controller.install_type == "networkless": + hbox = gtk.HBox(False, 0) + label = gtk.Label() + label.set_markup('<b>Your base system will be created from files on the LiveCD.</b>') + hbox.pack_start(label, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=10) + else: + hbox = gtk.HBox(False, 0) + label = gtk.Label() + label.set_markup('<b>Choose a method for creating the base system</b>') + hbox.pack_start(label, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=10) + + self.radio_fetchstage = gtk.RadioButton(None, "Fetch stage from internet") + self.radio_fetchstage.set_name("fetch") + self.radio_fetchstage.connect("toggled", self.stage_selected, "fetch") + hbox = gtk.HBox(False, 0) + hbox.pack_start(self.radio_fetchstage, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=10) + + hbox = gtk.HBox(False, 0) + hbox.pack_start(gtk.Label(" "), expand=False, fill=False, padding=15) + hbox.pack_start(gtk.Label("URI:"), expand=False, fill=False, padding=5) + self.entry_stage_tarball_uri = gtk.Entry() + self.entry_stage_tarball_uri.set_width_chars(50) + hbox.pack_start(self.entry_stage_tarball_uri, expand=False, fill=False, padding=0) + self.browse_uri = gtk.Button("Browse") + self.browse_uri.connect("clicked", self.browse_uri_clicked) + hbox.pack_start(self.browse_uri, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=0) + + self.radio_dynamicstage = gtk.RadioButton(self.radio_fetchstage, "Build stage from files on LiveCD") + self.radio_dynamicstage.set_name("dynamic") + self.radio_dynamicstage.connect("toggled", self.stage_selected, "dynamic") + hbox = gtk.HBox(False, 0) + hbox.pack_start(self.radio_dynamicstage, expand=False, fill=False, padding=5) + vert.pack_start(hbox, expand=False, fill=False, padding=40) self.add_content(vert) @@ -135,74 +83,39 @@ Each option has a brief description beside it. uribrowser.run(self.entry_stage_tarball_uri.get_text()) def stage_selected(self, widget, data=None): - self.active_selection = int(data) - self.entry_stage_tarball_uri.set_sensitive(True) - if int(data) == 3: - self.check_grp.set_sensitive(True) - if self.has_systempkgs: - self.check_dynamic.set_sensitive(True) - if self.check_dynamic.get_active(): - self.entry_stage_tarball_uri.set_sensitive(False) - self.browse_uri.set_sensitive(False) + if data == "fetch": + self.entry_stage_tarball_uri.set_sensitive(True) + self.browse_uri.set_sensitive(True) else: - self.check_grp.set_sensitive(False) - self.check_dynamic.set_sensitive(False) - - def dynamic_checked(self, widget): - if widget.get_active() and self.active_selection == 3: self.entry_stage_tarball_uri.set_sensitive(False) self.browse_uri.set_sensitive(False) - else: - self.entry_stage_tarball_uri.set_sensitive(True) - self.browse_uri.set_sensitive(True) def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_BACK = False self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - self.active_selection = int(self.controller.install_profile.get_install_stage()) or 3 - self.radio_stages[self.active_selection].set_active(True) - self.entry_stage_tarball_uri.set_text(self.controller.install_profile.get_stage_tarball_uri()) - self.check_grp.set_active(self.controller.install_profile.get_grp_install()) - self.check_dynamic.set_active(self.controller.install_profile.get_dynamic_stage3()) + if self.controller.install_type != "networkless": + self.entry_stage_tarball_uri.set_text(self.controller.install_profile.get_stage_tarball_uri()) + + def next(self): if self.controller.install_type == "networkless": - self.radio_stages[1].set_sensitive(False) - self.radio_stages[2].set_sensitive(False) - self.entry_stage_tarball_uri.set_sensitive(False) - self.browse_uri.set_sensitive(False) - self.check_grp.set_active(True) - self.check_grp.set_sensitive(False) - self.check_dynamic.set_active(True) - self.check_dynamic.set_sensitive(False) - - def deactivate(self): - if not self.check_dynamic.get_active(): - if not self.entry_stage_tarball_uri.get_text(): - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="You did not enter a stage tarball URI. You cannot complete an installation until you set this value. Continue?") - resp = msgdlg.run() - msgdlg.destroy() - if resp == gtk.RESPONSE_NO: - return False - elif not GLIUtility.validate_uri(self.entry_stage_tarball_uri.get_text()): - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="The stage tarball URI you entered does not exist. You cannot complete an installation until this value is a valid. Continue?") - resp = msgdlg.run() - msgdlg.destroy() - if resp == gtk.RESPONSE_NO: - return False - elif self.active_selection == 3 and self.check_grp.get_active() and self.has_systempkgs: - msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="When doing a GRP install, it is recommended to use the Dynamic option instead of selecting your own tarball. Continue?") - resp = msgdlg.run() - msgdlg.destroy() - if resp == gtk.RESPONSE_NO: - return False - self.controller.install_profile.set_install_stage(None, self.active_selection, None) - if self.active_selection == 3: - self.controller.install_profile.set_grp_install(None, self.check_grp.get_active(), None) - self.controller.install_profile.set_dynamic_stage3(None, self.check_dynamic.get_active(), None) + self.controller.install_profile.set_install_stage(None, 3, None) + self.controller.install_profile.set_dynamic_stage3(None, True, None) + self.controller.install_profile.set_grp_install(None, True, None) else: - self.controller.install_profile.set_grp_install(None, False, None) - try: self.controller.install_profile.set_stage_tarball_uri(None, self.entry_stage_tarball_uri.get_text(), None) - except: pass - return True + if self.radio_fetchstage.get_active(): + uri = self.entry_stage_tarball_uri.get_text().strip() + if not uri: + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="You did not enter a stage tarball URI. You cannot continue until you set this value.") + resp = msgdlg.run() + msgdlg.destroy() + return + if not GLIUtility.validate_uri(uri): + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="The stage tarball URI you entered does not exist or is invalid. You cannot continue until this value is valid") + resp = msgdlg.run() + msgdlg.destroy() + return + self.controller.install_profile.set_install_stage(None, 3, None) + self.controller.install_profile.set_dynamic_stage3(None, self.radio_dynamicstage.get_active(), None) + self.controller.install_profile.set_stage_tarball_uri(None, self.entry_stage_tarball_uri.get_text(), None) + + self.controller.load_screen("PortageTree") diff --git a/src/fe/gtk/StartupServices.py b/src/fe/gtk/StartupServices.py index 5efee59..ba7060a 100644 --- a/src/fe/gtk/StartupServices.py +++ b/src/fe/gtk/StartupServices.py @@ -5,47 +5,54 @@ import gtk import gobject -import GLIScreen +import os +from GLIScreen import * from gettext import gettext as _ -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): title = _("Startup Services") _helptext = """ <b><u>Startup Services</u></b> -If you installed gnome, kde, or another graphical desktop, be sure to select xdm -if you want to startup into your graphical environment. - -sshd is also a recommended service already installed in the base system. +On this screen, you can select services that you would like to startup at boot. \ +Common choices are sshd (remote access) and xdm (graphical login...choose this \ +for kdm, gdm, and entrance, as well). Only services that are provided by a \ +package you already have installed and are not already in a runlevel are \ +displayed. """ def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 0) vert.set_border_width(10) - self.services = None - self.choice_list = [("alsasound", _(u"Loads ALSA modules and restores mixer levels")), - ("apache", _(u"Common web server (version 1.x)")), - ("apache2", _(u"Common web server (version 2.x)")), - ("distccd", _(u"Allows your system to help other systems compile")), - ("hdparm", _(u"Makes it easy to set drive parameters automatically at boot")), - ("portmap", _(u"Necessary for mounting NFS shares")), - ("proftpd", _(u"Common FTP server")), - ("sshd", _(u"OpenSSH server (allows remote logins)")), - ("xfs", _(u"X Font Server (available if xorg-x11 compiled with USE=font-server)")), - ("xdm", _(u"Gives you a graphical login which then starts X"))] +# self.cur_runlevel = "default" +# self.runlevels = {} + self.existing_services = [] + for runlevel in os.listdir(self.controller.install_profile.get_root_mount_point() + "/etc/runlevels/"): +# self.runlevels[runlevel] = os.listdir(self.controller.install_profile.get_root_mount_point() + "/etc/runlevels/" + runlevel) + for service in os.listdir(self.controller.install_profile.get_root_mount_point() + "/etc/runlevels/" + runlevel): + self.existing_services.append(service) + self.new_services = [] + for service in os.listdir(self.controller.install_profile.get_root_mount_point() + "/etc/init.d/"): + if service.endswith(".sh"): continue + if not service in self.existing_services: + self.new_services.append(service) + self.new_services.sort() - content = """ -On this screen, you can select services that you would like to startup at boot. -Common choices are sshd (remote access) and xdm (graphical login...choose this -for kdm, gdm, and entrance, as well). Adding a service here does not -automatically emerge the corresponding package. You will need to add it on the -Extra Packages screen yourself. -""" - content_label = gtk.Label(content) - vert.pack_start(content_label, expand=False, fill=False, padding=0) + self.choice_list = { + "alsasound": _(u"Loads ALSA modules and restores mixer levels"), + "apache": _(u"Common web server (version 1.x)"), + "apache2": _(u"Common web server (version 2.x)"), + "distccd": _(u"Allows your system to help other systems compile"), + "hdparm": _(u"Makes it easy to set drive parameters automatically at boot"), + "portmap": _(u"Necessary for mounting NFS shares"), + "proftpd": _(u"Common FTP server"), + "sshd": _(u"OpenSSH server (allows remote logins)"), + "xfs": _(u"X Font Server (available if xorg-x11 compiled with USE=font-server)"), + "xdm": _(u"Gives you a graphical login which then starts X") + } self.treedata = gtk.ListStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING) self.treeview = gtk.TreeView(self.treedata) @@ -60,12 +67,24 @@ Extra Packages screen yourself. # column.set_resizable(True) self.treeview.append_column(column) self.treewindow = gtk.ScrolledWindow() - self.treewindow.set_size_request(-1, 180) + self.treewindow.set_size_request(-1, 400) self.treewindow.set_shadow_type(gtk.SHADOW_IN) self.treewindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.treewindow.add(self.treeview) vert.pack_start(self.treewindow, expand=False, fill=False, padding=10) + self.services = self.controller.install_profile.get_services() + if self.services: + if isinstance(self.services, str): + self.services = self.services.split(',') + else: + self.services = list(self.services) + else: + self.services = [] + self.treedata.clear() + for service in self.new_services: + self.treedata.append([(service in self.services), service, self.choice_list.get(service, "")]) + self.add_content(vert) def flag_toggled(self, cell, path): @@ -79,26 +98,18 @@ Extra Packages screen yourself. if service in self.services: self.services.pop(self.services.index(service)) - def deactivate(self): - self.controller.install_profile.set_services(None, ",".join(self.services), None) - return True - def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_BACK = False self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - self.services = self.controller.install_profile.get_services() - if self.services: - if isinstance(self.services, str): - self.services = self.services.split(',') - else: - self.services = list(self.services) + def next(self): + self.controller.install_profile.set_services(None, ",".join(self.services), None) + progress = ProgressDialog(self.controller, ("set_services", ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("OtherSettings") else: - self.services = [] - self.treedata.clear() - for choice in self.choice_list: - self.treedata.append([(choice[0] in self.services), choice[0], choice[1]]) + GLIScreen.progress_callback(self, result, data) diff --git a/src/fe/gtk/Template.py b/src/fe/gtk/Template.py index 3cbd535..3dea729 100644 --- a/src/fe/gtk/Template.py +++ b/src/fe/gtk/Template.py @@ -4,15 +4,15 @@ # of which can be found in the main directory of this project. import gtk -import GLIScreen +from GLIScreen import * from gettext import gettext as _ -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): title = "Welcome to the Gentoo Linux Installer" def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 0) vert.set_border_width(10) @@ -38,8 +38,5 @@ button to load your previous settings as defaults. self.add_content(vert) def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True self.controller.SHOW_BUTTON_BACK = False self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False diff --git a/src/fe/gtk/Timezone.py b/src/fe/gtk/Timezone.py index 7b49d9b..2aef63e 100644 --- a/src/fe/gtk/Timezone.py +++ b/src/fe/gtk/Timezone.py @@ -4,14 +4,14 @@ # of which can be found in the main directory of this project. import gtk -import GLIScreen +from GLIScreen import * import os import string import timezone_map_gui import zonetab from Widgets import Widgets -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): """ The Timezone section of the installer. @@ -23,17 +23,17 @@ class Panel(GLIScreen.GLIScreen): _helptext = """ <b><u>Timezone</u></b> -You're joking right? Pick your timezone, or pick UTC. If you dual-boot with -Windows you'll want to choose your local timezone. If your BIOS clock is set to -local time you'll also want to chosoe your local timezone. +Pick your timezone, or pick UTC. If you dual-boot with Windows you'll want to \ +choose your local timezone. If your BIOS clock is set to local time you'll \ +also want to choose your local timezone. -If you choose a local timezone, you'll want to choose "local" for the clock +If you choose a local timezone, you'll want to choose "local" for the clock \ setting later on in the Other Settings screen. """ # Operations def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 10) # This box is content so it should fill space to force title to top horiz = gtk.HBox(False, 10) @@ -53,21 +53,27 @@ setting later on in the Other Settings screen. self.map.default = loaded except: # this isn't a valid timezone entry, or its not set! - print "Invalid timezone or timezone not set." +# print "Invalid timezone or timezone not set." + pass - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_BACK = False self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False + + def previous(self): + self.controller.load_screen("RootPass") - def deactivate(self): + def next(self): try: # retrieve the current selected timezone self.controller.install_profile.set_time_zone(None, self.map.getCurrent().tz, None) except: - # page loading for the first time, no timezone is selected for - # NoneType pass - - return True + progress = ProgressDialog(self.controller, ("set_root_password", "set_timezone"), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("Kernel") + else: + GLIScreen.progress_callback(self, result, data) + diff --git a/src/fe/gtk/Users.py b/src/fe/gtk/Users.py index 06ac783..1d01904 100644 --- a/src/fe/gtk/Users.py +++ b/src/fe/gtk/Users.py @@ -6,11 +6,11 @@ import gtk,gobject import os import re -import GLIScreen +from GLIScreen import * from Widgets import Widgets import GLIUtility -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): """ The Users section of the installer. @@ -23,28 +23,19 @@ class Panel(GLIScreen.GLIScreen): columns = [] users = [] current_users=[] - root_verified = False _helptext = """ <b><u>Users</u></b> -Start off by setting the root password. This will be the root password on the -newly-installed system, *NOT* the Livecd. Type it again to verify, and then -click the Verify button to check your typing. - -Once you have clicked Verify you can then click Add user to add a normal user. - -Adding a User for Daily Use: - -Working as root on a Unix/Linux system is dangerous and should be avoided as -much as possible. Therefore it is strongly recommended to add a user for +Working as root on a Unix/Linux system is dangerous and should be avoided as \ +much as possible. Therefore it is strongly recommended to add a user for \ day-to-day use. -Enter the username and password in respective boxes. Make sure to type your -password carefully, it is not verified. All other fields are optional, but +Enter the username and password in respective boxes. Make sure to type your \ +password carefully, it is not verified. All other fields are optional, but \ setting groups is highly recommended. -The groups the user is member of define what activities the user can perform. -The following table lists a number of important groups you might wish to use: +The groups the user is member of define what activities the user can perform. \ +The following table lists a number of important groups you might wish to use: \ <u>Group</u> <u>Description</u> audio be able to access the audio devices @@ -59,17 +50,17 @@ wheel be able to use su Enter them in a comma-separated list in the groups box. -Optinally you may also specify the user's shell. The default is /bin/bash. If -you want to disable the user from logging in you can set it to /bin/false. You -can also specify the user's home directory (default is /home/username), userid +Optinally you may also specify the user's shell. The default is /bin/bash. If \ +you want to disable the user from logging in you can set it to /bin/false. You \ +can also specify the user's home directory (default is /home/username), userid \ (default is the next available ID), and a comment describing the user. -Make sure to click Accept Changes to save the changes to your user. They will +Make sure to click Accept Changes to save the changes to your user. They will \ then show up in the list. """ - + def __init__(self,controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) content_str = "User screen!" @@ -103,48 +94,32 @@ then show up in the list. self.treewindow.add(self.treeview) #vert.pack_start(self.treewindow, expand=False, fill=False, padding=0) - # now add in the gtk.Notebook - self.notebook = gtk.Notebook() - self.notebook.set_tab_pos(gtk.POS_BOTTOM) - #notebook.set_size_request(-1, -1) - self.notebook.show() - self.notebook.set_show_tabs(False) - self.notebook.set_show_border(False) - #notebookshow_border = True - frame = gtk.Frame("") frame.set_border_width(10) frame.set_size_request(100, 75) frame.show() frame_vert = gtk.VBox(False,0) - hbox = gtk.HBox(False, 0) + vbox = gtk.VBox(False, 0) #frame.add(frame_vert) - vbox = gtk.VBox(False,0) - # setup the action buttons - reset = gtk.Button("Root Password", stock=None) - reset.connect("clicked", self.root, "root") - reset.set_size_request(150, -1) - reset.show() - vbox.pack_start(reset, expand=False, fill=False, padding=5) - + hbox = gtk.HBox(False) add = gtk.Button("Add user", stock=None) add.connect("clicked", self.addu, "add") add.set_size_request(150, -1) add.show() - vbox.pack_start(add, expand=False, fill=False, padding=5) + hbox.pack_start(add, expand=False, fill=False, padding=5) delete = gtk.Button("Delete user", stock=None) delete.connect("clicked", self.delete, "delete") delete.set_size_request(150, -1) delete.show() - vbox.pack_start(delete, expand=False, fill=False, padding=5) + hbox.pack_start(delete, expand=False, fill=False, padding=5) - hbox.pack_start(self.treewindow, expand=True, fill=True, padding=5) - hbox.pack_start(vbox, expand=False, fill=False, padding=5) + vbox.pack_start(self.treewindow, expand=True, fill=True, padding=5) + vbox.pack_start(hbox, expand=False, fill=False, padding=5) - vert.pack_start(hbox, expand=False, fill=False, padding=0) + vert.pack_start(vbox, expand=False, fill=False, padding=0) # setup the first page frame_vert = gtk.VBox(False,0) @@ -166,65 +141,14 @@ then show up in the list. hbox.pack_start(label, expand=False, fill=False, padding=5) frame_vert.add(hbox) - hbox = gtk.HBox(False, 0) - label = gtk.Label("Root Password") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=5) - self.root1 = gtk.Entry() - self.root1.set_visibility(False) - self.root1.set_size_request(150, -1) - hbox.pack_start(self.root1, expand=False, fill=False, padding=5) - frame_vert.add(hbox) - - hbox = gtk.HBox(False, 0) - label = gtk.Label("Verify Password") - label.set_size_request(150, -1) - label.show() - hbox.pack_start(label, expand=False, fill=False, padding=5) - self.root2 = gtk.Entry() - self.root2.set_visibility(False) - self.root2.set_size_request(150, -1) - hbox.pack_start(self.root2, expand=False, fill=False, padding=5) - verify = gtk.Button("Verify!") - verify.connect("clicked", self.verify_root_password, "delete") - verify.set_size_request(150, -1) - hbox.pack_start(verify, expand=False, fill=False, padding=5) - self.verified = gtk.Image() - self.verified.set_from_stock(gtk.STOCK_CANCEL, gtk.ICON_SIZE_SMALL_TOOLBAR) - hbox.pack_start(self.verified, expand=False, fill=False, padding=5) - frame_vert.add(hbox) - - # two more blank hboxes - hbox = gtk.HBox(False, 0) - # reset button if they want to reset the root password - # loaded from a user profile - self.reset_pass2 = gtk.Button("Reset root password") - self.reset_pass2.connect("clicked", self.reset, "root") - self.reset_pass2.set_size_request(150, -1) - self.reset_pass2.set_sensitive(True) - fake_label=gtk.Label("") - fake_label.set_size_request(150,-1) - fake_label2=gtk.Label("") - fake_label2.set_size_request(150,-1) - hbox.pack_start(fake_label, expand=False, fill=False, padding=5) - hbox.pack_start(fake_label2, expand=False, fill=False, padding=5) - hbox.pack_start(self.reset_pass2, expand=False, fill=False, padding=5) - frame_vert.add(hbox) - hbox = gtk.HBox(False, 0) - label = gtk.Label("") - label.set_size_request(150, -1) - hbox.pack_start(label, expand=False, fill=False, padding=5) - frame_vert.add(hbox) - label = gtk.Label("Please Setup Your Root Password") - self.notebook.append_page(frame_vert, label) - # setup the second page frame_vert = gtk.VBox(False,0) +# table = gtk.Table(rows=8, columns=2) self.user = {} hbox = gtk.HBox(False, 0) label = gtk.Label("Username") - label.set_size_request(300, -1) + label.set_size_request(100, -1) hbox.pack_start(label, expand=False, fill=False, padding=5) self.username = gtk.Entry() self.user['username'] = self.username @@ -235,7 +159,7 @@ then show up in the list. hbox = gtk.HBox(False, 0) label = gtk.Label("Password") - label.set_size_request(300, -1) + label.set_size_request(100, -1) hbox.pack_start(label, expand=False, fill=False, padding=5) self.password = gtk.Entry() self.user['password'] = self.password @@ -254,7 +178,7 @@ then show up in the list. hbox = gtk.HBox(False, 0) label = gtk.Label("Groups") - label.set_size_request(300, -1) + label.set_size_request(100, -1) hbox.pack_start(label, expand=False, fill=False, padding=5) self.groups = gtk.Entry() self.user['groups'] = self.groups @@ -265,7 +189,7 @@ then show up in the list. hbox = gtk.HBox(False, 0) label = gtk.Label("Shell") - label.set_size_request(300, -1) + label.set_size_request(100, -1) hbox.pack_start(label, expand=False, fill=False, padding=5) self.shell = gtk.Entry() self.user['shell'] = self.shell @@ -276,7 +200,7 @@ then show up in the list. hbox = gtk.HBox(False, 0) label = gtk.Label("HomeDir") - label.set_size_request(300, -1) + label.set_size_request(100, -1) hbox.pack_start(label, expand=False, fill=False, padding=5) self.homedir = gtk.Entry() self.user['homedir'] = self.homedir @@ -287,7 +211,7 @@ then show up in the list. hbox = gtk.HBox(False, 0) label = gtk.Label("UserID") - label.set_size_request(300, -1) + label.set_size_request(100, -1) hbox.pack_start(label, expand=False, fill=False, padding=5) self.userid = gtk.Entry() self.user['userid'] = self.userid @@ -298,7 +222,7 @@ then show up in the list. hbox = gtk.HBox(False, 0) label = gtk.Label("Comment") - label.set_size_request(300, -1) + label.set_size_request(100, -1) hbox.pack_start(label, expand=False, fill=False, padding=5) self.comment = gtk.Entry() self.user['comment'] = self.comment @@ -312,15 +236,8 @@ then show up in the list. frame_vert.add(hbox) label = gtk.Label("Add/Edit a user") - self.notebook.append_page(frame_vert, label) - - # add a blank page - frame_vert = gtk.VBox(False,0) - label = gtk.Label("Blank page") - - self.notebook.append_page(frame_vert, label) - vert.pack_start(self.notebook, expand=False, fill=False, padding=50) + vert.pack_start(frame_vert, expand=False, fill=False, padding=5) self.add_content(vert) @@ -332,28 +249,11 @@ then show up in the list. #print row def reset(self, widget, data=None): - # enable the boxen - self.root_verified=False - self.root1.set_sensitive(True) - self.root2.set_sensitive(True) - self.root1.set_text("") - self.root2.set_text("") - self.verified.set_from_stock(gtk.STOCK_CANCEL, gtk.ICON_SIZE_SMALL_TOOLBAR) - # blank the password in the installprofile - # this allows detection to reset the hash - self.controller.install_profile.set_root_pass_hash(None,"",None) self.blank_the_boxes() - self.notebook.set_current_page(0) - - def root(self,widget, data=None): - # select the root notebook page. - self.notebook.set_current_page(0) def addu(self,widget, data=None): self.blank_the_boxes() self.password.set_sensitive(True) - # select that page - self.notebook.set_current_page(1) def edit(self, treemodel=None,treeiter=None): self.blank_the_boxes() @@ -381,13 +281,9 @@ then show up in the list. # if not from a profile, enable password box, disable reset button self.reset_pass.set_sensitive(False) self.password.set_sensitive(True) - - # show the edit box - self.notebook.set_current_page(1) - + def delete(self, widget, data=None): self.blank_the_boxes() - self.notebook.set_current_page(2) self.delete_user() def add_edit_user(self, widget, data=None): @@ -464,20 +360,6 @@ then show up in the list. # remove it from the treeview iter = self.treedata.remove(treeiter) - def verify_root_password(self, widget, data=None): - if self.root1.get_text() == self.root2.get_text() and self.root1.get_text()!="": - # passwords match! - self.root_verified = True - # disable the boxen - self.root1.set_sensitive(False) - self.root2.set_sensitive(False) - self.verified.set_from_stock(gtk.STOCK_APPLY, gtk.ICON_SIZE_SMALL_TOOLBAR) - else: - # password's don't match. - msgbox=Widgets().error_Box("Error","Passwords do not match! ( or they are blank )") - msgbox.run() - msgbox.destroy() - def blank_the_boxes(self): # blank the current entries for entry_box in self.user: @@ -512,15 +394,6 @@ then show up in the list. value = True return value - def is_root_pass_set(self): - value = False - pass_hash = self.controller.install_profile.get_root_pass_hash() - if pass_hash != "": - # its set! - value = True - - return value - def is_in_treeview(self,username): value = False # if the username appears in the treestore, display error @@ -584,11 +457,8 @@ then show up in the list. return data def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True self.controller.SHOW_BUTTON_BACK = True self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False self.users_from_profile = [] # This structure can be taken out self.users_iprofile = self.controller.install_profile.get_users() @@ -611,56 +481,35 @@ then show up in the list. # to pass the hash through ( this can be taken out and replaced ) self.users_from_profile.append(user[0]) - # determine if root password is set, if so, automatically say its verified, - # load the hash into both boxes, change icon to green check, and disable the boxes. - if self.is_root_pass_set(): - self.root_verified=True - self.verified.set_from_stock(gtk.STOCK_APPLY, gtk.ICON_SIZE_SMALL_TOOLBAR) - hash = self.controller.install_profile.get_root_pass_hash() - self.root1.set_text(hash) - self.root2.set_text(hash) - self.root1.set_sensitive(False) - self.root2.set_sensitive(False) - - - def deactivate(self): - # store everything - if (self.root_verified): - - if self.is_root_pass_set(): - # don't hash the password, just store it - root_hash = self.root1.get_text() - else: - # hash the password - root_hash = GLIUtility.hash_password(self.root1.get_text()) - - # store the root password - self.controller.install_profile.set_root_pass_hash(None,root_hash,None) - - # now store all the entered users - #( <user name>, <password hash>, (<tuple of groups>), <shell>, - # <home directory>, <user id>, <user comment> ) - # retrieve everything - data = self.get_treeview_data() + def next(self): + # now store all the entered users + #( <user name>, <password hash>, (<tuple of groups>), <shell>, + # <home directory>, <user id>, <user comment> ) + # retrieve everything + data = self.get_treeview_data() - stored_users = [] - # get the array of stored usernames - for item in list(self.controller.install_profile.get_users()): - stored_users.append(item[0]) + stored_users = [] + # get the array of stored usernames + for item in list(self.controller.install_profile.get_users()): + stored_users.append(item[0]) - for user in data: - if user[0] not in self.current_users and user[0] not in stored_users: - # user is not in stored profile, and hasn't been previously added - self.controller.install_profile.add_user(None, (user[0], user[1], user[2], user[3], user[4], user[5], user[6]), None) - #self.current_users.append(user[0]) - elif user[0] in stored_users: - # user is in stored profile, need to remove, then readd the user - self.controller.install_profile.remove_user(user[0]) - self.controller.install_profile.add_user(None, (user[0], user[1], user[2], user[3], user[4], user[5], user[6]), None) - #self.current_users.append(user[0]) + for user in data: + if user[0] not in self.current_users and user[0] not in stored_users: + # user is not in stored profile, and hasn't been previously added + self.controller.install_profile.add_user(None, (user[0], user[1], user[2], user[3], user[4], user[5], user[6]), None) + #self.current_users.append(user[0]) + elif user[0] in stored_users: + # user is in stored profile, need to remove, then readd the user + self.controller.install_profile.remove_user(user[0]) + self.controller.install_profile.add_user(None, (user[0], user[1], user[2], user[3], user[4], user[5], user[6]), None) + #self.current_users.append(user[0]) - return True + progress = ProgressDialog(self.controller, ("set_users", ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("ExtraPackages") else: - msgbox=Widgets().error_Box("Error","You have not verified your root password!") - msgbox.run() - msgbox.destroy() + GLIScreen.progress_callback(self, result, data) + diff --git a/src/fe/gtk/Welcome.py b/src/fe/gtk/Welcome.py deleted file mode 100644 index 7ee2c85..0000000 --- a/src/fe/gtk/Welcome.py +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. - -import gtk -import GLIScreen -from gettext import gettext as _ - -class Panel(GLIScreen.GLIScreen): - - title = _("Welcome to the Gentoo Linux Installer") - _helptext = """ -<b><u>Welcome screen</u></b> - -This screen is fairly straightforward. It welcomes you to the Installer and -gives you one option. The "Standard" mode is used for networked installs. It -allows you the most flexibility. The "Networkless" mode removes some options -from subsequent screens and sets a few useful defaults. -""" - - def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) - vert = gtk.VBox(False, 10) - vert.set_border_width(10) - - content_str = _(""" -Welcome to the GTK+ front-end for the Gentoo Linux Installer. - -It is highly recommended that you have gone through the manual install process a time -or two, or at least read through the install guide. The purpose of this installer is -not to make the install easier but to make it quicker. Don't ask questions that are -covered by the install guide, or we shall taunt you a second time. - -In this part of the installer, you will make all of your decisions for how you want -your system setup. No changes will be made to your system until you click the -"Install" button. At any point before you click "Install", you can click "Save" to -save your install profile and come back at a later time to finish. - -If you have installed Gentoo Linux previously using this installer and you saved -your configuration settings (install profile), you can click the "Load" button to -load your previous settings as defaults.""") - - content_label = gtk.Label(content_str) - vert.pack_start(content_label, expand=False, fill=False, padding=0) - - hbox = gtk.HBox(False, 0) - hbox.pack_start(gtk.Label("Install type:"), expand=False, fill=False, padding=10) - self.install_type_standard = gtk.RadioButton(label=_("Standard")) - hbox.pack_start(self.install_type_standard, expand=False, fill=False, padding=15) - self.install_type_networkless = gtk.RadioButton(group=self.install_type_standard, label=_("Networkless")) - hbox.pack_start(self.install_type_networkless, expand=False, fill=False, padding=0) - hbox2 = gtk.HBox(True, 0) - hbox2.pack_start(hbox, expand=False, fill=False, padding=0) - vert.pack_start(hbox2, expand=False, fill=False, padding=20) - - self.add_content(vert) - - def activate(self): - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = False - self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - - def deactivate(self): - if self.install_type_standard.get_active(): - self.controller.install_type = "standard" - elif self.install_type_networkless.get_active(): - self.controller.install_type = "networkless" - return True diff --git a/src/fe/gtk/gtkfe.py b/src/fe/gtk/gtkfe.py index 74d926e..9fcc930 100755 --- a/src/fe/gtk/gtkfe.py +++ b/src/fe/gtk/gtkfe.py @@ -8,73 +8,74 @@ import sys sys.path.append("../..") +import os import GLIInstallProfile -import GLIClientConfiguration import GLIClientController import GLIUtility -from GLIFutureBar import GLIFutureBar -from HelpDialog import HelpDialog from SplashScreen import SplashScreen import gtk -import gobject -import crypt -import random from gettext import gettext as _ - -import RunInstall +import TextBufferMarkup +from ProgressDialog import * class Installer: - SHOW_BUTTON_FINISH = 1 SHOW_BUTTON_FORWARD = 1 SHOW_BUTTON_BACK = 1 - SHOW_BUTTON_HELP = 1 - SHOW_BUTTON_EXIT = 1 install_profile_xml_file = "" install_window = None install_type = "standard" - - menuItems = [ { 'text': _('Welcome'), 'module': __import__("Welcome") }, - { 'text': _('Pre-install Config'), 'module': __import__("ClientConfig") }, - { 'text': _('Partitioning'), 'module': __import__("Partitioning") }, - { 'text': _('Network Mounts'), 'module': __import__("NetworkMounts") }, - { 'text': _('Stage'), 'module': __import__("Stage") }, - { 'text': _('Portage tree'), 'module': __import__("PortageTree") }, - { 'text': _('make.conf'), 'module': __import__("MakeDotConf") }, - { 'text': _('Kernel'), 'module': __import__("Kernel") }, - { 'text': _('Bootloader'), 'module': __import__("Bootloader") }, - { 'text': _('Timezone'), 'module': __import__("Timezone") }, - { 'text': _('Networking'), 'module': __import__("Networking") }, - { 'text': _('Daemons'), 'module': __import__("Daemons") }, - { 'text': _('Extra Packages'), 'module': __import__("ExtraPackages") }, - { 'text': _('Startup Services'), 'module': __import__("StartupServices") }, - { 'text': _('Other Settings'), 'module': __import__("OtherSettings") }, - { 'text': _('Users'), 'module': __import__("Users") }, - { 'text': _('Review'), 'module': __import__("InstallSummary") } - ] + cur_screen = None + install_done = False + + screens = { + "InstallMode": None, + "Partition": None, + "LocalMounts": None, + "NetworkMounts": None, + "Stage": None, + "PortageTree": None, + "MakeDotConf": None, + "RootPass": None, + "Timezone": None, + "Kernel": None, + "KernelSources": None, + "KernelConfig": None, + "Networking": None, + "Logger": None, + "CronDaemon": None, + "Bootloader": None, + "Users": None, + "ExtraPackages": None, + "StartupServices": None, + "OtherSettings": None, + "InstallDone": None, + "InstallFailed": None + } def __init__(self): - self.client_profile = GLIClientConfiguration.ClientConfiguration() - self.install_profile = GLIInstallProfile.InstallProfile() - self._pretend = False - self._debug = False - - for arg in sys.argv: - if arg == "-p" or arg == "--pretend": - self._pretend = True - elif arg == "-d" or arg == "--debug": - self._debug = True - - self.cc = GLIClientController.GLIClientController(pretend=self._pretend) - self.window = None self.panel = None self._cur_panel = 0 self.__full_path = self.get_current_path() + + # Show splash screen self.splash = SplashScreen(self.__full_path) self.splash.show() while gtk.events_pending(): gtk.main_iteration() + + # Import screen modules + for screen in self.screens: + self.screens[screen] = __import__(screen) + + # Instantiate installer objects + self.install_profile = GLIInstallProfile.InstallProfile() + if '-d' in sys.argv or '--debug' in sys.argv: + # Enable debug mode via commandline argument + self.install_profile.set_verbose(None, True, None) + self.cc = GLIClientController.GLIClientController(self.install_profile) + self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.title = _("Gentoo Linux Installer") self.window.realize() @@ -91,58 +92,64 @@ class Installer: self.headerbox = gtk.HBox(False, 0) headerimg = gtk.Image() headerimg.set_from_file(self.__full_path + '/installer-banner-800x64.png') - self.headerbox.add(headerimg) + self.headerbox.pack_start(headerimg, padding=0) self.globalbox.pack_start(self.headerbox, expand=False, fill=False, padding=0) - # Future bar - self.futurebar = GLIFutureBar([element['text'] for element in self.menuItems]) - self.globalbox.pack_start(self.futurebar, expand=False, fill=False, padding=5) - self.globalbox.pack_start(gtk.HSeparator(), expand=False, fill=False, padding=0) + # Progress bar +# progress_box = gtk.HBox(False, 0) +# progress_box.pack_start(gtk.Label("Install Progress"), expand=False, fill=False, padding=10) +# self.progress_bar = gtk.ProgressBar() +# progress_box.pack_start(self.progress_bar, expand=True, fill=True, padding=10) +# self.globalbox.pack_start(progress_box, expand=False, fill=False, padding=5) +# self.globalbox.pack_start(gtk.HSeparator(), expand=False, fill=False, padding=0) # Top box self.topbox = gtk.HBox(False, 0) self.globalbox.pack_start(self.topbox, expand=True, fill=True, padding=5) - # Bottom box - self.bottombox = gtk.HBox(False, 0) - self.globalbox.pack_end(self.bottombox, expand=False, fill=False, padding=5) - self.globalbox.pack_end(gtk.HSeparator(), expand=False, fill=False, padding=0) + # Left frame + self.leftframe = gtk.Frame() + self.leftframe.set_size_request(200, -1) + self.leftframe.set_shadow_type(gtk.SHADOW_ETCHED_OUT) + self.textbuff = TextBufferMarkup.PangoBuffer() + self.textview = gtk.TextView(self.textbuff) + self.textview.set_editable(False) + self.textview.set_wrap_mode(gtk.WRAP_WORD) + self.textview.set_left_margin(5) + self.textview.set_right_margin(5) + self.textview.set_sensitive(False) + self.textviewscroll = gtk.ScrolledWindow() + self.textviewscroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) + self.textviewscroll.add(self.textview) + self.leftframe.add(self.textviewscroll) + self.topbox.pack_start(self.leftframe, expand=True, fill=True, padding=5) + + # Right frame self.rightframe = gtk.VBox(False, 0) + self.rightframe.set_size_request(570, -1) self.topbox.pack_end(self.rightframe, expand=True, fill=True, padding=5) self.globalbox.show_all(); - # Right frame contents - self.panels = [] - self.right_pane_box = gtk.Notebook() -# for item in self.menuItems: -# if item['module'] == None: break -# if self._debug: -# print "Instantiating " + item['text'] + " screen...", -# panel = item['module'].Panel(self) -# if self._debug: -# print "done" -# self.panels.append(panel) -# self.right_pane_box.append_page(panel) - self.right_pane_box.set_show_tabs(False) - self.right_pane_box.set_show_border(False) - self.rightframe.add(self.right_pane_box) + # Bottom box + self.bottombox = gtk.HBox(False, 0) + self.globalbox.pack_end(self.bottombox, expand=False, fill=False, padding=5) + self.globalbox.pack_end(gtk.HSeparator(), expand=False, fill=False, padding=0) buttons_info = [ ('exit', _(" _Exit "), '/button_images/stock_exit.png', self.exit_button, 'start'), - ('help', _(" _Help "), '/button_images/stock_help.png', self.help, 'start'), - ('load', _(" _Load "), '/button_images/stock_open.png', self.load_button, 'start'), - ('save', _(" _Save "), '/button_images/stock_save.png', self.save_button, 'start'), - ('finish', _(" _Install "), '/button_images/stock_exec.png', self.finish, 'end'), - ('forward', _(" _Forward "), '/button_images/stock_right.png', self.forward, 'end'), - ('back', _(" _Back "), '/button_images/stock_left.png', self.back, 'end') +# ('load', _(" _Load "), '/button_images/stock_open.png', self.load_button, 'start'), +# ('save', _(" _Save "), '/button_images/stock_save.png', self.save_button, 'start'), + ('log', _(" _View Log "), '', self.log_button, 'start'), + ('next', _(" _Next "), '/button_images/stock_right.png', self.next, 'end'), + ('previous', _(" _Previous "), '/button_images/stock_left.png', self.previous, 'end') ] self.buttons = {} - for button in buttons_info: self.buttons[button[0]] = gtk.Button() tmpbuttonbox = gtk.HBox(False, 0) - tmpbuttonimg = gtk.Image() - tmpbuttonimg.set_from_file(self.__full_path + button[2]) - tmpbuttonbox.pack_start(tmpbuttonimg) + if button[2]: + tmpbuttonimg = gtk.Image() + tmpbuttonimg.set_from_file(self.__full_path + button[2]) + tmpbuttonbox.pack_start(tmpbuttonimg) tmpbuttonlabel = gtk.Label(button[1]) tmpbuttonlabel.set_use_underline(True) tmpbuttonbox.pack_start(tmpbuttonlabel) @@ -153,59 +160,16 @@ class Installer: else: self.bottombox.pack_end(self.buttons[button[0]], expand=False, fill=False, padding=5) - gobject.idle_add(self.init_screens) - - def redraw_left_pane(self, firstrun=False): - if not firstrun: self.leftframe.remove(self.navlinks) - self.navlinks = gtk.VBox(False, 5) - self.navlinks.set_size_request(140, -1) - navlinkslabel = gtk.Label(_(" Installation Steps ")) - self.navlinks.pack_start( navlinkslabel, expand=False, fill=False, padding=10) - self.num_times = 0 - for item_ in self.menuItems: - item = str(self.num_times+1) + ". " + item_['text'] - self.box = gtk.HBox(False,5) - box_string = item - box_label=gtk.Label(box_string) - box_label.set_alignment(0,0) - self.box.pack_start( box_label, expand=False, fill=False, padding=5) - self.navlinks.pack_start( self.box, expand=False, fill=False, padding=3) - box_label.set_sensitive(True) - - if self._cur_panel == self.num_times: - box_label.set_markup('<b>'+box_string+'</b>') - - self.num_times = self.num_times + 1 - self.leftframe.add(self.navlinks) - self.leftframe.show_all() + self.splash.destroy() + self.window.show_all() + self.load_screen("InstallMode") def redraw_buttons(self): self.bottombox.hide_all() - self.buttons['finish'].set_sensitive(self.SHOW_BUTTON_FINISH) - self.buttons['forward'].set_sensitive(self.SHOW_BUTTON_FORWARD) - self.buttons['back'].set_sensitive(self.SHOW_BUTTON_BACK) - self.buttons['help'].set_sensitive(self.SHOW_BUTTON_HELP) - self.buttons['exit'].set_sensitive(self.SHOW_BUTTON_EXIT) - if self.SHOW_BUTTON_FORWARD: - self.buttons['forward'].set_flags(gtk.CAN_DEFAULT) - self.buttons['forward'].grab_default() - elif self.SHOW_BUTTON_FINISH: - self.buttons['finish'].set_flags(gtk.CAN_DEFAULT) - self.buttons['finish'].grab_default() -# if self.install_profile_xml_file != "": -# self.finishbutton.set_sensitive(True) + self.buttons['next'].set_sensitive(self.SHOW_BUTTON_FORWARD) + self.buttons['previous'].set_sensitive(self.SHOW_BUTTON_BACK) self.bottombox.show_all() - def refresh_right_panel(self): - self.rightframe.show_all() - - def make_visible(self): - self.window.show_all() - self.window.present() - - def make_invisible(self): - self.window.hide_all() - def get_current_path(self): # this will return the absolute path to the # directory containing this file @@ -214,75 +178,52 @@ class Installer: import os.path return os.path.abspath(os.path.dirname(__file__)) - def add_content(self, content): - self.right_pane_box.pack_end(content, True, True, 0) - - def get_commands(self): - pass - - def set_active(self): - self.active=1 - - def loadPanel(self, panel=0): - if not self.panels[self._cur_panel].deactivate(): - return - self._cur_panel = panel - self.right_pane_box.set_current_page(panel) - self.panels[panel].activate() - self.futurebar.setpos(panel) + def load_screen(self, name): + if self.cur_screen: + self.rightframe.remove(self.cur_screen) + del self.cur_screen + self.cur_screen = self.screens[name].Panel(self) +# percent = int((i) / float(len(self.screens) - 1) * 100) +# self.progress_bar.set_fraction(float(percent) / 100) +# self.progress_bar.set_text(str(percent) + "%") + self.rightframe.add(self.cur_screen) + self.cur_screen.activate() + helptext = self.cur_screen._helptext +# helptext = " ".join(helptext.split("\n")) +# helptext = "\n".join(helptext.split('<br>')) + self.textbuff.set_text(helptext) + self.rightframe.show_all() self.redraw_buttons() - def init_screens(self): -# self.splash.show() - for item in self.menuItems: - if item['module'] == None: break - if self._debug: - print "Instantiating " + item['text'] + " screen...", - panel = item['module'].Panel(self) - if self._debug: - print "done" - self.panels.append(panel) - self.right_pane_box.append_page(panel) - self.splash.destroy() - self.make_visible() - self.loadPanel() - return False - def run(self): - gtk.threads_init() + gtk.gdk.threads_init() gtk.main() - def back(self, widget, data=None): - if self._cur_panel > 0: - self.loadPanel(self._cur_panel - 1) + def previous(self, widget, data=None): + self.cur_screen.previous() - def forward(self, widget, data=None): - if self._cur_panel < (len(self.menuItems) - 1): - self.loadPanel(self._cur_panel + 1) - - def help(self, widget, data=None): -# GLIUtility.spawn("firefox http://www.gentoo.org/doc/en/handbook/index.xml &>/dev/null &") - try: - helptext = self.panels[self._cur_panel]._helptext - except: - helptext = "There is no help available for this screen" - helpdlg = HelpDialog(self.window, helptext) - helpdlg.run() + def next(self, widget, data=None): + self.cur_screen.next() def exit_button(self, widget, data=None): - msgdlg = gtk.MessageDialog(parent=self.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="Are you sure you want to exit?") - resp = msgdlg.run() - msgdlg.destroy() - if resp == gtk.RESPONSE_YES: + if not self.install_done: + msgdlg = gtk.MessageDialog(parent=self.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="Are you sure you want to exit?") + resp = msgdlg.run() + msgdlg.destroy() + if resp == gtk.RESPONSE_YES: + msgdlg = gtk.MessageDialog(parent=self.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format="Do you want the installer to clean up after itself before exiting?") + resp = msgdlg.run() + msgdlg.destroy() + if resp == gtk.RESPONSE_YES: + progress = ProgressDialog(self, ("install_failed_cleanup", ), self.exit_callback) + progress.run() + else: + self.exit() + else: self.exit() - def finish(self, widget, data=None): - # Remove screens - while len(self.panels): - self.right_pane_box.remove_page(-1) - del self.panels[-1] - self.make_invisible() - self.install_window = RunInstall.RunInstall(self) + def exit_callback(self, result): + self.exit() def load_button(self, widget, data=None): filesel = gtk.FileSelection(_("Select the install profile to load")) @@ -330,22 +271,20 @@ class Installer: errdlg.run() errdlg.destroy() + def log_button(self, widget, data=None): + os.system("xterm -e 'tail -f /var/log/installer.log' &") + def delete_event(self, widget, event, data=None): - msgdlg = gtk.MessageDialog(parent=self.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("Do you really want to exit the installer before the install is complete?")) - resp = msgdlg.run() - msgdlg.destroy() - if resp == gtk.RESPONSE_YES: - return False - else: - return True + self.exit_button(self.buttons['exit']) + return True def destroy(self, widget, data=None): gtk.main_quit() return True - def exit(self): + def exit(self, status=0): gtk.main_quit() - sys.exit(0) + sys.exit(status) if __name__ == "__main__": install = Installer() diff --git a/src/misc/getgli b/src/misc/getgli index 61777dd..3821142 100755 --- a/src/misc/getgli +++ b/src/misc/getgli @@ -2,7 +2,7 @@ if [ -z $1 ] then - DATE=`wget -O - http://dev.gentoo.org/~agaffney/gli/ 2>/dev/null | grep -e 'installer-' | sed -e 's:^.\+>installer-::' -e 's:\.tar\.bz2.\+$::'` + DATE=latest else DATE=$1 fi diff --git a/src/misc/mkvardb b/src/misc/mkvardb deleted file mode 100755 index a615190..0000000 --- a/src/misc/mkvardb +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/bash - -PROG=$(basename ${0}) -PORTDIR_OVERLAY="/usr/local/portage" -DB="/var/db/pkg" -filesindex=0 - -declare -a exclude -declare -a files - -function usage { - echo "Usage: $PROG [options] <files>" - echo - echo "Options:" - echo " -h|--help Show this message" - echo " -c|--category <category> Specifies the category for the package to be created" - echo " -p|--pkgname <name> Specifies the name for the package to be created" - echo " -v|--version <version> Specifies the version for the package to be created" - echo " --provide <provide> Specifies the contents of the PROVIDES line in the ebuild" - echo " packaged. This option can be specified multiple times" - echo - echo "Parameters:" - echo " files These are the existing files that are to be packaged" -} - -function create_ebuild { - VARDBDIR="${DB}/${category}/${pkgname}-${pkgver}" - EBUILD="${VARDBDIR}/${pkgname}-${pkgver}.ebuild" - - mkdir -p $VARDBDIR - cat > $EBUILD <<EOE -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# \$Header: /var/cvsroot/gentoo/src/installer/src/misc/mkvardb,v 1.5 2005/08/23 13:47:34 agaffney Exp $ - -inherit eutils - -DESCRIPTION="This is a sample skeleton ebuild file" -HOMEPAGE="" -SRC_URI="" -LICENSE="" -SLOT="0" -KEYWORDS="$(portageq envvar ARCH)" -IUSE="" -DEPEND="" -PROVIDE="${provide}" -EOE -} - -function echo_parent_dirs { - dir=$1 - while $(/bin/true); do - tmpdir=$(dirname ${dir}) - [ "$tmpdir" = "/" ] && break - echo $tmpdir - dir=$tmpdir - done -} - -function sort_dirs_and_files { - curdir="" - - rm /tmp/mkvardb_filelist 2>/dev/null - for i in $(ls -1AR --color=no ${files[@]} | sed -e 's/:$//' | grep -ve '^$'$); do - if [ -d ${i} ]; then - if [ "${curdir}" != "$(dirname ${i})" ]; then - echo_parent_dirs ${i} >> /tmp/mkvardb_filelist - fi - echo ${i} >> /tmp/mkvardb_filelist - curdir=${i} - else - [ -d "${curdir}/${i}" ] && continue - echo "${curdir}/${i}" >> /tmp/mkvardb_filelist - fi - done - sort -u /tmp/mkvardb_filelist | sed -e 's://:/:' -} - -function create_vardb { - VARDBDIR="${DB}/${category}/${pkgname}-${pkgver}" -# mkdir -p $VARDBDIR - cd $VARDBDIR -# cp $EBUILD $VARDBDIR - touch ASFLAGS CATEGORY CBUILD CC CDEPEND CFLAGS CHOST CONTENTS COUNTER CTARGET CXX CXXFLAGS DEPEND EXTRA_ECONF EXTRA_EINSTALL EXTRA_EMAKE FEATURES INHERITED IUSE LDFLAGS LDFLAGS LIBCFLAGS LIBCXXFLAGS LICENSE PDEPEND PF PKGUSE PROVIDE RDEPEND RESTRICT SLOT USE - echo ${category} > CATEGORY - echo $(portageq envvar CFLAGS) > CFLAGS - echo $(portageq envvar CHOST) > CHOST - echo $(portageq envvar CTARGET) > CTARGET - echo $(portageq envvar CXXFLAGS) > CXXFLAGS - echo eutils > INHERITED - echo ${pkgname}-${pkgver} > PF - echo 0 > SLOT - echo $(portageq envvar USE) > USE - echo ${provide} > PROVIDE - for i in $(sort_dirs_and_files); do - if [ -d ${i} ]; then - echo "dir ${i}" >> CONTENTS - else - time=$(stat -c %Y ${i}) - md5=$(md5sum ${i} | cut -d ' ' -f 1) - echo "obj ${i} $md5 $time" >> CONTENTS - fi - done -} - -# Parse args -params=${#} -while [ ${#} -gt 0 ] -do - a=${1} - shift - case "${a}" in - - -h|--help) - usage - exit 0 - ;; - - -c|--category) - category=$1 - shift - ;; - - -p|--pkgname) - pkgname=$1 - shift - ;; - - -v|--pkgversion) - pkgver=$1 - shift - ;; - - --provide) - provide=$1 - shift - ;; - - -*) - echo "You have specified an invalid option: ${a}" 1>&2 - usage - exit 1 - ;; - - *) - files[$filesindex]=$a - filesindex=$(expr $filesindex + 1) - ;; - - esac -done - -if [ "$category" = "" ]; then - echo "You must specify a category" 1>&2 - usage - exit 1 -fi -if [ "$pkgname" = "" ]; then - echo "You must specify a package name" 1>&2 - usage - exit 1 -fi -if [ "$pkgver" = "" ]; then - echo "You must specify a package version" 1>&2 - usage - exit 1 -fi -if [ $filesindex -eq 0 ]; then - echo "You must specify files to include in the package" 1>&2 - usage - exit 1 -fi - -create_ebuild -create_vardb diff --git a/src/misc/updateglid b/src/misc/updateglid index d93959c..52cd6c7 100644 --- a/src/misc/updateglid +++ b/src/misc/updateglid @@ -1,3 +1,3 @@ #!/bin/bash -sudo su - -c "rm -rf installer*; wget http://dev.gentoo.org/~agaffney/gli/snapshots/installer-\$(wget -O - http://dev.gentoo.org/~agaffney/gli/ 2>/dev/null | grep -e 'installer-' | sed -e 's:^.\+>installer-::' -e 's:\.tar\.bz2.\+$::').tar.bz2; tar -xjf \$(ls -1t installer-*.tar.bz2 | head -n 1); cd installer/src/fe/dialog; ./gli-dialog.py" +sudo su - -c "rm -rf installer*; wget http://dev.gentoo.org/~agaffney/gli/snapshots/installer-latest.tar.bz2; tar -xjf installer-latest.tar.bz2; cd installer/src/fe/dialog; ./gli-dialog.py" diff --git a/src/misc/updategtkfe b/src/misc/updategtkfe index bb52c79..cf49f72 100755 --- a/src/misc/updategtkfe +++ b/src/misc/updategtkfe @@ -1,14 +1,4 @@ #!/bin/bash xhost + -sudo su - -c "rm -rf installer*; wget http://dev.gentoo.org/~agaffney/gli/snapshots/installer-\$(wget -O - http://dev.gentoo.org/~agaffney/gli/ 2>/dev/null | grep -e 'installer-' | sed -e 's:^.\+>installer-::' -e 's:\.tar\.bz2.\+$::').tar.bz2; tar -xjf \$(ls -1t installer-*.tar.bz2 | head -n 1); cd installer/src/fe/gtk; env DISPLAY=:0.0 ./gtkfe.py" - -#sudo su - - -#DATE=`wget -O - http://dev.gentoo.org/~agaffney/gli/ 2>/dev/null | grep -e 'installer-' | sed -e 's:^.\+>installer-::' -e 's:\.tar\.bz2.\+$::'` -#wget http://dev.gentoo.org/~agaffney/gli/snapshots/installer-${DATE}.tar.bz2 -#tar -xjf installer-${DATE}.tar.bz2 - -#export DISPLAY=:0.0 -#cd installer/src/fe/gtk -#./gtkfe.py +sudo su - -c "rm -rf installer*; wget http://dev.gentoo.org/~agaffney/gli/snapshots/installer-latest.tar.bz2; tar -xjf installer-latest.tar.bz2; cd installer/src/fe/gtk; env DISPLAY=:0.0 ./gtkfe.py" diff --git a/src/net/SecureXMLRPCServer/SecureSocketConnection.py b/src/net/SecureXMLRPCServer/SecureSocketConnection.py deleted file mode 100644 index ada3812..0000000 --- a/src/net/SecureXMLRPCServer/SecureSocketConnection.py +++ /dev/null @@ -1,50 +0,0 @@ -""" -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. -Gentoo Linux Installer - -$Id: SecureSocketConnection.py,v 1.2 2005/10/30 00:00:36 samyron Exp $ - -This class is necessary because SSL.Connection -does not have a shutdown() method that accepts -one argument. -""" - -from OpenSSL import SSL - -class SecureSocketConnection: - """ - Set __dict__["connection"] to be the Connection object. - """ - def __init__(self, connection): - self.__dict__["connection"] = connection - - """ - This simulates referencing Connection.name - """ - def __getattr__(self, name): - return getattr(self.__dict__["connection"], name) - - """ - According to the Python Language Reference Section 3.3.2, - __setattr__() should insert the name/value pair into the - instance attribute dictionary. In this case, we don't want - to put the name/value pair directly into our instance - dictionary, instead, we store it in the Connection's instance - dictionary. - """ - def __setattr__(self, name, value): - setattr(self.__dict__["connection"], name, value) - - def shutdown(self, how=1): - self.__dict__["connection"].shutdown() - - """ - We need to provide this method so that accept() returns a - SecureSocketConnection object instead of a Connection object. - """ - def accept(self): - connection, address = self.__dict__["connection"].accept() - return (SecureSocketConnection(connection), address) diff --git a/src/net/SecureXMLRPCServer/SecureSocketServer.py b/src/net/SecureXMLRPCServer/SecureSocketServer.py deleted file mode 100644 index e5bed95..0000000 --- a/src/net/SecureXMLRPCServer/SecureSocketServer.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. -Gentoo Linux Installer - -$Id: SecureSocketServer.py,v 1.2 2005/10/30 00:00:36 samyron Exp $ -""" - -from OpenSSL import SSL -import SocketServer -import socket -from SecureSocketConnection import SecureSocketConnection - -class SecureSocketServer(SocketServer.TCPServer): - def __init__(self, addr, cert, requestHandler): - SocketServer.TCPServer.__init__(self, addr, requestHandler) - ctx = SSL.Context(SSL.SSLv23_METHOD) - ctx.use_privatekey_file(cert) - ctx.use_certificate_file(cert) - - tmpConnection = SSL.Connection(ctx, socket.socket(socket.AF_INET, socket.SOCK_STREAM)) - self.socket = SecureSocketConnection(tmpConnection) - - self.server_bind() - self.server_activate() diff --git a/src/net/SecureXMLRPCServer/SecureXMLRPCServer.py b/src/net/SecureXMLRPCServer/SecureXMLRPCServer.py deleted file mode 100644 index e014b42..0000000 --- a/src/net/SecureXMLRPCServer/SecureXMLRPCServer.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/python - -""" -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. -Gentoo Linux Installer - -$Id: SecureXMLRPCServer.py,v 1.2 2005/10/30 00:00:36 samyron Exp $ - - -In order to use this, you must create a certificate -with the following command: -openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes -""" - -from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler -from SecureSocketServer import SecureSocketServer -import socket - -class SecureXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): - def setup(self): - self.connection = self.request - self.rfile = socket._fileobject(self.request, "rb", self.rbufsize) - self.wfile = socket._fileobject(self.request, "wb", self.wbufsize) - -class SecureXMLRPCServer(SecureSocketServer, SimpleXMLRPCServer): - def __init__(self, address, cert, handler=SecureXMLRPCRequestHandler, logRequests=1): - self.logRequests = logRequests - SecureSocketServer.__init__(self, address, cert, handler) - self.funcs = {} - diff --git a/src/net/client/gliclient.py b/src/net/client/gliclient.py deleted file mode 100644 index e654ade..0000000 --- a/src/net/client/gliclient.py +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/python -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. - -import sys, time, socket -sys.path.append("../..") -import GLIException -import GLIInstallProfile -import GLIClientConfiguration -import GLIClientController -import GLIUtility -import xmlrpclib -import dialog -import GLIGenDialog - -def find_macip(): - device = None - device_name = 'eth' - for num in range(5): - if GLIUtility.is_eth_device(device_name + str(num)): - device = GLIUtility.get_eth_info(num) - break - else: - raise GLIException("NetFeError", 'fatal', 'setup_network',"Was unable to find a network inferface.") - return device[0], device[1] - -def find_server(): - s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - s.bind(('', 0)) - s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) - s.settimeout(15) - - count = 1 - response = "" - while count <= 3: - print "Broadcasting for server...try " + str(count) - s.sendto("GLIAutoInstall", ('255.255.255.255', 8001)) - response, fromaddr = s.recvfrom(1024) - if response: - print "Server found at " + str(fromaddr[0]) + " port " + str(fromaddr[1]) - break - count = count + 1 - return fromaddr[0], int(fromaddr[1]) + 1 - -if __name__ == '__main__': - args = {} - i = 1 - pretend = False - while i < len(sys.argv): - if sys.argv[i] == "-s" or sys.argv[i] == "--server": - i += 1 - tmpserver = sys.argv[i] - tmpserverparts = tmpserver.split(":") - if not len(tmpserverparts) == 2: - print "Invalid argument for option " + sys.argv[i-1] + ". Terminating." - sys.exit(0) - args['server_ip'] = tmpserverparts[0] - args['server_port'] = tmpserverparts[1] - elif sys.argv[i] == "-p" or sys.argv[i] == "--pretend": - pretend = True - else: - print "Invalid option " + sys.argv[i] + ". Terminating." - sys.exit(0) - i += 1 - - local_mac, local_ip = find_macip() - if 'server_ip' in args and 'server_port' in args: - server_ip, server_port = args['server_ip'], args['server_port'] - else: - server_ip, server_port = find_server() - try: - server = xmlrpclib.ServerProxy("https://" + server_ip + ":" + str(server_port)) - server.is_alive() - except: - print "Can't connect via HTTPS, trying HTTP..." - server = xmlrpclib.ServerProxy("http://" + server_ip + ":" + str(server_port)) - registered = False - try: - registered = server.register_client(local_mac, local_ip) - print "Registered with server with XMLRPC" - except: - pass - if not registered: - print "Could not register with server. Terminating." - sys.exit(1) - - if pretend: - print "In pretend mode...quitting" - sys.exit(0) - - print "Waiting for client config and install profile from server" - while 1: - client_config = server.get_client_config(local_mac) - install_profile = server.get_install_profile(local_mac) - if install_profile and client_config: - print "Received client config and install profile from server" - break - time.sleep(1) - - tmpfile = open("/tmp/client_config.xml", "w") - tmpfile.write(client_config) - tmpfile.close() - - tmpfile = open("/tmp/install_profile.xml", "w") - tmpfile.write(install_profile) - tmpfile.close() - - #STOP HERE BECAUSE WE ARE FAKING IT - print "Wrote the temporary xml profiles." - sys.exit(0) -# break -# pass - - client_config = GLIClientConfiguration.ClientConfiguration() - client_config.parse("/tmp/client_config.xml") - install_profile = GLIInstallProfile.InstallProfile() - install_profile.parse("/tmp/install_profile.xml") - cc = GLIClientController.GLIClientController(client_config, install_profile) - - #Start the backend threads - cc.start_pre_install() - - #Begin the main engine - cc.start_install() - num_steps_completed = 1 - while 1: - notification = cc.getNotification() - if notification == None: - time.sleep(1) - continue - ntype = notification.get_type() - ndata = notification.get_data() - if ntype == "exception": - print str(ndata) - server.update_client_status(local_mac, "Exception: " + str(ndata)) - sys.exit(0) - elif ntype == "int": - if ndata == GLIClientController.NEXT_STEP_READY: - next_step_waiting = False - next_step = cc.get_next_step_info() - num_steps = cc.get_num_steps() - print str(num_steps_completed) + " of " + str(num_steps) + ": " + next_step - server.update_client_status(local_mac, str(num_steps_completed) + " of " + str(num_steps) + ": " + next_step) - num_steps_completed += 1 - if cc.has_more_steps(): - cc.next_step() - continue - if ndata == GLIClientController.INSTALL_DONE: - print "Install complete!" - server.update_client_status(local_mac, "Install completed!") - sys.exit(0) diff --git a/src/net/server/.cvsignore b/src/net/server/.cvsignore deleted file mode 100644 index 35c79e0..0000000 --- a/src/net/server/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.py[co] -*.xml diff --git a/src/net/server/GLIServerProfile.py b/src/net/server/GLIServerProfile.py deleted file mode 100644 index d75b0d3..0000000 --- a/src/net/server/GLIServerProfile.py +++ /dev/null @@ -1,126 +0,0 @@ -""" -# Copyright 1999-2005 Gentoo Foundation -# This source code is distributed under the terms of version 2 of the GNU -# General Public License as published by the Free Software Foundation, a copy -# of which can be found in the main directory of this project. -Gentoo Linux Installer - -$Id: GLIServerProfile.py,v 1.2 2006/01/27 02:19:33 agaffney Exp $ -Copyright 2005 Gentoo Technologies Inc. -""" - -import string, re, GLIUtility, SimpleXMLParser, os.path -import xml.dom.minidom -from GLIException import * - -class ServerProfile: - - ## - # Initializes the ClientConfiguration. - def __init__(self): - self._clients = [] - self._profiles = [] - self._tmp_clients = [] - self._tmp_profiles = [] - self.data = "" # used for serialization - - self._parser = SimpleXMLParser.SimpleXMLParser() - - self._parser.addHandler('clients-profiles/profiles', self.set_profiles, call_on_null=True) - self._parser.addHandler('clients-profiles/profiles/profile', self.add_profile, call_on_null=True) - self._parser.addHandler('clients-profiles/clients', self.set_clients, call_on_null=True) - self._parser.addHandler('clients-profiles/clients/client', self.add_client, call_on_null=True) - - ## - # Parses the given filename populating the client_configuration. - # @param filename the file to be parsed. This should be a URI actually. - def parse(self, filename): - self._parser.parse(filename) - - ## - # Serializes the Client Configuration into an XML format that is returned. - def serialize(self): -# fntable ={ 'architecture-template': self.get_architecture_template, -# } - self.data = "<clients-profiles>" - -# for key in fntable.keys(): -# self.data += "<%s>%s</%s>" % (key, fntable[key](), key) - - # Serialize the special cases. - self.serialize_profiles() - self.serialize_clients() - - # Add closing tag - self.data += "</clients-profiles>" - - #Finish by putting it all in nice XML. - dom = xml.dom.minidom.parseString(self.data) - return dom.toprettyxml() - - ## - # Sets the profiles - # @param xml_path not used here. - # @param architecture_template the architecture to be installed - # @param xml_attr not used here. - def set_profiles(self, xml_path, profiles, attr): - if not profiles: - self._profiles = self._tmp_profiles - self._tmp_profiles = [] - else: - self._profiles = profiles - - ## - # Returns the profiles - def get_profiles(self): - return self._profiles - - def add_profile(self, xml_path, profile, attr): - tmp_profile = {} - if "name" in attr.getNames(): - for attrName in attr.getNames(): - tmp_profile[attrName] = str(attr.getValue(attrName)) - self._tmp_profiles.append(tmp_profile) - - def serialize_profiles(self): - self.data += "<profiles>" - for profile in self._profiles: - self.data += "<profile" - for attr in profile: - self.data += " %s=\"%s\"" % (attr, profile[attr]) - self.data += " />" - self.data += "</profiles>" - - ## - # Sets the clients - # @param xml_path not used here. - # @param architecture_template the architecture to be installed - # @param xml_attr not used here. - def set_clients(self, xml_path, clients, attr): - if not clients: - self._clients = self._tmp_clients - self._tmp_clients = [] - else: - self._clients = clients - - ## - # Returns the clients - def get_clients(self): - return self._clients - - def add_client(self, xml_path, client, attr): - tmp_client = {} - if "hostname" in attr.getNames(): - for attrName in attr.getNames(): - tmp_client[attrName] = str(attr.getValue(attrName)) - self._tmp_clients.append(tmp_client) - - def serialize_clients(self): - self.data += "<clients>" - for client in self._clients: - self.data += "<client" - for attr in client: - self.data += " %s=\"%s\"" % (attr, client[attr]) - self.data += " />" - self.data += "</clients>" - diff --git a/src/net/server/SecureXMLRPCServer.py b/src/net/server/SecureXMLRPCServer.py deleted file mode 100644 index 1997b0a..0000000 --- a/src/net/server/SecureXMLRPCServer.py +++ /dev/null @@ -1,76 +0,0 @@ -from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler -from OpenSSL import SSL -import SocketServer -import socket - -class SecureSocketServer(SocketServer.TCPServer, SocketServer.ThreadingMixIn): - def __init__(self, addr, cert, requestHandler): - SocketServer.TCPServer.__init__(self, addr, requestHandler) - ctx = SSL.Context(SSL.SSLv23_METHOD) - ctx.use_privatekey_file(cert) - ctx.use_certificate_file(cert) - - tmpConnection = SSL.Connection(ctx, socket.socket(socket.AF_INET, socket.SOCK_STREAM)) - self.socket = SecureSocketConnection(tmpConnection) - - self.server_bind() - self.server_activate() - -""" -In order to use this, you must create a certificate -with the following command: -openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes -""" - -class SecureXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): - def setup(self): - self.connection = self.request - self.rfile = socket._fileobject(self.request, "rb", self.rbufsize) - self.wfile = socket._fileobject(self.request, "wb", self.wbufsize) - -class SecureXMLRPCServer(SecureSocketServer, SimpleXMLRPCServer): - def __init__(self, address, cert, handler=SecureXMLRPCRequestHandler, logRequests=1): - self.logRequests = logRequests - SecureSocketServer.__init__(self, address, cert, handler) - self.funcs = {} - -""" -This class is necessary because SSL.Connection -does not have a shutdown() method that accepts -one argument. -""" - -class SecureSocketConnection: - """ - Set __dict__["connection"] to be the Connection object. - """ - def __init__(self, connection): - self.__dict__["connection"] = connection - - """ - This simulates referencing Connection.name - """ - def __getattr__(self, name): - return getattr(self.__dict__["connection"], name) - - """ - According to the Python Language Reference Section 3.3.2, - __setattr__() should insert the name/value pair into the - instance attribute dictionary. In this case, we don't want - to put the name/value pair directly into our instance - dictionary, instead, we store it in the Connection's instance - dictionary. - """ - def __setattr__(self, name, value): - setattr(self.__dict__["connection"], name, value) - - def shutdown(self, how=1): - self.__dict__["connection"].shutdown() - - """ - We need to provide this method so that accept() returns a - SecureSocketConnection object instead of a Connection object. - """ - def accept(self): - connection, address = self.__dict__["connection"].accept() - return (SecureSocketConnection(connection), address) diff --git a/src/net/server/gliserv.py b/src/net/server/gliserv.py deleted file mode 100755 index 0cad334..0000000 --- a/src/net/server/gliserv.py +++ /dev/null @@ -1,684 +0,0 @@ -#!/usr/bin/python - -import sys -sys.path.append("../..") -import os -import posixpath -import BaseHTTPServer -import urllib -import shutil -import mimetypes -from StringIO import StringIO -from threading import Thread -import socket -import SocketServer -import mimetools -import GLIServerProfile -import GLIInstallProfile -import time -import base64 -import traceback -import cgi -import re -from GLIException import GLIException -try: - from SecureXMLRPCServer import SecureSocketServer -except: - pass - -debug = False -pyhtml_mtimes = {} -pyhtml_cache = {} -needauth = False -webuser = "gli" -webpass = "gli" -progname = None - -class SharedInfo(object): - - __shared_state = { 'client_state': {}, 'last_visitor': "", 'clients': [], 'profiles': [], 'install_profile': None, 'client_profile':None, 'temp_use': "", 'devices':None, 'drive_to_partition':"", 'error_message': "", 'advanced_mode': True } - - def __init__(self): - self.__dict__ = self.__shared_state - -class Params(dict): - - def __getitem__(self, item): - try: - return dict.__getitem__(self, item) - except KeyError: - return "" - -class GLIHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): - - server_version = "GLIHTTP/0.1" - - def __init__(self, request, client_address, parent): - self.shared_info = SharedInfo() - self.headers_out = [] - BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, request, client_address, parent) - - def get_exception(self): - etype, value, tb = sys.exc_info() - s = traceback.format_exception(etype, value, tb) - content = "" - for line in s: - content += line - return content - - def wrap_in_template(self, content): - f = open("template.html", 'rb') - lines = f.readlines() - f.close() - for i in range(len(lines)): - if lines[i] == "Main content\n": - lines[i] = content - return "".join(lines) - - def wrap_in_webgli_template(self, content): - f = open("webgli_template.html", 'rb') - lines = f.readlines() - f.close() - for i in range(len(lines)): - if lines[i] == "Main content\n": - lines[i] = content - return "".join(lines) - - def redirect(self, url): - raise GLIException("GLIHTTPRedirect", 'notice', "redirect", url) - - def first_substring(self, somestring, *substrings): - result = (None, len(somestring)) - for substring in substrings: - index = somestring.find(substring) - if index > -1 and index < result[1]: - result = (substring, index) - return result[0] - - def process_html(self, htmlfile): - openrun, closerun = '<?', '?>' - openprint, closeprint = '<%', '%>' - openblock, closeblock = '<:', ':>' - output = [ - "class TempHandler(object):", - "\tdef __init__(self):", - "\t\tpass", - "\tdef redirect(self, url):", - "\t\traise Exception('redirect:' + url)", - "\tdef handle(self, get_params, post_params, headers_out, shared_info):", - "\t\treturn_content = ''", - ] - indentlevel = 2 - incodeblock = False - printre = re.compile(r"(^.+: |^\s+|^)print ") - f = open(htmlfile, "r") - html = f.readlines() - f.close() -# for i, line in enumerate(html): - while len(html): - line = html.pop(0) -# line = line.strip() - if line.endswith("\n"): - line = line[:-1] - while line: - if incodeblock: - if line.startswith(closerun): - incodeblock = False - line = line.split(closerun, 1)[1] - continue -# if line.endswith("\n"): -# line = line[:-1] - line = printre.sub(r'\1return_content += ', line) - output.append('\t' * indentlevel + line) - break - else: -# line = line.strip() - if line.startswith(openrun): - if line.find(closerun) == -1: - incodeblock = True - break - else: - tmpline = line.split(openrun, 1)[1].split(closerun, 1)[0].strip() - line = line.split(closerun, 1)[1] - if tmpline.startswith("include "): - path = self.translate_path(tmpline[8:]) - f = open(path, 'r') - morehtml = f.readlines() - f.close() - html = morehtml + html - line = "" - break - tmpline = printre.sub(r'\1return_content += ', tmpline) - output.append('\t' * indentlevel + tmpline) - elif line.startswith(openprint): - tmpline = line.split(openprint, 1)[1].split(closeprint, 1)[0].strip() - line = line.split(closeprint, 1)[1] -# tmpline = 'return_content += cgi.escape(%s)' % tmpline - tmpline = 'return_content += %s' % tmpline - if not line: - tmpline += ' + "\\n"' - output.append('\t' * indentlevel + tmpline) - elif line.startswith(openblock): - line = line.split(openblock, 1)[1].strip() - if line == "else:": - indentlevel -= 1 - if line.startswith("elif "): - indentlevel -= 1 - output.append('\t' * indentlevel + line) - indentlevel += 1 - break - elif line.startswith(closeblock): - indentlevel -= 1 - line = line.split(closeblock, 1)[1] - else: - substring = self.first_substring(line, openrun, openprint, openblock) - if not substring: - tmpline = line - line = "" - else: - tmpline = line.split(substring, 1)[0] - line = substring + line.split(substring, 1)[1] -# tmpline = 'return_content += r"""%s"""' % tmpline - tmpline = 'return_content += %r' % tmpline - if not line: - tmpline += ' + "\\n"' - output.append('\t' * indentlevel + tmpline) - output += ["\t\treturn return_content"] - return "\n".join(output) - - def status(self): - return self.wrap_in_template("This is just a prototype, fool. There isn't anything to report") - - def lastvisitor(self): - blah = "The last visitor was " + self.shared_info.last_visitor - self.shared_info.last_visitor = self.client_address[0] - return self.wrap_in_template(blah) - - def showclients(self): - content = """ - <h2>Clients</h2> - <table width="100%" cellpadding="0" cellpadding="0"> - <tr> - <td><u>Name</u></td> - <td><u>MAC</u></td> - <td><u>Current IP</u></td> - <td><u>Post-install IP</u></td> - <td><u>Profile</u></td> - <td><u>Install progress</u></td> - </tr> - """ - for client in self.shared_info.clients: - client_info = [client['name'], client['mac'], 'N/A', client['ip'], client['profile'], 'N/A'] - if client['mac'] in self.shared_info.client_state: - client_info[2] = self.shared_info.client_state[client['mac']]['ip'] - client_info[5] = self.shared_info.client_state[client['mac']]['install_status'] - content += """ - <tr> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - </tr> - """ % tuple(client_info) - content += """ - </table> - """ - return self.wrap_in_template(content) - - def parse_path(self): - self.get_params = Params() - self.post_params = Params() - pathparts = self.path.split("?") - self.path = pathparts[0] - if len(pathparts) > 1: - args = pathparts[1] - for arg in args.split("&"): - argparts = arg.split("=") - name = urllib.unquote(argparts[0]) - if len(argparts) > 1: - data = urllib.unquote(argparts[1]) - if name in self.get_params: - if isinstance(self.get_params[name], str): - self.get_params[name] = [self.get_params[name]] - self.get_params[name].append(data) - else: - self.get_params[name] = data - else: - self.get_params[name] = "" - else: - self.args = "" - - def valid_boundary(self, s, _vb_pattern="^[ -~]{0,200}[!-~]$"): - import re - return re.match(_vb_pattern, s) - - def parse_content_type(self, line): - plist = map(lambda x: x.strip(), line.split(';')) - key = plist.pop(0).lower() - pdict = {} - for p in plist: - i = p.find('=') - if i >= 0: - name = p[:i].strip().lower() - value = p[i+1:].strip() - if len(value) >= 2 and value[0] == value[-1] == '"': - value = value[1:-1] - value = value.replace('\\\\', '\\').replace('\\"', '"') - pdict[name] = value - return key, pdict - - def do_HEAD(self): - """Serve a HEAD request.""" - self.do_GET(head_only=True) - - def do_POST(self, head_only=False): - self.parse_path() - maxlen = 0 - ctype = self.headers.getheader('content-type') - if ctype == 'application/x-www-form-urlencoded': - clength = self.headers.getheader('content-length') - if clength: - try: - bytes = int(clength) - except ValueError: - pass - if maxlen and clength > maxlen: - raise ValueError, 'Maximum content length exceeded' - self.args = self.rfile.read(bytes) - if self.args: - for arg in self.args.split("&"): - argparts = arg.split("=") - name = urllib.unquote(argparts[0]) - if len(argparts) > 1: - data = urllib.unquote(argparts[1]) - if name in self.post_params: - if isinstance(self.post_params[name], str): - self.post_params[name] = [self.post_params[name]] - self.post_params[name].append(data) - else: - self.post_params[name] = data - else: - self.post_params[name] = "" - else: - # parse_multipart in /usr/lib/python2.4/cgi.py - ctype, pdict = self.parse_content_type(self.headers.getheader('content-type')) - boundary = "" - if 'boundary' in pdict: - boundary = pdict['boundary'] - if not self.valid_boundary(boundary): - raise ValueError, ('Invalid boundary in multipart form: %r' % (boundary,)) - - nextpart = "--" + boundary - lastpart = "--" + boundary + "--" - partdict = Params() - terminator = "" - - while terminator != lastpart: - bytes = -1 - data = None - if terminator: - # At start of next part. Read headers first. - headers = mimetools.Message(self.rfile) - clength = headers.getheader('content-length') - if clength: - try: - bytes = int(clength) - except ValueError: - pass - if bytes > 0: - if maxlen and bytes > maxlen: - raise ValueError, 'Maximum content length exceeded' - data = self.rfile.read(bytes) - else: - data = "" - # Read lines until end of part. - lines = [] - while 1: - line = self.rfile.readline() - if not line: - terminator = lastpart # End outer loop - break - if line[:2] == "--": - terminator = line.strip() - if terminator in (nextpart, lastpart): - break - lines.append(line) - # Done with part. - if data is None: - continue - if bytes < 0: - if lines: - # Strip final line terminator - line = lines[-1] - if line[-2:] == "\r\n": - line = line[:-2] - elif line[-1:] == "\n": - line = line[:-1] - lines[-1] = line - data = "".join(lines) - line = headers['content-disposition'] - if not line: - continue - key, params = self.parse_content_type(line) - if key != 'form-data': - continue - if 'name' in params: - name = params['name'] - else: - continue - if name in partdict: - if isinstance(partdict[name], str): - partdict[name] = [partdict[name]] - partdict[name].append(data) - else: - partdict[name] = data - self.post_params = partdict - self.common_handler(head_only) - - def do_GET(self, head_only=False): - self.parse_path() - self.common_handler(head_only) - - def common_handler(self, head_only): - if needauth: - authed = False - if self.headers.getheader('authorization'): - username, password = base64.decodestring(self.headers.getheader('authorization').split(" ")[-1]).split(":") - if username == webuser and password == webpass: - authed = True - if not authed: - self.send_response(401) - self.send_header("WWW-Authenticate", 'Basic realm="GLI"') - self.end_headers() - self.wfile.write("<h1>401 Not Authorized</h1>You must supply the correct username and password to access this resource") - return - return_content = "" - if debug: - print time.ctime() + " - " + self.client_address[0] + " - " + self.path - print "get_params: " + str(self.get_params) - print "post_params: " + str(self.post_params) - print "----------------------------------------------------" - # No code handler...look for actual file - path = self.translate_path(self.path) - if os.path.exists(path): - if path.endswith("/"): - for index_file in ["index.pyhtml", "index.html"]: - if os.path.exists(path + index_file): - path += index_file - if path.endswith(".pyhtml"): - while 1: - try: - try: - mtime = os.stat(path)[8] - except OSError: - pass - if path in pyhtml_mtimes and mtime == pyhtml_mtimes[path]: - tmpcode = pyhtml_cache[path] - else: - try: - tmpcode = self.process_html(path) - except IOError: - self.send_response(404) - self.end_headers() - self.wfile.write("<h2>404 Not Found</h2>The resource you were looking for does not exist") - return - except Exception, e: - if debug: - print "Caught %s (%s) while trying to process '%s'. Traceback:\n<pre>\n%s</pre>" % (sys.exc_info()[0], sys.exc_info()[1], path, self.get_exception()) - return_content = "Caught %s (%s) while trying to process '%s'. Traceback:\n<pre>\n%s</pre>" % (sys.exc_info()[0], sys.exc_info()[1], path, self.get_exception()) - break - exec tmpcode - tmphandler = TempHandler() - return_content = tmphandler.handle(self.get_params, self.post_params, self.headers_out, self.shared_info) - except Exception, e: - errmsg = str(e) - if errmsg.split(":")[0] == "redirect": - self.send_response(302) - self.send_header("Location", errmsg.split(":", 1)[1]) - self.end_headers() - return - if debug: - print "Caught %s (%s) while trying to process '%s'. Traceback:\n<pre>\n%s</pre>" % (sys.exc_info()[0], sys.exc_info()[1], path, self.get_exception()) - return_content = "Caught %s (%s) while trying to process '%s'. Traceback:\n<pre>\n%s</pre><br>Generated code:\n<pre>\n%s</pre>" % (sys.exc_info()[0], sys.exc_info()[1], path, self.get_exception(), cgi.escape(tmpcode)) - break - self.send_response(200) - for header in self.headers_out: - if header[0] == "Content-type": break - else: - self.headers_out.append(("Content-type", "text/html")) - self.headers_out.append(("Content-Length", len(return_content))) - for header in self.headers_out: - self.send_header(header[0], header[1]) - self.end_headers() - if not head_only: - self.wfile.write(return_content) - else: - ctype = self.guess_type(path) - try: - f = open(path, 'rb') - except IOError: - self.send_response(404) - self.end_headers() - self.wfile.write("<h2>404 Not Found</h2>The resource you were looking for does not exist") -# self.send_error(404, "File not found") - return None - filestat = os.stat(path) - filesize = filestat[6] - filemtime = filestat[8] - self.send_response(200) - self.send_header("Content-type", ctype) - self.send_header("Content-Length", str(filesize)) - self.send_header("Last-Modified", time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(filemtime))) - self.end_headers() - if not head_only: - shutil.copyfileobj(f, self.wfile) - f.close() - - def translate_path(self, path): - return os.getcwd() + "/html/" + urllib.unquote(path) - - def copyfile(self, source, outputfile): - shutil.copyfileobj(source, outputfile) - - def guess_type(self, path): - base, ext = posixpath.splitext(path) - if ext in self.extensions_map: - return self.extensions_map[ext] - ext = ext.lower() - if ext in self.extensions_map: - return self.extensions_map[ext] - else: - return self.extensions_map[''] - - extensions_map = mimetypes.types_map.copy() - extensions_map.update({ - '': 'application/octet-stream', # Default - '.py': 'text/plain', - '.c': 'text/plain', - '.h': 'text/plain', - }) - - def log_message(self, format, *args): - pass - -class GLIHTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): - - def __init__(self, server_address): - self.port = server_address[1] - SocketServer.TCPServer.__init__(self, server_address, GLIHTTPRequestHandler) -try: - class GLISecureHTTPServer(SecureSocketServer, BaseHTTPServer.HTTPServer): - - def __init__(self, server_address): - self.port = server_address[1] - SecureSocketServer.__init__(self, server_address, 'server.pem', GLISecureHTTPRequestHandler) - - class GLISecureHTTPRequestHandler(GLIHTTPRequestHandler): - - def setup(self): - self.connection = self.request - self.rfile = socket._fileobject(self.request, "rb", self.rbufsize) - self.wfile = socket._fileobject(self.request, "wb", self.wbufsize) -except: - pass - - -class GLINetBe: - - def __init__(self, loc): - self._path = loc - self.shared_info = SharedInfo() - - def register_client(self, mac, ip): - self.shared_info.client_state[mac] = { 'ip': ip, 'install_status': "waiting for server", 'start_install': False } - for client in self.shared_info.clients: - if client['mac'] == mac: break - else: - self.shared_info.clients.append({ 'hostname': "", 'current_ip': ip, 'mac': mac, 'profile': "" , 'post_ip': "", 'status': "waiting for server"}) - return True - - def get_client_config(self, mac): - if not self.shared_info.client_state[mac]['start_install']: - return "" - for client in self.shared_info.clients: - if client['mac'] == mac: - if not client['profile']: - return None - for profile in self.shared_info.profiles: - if profile['name'] == client['profile']: - tmpfile = open(profile['ccxmlfile'], "r") - xml = "".join(tmpfile.readlines()) - tmpfile.close() - return xml - return "" - - def get_install_profile(self, mac): - if not self.shared_info.client_state[mac]['start_install']: - return "" - for client in self.shared_info.clients: - if client['mac'] == mac: - if not client['profile']: - return None - for profile in self.shared_info.profiles: - if profile['name'] == client['profile']: - #new way - individual_install_profile = GLIInstallProfile.InstallProfile() - individual_install_profile.parse(profile['ipxmlfile']) - individual_install_profile.set_hostname(None, client['hostname'], None) - #client['post_ip'] - return individual_install_profile.serialize() - - #old way - tmpfile = open(profile['ipxmlfile'], "r") - xml = "".join(tmpfile.readlines()) - tmpfile.close() - #INJECT THE CUSTOM CLIENT SETTNGS HERE - return xml - return "" - - def update_client_status(self, mac, status): - self.shared_info.client_state[mac]['install_status'] = status - return True - - def is_alive(self): - return True - -def register(): - host = '' - port = 8001 - buf = 1024 - addr = (host,port) - # Create socket and bind to address - UDPSock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) - UDPSock.bind(addr) - UDPSock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) - - # Receive messages - while 1: - data, fromaddr = UDPSock.recvfrom(buf) - if not data: - print "Client has exited!" -# break #Serve forever - continue - else: - print "\nReceived message '" + data + "' from " + fromaddr[0] + ":" + str(fromaddr[1]) - - if data == "GLIAutoInstall": - data = "GLIAutoInstall version 1.0" - else: - data = "This is the GLIAutoInstall Service. Please make your application aware of this." - UDPSock.sendto(data, (fromaddr[0], fromaddr[1])) - - # Close socket - UDPSock.close() - sys.exit(0) - return pid - -def start_httpd(): - server_address = ('', 8000) - try: - httpd = GLISecureHTTPServer(server_address) - except: - print "Couldn't do HTTPS for web server, falling back to HTTP..." - httpd = GLIHTTPServer(server_address) - httpd.serve_forever() - -def start_xmlrpc(): - try: - from SecureXMLRPCServer import SecureXMLRPCServer - server = SecureXMLRPCServer(('', 8002), 'server.pem') - except: - print "Couldn't do HTTPS for XMLRPC, falling back to HTTP..." - from SimpleXMLRPCServer import SimpleXMLRPCServer - server = SimpleXMLRPCServer(('', 8002)) - server.register_introspection_functions() - server.register_instance(GLINetBe("/tmp")) - server.serve_forever() - -def usage(): - print - print "Usage:" - print " " + progname + " [-h|--help] [[-d|--debug]] [[-a|--auth] <user>:<password>]" - print - print "Options:" - print " -h|--help That should be quite obvious" - print - print " -d|--debug Enable debug mode. This currently prints get_params and" - print " post_params for each request" - print - print " -a|--auth Require basic HTTP auth to access the web interface. The" - print " arguments <user> and <password> are required." - sys.exit(1) - -if __name__ == '__main__': - progname = sys.argv.pop(0) - while len(sys.argv) >= 1: - arg = sys.argv.pop(0) - if arg == "-d" or arg == "--debug": - debug = True - elif arg == "-a" or arg == "--auth": - if len(sys.argv) >= 1: - auth = sys.argv.pop(0) - auth = auth.split(":") - if not len(auth) == 2: - print "The authentication credentials must be specified at <user>:<password>" - usage() - webuser, webpass = auth - needauth = True - else: - print "The --auth option required an additional argument" - usage() - elif arg == "-h" or arg == "--help": - usage() - else: - print "You have supplied an invalid argument" - usage() - httpd_thread = Thread(target=start_httpd) - httpd_thread.setDaemon(True) - httpd_thread.start() - xmlrpc_thread = Thread(target=start_xmlrpc) - xmlrpc_thread.setDaemon(True) - xmlrpc_thread.start() - register() diff --git a/src/net/server/handler.py b/src/net/server/handler.py deleted file mode 100644 index 961ec6f..0000000 --- a/src/net/server/handler.py +++ /dev/null @@ -1,34 +0,0 @@ - -class Handler(object): - - def __init__(self, get_params, post_params, headers_out, shared_info): - self.get_params = get_params - self.post_params = post_params - self.headers_out = headers_out - self.shared_info = shared_info - - def wrap_in_template(self, content): - f = open("template.html", 'rb') - lines = f.readlines() - f.close() - for i in range(len(lines)): - if lines[i] == "Main content\n": - lines[i] = content - return "".join(lines) - - def wrap_in_webgli_template(self, content): - f = open("webgli_template.html", 'rb') - lines = f.readlines() - f.close() - for i in range(len(lines)): - if lines[i] == "Main content\n": - lines[i] = content - return "".join(lines) - - def return_redirect(self, url): - content = """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> - <html> - <head> - <meta http-equiv="REFRESH" content="0;url="""+url+""""></HEAD> - </HTML>""" - return content diff --git a/src/net/server/handlers/.cvsignore b/src/net/server/handlers/.cvsignore deleted file mode 100644 index 539da74..0000000 --- a/src/net/server/handlers/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.py[co] diff --git a/src/net/server/handlers/Clients.py b/src/net/server/handlers/Clients.py deleted file mode 100644 index 87e7014..0000000 --- a/src/net/server/handlers/Clients.py +++ /dev/null @@ -1,43 +0,0 @@ -import GLIServerProfile -import handler - -class Clients(handler.Handler): - - def showclients(self): - content = """ - <h2>Clients</h2> - <table width="100%" cellpadding="0" cellpadding="0"> - <tr> - <td><u>Name</u></td> - <td><u>MAC</u></td> - <td><u>Current IP</u></td> - <td><u>Post-install IP</u></td> - <td><u>Profile</u></td> - <td><u>Install progress</u></td> - </tr> - """ - for client in self.shared_info.clients: - client_info = [client['name'], client['mac'], 'N/A', client['ip'], client['profile'], 'N/A'] - if client['mac'] in self.shared_info.client_state: - client_info[2] = self.shared_info.client_state[client['mac']]['ip'] - client_info[5] = self.shared_info.client_state[client['mac']]['install_status'] - content += """ - <tr> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - </tr> - """ % tuple(client_info) - content += """ - </table> - """ - return self.wrap_in_template(content) - - def handle(self, path): - paths = { '/showclients': self.showclients, - } - return_content = paths[path]() - return self.headers_out, return_content diff --git a/src/net/server/handlers/ProfileHandler.py b/src/net/server/handlers/ProfileHandler.py deleted file mode 100644 index 3201215..0000000 --- a/src/net/server/handlers/ProfileHandler.py +++ /dev/null @@ -1,87 +0,0 @@ -import GLIServerProfile -import handler - -class ProfileHandler(handler.Handler): - - def loadprofile(self): - content = """ - <h2>Load Profile</h2> - <br> - <form action="/loadprofile2" method="POST" enctype="multipart/form-data"> - Use local (to server) file: <input type="text" name="localfile"><br> - or<br> - Upload file: <input type="file" name="uploadfile"><br> - <input type="submit" value="Load"> - </form> - """ - return self.wrap_in_template(content) - - def loadprofile2(self): - content = "<h2>Load Profile</h2>" - xmlfile = "" - if 'localfile' in self.post_params and self.post_params['localfile']: - xmlfile = self.post_params['localfile'] - elif 'uploadfile' in self.post_params and self.post_params['uploadfile']: - try: - tmpfile = open("/tmp/serverprofile.xml", "w") - tmpfile.write(self.post_params['uploadfile']) - tmpfile.close() - xmlfile = "/tmp/serverprofile.xml" - except: - content += "There was a problem writing the temp file for the file you uploaded" + self.get_exception() - return self.wrap_in_template(content) - else: - content += "You did not specify a file to load" - return self.wrap_in_template(content) - cp = GLIServerProfile.ServerProfile() - try: - cp.parse(xmlfile) - except: - content += "There was an error parsing the XML file" + self.get_exception() - return self.wrap_in_template(content) - self.shared_info.clients = cp.get_clients() - self.shared_info.profiles = cp.get_profiles() - content += "Profile loaded successfully" - return self.wrap_in_template(content) - - def saveprofile(self): - content = """ - <h2>Save Profile</h2> - <br> - <form action="/saveprofile2" method="POST" enctype="multipart/form-data"> - Save to local (to server) file: <input type="text" name="localfile"> <input type="submit" value="Save"><br> - or<br> - Download the file: <input type="submit" name="download" value="Download"> - </form> - """ - return self.wrap_in_template(content) - - def saveprofile2(self): - content = "<h2>Save Profile</h2>" - cp = GLIServerProfile.ServerProfile() - cp.set_clients(None, self.shared_info.clients, None) - cp.set_profiles(None, self.shared_info.profiles, None) - if not 'download' in self.post_params and self.post_params['localfile']: - try: - tmpfile = open(self.post_params['localfile'], "w") - tmpfile.write(cp.serialize()) - tmpfile.close() - except: - content += "There was a problem writing the file" + self.get_exception() - return self.wrap_in_template(content) - return self.wrap_in_template(content + "Profile saved successfully") - elif 'download' in self.post_params: - self.headers_out.append(("Content-type", "text/xml")) - self.headers_out.append(('Content-disposition', "attatchment;filename=serverprofile.xml")) - return cp.serialize() - else: - return self.wrap_in_template(content + "You didn't specify a filename to save to") - - def handle(self, path): - paths = { '/loadprofile': self.loadprofile, - '/loadprofile2': self.loadprofile2, - '/saveprofile': self.saveprofile, - '/saveprofile2': self.saveprofile2 - } - return_content = paths[path]() - return self.headers_out, return_content diff --git a/src/net/server/handlers/WebGLIHandler.py b/src/net/server/handlers/WebGLIHandler.py deleted file mode 100644 index 72cf30d..0000000 --- a/src/net/server/handlers/WebGLIHandler.py +++ /dev/null @@ -1,2629 +0,0 @@ -import GLIServerProfile -import GLIInstallProfile -import GLIClientConfiguration -import GLIStorageDevice -import GLIUtility -from GLIException import GLIException -import handler -import traceback -import sys, os -import copy -import string -import gettext -_ = gettext.gettext -sys.path.append("../..") -class WebGLIHandler(handler.Handler): - - def clientconfig(self): - import platform - data = "" - data += "<h2>Client Config</h2>\n" - data += '<form name="CConfig" action="/webgli/saveclientconfig" method="POST" enctype="multipart/form-data">\n' - - data += '<table border="2"><tr><td>\n' - #Choose the architecture for the Install. - subarches = { 'i386': 'x86', 'i486': 'x86', 'i586': 'x86', 'i686': 'x86', 'x86_64': 'amd64', 'parisc': 'hppa' } - arch = platform.machine() - if arch in subarches: - arch = subarches[arch] - - data += "Arch selection string here.<br>\n" - data += '<input type="radio" ' - if arch == "x86": - data += 'checked="checked" ' - data += 'name="ArchType" value="x86">x86 (Pentium and Athlon Series)<br>\n' - data += '<input type="radio" ' - if arch == "amd64": - data += 'checked="checked" ' - data += 'name="ArchType" value="amd64">AMD Athlon 64 and Opteron<br>\n' - data += '<input type="radio" ' - if arch == "ppc": - data += 'checked="checked" ' - data += 'name="ArchType" value="ppc">PPC (New World) Macs<br>\n' - data += '<input type="radio" ' - if arch == "sparc": - data += 'checked="checked" ' - data += 'name="ArchType" value="sparc">Sparc<br>\n' - data += '<input type="radio" ' - if arch == "alpha": - data += 'checked="checked" ' - data += 'name="ArchType" value="alpha">Alpha<br>\n' - data += '<input type="radio" ' - if arch == "hppa": - data += 'checked="checked" ' - data += 'name="ArchType" value="hppa">HPPA<br>\n' - data += '</td><td width="15"></td><td>' - #Choose the logfile location - data += "Logfile selection string here. <br>\n" - data += '<input name="Logfile" type="text" length="80" maxlength="80" value="/var/log/installer.log">\n' - - #Choose the root mountpoint location - data += "<hr>Root mountpoint selection string here. <br>\n" - data += '<input name="RootMountPoint" type="text" length="80" maxlength="80" value="/mnt/gentoo">' - - #Choose debug mode. - data += "<hr>Debug Mode: \n" - data += '<input name="Verbose" type="radio" value="True">Yes' - data += '<input name="Verbose" type="radio" value="False" checked>No' - - - data += " </td></tr></table>\n" - - if 1: #not GLIUtility.ping("www.gentoo.org"): # and local_install: - data += '<hr><table><tr><td>' - data += "LiveCD Network Configuration string here. <br>" - device_list = GLIUtility.get_eth_devices() - data += '<select name="Network_Iface" size="4">' - for device in device_list: - data += '<option value="'+device+'">' - data += device + ": " + GLIUtility.get_interface_realname(device) - data += '</option>\n' - data += '</select>' - - data += '<select name="Network_Type" size="3">' - data += '<option value="dhcp">DHCP</option>' - data += '<option value="static">Manual Config</option>' - data += '<option value="None">None (Networkless)</option>' - data += '</select>' - data += '</td><td>' - data += 'Networking Info for Manual Configurations:<br>' - data += 'Enter your IP address: <input name="ip" type="text" length="50" maxlength="15" value="192.168."><br>' - data += 'Enter your Broadcast address: <input name="broadcast" type="text" length="50" maxlength="15" value=".255"><br>' - data += 'Enter your Netmask: <input name="netmask" type="text" length="50" maxlength="15" value="255.255.255.0"><br>' - data += 'Enter your default gateway: <input name="gateway" type="text" length="50" maxlength="15" value=".1"><br>' - data += '<hr>Info for DHCP Configurations:<br>DHCP Options: <input type="text" name="dhcp_options" length="50">' - data += '<hr>Enter a DNS server: <input name="dnsserver" type="text" length="50" maxlength="15" value="128.118.25.3"></td></tr></table>' - data += 'Proxy Information (if necessary):<br>HTTP Proxy URI: <input name="http_proxy" type="text" length="70" value=""><br>FTP Proxy URI: <input name="ftp_proxy" type="text" length="70" value=""><br>RSYNC Proxy URI: <input name="rsync_proxy" type="text" length="70" value="">' - #Enable SSH? - data += "<hr>Enable SSH string here. <br>" - data += 'Enable SSH?: <input name="EnableSSH" type="radio" value="True">Yes' - data += '<input name="EnableSSH" type="radio" value="False" checked="checked">No' - - #Set root password THIS MAY NOT BE NECESSARY - SEE REMOTE SCRIPT - data += "<hr>Root password selection string here. <br>" - data += 'Enter Password:<input name="RootPass1" type="password" length="80" maxlength="80" value=""><br>' - data += 'Re-enter Password to verify:<input name="RootPass2" type="password" length="80" maxlength="80" value=""><br>' - - #Modules to load now. - status, output = GLIUtility.spawn(r"lsmod | grep -v ^Module | cut -d ' ' -f 1 ", return_output=True) - data += "<hr>List of loaded modules:. <br>"+string.join(output.split("\n"), "<br>") - data += '<br>Additional Modules to Load (space-separated list): <input name="Modules" type="text" length="80" maxlength="80" value=""><br>' - - #Save Client Configuration File. THIS SHOULD BE A POPUP - data += "<hr><br>Save Client Configuration File string here. <br>"; - data += 'Filename: <input name="SaveCCFile" type="text" value="clientconfig.xml">'; - data += '<input name="SaveCC" type="submit" value="Save Client Configuration">'; #Javascript for on_click - - #Print buttons for Next/Previous/Help/Save - data += "<hr><table><tr>" - data += '<td><input name="LoadCC" type="button" value="Load"></td>' - data += '<td><input name="SaveCC" type="button" value="Save"></td>' - data += '<td><input name="Help" type="button" value="Help"></td>' - data += '<td><input name="Previous" type="button" value="Previous"></td>' - data += '<td><input name="Next" type="button" value="Next"></td></tr></table>' - data += '</form>' - return self.wrap_in_webgli_template(data) - - def saveclientconfig(self): - data = "" - - if 'ArchType' in self.post_params: - data += "Found an architecture: you submitted " + self.post_params['ArchType']+ "<BR>\n" - try: - self.shared_info.client_profile.set_architecture_template(None, self.post_params['ArchType'], None) - except: - data += "ERROR: Could not set the Architecture Template<br>\n" - if 'Logfile' in self.post_params: - data += "Found a logfile: you submitted " + self.post_params['Logfile'] + "<BR>\n" - try: - self.shared_info.client_profile.set_log_file(None, self.post_params['Logfile'], None) - except: - data += "ERROR: Could not set the Logfile <BR>\n" - if 'RootMountPoint' in self.post_params: - data += "Found a root mount point: you submitted " + self.post_params['RootMountPoint'] + "<BR>\n" - try: - self.shared_info.client_profile.set_root_mount_point(None, self.post_params['RootMountPoint'], None) - except: - data += "ERROR: Could not set the Root Mount Point<BR>\n" - if 'Network_Iface' in self.post_params: - data += "Found a network interface: you submitted " + self.post_params['Network_Iface'] + "<BR>\n" - try: - self.shared_info.client_profile.set_network_interface(None, self.post_params['Network_Iface'], None) - except: - data += "ERROR: Could not set the Network Interface<BR>\n" - if 'Network_Type' in self.post_params: - data += "Found a Network Type: you submitted " + self.post_params['Network_Type'] + "<BR>\n" - try: - self.shared_info.client_profile.set_network_type(None, self.post_params['Network_Type'], None) - except: - data += "ERROR: Could not set the Network Type<BR>\n" - if 'dhcp_options' in self.post_params: - data += "Found DHCP Options. You submitted " + self.post_params['dhcp_options'] + "<BR>\n" - try: - self.shared_info.client_profile.set_network_dhcp_options(None, self.post_params['dhcp_options'], None) - except: - data += "ERROR: Could not set the dhcp options<br>\n" - if 'ip' in self.post_params: - data += "Found an IP: you submitted " + self.post_params['ip'] + "<BR>\n" - try: - self.shared_info.client_profile.set_network_ip(None, self.post_params['ip'], None) - except: - data += "ERROR: Could not set the IP<BR>\n" - if 'broadcast' in self.post_params: - data += "Found an broadcast IP: you submitted " + self.post_params['broadcast'] + "<BR>\n" - try: - self.shared_info.client_profile.set_network_broadcast(None, self.post_params['broadcast'], None) - except: - data += "ERROR: Could not set the broadcast IP<BR>\n" - if 'netmask' in self.post_params: - data += "Found an netmask IP: you submitted " + self.post_params['netmask'] + "<BR>\n" - try: - self.shared_info.client_profile.set_network_netmask(None, self.post_params['netmask'], None) - except: - data += "ERROR: Could not set the netmask IP<BR>\n" - if 'gateway' in self.post_params: - data += "Found an gateway IP: you submitted " + self.post_params['gateway'] + "<BR>\n" - try: - self.shared_info.client_profile.set_network_gateway(None, self.post_params['gateway'], None) - except: - data += "ERROR: Could not set the gateway IP<BR>\n" - if 'http_proxy' in self.post_params: - data += "Found an HTTP Proxy IP: you submitted " + self.post_params['http_proxy'] + "<BR>\n" - try: - self.shared_info.client_profile.set_http_proxy(None, self.post_params['http_proxy'], None) - except: - data += "ERROR: Could not set the HTTP Proxy IP<BR>\n" - if 'ftp_proxy' in self.post_params: - data += "Found an FTP Proxy IP: you submitted " + self.post_params['ftp_proxy'] + "<BR>\n" - try: - self.shared_info.client_profile.set_ftp_proxy(None, self.post_params['ftp_proxy'], None) - except: - data += "ERROR: Could not set the FTP Proxy IP<BR>\n" - if 'rsync_proxy' in self.post_params: - data += "Found an RSYNC Proxy IP: you submitted " + self.post_params['rsync_proxy'] + "<BR>\n" - try: - self.shared_info.client_profile.set_rsync_proxy(None, self.post_params['rsync_proxy'], None) - except: - data += "ERROR: Could not set the RSYNC Proxy IP<BR>\n" - if 'dnsserver' in self.post_params: - data += "Found an DNS server: you submitted " + self.post_params['dnsserver'] + "<BR>\n" - try: - self.shared_info.client_profile.set_dns_servers(None, self.post_params['dnsserver'], None) - except: - data += "ERROR: Could not set the DNS Server<BR>\n" - if 'EnableSSH' in self.post_params: - data += "Found an Enable SSH Flag: you set it to " + self.post_params['EnableSSH'] + "<BR>\n" - try: - self.shared_info.client_profile.set_enable_ssh(None, self.post_params['EnableSSH'], None) - except: - data += "ERROR: Could not set the SSH flag<BR>\n" - if 'Verbose' in self.post_params: - data += "Found an Verbose Mode Flag: you set it to " + self.post_params['Verbose'] + "<BR>\n" - try: - self.shared_info.client_profile.set_verbose(None, self.post_params['Verbose'], None) - except: - data += "ERROR: Could not set the Verbose mode flag<BR>\n" - if ('RootPass1' in self.post_params) and ('RootPass2' in self.post_params): - data += "Found a root password1: you submitted " + self.post_params['RootPass1'] + "<BR>\n" - data += "Found a root password2: you submitted " + self.post_params['RootPass2'] + "<BR>\n" - if self.post_params['RootPass1'] == self.post_params['RootPass2']: - try: - self.shared_info.client_profile.set_root_passwd(None, GLIUtility.hash_password(self.post_params['RootPass1']), None) - except: - data += "ERROR: Could not set the root password<BR>\n" - else: - data += "ERROR: Passwords DO NOT MATCH!<BR>\n" - if 'Modules' in self.post_params: - data += "Found an Additional Module: you submitted " + self.post_params['Modules'] + "<BR>\n" - try: - self.shared_info.client_profile.set_kernel_modules(None, self.post_params['Modules'], None) - except: - data += "ERROR: Could not set the Kernel Modules<BR>\n" - if 'SaveCCFile' in self.post_params: - data += "Found a filename to save the Client Profile:" + self.post_params['SaveCCFile'] + "<BR>\n" - try: - configuration = open(self.post_params['SaveCCFile'] ,"w") - configuration.write(self.shared_info.client_profile.serialize()) - configuration.close() - data += "Profile saved successfully. Here it is <BR><pre>" + self.shared_info.client_profile.serialize() + "</pre><br>\n" - except: - data += "ERROR: Could not save the profile!<BR>\n" - return self.wrap_in_webgli_template(data) - - def loadprofile(self): - content = """ - <h2>Load Client Profile</h2> - <br> - <form action="/webgli/loadprofile2" method="POST" enctype="multipart/form-data"> - Use local (to server) file: <input type="text" name="clientfile"><br> - or<br> - Upload file: <input type="file" name="uploadclientfile"><br> - <input type="submit" value="Load"> - </form><hr> - <h2>Load Install Profile</h2> - <br> - <form action="/webgli/loadprofile2" method="POST" enctype="multipart/form-data"> - Use local (to server) file: <input type="text" name="installfile"><br> - or<br> - Upload file: <input type="file" name="uploadipfile"><br> - <input type="submit" value="Load"> - </form> - """ - return self.wrap_in_webgli_template(content) - def loadprofile2(self): - content = "<h2>Load Profile</h2>" - xmlfile = "" - if self.post_params['clientfile']: - xmlfile = self.post_params['clientfile'] - elif self.post_params['uploadclientfile']: - try: - tmpfile = open("/tmp/clientprofile.xml", "w") - tmpfile.write(self.post_params['uploadclientfile']) - tmpfile.close() - xmlfile = "/tmp/clientprofile.xml" - except: - content += "There was a problem writing the temp file for the file you uploaded" + self.get_exception() - return self.wrap_in_webgli_template(content) - if self.post_params['clientfile'] or self.post_params['uploadclientfile']: - try: - self.shared_info.client_profile = GLIClientConfiguration.ClientConfiguration() - self.shared_info.client_profile.parse(xmlfile) - content += "Profile loaded successfully" - except: - content += "There was an error parsing the XML file" + self.get_exception() - - #INSTALL PROFILE LOADING - if self.post_params['installfile']: - xmlfile = self.post_params['installfile'] - elif self.post_params['uploadipfile']: - try: - tmpfile = open("/tmp/installprofile.xml", "w") - tmpfile.write(self.post_params['uploadipfile']) - tmpfile.close() - xmlfile = "/tmp/installprofile.xml" - except: - content += "There was a problem writing the temp file for the file you uploaded" + self.get_exception() - return self.wrap_in_webgli_template(content) - if self.post_params['installfile'] or self.post_params['uploadipfile']: - try: - self.shared_info.install_profile = GLIInstallProfile.InstallProfile() - self.shared_info.install_profile.parse(xmlfile) - content += "Profile loaded successfully" - except: - content += "There was an error parsing the XML file" + self.get_exception() - - return self.wrap_in_webgli_template(content) - - def saveprofile(self): - content = """ - <h2>Save Client Profile</h2> - <br> - <form action="/webgli/saveprofile2" method="POST" enctype="multipart/form-data"> - Save to local (to server) file: <input type="text" name="clientfile"> <input type="submit" value="Save"><br> - or<br> - Download the file: <input type="submit" name="downloadclient" value="Download"> - </form><hr> - <h2>Save Install Profile</h2> - <br> - <form action="/webgli/saveprofile2" method="POST" enctype="multipart/form-data"> - Save to local (to server) file: <input type="text" name="ipfile"> <input type="submit" value="Save"><br> - or<br> - Download the file: <input type="submit" name="downloadip" value="Download"> - </form> - """ - return self.wrap_in_webgli_template(content) - - def saveprofile2(self): - content = "<h2>Save Profile</h2>" - if not 'downloadclient' in self.post_params and self.post_params['clientfile']: - try: - tmpfile = open(self.post_params['clientfile'], "w") - tmpfile.write(self.shared_info.client_profile.serialize()) - tmpfile.close() - except: - content += "There was a problem writing the file" + self.get_exception() - return self.wrap_in_webgli_template(content) - return self.wrap_in_webgli_template(content + "Client Profile saved successfully") - elif 'downloadclient' in self.post_params: - self.headers_out.append(("Content-type", "text/xml")) - self.headers_out.append(('Content-disposition', "attatchment;filename=clientprofile.xml")) - return self.shared_info.client_profile.serialize() - if not 'downloadip' in self.post_params and self.post_params['ipfile']: - try: - tmpfile = open(self.post_params['ipfile'], "w") - tmpfile.write(self.shared_info.install_profile.serialize()) - tmpfile.close() - except: - content += "There was a problem writing the file" + self.get_exception() - return self.wrap_in_webgli_template(content) - return self.wrap_in_webgli_template(content + "Client Profile saved successfully") - elif 'downloadip' in self.post_params: - self.headers_out.append(("Content-type", "text/xml")) - self.headers_out.append(('Content-disposition', "attatchment;filename=installprofile.xml")) - return self.shared_info.install_profile.serialize() - def showwelcome(self): - data = "Welcoming string here.<BR>LOCAL INSTALL ASSUMED FOR THIS FRONT END<br>\n" - return self.wrap_in_webgli_template(data) - def partitioning(self): - if 'add_device' in self.post_params: - self.shared_info.devices[self.post_params['add_device']] = GLIStorageDevice.Device(self.post_params['add_device'], set_geometry=False, local_device=False) -# data = '<form name="part" action="/webgli/Partitioning2" method="POST" enctype="multipart/form-data">' - data = """The first thing on the new system to setup is the partitoning. -You will first select a drive and then edit its partitions. -No changes will be saved until the end of the step. -No changes to your disk will be made until the installation. -NOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION "/" -If your drive is pre-partitioned, just select the mountpoints and make -sure that the format option is set to FALSE or it will erase your data. -The installer does not yet support resizing of partitions (its not safe). -Please refer to the Gentoo Installation Handbook for more information -on partitioning and the various filesystem types available in Linux.<br><br> -Which drive would you like to partition?<br>""" -# data += partitions_string1 - self.shared_info.devices = self.shared_info.install_profile.get_partition_tables() - drives = self.shared_info.devices.keys() - drives.sort() - choice_list = [] - if not self.shared_info.devices: - tmp_drives = GLIStorageDevice.detect_devices() - tmp_drives.sort() - for drive in tmp_drives: - self.shared_info.devices[drive] = GLIStorageDevice.Device(drive) - #if self.local_install: #when uncommenting please indent the next line. - self.shared_info.devices[drive].set_partitions_from_disk() - drives.append(drive) - choice_list.append((drive, self.shared_info.devices[drive].get_model())) - else: - for drive in drives: - choice_list.append((drive, self.shared_info.devices[drive].get_model())) - data += "<table>\n" -# data += "<tr><td> </td><td>EDIT</td><td>Drive</td><td>Drive Information</td></tr>\n" - for i, choice in enumerate(choice_list): - data += '<tr><td><a href="/webgli/Partitioning2?editdrive=' + choice[0] + '"><img src="/images/icon-harddisk-noia_48x48.png" border="0" alt="' + choice[0] + '"></a></td><td valign="bottom">' + choice[1] + ' (' + choice[0] + ")</td></tr>\n" - data += '</table>' - data += """ - <br> - <form name="genericdisk" action="/webgli/Partitioning" method="POST"> - Add generic disk: <input type="text" name="add_device" size="14"> <input type="submit" value="Add"> - </form>""" - return self.wrap_in_webgli_template(data) - - def partitioning2(self): - if self.get_params['editdrive']: - self.post_params['editdrive'] = self.get_params['editdrive'] - colors = { 'ext2': '#0af2fe', 'ext3': '#0af2fe', 'unalloc': '#a2a2a2', 'unknown': '#ed03e0', 'free': '#ffffff', 'ntfs': '#f20600', 'fat16': '#3d07f9', 'fat32': '#3d07f9', 'reiserfs': '#f0ff00', 'linux-swap': '#12ff09', 'xfs': '#006600', 'jfs': '#ffb400' } - data = "<h4>Select a partition or unallocated space to edit</h4>\n" - #MOVE THIS TO PART2 - #if int(new_mb) > free_mb: - # self._d.msgbox(_(u"The size you entered (%s MB) is larger than the maximum of %s MB") % (new_mb, str(free_mb))) - # continue - # now add it to the data structure - #self.shared_info.devices[drive_to_partition].add_partition(part_to_edit, int(new_mb), 0, 0, type) - - if not self.post_params['editdrive']: - data = "ERROR: You must select a drive to be editing!<br>\n" - return self.wrap_in_webgli_template(data) - - drive_to_partition = self.post_params['editdrive'] - self.shared_info.drive_to_partition = drive_to_partition - partitions = self.shared_info.devices[drive_to_partition].get_partitions() - partlist = self.shared_info.devices[drive_to_partition].get_ordered_partition_list() - tmpparts = self.shared_info.devices[drive_to_partition].get_partitions() - - data += '<form name="part2" action="/webgli/Partitioning3" method="POST" enctype="multipart/form-data">' - data += '<input type="hidden" name="editdrive" value="'+drive_to_partition+"\">\n" - data += '<input type="hidden" name="editpart2" value="">' + "\n" - data += "<script>\nfunction partition_selected(minor) {\n document.part2.editpart2.value = minor;\n document.part2.submit();\n}\n</script>\n" - - if self.shared_info.error_message: - data += '<span style="color: red;">' + self.shared_info.error_message + '</span><br><br>' - self.shared_info.error_message = "" - - total_mb = self.shared_info.devices[drive_to_partition].get_total_mb() - extended_total_mb = 0 - last_percent = 0 - last_log_percent = 0 - if len(partlist): - data += '<table width="100%" cellspacing="0" cellpadding="0" border="1">' + "\n <tr>\n" - for part in partlist: - tmppart = tmpparts[part] - if tmppart.get_type() == "free": - partsize = tmppart.get_mb() - percent = (float(partsize) / float(total_mb)) * 100 - if percent < 1: percent = 1 - percent = int(percent) - if tmppart.is_logical(): - ext_percent = (float(partsize) / float(extended_total_mb)) * 100 - if ext_percent < 1: ext_percent = 1 - ext_percent = int(ext_percent) - data += ' <td height="40" width="' + str(ext_percent) + '%" align="center" style="background-color: ' + colors['unalloc'] + ';" onclick="partition_selected(' + str(part) + ');">' + " </td>\n" - last_log_percent = last_log_percent + percent - else: - data += ' <td height="40" width="' + str(percent) + '%" align="center" style="background-color: ' + colors['unalloc'] + ';" onclick="partition_selected(' + str(part) + ');">' + " </td>\n" - last_percent = last_percent + percent - else: - partsize = tmppart.get_mb() - percent = (float(partsize) / float(total_mb)) * 100 - if percent < 1: percent = 1 - percent = int(percent) - tmpminor = int(tmppart.get_minor()) - tmpdevice = drive_to_partition - if tmppart.is_extended(): - data += ' <td height="40" width="' + str(percent) + '%" align="center" style="background-color: #ffffff;">' + "\n" + ' <table width="100%" cellspacing="0" cellpadding="0" border="1" style="margin: 2px;">' + "\n <tr>\n" - extended_total_mb = tmppart.get_mb() - last_percent = last_percent + percent - elif tmppart.is_logical(): - ext_percent = (float(partsize) / float(extended_total_mb)) * 100 - if ext_percent < 1: ext_percent = 1 - ext_percent = int(ext_percent) - data += ' <td height="40" width="' + str(ext_percent) + '%" align="center" style="background-color: ' + colors[tmppart.get_type()] + ';" onclick="partition_selected(' + str(tmpminor) + ');">' - if percent >= 15: - data += tmpdevice + str(tmpminor) - data += "</td>\n" - last_log_percent = last_log_percent + percent - else: - if extended_total_mb: - data += " </tr>\n </table>\n </td>\n" - extended_total_mb = 0 - data += ' <td height="40" width="' + str(percent) + '%" align="center" style="background-color: ' + colors[tmppart.get_type()] + ';" onclick="partition_selected(' + str(tmpminor) + ');">' - if percent >= 15: - data += tmpdevice + str(tmpminor) - data += "</td>\n" - last_percent = last_percent + percent - if extended_total_mb: - data += " </tr>\n </table>\n </td>\n" - extended_total_mb = 0 - if len(partlist): - data += " </tr>\n</table>\n<br>\n" - if self.shared_info.devices[drive_to_partition].get_model() == "Generic disk": - data += '<input type="button" value="Add new at end" onclick="partition_selected(-1);"> ' - else: - data += '<input type="submit" name="recommended" value="Recommended layout"> ' - data += '<input type="submit" name="cleardrive" value="Clear drive"><br>' - - data += "<table style=\"display: none;\"><tr><td>EDIT</td><td>INFO: Key: Minor, Pri/Ext, Filesystem, MkfsOpts, Mountpoint, MountOpts, Size.</td></tr>" - - for i, part in enumerate(partlist): - tmppart = tmpparts[part] - minor = tmppart.get_minor() - if not tmppart.get_type() == "free": - minor = int(minor) - data += '<tr><td><input type="radio" name="editpart" value="' + str(minor) + '"></td>' - if tmppart.get_type() == "free": - #partschoice = "New" - entry = _(u" - Unallocated space (") - if tmppart.is_logical(): - entry += _(u"logical, ") - entry += str(tmppart.get_mb()) + "MB)" - elif tmppart.get_type() == "extended": - entry = str(int(tmppart.get_minor())) - entry += _(u" - Extended Partition (") + str(tmppart.get_mb()) + "MB)" - else: - entry = str(int(tmppart.get_minor())) + " - " - # Type: " + tmppart.get_type() + ", Mountpoint: " + tmppart.get_mountpoint() + ", Mountopts: " + tmppart.get_mountopts() + "(" - if tmppart.is_logical(): - entry += _(u"Logical (") - else: - entry += _(u"Primary (") - entry += tmppart.get_type() + ", " - entry += (tmppart.get_mkfsopts() or "none") + ", " - entry += (tmppart.get_mountpoint() or "none") + ", " - entry += (tmppart.get_mountopts() or "none") + ", " - entry += str(tmppart.get_mb()) + "MB)" - data += '<td>'+entry + "</td></tr>\n" - if self.shared_info.devices[drive_to_partition].get_model() == "Generic disk": - data += '<tr><td><input type="radio" name="editpart" value="-1"></td><td>Add new at end</td></tr>' - data += '<tr><td colspan="2"><br><input type="submit" name="SubmitEditPart" value="Edit Partition"></td></tr>' - data += "</table>\n</form>\n" - return self.wrap_in_webgli_template(data) - - def partitioning3(self): - if 'recommended' in self.post_params: - try: - self.shared_info.devices[self.shared_info.drive_to_partition].do_recommended() - except GLIException, error: - self.shared_info.error_message = error.get_error_msg() - return self.return_redirect("/webgli/Partitioning2?editdrive=" + self.shared_info.drive_to_partition) - if 'cleardrive' in self.post_params: - self.shared_info.devices[self.shared_info.drive_to_partition].clear_partitions() - self.shared_info.error_message = "Partition table cleared successfully" - return self.return_redirect("/webgli/Partitioning2?editdrive=" + self.shared_info.drive_to_partition) - if self.post_params['editpart2']: - self.post_params['editpart'] = self.post_params['editpart2'] - if self.get_params['editpart']: - self.post_params['editpart'] = self.get_params['editpart'] - data = "" - data += '<form name="part3" action="/webgli/Partitioning4" method="POST" enctype="multipart/form-data">' - data += '<input type="hidden" name="editpart" value="' + self.post_params['editpart'] + '">' - drive_to_partition = self.shared_info.drive_to_partition - partlist = self.shared_info.devices[drive_to_partition].get_ordered_partition_list() - tmpparts = self.shared_info.devices[drive_to_partition].get_partitions() - if not self.post_params['editpart']: - data = "ERROR: You must select a partition to edit!<br>\n" - return self.wrap_in_webgli_template(data) - editpart = float(self.post_params['editpart']) -# part_to_edit = partlist[editpart] -# tmppart = tmpparts[part_to_edit] - part_types = [("ext2", _(u"Old, stable, but no journaling")), - ("ext3", _(u"ext2 with journaling and b-tree indexing (RECOMMENDED)")), - ("linux-swap", _(u"Swap partition for memory overhead")), - ("fat32", _(u"Windows filesystem format used in Win9X and XP")), - ("ntfs", _(u"Windows filesystem format used in Win2K and NT")), - ("jfs", _(u"IBM's journaling filesystem. stability unknown.")), - ("xfs", _(u"Don't use this unless you know you need it.")), - ("reiserfs", _(u"B*-tree based filesystem. great performance. Only V3 supported.")), - ("extended", _(u"Create an extended partition containing other logical partitions"))] - mountpoints = ["","/","/boot","/etc","/home","/lib","/mnt","/mnt/windows","/opt","/root","/usr","/usr/local","/usr/portage","/var"] - if not editpart == -1: - tmppart = tmpparts[float(editpart)] - if editpart == -1 or tmppart.get_type() == "free": - # partition size first - if editpart == -1: - free_mb = 0 - else: - free_mb = tmppart.get_mb() - data += 'Enter the size of the new partition in MB (max '+str(free_mb)+' MB). If creating an extended partition input its entire size (not just the first logical size): <input type="text" name="size" value="'+str(free_mb)+"\"><br>\n" - #code, new_mb = self._d.inputbox(_(u"Enter the size of the new partition in MB (max %s MB). If creating an extended partition input its entire size (not just the first logical size):") % str(free_mb), init=str(free_mb)) - #if code != self._DLG_OK: continue - - # partition type - data += "Choose the filesystem type for this new partition:<br>\n" - data += "<table><tr><td>Filesystem</td><td>Description</td></tr>\n" - for part_type in part_types: - data += '<tr><td><input type="radio" name="filesystem" value="' + part_type[0] + '"> ' + part_type[0] + '</td><td>' + part_type[1] + "</td></tr>\n" - data += "</table><br>\n" - data += '<input type="submit" value="Create"> <input type="button" value="Cancel" onclick="location.go(-1)">' - #code, type = self._d.menu(_(u"Choose the filesystem type for this new partition."), height=20, width=77, choices=part_types) - else: -# tmppart = tmpparts[part_to_edit] - editpart = int(editpart) - data += "<h2>Partition Information:</h2>\n" - data += "<b>Minor:</b> "+drive_to_partition + str(editpart) + "<br> -\n " - if tmppart.is_logical(): - data += _(u"Logical Partition<br> - ") - else: - data += _(u"Primary Partition<br> - ") - data += "<b>Filesystem type:</b><select name=\"filesystem\" size=\"1\">\n " - for i,part_type in enumerate(part_types): - data += '<option value="'+part_types[i][0]+'" ' - if part_types[i][0] == tmppart.get_type(): - data += "selected" - data += '>'+part_types[i][0]+" - "+ part_types[i][1]+"</option>\n" - data += "</select><br> - \n" - data += "<b>Options:</b> <input type=\"text\" name=\"fsopts\" value=\""+ (tmppart.get_mkfsopts() or "") + "\"><br> - \n" - data += "<b>MountPoint:</b> <select name=\"mountpoint\" size=\"1\">\n " - for mtpnt in mountpoints: - data += '<option value="'+mtpnt+'" ' - if mtpnt == tmppart.get_mountpoint(): - data += "selected" - data += '>'+mtpnt+"</option>\n" - data += "</select><br> - \n" - data += "<b>Mount Options:</b> <input type=\"text\" name=\"mountopts\" value=\""+ (tmppart.get_mountopts() or "") + "\"><br> - \n" - data += "<b>Size (MB)</b> "+ str(tmppart.get_mb()) + "MB <br>" - data += 'Format this partition? <br><input type="radio" name="format" value="True" ' - if tmppart.get_format(): - data += "checked" - data += '>True<br><input type="radio" name="format" value="False" ' - if not tmppart.get_format(): - data += "checked" - data += ">False<br>\n" - data += '<hr><table border="0"><tr><td><input type="submit" name="DelPartition" value="DELETE PARTITION"></td><td><input type="submit" name="SavePartition" value="Save Changes"></td><td><input type="submit" name="Cancel" value="Cancel"></td></tr></table></form>' - #menulist = [_(u"Delete"), _(u"Mount Point"), _(u"Mount Options"), _(u"Format"), _(u"Extra mkfs.* Parameters")] - # code, part_action = self._d.menu(tmptitle, choices=self._dmenu_list_to_choices(menulist), cancel=_(u"Back")) - dumbstring = """ - part_action = menulist[int(part_action)-1] - if part_action == _(u"Delete"): - answer = (self._d.yesno(_(u"Are you sure you want to delete the partition ") + drive_to_partition + str(editpart) + "?") == self._DLG_YES) - if answer == True: - tmpdev = tmppart.get_device() - tmpdev.remove_partition(editpart) - break - elif part_action == _(u"Mount Point"): - mountpoint_menu = ["/","/boot","/etc","/home","/lib","/mnt","/mnt/windows","/opt","/root","/usr","/usr/local","/usr/portage","/var",_(u"Other")] - code, mountpt = self._d.menu(_(u"Choose a mountpoint from the list or choose Other to type your own for partition ")+str(editpart)+_(u". It is currently set to:")+tmppart.get_mountpoint(), choices=self._dmenu_list_to_choices(mountpoint_menu)) #may have to make that an integer - if code == self._DLG_OK: - mountpt = mountpoint_menu[int(mountpt)-1] - if mountpt == _(u"Other"): - code, mountpt = self._d.inputbox(_(u"Enter a mountpoint for partition ") + str(editpart), init=tmppart.get_mountpoint()) - try: tmppart.set_mountpoint(mountpt) - except: self._d.msgbox(_(u"ERROR! Could not set mountpoint!")) - elif part_action == _(u"Mount Options"): - code, answer = self._d.inputbox(_(u"Enter your mount options for partition ") + str(editpart), init=(tmppart.get_mountopts() or "defaults")) - if code == self._DLG_OK: tmppart.set_mountopts(answer) - elif part_action == _(u"Format"): - #Change the Yes/No buttons back. - self._d.add_persistent_args(["--yes-label", _(u"Yes")]) - self._d.add_persistent_args(["--no-label", _(u"No")]) - code = self._d.yesno(_(u"Do you want to format this partition?")) - if code == self._DLG_YES: - tmppart.set_format(True) - else: - tmppart.set_format(False) - elif part_action == _(u"Extra mkfs.* Parameters"): - new_mkfsopts = tmppart.get_mkfsopts() - # extra mkfs options - if tmppart.get_type() != "extended": - code, new_mkfsopts = self._d.inputbox(_(u"Extra mkfs.* Parameters"), init=new_mkfsopts) - if code == self._DLG_OK: tmppart.set_mkfsopts(new_mkfsopts)""" - return self.wrap_in_webgli_template(data) - - def partitioning4(self): - data = "" - drive_to_partition = self.shared_info.drive_to_partition - partlist = self.shared_info.devices[drive_to_partition].get_ordered_partition_list() - tmpparts = self.shared_info.devices[drive_to_partition].get_partitions() - if not self.post_params['editpart']: - data = "ERROR: You must select a partition to edit!<br>\n" - return self.wrap_in_webgli_template(data) - editpart = float(self.post_params['editpart']) - if not editpart == -1: - tmppart = tmpparts[float(editpart)] - if self.post_params["DelPartition"] == "DELETE PARTITION" or self.post_params["Cancel"] == "Cancel": - if self.post_params["DelPartition"] == "DELETE PARTITION": - self.shared_info.devices[drive_to_partition].remove_partition(editpart) - return self.return_redirect("/webgli/Partitioning2?editdrive=" + drive_to_partition) -# data = '<form name="redirect" action="/webgli/Partitioning2" method="POST"><input type="hidden" name="editdrive" value="' + drive_to_partition + '"></form><script>document.redirect.submit();</script>' - elif editpart == -1 or tmppart.get_type() == "free": - if not int(self.post_params['size']): - data = "ERROR: you must specify a size in MB" - return self.wrap_in_webgli_template(data) - new_minor = self.shared_info.devices[drive_to_partition].add_partition(editpart, int(self.post_params['size']), 0, 0, self.post_params['filesystem']) - return self.return_redirect("/webgli/Partitioning3?editpart=" + str(int(new_minor))) -# data = '<form name="redirect" action="/webgli/Partitioning3" method="POST"><input type="hidden" name="editpart" value="' + str(int(new_minor)) + '"></form><script>document.redirect.submit();</script>' - else: - tmppart = tmpparts[editpart] - tmppart.set_format(self.post_params['format']) - tmppart.set_mkfsopts(self.post_params['fsopts']) - tmppart.set_mountopts(self.post_params['mountopts']) - tmppart.set_mountpoint(self.post_params['mountpoint']) - return self.return_redirect("/webgli/Partitioning2?editdrive=" + drive_to_partition) -# data = '<form name="redirect" action="/webgli/Partitioning2" method="POST"><input type="hidden" name="editdrive" value="' + drive_to_partition + '"></form><script>document.redirect.submit();</script>' - - if not data: - data = "Work in progress<pre>" + str(self.post_params) + "</pre>" - return self.wrap_in_webgli_template(data) - - def networkmounts(self): - data = "Network Mounts page." - network_mounts = copy.deepcopy(self.shared_info.install_profile.get_network_mounts()) - - # data += "Network Mount found: " + netmount['host'] + ":" + netmount['export'] + "<br>\n" - data += "If you have any network shares you would like to mount during the install and for your new system, define them here. Select a network mount to edit or add a new mount. Currently GLI only supports NFS mounts." - data += """ - <form name="netmount" action="/webgli/savenetmounts" method="POST" enctype="multipart/form-data"> - <p>If you have any network shares you would like to mount during the install and for your new system, define them here. Select a network mount to edit or add a new mount. Currently GLI only supports NFS mounts.</p> - <table width="511" border="1"> - <tr> - <td width="31">Edit</td> - <td width="31">Type</td> - <td width="79">Hostname/IP</td> - <td width="79">Export</td> - <td width="70">Mountpoint</td> - <td width="103">Mount Options </td> - </tr>""" - for i,netmount in enumerate(network_mounts): - data += '<tr><td><input name="edit_nfs" type="radio" id="edit_nfs" value="'+str(i)+"\">Edit</td>\n" - data += '<td>'+network_mounts[i]['type']+"</td>\n" - data += '<td>'+network_mounts[i]['host']+"</td>\n" - data += '<td>'+network_mounts[i]['export']+"</td>\n" - data += '<td>'+network_mounts[i]['mountpoint']+"</td>\n" - data += '<td>'+network_mounts[i]['mountopts']+"</td></tr>\n" - data += """ - </table> - - <hr> - <p> </p> - <table width="100%" border="1"> - <tr> - <td><p>Enter the IP/hostname: - <input name="hostname" type="text" id="hostname"> - <input type="Submit" name="Search" value="Search"> - </p> - <p>Enter the export name: - <input name="export" type="text" id="export"> - </p> - <p>OR</p> - <p>Choose the export from the list of found exports: - <select name="exports" size="1" id="exports"> - </select> - </p></td> - <td><p>Enter the mountpoint: - <input name="mountpoint" type="text" id="mountpoint"> - </p> - <p>Enter any special mount options: - <input name="mountopts" type="text" id="mountopts"> - </p></td> - </tr> - <tr> - <td> </td> - <td><input name="addnfs" type="submit" id="addnfs" value="Add New NFS Mount"></td> - </tr> - </table> - <p> </p> - <p> </p> - <p> </p> - </form> - """ - - return self.wrap_in_webgli_template(data) - - def savenetmounts(self): - data = "" - network_mounts = copy.deepcopy(self.shared_info.install_profile.get_network_mounts()) - if 'addnfs' in self.post_params: - if not 'hostname' in self.post_params or not self.post_params['hostname']: - data += "ERROR: Hostname not found.<br>\n" - elif not 'export' in self.post_params or not self.post_params['export']: - data += "ERROR: Export not found.<br>\n" - elif not 'mountpoint' in self.post_params or not self.post_params['mountpoint']: - data += "ERROR: Mountpoint not found.<br>\n" - else: - network_mounts.append({'export': self.post_params['export'], 'host': self.post_params['hostname'], 'mountopts': self.post_params['mountopts'], 'mountpoint': self.post_params['mountpoint'], 'type': 'nfs'}) - try: - self.shared_info.install_profile.set_network_mounts(network_mounts) - data += "Network mount added successfully.<br>\n" - except: - data += "ERROR: Could not add network mount.<br>\n" - return self.wrap_in_webgli_template(data) - - def stageselection(self): - data = "<h4>Stage selection:</h4>" - stage = self.shared_info.install_profile.get_install_stage() - if stage: - data += "FOUND A STAGE" + str(stage) - grp_install = self.shared_info.install_profile.get_grp_install() - dynamic = self.shared_info.install_profile.get_dynamic_stage3() - tarball = self.shared_info.install_profile.get_stage_tarball_uri() - - data += '<form name="stage" action="/webgli/savestage" method="POST" enctype="multipart/form-data">' - data += '<p>Which stage do you want to start at?</p><table width="100%" border="1"><tr><td><input name="stage" type="radio" value="1"' - if stage == 1: - data += ' checked' - data += '>1</td><td>Stage1 is used when you want to bootstrap&build from scratch.</td></tr><tr> <td><input name="stage" type="radio" value="2"' - if stage == 2: - data += ' checked' - data += '>2</td><td>Stage2 is used for building from a bootstrapped semi-compiled state.</td></tr><tr> <td><input name="stage" type="radio" value="3"' - if (stage == 3) and not grp_install: - data += ' checked' - data += '>3</td><td>Stage3 is a basic system that has been built for you (no compiling).</td></tr><tr> <td><input name="stage" type="radio" value="3+GRP"' - if (stage == 3) and grp_install: - data += ' checked' - data += """> - 3 + GRP </td> - <td>A Stage3 install but using binaries from the LiveCD when able.</td> - </tr> - </table> - <p> - <input name="dynamic" type="checkbox" id="dynamic" value="true" """ - if dynamic: - data += " checked" - data += """> -Generate a dynamic stage3 on the fly using the files on the LiveCD? (faster for slow Internet connections, slower for fast connections and slow drives) </p> - <p>Stage Tarball URI : - <input name="tarballuri" type="text" id="tarballuri" size="90" """ - if tarball: - data += 'value="'+tarball+'"> ' - data += """ - or - <input type="button" value="Browse the mirrors for the URL" onClick="window.open('/webgli/URIBrowser?screen=stage&baseuri=' + document.stage.tarballuri.value, 'uribrowser', 'width=500,height=500,toolbars=no,statusbar=no,menubar=no,scrollbars=yes')"> -(requires net connectivity)</p> -<p> <input type="submit" name="savestage" value="Save Stage Selection"> -</form> """ - return self.wrap_in_webgli_template(data) - def savestage(self): - data = "" - if 'savestage' in self.post_params: - data += "YES I CLICKED SAVE<br>" - if 'stage' in self.post_params: - data += "YES THERE IS A STAGE<br>" - if self.post_params['stage'] == "3+GRP": - self.post_params['stage'] = "3" - try: - self.shared_info.install_profile.set_grp_install(None, True,None) - except: - data += "ERROR COULD NOT SET GRP INSTALL" - else: - try: - self.shared_info.install_profile.set_grp_install(None, False,None) - except: - data += "ERROR COULD NOT SET GRP INSTALL" - try: - self.shared_info.install_profile.set_install_stage(None, self.post_params['stage'], None) - data += "Stage set<br>" - except: - data += "ERROR: could not set the install stage<br>\n" - if 'tarballuri' in self.post_params and self.post_params['tarballuri']: - try: - self.shared_info.install_profile.set_stage_tarball_uri(None, self.post_params['tarballuri'], None) - data += "Set the tarball uri<br>" - except: - data += "ERROR: Could not set the tarball URI<br>\n" - if 'dynamic' in self.post_params: - try: - self.shared_info.install_profile.set_dynamic_stage3(None, True, None) - self.shared_info.install_profile.set_portage_tree_sync_type(None,"snapshot", None) - cd_snapshot_uri = GLIUtility.get_cd_snapshot_uri() - self.shared_info.install_profile.set_portage_tree_snapshot_uri(None, cd_snapshot_uri, None) - except: - data += "ERROR: Could not set dynamic stage 3.<br>\n" - else: - try: - self.shared_info.install_profile.set_dynamic_stage3(None, False, None) - except: - data += "ERROR: Could not set dynamic stage 3.<br>\n" - elif 'browseuri' in self.post_params: - data = "REDIRECT OR POP UP THINGI" - - - return self.wrap_in_webgli_template(data) - - def portagetree(self): - data = "<p>Portage Tree Sync Type:</p>" - synctype = self.shared_info.install_profile.get_portage_tree_sync_type() - snapshoturi = self.shared_info.install_profile.get_portage_tree_snapshot_uri() - if self.shared_info.install_profile.get_dynamic_stage3(): #special case - data += "<p><b>Since you are doing a dynamic stage3 install, it requires the use of the portage snapshot contained on the livecd. This has been auto-set.</b></p>\n" - return self.wrap_in_webgli_template(data) - data += '<form name="portage" action="/webgli/saveportage" method="POST" enctype="multipart/form-data">' - data += """<p>Which method do you want to use to sync the portage tree for the installation? If choosing a snapshot you will need to provide the URI for the snapshot if it is not on the livecd.</p> - <table width="100%" border="1"> - <tr> - <td><input name="portagetype" type="radio" value="sync" """ - if synctype == "sync": - data += "checked" - data += '>Sync</td><td>Normal. Use emerge sync RECOMMENDED!</td></tr><tr><td><input name="portagetype" type="radio" value="webrsync"' - if synctype == "webrsync": - data += "checked" - data += '>Webrsync</td><td>HTTP daily snapshot. Use when rsync is firewalled.</td></tr><tr> <td><input name="portagetype" type="radio" value="snapshot"' - if synctype == "snapshot": - data += "checked" - data += '>Snapshot</td><td>Use a portage snapshot, either a local file or a URL</td></tr><tr> <td><input name="portagetype" type="radio" value="none"' - if synctype == "none" or not synctype: - data += "checked" - data += """> - None</td> - <td>Extra cases such as if /usr/portage is an NFS mount</td> - </tr> - </table> - <p>Snapshot URI (if doing shapshot): - <input name="snapshoturi" type="text" id="snapshoturi" size="90" """ - if snapshoturi: - data += ' value="'+snapshoturi+'">' - data += """or </p><input type="button" value="Browse the mirrors for the URL" onClick="window.open('/webgli/URIBrowser?screen=portage&baseuri=' + document.portage.snapshoturi.value, 'uribrowser', 'width=500,height=500,toolbars=no,statusbar=no,menubar=no,scrollbars=yes')"><p><input type="submit" name="saveportage" value="Save Portage Settings"></form>""" - return self.wrap_in_webgli_template(data) - def saveportage(self): - data = "" - if 'saveportage' in self.post_params: - if 'portagetype' in self.post_params: - try: - self.shared_info.install_profile.set_portage_tree_sync_type(None,self.post_params['portagetype'],None) - except: - data += "ERROR: Could not set the portage tree sync type<br>\n" - if 'snapshoturi' in self.post_params and self.post_params['snapshoturi']: - try: - self.shared_info.install_profile.set_portage_tree_snapshot_uri(None,self.post_params['snapshoturi'],None) - except: - data += "ERROR: Could not set the portage snapshot URI" - elif 'browsesnap' in self.post_params: - data += "REDIRECT OR POP UP THINGI" - return self.wrap_in_webgli_template(data) - - def globaluse(self): - data = "<h2>Configuration Files Settings</h2><p>Make.conf Settings:</p>" - if self.shared_info.install_profile.get_dynamic_stage3(): - data += "<b>You have selected a dynamic stage3 installation. This setting forbids you from changing your USE flags until after the installation to prevent breaking the stage3 creation process.</b>" - return self.wrap_in_webgli_template(data) - etc_files = self.shared_info.install_profile.get_etc_files() - if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] - else: - make_conf = {} - data += """The installer will now gather information regarding the contents of /etc/make.conf -One of the unique (and best) features of Gentoo is the ability to -define flags (called USE flags) that define what components are -compiled into applications. For example, you can enable the alsa -flag and programs that have alsa capability will use it. -The result is a finely tuned OS with no unnecessary components to -slow you down. -The installer divides USE flag selection into two screens, one for -global USE flags and one for local flags specific to each program. -Please be patient while the screens load. It may take awhile. -<form action="/webgli/saveglobaluse" method="POST" enctype="multipart/form-data"> -""" -#First set the USE flags, this is a biggie. - if make_conf.has_key("USE"): - system_use_flags = make_conf["USE"] - else: #not a preloaded config. this is the NORMAL case. - system_use_flags = GLIUtility.spawn("portageq envvar USE", return_output=True)[1].strip().split() - use_flags = [] - use_desc = GLIUtility.get_global_use_flags() - #populate the choices list - sorted_use = use_desc.keys() - sorted_use.sort() - #present the GLOBAL checkbox list - data += '<h3>Global USE Flags:</h3><table width="100%" border="1"><tr><th scope="col">Active</th><th scope="col">Flag</th><th scope="col">Description</th></tr>'+"\n" - for flagname in sorted_use: - data += '<tr><td><input name="flags" type="checkbox" id="flags" value="'+flagname+'" ' - if flagname in system_use_flags: - data += "checked" - data += "></td><td>"+flagname+"</td><td>"+use_desc[flagname]+"</td></tr>\n" - data += "</table><br>" - data += '<input name="saveglobaluse" type="submit" id="saveglobaluse" value="Save Global USE Settings">' - data += "</form>\n" - return self.wrap_in_webgli_template(data) - def saveglobaluse(self): - data = "" - temp_use = "-* " - if self.post_params['flags']: - if isinstance(self.post_params['flags'], list): - use_flags = self.post_params['flags']; - for flag in use_flags: - temp_use += flag + " " - else: - temp_use += self.post_params['flags'] + " " - self.shared_info.temp_use = temp_use - return self.wrap_in_webgli_template(data) - def localuse(self): - data = "<h2>Configuration Files Settings</h2><p>Make.conf Settings:</p>" - if self.shared_info.install_profile.get_dynamic_stage3(): - data += "<b>You have selected a dynamic stage3 installation. This setting forbids you from changing your USE flags until after the installation to prevent breaking the stage3 creation process.</b>" - return self.wrap_in_webgli_template(data) - etc_files = self.shared_info.install_profile.get_etc_files() - if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] - else: - make_conf = {} - data += """The installer will now gather information regarding the contents of /etc/make.conf -One of the unique (and best) features of Gentoo is the ability to -define flags (called USE flags) that define what components are -compiled into applications. For example, you can enable the alsa -flag and programs that have alsa capability will use it. -The result is a finely tuned OS with no unnecessary components to -slow you down. -The installer divides USE flag selection into two screens, one for -global USE flags and one for local flags specific to each program. -Please be patient while the screens load. It may take awhile. -<form action="/webgli/savelocaluse" method="POST" enctype="multipart/form-data"> -""" -#First set the USE flags, this is a biggie. - - if make_conf.has_key("USE"): - system_use_flags = make_conf["USE"] - else: #not a preloaded config. this is the NORMAL case. - system_use_flags = GLIUtility.spawn("portageq envvar USE", return_output=True)[1].strip().split() - use_local_flags = [] - use_local_desc = GLIUtility.get_local_use_flags() - #re-populate the chocies list - sorted_use = use_local_desc.keys() - sorted_use.sort() - #present the LOCALcheckbox list - data += '<h3>Local USE Flags:</h3><table width="100%" border="1"><tr><th scope="col">Active</th><th scope="col">Flag</th><th scope="col">Description</th></tr>'+"\n" - for flagname in sorted_use: - data += '<tr><td><input name="flags" type="checkbox" id="flags" value="'+flagname+'" ' - if flagname in system_use_flags: - data += "checked" - data += "></td><td>"+flagname+"</td><td>"+use_local_desc[flagname]+"</td></tr>\n" - data += "</table><br>" - data += '<input name="savelocaluse" type="submit" id="savelocaluse" value="Save Local USE Settings">' - data += "</form>\n" - return self.wrap_in_webgli_template(data) - def savelocaluse(self): - data = "" - temp_use = " " - if self.post_params['flags']: - if isinstance(self.post_params['flags'], list): - use_local_flags = self.post_params['flags'] - for flag in use_local_flags: - temp_use += flag + " " - else: - tempuse += self.post_params['flags'] + " " - #get the make.conf - etc_files = self.shared_info.install_profile.get_etc_files() - if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] - else: - make_conf = {} - make_conf["USE"] = self.shared_info.temp_use + temp_use - etc_files['make.conf'] = make_conf - self.shared_info.install_profile.set_etc_files(etc_files) - return self.wrap_in_webgli_template(data) - def makedotconf(self): - data = "<b>Make.conf Settings:</b><br>\n" - if self.shared_info.install_profile.get_dynamic_stage3(): - data += "<b>You have selected a dynamic stage3 installation. This setting forbids you from changing some make.conf settings until after the installation to prevent breaking the stage3 creation process.</b>" - data += "<b>NOTE: Your old values are NOT loaded here. Do not save these settings without making sure all values are what you want. To keep your old values just skip this step.</b>\b" - data += '<form action="/webgli/savemakedotconf" method="POST" enctype="multipart/form-data">' - arch_procs = { 'x86': ("i386", "i486", "i586", "pentium", "pentium-mmx", "i686", "pentiumpro", "pentium2", "pentium3", "pentium3m", "pentium-m", "pentium4", "pentium4m", "prescott", "nocona", "k6", "k6-2", "k6-3", "athlon", "athlon-tbird", "athlon-4", "athlon-xp", "athlon-mp", "k8", "opteron", "athlon64", "athlon-fx", "winchip-c6", "winchip2", "c3", "c3-2") } - etc_files = self.shared_info.install_profile.get_etc_files() - if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] - else: - make_conf = {} - - data += '<h3>CFLAGS Settings: </h3>(only show these if not dynamic):<table width="100%" border="1"><tr><td scope="col"><div align="left">Processor:<select name="proc" id="proc">' - procs = arch_procs[self.shared_info.client_profile.get_architecture_template()] - for proc in procs: - data += "<option value=\""+proc+"\">"+proc+"</option>\n" - data += """ - </select> - <br> - <input type="radio" name"m_thing" value="-march">-march - <input type="radio" name"m_thing" value="-mcpu">-mcpu - <input type="radio" name"m_thing" value="-mtune">-mtune - - </div></td> - <td scope="col">Optimizations: - <select name="optim1" id="optim1"> - <option value="-O1">-O1</option> - <option value="-O2" selected>-O2 (Recommended)</option> - <option value="-O3">-O3</option> - <option value="-O4">-O4</option> - <option value="-O5">-O5</option> - <option value="-O6">-O6</option> - <option value="-O7">-O7</option> - <option value="-O8">-O8</option> - <option value="-O9">-O9 (You crazy fool!)</option> - </select> </td> - </tr> - <tr> - <td>Common CFLAGS:<br> - <input name="optim2" type="checkbox" id="optim2" value="-pipe"> --pipe<br> -<input name="optim2" type="checkbox" id="optim2" value="-fomit-frame-pointer">-fomit-frame-pointer</td> - <td>Additional CFLAGS: - <input name="optim3" type="text" id="optim3" size="60"></td> - </tr> - </table><hr> - <h3>CHOST Setting:</h3> - <select name="chost" size="4" id="chost" """ - if self.shared_info.install_profile.get_dynamic_stage3(): - data += "disabled>" - else: - data += ">" - if self.shared_info.client_profile.get_architecture_template() == "x86": - data += "<option value=\"i386-pc-linux-gnu\">i386-pc-linux-gnu</option>\n" - data += "<option value=\"i486-pc-linux-gnu\">i486-pc-linux-gnu</option>\n" - data += "<option value=\"i586-pc-linux-gnu\">i586-pc-linux-gnu</option>\n" - data += "<option value=\"i686-pc-linux-gnu\">i686-pc-linux-gnu</option>\n" - if self.shared_info.client_profile.get_architecture_template() == "amd64": - data += "<option value=\"x86_64-pc-linux-gnu\">x86_64-pc-linux-gnu</option>\n" - if self.shared_info.client_profile.get_architecture_template() == "alpha": - data += "<option value=\"alpha-unknown-linux-gnu\">alpha-unknown-linux-gnu</option>\n" - if self.shared_info.client_profile.get_architecture_template() == "ppc": - data += "<option value=\"powerpc-unknown-linux-gnu\">powerpc-unknown-linux-gnu</option>\n" - if self.shared_info.client_profile.get_architecture_template() == "ppc64": - data += "<option value=\"powerpc64-unknown-linux-gnu\">powerpc64-unknown-linux-gnu</option>\n" - if self.shared_info.client_profile.get_architecture_template() in ["sparc", "sparc64"]: - data += "<option value=\"sparc-unknown-linux-gnu\">sparc-unknown-linux-gnu</option>\n" - if self.shared_info.client_profile.get_architecture_template() == "hppa": - data += "<option value=\"hppa-unknown-linux-gnu\">hppa-unknown-linux-gnu</option>\n" - data += "<option value=\"hppa1.1-unknown-linux-gnu\">hppa1.1-unknown-linux-gnu</option>\n" - data += "<option value=\"hppa2.0-unknown-linux-gnu\">hppa2.0-unknown-linux-gnu</option>\n" - if self.shared_info.client_profile.get_architecture_template() == "mips": - data += "<option value=\"mips-unknown-linux-gnu\">mips-unknown-linux-gnu</option>\n" - data += """</select> -<hr> - <table width="100%" border="1"> - <tr> - <td scope="col"><input name="unstable" type="checkbox" id="unstable" value="unstable" """ - if self.shared_info.install_profile.get_dynamic_stage3(): - data += "disabled" - data += """> - Use unstable (~arch) </td> - <td scope="col"><input name="features" type="checkbox" id="binary" value="buildpkg"> - Build binary packages (buildpkg)</td> - <td scope="col"><input name="features" type="checkbox" id="ccache" value="ccache"> - ccache</td> - <td scope="col"><input name="features" type="checkbox" id="sandbox" value="sandbox"> - sandbox</td></tr><tr> - <td scope="col"><input name="features" type="checkbox" id="distlocks" value="distlocks"> - distlocks</td> - <td scope="col"><input name="features" type="checkbox" id="prelink" value="prelink"> - prelink</td> - <td scope="col">More Features: - <input name="manfeatures" type="text" id="manfeatures" size="10"></td> - <td scope="col">MAKEOPTS: - <input name="makeopts" type="text" id="makeopts" value="-j2" size="10" maxlength="5"></td> - </tr> - <tr><td scope="col"><input name="features" type="checkbox" id="distcc" value="distcc"> - Distcc</td><td>Distcc Config Line:<input name="distcc" type="text" size="80"></td> - </tr> - </table> - <p> - <input name="savemakeconf" type="submit" id="savemakeconf" value="Save Make.Conf Settings"> -</p> -</form>""" - return self.wrap_in_webgli_template(data) - def savemakedotconf(self): - data = "" - cflags = "" - features = "" - etc_files = self.shared_info.install_profile.get_etc_files() - if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] - if "CFLAGS" in make_conf: - cflags = make_conf['CFLAGS'] - if "FEATURES" in make_conf: - features = make_conf['FEATURES'] - else: - make_conf = {} - if self.post_params['proc'] and self.post_params['m_thing']: - cflags += " "+self.post_params['m_thing']+"="+self.post_params['proc'] - if self.post_params['optim1']: - cflags += " "+self.post_params['optim1'] - if self.post_params['optim2']: - if isinstance(self.post_params['optim2'], list): - for param in self.post_params['optim2']: - cflags += " "+param - else: - cflags += " "+self.post_params['optim2'] - if self.post_params['optim3']: - cflags += " "+self.post_params['optim3'] - make_conf['CFLAGS'] = cflags - if self.post_params['chost']: - make_conf['CHOST'] = self.post_params['chost'] - if self.post_params['unstable']: - make_conf['ACCEPT_KEYWORDS'] = "~" + self.shared_info.client_profile.get_architecture_template() - if self.post_params['features']: - if isinstance(self.post_params['features'], list): - features = string.join(self.post_params['features'], ' ') - else: - features = self.post_params['features'] - if self.post_params['manfeatures']: - features += " "+self.post_params['manfeatures'] - if "distcc" in features: - #Add distcc to the services list. - if self.shared_info.install_profile.get_services(): - services = self.shared_info.install_profile.get_services() - if isinstance(services, str): - services = services.split(',') - else: - services = [] - if not "distccd" in services: - services.append("distccd") - try: - services = string.join(services, ',') - if services: - self.shared_info.install_profile.set_services(None, services, None) - except: - data += _(u"ERROR! Could not set the services list.") - #Set the distcc flag to emerge earlier than other packages. - try: - self.shared_info.install_profile.set_install_distcc(None, True, None) - except: - data += _(u"ERROR! Could not set the install distcc flag!") - if self.post_params['distcc']: - try: - make_conf['DISTCC_HOSTS'] = self.post_params['distcc'] - except: - data += "ERROR! Could not set the distcc hosts!" - make_conf['FEATURES'] = features - if self.post_params['makeopts']: - make_conf['MAKEOPTS'] = self.post_params['makeopts'] - try: - if make_conf: - etc_files['make.conf'] = make_conf - self.shared_info.install_profile.set_etc_files(etc_files) - except: - data = _(u"ERROR! Could not set the make_conf correctly!") - return self.wrap_in_webgli_template(data) - def configfiles(self): - data = "" - etc_files = self.shared_info.install_profile.get_etc_files() - data += """ - <form action="/webgli/saveconfigfiles" method="POST" enctype="multipart/form-data"> - <table cellspacing="0" cellpadding="0" width="790" height="600" border="1"> - <tr height="33%"> - <td> - <table width="100%" height="100%" border="1"> - <tr> - <td width="50%"> - <table width="100%" height="100%" border="1"> - <tr> - - <td>""" - data += '<b>Clock:</b><br>Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local.<br><input type="radio" name="clock" value="UTC" ' - if ("conf.d/clock" in etc_files) and (etc_files['conf.d/clock']['CLOCK'] == "UTC"): - data += "checked" - data += '>UTC<br><input type="radio" name="clock" value="local" ' - if ("conf.d/clock" in etc_files) and (etc_files['conf.d/clock']['CLOCK'] == "local"): - data += "checked" - data += ">Local\n" - data += """</td> - </tr> - <tr> - <td><b>Default Editor:</b><br>Choose your default editor:<br>""" - data += '<input type="radio" name="editor" value="/bin/nano" ' - if ("rc.conf" in etc_files) and (etc_files['rc.conf']['EDITOR'] == "/bin/nano"): - data += "checked" - data += '>/bin/nano (Default editor)<br><input type="radio" name="editor" value="/usr/bin/vim" ' - if ("rc.conf" in etc_files) and (etc_files['rc.conf']['EDITOR'] == "/usr/bin/vim"): - data += "checked" - data += '>/usr/bin/vim (vi improved editor)<br><input type="radio" name="editor" value="/usr/bin/emacs" ' - if ("rc.conf" in etc_files) and (etc_files['rc.conf']['EDITOR'] == "/usr/bin/emacs"): - data += "checked" - data += ">/usr/bin/emacs (The emacs editor)\n" - data += """</td> - </tr> - </table> - </td> - <td width="50%"><b>Display Manager:</b><br>Choose your display manager for Xorg-x11 (note you must make sure that package also gets installed for it to work):<br>""" - data += '<input type="radio" name="disp_manager" value="xdm" ' - if ("rc.conf" in etc_files) and (etc_files['rc.conf']['DISPLAYMANAGER'] == "xdm"): - data += "checked" - data += '>xdm (X Display Manager (NOT recommended))<br><input type="radio" name="disp_manager" value="gdm" ' - if ("rc.conf" in etc_files) and (etc_files['rc.conf']['DISPLAYMANAGER'] == "gdm"): - data += "checked" - data += '>gdm (Gnome Display Manager)<br><input type="radio" name="disp_manager" value="kdm" ' - if ("rc.conf" in etc_files) and (etc_files['rc.conf']['DISPLAYMANAGER'] == "kdm"): - data += "checked" - data += ">kdm (KDE Display Manager)\n" - data += """</td> - </tr> - </table> - </td> - </tr> - <tr height="66%"> - <td> - <table width="100%" height="100%" border="1"> - <tr> - <td width="50%"><b>Keymap</b><br>Choose your desired keymap:<br> - <select name="keymap"> - <option value=""> </option> - """ - keymap_list = GLIUtility.generate_keymap_list() - for keymap in keymap_list: - if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['KEYMAP'] == keymap): - data += '<option value="'+keymap+'" selected>'+keymap+"</option>\n" - else: - data += '<option value="'+keymap+'">'+keymap+"</option>\n" - data += "</select>\n<br>" - data += "<br><b>Windowkeys</b><br>Should we first load the 'windowkeys' console keymap?" - data += '<input type="radio" name="windowkeys" value="yes" ' - if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['SET_WINDOWKEYS'] == "yes"): - data += "checked" - data += '> Yes <input type="radio" name="windowkeys" value="no" ' - if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['SET_WINDOWKEYS'] == "no"): - data += "checked" - data += "> No <br>\n" - data += '<br><b>Extended Keymaps</b><br>This sets the maps to load for extended keyboards. Most users will leave this as is.<br>' - data += '<input type="text" name="ext_keymap" ' - if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS']): - data += 'value="'+etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS']+"\"><br>\n" - data += """ - </td> - - <td width="50%"> - <table width="100%" height="100%" border="1"> - <tr> - <td><b>Console Font</b><br>Choose your desired console font:<br> - <select name="font"> - <option value=""> </option>""" - font_list = GLIUtility.generate_consolefont_list() - for font in font_list: - if ("conf.d/consolefont" in etc_files) and (etc_files['conf.d/consolefont']['CONSOLEFONT'] == font): - data += '<option value="'+font+'" selected>'+font+"</option>\n" - else: - data += '<option value="'+font+'">'+font+"</option>\n" - data += "</select>\n" - data += """</td> - </tr> - <tr> - <td><b>Xsession</b><br>Choose what window manager you want to start default with X if run with xdm, startx, or xinit. (common options are Gnome or Xsession: <input type="text" name="xsession" """ - if ("rc.conf" in etc_files) and (etc_files['rc.conf']['XSESSION']): - data += 'value="'+etc_files['rc.conf']['XSESSION']+"\">\n" - data += """</td> - </tr> - - </table> - </td> - </tr> - </table> - </td> - </tr> -</table><input type="submit" name="SaveConfigFiles" value="Save Values"></form>""" - return self.wrap_in_webgli_template(data) - def saveconfigfiles(self): - data = "" - keymap = "" - windowkeys = "" - ext_keymap = "" - font = "" - clock = "" - editor = "" - disp_manager = "" - xsession = "" - if self.post_params['clock']: - clock = self.post_params['clock'] - if self.post_params['editor']: - editor = self.post_params['editor'] - if self.post_params['disp_manager']: - disp_manager = self.post_params['disp_manager'] - if self.post_params['keymap']: - keymap = self.post_params['keymap'] - if self.post_params['windowkeys']: - windowkeys = self.post_params['windowkeys'] - if self.post_params['ext_keymap']: - ext_keymap = self.post_params['ext_keymap'] - if self.post_params['font']: - font = self.post_params['font'] - if self.post_params['xsession']: - xsession = self.post_params['xsession'] - - etc_files = self.shared_info.install_profile.get_etc_files() - if not "conf.d/keymaps" in etc_files: - if keymap or windowkeys or ext_keymap: - etc_files['conf.d/keymaps'] = {} - if not "conf.d/consolefont" in etc_files: - if font: - etc_files['conf.d/consolefont'] = {} - if not "conf.d/clock" in etc_files: - if clock: - etc_files['conf.d/clock'] = {} - if not "rc.conf" in etc_files: - if editor or disp_manager or xsession: - etc_files['rc.conf'] = {} - if keymap: - etc_files['conf.d/keymaps']['KEYMAP'] = keymap - if windowkeys: - etc_files['conf.d/keymaps']['SET_WINDOWKEYS'] = windowkeys - if ext_keymap: - etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS'] = ext_keymap - if font: - etc_files['conf.d/consolefont']['CONSOLEFONT'] = font - if clock: - etc_files['conf.d/clock']['CLOCK'] = clock - if editor: - etc_files['rc.conf']['EDITOR'] = editor - if disp_manager: - etc_files['rc.conf']['DISPLAYMANAGER'] = disp_manager - if xsession: - etc_files['rc.conf']['XSESSION'] = xsession - self.shared_info.install_profile.set_etc_files(etc_files) - return self.wrap_in_webgli_template(data) - - def etc_portage(self): - #get etc_files here - etc_files = self.shared_info.install_profile.get_etc_files() - if self.post_params['save']: - if not self.post_params['currentfile']: - data = "ERROR you must select a file to edit!<br>\n" - return self.wrap_in_webgli_template(data) - file = self.post_params['currentfile'] - etc_files[file] = [] - etc_files[file].append(self.post_params['filecontents']) - self.shared_info.install_profile.set_etc_files(etc_files) - #get portage file list here - menulist = [("portage/package.mask",_(u"A list of DEPEND atoms to mask.")), - ("portage/package.unmask",_(u"A list of packages to unmask.")), - ("portage/package.keywords",_(u"Per-package KEYWORDS (like ACCEPT_KEYWORDS).")), - ("portage/package.use",_(u"Per-package USE flags."))] - - data = "<p>etc/portage/* Settings:</p>\n" - data += '<form name="etcportage" method="post" action="/webgli/EtcPortage" enctype="multipart/form-data">' - data += """<p>Pick a file to edit:</p> - <table width="100%" border="1"> - <tr> - <th scope="col">Edit</th> - <th scope="col">Filename</th> - <th scope="col">Description</th> - </tr>""" - for file,i in enumerate(menulist): - data += '<tr><td><input name="editfile" type="radio" value="'+menulist[file][0]+'"></td>' - data += '<td>'+menulist[file][0]+'</td>' - data += '<td>'+menulist[file][1]+"</td></tr>\n" - data += "</table><br>\n"+'<input name="fileeditsubmit" type="submit" value="EDIT">' - - if self.post_params['editfile']: - file_to_edit = self.post_params['editfile'] - - if file_to_edit in etc_files: - previous_contents = string.join(etc_files[file_to_edit],"\n") - else: - previous_contents = "" - data += "<hr> Currently editing file: "+ file_to_edit + "<br>" - data += '<input type="hidden" name="currentfile" value="'+file_to_edit+'">' - data += '<textarea name="filecontents" rows=6 cols=80>'+previous_contents+"</textarea><br>\n" - data += '<input type="submit" name="save" value="Save Changes">' - data += "</form>" - return self.wrap_in_webgli_template(data) - - def kernel(self): - data = "<p>Kernel Settings:</p>\n"; - sources = self.shared_info.install_profile.get_kernel_source_pkg() - build_method = self.shared_info.install_profile.get_kernel_build_method() - bootsplash = self.shared_info.install_profile.get_kernel_bootsplash() - configuri= self.shared_info.install_profile.get_kernel_config_uri() - data += '<form name="kernel" method="post" action="/webgli/savekernel" enctype="multipart/form-data">' - data += """ <p>Choose which kernel sources to use for your system. If using a previously-made kernel configuration, make sure the sources match the kernel used to create the configuration.</p> -<table width="100%" border="1"> -<tr><td><input name="sources" type="radio" value="livecd-kernel" """ - if sources == "livecd-kernel": - data += "checked" - data += '>Livecd Kernel </td><td>Use the running kernel (fastest)</td></tr><tr><td>'+"\n"+'<input name="sources" type="radio" value="vanilla-sources" ' - if sources == "vanilla-sources": - data += "checked" - data += '>Vanilla (normal) </td><td>Normal. The Unaltered Linux Kernel ver 2.6+ (safest) (recommended) </td></tr>'+"\n"+'<tr><td><input name="sources" type="radio" value="gentoo-sources" ' - if sources == "gentoo-sources": - data += "checked" - data += ">Gentoo</td><td>Gentoo's optimized 2.6+ kernel. (less safe) </td> </tr>\n"+'<tr><td><input name="sources" type="radio" value="hardened-sources" ' - if sources == "hardened-sources": - data += "checked" - data += ">Hardened</td><td>Hardened sources for the 2.6 kernel tree</td></tr>\n"+'<tr><td><input name="sources" type="radio" value="grsec-sources" ' - if sources == "grsec-sources": - data += "checked" - data += ">grsec</td><td>Vanilla sources with grsecurity patches </td></tr>\n" - if sources not in ["livecd-kernel", "vanilla-sources", "gentoo-sources", "hardened-sources", "grsec-sources"]: - data += '<tr><td><input name="sources" type="radio" value="Other" checked>Other</td><td>Specify your own here: <input name="manualsouces" type="text" id="manualsouces" value="'+sources+'"></td></tr></table>'+"\n" - else: - data += '<tr><td><input name="sources" type="radio" value="Other">Other</td><td>Specify your own here: <input name="manualsouces" type="text" id="manualsouces" value=""></td></tr></table>'+"\n" - data += """<hr> -<table width="507" border="1"> - <tr> - <td colspan="2" scope="col"><p>There are currently two ways the installer can compile a kernel for your new system. You can either provide a previously-made kernel configuration file and use the traditional kernel-compiling procedure (no initrd) or have genkernel automatically create your kernel for you (with initrd).</p> - <p>If you do not have a previously-made kernel configuration, YOU MUST CHOOSE Genkernel. Choose which method you want to use:</p></td> - </tr> - <tr> - <td width="143" scope="col"><input name="build_method" type="radio" value="genkernel" """ - if build_method == "genkernel": - data += "checked" - data += '>Genkernel</td><td width="348" scope="col"><input name="build_method" type="radio" value="custom" ' - if build_method == "custom": - data += "checked" - data += ">Traditional (requires a config!)</td></tr></table>\n" - data += '<p><input name="bootsplash" type="checkbox" id="bootsplash" value="True" ' - if bootsplash: - data += "checked" - data += ">Display the bootsplash screen on startup </p><p>If you have a custom kernel configuration, enter its location (otherwise just leave blank):\n" - data += '<input name="configuri" type="text" id="configuri" ' - if configuri: - data += 'value="'+configuri+'">' - data += """<input name="browseuri" type="button" id="browseuri" value="Browse" onClick="window.open('/webgli/URIBrowser?screen=kernel&baseuri=' + document.kernel.configuri.value, 'uribrowser', 'width=500,height=500,toolbars=no,statusbar=no,menubar=no,scrollbars=yes')"> - </p><p><input name="setkernel" type="submit" id="setkernel" value="Save Kernel Settings"></p></form>""" - - return self.wrap_in_webgli_template(data) - def savekernel(self): - data = "" - if self.post_params['setkernel']: - if self.post_params['manualsouces']: - try: - self.shared_info.install_profile.set_kernel_source_pkg(None,self.post_params['manualsouces'],None) - except: - data += "ERROR: Could not set the kernel sources!" + self.post_params['manualsouces'] - elif self.post_params['sources']: - try: - self.shared_info.install_profile.set_kernel_source_pkg(None,self.post_params['sources'],None) - except: - data += "ERROR: Could not set the kernel sources!" + self.post_params['sources'] - if self.post_params['build_method']: - try: - self.shared_info.install_profile.set_kernel_build_method(None,self.post_params['build_method'],None) - except: - data += "ERROR: Could not set the kernel build method!" - if self.post_params['configuri']: - try: - self.shared_info.install_profile.set_kernel_config_uri(None,self.post_params['configuri'],None) - except: - data += "ERROR: Could not set the kernel config URI!" - if self.post_params['bootsplash']: - try: - self.shared_info.install_profile.set_kernel_bootsplash(None,self.post_params['bootsplash'],None) - except: - data += "ERROR: Could not set the kernel bootsplash!" + self.post_params['bootsplash'] - - return self.wrap_in_webgli_template(data) - def bootloader(self): - arch = self.shared_info.client_profile.get_architecture_template() - parts = self.shared_info.install_profile.get_partition_tables() - #Bootloader code yanked from the x86ArchTemplate - if self.shared_info.install_profile.get_boot_device(): - boot_device = self.shared_info.install_profile.get_boot_device() - else: - boot_device = "" - foundboot = False - for device in parts: - tmp_partitions = parts[device].get_install_profile_structure() - for partition in tmp_partitions: - mountpoint = tmp_partitions[partition]['mountpoint'] - if (mountpoint == "/boot"): - foundboot = True - if (( (mountpoint == "/") and (not foundboot) ) or (mountpoint == "/boot")): - boot_device = device - - bootloader = self.shared_info.install_profile.get_boot_loader_pkg() - arch_loaders = { 'x86': [ - ("grub",(u"GRand Unified Bootloader, newer, RECOMMENDED")), - ("lilo",(u"LInux LOader, older, traditional.(detects windows partitions)"))], - 'amd64': [ - ("grub",(u"GRand Unified Bootloader, newer, RECOMMENDED"))]} #FIXME ADD OTHER ARCHS - data = "<p>Bootloader Settings:</p>" - data += '<form name="Bloader" method="post" action="/webgli/savebootloader" enctype="multipart/form-data">' - data += """ <p>To boot successfully into your new Linux system, a bootloader will be needed. If you already have a bootloader you want to use you can select None here. The bootloader choices available are dependent on what GLI supports and what architecture your system is. Choose a bootloader:</p> - <table width="100%" border="1">""" - boot_loaders = arch_loaders[arch] - boot_loaders.append(("none", (u"Do not install a bootloader. (System may be unbootable!)"))) - for i,bloader in enumerate(boot_loaders): - data += '<tr><td><input name="bootloader" type="radio" value="'+boot_loaders[i][0]+'" ' - if bootloader == boot_loaders[i][0]: - data += "checked" - data += '>'+boot_loaders[i][0]+'</td><td>'+boot_loaders[i][1]+"</td></tr>\n" - data += """ - </table> - <hr> - Most bootloaders have the ability to install to either the Master Boot Record (MBR) or some other partition. Most people will want their bootloader installed on the MBR for successful boots, but if you have special circumstances, you can have the bootloader installed to the /boot partition instead. Do you want the boot loader installed in the MBR? (YES is RECOMMENDED) - <p>""" - bootmbr = self.shared_info.install_profile.get_boot_loader_mbr() - data += '<input name="bootmbr" type="checkbox" id="bootmbr" value="True"' - if bootmbr: - data += " checked" - data += ">Install to MBR</p>" - - if not boot_device: - data += _(u"You need to partition before you can select the boot device.") - if boot_device and boot_device[-1] != 'a': - #show the menu. - data += _(u"Your boot device may not be correct. It is currently set to %s, but this device may not be the first to boot. Usually boot devices end in 'a' such as hda or sda.") % boot_device - data += _(u" Please confirm your boot device.<br>") - #grab choies from the partiton list. - boot_drive_choices = [] - for device in parts: - data += '<input type="radio" name="boot_drive_choice" value="'+device+'">'+device+"<br>\n" - - data += """<br><p>If you have any additional optional arguments you want to pass to the kernel at boot, type them here: - <input name="bootargs" type="text" id="bootargs" """ - bootargs = self.shared_info.install_profile.get_bootloader_kernel_args() - if bootargs: - data += ' value="'+bootargs+'"' - data += """> - </p> - <p> - <input name="setbootloader" type="submit" id="setbootloader" value="Save Bootloader Settings"> - </p> - </form>""" - - return self.wrap_in_webgli_template(data) - def savebootloader(self): - data = "" - if self.post_params['setbootloader']: - if self.post_params['bootloader']: - try: - self.shared_info.install_profile.set_boot_loader_pkg(None,self.post_params['bootloader'],None) - except: - data += "ERROR: Could not set the bootloader pkg!" - if self.post_params['bootmbr']: - try: - self.shared_info.install_profile.set_boot_loader_mbr(None,self.post_params['bootmbr'],None) - if self.post_params['boot_drive_choice']: - try: - self.shared_info.install_profile.set_boot_device(None,self.post_params['boot_drive_choice'],None) - except: - data += "ERROR! Could not set the boot device!"+self.post_params['boot_drive_choice'] - except: - data += "ERROR: Could not set the bootloader MBR flag to TRUE and set boot drive too!" - else: - try: - self.shared_info.install_profile.set_boot_loader_mbr(None,False,None) - except: - data += "ERROR: Could not set the bootloader MBR flag to FALSE." - if self.post_params['bootargs']: - try: - self.shared_info.install_profile.set_bootloader_kernel_args(None,self.post_params['bootargs'],None) - except: - data += "ERROR: Could not set the bootloader kernel arguments!" - return self.wrap_in_webgli_template(data) - def timezone(self): - data = "<h2>Timezone Setup </h2>" - if self.post_params['back']: - zonepath = self.post_params['tzback'] - if self.get_params['zonepath']: - zonepath = self.get_params['zonepath'] - if zonepath[-1] != "/": - try: - self.shared_info.install_profile.set_time_zone(None, zonepath[20:], None) - return self.wrap_in_webgli_template("Timezone Set") - except: - return self.wrap_in_webgli_template("ERROR: Could not set that timezone!") - else: - zonepath = "/usr/share/zoneinfo/" - skiplist = ["zone.tab","iso3166.tab","posixrules"] - tzlist = [] - for entry in os.listdir(zonepath): - if entry not in skiplist: - if os.path.isdir(zonepath + "/" + entry): entry += "/" - tzlist.append(entry) - tzlist.sort() - - data += "Timezones:<br>\n" - data += '<form name="Timezone" method="post" action="/webgli/Timezone" enctype="multipart/form-data">' - data += '<input type="hidden" name="tzback" value="'+zonepath+'"><br>' - for timezone in tzlist: - data += '<a href="/webgli/Timezone?zonepath='+zonepath+timezone+'">'+timezone+"</a><br>\n" - data += '<br><input type="submit" name="back" value="Back">' - data += "</form>" - return self.wrap_in_webgli_template(data) - def savetimezone(self): - data = "" - return self.wrap_in_webgli_template(data) - def networking(self): - data = "" - #interfaces = self.shared_info.interfaces - #if not interfaces: - interfaces = self.shared_info.install_profile.get_network_interfaces() - CC_iface = self.shared_info.client_profile.get_network_interface() - if CC_iface and (CC_iface not in interfaces): - #The CC has a network config that's not already there. Preload it. - CC_net_type = self.shared_info.client_profile.get_network_type() - if CC_net_type == 'dhcp': - try: - interfaces[CC_iface] = ('dhcp', self.shared_info.client_profile.get_network_dhcp_options(), None) - except: - pass - else: - try: - interfaces[CC_iface] = (self.shared_info.client_profile.get_network_ip(), self.shared_info.client_profile.get_network_broadcast(), self.shared_info.client_profile.get_network_netmask()) - except: - pass - data += """ - <script> - function change_editiface() { - for(i=0;i<document.Networking.elements.length;i++) { - if(document.Networking.elements[i].name == "EditIface" && document.Networking.elements[i].checked) { - location.replace('/webgli/Networking?editiface='+ document.Networking.elements[i].value); - } - } - } - </script> - <p>Devices:</p> - <form name="Networking" method="post" action="/webgli/savenetworking" enctype="multipart/form-data"> - <table width="100%" border="1"> - <tr> - <th scope="col">Device</th> - <th scope="col">IP Address </th> - <th scope="col">Broadcast</th> - <th scope="col">Netmask</th> - <th scope="col">Gateway</th> - <th scope="col">DHCP Options </th> - </tr>""" - - for iface in interfaces: - data += '<tr><td><input type="radio" name="EditIface" value="'+str(iface)+'">'+iface+"</td>\n" - if interfaces[iface][0] == 'dhcp': - data += '<td>DHCP</td><td>x</td><td>x</td><td>x</td><td>'+interfaces[iface][1]+"</td></tr>\n" - else: - data += '<td>'+interfaces[iface][0]+'</td><td>'+interfaces[iface][1]+'</td><td>'+interfaces[iface][2]+"</td><td></td></tr>\n" - data += "</table>\n" - data += """ - <input name="EditIfaceSubmit" type="button" id="EditIfaceSubmit" value="EDIT" onclick="change_editiface()"> - <input name="DelIfaceSubmit" type="submit" id="DelIfaceSubmit" value="DELETE">""" - if self.get_params['editiface']: - iface = self.get_params['editiface'] - data += '<input type="hidden" name="ifacemanual" value="'+iface+'">' - data += "<h3>Edit Interface "+iface+"</h3>\n" - data += "<table><tr><td>\n" - data += '<select name="Network_Type" size="3">' - data += '<option value="dhcp" ' - if interfaces[iface][0] == "dhcp": - data += "selected" - data += ' >DHCP</option>' - data += '<option value="static" ' - if interfaces[iface][0] != "dhcp": - data += "selected" - data += ' >Manual Config</option>' - data += '</select>' - data += '</td><td>' - data += 'Networking Info for Manual Configurations:<br>' - data += 'Enter your IP address: <input name="ip" type="text" length="50" maxlength="15" value="' - if interfaces[iface][0] != "dhcp": - data += interfaces[iface][0] - data += '"><br>' - data += 'Enter your Broadcast address: <input name="broadcast" type="text" length="50" maxlength="15" value="' - if interfaces[iface][0] != "dhcp": - data += interfaces[iface][1] - data += '"><br>' - data += 'Enter your Netmask: <input name="netmask" type="text" length="50" maxlength="15" value="' - if interfaces[iface][0] != "dhcp": - data += interfaces[iface][2] - data += '"><br></td></tr></table>' - data += '<input type="submit" value="Edit Network Device" name="AddIfaceSubmit">' - else: - data += """ - <h3>Add a new Interface:</h3> - <p> - <select name="ifacelist" id="ifacelist">""" - device_list = GLIUtility.get_eth_devices() - for device in device_list: - if device not in interfaces: - data += '<option value="'+device+'">'+device+': '+GLIUtility.get_interface_realname(device)+"</option>\n" - data += """</select> - or type your own: - <input name="ifacemanual" type="text" id="ifacemanual" size="10"> - </p><hr><table><tr><td>""" - data += '<select name="Network_Type" size="3">' - data += '<option value="dhcp">DHCP</option>' - data += '<option value="static">Manual Config</option>' - data += '</select>' - data += '</td><td>' - data += 'Networking Info for Manual Configurations:<br>' - data += 'Enter your IP address: <input name="ip" type="text" length="50" maxlength="15" value="192.168."><br>' - data += 'Enter your Broadcast address: <input name="broadcast" type="text" length="50" maxlength="15" value=".255"><br>' - data += 'Enter your Netmask: <input name="netmask" type="text" length="50" maxlength="15" value="255.255.255.0"><br><hr>Info for DHCP Configurations:<br>DHCP Options: <input type="text" name="dhcp_options" length="50"></td></tr></table>' - data += '<input type="submit" value="Add Network Device" name="AddIfaceSubmit"><hr>' - - data += 'Enter your default gateway: <table>' - default_gateway = self.shared_info.install_profile.get_default_gateway() - if default_gateway: - gway_ip = default_gateway[1] - gway_iface = default_gateway[0] - else: - gway_iface = None - gway_ip = "" - if not interfaces: - data += "You must configure a device first in order to set the default Gateway!<br>" - for iface in interfaces: - data += '<tr><td><input type="radio" name="GatewayIface" value="'+iface+'" ' - if iface == gway_iface: - data += "checked" - data += ' >'+iface+"</td></tr>\n" - data += '<tr><td>Address:<input name="gateway" type="text" length="50" maxlength="15" value="'+gway_ip+'"><br>' - dnsservers = " ".join(self.shared_info.install_profile.get_dns_servers()) - data += 'Enter your DNS servers (space-separated): <input name="dnsserver" type="text" length="70" value="'+dnsservers+'">' - data += '<hr>Proxy Information (if necessary):<br>HTTP Proxy URI: <input name="http_proxy" type="text" length="70" value=""><br>FTP Proxy URI: <input name="ftp_proxy" type="text" length="70" value=""><br>RSYNC Proxy URI: <input name="rsync_proxy" type="text" length="70" value="">' - data += """ <p>Wireless stuff here. ESSID: Key: </p> - <p>Hostname: - <input name="hostname" type="text" id="hostname"> - </p> - <p>Domainname: - <input name="domainname" type="text" id="domainname"> - </p> - <p>NIS Domainname: - <input name="nisdomainname" type="text" id="nisdomainname"> - </p> - <p> - <input name="savenetwork" type="submit" id="savenetwork" value="Save Network Information"> - </p> - </form>""" - return self.wrap_in_webgli_template(data) - def savenetworking(self): - data = "" - #interfaces = self.shared_info.interfaces - interfaces = self.shared_info.install_profile.get_network_interfaces() - if self.post_params['savenetwork']: - try: - self.shared_info.install_profile.set_network_interfaces(interfaces) - data += "Network Interfaces saved.<br>\n" - except: - data += "ERROR: Could not set the network interfaces!<br>\n" - elif self.post_params['AddIfaceSubmit']: - #network interface - if self.post_params['ifacemanual']: - newnic = self.post_params['ifacemanual'] - elif self.post_params['ifacelist']: - newnic = self.post_params['ifacelist'] - else: - data += "ERROR: No Network device selected<br>\n" - #network type - if self.post_params['Network_Type'] == "dhcp": - if self.post_params['dhcp_options']: - interfaces[newnic] = ('dhcp', self.post_params['dhcp_options'], None) - else: - interfaces[newnic] = ('dhcp', "",None) - try: - self.shared_info.install_profile.set_network_interfaces(interfaces) - data += "Network Interfaces saved.<br>\n" - except: - data += "ERROR: Could not set interface DHCP<br>\n" - elif self.post_params['Network_Type'] == "static": - if 'ip' in self.post_params: - data += "Found an IP: you submitted " + self.post_params['ip'] + "<BR>\n" - newip = self.post_params['ip'] - if 'broadcast' in self.post_params: - data += "Found an broadcast IP: you submitted " + self.post_params['broadcast'] + "<BR>\n" - newbroadcast = self.post_params['broadcast'] - if 'netmask' in self.post_params: - data += "Found an netmask IP: you submitted " + self.post_params['netmask'] + "<BR>\n" - newnetmask = self.post_params['netmask'] - if 'gateway' in self.post_params: - data += "Found an gateway IP: you submitted " + self.post_params['gateway'] + "<BR>\n" - newgateway = self.post_params['gateway'] - try: - interfaces[newnic] = (newip, newbroadcast, newnetmask) - self.shared_info.install_profile.set_network_interfaces(interfaces) - data += "Network Interfaces saved.<br>\n" - except: - data += "ERROR: Could not add the new interface.<BR>\n" - - elif self.post_params['DelIfaceSubmit']: - data += "Deleting Interface" - if self.post_params['EditIface']: - try: - iface = self.post_params['EditIface'] - del interfaces[iface] - self.shared_info.install_profile.set_network_interfaces(interfaces) - data += "Network Interfaces saved.<br>\n" - return self.return_redirect("/webgli/Networking") - except: - data += "ERROR: Could not delete the interface.<BR>\n" - else: - data += "ERROR: No device selected to delete!<br>\n" - - #elif self.post_params['EditIfaceSubmit']: - - if 'dnsserver' in self.post_params: - data += "Found an DNS server: you submitted " + self.post_params['dnsserver'] + "<BR>\n" - try: - self.shared_info.install_profile.set_dns_servers(None, self.post_params['dnsserver'], None) - except: - data += "ERROR: Could not set the DNS Server<BR>\n" - if 'http_proxy' in self.post_params: - data += "Found an HTTP Proxy IP: you submitted " + self.post_params['http_proxy'] + "<BR>\n" - try: - self.shared_info.install_profile.set_http_proxy(None, self.post_params['http_proxy'], None) - except: - data += "ERROR: Could not set the HTTP Proxy IP<BR>\n" - if 'ftp_proxy' in self.post_params: - data += "Found an FTP Proxy IP: you submitted " + self.post_params['ftp_proxy'] + "<BR>\n" - try: - self.shared_info.install_profile.set_ftp_proxy(None, self.post_params['ftp_proxy'], None) - except: - data += "ERROR: Could not set the FTP Proxy IP<BR>\n" - if 'rsync_proxy' in self.post_params: - data += "Found an RSYNC Proxy IP: you submitted " + self.post_params['rsync_proxy'] + "<BR>\n" - try: - self.shared_info.install_profile.set_rsync_proxy(None, self.post_params['rsync_proxy'], None) - except: - data += "ERROR: Could not set the RSYNC Proxy IP<BR>\n" - - return self.wrap_in_webgli_template(data) - def daemons(self): - data = "<h2>Cron and Logging Daemons:</h2>\n"; - cron = self.shared_info.install_profile.get_cron_daemon_pkg() - logger = self.shared_info.install_profile.get_logging_daemon_pkg() - data += '<form name="daemons" method="post" action="/webgli/savedaemons" enctype="multipart/form-data">' - data += """ <p>Choose which cron daemon to use for your system. While it is possible to not choose a cron daemon and still have a working system, this is NOT recommended and is considered a VERY BAD THING.<br>Choose your cron daemon:</p> - <table width="100%" border="1"> - <tr><td><input name="cron" type="radio" value="vixie-cron" """ - if cron == "vixie-cron": - data += "checked" - data += ">Vixie-cron </td><td>Paul Vixie's cron daemon, fully featured, RECOMMENDED.</td></tr>\n" - data += '<tr><td><input name="cron" type="radio" value="dcron" ' - if cron == "dcron": - data += "checked" - data += ">Dcron </td><td>A cute little cron from Matt Dillon.</td></tr>\n" - data += '<tr><td><input name="cron" type="radio" value="fcron" ' - if cron == "fcron": - data += "checked" - data += ">Fcron </td><td>A scheduler with extended capabilities over cron & anacron.</td></tr>\n" - data += '<tr><td><input name="cron" type="radio" value="none" ' - if cron == "none": - data += "checked" - data += ">None </td><td>Don't use a cron daemon. (NOT Recommended!).</td></tr></table>\n" - data += "<br><hr><p>Choose which logging daemon to use for your system. A logger is required by the Gentoo Manual.<br>Choose your logging daemon:</p>\n <table width=\"100%\" border=\"1\">\n" - data += '<tr><td><input name="logger" type="radio" value="syslog-ng" ' - if logger == "syslog-ng": - data += "checked" - data += "> syslog-ng </td><td>An advanced system logger. (default)</td></tr>\n" - data += '<tr><td><input name="logger" type="radio" value="metalog" ' - if logger == "metalog": - data += "checked" - data += "> metalog </td><td>A Highly-configurable system logger.</td></tr>\n" - data += '<tr><td><input name="logger" type="radio" value="syslogkd" ' - if logger == "syslogkd": - data += "checked" - data += "> syslogkd </td><td>The traditional set of system logging daemons.</td></tr></table>\n" - data += '<input type="submit" name="savedaemons" value="Save Daemons"></form>' - - return self.wrap_in_webgli_template(data) - def savedaemons(self): - data = "" - if self.post_params['savedaemons']: - if self.post_params['logger']: - try: - self.shared_info.install_profile.set_logging_daemon_pkg(None, self.post_params['logger'], None) - except: - data += "ERROR: Could not set logger!<br>\n" - if self.post_params['cron']: - try: - self.shared_info.install_profile.set_cron_daemon_pkg(None, self.post_params['cron'], None) - except: - data += "ERROR: Could not set cron daemon!<br>\n" - return self.wrap_in_webgli_template(data) - def services(self): - data = "" - if self.shared_info.install_profile.get_services(): - services = self.shared_info.install_profile.get_services() - if isinstance(services, str): - services = services.split(',') - else: - services = [] - choice_list = [("alsasound", _(u"ALSA Sound Daemon"),int("alsasound" in services)), - ("apache", _(u"Common web server (version 1.x)"),int("apache" in services)), - ("apache2", _(u"Common web server (version 2.x)"),int("apache2" in services)), - ("distccd", _(u"Distributed Compiling System"),int("distccd" in services)), - ("esound", _(u"ESD Sound Daemon"),int("esound" in services)), - ("hdparm", _(u"Hard Drive Tweaking Utility"),int("hdparm" in services)), - ("local", _(u"Run scripts found in /etc/conf.d/local.start"),int("local" in services)), - ("portmap", _(u"Port Mapping Service"),int("portmap" in services)), - ("proftpd", _(u"Common FTP server"),int("proftpd" in services)), - ("sshd", _(u"SSH Daemon (allows remote logins)"),int("sshd" in services)), - ("xfs", _(u"X Font Server"),int("xfs" in services)), - ("xdm", _(u"X Daemon"),int("xdm" in services))] - services_string = _(u"Choose the services you want started on bootup. Note that depending on what packages are selected, some services listed will not exist.") - data += services_string - data += '<form name="services" method="post" action="/webgli/saveservices" enctype="multipart/form-data">' - data += "<table border=\"1\"><tr><td>Activate</td><td>Service</td><td>Description</td></tr>" - for i,choice in enumerate(choice_list): - data += '<tr><td><input type="checkbox" name="services" value="'+choice_list[i][0]+'" ' - if choice_list[i][2]: - data += "checked" - data += "></td><td>"+choice_list[i][0]+"</td><td>"+choice_list[i][1]+"</td></tr>\n" - data += "</table>\n" - data += "<hr>You can also opt to enter your services in a comma-separated list (NOTE Manual list overwrites checked selections!): " - data += '<input type="text" name="servicesmanual" value="'+string.join(services, ',')+'">' - data += '<br><input type="submit" name="saveservices" value="Save Services"></form>' - return self.wrap_in_webgli_template(data) - def saveservices(self): - data = "" - if self.post_params['saveservices']: - if self.post_params['servicesmanual']: - services = self.post_params['servicesmanual'] - elif self.post_params['services']: - services = self.post_params['services'] - services = string.join(services, ',') - try: - - print services + "\n" - if services: - self.shared_info.install_profile.set_services(None, services, None) - except: - data += "ERROR! Could not set the services list.<br>\n" - return self.wrap_in_webgli_template(data) - def extrapackages(self): - data = "" - grp_list = GLIUtility.get_grp_pkgs_from_cd() - if self.post_params['packages']: - try: - packages = string.join(self.post_params['packages'], ' ') - if packages: - self.shared_info.install_profile.set_install_packages(None, packages, None) - except: - data += _(u"ERROR! Could not set the install packages! <br>\n") - if self.post_params['manualpackages']: - try: - packages = self.post_params['manualpackages'] - if packages: - self.shared_info.install_profile.set_install_packages(None, packages, None) - except: - data += _(u"ERROR! Could not set the manual install packages! <br>\n") - if self.shared_info.install_profile.get_install_packages(): - install_packages = self.shared_info.install_profile.get_install_packages() - if isinstance(install_packages, str): - install_packages = install_packages.split() - else: - install_packages = [] - - package_list = self.shared_info.install_profile.get_install_package_list() - highlevel_menu = [] - for group in package_list: - highlevel_menu.append( (group, package_list[group][0]) ) - - data += """ - <script> - </script> - <form name="packages" action="/webgli/ExtraPackages" method="POST" enctype="multipart/form-data"> - """ - for param in self.get_params: - if "show" in param: #this means it's a param referring to a group to show. include it as a hidden so it'll get shown next time too. - data += '<input type="hidden" name="'+param+'" value="'+self.get_params[param]+"\">\n" - for param in self.post_params: - if "show" in param: #this means it's a param referring to a group to show. include it as a hidden so it'll get shown next time too. - if type(self.post_params[param]) == list: - self.post_params[param] = self.post_params[param][-1] - data += '<input type="hidden" name="'+param+'" value="'+self.post_params[param]+"\">\n" - #Start the table - data += "<h2>Extra Packages</h2>Your current package list is: "+string.join(install_packages, ',') - data += '<table width="100%" border="1">' - for group_pair in highlevel_menu: - group = group_pair[0] - pkgs = package_list[group][1] - #FIXME ADD x of y SELECTED TO HEADER - if self.post_params['show_'+group] == "Expand": - data += '<tr><th scope="col"><input type="submit" name="show_'+group+'" value="Collapse"></th><td><input type="checkbox" name="all_'+group+'" value="checkbox" ' - #CALCULATE IF ALL PACKAGES IN GROUP ARE IN INSTALL PACKAGES - allpkgsfound = True - for pkg in pkgs: - if not pkg in install_packages: - allpkgsfound = False - if allpkgsfound: - data += "checked" - data += '>All</td><th scope="col">'+group+": "+group_pair[1]+"</th></tr>\n" - - else: #show plus sign for group and no table. - data += '<tr><th scope="col"><input type="submit" name="show_'+group+'" value="Expand"></th><td><input type="checkbox" name="all_'+group+'" value="checkbox" ' - #CALCULATE IF ALL PACKAGES IN GROUP ARE IN INSTALL PACKAGES - allpkgsfound = True - for pkg in pkgs: - if not pkg in install_packages: - allpkgsfound = False - if allpkgsfound: - data += "checked" - data += '>All</td><th scope="col">'+group+": "+group_pair[1]+"</th></tr>\n" - #now show the packages in the group - if self.post_params['show_'+group] == "Expand" or self.get_params['show_'+group] == "Expand": - for pkg in pkgs: - data += '<tr><td></td>' - data += '<td> <input type="checkbox" name="packages" value="'+pkg+'" ' - if pkg in install_packages: - data += "checked" - data += '>'+pkg+'</td><td>'+pkgs[pkg]+"</td></tr>\n" - else: - for pkg in pkgs: - if pkg in install_packages: - data += '<tr><td></td><td> <input type="checkbox" name="packages" value="'+pkg+'" checked>'+pkg+'</td><td>'+pkgs[pkg]+"</td></tr>\n" - data += "\n</table>" - data += '<br>Manually specify a list of packages (overwrites checked list):<input type="text" name="manualpackages"><br>' - data += '<input type="submit" name="SavePackages" value="Save Packages"></form>' - return self.wrap_in_webgli_template(data) - def savepackages(self): - data = "" - return self.wrap_in_webgli_template(data) - def users(self): - data = """ - <script> - function change_edituser() { - for(i=0;i<document.Users.elements.length;i++) { - if(document.Users.elements[i].name == "edituser" && document.Users.elements[i].checked) { - location.replace('/webgli/Users?edituser='+ document.Users.elements[i].value); - } - } - } - function verify_pass() { - if(document.Users.rootpass1.value != document.Users.rootpass2.value) { - alert("Passwords DO NOT match!"); - } - else { - alert("Passwords match."); - } - } - </script>""" - users = {} - for user in self.shared_info.install_profile.get_users(): - print str(user[0]) + " " + str(user[1]) + " " + str(user[2]) + " " + str(user[3]) - users[user[0]] = (user[0], user[1], user[2], user[3], user[4], user[5], user[6]) - data += "<p>User Settings:</p>\n" - data += '<form name="Users" method="post" action="/webgli/saveusers" enctype="multipart/form-data">' - data += """<p>Users:</p> - <table width="100%" border="1"> - <tr> - <th scope="col">Username</th> - <th scope="col">Groups</th> - <th scope="col">Shell</th> - <th scope="col">Home Directory </th> - <th scope="col">UserID</th> - <th scope="col">Comment</th> - </tr>""" - for user in users: - data += '<tr><td><input name="edituser" type="radio" value="'+users[user][0]+'">' - data += users[user][0]+"</td><td>" - for group in users[user][2]: - data += group + ", " - data += "</td><td>"+users[user][3]+"</td><td>"+users[user][4]+"</td><td>"+users[user][5]+"</td><td>"+users[user][6]+"</td></tr>\n" - - data += """</table><br> - <input name="usereditsubmit" type="button" value="EDIT" onclick="change_edituser()"> - <input name="userdelsubmit" type="submit" value="DELETE">""" - root_pass = self.shared_info.install_profile.get_root_pass_hash() - if not root_pass: - data += """<p>Root Password is not yet set! Please set it:<br> - <input name="rootpass1" type="password" id="rootpass1"> - and retype to verify: - <input name="rootpass2" type="password" id="rootpass2"> - <input name="verifyrootpass" type="button" id="verifyrootpass" value="Verify!" onclick="verify_pass()"> - <input name="setrootpassword" type="submit" value="Set"></p>""" - else: - data += """<p>Root Password is set. - <input name="setrootpass" type="submit" id="setrootpass" value="Reset Root Password"></p>""" - if self.get_params['edituser']: - username = self.get_params['edituser'] - data += """ - <p>Edit user """+username+""":</p> - <table width="100%" border="1"> - <tr> - <td scope="col"><p>Username: - <input name="newusername" type="text" id="newusername" """ - data += 'value="'+username+'">' - data += '</p><p>Password (you must retype this):<input name="newuserpass" type="password"></p>' - data += '<p>Shell (optional): <input name="newusershell" type="text" value="'+users[username][3]+'"></p>' - data += '<p>Home Directory (optional): <input name="newuserhomedir" type="text" value="'+users[username][4]+'"></p>' - data += '<p>UserID Number (optional): <input name="newuserid" type="text" value="'+users[username][5]+'"></p>' - data += '<p>Comment (optional): <input name="newusercomment" type="text" value="'+users[username][6]+"\"></p></td>\n" - data += '<td scope="col"><p>Groups:</p>' - groups = string.join(users[username][2], ",") - data += '<p>Manually specify (comma-separate)<input name="newusergroupsmanual" type="text" value="'+groups+'">' - data += """ - </p> - <input name="addnewuser" type="submit" id="addnewuser" value="Save Changes"> - </td> - </tr> - </table>""" - else: - data += """ - <p>Add a new user:</p> - <table width="100%" border="1"> - <tr> - <td scope="col"><p>Username: - <input name="newusername" type="text" id="newusername"> - </p> - <p>Password: - <input name="newuserpass" type="password" id="newuserpass"> - </p> - <p>Shell (optional): - <input name="newusershell" type="text" id="newusershell"> - </p> - <p>Home Directory (optional): - <input name="newuserhomedir" type="text" id="newuserhomedir"> - </p> - <p>UserID Number (optional): - <input name="newuserid" type="text" id="newuserid"> - </p> - <p>Comment (optional): - <input name="newusercomment" type="text" id="newusercomment"> - </p></td> - <td scope="col"><p>Groups:</p> - <p><input name="newusergroups" type="checkbox" id="newusergroups" value="users"> users<br> - <input name="newusergroups" type="checkbox" id="newusergroups" value="wheel"> wheel<br> - <input name="newusergroups" type="checkbox" id="newusergroups" value="audio"> audio<br> - Manually specify (comma-separate)<input name="newusergroupsmanual" type="text" id="newusergroupsmanual"> - </p> - <input name="addnewuser" type="submit" id="addnewuser" value="Add New User"> - </td> - </tr> - </table>""" - data += "</form>" - return self.wrap_in_webgli_template(data) - def saveusers(self): - data = "" - users = {} - for user in self.shared_info.install_profile.get_users(): - users[user[0]] = (user[0], user[1], user[2], user[3], user[4], user[5], user[6]) - if self.post_params['addnewuser']: - if self.post_params['newusername'] and self.post_params['newuserpass']: - newuser = self.post_params['newusername'] - newuserpass = self.post_params['newuserpass'] - groups = () - if self.post_params['newusergroupsmanual']: - groups = string.split(self.post_params['newusergroupsmanual'], ",") - elif self.post_params['newusergroups']: - groups = self.post_params['newusergroups'] - if self.post_params['newusercomment']: - newusercomment = self.post_params['newusercomment'] - else: - newusercomment = "" - if self.post_params['newuserid']: - newuserid = self.post_params['newuserid'] - else: - newuserid = "" - if self.post_params['newuserhomedir']: - newuserhomedir = self.post_params['newuserhomedir'] - else: - newuserhomedir = "/home/"+newuser - if self.post_params['newusershell']: - newusershell = self.post_params['newusershell'] - else: - newusershell = "/bin/bash" - try: - new_user = [newuser, GLIUtility.hash_password(newuserpass), groups, newusershell, newuserhomedir, newuserid, newusercomment] - users[newuser] = new_user - tmpusers = [] - for user in users: - tmpusers.append(users[user]) - self.shared_info.install_profile.set_users(tmpusers) - except: - data += "ERROR: could not set the users.<br>\n" - else: - data += "ERROR: NO USERNAME SPECIFIED<br>\n" - if self.post_params['rootpass1'] and self.post_params['rootpass2']: - if self.post_params['rootpass1'] == self.post_params['rootpass2']: - try: - self.shared_info.install_profile.set_root_pass_hash(None, GLIUtility.hash_password(self.post_params['rootpass1']), None) - except: - data += "ERROR: Could not set root password!<br>\n" - else: - data += "ERROR: Passwords do not match!<br>\n" - if self.post_params['setrootpass']: - try: - self.shared_info.install_profile.set_root_pass_hash(None, "",None) - return self.return_redirect("/webgli/Users") - except: - data = "ERROR: Could not reset the root password!<br>\n" - if self.post_params['userdelsubmit']: - if self.post_params['edituser']: - user_to_del = self.post_params['edituser'] - try: - data += "Deleting user: "+user_to_del - del users[user_to_del] - tmpusers = [] - for user in users: - tmpusers.append(users[user]) - self.shared_info.install_profile.set_users(tmpusers) - except: - data += "ERROR: could not set the users.<br>\n" - - return self.wrap_in_webgli_template(data) - def review(self): - settings = "<pre>Look carefully at the following settings to check for mistakes.\nThese are the installation settings you have chosen:\n\n" - #Partitioning - settings += "Partitioning: \n Key: Minor, Pri/Ext, Filesystem, MkfsOpts, Mountpoint, MountOpts, Size.\n" - devices = self.shared_info.install_profile.get_partition_tables() - drives = devices.keys() - drives.sort() - for drive in drives: - settings += " Drive: " + drive + devices[drive].get_model() + "\n" - partlist = devices[drive].get_ordered_partition_list() - tmpparts = devices[drive].get_partitions() - for part in partlist: - tmppart = tmpparts[part] - entry = " " - if tmppart.get_type() == "free": - #partschoice = "New" - entry += _(u" - Unallocated space (") - if tmppart.is_logical(): - entry += _(u"logical, ") - entry += str(tmppart.get_mb()) + "MB)" - elif tmppart.get_type() == "extended": - entry += str(int(tmppart.get_minor())) - entry += _(u" - Extended Partition (") + str(tmppart.get_mb()) + "MB)" - else: - entry += str(int(tmppart.get_minor())) + " - " - if tmppart.is_logical(): - entry += _(u"Logical (") - else: - entry += _(u"Primary (") - entry += tmppart.get_type() + ", " - entry += (tmppart.get_mkfsopts() or "none") + ", " - entry += (tmppart.get_mountpoint() or "none") + ", " - entry += (tmppart.get_mountopts() or "none") + ", " - entry += str(tmppart.get_mb()) + "MB)" - settings += entry + "\n" - - #Network Mounts: - network_mounts = copy.deepcopy(self.shared_info.install_profile.get_network_mounts()) - settings += "\nNetwork Mounts: \n" - for mount in network_mounts: - settings += " "+mount['host']+":"+mount['export']+"\n" - - #Install Stage: - settings += "\nInstall Stage: " + str(self.shared_info.install_profile.get_install_stage()) + "\n" - if self.shared_info.install_profile.get_dynamic_stage3(): - settings += " Tarball will be generated on the fly from the CD.\n" - else: - settings += " Tarball URI: " + self.shared_info.install_profile.get_stage_tarball_uri() + "\n" - - #Portage Tree Sync Type: - settings += "\nPortage Tree Sync Type: " + self.shared_info.install_profile.get_portage_tree_sync_type() + "\n" - if self.shared_info.install_profile.get_portage_tree_sync_type() == "snapshot": - settings += " Portage snapshot URI: " + self.shared_info.install_profile.get_portage_tree_snapshot_uri() + "\n" - - #Kernel Settings: - settings += "\nKernel Settings:\n" - settings += " Kernel Sources: " + self.shared_info.install_profile.get_kernel_source_pkg() + "\n" - if self.shared_info.install_profile.get_kernel_source_pkg() != "livecd-kernel": - settings += " Kernel Build Method: " + self.shared_info.install_profile.get_kernel_build_method() + "\n" - if self.shared_info.install_profile.get_kernel_build_method() == "genkernel": - settings += " Kernel Bootsplash Option: " + str(self.shared_info.install_profile.get_kernel_bootsplash()) + "\n" - if self.shared_info.install_profile.get_kernel_config_uri(): - settings += " Kernel Configuration URI: " + self.shared_info.install_profile.get_kernel_config_uri() + "\n" - - #Bootloader Settings: - settings += "\nBootloader Settings:\n" - settings += " Bootloader package: " + self.shared_info.install_profile.get_boot_loader_pkg() + "\n" - if self.shared_info.install_profile.get_boot_loader_pkg() != "none": - settings += " Install bootloader to MBR: " + str(self.shared_info.install_profile.get_boot_loader_mbr()) + "\n" - settings += " Bootloader kernel arguments: " +self.shared_info.install_profile.get_bootloader_kernel_args() + "\n" - - #Timezone: - settings += "\nTimezone: " + self.shared_info.install_profile.get_time_zone() + "\n" - - #Networking Settings: - settings += "\nNetworking Settings: \n" - interfaces = self.shared_info.install_profile.get_network_interfaces() - for iface in interfaces: - if interfaces[iface][0] == 'dhcp': - settings += " " + iface + _(u": Settings: DHCP. Options: ") + interfaces[iface][1] + "\n" - else: - settings += " " + iface + _(u"IP: ") + interfaces[iface][0] + _(u" Broadcast: ") + interfaces[iface][1] + _(u" Netmask: ") + interfaces[iface][2] + "\n" - default_gateway = self.shared_info.install_profile.get_default_gateway() - if default_gateway: - settings += " Default Gateway: " + default_gateway[0] + "/" + default_gateway[1] + "\n" - settings += " Hostname: " + self.shared_info.install_profile.get_hostname() + "\n" - if self.shared_info.install_profile.get_domainname(): - settings += " Domainname: " +self.shared_info.install_profile.get_domainname() + "\n" - if self.shared_info.install_profile.get_nisdomainname(): - settings += " NIS Domainname: " +self.shared_info.install_profile.get_nisdomainname() + "\n" - if self.shared_info.install_profile.get_dns_servers(): - for dns_server in self.shared_info.install_profile.get_dns_servers(): - settings += " DNS Server: " +dns_server + "\n" - if self.shared_info.install_profile.get_http_proxy(): - settings += " HTTP Proxy: " +self.shared_info.install_profile.get_http_proxy() + "\n" - if self.shared_info.install_profile.get_ftp_proxy(): - settings += " FTP Proxy: " +self.shared_info.install_profile.get_ftp_proxy() + "\n" - if self.shared_info.install_profile.get_rsync_proxy(): - settings += " RSYNC Proxy: " +self.shared_info.install_profile.get_rsync_proxy() + "\n" - - #Cron Daemon: - settings += "\nCron Daemon: " + self.shared_info.install_profile.get_cron_daemon_pkg() + "\n" - - #Logger: - settings += "\nLogging Daemon: " + self.shared_info.install_profile.get_logging_daemon_pkg() + "\n" - - #Extra packages: - if self.shared_info.install_profile.get_install_packages(): - install_packages = self.shared_info.install_profile.get_install_packages() - else: - install_packages = [] - settings += "\nExtra Packages: " - for package in install_packages: - settings += package + " " - settings += "\n" - #Services: - if self.shared_info.install_profile.get_services(): - services = self.shared_info.install_profile.get_services() - else: - services = [] - settings += "\nAdditional Services: " - for service in services: - settings += service + " " - settings += "\n" - - #Other Configuration Settings (rc.conf): - #Make.conf Settings: - settings += "\nConfiguration Files Settings:\n" - etc_files = self.shared_info.install_profile.get_etc_files() - for etc_file in etc_files: - settings += " File:" + etc_file + "\n" - if isinstance(etc_files[etc_file], dict): - for name in etc_files[etc_file]: - settings += " Variable: " + name + " Value: " + etc_files[etc_file][name] + "\n" - else: - for entry in etc_files[etc_file]: - settings += " Value: "+ entry + "\n" - - #Additional Users: - settings += "\nAdditional Users:\n" - users = {} - for user in self.shared_info.install_profile.get_users(): - users[user[0]] = (user[0], user[1], user[2], user[3], user[4], user[5], user[6]) - for user in users: - settings += " Username: " + user - settings += "\n Group Membership: " + string.join(users[user][2], ",") - settings += "\n Shell: " + users[user][3] - settings += "\n Home Directory: " + users[user][4] - if users[user][5]: - settings += "\n User Id: " + users[user][5] - if users[user][6]: - settings += "\n User Comment: " + users[user][6] - settings += "</pre>" - return self.wrap_in_webgli_template(settings) - def savereview(self): - data = "" - return self.wrap_in_webgli_template(data) - - def uribrowser(self): - formfields = { 'portage': "opener.document.portage.snapshoturi", - 'stage': "opener.document.stage.tarballuri", - 'kernel': "opener.document.kernel.configuri" } - try: - formfield = formfields[self.get_params['screen']] - except: - return "Parameter 'screen' was not passed" - if self.get_params['uritype']: - if self.get_params['mirror']: - uri = self.get_params['mirror'] - if not uri.endswith('/'): - uri += "/" - else: - if self.get_params['uritype'] == "file": - uri = "file://" - else: - uri = self.get_params['uritype'] + "://" - if self.get_params['username']: - uri += self.get_params['username'] - if self.get_params['password']: - uri += ":" + self.get_params['password'] - uri += "@" - uri += self.get_params['host'] - if self.get_params['port']: - uri += ":" + self.get_params['port'] - uri += (self.get_params['path'] or "/") - else: - uri = self.get_params['baseuri'] - if not uri: - uri = "file:///" - if not uri.endswith('/'): - uri = uri[:uri.rfind('/')+1] - uriparts = list(GLIUtility.parse_uri(uri)) - for i in range(len(uriparts)): - if not uriparts[i]: - uriparts[i] = "" - uritypes = { 'file': "", 'http': "", 'ftp': "", 'scp': "" } - uritypes[uriparts[0]] = " selected" - if uriparts[0] == "http": - mirrors = GLIUtility.list_mirrors(http=True, ftp=False, rsync=False) - elif uriparts[0] == "ftp": - mirrors = GLIUtility.list_mirrors(http=False, ftp=True, rsync=False) - else: - mirrors = [] - mirrorlist = "" - for mirror in mirrors: - mirrorlist += '<option value="%s">%s</option>' % (mirror[0], mirror[1]) - content = """ - <script> - function select_uri(uri) { - %s.value = document.uri.baseuri.value + uri; - window.close(); - } - - function browse_uri(uri) { - location.replace('/webgli/URIBrowser?screen=%s&baseuri=' + uri); - } - - function refresh_uri() { - //location.replace('/webgli/URIBrowser?screen=%s&uritype=' + document.uri.uritype.value + '&host=' + document.uri.host.value + '&username=' + document.uri.username.value + '&password=' + document.uri.password.value + '&port=' + document.uri.port.value + '&path=' + document.uri.path.value + '&mirror=' + document.uri.mirror.value); - document.uri.submit(); - } - - function change_uritype() { - location.replace('/webgli/URIBrowser?screen=%s&uritype=' + document.uri.uritype.value); - } - </script> - <h3>URI Browser</h3> - <form name="uri" action="/webgli/URIBrowser" method="GET"> - <input type="hidden" name="baseuri" value="%s"> - <input type="hidden" name="screen" value="%s"> - <table> - <tr> - <td width="90">URI type:</td> - <td><select name="uritype" onchange="change_uritype()"><option%s>file</option><option%s>http</option><option%s>ftp</option><option%s>scp</option></select></td> - </tr> - <tr> - <td valign="top">Host:</td> - <td><input type="text" name="host" size="30" value="%s"><br>or choose a mirror:<br><select name="mirror" onchange="document.uri.submit()"><option value=""> - </option>%s</select></td> - </tr> - <tr> - <td>Username:</td> - <td><input type="text" name="username" size="15" value="%s"></td> - </tr> - <tr> - <td>Password:</td> - <td><input type="text" name="password" size="15" value="%s"></td> - </tr> - <tr> - <td>Port:</td> - <td><input type="text" name="port" size="5" value="%s"></td> - </tr> - <tr> - <td>Path:</td> - <td><input type="text" name="path" size="30" value="%s"></td> - </tr> - <tr> - <td> </td> - <td> </td> - </tr> - <tr> - <td colspan="2"><input type="button" value="Cancel" onclick="window.close();"> <input type="button" value="Refresh" onclick="refresh_uri()"></td> - </tr> - <tr> - <td> </td> - <td> </td> - </tr> - </table> - <table>""" % (formfield, self.get_params['screen'], self.get_params['screen'], self.get_params['screen'], uri, self.get_params['screen'], uritypes['file'], uritypes['http'], uritypes['ftp'], uritypes['scp'], uriparts[3], mirrorlist, uriparts[1], uriparts[2], uriparts[4], uriparts[5]) - if not uri.endswith("/"): - uri = uri[:uri.rfind("/")+1] - try: - filelist = GLIUtility.get_directory_listing_from_uri(uri) - except: - filelist = ["There was an error loading the directory list"] - for listing in filelist: - content += " <tr>\n <td>" - if listing.endswith('/'): - content += '<img src="../folder.gif">' - else: - content += ' ' - content += '</td>\n <td><a href="#" onclick="' - if listing.endswith('/'): - listing = listing[:-1] - if listing == "..": - tmpuri = uri[:uri[:-1].rfind("/")+1] - else: - tmpuri = uri + listing + "/" - content += "browse_uri('%s')" % tmpuri - else: - content += "select_uri('%s')" % listing - content += "; return false\">%s</a></td>\n </tr>\n" % listing - - return content - - def handle(self, path): - if not self.shared_info.install_profile: - self.shared_info.install_profile = GLIInstallProfile.InstallProfile() - if not self.shared_info.client_profile: - self.shared_info.client_profile = GLIClientConfiguration.ClientConfiguration() - paths = { '/webgli': self.showwelcome, - '/webgli/': self.showwelcome, - '/webgli/ClientConfig': self.clientconfig, - '/webgli/saveclientconfig': self.saveclientconfig, - '/webgli/NetworkMounts': self.networkmounts, - '/webgli/savenetmounts': self.savenetmounts, - '/webgli/StageSelection': self.stageselection, - '/webgli/savestage': self.savestage, - '/webgli/PortageTree': self.portagetree, - '/webgli/Partitioning': self.partitioning, - '/webgli/Partitioning2': self.partitioning2, - '/webgli/Partitioning3': self.partitioning3, - '/webgli/Partitioning4': self.partitioning4, - '/webgli/saveportage': self.saveportage, - '/webgli/GlobalUSE': self.globaluse, - '/webgli/saveglobaluse': self.saveglobaluse, - '/webgli/LocalUSE': self.localuse, - '/webgli/savelocaluse': self.savelocaluse, - '/webgli/MakeDotConf': self.makedotconf, - '/webgli/savemakedotconf': self.savemakedotconf, - '/webgli/ConfigFiles': self.configfiles, - '/webgli/saveconfigfiles': self.saveconfigfiles, - '/webgli/EtcPortage': self.etc_portage, - '/webgli/Kernel': self.kernel, - '/webgli/savekernel': self.savekernel, - '/webgli/Bootloader': self.bootloader, - '/webgli/savebootloader': self.savebootloader, - '/webgli/Timezone': self.timezone, - '/webgli/savetimezone': self.savetimezone, - '/webgli/Networking': self.networking, - '/webgli/savenetworking': self.savenetworking, - '/webgli/Daemons': self.daemons, - '/webgli/savedaemons': self.savedaemons, - '/webgli/ExtraPackages': self.extrapackages, - '/webgli/savepackages': self.savepackages, - '/webgli/Services': self.services, - '/webgli/saveservices': self.saveservices, - '/webgli/Users': self.users, - '/webgli/saveusers': self.saveusers, - '/webgli/Review': self.review, - '/webgli/savereview': self.savereview, - '/webgli/URIBrowser': self.uribrowser, - - '/webgli/loadprofile': self.loadprofile, - '/webgli/loadprofile2': self.loadprofile2, - '/webgli/saveprofile': self.saveprofile, - '/webgli/saveprofile2': self.saveprofile2 - } - return_content = paths[path]() - return self.headers_out, return_content - - def get_exception(self): - etype, value, tb = sys.exc_info() - s = traceback.format_exception(etype, value, tb) - content = "<pre>" - for line in s: - content += line - content += "</pre>" - return content diff --git a/src/net/server/handlers/Welcome.py b/src/net/server/handlers/Welcome.py deleted file mode 100644 index 944d7f3..0000000 --- a/src/net/server/handlers/Welcome.py +++ /dev/null @@ -1,22 +0,0 @@ -import GLIServerProfile -import handler - -class Welcome(handler.Handler): - - def welcome(self): - return self.wrap_in_template("Do some shit on the left") - - def showargs(self): - text = "These are the GET params you passed:<br><br><pre>" - text += str(self.get_params) - text += "</pre><br><br>These are the POST params you passed:<br><br><pre>" - text += str(self.post_params) - text += "</pre>" - return self.wrap_in_template(text) - - def handle(self, path): - paths = { '/welcome': self.welcome, - '/showargs': self.showargs - } - return_content = paths[path]() - return self.headers_out, return_content diff --git a/src/net/server/html/add_client.pyhtml b/src/net/server/html/add_client.pyhtml deleted file mode 100644 index 890cbce..0000000 --- a/src/net/server/html/add_client.pyhtml +++ /dev/null @@ -1,65 +0,0 @@ -<? include /main_top.pyhtml ?> -<? -errormsg = "" -if post_params: - if not post_params['hostname']: - errormsg += "You didn't give a hostname!<br>" - elif not (post_params['current_ip'] or post_params['current_dhcp'] or post_params['current_netup']): - errormsg += "You must specify an IP address or DHCP!<br>" - elif not post_params['mac']: - errormsg += "You must specify the mac address of the client!<br>" - else: - for client in shared_info.clients: - if post_params['mac'] == client['mac']: - errormsg = "That client already exists!" - if not errormsg: - try: - new_client = {} - new_client['hostname'] = post_params['hostname'] - new_client['mac'] = post_params['mac'] - if post_params['current_netup']: - new_client['current_ip'] = "None" - elif post_params['current_dhcp']: - new_client['current_ip'] = "dhcp" - else: - new_client['current_ip'] = post_params['current_ip'] - if post_params['profile']: - new_client['profile'] = post_params['profile'] - if post_params['post_dhcp']: - new_client['post_ip'] = "dhcp" - elif post_params['post_ip']: - new_client['post_ip'] = post_params['post_ip'] - new_client['status'] = "Not Installed" - if not post_params['mac'] in shared_info.client_state: - shared_info.client_state[new_client['mac']] = { 'ip': new_client['current_ip'], 'install_status': "waiting for server", 'start_install': False } - shared_info.clients.append(new_client) - except: - errormsg += "Error while adding the new client!" - if not errormsg: - errormsg = "Client added successfully" - -?> -<: if errormsg: -<br><% errormsg %><br><br> -:> -<h2>Add Client:</h2> -<br> -Note, all clients will first start with the start_install flag unset. You must use the Execute -step to deploy all installations. -<form action="/add_client.pyhtml" method="POST" enctype="multipart/form-data"> -Hostname: <input type="text" name="hostname"><br> -MAC Address: <input type="text" name="mac" maxlength="18"><br> -Current IP: <input type="text" name="current_ip" maxlength="15"> --- or <input type="checkbox" name="current_dhcp"> DHCP --- or <input type="checkbox" name="current_netup"> None (client is already up and connected to the net)<br> -Profile to be used by this client: <select name="profile"> -<: for profile in shared_info.profiles: -<option value="<% profile['name'] %>"><% profile['name'] %></option> -</select><br><hr> -Post-install settings: -Post-install network IP: <input type="text" name="post_ip" maxlength="15"> -blah blah netmask gateway blah. ---- or <input type="checkbox" name="post_dhcp"> DHCP. - -<input type="submit" name="addclient" value="Add Client"> -</form> - -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/add_profile.pyhtml b/src/net/server/html/add_profile.pyhtml deleted file mode 100644 index 4bfc313..0000000 --- a/src/net/server/html/add_profile.pyhtml +++ /dev/null @@ -1,42 +0,0 @@ -<? include /main_top.pyhtml ?> -<? -errormsg = "" -if post_params: - if post_params['profile_name']: - for profile in shared_info.profiles: - if post_params['profile_name'] == profile['name']: - errormsg = "That profile already exists!" - if not errormsg: - try: - new_profile = {} - new_profile['name'] = post_params['profile_name'] - new_profile['ccxmlfile'] = post_params['ccxmlfile'] - new_profile['ipxmlfile'] = post_params['ipxmlfile'] - shared_info.profiles.append(new_profile) - except: - errormsg += "Error while adding the new profile!" - else: - errormsg += "You didn't specify a profile name! " - if not errormsg: - errormsg = "Profile added successfully" - -?> -<: if errormsg: -<br><% errormsg %><br><br> -:> -<h2>Add Profile:</h2> -<br> -<form action="/add_profile.pyhtml" method="POST" enctype="multipart/form-data"> -To create the profile, you can use any of the frontends available to GLI. -The <a href="/webgli/">webgli</a> frontend is available via this web interface. -<br><br> -Name: <input type="text" name="profile_name"><br> -Client Configuration Profile Filename: <input type="text" name="ccxmlfile"><br> -Installation Profile Filename: <input type="text" name="ipxmlfile"><br> -<input type="submit" name="addprofile" value="Add Profile"> -<hr> - - -</form> - -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/banner-800x64.png b/src/net/server/html/banner-800x64.png Binary files differdeleted file mode 100755 index fa60b92..0000000 --- a/src/net/server/html/banner-800x64.png +++ /dev/null diff --git a/src/net/server/html/configure.pyhtml b/src/net/server/html/configure.pyhtml deleted file mode 100644 index 7bc020f..0000000 --- a/src/net/server/html/configure.pyhtml +++ /dev/null @@ -1,65 +0,0 @@ -<? include /main_top.pyhtml ?> - -<h2>Clients</h2> -<? -errormsg = "" -print "DEBUG: Client_state:<br>" -print str(shared_info.client_state) -if post_params: - print "<br>WE got post params, bitch!" - if post_params['mark_for_install']: - if type(post_params['clients']) == list: - for client in post_params['clients']: - print "<br>Found a client.:" +client - if client in shared_info.client_state: - print "client was found in client_state" - shared_info.client_state[client]['install_status'] = "Ready to Install" - else: - print "<br>Found a client.:" + post_params['clients'] - if post_params['clients'] in shared_info.client_state: - print "client was found in the client_state" - shared_info.client_state[post_params['clients']]['install_status'] = "Ready to Install" - elif post_params['remove_mark']: - if type(post_params['clients']) == list: - for client in post_params['clients']: - shared_info.client_state[client]['install_status'] = "waiting for server" - else: - if post_params['clients'] in shared_info.client_state: - shared_info.client_state[post_params['clients']]['install_status'] = "waiting for server" -?> - - -<form action="/configure.pyhtml" method="POST" enctype="multipart/form-data"> - -<table width="100%" cellpadding="1" border="1"> - <tr> - <td><u>Hostname</u></td> - <td><u>MAC</u></td> - <td><u>Current IP</u></td> - <td><u>Post-install IP</u></td> - <td><u>Profile</u></td> - <td><u>Status</u></td> - <td><u>MARK</u></td> - </tr> -<: for client in shared_info.clients: -<? -client_info = [client['hostname'], client['mac'], client['current_ip'], client['post_ip'], client['profile'], client['status']] -if client['mac'] in shared_info.client_state: - client_info[2] = shared_info.client_state[client['mac']]['ip'] - client_info[5] = shared_info.client_state[client['mac']]['install_status'] -?> - <tr> - <td><% client_info[0] %></td> - <td><% client_info[1] %></td> - <td><% client_info[2] %></td> - <td><% client_info[3] %></td> - <td><% client_info[4] %></td> - <td><% client_info[5] %></td> - <td><input type="checkbox" name="clients" value="<% client_info[1] %>"></td> - </tr> -:> -</table> -<input type="submit" name="mark_for_install" value="Mark for INSTALL"> -<input type="submit" name="remove_mark" value="Remove Ready-To-Install mark"> -</form> -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/delete_client.pyhtml b/src/net/server/html/delete_client.pyhtml deleted file mode 100644 index f8de564..0000000 --- a/src/net/server/html/delete_client.pyhtml +++ /dev/null @@ -1,45 +0,0 @@ -<? include /main_top.pyhtml ?> - -<h2>Delete Client</h2> -<: if post_params['delclient']: -<? -for i,client in __builtins__.enumerate(shared_info.clients): - if client['hostname'] == post_params['delclient']: - try: - del shared_info.clients[i] - print "<h1>Client "+post_params['delclient']+" deleted!</h1>" - except: - print "Error: could not delete client: "+ post_params['delclient'] -?> -:> -<form action="#" method="post" enctype="multipart/form-data" name="delete"> -<table width="100%" cellpadding="0" cellpadding="0"> - <tr> - <td><u>DELETE</u></td> - <td><u>Name</u></td> - <td><u>MAC</u></td> - <td><u>Post-install IP</u></td> - <td><u>Profile</u></td> - <td><u>Install progress</u></td> - </tr> -<: for client in shared_info.clients: -<? -client_info = [client['hostname'], client['mac'], client['current_ip'], client['post_ip'], client['profile'], 'N/A'] -if client['mac'] in shared_info.client_state: - client_info[2] = shared_info.client_state[client['mac']]['ip'] - client_info[5] = shared_info.client_state[client['mac']]['install_status'] -?> - <tr> - <td><input type="radio" name="delclient" value="<% client_info[0] %>"></td> - <td><% client_info[0] %></td> - <td><% client_info[1] %></td> - <td><% client_info[2] %></td> - <td><% client_info[3] %></td> - <td><% client_info[4] %></td> - <td><% client_info[5] %></td> - </tr> -:> -</table> -<br><input type="submit" name="DelSubmit" value="DELETE (no takebacks!)"> -</form> -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/delete_profile.pyhtml b/src/net/server/html/delete_profile.pyhtml deleted file mode 100644 index af1aaf9..0000000 --- a/src/net/server/html/delete_profile.pyhtml +++ /dev/null @@ -1,34 +0,0 @@ -<? include /main_top.pyhtml ?> - -<h2>Delete Profile</h2> -<: if post_params['delprofile']: -<? -for i,profile in __builtins__.enumerate(shared_info.profiles): - if profile['name'] == post_params['delprofile']: - try: - del shared_info.profiles[i] - print "<h1>Profile "+post_params['delprofile']+" deleted!</h1>" - except: - print "Error: could not delete profile: "+ post_params['delprofile'] -?> -:> -<form action="#" method="post" enctype="multipart/form-data" name="delete"> -<p> - <table><tr><td>DELETE</td><td>Profile Name:</td><td>Profile CC filename:</td><td>Profile IP filename:</td></tr> - -<: for profile in shared_info.profiles: -<? -profile_info = [profile['name'], profile['ccxmlfile'], profile['ipxmlfile'] ] - -?> - <tr> - <td><input type="radio" name="delprofile" value="<% profile_info[0] %>" unchecked></td> - <td><% profile_info[0] %></td> - <td><% profile_info[1] %></td> - <td><% profile_info[2] %></td> - </tr> -:> -</table> -<br><input type="submit" name="DelSubmit" value="DELETE (no takebacks!)"> -</form> -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/edit_client.pyhtml b/src/net/server/html/edit_client.pyhtml deleted file mode 100644 index 23965bd..0000000 --- a/src/net/server/html/edit_client.pyhtml +++ /dev/null @@ -1,100 +0,0 @@ -<? include /main_top.pyhtml ?> -<? -client_data = ["","","","","", ""] -errormsg = "" -if post_params['EditSubmit']: - if not post_params['hostname']: - errormsg += "You didn't give a hostname!<br>" - elif not (post_params['current_ip'] or post_params['current_dhcp'] or post_params['current_netup']): - errormsg += "You must specify an IP address or DHCP!<br>" - elif not post_params['mac']: - errormsg += "You must specify the mac address of the client!<br>" - else: - for i,client in enumerate(shared_info.clients): - if post_params['mac'] == client['mac']: - shared_info.clients[i]['hostname'] = post_params['hostname'] - shared_info.clients[i]['mac'] = post_params['mac'] - if post_params['current_netup']: - shared_info.clients[i]['current_ip'] = "None" - elif post_params['current_dhcp']: - shared_info.clients[i]['current_ip'] = "dhcp" - else: - shared_info.clients[i]['current_ip'] = post_params['current_ip'] - if post_params['profile']: - shared_info.clients[i]['profile'] = post_params['profile'] - if post_params['post_dhcp']: - shared_info.clients[i]['post_ip'] = "dhcp" - elif post_params['post_ip']: - shared_info.clients[i]['post_ip'] = post_params['post_ip'] - shared_info.clients[i]['status'] = "Not Installed" - if not post_params['mac'] in shared_info.client_state: - shared_info.client_state[post_params['mac']] = { 'ip': post_params['current_ip'], 'install_status': "waiting for server", 'start_install': False } - if not errormsg: - errormsg = "Client edited successfully" - - -?> -<h2>Edit Client</h2> -<: if post_params['editclient']: -<? -for client in shared_info.clients: - if client['mac'] == post_params['editclient']: - client_data = [client['hostname'], client['mac'], client['current_ip'], client['post_ip'], client['profile'], 'N/A'] - if client['mac'] in shared_info.client_state: - client_data[2] = shared_info.client_state[client['mac']]['ip'] - client_data[5] = shared_info.client_state[client['mac']]['install_status'] - print "Found the client.<br>" -?> -:> -<form action="#" method="post" enctype="multipart/form-data" name="edit"> -<table width="100%" cellpadding="1" border="1"> - <tr> - <td><u>EDIT</u></td> - <td><u>Name</u></td> - <td><u>MAC</u></td> - <td><u>Current IP</u></td> - <td><u>Post-install IP</u></td> - <td><u>Profile</u></td> - <td><u>Install progress</u></td> - </tr> -<: for client in shared_info.clients: -<? -client_info = [client['hostname'], client['mac'], client['current_ip'], client['post_ip'], client['profile'], 'N/A'] -if client['mac'] in shared_info.client_state: - client_info[2] = shared_info.client_state[client['mac']]['ip'] - client_info[5] = shared_info.client_state[client['mac']]['install_status'] -?> - <tr> - <td><input type="radio" name="editclient" value="<% client_info[1] %>"></td> - <td><% client_info[0] %></td> - <td><% client_info[1] %></td> - <td><% client_info[2] %></td> - <td><% client_info[3] %></td> - <td><% client_info[4] %></td> - <td><% client_info[5] %></td> - </tr> -:> -</table> -<br><input type="submit" name="EditSubmit" value="Edit"> -</form> -<? #EDIT THE CLIENT HERE ?> -<: if post_params['editclient']: -<form action="#" method="POST" enctype="multipart/form-data"> -Hostname: <input type="text" name="hostname" value="<% client_data[0] %>"><br> -MAC Address: <input type="text" name="mac" maxlength="17" value="<% client_data[1] %>"><br> -Current IP: <input type="text" name="current_ip" maxlength="15" value="<% client_data[2] %>"> --- or <input type="checkbox" name="current_dhcp" <? if client_data[2] == "dhcp": print "checked" ?>> DHCP --- or <input type="checkbox" name="current_netup" <? if client_data[2] == "None": print "checked" ?>> None (client is already up and connected to the net)<br> -Profile to be used by this client: <select name="profile"> -<: for profile in shared_info.profiles: -<option value="<% profile['name'] %>" <? if client_data[4] == profile['name']: print "selected" ?>><% profile['name'] %></option> -:> -</select><br><hr> -Post-install settings: -Post-install network IP: <input type="text" name="post_ip" maxlength="15" value="<% client_data[3] %>"> -blah blah netmask gateway blah. ---- or <input type="checkbox" name="post_dhcp"> DHCP. - -<input type="submit" name="EditSubmit" value="Save Changes"> - -</form> -:> -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/edit_profile.pyhtml b/src/net/server/html/edit_profile.pyhtml deleted file mode 100644 index 245ac29..0000000 --- a/src/net/server/html/edit_profile.pyhtml +++ /dev/null @@ -1,30 +0,0 @@ -<? include /main_top.pyhtml ?> - -<h2>Edit Profile</h2> -<: if post_params['editprofile']: -<? -for profile in shared_info.profiles: - if profile['name'] == post_params['editprofile']: - print "Found the profile. Normally we'd let you edit the profile here.. but <h2>HAHA ITS NOT DONE.</h2><br>" -?> -:> -<form action="#" method="post" enctype="multipart/form-data" name="edit"> - <p> - <table><tr><td>Edit</td><td>Profile Name:</td><td>Profile CC filename:</td><td>Profile IP filename:</td></tr> - -<: for profile in shared_info.profiles: -<? -profile_info = [profile['name'], profile['ccxmlfile'], profile['ipxmlfile'] ] - -?> - <tr> - <td><input type="radio" name="editprofile" value="<% profile_info[0] %>" unchecked></td> - <td><% profile_info[0] %></td> - <td><% profile_info[1] %></td> - <td><% profile_info[2] %></td> - </tr> -:> -</table> -<br><input type="submit" name="EditSubmit" value="Edit"> -</form> -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/execute.pyhtml b/src/net/server/html/execute.pyhtml deleted file mode 100644 index ec280c0..0000000 --- a/src/net/server/html/execute.pyhtml +++ /dev/null @@ -1,57 +0,0 @@ -<? include /main_top.pyhtml ?> - -<h2>Execute Installation</h2> -<? -errormsg = "" -print "DEBUG: Post Params:<br>" -print str(post_params) + "<BR>" -print "DEBUG: Client_state:<br>" -print str(shared_info.client_state) -if post_params: - print "<br>WE got post params, bitch!" - if post_params['deploy_install']: - if type(post_params['clients']) == list: - for client in post_params['clients']: - print "<br>Found a client.:" +client - if client in shared_info.client_state: - print "client was found in client_state" - shared_info.client_state[client]['install_status'] = "Installing..." - shared_info.client_state[client]['start_install'] = True - else: - print "<br>Found a client.:" + post_params['clients'] - if post_params['clients'] in shared_info.client_state: - print "client was found in the client_state" - shared_info.client_state[post_params['clients']]['install_status'] = "Installing..." - shared_info.client_state[post_params['clients']]['start_install'] = True -?> - - -<form action="/execute.pyhtml" method="POST" enctype="multipart/form-data"> -<b>The following machines have been marked Ready for Install.</b> -Check the machines you want to deploy now, and then hit INSTALL to start them off.<hr> -<table width="100%" cellpadding="0" cellpadding="0" border="1"> - <tr> - <td><u>Hostname</u></td> - <td><u>MAC</u></td> - <td><u>Current IP</u></td> - <td><u>Profile</u></td> - <td><u>Status</u></td> - <td><u>INSTALL</u></td> - </tr> -<? -for mac in shared_info.client_state: - if shared_info.client_state[mac]['install_status'] == "Ready to Install": - for client in shared_info.clients: - if client['mac'] == mac: - client_info = [client['hostname'], client['mac'], client['current_ip'], client['profile'], client['status']] - if client['mac'] in shared_info.client_state: - client_info[2] = shared_info.client_state[client['mac']]['ip'] - client_info[4] = shared_info.client_state[client['mac']]['install_status'] - print "<tr><td>"+str(client_info[0])+"</td><td>"+ str(client_info[1])+"</td><td>"+str(client_info[2]) - print "</td><td>"+str(client_info[3])+"</td><td>"+str(client_info[4])+"</td>" - print '<td><input type="checkbox" name="clients" value="'+str(client_info[1])+'"></td></tr>' -?> -</table> -<input type="submit" name="deploy_install" value="INSTALL THESE MACHINES"> -</form> -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/folder.gif b/src/net/server/html/folder.gif Binary files differdeleted file mode 100644 index e2bbf5f..0000000 --- a/src/net/server/html/folder.gif +++ /dev/null diff --git a/src/net/server/html/images/arrow_l.gif b/src/net/server/html/images/arrow_l.gif Binary files differdeleted file mode 100644 index 6e91fea..0000000 --- a/src/net/server/html/images/arrow_l.gif +++ /dev/null diff --git a/src/net/server/html/images/arrow_r.gif b/src/net/server/html/images/arrow_r.gif Binary files differdeleted file mode 100644 index da5867d..0000000 --- a/src/net/server/html/images/arrow_r.gif +++ /dev/null diff --git a/src/net/server/html/images/header.png b/src/net/server/html/images/header.png Binary files differdeleted file mode 100644 index 22da58c..0000000 --- a/src/net/server/html/images/header.png +++ /dev/null diff --git a/src/net/server/html/images/header_bg.png b/src/net/server/html/images/header_bg.png Binary files differdeleted file mode 100644 index d8b1063..0000000 --- a/src/net/server/html/images/header_bg.png +++ /dev/null diff --git a/src/net/server/html/images/icon-harddisk-noia_48x48.png b/src/net/server/html/images/icon-harddisk-noia_48x48.png Binary files differdeleted file mode 100644 index a6c27af..0000000 --- a/src/net/server/html/images/icon-harddisk-noia_48x48.png +++ /dev/null diff --git a/src/net/server/html/images/partition_bg.png b/src/net/server/html/images/partition_bg.png Binary files differdeleted file mode 100644 index dc63f2b..0000000 --- a/src/net/server/html/images/partition_bg.png +++ /dev/null diff --git a/src/net/server/html/images/partition_drag.png b/src/net/server/html/images/partition_drag.png Binary files differdeleted file mode 100644 index beae23d..0000000 --- a/src/net/server/html/images/partition_drag.png +++ /dev/null diff --git a/src/net/server/html/images/spacer.png b/src/net/server/html/images/spacer.png Binary files differdeleted file mode 100644 index 8728643..0000000 --- a/src/net/server/html/images/spacer.png +++ /dev/null diff --git a/src/net/server/html/images/tab_n_l.png b/src/net/server/html/images/tab_n_l.png Binary files differdeleted file mode 100644 index 91bad72..0000000 --- a/src/net/server/html/images/tab_n_l.png +++ /dev/null diff --git a/src/net/server/html/images/tab_n_m.png b/src/net/server/html/images/tab_n_m.png Binary files differdeleted file mode 100644 index 51a60e7..0000000 --- a/src/net/server/html/images/tab_n_m.png +++ /dev/null diff --git a/src/net/server/html/images/tab_n_r.png b/src/net/server/html/images/tab_n_r.png Binary files differdeleted file mode 100644 index fa4ab52..0000000 --- a/src/net/server/html/images/tab_n_r.png +++ /dev/null diff --git a/src/net/server/html/images/tab_s_l.png b/src/net/server/html/images/tab_s_l.png Binary files differdeleted file mode 100644 index 735c22a..0000000 --- a/src/net/server/html/images/tab_s_l.png +++ /dev/null diff --git a/src/net/server/html/images/tab_s_ml.png b/src/net/server/html/images/tab_s_ml.png Binary files differdeleted file mode 100644 index 5491ad6..0000000 --- a/src/net/server/html/images/tab_s_ml.png +++ /dev/null diff --git a/src/net/server/html/images/tab_s_mr.png b/src/net/server/html/images/tab_s_mr.png Binary files differdeleted file mode 100644 index f0678b3..0000000 --- a/src/net/server/html/images/tab_s_mr.png +++ /dev/null diff --git a/src/net/server/html/images/tab_s_r.png b/src/net/server/html/images/tab_s_r.png Binary files differdeleted file mode 100644 index 1cfc705..0000000 --- a/src/net/server/html/images/tab_s_r.png +++ /dev/null diff --git a/src/net/server/html/index.html b/src/net/server/html/index.html deleted file mode 100644 index 40765bb..0000000 --- a/src/net/server/html/index.html +++ /dev/null @@ -1,6 +0,0 @@ -<html> -<frameset rows="64,*"> -<frame frameborder="0" scrolling="no" src="top.html" name="top" noresize> -<frame frameborder="0" scrolling="auto" src="/welcome.pyhtml" name="content" noresize> -</frameset> -</html> diff --git a/src/net/server/html/l33t_LOG_ice_cream_gentoo.png b/src/net/server/html/l33t_LOG_ice_cream_gentoo.png Binary files differdeleted file mode 100644 index 558e5ac..0000000 --- a/src/net/server/html/l33t_LOG_ice_cream_gentoo.png +++ /dev/null diff --git a/src/net/server/html/loadprofile.pyhtml b/src/net/server/html/loadprofile.pyhtml deleted file mode 100644 index a4bcb15..0000000 --- a/src/net/server/html/loadprofile.pyhtml +++ /dev/null @@ -1,40 +0,0 @@ -<? include /main_top.pyhtml ?> -<? -errormsg = "" -if post_params: - xmlfile = "" - if 'localfile' in post_params and post_params['localfile']: - xmlfile = post_params['localfile'] - elif 'uploadfile' in post_params and post_params['uploadfile']: - try: - tmpfile = open("/tmp/serverprofile.xml", "w") - tmpfile.write(post_params['uploadfile']) - tmpfile.close() - xmlfile = "/tmp/serverprofile.xml" - except: - errormsg = "There was a problem writing the temp file for the file you uploaded" - else: - errormsg = "You did not specify a file to load" - cp = GLIServerProfile.ServerProfile() - try: - cp.parse(xmlfile) - shared_info.clients = cp.get_clients() - shared_info.profiles = cp.get_profiles() - except: - errormsg = "There was an error parsing the XML file" - if not errormsg: - errormsg = "Profile loaded successfully" -?> -<h2>Load Profile</h2> -<: if errormsg: -<br><% errormsg %><br><br> -:> -<br> -<form action="/loadprofile.pyhtml" method="POST" enctype="multipart/form-data"> -Use local (to server) file: <input type="text" name="localfile"><br> -or<br> -Upload file: <input type="file" name="uploadfile"><br> -<input type="submit" value="Load"> -</form> - -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/main_bottom.pyhtml b/src/net/server/html/main_bottom.pyhtml deleted file mode 100644 index 50f2e33..0000000 --- a/src/net/server/html/main_bottom.pyhtml +++ /dev/null @@ -1,6 +0,0 @@ - </td> - </tr> -</table> -</body> -</html> - diff --git a/src/net/server/html/main_top.pyhtml b/src/net/server/html/main_top.pyhtml deleted file mode 100644 index b60bd64..0000000 --- a/src/net/server/html/main_top.pyhtml +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <title>Gentoo Linux Installation Management Daemon</title> -</head> -<body> -<table cellpadding="0" cellspacing="5"> - <tr> - <td valign-"top"> - <!-- Left hand column starts here --> - <img src="/l33t_LOG_ice_cream_gentoo.png"> - <p><a href="/welcome.pyhtml">Welcome</a></p> - <p>Profiles:<br> - <a href="add_profile.pyhtml">Create</a><br> - <a href="edit_profile.pyhtml">Edit</a><br> - <a href="delete_profile.pyhtml">Delete</a></p> - <p>Clients:<br> - <a href="add_client.pyhtml">Add Client</a><br> - <a href="edit_client.pyhtml">Manage</a><br> - <a href="delete_client.pyhtml">Delete</a></p> - <p>Install:<br> - <a href="configure.pyhtml">Configure</a><br> - <a href="execute.pyhtml">Execute</a><br> - <a href="showclients.pyhtml">Status</a></p> - <p>Master Server:<br> - <a href="/loadprofile.pyhtml">Load Profile</a><br> - <a href="/saveprofile.pyhtml">Save Profile</a><br> - <a href="/loadprofiles_from_db.pyhtml">Load Profiles from Gimli</a> - </p> - </td> - <td valign="top"> diff --git a/src/net/server/html/saveprofile.pyhtml b/src/net/server/html/saveprofile.pyhtml deleted file mode 100644 index 67a8980..0000000 --- a/src/net/server/html/saveprofile.pyhtml +++ /dev/null @@ -1,36 +0,0 @@ -<? include /main_top.pyhtml ?> -<? -errormsg = "" -if post_params: - cp = GLIServerProfile.ServerProfile() - cp.set_clients(None, shared_info.clients, None) - cp.set_profiles(None, shared_info.profiles, None) - if not 'download' in post_params and post_params['localfile']: - try: - tmpfile = open(post_params['localfile'], "w") - tmpfile.write(cp.serialize()) - tmpfile.close() - except: - errormsg = "There was a problem writing the file" - elif 'download' in post_params: - headers_out.append(("Content-type", "text/xml")) - headers_out.append(('Content-disposition', "attatchment;filename=serverprofile.xml")) - return cp.serialize() - else: - errormsg = "You didn't specify a filename to save to" - if not errormsg: - errormsg = "Profile saved successfully" - -?> -<h2>Save Profile</h2> -<: if errormsg: -<br><% errormsg %><br><br> -:> -<br> -<form action="/saveprofile.pyhtml" method="POST" enctype="multipart/form-data"> -Save to local (to server) file: <input type="text" name="localfile"> <input type="submit" value="Save"><br> -or<br> -Download the file: <input type="submit" name="download" value="Download"> -</form> - -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/showargs.pyhtml b/src/net/server/html/showargs.pyhtml deleted file mode 100644 index cc957ca..0000000 --- a/src/net/server/html/showargs.pyhtml +++ /dev/null @@ -1,13 +0,0 @@ -<? include /main_top.pyhtml ?> - -These are the GET params you passed:<br><br> -<pre> -<% str(get_params) %> -</pre> -<br><br> -These are the POST params you passed:<br><br> -<pre> -<% str(post_params) %> -</pre> - -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/showclients.pyhtml b/src/net/server/html/showclients.pyhtml deleted file mode 100644 index a062a52..0000000 --- a/src/net/server/html/showclients.pyhtml +++ /dev/null @@ -1,31 +0,0 @@ -<? include /main_top.pyhtml ?> - -<h2>Clients</h2> -<table width="100%" cellpadding="0" cellpadding="0"> - <tr> - <td><u>Name</u></td> - <td><u>MAC</u></td> - <td><u>Current IP</u></td> - <td><u>Post-install IP</u></td> - <td><u>Profile</u></td> - <td><u>Install progress</u></td> - </tr> -<: for client in shared_info.clients: -<? -client_info = [client['hostname'], client['mac'], client['current_ip'], client['post_ip'], client['profile'], 'N/A'] -if client['mac'] in shared_info.client_state: - client_info[2] = shared_info.client_state[client['mac']]['ip'] - client_info[5] = shared_info.client_state[client['mac']]['install_status'] -?> - <tr> - <td><% client_info[0] %></td> - <td><% client_info[1] %></td> - <td><% client_info[2] %></td> - <td><% client_info[3] %></td> - <td><% client_info[4] %></td> - <td><% client_info[5] %></td> - </tr> -:> -</table> - -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/html/top.html b/src/net/server/html/top.html deleted file mode 100644 index 7d7805f..0000000 --- a/src/net/server/html/top.html +++ /dev/null @@ -1,165 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title>GLIMD Mockup</title> - - <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> - <style type="text/css"> - <!-- - /* Standard Tag Styles */ - body { - margin: 0; - padding: 0; - height: 100%; - font-family: sans-serif; - } - html { - height: 100%; - } - table { - margin: 0px; - padding: 0px; - border-spacing: 0px; - } - td { - padding: 0; - } - #header { - width: 100%; - background: repeat-x url("images/header_bg.png"); - } - #content { - width: 100%; - height: 100%; - border: 1px solid #000000; - background: #ffffff; - text-align: center; - } - #tabbar { - width: 100%; - height: 64px; - margin-bottom: -4px; - } - #tabbar td { - font-size: 12px; - cursor: pointer; - cursor: hand; - } - .tabbarn { - background-color: #a1a1f2; - color: #000000; - text-decoration: none; - } - .tabbars { - background-color: #000000; - color: #ffffff; - text-decoration: none; - } - .tabbarnl { - width: 27px; - background-image: url("images/tab_n_l.png"); - } - .tabbarnm { - width: 27px; - background-image: url("images/tab_n_m.png"); - } - .tabbarnr { - width: 27px; - background-image: url("images/tab_n_r.png"); - } - .tabbarsl { - width: 27px; - background-image: url("images/tab_s_l.png"); - } - .tabbarsml { - width: 27px; - background-image: url("images/tab_s_ml.png"); - } - .tabbarsmr { - width: 27px; - background-image: url("images/tab_s_mr.png"); - } - .tabbarsr { - width: 27px; - background-image: url("images/tab_s_r.png"); - } - --> - </style> - <script language="javascript"> - <!-- - function browserType() { - var type; - if (document.layers) { - type = 'nn4'; - } - if (document.all) { - type = 'ie'; - } - if (window.navigator.userAgent.toLowerCase().match("gecko")) { - type = 'gecko'; - } - return type; - } - function findLayer(name) { - var layer; - var browser_type = browserType(); - if (browser_type == 'gecko') { - layer = eval('document.getElementById(\'' + name + '\')'); - } else if (browser_type == 'ie') { - layer = eval('document.all[\'' + name + '\']'); - } else { - layer = eval('document.layers[\'' + name + '\']'); - } - return layer; - } - function changetab(id, count) { - var s; - for (i = 0; i < count; i++) { - s = (i == id) ? 's' : 'n'; - if (i == 0) { - findLayer('tabbarl').className = 'tabbar' + s + 'l'; - } else if (i != (id + 1)) { - findLayer('tabbar' + (i - 1) + 'r').className = (s == 's') ? 'tabbar' + s + 'ml' : 'tabbar' + s + 'm'; - } - findLayer('tabbar' + i).className = 'tabbar' + s; - findLayer('tabbar' + i + 'a').className = 'tabbar' + s; - if (i == (count - 1)) { - findLayer('tabbar' + i + 'r').className = 'tabbar' + s + 'r'; - } else { - findLayer('tabbar' + i + 'r').className = (s == 's') ? 'tabbar' + s + 'mr' : 'tabbar' + s + 'm'; - } - } - } - //--> - </script></head> - - - <body onload="changetab(0,5);"> - <table style="width: 100%; height: 100%;"> - <tbody><tr> - <td id="header"> - <table id="tabbar"> - <tbody><tr> - <td colspan="11" style="height: 37px; font-size: 1px; cursor: default;"> </td> - <td rowspan="2" style="text-align: right; cursor: default;"> - <img src="images/header.png" alt="Gentoo Linux Installer" style="width: 400px; height: 64px;"> - </td> - </tr> - <tr> - <td class="tabbarsl" id="tabbarl"><img src="images/spacer.png" alt=""></td> - <td class="tabbars" id="tabbar0" onclick="changetab(0,5); top.frames['content'].location.href = '/welcome.pyhtml';"><a id="tabbar0a" class="tabbars" href="/welcome.pyhtml" target="content" onclick="return false;">Welcome</a></td> - <td class="tabbarsmr" id="tabbar0r" onclick="changetab(0,5); top.frames['content'].location.href = '/welcome.pyhtml';"><img src="images/spacer.png" alt=""></td> - <td class="tabbarn" id="tabbar1" onclick="changetab(1,5);"><a id="tabbar1a" class="tabbarn" href="/edit_profile.pyhtml" onclick="return false;">Profiles</td> - <td class="tabbarnm" id="tabbar1r" onclick="changetab(1,5);"><img src="images/spacer.png" alt=""></td> - <td class="tabbarn" id="tabbar2" onclick="changetab(2,5); top.frames['content'].location.href = '/showclients.pyhtml';"><a id="tabbar2a" class="tabbarn" href="/showclients.pyhtml" target="content" onclick="return false;">Clients</td> - <td class="tabbarnm" id="tabbar2r" onclick="changetab(2,5); top.frames['content'].location.href = '/showclients.pyhtml';"><img src="images/spacer.png" alt=""></td> - <td class="tabbarn" id="tabbar3" onclick="changetab(3,5);"><a id="tabbar3a" class="tabbarn" href="#" onclick="return false;">Install</td> - <td class="tabbarnm" id="tabbar3r" onclick="changetab(3,5);"><img src="images/spacer.png" alt=""></td> - <td class="tabbarn" id="tabbar4" onclick="changetab(4,5);"><a id="tabbar4a" class="tabbarn" href="#" onclick="return false;">Master Server</td> - <td class="tabbarnr" id="tabbar4r" onclick="changetab(4,5);"><img src="images/spacer.png" alt=""></td> - </tr> - </tbody></table> - </td> - </tr> - </tbody> - </table> -</body> -</html> diff --git a/src/net/server/html/webgli/bootloader.pyhtml b/src/net/server/html/webgli/bootloader.pyhtml deleted file mode 100644 index 4a2021c..0000000 --- a/src/net/server/html/webgli/bootloader.pyhtml +++ /dev/null @@ -1,116 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - if post_params['setbootloader']: - if post_params['bootloader']: - try: - shared_info.install_profile.set_boot_loader_pkg(None,post_params['bootloader'],None) - except: - error_msg = "ERROR: Could not set the bootloader pkg!" - if post_params['bootmbr']: - try: - shared_info.install_profile.set_boot_loader_mbr(None,post_params['bootmbr'],None) - if post_params['boot_drive_choice']: - try: - shared_info.install_profile.set_boot_device(None,post_params['boot_drive_choice'],None) - except: - error_msg = "ERROR! Could not set the boot device!"+post_params['boot_drive_choice'] - except: - error_msg = "ERROR: Could not set the bootloader MBR flag to TRUE and set boot drive too!" - else: - try: - shared_info.install_profile.set_boot_loader_mbr(None,False,None) - except: - error_msg = "ERROR: Could not set the bootloader MBR flag to FALSE." - if post_params['bootargs']: - try: - shared_info.install_profile.set_bootloader_kernel_args(None,post_params['bootargs'],None) - except: - error_msg = "ERROR: Could not set the bootloader kernel arguments!" - if not error_msg: - error_msg = "Values saved successfully" - -arch = shared_info.client_profile.get_architecture_template() -parts = shared_info.install_profile.get_partition_tables() -advanced = shared_info.advanced_mode -#Bootloader code yanked from the x86ArchTemplate -if shared_info.install_profile.get_boot_device(): - boot_device = shared_info.install_profile.get_boot_device() -else: - boot_device = "" - foundboot = False - for device in parts: - tmp_partitions = parts[device] #.get_install_profile_structure() - for partition in tmp_partitions: - mountpoint = tmp_partitions[partition]['mountpoint'] - if (mountpoint == "/boot"): - foundboot = True - if (( (mountpoint == "/") and (not foundboot) ) or (mountpoint == "/boot")): - boot_device = device - -bootloader = shared_info.install_profile.get_boot_loader_pkg() -arch_loaders = { 'x86': [ - ("grub",(u"GRand Unified Bootloader, newer, RECOMMENDED")), - ("lilo",(u"LInux LOader, older, traditional.(detects windows partitions)"))], - 'amd64': [ - ("grub",(u"GRand Unified Bootloader, newer, RECOMMENDED"))]} #FIXME ADD OTHER ARCHS -?> -<p>Bootloader Settings:</p> -<: if error_msg: -<br><% error_msg %><br><br> -:> -<form name="Bloader" method="post" action="/webgli/bootloader.pyhtml" enctype="multipart/form-data"> -<p>To boot successfully into your new Linux system, a bootloader will be needed. If you already have a bootloader you want to use you can select None here. The bootloader choices available are dependent on what GLI supports and what architecture your system is. Choose a bootloader:</p> -<table width="100%" border="1"> -<? -boot_loaders = arch_loaders[arch] -boot_loaders.append(("none", (u"Do not install a bootloader. (System may be unbootable!)"))) -for i,bloader in enumerate(boot_loaders): - print '<tr><td><input name="bootloader" type="radio" value="'+boot_loaders[i][0]+'" ' - if bootloader == boot_loaders[i][0]: - print "checked" - print '>'+boot_loaders[i][0]+'</td><td>'+boot_loaders[i][1]+"</td></tr>\n" -?> -</table> -<: if advanced: - <hr> - Most bootloaders have the ability to install to either the Master Boot Record (MBR) or some other partition. Most people will want their bootloader installed on the MBR for successful boots, but if you have special circumstances, you can have the bootloader installed to the /boot partition instead. Do you want the boot loader installed in the MBR? (YES is RECOMMENDED) - <p> -<? -bootmbr = shared_info.install_profile.get_boot_loader_mbr() -print '<input name="bootmbr" type="checkbox" id="bootmbr" value="True"' -if bootmbr: - print " checked" -print ">Install to MBR</p>" -?> -:> -<? -if not boot_device: - print _(u"You need to partition before you can select the boot device.") -if boot_device and boot_device[-1] != 'a': - #show the menu. - print _(u"Your boot device may not be correct. It is currently set to %s, but this device may not be the first to boot. Usually boot devices end in 'a' such as hda or sda.") % boot_device - print _(u" Please confirm your boot device.<br>") - #grab choies from the partiton list. - boot_drive_choices = [] - for device in parts: - print '<input type="radio" name="boot_drive_choice" value="'+device+'">'+device+"<br>\n" -?> -<br> -<: if advanced: - <p>If you have any additional optional arguments you want to pass to the kernel at boot, type them here: - <input name="bootargs" type="text" id="bootargs" -<? -bootargs = shared_info.install_profile.get_bootloader_kernel_args() -if bootargs: - print ' value="'+bootargs+'"' -print '>' -?> - </p> -:> -<p> -<input name="setbootloader" type="submit" id="setbootloader" value="Save Bootloader Settings"> -</p> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/bottom.pyhtml b/src/net/server/html/webgli/bottom.pyhtml deleted file mode 100644 index 99c2255..0000000 --- a/src/net/server/html/webgli/bottom.pyhtml +++ /dev/null @@ -1,6 +0,0 @@ - </td> - </tr> -</table> - -</body> -</html> diff --git a/src/net/server/html/webgli/clientconfig.pyhtml b/src/net/server/html/webgli/clientconfig.pyhtml deleted file mode 100644 index ac8ec84..0000000 --- a/src/net/server/html/webgli/clientconfig.pyhtml +++ /dev/null @@ -1,221 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - if 'ArchType' in post_params: -# data += "Found an architecture: you submitted " + post_params['ArchType']+ "<BR>\n" - try: - shared_info.client_profile.set_architecture_template(None, post_params['ArchType'], None) - except: - error_msg = "ERROR: Could not set the Architecture Template<br>\n" - if 'Logfile' in post_params: -# data += "Found a logfile: you submitted " + post_params['Logfile'] + "<BR>\n" - try: - shared_info.client_profile.set_log_file(None, post_params['Logfile'], None) - except: - error_msg = "ERROR: Could not set the Logfile <BR>\n" - if 'RootMountPoint' in post_params: -# data += "Found a root mount point: you submitted " + post_params['RootMountPoint'] + "<BR>\n" - try: - shared_info.client_profile.set_root_mount_point(None, post_params['RootMountPoint'], None) - except: - error_msg = "ERROR: Could not set the Root Mount Point<BR>\n" - if 'Network_Iface' in post_params: -# data += "Found a network interface: you submitted " + post_params['Network_Iface'] + "<BR>\n" - try: - shared_info.client_profile.set_network_interface(None, post_params['Network_Iface'], None) - except: - error_msg = "ERROR: Could not set the Network Interface<BR>\n" - if 'Network_Type' in post_params: -# data += "Found a Network Type: you submitted " + post_params['Network_Type'] + "<BR>\n" - try: - shared_info.client_profile.set_network_type(None, post_params['Network_Type'], None) - except: - error_msg = "ERROR: Could not set the Network Type<BR>\n" - if 'dhcp_options' in post_params: -# data += "Found DHCP Options. You submitted " + post_params['dhcp_options'] + "<BR>\n" - try: - shared_info.client_profile.set_network_dhcp_options(None, post_params['dhcp_options'], None) - except: - error_msg = "ERROR: Could not set the dhcp options<br>\n" - if 'ip' in post_params: -# data += "Found an IP: you submitted " + post_params['ip'] + "<BR>\n" - try: - shared_info.client_profile.set_network_ip(None, post_params['ip'], None) - except: - error_msg = "ERROR: Could not set the IP<BR>\n" - if 'broadcast' in post_params: -# data += "Found an broadcast IP: you submitted " + post_params['broadcast'] + "<BR>\n" - try: - shared_info.client_profile.set_network_broadcast(None, post_params['broadcast'], None) - except: - error_msg = "ERROR: Could not set the broadcast IP<BR>\n" - if 'netmask' in post_params: -# data += "Found an netmask IP: you submitted " + post_params['netmask'] + "<BR>\n" - try: - shared_info.client_profile.set_network_netmask(None, post_params['netmask'], None) - except: - error_msg = "ERROR: Could not set the netmask IP<BR>\n" - if 'gateway' in post_params: -# data += "Found an gateway IP: you submitted " + post_params['gateway'] + "<BR>\n" - try: - shared_info.client_profile.set_network_gateway(None, post_params['gateway'], None) - except: - error_msg = "ERROR: Could not set the gateway IP<BR>\n" - if 'http_proxy' in post_params: -# data += "Found an HTTP Proxy IP: you submitted " + post_params['http_proxy'] + "<BR>\n" - try: - shared_info.client_profile.set_http_proxy(None, post_params['http_proxy'], None) - except: - error_msg = "ERROR: Could not set the HTTP Proxy IP<BR>\n" - if 'ftp_proxy' in post_params: -# data += "Found an FTP Proxy IP: you submitted " + post_params['ftp_proxy'] + "<BR>\n" - try: - shared_info.client_profile.set_ftp_proxy(None, post_params['ftp_proxy'], None) - except: - error_msg = "ERROR: Could not set the FTP Proxy IP<BR>\n" - if 'rsync_proxy' in post_params: -# data += "Found an RSYNC Proxy IP: you submitted " + post_params['rsync_proxy'] + "<BR>\n" - try: - shared_info.client_profile.set_rsync_proxy(None, post_params['rsync_proxy'], None) - except: - error_msg = "ERROR: Could not set the RSYNC Proxy IP<BR>\n" - if 'dnsserver' in post_params: -# data += "Found an DNS server: you submitted " + post_params['dnsserver'] + "<BR>\n" - try: - shared_info.client_profile.set_dns_servers(None, post_params['dnsserver'], None) - except: - error_msg = "ERROR: Could not set the DNS Server<BR>\n" - if 'EnableSSH' in post_params: -# data += "Found an Enable SSH Flag: you set it to " + post_params['EnableSSH'] + "<BR>\n" - try: - shared_info.client_profile.set_enable_ssh(None, post_params['EnableSSH'], None) - except: - error_msg = "ERROR: Could not set the SSH flag<BR>\n" - if 'Verbose' in post_params: -# data += "Found an Verbose Mode Flag: you set it to " + post_params['Verbose'] + "<BR>\n" - try: - shared_info.client_profile.set_verbose(None, post_params['Verbose'], None) - except: - error_msg = "ERROR: Could not set the Verbose mode flag<BR>\n" - if ('RootPass1' in post_params) and ('RootPass2' in post_params): -# data += "Found a root password1: you submitted " + post_params['RootPass1'] + "<BR>\n" -# data += "Found a root password2: you submitted " + post_params['RootPass2'] + "<BR>\n" - if post_params['RootPass1'] == post_params['RootPass2']: - try: - shared_info.client_profile.set_root_passwd(None, GLIUtility.hash_password(post_params['RootPass1']), None) - except: - error_msg = "ERROR: Could not set the root password<BR>\n" - else: - error_msg = "ERROR: Passwords DO NOT MATCH!<BR>\n" - if 'Modules' in post_params: -# data += "Found an Additional Module: you submitted " + post_params['Modules'] + "<BR>\n" - try: - shared_info.client_profile.set_kernel_modules(None, post_params['Modules'], None) - except: - error_msg = "ERROR: Could not set the Kernel Modules<BR>\n" - if 'SaveCCFile' in post_params: -# data += "Found a filename to save the Client Profile:" + post_params['SaveCCFile'] + "<BR>\n" - try: - configuration = open(post_params['SaveCCFile'] ,"w") - configuration.write(shared_info.client_profile.serialize()) - configuration.close() - print "Profile saved successfully. Here it is <BR><pre>" + cgi.escape(shared_info.client_profile.serialize()) + "</pre><br>\n" - except: - error_msg = "ERROR: Could not save the profile!<BR>\n" - if not error_msg: - error_msg = "Values saved successfully" -?> -<h2>Client Config</h2> -<: if error_msg: -<br><% error_msg %><br><br> -:> -<form name="CConfig" action="/webgli/clientconfig.pyhtml" method="POST" enctype="multipart/form-data"> -<: if shared_info.advanced_mode: -<table border="2"> - <tr> - <td> -<? -#Choose the architecture for the Install. -import platform -subarches = { 'i386': 'x86', 'i486': 'x86', 'i586': 'x86', 'i686': 'x86', 'x86_64': 'amd64', 'parisc': 'hppa' } -arch = platform.machine() -if arch in subarches: - arch = subarches[arch] -?> -Arch selection string here.<br> -<? tmparches = [("x86", "x86 (Pentium and Athlon Series)"), ("amd64", "AMD Athlon 64 and Opteron"), ("ppc", "PPC (New World) Macs"), ("sparc", "Sparc"), ("alpha", "Alpha"), ("hppa", "HPPA")] ?> -<: for tmparch in tmparches: - <input type="radio" name="ArchType" <? if arch == tmparch[0]: print 'checked ' ?> value="<% tmparch[0] %>"><% tmparch[1] %><br> -:> - </td> - <td width="15"></td> - <td>Logfile selection string here. <br><input name="Logfile" type="text" length="80" maxlength="80" value="/var/log/installer.log"> - <hr>Root mountpoint selection string here. <br><input name="RootMountPoint" type="text" length="80" maxlength="80" value="/mnt/gentoo"> - <hr>Debug Mode: <input name="Verbose" type="radio" value="True">Yes <input name="Verbose" type="radio" value="False" checked>No</td> - </tr> -</table> -:> -<: if 1: #not GLIUtility.ping("www.gentoo.org"): # and local_install: -<hr> -<table> - <tr> - <td>LiveCD Network Configuration string here. <br> -<? device_list = GLIUtility.get_eth_devices() ?> - <select name="Network_Iface" size="4"> -<: for device in device_list: - <option value="<% device %>"><% device %>: <% GLIUtility.get_interface_realname(device) %></option> -:> - </select> - - <select name="Network_Type" size="3"><option value="dhcp">DHCP</option><option value="static">Manual Config</option><option value="None">None (Networkless)</option></select> - </td> - <td>Networking Info for Manual Configurations:<br> - Enter your IP address: <input name="ip" type="text" length="50" maxlength="15" value="192.168."><br> - Enter your Broadcast address: <input name="broadcast" type="text" length="50" maxlength="15" value=".255"><br> - Enter your Netmask: <input name="netmask" type="text" length="50" maxlength="15" value="255.255.255.0"><br> - Enter your default gateway: <input name="gateway" type="text" length="50" maxlength="15" value=".1"><br> - <hr>Info for DHCP Configurations:<br>DHCP Options: <input type="text" name="dhcp_options" length="50"> - <hr>Enter a DNS server: <input name="dnsserver" type="text" length="50" maxlength="15" value="128.118.25.3"></td> - </tr> -</table> -<: if shared_info.advanced_mode: -Proxy Information (if necessary):<br> -HTTP Proxy URI: <input name="http_proxy" type="text" length="70" value=""><br> -FTP Proxy URI: <input name="ftp_proxy" type="text" length="70" value=""><br> -RSYNC Proxy URI: <input name="rsync_proxy" type="text" length="70" value=""> -:> -:> -<hr>Enable SSH string here. <br> -Enable SSH?: <input name="EnableSSH" type="radio" value="True">Yes -<input name="EnableSSH" type="radio" value="False" checked="checked">No -<hr>Root password selection string here. <br> -Enter Password:<input name="RootPass1" type="password" length="80" maxlength="80" value=""><br> -Re-enter Password to verify:<input name="RootPass2" type="password" length="80" maxlength="80" value=""><br> - -<: if shared_info.advanced_mode: -<? -#Modules to load now. -status, output = GLIUtility.spawn(r"lsmod | grep -v ^Module | cut -d ' ' -f 1 ", return_output=True) -?> -<hr>List of loaded modules:. <br><% "<br>".join(output.split("\n")) %> -<br>Additional Modules to Load (space-separated list): <input name="Modules" type="text" length="80" maxlength="80" value=""><br> -:> -<!-- #Save Client Configuration File. THIS SHOULD BE A POPUP --> -<hr><br>Save Client Configuration File string here. <br> -Filename: <input name="SaveCCFile" type="text" value="clientconfig.xml"> -<input name="SaveCC" type="submit" value="Save Client Configuration"><!-- #Javascript for on_click --> - -<!-- #Print buttons for Next/Previous/Help/Save --> -<hr> -<table> - <tr> - <td><input name="LoadCC" type="button" value="Load"></td> - <td><input name="SaveCC" type="button" value="Save"></td> - <td><input name="Help" type="button" value="Help"></td> - <td><input name="Previous" type="button" value="Previous"></td> - <td><input name="Next" type="button" value="Next"></td> - </tr> -</table> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/common.pyhtml b/src/net/server/html/webgli/common.pyhtml deleted file mode 100644 index 0849f96..0000000 --- a/src/net/server/html/webgli/common.pyhtml +++ /dev/null @@ -1,13 +0,0 @@ -<? -import GLIInstallProfile -import GLIClientConfiguration -import GLIUtility -import GLIStorageDevice -import copy -from gettext import gettext as _ - -if not shared_info.install_profile: - shared_info.install_profile = GLIInstallProfile.InstallProfile() -if not shared_info.client_profile: - shared_info.client_profile = GLIClientConfiguration.ClientConfiguration() -?> diff --git a/src/net/server/html/webgli/configfiles.pyhtml b/src/net/server/html/webgli/configfiles.pyhtml deleted file mode 100644 index d0c2b1c..0000000 --- a/src/net/server/html/webgli/configfiles.pyhtml +++ /dev/null @@ -1,140 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - keymap = "" - windowkeys = "" - ext_keymap = "" - font = "" - clock = "" - editor = "" - disp_manager = "" - xsession = "" - if post_params['clock']: - clock = post_params['clock'] - if post_params['editor']: - editor = post_params['editor'] - if post_params['disp_manager']: - disp_manager = post_params['disp_manager'] - if post_params['keymap']: - keymap = post_params['keymap'] - if post_params['windowkeys']: - windowkeys = post_params['windowkeys'] - if post_params['ext_keymap']: - ext_keymap = post_params['ext_keymap'] - if post_params['font']: - font = post_params['font'] - if post_params['xsession']: - xsession = post_params['xsession'] - etc_files = shared_info.install_profile.get_etc_files() - if not "conf.d/keymaps" in etc_files: - if keymap or windowkeys or ext_keymap: - etc_files['conf.d/keymaps'] = {} - if not "conf.d/consolefont" in etc_files: - if font: - etc_files['conf.d/consolefont'] = {} - if not "conf.d/clock" in etc_files: - if clock: - etc_files['conf.d/clock'] = {} - if not "rc.conf" in etc_files: - if editor or disp_manager or xsession: - etc_files['rc.conf'] = {} - if keymap: - etc_files['conf.d/keymaps']['KEYMAP'] = keymap - if windowkeys: - etc_files['conf.d/keymaps']['SET_WINDOWKEYS'] = windowkeys - if ext_keymap: - etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS'] = ext_keymap - if font: - etc_files['conf.d/consolefont']['CONSOLEFONT'] = font - if clock: - etc_files['conf.d/clock']['CLOCK'] = clock - if editor: - etc_files['rc.conf']['EDITOR'] = editor - if disp_manager: - etc_files['rc.conf']['DISPLAYMANAGER'] = disp_manager - if xsession: - etc_files['rc.conf']['XSESSION'] = xsession - shared_info.install_profile.set_etc_files(etc_files) - if not error_msg: - error_msg = "Values saved successfully" - -etc_files = shared_info.install_profile.get_etc_files() -?> -<: if error_msg: -<br><% error_msg %><br><br> -:> -<form action="/webgli/configfiles.pyhtml" method="POST" enctype="multipart/form-data"> -<table cellspacing="0" cellpadding="0" width="790" height="600" border="1"> - <tr height="33%"> - <td> - <table width="100%" height="100%" border="1"> - <tr> - <td width="50%"> - <table width="100%" height="100%" border="1"> - <tr> - <td><b>Clock:</b><br>Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local.<br><input type="radio" name="clock" value="UTC" <? if ("conf.d/clock" in etc_files) and ("CLOCK" in etc_files['conf.d/clock']) and (etc_files['conf.d/clock']['CLOCK'] == "UTC"): print "checked" ?>>UTC<br> - <input type="radio" name="clock" value="local" <? if ("conf.d/clock" in etc_files) and (etc_files['conf.d/clock']['CLOCK'] == "local"): print "checked" ?>>Local - </td> - </tr> - <tr> - <td><b>Default Editor:</b><br>Choose your default editor:<br> - <input type="radio" name="editor" value="/bin/nano" <? if ("rc.conf" in etc_files) and ("EDITOR" in etc_files['rc.conf']) and (etc_files['rc.conf']['EDITOR'] == "/bin/nano"): print "checked" ?>>/bin/nano (Default editor)<br> - <input type="radio" name="editor" value="/usr/bin/vim" <? if ("rc.conf" in etc_files) and ("EDITOR" in etc_files['rc.conf']) and (etc_files['rc.conf']['EDITOR'] == "/usr/bin/vim"): print "checked" ?>>/usr/bin/vim (vi improved editor)<br> - <input type="radio" name="editor" value="/usr/bin/emacs" <? if ("rc.conf" in etc_files) and ("EDITOR" in etc_files['rc.conf']) and (etc_files['rc.conf']['EDITOR'] == "/usr/bin/emacs"): print "checked" ?>>/usr/bin/emacs (The emacs editor) - </td> - </tr> - </table> - </td> - <td width="50%"><b>Display Manager:</b><br>Choose your display manager for Xorg-x11 (note you must make sure that package also gets installed for it to work):<br> - <input type="radio" name="disp_manager" value="xdm" <? if ("rc.conf" in etc_files) and ("DISPLAYMANAGER" in etc_files['rc.conf']) and (etc_files['rc.conf']['DISPLAYMANAGER'] == "xdm"): print "checked" ?>>xdm (X Display Manager (NOT recommended))<br> - <input type="radio" name="disp_manager" value="gdm" <? if ("rc.conf" in etc_files) and ("DISPLAYMANAGER" in etc_files['rc.conf']) and (etc_files['rc.conf']['DISPLAYMANAGER'] == "gdm"): print "checked" ?>>gdm (Gnome Display Manager)<br> - <input type="radio" name="disp_manager" value="kdm" <? if ("rc.conf" in etc_files) and ("DISPLAYMANAGER" in etc_files['rc.conf']) and (etc_files['rc.conf']['DISPLAYMANAGER'] == "kdm"): print "checked" ?>>kdm (KDE Display Manager) - </td> - </tr> - </table> - </td> - </tr> - <tr height="66%"> - <td> - <table width="100%" height="100%" border="1"> - <tr> - <td width="50%"><b>Keymap</b><br>Choose your desired keymap:<br> - <select name="keymap"> - <option value=""> </option> -<? keymap_list = GLIUtility.generate_keymap_list() ?> -<: for keymap in keymap_list: - <option value="<% keymap %>" <? if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['KEYMAP'] == keymap): print "selected" ?>><% keymap %></option> -:> - </select><br> - <br><b>Windowkeys</b><br>Should we first load the 'windowkeys' console keymap? - <input type="radio" name="windowkeys" value="yes" <? if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['SET_WINDOWKEYS'] == "yes"): print "checked" ?>> Yes <input type="radio" name="windowkeys" value="no" <? if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['SET_WINDOWKEYS'] == "no"): print "checked" ?>> No <br> - <br><b>Extended Keymaps</b><br>This sets the maps to load for extended keyboards. Most users will leave this as is.<br> - <input type="text" name="ext_keymap" value="<? if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS']): print etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS'] ?>"><br> - </td> - <td width="50%"> - <table width="100%" height="100%" border="1"> - <tr> - <td><b>Console Font</b><br>Choose your desired console font:<br> - <select name="font"> - <option value=""> </option> -<? font_list = GLIUtility.generate_consolefont_list() ?> -<: for font in font_list: - <option value="<% font %>" <? if ("conf.d/consolefont" in etc_files) and (etc_files['conf.d/consolefont']['CONSOLEFONT'] == font): print 'selected' ?>><% font %></option> -:> - </select> - </td> - </tr> - <tr> - <td><b>Xsession</b><br>Choose what window manager you want to start default with X if run with xdm, startx, or xinit. (common options are Gnome or Xsession: <input type="text" name="xsession" value="<? if ("rc.conf" in etc_files) and ('XSESSION' in etc_files['rc.conf']): print etc_files['rc.conf']['XSESSION'] ?>"></td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> -</table> -<input type="submit" name="SaveConfigFiles" value="Save Values"> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/daemons.pyhtml b/src/net/server/html/webgli/daemons.pyhtml deleted file mode 100644 index 0d423bc..0000000 --- a/src/net/server/html/webgli/daemons.pyhtml +++ /dev/null @@ -1,58 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - if post_params['savedaemons']: - if post_params['logger']: - try: - shared_info.install_profile.set_logging_daemon_pkg(None, post_params['logger'], None) - except: - error_msg = "ERROR: Could not set logger!<br>\n" - if post_params['cron']: - try: - shared_info.install_profile.set_cron_daemon_pkg(None, post_params['cron'], None) - except: - error_msg = "ERROR: Could not set cron daemon!<br>\n" - if not error_msg: - error_msg = "Values saved successfully" - -cron = shared_info.install_profile.get_cron_daemon_pkg() -logger = shared_info.install_profile.get_logging_daemon_pkg() -cron_daemons = ( ('vixie-cron', "Paul Vixie's cron daemon, fully featured, RECOMMENDED."), - ('dcron', "A cute little cron from Matt Dillon."), - ('fcron', "A scheduler with extended capabilities over cron & anacron."), - ('none', "Don't use a cron daemon. (NOT Recommended!).") ) -log_daemons = ( ('syslog-ng', "An advanced system logger. (default)"), - ('metalog', "A Highly-configurable system logger."), - ('syslogkd', "The traditional set of system logging daemons.") ) -?> -<h2>Cron and Logging Daemons:</h2> -<: if error_msg: -<br><% error_msg %><br><br> -:> -<form name="daemons" method="post" action="/webgli/daemons.pyhtml" enctype="multipart/form-data"> -<p>Choose which cron daemon to use for your system. While it is possible to not choose a cron daemon and still have a working system, this is NOT recommended and is considered a VERY BAD THING.<br> -Choose your cron daemon:</p> -<table width="100%" border="1"> -<: for cron_daemon in cron_daemons: - <tr> - <td><input name="cron" type="radio" value="<% cron_daemon[0] %>" <? if cron == cron_daemon[0]: print "checked" ?>><% cron_daemon[0] %></td> - <td><% cron_daemon[1] %></td> - </tr> -:> -</table> -<br> -<hr> -<p>Choose which logging daemon to use for your system. A logger is required by the Gentoo Manual.<br> -Choose your logging daemon:</p> -<table width="100%" border="1"> -<: for log_daemon in log_daemons: - <tr> - <td><input name="logger" type="radio" value="<% log_daemon[0] %>" <? if logger == log_daemon[0]: print "checked" ?>> <% log_daemon[0] %></td> - <td><% log_daemon[1] %></td> - </tr> -:> -</table> -<input type="submit" name="savedaemons" value="Save Daemons"> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/etc_portage.pyhtml b/src/net/server/html/webgli/etc_portage.pyhtml deleted file mode 100644 index 83d901f..0000000 --- a/src/net/server/html/webgli/etc_portage.pyhtml +++ /dev/null @@ -1,56 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -etc_files = shared_info.install_profile.get_etc_files() -error_msg = "" -if post_params: - if post_params['save']: - if not post_params['currentfile']: - error_msg = "ERROR you must select a file to edit!<br>\n" - file = post_params['currentfile'] - etc_files[file] = [] - etc_files[file].append(post_params['filecontents']) - shared_info.install_profile.set_etc_files(etc_files) - if not error_msg: - error_msg = "Values saved successfully" -#get portage file list here -menulist = [("portage/package.mask",_(u"A list of DEPEND atoms to mask.")), - ("portage/package.unmask",_(u"A list of packages to unmask.")), - ("portage/package.keywords",_(u"Per-package KEYWORDS (like ACCEPT_KEYWORDS).")), - ("portage/package.use",_(u"Per-package USE flags."))] -?> -<p>etc/portage/* Settings:</p> -<: if error_msg: -<br><% error_msg %><br><br> -:> -<form name="etcportage" method="post" action="/webgli/etc_portage.pyhtml" enctype="multipart/form-data"> -<p>Pick a file to edit:</p> -<table width="100%" border="1"> - <tr> - <th scope="col">Edit</th> - <th scope="col">Filename</th> - <th scope="col">Description</th> - </tr> -<: for file,i in enumerate(menulist): - <tr> - <td><input name="editfile" type="radio" value="<% menulist[file][0] %>"></td> - <td><% menulist[file][0] %></td> - <td><% menulist[file][1] %></td> - </tr> -:> -</table><br> -<input name="fileeditsubmit" type="submit" value="EDIT"> -<: if post_params['editfile']: -<? -file_to_edit = post_params['editfile'] -if file_to_edit in etc_files: - previous_contents = "\n".join(etc_files[file_to_edit]) -else: - previous_contents = "" -?> -<hr> Currently editing file: <% file_to_edit %><br> -<input type="hidden" name="currentfile" value="<% file_to_edit %>"> -<textarea name="filecontents" rows=6 cols=80><% previous_contents %></textarea><br> -<input type="submit" name="save" value="Save Changes"> -:> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/extrapackages.pyhtml b/src/net/server/html/webgli/extrapackages.pyhtml deleted file mode 100644 index 8146ed5..0000000 --- a/src/net/server/html/webgli/extrapackages.pyhtml +++ /dev/null @@ -1,95 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - if post_params['packages']: - try: - if isinstance(post_params['packages'], list): - packages = " ".join(post_params['packages']) - if packages: - shared_info.install_profile.set_install_packages(None, packages, None) - except: - error_msg = _(u"ERROR! Could not set the install packages!") - if post_params['manualpackages']: - try: - packages = post_params['manualpackages'] - if packages: - shared_info.install_profile.set_install_packages(None, packages, None) - except: - error_msg = _(u"ERROR! Could not set the manual install packages!") - if not error_msg: - error_msg = "Values saved successfully" - -if shared_info.install_profile.get_install_packages(): - install_packages = shared_info.install_profile.get_install_packages() - if isinstance(install_packages, str): - install_packages = install_packages.split() -else: - install_packages = [] -grp_list = GLIUtility.get_grp_pkgs_from_cd() -package_list = shared_info.install_profile.get_install_package_list() -highlevel_menu = [] -for group in package_list: - highlevel_menu.append( (group, package_list[group][0]) ) -?> -<form name="packages" action="/webgli/extrapackages.pyhtml" method="POST" enctype="multipart/form-data"> -<: for param in get_params: -<: if "show" in param: #this means it's a param referring to a group to show. include it as a hidden so it'll get shown next time too. -<input type="hidden" name="<% param %>" value="<% get_params[param] %>"> -:> -:> -<: for param in post_params: -<: if "show" in param: #this means it's a param referring to a group to show. include it as a hidden so it'll get shown next time too. -<? if type(post_params[param]) == list: post_params[param] = post_params[param][-1] ?> -<input type="hidden" name="<% param %>" value="<% post_params[param] %>"> -:> -:> -<h2>Extra Packages</h2> -<: if error_msg: -<br><% error_msg %><br><br> -:> -Your current package list is: <% ",".join(install_packages) %> -<table width="100%" border="1"> -<? -for group_pair in highlevel_menu: - group = group_pair[0] - pkgs = package_list[group][1] - #FIXME ADD x of y SELECTED TO HEADER - if post_params['show_'+group] == "Expand": - print '<tr><th scope="col"><input type="submit" name="show_'+group+'" value="Collapse"></th><td><input type="checkbox" name="all_'+group+'" value="checkbox" ' - #CALCULATE IF ALL PACKAGES IN GROUP ARE IN INSTALL PACKAGES - allpkgsfound = True - for pkg in pkgs: - if not pkg in install_packages: - allpkgsfound = False - if allpkgsfound: - print "checked" - print '>All</td><th scope="col">'+group+": "+group_pair[1]+"</th></tr>\n" - else: #show plus sign for group and no table. - print '<tr><th scope="col"><input type="submit" name="show_'+group+'" value="Expand"></th><td><input type="checkbox" name="all_'+group+'" value="checkbox" ' - #CALCULATE IF ALL PACKAGES IN GROUP ARE IN INSTALL PACKAGES - allpkgsfound = True - for pkg in pkgs: - if not pkg in install_packages: - allpkgsfound = False - if allpkgsfound: - print "checked" - print '>All</td><th scope="col">'+group+": "+group_pair[1]+"</th></tr>\n" - #now show the packages in the group - if post_params['show_'+group] == "Expand" or get_params['show_'+group] == "Expand": - for pkg in pkgs: - print '<tr><td></td>' - print '<td> <input type="checkbox" name="packages" value="'+pkg+'" ' - if pkg in install_packages: - print "checked" - print '>'+pkg+'</td><td>'+pkgs[pkg]+"</td></tr>\n" - else: - for pkg in pkgs: - if pkg in install_packages: - print '<tr><td></td><td> <input type="checkbox" name="packages" value="'+pkg+'" checked>'+pkg+'</td><td>'+pkgs[pkg]+"</td></tr>\n" -# This was indented one level further...probably wrong AG -print "\n</table>" -print '<br>Manually specify a list of packages (overwrites checked list):<input type="text" name="manualpackages"><br>' -print '<input type="submit" name="SavePackages" value="Save Packages"></form>' -?> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/get_exception.pyhtml b/src/net/server/html/webgli/get_exception.pyhtml deleted file mode 100644 index c69aac4..0000000 --- a/src/net/server/html/webgli/get_exception.pyhtml +++ /dev/null @@ -1,8 +0,0 @@ - def get_exception(self): - etype, value, tb = sys.exc_info() - s = traceback.format_exception(etype, value, tb) - content = "<pre>" - for line in s: - content += line - content += "</pre>" - return content diff --git a/src/net/server/html/webgli/globaluse.pyhtml b/src/net/server/html/webgli/globaluse.pyhtml deleted file mode 100644 index 141aa29..0000000 --- a/src/net/server/html/webgli/globaluse.pyhtml +++ /dev/null @@ -1,75 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -if post_params: - temp_use = "-* " - if post_params['flags']: - if isinstance(post_params['flags'], list): - use_flags = post_params['flags']; - for flag in use_flags: - temp_use += flag + " " - else: - temp_use += post_params['flags'] + " " - shared_info.temp_use = temp_use - #get the make.conf - etc_files = shared_info.install_profile.get_etc_files() - if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] - else: - make_conf = {} - make_conf["USE"] = shared_info.temp_use + temp_use - etc_files['make.conf'] = make_conf - shared_info.install_profile.set_etc_files(etc_files) - -etc_files = shared_info.install_profile.get_etc_files() -if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] -else: - make_conf = {} -?> -<h2>Configuration Files Settings</h2><p>Make.conf Settings:</p> -<: if shared_info.install_profile.get_dynamic_stage3(): -<b>You have selected a dynamic stage3 installation. This setting forbids you from changing your USE flags until after the installation to prevent breaking the stage3 creation process.</b> -<: else: -The installer will now gather information regarding the contents of /etc/make.conf -One of the unique (and best) features of Gentoo is the ability to -define flags (called USE flags) that define what components are -compiled into applications. For example, you can enable the alsa -flag and programs that have alsa capability will use it. -The result is a finely tuned OS with no unnecessary components to -slow you down. -The installer divides USE flag selection into two screens, one for -global USE flags and one for local flags specific to each program. -Please be patient while the screens load. It may take awhile. -<form action="/webgli/globaluse.pyhtml" method="POST" enctype="multipart/form-data"> -<? -#First set the USE flags, this is a biggie. -if make_conf.has_key("USE"): - system_use_flags = make_conf["USE"] -else: #not a preloaded config. this is the NORMAL case. - system_use_flags = GLIUtility.spawn("portageq envvar USE", return_output=True)[1].strip().split() -use_flags = [] -use_desc = GLIUtility.get_global_use_flags() -#populate the choices list -sorted_use = use_desc.keys() -sorted_use.sort() -#present the GLOBAL checkbox list -?> -<h3>Global USE Flags:</h3><table width="100%" border="1"> - <tr> - <th scope="col">Active</th> - <th scope="col">Flag</th> - <th scope="col">Description</th> - </tr> -<: for flagname in sorted_use: - <tr> - <td><input name="flags" type="checkbox" id="flags" value="<% flagname %>" <? if flagname in system_use_flags: print "checked" ?>></td> - <td><% flagname %></td> - <td><% use_desc[flagname] %></td> - </tr> -:> -</table> -<br> -<input name="saveglobaluse" type="submit" id="saveglobaluse" value="Save Global USE Settings"> -</form> -:> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/handle.pyhtml b/src/net/server/html/webgli/handle.pyhtml deleted file mode 100644 index 79bfd6e..0000000 --- a/src/net/server/html/webgli/handle.pyhtml +++ /dev/null @@ -1,64 +0,0 @@ - def handle(self, path): - if not shared_info.install_profile: - shared_info.install_profile = GLIInstallProfile.InstallProfile() - if not shared_info.client_profile: - shared_info.client_profile = GLIClientConfiguration.ClientConfiguration() - paths = { '/webgli': showwelcome, - '/webgli/': showwelcome, - '/webgli/ClientConfig': clientconfig, - '/webgli/saveclientconfig': saveclientconfig, - '/webgli/NetworkMounts': networkmounts, - '/webgli/savenetmounts': savenetmounts, - '/webgli/StageSelection': stageselection, - '/webgli/savestage': savestage, - '/webgli/PortageTree': portagetree, - '/webgli/Partitioning': partitioning, - '/webgli/Partitioning2': partitioning2, - '/webgli/Partitioning3': partitioning3, - '/webgli/Partitioning4': partitioning4, - '/webgli/saveportage': saveportage, - '/webgli/GlobalUSE': globaluse, - '/webgli/saveglobaluse': saveglobaluse, - '/webgli/LocalUSE': localuse, - '/webgli/savelocaluse': savelocaluse, - '/webgli/MakeDotConf': makedotconf, - '/webgli/savemakedotconf': savemakedotconf, - '/webgli/ConfigFiles': configfiles, - '/webgli/saveconfigfiles': saveconfigfiles, - '/webgli/EtcPortage': etc_portage, - '/webgli/Kernel': kernel, - '/webgli/savekernel': savekernel, - '/webgli/Bootloader': bootloader, - '/webgli/savebootloader': savebootloader, - '/webgli/Timezone': timezone, - '/webgli/savetimezone': savetimezone, - '/webgli/Networking': networking, - '/webgli/savenetworking': savenetworking, - '/webgli/Daemons': daemons, - '/webgli/savedaemons': savedaemons, - '/webgli/ExtraPackages': extrapackages, - '/webgli/savepackages': savepackages, - '/webgli/Services': services, - '/webgli/saveservices': saveservices, - '/webgli/Users': users, - '/webgli/saveusers': saveusers, - '/webgli/Review': review, - '/webgli/savereview': savereview, - '/webgli/URIBrowser': uribrowser, - - '/webgli/loadprofile': loadprofile, - '/webgli/loadprofile2': loadprofile2, - '/webgli/saveprofile': saveprofile, - '/webgli/saveprofile2': saveprofile2 - } - return_content = paths[path]() - return headers_out, return_content - - def get_exception(self): - etype, value, tb = sys.exc_info() - s = traceback.format_exception(etype, value, tb) - content = "<pre>" - for line in s: - content += line - content += "</pre>" - return content diff --git a/src/net/server/html/webgli/index.pyhtml b/src/net/server/html/webgli/index.pyhtml deleted file mode 100644 index 0301b6b..0000000 --- a/src/net/server/html/webgli/index.pyhtml +++ /dev/null @@ -1,18 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -if post_params['amode']: - try: - if post_params['amode'] == "True": - shared_info.advanced_mode = True - else: - shared_info.advanced_mode = False - print "Values set successfully" - except: - print "ERROR Could not set advanced mode to "+post_params['amode'] -?> -Welcoming string here.<BR>LOCAL INSTALL ASSUMED FOR THIS FRONT END<br> -<form name="Advanced" method="post" action="/webgli/index.pyhtml" enctype="multipart/form-data"> -<input type="radio" name="amode" value="True" <? if shared_info.advanced_mode: print "checked" ?> >Advanced Mode<br> -<input type="radio" name="amode" value="False" <? if not shared_info.advanced_mode: print "checked" ?> >Standard/Newbie Mode -<input type="submit" name="Submit" value="Set Advanced Mode"> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/kernel.pyhtml b/src/net/server/html/webgli/kernel.pyhtml deleted file mode 100644 index adc243b..0000000 --- a/src/net/server/html/webgli/kernel.pyhtml +++ /dev/null @@ -1,92 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - if post_params['setkernel']: - if post_params['manualsouces']: - try: - shared_info.install_profile.set_kernel_source_pkg(None,post_params['manualsouces'],None) - except: - data += "ERROR: Could not set the kernel sources!" + post_params['manualsouces'] - elif post_params['sources']: - try: - shared_info.install_profile.set_kernel_source_pkg(None,post_params['sources'],None) - except: - data += "ERROR: Could not set the kernel sources!" + post_params['sources'] - if post_params['build_method']: - try: - shared_info.install_profile.set_kernel_build_method(None,post_params['build_method'],None) - except: - data += "ERROR: Could not set the kernel build method!" - if post_params['configuri']: - try: - shared_info.install_profile.set_kernel_config_uri(None,post_params['configuri'],None) - except: - data += "ERROR: Could not set the kernel config URI!" - if post_params['bootsplash']: - try: - shared_info.install_profile.set_kernel_bootsplash(None,post_params['bootsplash'],None) - except: - data += "ERROR: Could not set the kernel bootsplash!" + post_params['bootsplash'] - if not error_msg: - error_msg = "Values saved successfully" - -sources = shared_info.install_profile.get_kernel_source_pkg() -build_method = shared_info.install_profile.get_kernel_build_method() -bootsplash = shared_info.install_profile.get_kernel_bootsplash() -configuri= shared_info.install_profile.get_kernel_config_uri() -?> -<p>Kernel Settings:</p> -<: if error_msg: -<br><% error_msg %><br><br> -:> -<form name="kernel" method="post" action="/webgli/kernel.pyhtml" enctype="multipart/form-data"> -<p>Choose which kernel sources to use for your system. If using a previously-made kernel configuration, make sure the sources match the kernel used to create the configuration.</p> -<table width="100%" border="1"> - <tr> - <td><input name="sources" type="radio" value="livecd-kernel" <? if sources == "livecd-kernel": print "checked" ?>>Livecd Kernel </td> - <td>Use the running kernel (fastest)</td> - </tr> - <tr> - <td><input name="sources" type="radio" value="vanilla-sources" <? if sources == "vanilla-sources": print "checked" ?>>Vanilla (normal) </td> - <td>Normal. The Unaltered Linux Kernel ver 2.6+ (safest) (recommended) </td> - </tr> - <tr> - <td><input name="sources" type="radio" value="gentoo-sources" <? if sources == "gentoo-sources": print "checked" ?>>Gentoo</td> - <td>Gentoo's optimized 2.6+ kernel. (less safe) </td> - </tr> -<: if shared_info.advanced_mode: - <tr> - <td><input name="sources" type="radio" value="hardened-sources" <? if sources == "hardened-sources": print "checked" ?>>Hardened</td> - <td>Hardened sources for the 2.6 kernel tree</td> - </tr> - <tr> - <td><input name="sources" type="radio" value="grsec-sources" <? if sources == "grsec-sources": print "checked" ?>>grsec</td> - <td>Vanilla sources with grsecurity patches </td> - </tr> - <tr> - <td><input name="sources" type="radio" value="Other" <? if sources not in ["livecd-kernel", "vanilla-sources", "gentoo-sources", "hardened-sources", "grsec-sources"]: print "checked" ?>>Other</td> - <td>Specify your own here: <input name="manualsouces" type="text" id="manualsouces" value="<? if sources not in ["livecd-kernel", "vanilla-sources", "gentoo-sources", "hardened-sources", "grsec-sources"]: print sources ?>"></td> - </tr> -:> -</table> -<hr> -<: if shared_info.advanced_mode: -<table width="507" border="1"> - <tr> - <td colspan="2" scope="col"><p>There are currently two ways the installer can compile a kernel for your new system. You can either provide a previously-made kernel configuration file and use the traditional kernel-compiling procedure (no initrd) or have genkernel automatically create your kernel for you (with initrd).</p> - <p>If you do not have a previously-made kernel configuration, YOU MUST CHOOSE Genkernel. Choose which method you want to use:</p></td> - </tr> - <tr> - <td width="143" scope="col"><input name="build_method" type="radio" value="genkernel" <? if build_method == "genkernel": print "checked" ?>>Genkernel</td> - <td width="348" scope="col"><input name="build_method" type="radio" value="custom" <? if build_method == "custom": print "checked" ?>>Traditional (requires a config!)</td> - </tr> -</table> -<p><input name="bootsplash" type="checkbox" id="bootsplash" value="True" <? if bootsplash: print "checked" ?>>Display the bootsplash screen on startup </p><p>If you have a custom kernel configuration, enter its location (otherwise just leave blank): -<input name="configuri" type="text" id="configuri" value="<% configuri %>"> -<input name="browseuri" type="button" id="browseuri" value="Browse" onClick="window.open('/webgli/URIBrowser?screen=kernel&baseuri=' + document.kernel.configuri.value, 'uribrowser', 'width=500,height=500,toolbars=no,statusbar=no,menubar=no,scrollbars=yes')"> -</p> -:> -<p><input name="setkernel" type="submit" id="setkernel" value="Save Kernel Settings"></p> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/loadprofile.pyhtml b/src/net/server/html/webgli/loadprofile.pyhtml deleted file mode 100644 index 842a59f..0000000 --- a/src/net/server/html/webgli/loadprofile.pyhtml +++ /dev/null @@ -1,68 +0,0 @@ -<? include /webgli/top.pyhtml ?> - -<? -errormsg = "" -if post_params: - xmlfile = "" - if post_params['clientfile']: - xmlfile = post_params['clientfile'] - elif post_params['uploadclientfile']: - try: - tmpfile = open("/tmp/clientprofile.xml", "w") - tmpfile.write(post_params['uploadclientfile']) - tmpfile.close() - xmlfile = "/tmp/clientprofile.xml" - except: - errormsg = "There was a problem writing the temp file for the file you uploaded" + get_exception() -# return wrap_in_webgli_template(content) - if post_params['clientfile'] or post_params['uploadclientfile']: - try: - shared_info.client_profile = GLIClientConfiguration.ClientConfiguration() - shared_info.client_profile.parse(xmlfile) -# content += "Profile loaded successfully" - except: - errormsg = "There was an error parsing the XML file" + get_exception() - - #INSTALL PROFILE LOADING - if post_params['installfile']: - xmlfile = post_params['installfile'] - elif post_params['uploadipfile']: - try: - tmpfile = open("/tmp/installprofile.xml", "w") - tmpfile.write(post_params['uploadipfile']) - tmpfile.close() - xmlfile = "/tmp/installprofile.xml" - except: - errormsg = "There was a problem writing the temp file for the file you uploaded" + get_exception() -# return wrap_in_webgli_template(content) - if post_params['installfile'] or post_params['uploadipfile']: - try: - shared_info.install_profile = GLIInstallProfile.InstallProfile() - shared_info.install_profile.parse(xmlfile) -# content += "Profile loaded successfully" - except: - errormsg = "There was an error parsing the XML file" + get_exception() - if not errormsg: - errormsg = "Loaded successfully" -?> -<h2>Load Client Profile</h2> -<: if errormsg: -<br><% errormsg %><br><br> -:> -<br> -<form action="/webgli/loadprofile.pyhtml" method="POST" enctype="multipart/form-data"> -Use local (to server) file: <input type="text" name="clientfile"><br> -or<br> -Upload file: <input type="file" name="uploadclientfile"><br> -<input type="submit" value="Load"> -</form><hr> -<h2>Load Install Profile</h2> -<br> -<form action="/webgli/loadprofile.pyhtml" method="POST" enctype="multipart/form-data"> -Use local (to server) file: <input type="text" name="installfile"><br> -or<br> -Upload file: <input type="file" name="uploadipfile"><br> -<input type="submit" value="Load"> -</form> - -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/localuse.pyhtml b/src/net/server/html/webgli/localuse.pyhtml deleted file mode 100644 index 5f6407b..0000000 --- a/src/net/server/html/webgli/localuse.pyhtml +++ /dev/null @@ -1,76 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -if post_params: - temp_use = " " - if post_params['flags']: - if isinstance(post_params['flags'], list): - use_local_flags = post_params['flags'] - for flag in use_local_flags: - temp_use += flag + " " - else: - tempuse += post_params['flags'] + " " - #get the make.conf - etc_files = shared_info.install_profile.get_etc_files() - if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] - else: - make_conf = {} - make_conf["USE"] = shared_info.temp_use + temp_use - etc_files['make.conf'] = make_conf - shared_info.install_profile.set_etc_files(etc_files) - -etc_files = shared_info.install_profile.get_etc_files() -if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] -else: - make_conf = {} -?> -<h2>Configuration Files Settings</h2><p>Make.conf Settings:</p> -<: if shared_info.install_profile.get_dynamic_stage3(): -<b>You have selected a dynamic stage3 installation. This setting forbids you from changing your USE flags until after the installation to prevent breaking the stage3 creation process.</b> -<: else: -The installer will now gather information regarding the contents of /etc/make.conf -One of the unique (and best) features of Gentoo is the ability to -define flags (called USE flags) that define what components are -compiled into applications. For example, you can enable the alsa -flag and programs that have alsa capability will use it. -The result is a finely tuned OS with no unnecessary components to -slow you down. -The installer divides USE flag selection into two screens, one for -global USE flags and one for local flags specific to each program. -Please be patient while the screens load. It may take awhile. -<form action="/webgli/localuse.pyhtml" method="POST" enctype="multipart/form-data"> -<? -#First set the USE flags, this is a biggie. - -if make_conf.has_key("USE"): - system_use_flags = make_conf["USE"] -else: #not a preloaded config. this is the NORMAL case. - system_use_flags = GLIUtility.spawn("portageq envvar USE", return_output=True)[1].strip().split() -use_local_flags = [] -use_local_desc = GLIUtility.get_local_use_flags() -#re-populate the chocies list -sorted_use = use_local_desc.keys() -sorted_use.sort() -#present the LOCALcheckbox list -?> -<h3>Local USE Flags:</h3> -<table width="100%" border="1"> - <tr> - <th scope="col">Active</th> - <th scope="col">Flag</th> - <th scope="col">Description</th> - </tr> -<: for flagname in sorted_use: - <tr> - <td><input name="flags" type="checkbox" id="flags" value="<% flagname %>" <? if flagname in system_use_flags: print "checked" ?>></td> - <td><% flagname %></td> - <td><% use_local_desc[flagname] %></td> - </tr> -:> -</table> -<br> -<input name="savelocaluse" type="submit" id="savelocaluse" value="Save Local USE Settings"> -</form> -:> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/makedotconf.pyhtml b/src/net/server/html/webgli/makedotconf.pyhtml deleted file mode 100644 index 4ee10ed..0000000 --- a/src/net/server/html/webgli/makedotconf.pyhtml +++ /dev/null @@ -1,156 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - cflags = "" - features = "" - etc_files = shared_info.install_profile.get_etc_files() - if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] - if "CFLAGS" in make_conf: - cflags = make_conf['CFLAGS'] - if "FEATURES" in make_conf: - features = make_conf['FEATURES'] - else: - make_conf = {} - if post_params['proc'] and post_params['m_thing']: - cflags += " "+post_params['m_thing']+"="+post_params['proc'] - if post_params['optim1']: - cflags += " "+post_params['optim1'] - if post_params['optim2']: - if isinstance(post_params['optim2'], list): - for param in post_params['optim2']: - cflags += " "+param - else: - cflags += " "+post_params['optim2'] - if post_params['optim3']: - cflags += " "+post_params['optim3'] - make_conf['CFLAGS'] = cflags - if post_params['chost']: - make_conf['CHOST'] = post_params['chost'] - if post_params['unstable']: - make_conf['ACCEPT_KEYWORDS'] = "~" + shared_info.client_profile.get_architecture_template() - if post_params['features']: - if isinstance(post_params['features'], list): - features = " ".join(post_params['features']) - else: - features = post_params['features'] - if post_params['manfeatures']: - features += " "+post_params['manfeatures'] - if "distcc" in features: - #Add distcc to the services list. - if shared_info.install_profile.get_services(): - services = shared_info.install_profile.get_services() - if isinstance(services, str): - services = services.split(',') - else: - services = [] - if not "distccd" in services: - services.append("distccd") - try: - services = ",".join(services) - if services: - shared_info.install_profile.set_services(None, services, None) - except: - error_msg = _(u"ERROR! Could not set the services list.") - #Set the distcc flag to emerge earlier than other packages. - try: - shared_info.install_profile.set_install_distcc(None, True, None) - except: - error_msg = _(u"ERROR! Could not set the install distcc flag!") - if post_params['distcc']: - try: - make_conf['DISTCC_HOSTS'] = post_params['distcc'] - except: - error_msg = "ERROR! Could not set the distcc hosts!" - make_conf['FEATURES'] = features - if post_params['makeopts']: - make_conf['MAKEOPTS'] = post_params['makeopts'] - try: - if make_conf: - etc_files['make.conf'] = make_conf - shared_info.install_profile.set_etc_files(etc_files) - except: - error_msg = _(u"ERROR! Could not set the make_conf correctly!") - if not error_msg: - error_msg = "Values saved successfully" - -arch_procs = { 'x86': ("i386", "i486", "i586", "pentium", "pentium-mmx", "i686", "pentiumpro", "pentium2", "pentium3", "pentium3m", "pentium-m", "pentium4", "pentium4m", "prescott", "nocona", "k6", "k6-2", "k6-3", "athlon", "athlon-tbird", "athlon-4", "athlon-xp", "athlon-mp", "k8", "opteron", "athlon64", "athlon-fx", "winchip-c6", "winchip2", "c3", "c3-2") } -etc_files = shared_info.install_profile.get_etc_files() -if etc_files.has_key("make.conf"): - make_conf = etc_files['make.conf'] -else: - make_conf = {} -procs = arch_procs[shared_info.client_profile.get_architecture_template()] -?> -<b>Make.conf Settings:</b><br> -<: if error_msg: -<br><% error_msg %><br><br> -:> -<: if shared_info.install_profile.get_dynamic_stage3(): -<b>You have selected a dynamic stage3 installation. This setting forbids you from changing some make.conf settings until after the installation to prevent breaking the stage3 creation process.</b> -:> -<b>NOTE: Your old values are NOT loaded here. Do not save these settings without making sure all values are what you want. To keep your old values just skip this step.</b> -<form action="/webgli/makedotconf.pyhtml" method="POST" enctype="multipart/form-data"> -<h3>CFLAGS Settings: </h3> -(only show these if not dynamic): -<table width="100%" border="1"> - <tr> - <td scope="col"><div align="left">Processor:<select name="proc" id="proc"> -<: for proc in procs: - <option value="<% proc %>"><% proc %></option> -:> - </select><br><input type="radio" name"m_thing" value="-march">-march <input type="radio" name"m_thing" value="-mcpu">-mcpu <input type="radio" name"m_thing" value="-mtune">-mtune </div></td> - <td scope="col">Optimizations: <select name="optim1" id="optim1"> -<: for i in range(1, 9): - <option value="-O<% str(i) %>">-O<% str(i) %><? if i == 2: print " (Recommended)" ?></option> -:> - </select></td> - </tr> - <tr> - <td>Common CFLAGS:<br><input name="optim2" type="checkbox" id="optim2" value="-pipe">-pipe<br><input name="optim2" type="checkbox" id="optim2" value="-fomit-frame-pointer">-fomit-frame-pointer</td> - <td>Additional CFLAGS: <input name="optim3" type="text" id="optim3" size="60"></td> - </tr> -</table> -<hr> -<h3>CHOST Setting:</h3> -<select name="chost" size="4" id="chost" <? if shared_info.install_profile.get_dynamic_stage3(): print "disabled" ?>> -<? -arch_chost_options = { "x86": ('i386-pc-linux-gnu', 'i486-pc-linux-gnu', 'i586-pc-linux-gnu', 'i686-pc-linux-gnu'), - "amd64": ('x86_64-pc-linux-gnu',), - "alpha": ('alpha-unknown-linux-gnu',), - "ppc": ('powerpc-unknown-linux-gnu',), - "ppc64": ('powerpc64-unknown-linux-gnu',), - "sparc": ('sparc-unknown-linux-gnu',), - "sparc64": ('sparc-unknown-linux-gnu',), - "hppa": ('hppa1.1-unknown-linux-gnu', 'hppa2.0-unknown-linux-gnu'), - "mips": ('mips-unknown-linux-gnu',) } -?> -<: for arch_chost_option in arch_chost_options[shared_info.client_profile.get_architecture_template()]: -<option value="<% arch_chost_option %>"><% arch_chost_option %></option> -:> -</select> -<hr> -<table width="100%" border="1"> - <tr> - <td scope="col"><input name="unstable" type="checkbox" id="unstable" value="unstable" <? if shared_info.install_profile.get_dynamic_stage3(): print "disabled" ?>> Use unstable (~arch) </td> - <td scope="col"><input name="features" type="checkbox" id="binary" value="buildpkg"> Build binary packages (buildpkg)</td> - <td scope="col"><input name="features" type="checkbox" id="ccache" value="ccache"> ccache</td> - <td scope="col"><input name="features" type="checkbox" id="sandbox" value="sandbox"> sandbox</td> - </tr> - <tr> - <td scope="col"><input name="features" type="checkbox" id="distlocks" value="distlocks"> distlocks</td> - <td scope="col"><input name="features" type="checkbox" id="prelink" value="prelink"> prelink</td> - <td scope="col">More Features: <input name="manfeatures" type="text" id="manfeatures" size="10"></td> - <td scope="col">MAKEOPTS: <input name="makeopts" type="text" id="makeopts" value="-j2" size="10" maxlength="5"></td> - </tr> - <tr> - <td scope="col"><input name="features" type="checkbox" id="distcc" value="distcc"> Distcc</td> - <td>Distcc Config Line:<input name="distcc" type="text" size="80"></td> - </tr> -</table> -<p> -<input name="savemakeconf" type="submit" id="savemakeconf" value="Save Make.Conf Settings"> -</p> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/networking.pyhtml b/src/net/server/html/webgli/networking.pyhtml deleted file mode 100644 index e11752b..0000000 --- a/src/net/server/html/webgli/networking.pyhtml +++ /dev/null @@ -1,217 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -interfaces = shared_info.install_profile.get_network_interfaces() -if not interfaces: - interfaces = {} -if post_params: - if post_params['savenetwork']: - try: - shared_info.install_profile.set_network_interfaces(interfaces) - except: - error_msg += "ERROR: Could not set the network interfaces!<br>\n" - elif post_params['AddIfaceSubmit']: - #network interface - if post_params['ifacemanual']: - newnic = post_params['ifacemanual'] - elif post_params['ifacelist']: - newnic = post_params['ifacelist'] - else: - error_msg += "ERROR: No Network device selected<br>\n" - #network type - if post_params['Network_Type'] == "dhcp": - if post_params['dhcp_options']: - interfaces[newnic] = ('dhcp', post_params['dhcp_options'], None) - else: - interfaces[newnic] = ('dhcp', "",None) - try: - shared_info.install_profile.set_network_interfaces(interfaces) - except: - error_msg += "ERROR: Could not set interface DHCP<br>\n" - elif post_params['Network_Type'] == "static": - if 'ip' in post_params: - newip = post_params['ip'] - if 'broadcast' in post_params: - newbroadcast = post_params['broadcast'] - if 'netmask' in post_params: - newnetmask = post_params['netmask'] - if 'gateway' in post_params: - newgateway = post_params['gateway'] - try: - interfaces[newnic] = (newip, newbroadcast, newnetmask) - shared_info.install_profile.set_network_interfaces(interfaces) - except: - error_msg += "ERROR: Could not add the new interface." - elif post_params['DelIfaceSubmit']: - if post_params['EditIface']: - try: - iface = post_params['EditIface'] - del interfaces[iface] - shared_info.install_profile.set_network_interfaces(interfaces) - except: - error_msg += "ERROR: Could not delete the interface.<BR>\n" - else: - error_msg += "ERROR: No device selected to delete!<br>\n" - if 'dnsserver' in post_params: - try: - shared_info.install_profile.set_dns_servers(None, post_params['dnsserver'], None) - except: - error_msg += "ERROR: Could not set the DNS Server<BR>\n" - if 'http_proxy' in post_params: - try: - shared_info.install_profile.set_http_proxy(None, post_params['http_proxy'], None) - except: - error_msg += "ERROR: Could not set the HTTP Proxy IP<BR>\n" - if 'ftp_proxy' in post_params: - try: - shared_info.install_profile.set_ftp_proxy(None, post_params['ftp_proxy'], None) - except: - error_msg += "ERROR: Could not set the FTP Proxy IP<BR>\n" - if 'rsync_proxy' in post_params: - try: - shared_info.install_profile.set_rsync_proxy(None, post_params['rsync_proxy'], None) - except: - error_msg += "ERROR: Could not set the RSYNC Proxy IP<BR>\n" - if not error_msg: - error_msg = "Values saved successfully" - -#interfaces = shared_info.install_profile.get_network_interfaces() -CC_iface = shared_info.client_profile.get_network_interface() -if CC_iface and (CC_iface not in interfaces): - #The CC has a network config that's not already there. Preload it. - CC_net_type = shared_info.client_profile.get_network_type() - if CC_net_type == 'dhcp': - try: - interfaces[CC_iface] = ('dhcp', shared_info.client_profile.get_network_dhcp_options(), None) - except: - pass - else: - try: - interfaces[CC_iface] = (shared_info.client_profile.get_network_ip(), shared_info.client_profile.get_network_broadcast(), shared_info.client_profile.get_network_netmask()) - except: - pass -?> -<script> -function change_editiface() { - for(i=0;i<document.Networking.elements.length;i++) { - if(document.Networking.elements[i].name == "EditIface" && document.Networking.elements[i].checked) { - location.replace('/webgli/Networking?editiface='+ document.Networking.elements[i].value); - } - } -} -</script> -<: if error_msg: -<br><% error_msg %><br><br> -:> -<p>Devices:</p> -<form name="Networking" method="post" action="/webgli/networking.pyhtml" enctype="multipart/form-data"> -<table width="100%" border="1"> - <tr> - <th scope="col">Device</th> - <th scope="col">IP Address </th> - <th scope="col">Broadcast</th> - <th scope="col">Netmask</th> - <th scope="col">Gateway</th> - <th scope="col">DHCP Options </th> - </tr> -<: for iface in interfaces: - <tr> - <td><input type="radio" name="EditIface" value="<% iface %>"><% iface %></td> -<: if interfaces[iface][0] == 'dhcp': - <td>DHCP</td> - <td>x</td> - <td>x</td> - <td>x</td> - <td><% interfaces[iface][1] %></td> -<: else: - <td><% interfaces[iface][0] %></td> - <td><% interfaces[iface][1] %></td> - <td><% interfaces[iface][2] %></td> - <td></td> - <td>x</td> -:> - </tr> -:> -</table> -<input name="EditIfaceSubmit" type="button" id="EditIfaceSubmit" value="EDIT" onclick="change_editiface()"> -<input name="DelIfaceSubmit" type="submit" id="DelIfaceSubmit" value="DELETE"> -<: if get_params['editiface']: -<? iface = get_params['editiface'] ?> -<input type="hidden" name="ifacemanual" value="<% iface %>"> -<h3>Edit Interface <% iface %></h3> -<table> - <tr> - <td><select name="Network_Type" size="3"><option value="dhcp" <? if interfaces[iface][0] == "dhcp": print "selected" ?>>DHCP</option><option value="static" <? if interfaces[iface][0] != "dhcp": print "selected" ?>>Manual Config</option></select></td> - <td>Networking Info for Manual Configurations:<br> - Enter your IP address: <input name="ip" type="text" length="50" maxlength="15" value="<? if interfaces[iface][0] != "dhcp": print interfaces[iface][0] ?>"><br> - Enter your Broadcast address: <input name="broadcast" type="text" length="50" maxlength="15" value="<? if interfaces[iface][0] != "dhcp": print interfaces[iface][1] ?>"><br> - Enter your Netmask: <input name="netmask" type="text" length="50" maxlength="15" value="<? if interfaces[iface][0] != "dhcp": print interfaces[iface][2] ?>"><br> - </td> - </tr> -</table> -<input type="submit" value="Edit Network Device" name="AddIfaceSubmit"> -<: else: -<h3>Add a new Interface:</h3> -<p> -<select name="ifacelist" id="ifacelist"> -<: for device in GLIUtility.get_eth_devices(): -<: if device not in interfaces: -<option value="<% device %>"><% device %>: <% GLIUtility.get_interface_realname(device) %></option> -:> -:> -</select> or type your own: <input name="ifacemanual" type="text" id="ifacemanual" size="10"></p> -<hr> -<table> - <tr> - <td><select name="Network_Type" size="3"><option value="dhcp">DHCP</option><option value="static">Manual Config</option></select></td> - <td>Networking Info for Manual Configurations:<br> - Enter your IP address: <input name="ip" type="text" length="50" maxlength="15" value="192.168."><br> - Enter your Broadcast address: <input name="broadcast" type="text" length="50" maxlength="15" value=".255"><br> - Enter your Netmask: <input name="netmask" type="text" length="50" maxlength="15" value="255.255.255.0"><br> -<: if shared_info.advanced_mode: -<hr>Info for DHCP Configurations:<br>DHCP Options: <input type="text" name="dhcp_options" length="50"> -:> - </td> - </tr> -</table> -<input type="submit" value="Add Network Device" name="AddIfaceSubmit"> -<hr> -:> -Enter your default gateway: -<table> -<? -default_gateway = shared_info.install_profile.get_default_gateway() -if default_gateway: - gway_ip = default_gateway[1] - gway_iface = default_gateway[0] -else: - gway_iface = None - gway_ip = "" -?> -<: if not interfaces: -You must configure a device first in order to set the default Gateway!<br> -:> -<: for iface in interfaces: - <tr> - <td><input type="radio" name="GatewayIface" value="<% iface %>" <? if iface == gway_iface: print "checked" ?>><% iface %></td> - </tr> -:> - <tr> - <td>Gateway IP Address (if not DHCP):<input name="gateway" type="text" length="50" maxlength="15" value="<% gway_ip %>"><br> - Enter your DNS servers (space-separated): <input name="dnsserver" type="text" length="70" value="<% " ".join(shared_info.install_profile.get_dns_servers()) %>"> -<: if shared_info.advanced_mode: - <hr>Proxy Information (if necessary):<br> - HTTP Proxy URI: <input name="http_proxy" type="text" length="70" value=""><br> - FTP Proxy URI: <input name="ftp_proxy" type="text" length="70" value=""><br> - RSYNC Proxy URI: <input name="rsync_proxy" type="text" length="70" value=""> - <p>Wireless stuff here. ESSID: Key: </p> - <p>Hostname: <input name="hostname" type="text" id="hostname"> </p> - <p>Domainname: <input name="domainname" type="text" id="domainname"> </p> - <p>NIS Domainname: <input name="nisdomainname" type="text" id="nisdomainname"> </p> -:> - <p> <input name="savenetwork" type="submit" id="savenetwork" value="Save Network Information"></p> - </td> - </tr> -</table> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/networkmounts.pyhtml b/src/net/server/html/webgli/networkmounts.pyhtml deleted file mode 100644 index 1d413a8..0000000 --- a/src/net/server/html/webgli/networkmounts.pyhtml +++ /dev/null @@ -1,71 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -network_mounts = copy.deepcopy(shared_info.install_profile.get_network_mounts()) -error_msg = "" -if post_params: - if 'addnfs' in post_params: - if not 'hostname' in post_params or not post_params['hostname']: - error_msg = "ERROR: Hostname not found." - elif not 'export' in post_params or not post_params['export']: - error_msg = "ERROR: Export not found." - elif not 'mountpoint' in post_params or not post_params['mountpoint']: - error_msg = "ERROR: Mountpoint not found." - else: - network_mounts.append({'export': post_params['export'], 'host': post_params['hostname'], 'mountopts': post_params['mountopts'], 'mountpoint': post_params['mountpoint'], 'type': 'nfs'}) - try: - shared_info.install_profile.set_network_mounts(network_mounts) - except: - error_msg = "ERROR: Could not add network mount." - elif 'Search' in post_params: - pass -?> -Network Mounts page.<br> -<: if error_msg: -<br><% error_msg %><br><br> -:> -If you have any network shares you would like to mount during the install and for your new system, define them here. Select a network mount to edit or add a new mount. Currently GLI only supports NFS mounts. -<form name="netmount" action="/webgli/networkmounts.pyhtml" method="POST" enctype="multipart/form-data"> -<p>If you have any network shares you would like to mount during the install and for your new system, define them here. Select a network mount to edit or add a new mount. Currently GLI only supports NFS mounts.</p> -<table width="511" border="1"> - <tr> - <td width="31">Edit</td> - <td width="31">Type</td> - <td width="79">Hostname/IP</td> - <td width="79">Export</td> - <td width="70">Mountpoint</td> - <td width="103">Mount Options </td> - </tr> -<: for i,netmount in enumerate(network_mounts): - <tr> - <td><input name="edit_nfs" type="radio" id="edit_nfs" value="<% str(i) %>">Edit</td> - <td><% network_mounts[i]['type'] %></td> - <td><% network_mounts[i]['host'] %></td> - <td><% network_mounts[i]['export'] %></td> - <td><% network_mounts[i]['mountpoint'] %></td> - <td><% network_mounts[i]['mountopts'] %></td> - </tr> -:> -</table> -<hr> -<p> </p> -<table width="100%" border="1"> - <tr> - <td><p>Enter the IP/hostname: <input name="hostname" type="text" id="hostname"> <input type="Submit" name="Search" value="Search"></p> - <p>Enter the export name: <input name="export" type="text" id="export"></p> - <p>OR</p> - <p>Choose the export from the list of found exports: <select name="exports" size="1" id="exports"></select></p> - </td> - <td><p>Enter the mountpoint: <input name="mountpoint" type="text" id="mountpoint"></p> - <p>Enter any special mount options: <input name="mountopts" type="text" id="mountopts"></p> - </td> - </tr> - <tr> - <td> </td> - <td><input name="addnfs" type="submit" id="addnfs" value="Add New NFS Mount"></td> - </tr> -</table> -<p> </p> -<p> </p> -<p> </p> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/partitioning.pyhtml b/src/net/server/html/webgli/partitioning.pyhtml deleted file mode 100644 index 5deb095..0000000 --- a/src/net/server/html/webgli/partitioning.pyhtml +++ /dev/null @@ -1,47 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -if 'add_device' in post_params: - shared_info.devices[post_params['add_device']] = GLIStorageDevice.Device(post_params['add_device'], set_geometry=False, local_device=False) -?> -The first thing on the new system to setup is the partitoning. -You will first select a drive and then edit its partitions. -No changes will be saved until the end of the step. -No changes to your disk will be made until the installation. -NOTE: YOU MUST AT LEAST SELECT ONE PARTITION AS YOUR ROOT PARTITION "/" -If your drive is pre-partitioned, just select the mountpoints and make -sure that the format option is set to FALSE or it will erase your data. -The installer does not yet support resizing of partitions (its not safe). -Please refer to the Gentoo Installation Handbook for more information -on partitioning and the various filesystem types available in Linux.<br><br> -Which drive would you like to partition?<br> -<? -shared_info.devices = shared_info.install_profile.get_partition_tables() -drives = shared_info.devices.keys() -drives.sort() -choice_list = [] -if not shared_info.devices: - tmp_drives = GLIStorageDevice.detect_devices() - tmp_drives.sort() - for drive in tmp_drives: - shared_info.devices[drive] = GLIStorageDevice.Device(drive) - #if local_install: #when uncommenting please indent the next line. - shared_info.devices[drive].set_partitions_from_disk() - drives.append(drive) - choice_list.append((drive, shared_info.devices[drive].get_model())) -else: - for drive in drives: - choice_list.append((drive, shared_info.devices[drive].get_model())) -?> -<table> -<!-- data += "<tr><td> </td><td>EDIT</td><td>Drive</td><td>Drive Information</td></tr> --> -<: for i, choice in enumerate(choice_list): - <tr> - <td><a href="/webgli/partitioning2.pyhtml?editdrive=<% choice[0] %>"><img src="/images/icon-harddisk-noia_48x48.png" border="0" alt="<% choice[0] %>"></a></td><td valign="bottom"><% choice[1] %> (<% choice[0] %>)</td> - </tr> -:> -</table> -<br> -<form name="genericdisk" action="/webgli/partitioning.pyhtml" method="POST"> -Add generic disk: <input type="text" name="add_device" size="14"> <input type="submit" value="Add"> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/partitioning2.pyhtml b/src/net/server/html/webgli/partitioning2.pyhtml deleted file mode 100644 index 5b7a329..0000000 --- a/src/net/server/html/webgli/partitioning2.pyhtml +++ /dev/null @@ -1,145 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -if get_params['editdrive']: - post_params['editdrive'] = get_params['editdrive'] -colors = { 'ext2': '#0af2fe', 'ext3': '#0af2fe', 'unalloc': '#a2a2a2', 'unknown': '#ed03e0', 'free': '#ffffff', 'ntfs': '#f20600', 'fat16': '#3d07f9', 'fat32': '#3d07f9', 'reiserfs': '#f0ff00', 'linux-swap': '#12ff09', 'xfs': '#006600', 'jfs': '#ffb400' } -?> -<h4>Select a partition or unallocated space to edit</h4> -<: if not post_params['editdrive']: -ERROR: You must select a drive to be editing!<br> -<!-- return wrap_in_webgli_template(data) --> -<: else: -<? -drive_to_partition = post_params['editdrive'] -shared_info.drive_to_partition = drive_to_partition -partitions = shared_info.devices[drive_to_partition] #.get_partitions() -partlist = shared_info.devices[drive_to_partition].get_ordered_partition_list() -tmpparts = shared_info.devices[drive_to_partition] #.get_partitions() -?> -<form name="part2" action="/webgli/partitioning3.pyhtml" method="POST" enctype="multipart/form-data"> -<input type="hidden" name="editdrive" value="<% drive_to_partition %>"> -<input type="hidden" name="editpart2" value=""> -<script> -function partition_selected(minor) { - document.part2.editpart2.value = minor; - document.part2.submit(); -} -</script> -<? -if shared_info.error_message: - print '<span style="color: red;">' + shared_info.error_message + '</span><br><br>' - shared_info.error_message = "" -total_mb = shared_info.devices[drive_to_partition].get_total_mb() -extended_total_mb = 0 -last_percent = 0 -last_log_percent = 0 -if len(partlist): - print '<table width="100%" cellspacing="0" cellpadding="0" border="1">' - print ' <tr>' -for part in partlist: - tmppart = tmpparts[part] - if tmppart.get_type() == "free": - partsize = tmppart.get_mb() - percent = (float(partsize) / float(total_mb)) * 100 - if percent < 1: percent = 1 - percent = int(percent) - if tmppart.is_logical(): - ext_percent = (float(partsize) / float(extended_total_mb)) * 100 - if ext_percent < 1: ext_percent = 1 - ext_percent = int(ext_percent) - print ' <td height="40" width="' + str(ext_percent) + '%" align="center" style="background-color: ' + colors['unalloc'] + ';" onclick="partition_selected(' + str(part) + ');">' + " </td>\n" - last_log_percent = last_log_percent + percent - else: - print ' <td height="40" width="' + str(percent) + '%" align="center" style="background-color: ' + colors['unalloc'] + ';" onclick="partition_selected(' + str(part) + ');">' + " </td>\n" - last_percent = last_percent + percent - else: - partsize = tmppart.get_mb() - percent = (float(partsize) / float(total_mb)) * 100 - if percent < 1: percent = 1 - percent = int(percent) - tmpminor = int(tmppart.get_minor()) - tmpdevice = drive_to_partition - if tmppart.is_extended(): - print ' <td height="40" width="' + str(percent) + '%" align="center" style="background-color: #ffffff;">' + "\n" + ' <table width="100%" cellspacing="0" cellpadding="0" border="1" style="margin: 2px;">' + "\n <tr>\n" - extended_total_mb = tmppart.get_mb() - last_percent = last_percent + percent - elif tmppart.is_logical(): - ext_percent = (float(partsize) / float(extended_total_mb)) * 100 - if ext_percent < 1: ext_percent = 1 - ext_percent = int(ext_percent) - print ' <td height="40" width="' + str(ext_percent) + '%" align="center" style="background-color: ' + colors[tmppart.get_type()] + ';" onclick="partition_selected(' + str(tmpminor) + ');">' - if percent >= 15: - print tmpdevice + str(tmpminor) - print "</td>\n" - last_log_percent = last_log_percent + percent - else: - if extended_total_mb: - print " </tr>\n </table>\n </td>\n" - extended_total_mb = 0 - print ' <td height="40" width="' + str(percent) + '%" align="center" style="background-color: ' + colors[tmppart.get_type()] + ';" onclick="partition_selected(' + str(tmpminor) + ');">' - if percent >= 15: - print tmpdevice + str(tmpminor) - print "</td>\n" - last_percent = last_percent + percent -if extended_total_mb: - print " </tr>\n </table>\n </td>\n" - extended_total_mb = 0 -if len(partlist): - print " </tr>\n</table>\n<br>\n" -if shared_info.devices[drive_to_partition].get_model() == "Generic disk": - print '<input type="button" value="Add new at end" onclick="partition_selected(-1);"> ' -else: - print '<input type="submit" name="recommended" value="Recommended layout"> ' -?> -<input type="submit" name="cleardrive" value="Clear drive"><br> -<table style="display: none;"> - <tr> - <td>EDIT</td> - <td>INFO: Key: Minor, Pri/Ext, Filesystem, MkfsOpts, Mountpoint, MountOpts, Size.</td> - </tr> -<: for i, part in enumerate(partlist): -<? -tmppart = tmpparts[part] -minor = tmppart.get_minor() -if not tmppart.get_type() == "free": - minor = int(minor) -?> - <tr> - <td><input type="radio" name="editpart" value="<% str(minor) %>"></td> -<? -if tmppart.get_type() == "free": - #partschoice = "New" - entry = _(u" - Unallocated space (") - if tmppart.is_logical(): - entry += _(u"logical, ") - entry += str(tmppart.get_mb()) + "MB)" -elif tmppart.get_type() == "extended": - entry = str(int(tmppart.get_minor())) - entry += _(u" - Extended Partition (") + str(tmppart.get_mb()) + "MB)" -else: - entry = str(int(tmppart.get_minor())) + " - " - # Type: " + tmppart.get_type() + ", Mountpoint: " + tmppart.get_mountpoint() + ", Mountopts: " + tmppart.get_mountopts() + "(" - if tmppart.is_logical(): - entry += _(u"Logical (") - else: - entry += _(u"Primary (") - entry += tmppart.get_type() + ", " - entry += (tmppart.get_mkfsopts() or "none") + ", " - entry += (tmppart.get_mountpoint() or "none") + ", " - entry += (tmppart.get_mountopts() or "none") + ", " - entry += str(tmppart.get_mb()) + "MB)" -?> - <td><% entry %></td> - </tr> -:> -<: if shared_info.devices[drive_to_partition].get_model() == "Generic disk": - <tr> - <td><input type="radio" name="editpart" value="-1"></td><td>Add new at end</td> - </tr> -:> - <tr> - <td colspan="2"><br><input type="submit" name="SubmitEditPart" value="Edit Partition"></td> - </tr> -</table> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/partitioning3.pyhtml b/src/net/server/html/webgli/partitioning3.pyhtml deleted file mode 100644 index 981a7e7..0000000 --- a/src/net/server/html/webgli/partitioning3.pyhtml +++ /dev/null @@ -1,106 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<: if 'recommended' in post_params: -<? -try: - shared_info.devices[shared_info.drive_to_partition].do_recommended() -except GLIException, error: - shared_info.error_message = error.get_error_msg() -self.redirect("/webgli/partitioning2.pyhtml?editdrive=" + shared_info.drive_to_partition) -?> -<: elif 'cleardrive' in post_params: -<? -shared_info.devices[shared_info.drive_to_partition].clear_partitions() -shared_info.error_message = "Partition table cleared successfully" -self.redirect("/webgli/partitioning2.pyhtml?editdrive=" + shared_info.drive_to_partition) -?> -<: else: -<? -if post_params['editpart2']: - post_params['editpart'] = post_params['editpart2'] -if get_params['editpart']: - post_params['editpart'] = get_params['editpart'] -?> -<form name="part3" action="/webgli/partitioning4.pyhtml" method="POST" enctype="multipart/form-data"> -<input type="hidden" name="editpart" value="<% post_params['editpart'] %>"> -<? -drive_to_partition = shared_info.drive_to_partition -partlist = shared_info.devices[drive_to_partition].get_ordered_partition_list() -tmpparts = shared_info.devices[drive_to_partition] #.get_partitions() -?> -<: if not post_params['editpart']: -ERROR: You must select a partition to edit!<br>\n" -<!-- return wrap_in_webgli_template(data) --> -<: else: -<? -editpart = float(post_params['editpart']) -#part_to_edit = partlist[editpart] -#tmppart = tmpparts[part_to_edit] -part_types = [("ext2", _(u"Old, stable, but no journaling")), - ("ext3", _(u"ext2 with journaling and b-tree indexing (RECOMMENDED)")), - ("linux-swap", _(u"Swap partition for memory overhead")), - ("fat32", _(u"Windows filesystem format used in Win9X and XP")), - ("ntfs", _(u"Windows filesystem format used in Win2K and NT")), - ("jfs", _(u"IBM's journaling filesystem. stability unknown.")), - ("xfs", _(u"Don't use this unless you know you need it.")), - ("reiserfs", _(u"B*-tree based filesystem. great performance. Only V3 supported.")), - ("extended", _(u"Create an extended partition containing other logical partitions"))] -mountpoints = ["","/","/boot","/etc","/home","/lib","/mnt","/mnt/windows","/opt","/root","/usr","/usr/local","/usr/portage","/var"] -if editpart != -1: - tmppart = tmpparts[float(editpart)] -?> -<: if editpart == -1 or tmppart.get_type() == "free": -<? -# partition size first -if editpart == -1: - free_mb = 0 -else: - free_mb = tmppart.get_mb() -?> -Enter the size of the new partition in MB (max <% str(free_mb) %> MB). If creating an extended partition input its entire size (not just the first logical size): <input type="text" name="size" value="<% str(free_mb) %>"><br> -<!-- # partition type --> -Choose the filesystem type for this new partition:<br> -<table> - <tr> - <td>Filesystem</td> - <td>Description</td> - </tr> -<: for part_type in part_types: - <tr> - <td><input type="radio" name="filesystem" value="<% part_type[0] %>"> <% part_type[0] %></td><td><% part_type[1] %></td> - </tr> -:> -</table><br> -<input type="submit" value="Create"> <input type="button" value="Cancel" onclick="location.go(-1)"> -<: else: -<? -#tmppart = tmpparts[float(editpart)] -editpart = int(editpart) -?> -<h2>Partition Information:</h2> -<b>Minor:</b> <% drive_to_partition + str(editpart) %><br> - <% ("Primary", "Logical")[tmppart.is_logical()] %> Partition<br> -<b>Filesystem type:</b><select name="filesystem" size="1"> -<: for i,part_type in enumerate(part_types): -<option value="<% part_types[i][0] %>" <? if part_types[i][0] == tmppart.get_type(): print "selected" ?>><% part_types[i][0] %> - <% part_types[i][1] %></option> -:> -</select><br> - -<b>Options:</b> <input type="text" name="fsopts" value="<% (tmppart.get_mkfsopts() or "") %>"><br> - -<b>MountPoint:</b> <select name="mountpoint" size="1"> -<: for mtpnt in mountpoints: -<option value="<% mtpnt %>" <? if mtpnt == tmppart.get_mountpoint(): print "selected" ?>><% mtpnt %></option> -:> -</select><br> - -<b>Mount Options:</b> <input type="text" name="mountopts" value="<% (tmppart.get_mountopts() or "") %>"><br> - -<b>Size (MB)</b> <% str(tmppart.get_mb()) %>MB <br> -Format this partition? <br><input type="radio" name="format" value="True" <? if tmppart.get_format(): print "checked" ?>>True<br><input type="radio" name="format" value="False" <? if not tmppart.get_format(): print "checked" ?>>False<br> -<hr> -<table border="0"> - <tr> - <td><input type="submit" name="DelPartition" value="DELETE PARTITION"></td> - <td><input type="submit" name="SavePartition" value="Save Changes"></td> - <td><input type="submit" name="Cancel" value="Cancel"></td> - </tr> -</table> -</form> -:> -<? include /webgli/bottom.pyhtml ?> -:> diff --git a/src/net/server/html/webgli/partitioning4.pyhtml b/src/net/server/html/webgli/partitioning4.pyhtml deleted file mode 100644 index 2c4cc75..0000000 --- a/src/net/server/html/webgli/partitioning4.pyhtml +++ /dev/null @@ -1,36 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -drive_to_partition = shared_info.drive_to_partition -partlist = shared_info.devices[drive_to_partition].get_ordered_partition_list() -tmpparts = shared_info.devices[drive_to_partition] #.get_partitions() -?> -<: if not post_params['editpart']: -ERROR: You must select a partition to edit!<br> -<!-- return wrap_in_webgli_template(data) --> -<: else: -<? -editpart = float(post_params['editpart']) -if not editpart == -1: - tmppart = tmpparts[float(editpart)] -if post_params["DelPartition"] == "DELETE PARTITION" or post_params["Cancel"] == "Cancel": - if post_params["DelPartition"] == "DELETE PARTITION": - shared_info.devices[drive_to_partition].remove_partition(editpart) - self.redirect("/webgli/partitioning2.pyhtml?editdrive=" + drive_to_partition) -elif editpart == -1 or tmppart.get_type() == "free": - if not int(post_params['size']): - print "ERROR: you must specify a size in MB" -# return wrap_in_webgli_template(data) - else: - new_minor = shared_info.devices[drive_to_partition].add_partition(editpart, int(post_params['size']), 0, 0, post_params['filesystem']) - self.redirect("/webgli/partitioning3.pyhtml?editpart=" + str(int(new_minor))) -else: - tmppart = tmpparts[editpart] - tmppart.set_format(post_params['format']) - tmppart.set_mkfsopts(post_params['fsopts']) - tmppart.set_mountopts(post_params['mountopts']) - tmppart.set_mountpoint(post_params['mountpoint']) - self.redirect("/webgli/partitioning2.pyhtml?editdrive=" + drive_to_partition) -?> -:> -<? include /webgli/bottom.pyhtml ?> - diff --git a/src/net/server/html/webgli/portagetree.pyhtml b/src/net/server/html/webgli/portagetree.pyhtml deleted file mode 100644 index a9d89fa..0000000 --- a/src/net/server/html/webgli/portagetree.pyhtml +++ /dev/null @@ -1,52 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - if 'saveportage' in post_params: - if 'portagetype' in post_params: - try: - shared_info.install_profile.set_portage_tree_sync_type(None,post_params['portagetype'],None) - except: - error_msg = "ERROR: Could not set the portage tree sync type" - if 'snapshoturi' in post_params and post_params['snapshoturi']: - try: - shared_info.install_profile.set_portage_tree_snapshot_uri(None,post_params['snapshoturi'],None) - except: - error_msg = "ERROR: Could not set the portage snapshot URI" - -synctype = shared_info.install_profile.get_portage_tree_sync_type() -snapshoturi = shared_info.install_profile.get_portage_tree_snapshot_uri() -?> -<p>Portage Tree Sync Type:</p> -<: if error_msg: -<br><% error_msg %><br><br> -:> -<: if shared_info.install_profile.get_dynamic_stage3(): #special case -<p><b>Since you are doing a dynamic stage3 install, it requires the use of the portage snapshot contained on the livecd. This has been auto-set.</b></p> -<: else: -<form name="portage" action="/webgli/portagetree.pyhtml" method="POST" enctype="multipart/form-data"> -<p>Which method do you want to use to sync the portage tree for the installation? If choosing a snapshot you will need to provide the URI for the snapshot if it is not on the livecd.</p> -<table width="100%" border="1"> - <tr> - <td><input name="portagetype" type="radio" value="sync" <? if synctype == "sync": print "checked" ?>>Sync</td> - <td>Normal. Use emerge sync RECOMMENDED!</td> - </tr> - <tr> - <td><input name="portagetype" type="radio" value="webrsync" <? if synctype == "webrsync": print "checked" ?>>Webrsync</td> - <td>HTTP daily snapshot. Use when rsync is firewalled.</td> - </tr> - <tr> - <td><input name="portagetype" type="radio" value="snapshot" <? if synctype == "snapshot": print "checked" ?>>Snapshot</td> - <td>Use a portage snapshot, either a local file or a URL</td> - </tr> - <tr> - <td><input name="portagetype" type="radio" value="none" <? if synctype == "none" or not synctype: print "checked" ?>>None</td> - <td>Extra cases such as if /usr/portage is an NFS mount</td> - </tr> -</table> -<p>Snapshot URI (if doing shapshot): <input name="snapshoturi" type="text" id="snapshoturi" size="90" value="<% snapshoturi %>"> or </p> -<input type="button" value="Browse the mirrors for the URL" onClick="window.open('/webgli/URIBrowser?screen=portage&baseuri=' + document.portage.snapshoturi.value, 'uribrowser', 'width=500,height=500,toolbars=no,statusbar=no,menubar=no,scrollbars=yes')"> -<p><input type="submit" name="saveportage" value="Save Portage Settings"> -</form> -:> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/review.pyhtml b/src/net/server/html/webgli/review.pyhtml deleted file mode 100644 index b4bbca2..0000000 --- a/src/net/server/html/webgli/review.pyhtml +++ /dev/null @@ -1,158 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -print "<pre>Look carefully at the following settings to check for mistakes.\nThese are the installation settings you have chosen:\n\n" - -#Partitioning -print "Partitioning: \n Key: Minor, Pri/Ext, Filesystem, MkfsOpts, Mountpoint, MountOpts, Size.\n" -devices = shared_info.install_profile.get_partition_tables() -drives = devices.keys() -drives.sort() -for drive in drives: - print " Drive: " + drive + devices[drive].get_model() + "\n" - partlist = devices[drive].get_ordered_partition_list() - tmpparts = devices[drive] #.get_partitions() - for part in partlist: - tmppart = tmpparts[part] - entry = " " - if tmppart.get_type() == "free": - #partschoice = "New" - entry += _(u" - Unallocated space (") - if tmppart.is_logical(): - entry += _(u"logical, ") - entry += str(tmppart.get_mb()) + "MB)" - elif tmppart.get_type() == "extended": - entry += str(int(tmppart.get_minor())) - entry += _(u" - Extended Partition (") + str(tmppart.get_mb()) + "MB)" - else: - entry += str(int(tmppart.get_minor())) + " - " - if tmppart.is_logical(): - entry += _(u"Logical (") - else: - entry += _(u"Primary (") - entry += tmppart.get_type() + ", " - entry += (tmppart.get_mkfsopts() or "none") + ", " - entry += (tmppart.get_mountpoint() or "none") + ", " - entry += (tmppart.get_mountopts() or "none") + ", " - entry += str(tmppart.get_mb()) + "MB)" - print entry + "\n" - -#Network Mounts: -network_mounts = copy.deepcopy(shared_info.install_profile.get_network_mounts()) -print "\nNetwork Mounts: \n" -for mount in network_mounts: - print " "+mount['host']+":"+mount['export']+"\n" - -#Install Stage: -print "\nInstall Stage: " + str(shared_info.install_profile.get_install_stage()) + "\n" -if shared_info.install_profile.get_dynamic_stage3(): - print " Tarball will be generated on the fly from the CD.\n" -else: - print " Tarball URI: " + shared_info.install_profile.get_stage_tarball_uri() + "\n" - -#Portage Tree Sync Type: -print "\nPortage Tree Sync Type: " + shared_info.install_profile.get_portage_tree_sync_type() + "\n" -if shared_info.install_profile.get_portage_tree_sync_type() == "snapshot": - print " Portage snapshot URI: " + shared_info.install_profile.get_portage_tree_snapshot_uri() + "\n" - -#Kernel Settings: -print "\nKernel Settings:\n" -print " Kernel Sources: " + shared_info.install_profile.get_kernel_source_pkg() + "\n" -if shared_info.install_profile.get_kernel_source_pkg() != "livecd-kernel": - print " Kernel Build Method: " + shared_info.install_profile.get_kernel_build_method() + "\n" - if shared_info.install_profile.get_kernel_build_method() == "genkernel": - print " Kernel Bootsplash Option: " + str(shared_info.install_profile.get_kernel_bootsplash()) + "\n" -if shared_info.install_profile.get_kernel_config_uri(): - print " Kernel Configuration URI: " + shared_info.install_profile.get_kernel_config_uri() + "\n" - -#Bootloader Settings: -print "\nBootloader Settings:\n" -print " Bootloader package: " + shared_info.install_profile.get_boot_loader_pkg() + "\n" -if shared_info.install_profile.get_boot_loader_pkg() != "none": - print " Install bootloader to MBR: " + str(shared_info.install_profile.get_boot_loader_mbr()) + "\n" - print " Bootloader kernel arguments: " +shared_info.install_profile.get_bootloader_kernel_args() + "\n" - -#Timezone: -print "\nTimezone: " + shared_info.install_profile.get_time_zone() + "\n" - -#Networking Settings: -print "\nNetworking Settings: \n" -interfaces = shared_info.install_profile.get_network_interfaces() -for iface in interfaces: - if interfaces[iface][0] == 'dhcp': - print " " + iface + _(u": Settings: DHCP. Options: ") + interfaces[iface][1] + "\n" - else: - print " " + iface + _(u"IP: ") + interfaces[iface][0] + _(u" Broadcast: ") + interfaces[iface][1] + _(u" Netmask: ") + interfaces[iface][2] + "\n" -default_gateway = shared_info.install_profile.get_default_gateway() -if default_gateway: - print " Default Gateway: " + default_gateway[0] + "/" + default_gateway[1] + "\n" -print " Hostname: " + shared_info.install_profile.get_hostname() + "\n" -if shared_info.install_profile.get_domainname(): - print " Domainname: " +shared_info.install_profile.get_domainname() + "\n" -if shared_info.install_profile.get_nisdomainname(): - print " NIS Domainname: " +shared_info.install_profile.get_nisdomainname() + "\n" -if shared_info.install_profile.get_dns_servers(): - for dns_server in shared_info.install_profile.get_dns_servers(): - print " DNS Server: " +dns_server + "\n" -if shared_info.install_profile.get_http_proxy(): - print " HTTP Proxy: " +shared_info.install_profile.get_http_proxy() + "\n" -if shared_info.install_profile.get_ftp_proxy(): - print " FTP Proxy: " +shared_info.install_profile.get_ftp_proxy() + "\n" -if shared_info.install_profile.get_rsync_proxy(): - print " RSYNC Proxy: " +shared_info.install_profile.get_rsync_proxy() + "\n" - -#Cron Daemon: -print "\nCron Daemon: " + shared_info.install_profile.get_cron_daemon_pkg() + "\n" - -#Logger: -print "\nLogging Daemon: " + shared_info.install_profile.get_logging_daemon_pkg() + "\n" - -#Extra packages: -if shared_info.install_profile.get_install_packages(): - install_packages = shared_info.install_profile.get_install_packages() -else: - install_packages = [] -print "\nExtra Packages: " -for package in install_packages: - print package + " " -print "\n" - -#Services: -if shared_info.install_profile.get_services(): - services = shared_info.install_profile.get_services() -else: - services = [] -print "\nAdditional Services: " -for service in services: - print service + " " -print "\n" - -#Other Configuration Settings (rc.conf): -#Make.conf Settings: -print "\nConfiguration Files Settings:\n" -etc_files = shared_info.install_profile.get_etc_files() -for etc_file in etc_files: - print " File:" + etc_file + "\n" - if isinstance(etc_files[etc_file], dict): - for name in etc_files[etc_file]: - print " Variable: " + name + " Value: " + etc_files[etc_file][name] + "\n" - else: - for entry in etc_files[etc_file]: - print " Value: "+ entry + "\n" - -#Additional Users: -print "\nAdditional Users:\n" -users = {} -for user in shared_info.install_profile.get_users(): - users[user[0]] = (user[0], user[1], user[2], user[3], user[4], user[5], user[6]) -for user in users: - print " Username: " + user - print "\n Group Membership: " + ",".join(users[user][2]) - print "\n Shell: " + users[user][3] - print "\n Home Directory: " + users[user][4] - if users[user][5]: - print "\n User Id: " + users[user][5] - if users[user][6]: - print "\n User Comment: " + users[user][6] -print "</pre>" -?> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/saveprofile.pyhtml b/src/net/server/html/webgli/saveprofile.pyhtml deleted file mode 100644 index 45468a5..0000000 --- a/src/net/server/html/webgli/saveprofile.pyhtml +++ /dev/null @@ -1,80 +0,0 @@ -<? include /webgli/top.pyhtml ?> - -<? -errormsg = "" -if post_params: - #Deal with GLIMD adding of profile first by saving both profiles locally with a prefix of the name. - if 'addtoGLIMD' in post_params and post_params['GLIMDprofile']: - post_params['clientfile'] = post_params['GLIMDprofile'] + "_cc.xml" - post_params['ipfile'] = post_params['GLIMDprofile'] + "_ip.xml" - - if not 'downloadclient' in post_params and post_params['clientfile']: - try: - tmpfile = open(post_params['clientfile'], "w") - tmpfile.write(shared_info.client_profile.serialize()) - tmpfile.close() - except: - errormsg = "There was a problem writing the file" -# return wrap_in_webgli_template(content) -# return wrap_in_webgli_template(content + "Client Profile saved successfully") - elif 'downloadclient' in post_params: - headers_out.append(("Content-type", "text/xml")) - headers_out.append(('Content-disposition', "attatchment;filename=clientprofile.xml")) - return shared_info.client_profile.serialize() - if not 'downloadip' in post_params and post_params['ipfile']: - try: - tmpfile = open(post_params['ipfile'], "w") - tmpfile.write(shared_info.install_profile.serialize()) - tmpfile.close() - except: - errormsg = "There was a problem writing the file" + get_exception() -# return wrap_in_webgli_template(content) -# return wrap_in_webgli_template(content + "Client Profile saved successfully") - elif 'downloadip' in post_params: - headers_out.append(("Content-type", "text/xml")) - headers_out.append(('Content-disposition', "attatchment;filename=installprofile.xml")) - return shared_info.install_profile.serialize() - - if post_params['addtoGLIMD']: - for profile in shared_info.profiles: - if post_params['GLIMDprofile'] == profile['name']: - errormsg = "That profile already exists!" - if not errormsg: - try: - new_profile = {} - new_profile['name'] = post_params['GLIMDprofile'] - new_profile['ccxmlfile'] = post_params['clientfile'] - new_profile['ipxmlfile'] = post_params['ipfile'] - shared_info.profiles.append(new_profile) - except: - errormsg += "Error while adding the new profile!" - - if not errormsg: - errormsg = "Profile added successfully" - -?> - -<h2>Save Client Profile</h2> -<: if errormsg: -<br><% errormsg %><br><br> -:> -<br> -<form action="/webgli/saveprofile.pyhtml" method="POST" enctype="multipart/form-data"> -Save to local (to server) file (USE FULL PATH, write to a writeable location (such as ~/) ): <input type="text" name="clientfile"> <input type="submit" value="Save"><br> -or<br> -Download the file: <input type="submit" name="downloadclient" value="Download"> -</form><hr> -<h2>Save Install Profile</h2> -<br> -<form action="/webgli/saveprofile.pyhtml" method="POST" enctype="multipart/form-data"> -Save to local (to server) file (USE FULL PATH, write to a writeable location (such as ~/) ): <input type="text" name="ipfile"> <input type="submit" value="Save"><br> -or<br> -Download the file: <input type="submit" name="downloadip" value="Download"> -<hr> -If you plan to use these profiles for the GLI Management Daemon, you can simply give the profile a name and -add it to the list of available profiles.<br> -Name:<input type="text" name="GLIMDprofile"><br> -<input type="submit" name="addtoGLIMD" value="Add Profile to GLIMD"> -</form> - -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/services.pyhtml b/src/net/server/html/webgli/services.pyhtml deleted file mode 100644 index e01e3ff..0000000 --- a/src/net/server/html/webgli/services.pyhtml +++ /dev/null @@ -1,59 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - if post_params['saveservices']: - if post_params['servicesmanual']: - services = post_params['servicesmanual'] - elif post_params['services']: - services = post_params['services'] - if isinstance(services, list): - services = ",".join(services) - try: - if services: - shared_info.install_profile.set_services(None, services, None) - except: - error_msg = "ERROR! Could not set the services list." - if not error_msg: - error_msg = "Values saved successfully" - -if shared_info.install_profile.get_services(): - services = shared_info.install_profile.get_services() - if isinstance(services, str): - services = services.split(',') -else: - services = [] -choice_list = [("alsasound", _(u"ALSA Sound Daemon"),int("alsasound" in services)), - ("apache", _(u"Common web server (version 1.x)"),int("apache" in services)), - ("apache2", _(u"Common web server (version 2.x)"),int("apache2" in services)), - ("distccd", _(u"Distributed Compiling System"),int("distccd" in services)), - ("esound", _(u"ESD Sound Daemon"),int("esound" in services)), - ("hdparm", _(u"Hard Drive Tweaking Utility"),int("hdparm" in services)), - ("local", _(u"Run scripts found in /etc/conf.d/local.start"),int("local" in services)), - ("portmap", _(u"Port Mapping Service"),int("portmap" in services)), - ("proftpd", _(u"Common FTP server"),int("proftpd" in services)), - ("sshd", _(u"SSH Daemon (allows remote logins)"),int("sshd" in services)), - ("xfs", _(u"X Font Server"),int("xfs" in services)), - ("xdm", _(u"X Daemon"),int("xdm" in services))] -?> -Choose the services you want started on bootup. Note that depending on what packages are selected, some services listed will not exist. -<form name="services" method="post" action="/webgli/services.pyhtml" enctype="multipart/form-data"> -<table border="1"> - <tr> - <td>Activate</td> - <td>Service</td> - <td>Description</td> - </tr> -<: for i,choice in enumerate(choice_list): - <tr> - <td><input type="checkbox" name="services" value="<% choice_list[i][0] %>" <? if choice_list[i][2]: print "checked" ?>></td> - <td><% choice_list[i][0] %></td> - <td><% choice_list[i][1] %></td> - </tr> -:> -</table> -<hr>You can also opt to enter your services in a comma-separated list (NOTE Manual list overwrites checked selections!): -<input type="text" name="servicesmanual" value="<% ",".join(services) %>"><br> -<input type="submit" name="saveservices" value="Save Services"> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/stageselection.pyhtml b/src/net/server/html/webgli/stageselection.pyhtml deleted file mode 100644 index f947834..0000000 --- a/src/net/server/html/webgli/stageselection.pyhtml +++ /dev/null @@ -1,85 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - if 'savestage' in post_params: -# print "YES I CLICKED SAVE<br>" - if 'stage' in post_params: -# print "YES THERE IS A STAGE<br>" - if post_params['stage'] == "3+GRP": - post_params['stage'] = "3" - try: - shared_info.install_profile.set_grp_install(None, True,None) - except: - error_msg = "ERROR COULD NOT SET GRP INSTALL" - else: - try: - shared_info.install_profile.set_grp_install(None, False,None) - except: - error_msg = "ERROR COULD NOT SET GRP INSTALL" - try: - shared_info.install_profile.set_install_stage(None, post_params['stage'], None) -# data += "Stage set<br>" - except: - error_msg = "ERROR: could not set the install stage" - if 'tarballuri' in post_params and post_params['tarballuri']: - try: - shared_info.install_profile.set_stage_tarball_uri(None, post_params['tarballuri'], None) -# data += "Set the tarball uri<br>" - except: - error_msg = "ERROR: Could not set the tarball URI" - if 'dynamic' in post_params: - try: - shared_info.install_profile.set_dynamic_stage3(None, True, None) - shared_info.install_profile.set_portage_tree_sync_type(None,"snapshot", None) - cd_snapshot_uri = GLIUtility.get_cd_snapshot_uri() - shared_info.install_profile.set_portage_tree_snapshot_uri(None, cd_snapshot_uri, None) - except: - error_msg = "ERROR: Could not set dynamic stage 3." - else: - try: - shared_info.install_profile.set_dynamic_stage3(None, False, None) - except: - error_msg = "ERROR: Could not set dynamic stage 3.<br>\n" - -stage = shared_info.install_profile.get_install_stage() -grp_install = shared_info.install_profile.get_grp_install() -dynamic = shared_info.install_profile.get_dynamic_stage3() -tarball = shared_info.install_profile.get_stage_tarball_uri() -?> -<h4>Stage selection:</h4> -<: if error_msg: -<br><br><% error_msg %><br><br> -:> -<: if stage: -FOUND A STAGE<% str(stage) %> -:> -<form name="stage" action="/webgli/stageselection.pyhtml" method="POST" enctype="multipart/form-data"> -<p>Which stage do you want to start at?</p> -<table width="100%" border="1"> - <tr> - <td><input name="stage" type="radio" value="1" <? if stage == 1: print 'checked' ?>>1</td> - <td>Stage1 is used when you want to bootstrap&build from scratch.</td> - </tr> - <tr> - <td><input name="stage" type="radio" value="2" <? if stage == 2: print 'checked' ?>>2</td> - <td>Stage2 is used for building from a bootstrapped semi-compiled state.</td> - </tr> - <tr> - <td><input name="stage" type="radio" value="3" <? if (stage == 3) and not grp_install: print 'checked' ?>>3</td> - <td>Stage3 is a basic system that has been built for you (no compiling).</td> - </tr> - <tr> - <td><input name="stage" type="radio" value="3+GRP" <?if (stage == 3) and grp_install: print 'checked' ?>>3 + GRP </td> - <td>A Stage3 install but using binaries from the LiveCD when able.</td> - </tr> -</table> -<p> -<input name="dynamic" type="checkbox" id="dynamic" value="true" <? if dynamic: print "checked" ?>> -Generate a dynamic stage3 on the fly using the files on the LiveCD? (faster for slow Internet connections, slower for fast connections and slow drives) </p> -<p>Stage Tarball URI: <input name="tarballuri" type="text" id="tarballuri" size="90" value="<% tarball %>"> or -<input type="button" value="Browse the mirrors for the URL" onClick="window.open('/webgli/URIBrowser?screen=stage&baseuri=' + document.stage.tarballuri.value, 'uribrowser', 'width=500,height=500,toolbars=no,statusbar=no,menubar=no,scrollbars=yes')"> -(requires net connectivity)</p> -<p><input type="submit" name="savestage" value="Save Stage Selection"> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/timezone.pyhtml b/src/net/server/html/webgli/timezone.pyhtml deleted file mode 100644 index faad24e..0000000 --- a/src/net/server/html/webgli/timezone.pyhtml +++ /dev/null @@ -1,46 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params['back']: - zonepath = post_params['tzback'] -if get_params['zonepath']: - zonepath = get_params['zonepath'] - if zonepath[-1] != "/": - try: - shared_info.install_profile.set_time_zone(None, zonepath[20:], None) - error_msg = "Timezone Set" - except: - error_msg = "ERROR: Could not set that timezone!" - if not "UTC" in zonepath: # set conf value to local if not already set. - etc_files = shared_info.install_profile.get_etc_files() - if not "conf.d/clock" in etc_files: - etc_files['conf.d/clock'] = {} - etc_files['conf.d/clock']['CLOCK'] = "local" - try: - shared_info.install_profile.set_etc_files(etc_files) - except: - error_msg += "ERROR: Could not set the clock to local!" -else: - zonepath = "/usr/share/zoneinfo/" -skiplist = ["zone.tab","iso3166.tab","posixrules"] -tzlist = [] -if os.path.isdir(zonepath): - for entry in os.listdir(zonepath): - if entry not in skiplist: - if os.path.isdir(zonepath + "/" + entry): entry += "/" - tzlist.append(entry) -tzlist.sort() -?> -<h2>Timezone Setup </h2> -<: if error_msg: -<br><% error_msg %><br><br> -:> -Timezones:<br> -<form name="Timezone" method="post" action="/webgli/timezone.pyhtml" enctype="multipart/form-data"> -<input type="hidden" name="tzback" value="<% zonepath %>"><br> -<: for timezone in tzlist: -<a href="/webgli/timezone.pyhtml?zonepath=<% zonepath+timezone %>"><% timezone %></a><br> -:> -<br><input type="submit" name="back" value="Back"> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/webgli/top.pyhtml b/src/net/server/html/webgli/top.pyhtml deleted file mode 100644 index 8031368..0000000 --- a/src/net/server/html/webgli/top.pyhtml +++ /dev/null @@ -1,254 +0,0 @@ -<? include /webgli/common.pyhtml ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <title>Web GLI Profile Setup</title> - <style type="text/css"> - <!-- - html { - margin: 0px; - } - body { - margin: 0px; - font-family: Bitstream Vera Sans, Helvetica, Sans; - font-size: 10pt; - } - table { - border-spacing: 0px; - } - td { - padding: 0px; - } - p { - margin-top: 0px; - margin-bottom: 5px; - } - ul { - margin: 0px; - padding: 0px; - border-top: 1px solid #ffffff; - border-bottom: 10px solid #ffffff; - } - li { - width: 150px; - border-right: 1px solid #ffffff; - border-bottom: 1px solid #ffffff; - } - #content { - padding-top: 7px; - padding-left: 7px; - } - .title { - font-size: 1.2em; - font-weight: bold; - } - a.step { - display: block; - position: relative; - width: 100%; - padding: 1px; - background-color: #d8d4e2; - color: #000000; - text-decoration: none; - } - a.step:hover { - background: #7e60e2 url("/images/arrow_l.gif") no-repeat scroll right; - } - .currentstep { - padding: 1px; - background: #ffffff url("/images/arrow_r.gif") no-repeat scroll right; - font-weight: bold; - cursor: default; - } - a.menuitem { - display: block; - position: relative; - padding: 1px; - background-color: #d8d4e2; - color: #000000; - text-decoration: none; - } - a.menuitem:hover { - background: #7e60e2 url("/images/arrow_l.gif") no-repeat scroll right; - } - .partition { - display: table; - background: #d8d4e2 url("/images/partition_bg.png") no-repeat; - } - .partition_drag { - padding-right: 15px; - height: 30px; - background: transparent url("/images/partition_drag.png") no-repeat scroll top right; - cursor: w-resize; - overflow: hidden; - position: relative; - } - .partition_drag[class] { - position: static; - display: table; - } - .partition_inner { - cursor: default; - position: absolute; - top: 50%; - } - .partition_inner[class] { - position: static; - display: table-cell; - vertical-align: middle; - } - .partition_free { - height: 18px; - margin-left: 6px; - border-right: 4px solid #d8d4e2; - background-color: #ffffff; - position: relative; - top: -50%; - } - .partition_free[class] { - position: static; - } - .partition_used { - height: 18px; - background-color: #00ffff; - } - --> - </style> - <script language="javascript"> - <!-- - function browserType() { - var type; - if (document.layers) { - type = 'nn4'; - } - if (document.all) { - type = 'ie'; - } - if (window.navigator.userAgent.toLowerCase().match("gecko")) { - type = 'gecko'; - } - return type; - } - var browser_type = browserType(); - function findLayer(name) { - var layer; - if (browser_type == 'gecko') { - layer = eval('document.getElementById(\'' + name + '\')'); - } else if (browser_type == 'ie') { - layer = eval('document.all[\'' + name + '\']'); - } else { - layer = eval('document.layers[\'' + name + '\']'); - } - return layer; - } - var resizeOb = new Object(); - function resizeStart(event) { - var x; - if (browser_type == 'ie') { - resizeOb.layer = window.event.srcElement; - x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft; - } else { - resizeOb.layer = event.target; - x = event.clientX + window.scrollX; - } - resizeOb.startX = x; - resizeOb.startW = parseInt(resizeOb.layer.style.width, 10); - if (isNaN(resizeOb.startW)) { - resizeOb.startW = 0; - } - if (browser_type == 'ie') { - document.attachEvent("onmousemove", resizeMove); - document.attachEvent("onmouseup", resizeStop); - window.event.cancelBubble = true; - window.event.returnValue = false; - } else { - document.addEventListener("mousemove", resizeMove, true); - document.addEventListener("mouseup", resizeStop, true); - event.preventDefault(); - } - } - function resizeMove(event) { - var x, w; - if (browser_type == 'ie') { - x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft; - } else { - x = event.clientX + window.scrollX; - } - w = (resizeOb.startW + (x - resizeOb.startX)); - if (w <= (parseInt(resizeOb.layer.parentNode.style.width, 10) - (15 + 4))) { - if (w >= (parseInt(findLayer('partition_used').style.width, 10) + 10)) { - resizeOb.layer.style.width = w + 'px'; - } - } - if (browser_type == 'ie') { - window.event.cancelBubble = true; - window.event.returnValue = false; - } else { - event.preventDefault(); - } - } - function resizeStop(event) { - if (browser_type == 'ie') { - document.detachEvent("onmousemove", resizeMove); - document.detachEvent("onmouseup", resizeStop); - } else { - document.removeEventListener("mousemove", resizeMove, true); - document.removeEventListener("mouseup", resizeStop, true); - } - } - //--> - </script> -</head> -<body> - -<table id="layout" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"> - <tr id="header"> - <td colspan="2"> - <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td width="50%"> - <img src="/images/header_bg.png" border="0" width="100%" height="64"> - </td> - <td> - <img src="/images/header.png" alt="Gentoo Linux Installer" border="0" width="400" height="64"> - </td> - <td width="50%"> - <img src="/images/header_bg.png" border="0" width="100%" height="64"> - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td valign="top"> - <ul id="steps"> - <li><a class="step" href="/webgli/index.pyhtml">Welcome</a></li> - <li><a class="step" href="/webgli/clientconfig.pyhtml">Client Config</a></li> - <li><a class="step" href="/webgli/partitioning.pyhtml">Partitioning</a></li> - <li><a class="step" href="/webgli/networkmounts.pyhtml">Network Mounts</a></li> - <li><a class="step" href="/webgli/stageselection.pyhtml">Stage Selection</a></li> - <li><a class="step" href="/webgli/portagetree.pyhtml">Portage Tree</a></li> - <li><a class="step" href="/webgli/globaluse.pyhtml">Global USE Flags</a></li> - <li><a class="step" href="/webgli/localuse.pyhtml">Local USE Flags</a></li> -<: if shared_info.advanced_mode: - <li><a class="step" href="/webgli/makedotconf.pyhtml">Make.conf</a></li> - <li><a class="step" href="/webgli/configfiles.pyhtml">Config Files</a></li> - <li><a class="step" href="/webgli/etc_portage.pyhtml">etc/portage</a></li> -:> - <li><a class="step" href="/webgli/kernel.pyhtml">Kernel</a></li> - <li><a class="step" href="/webgli/bootloader.pyhtml">Bootloader</a></li> - <li><a class="step" href="/webgli/timezone.pyhtml">Timezone</a></li> - <li><a class="step" href="/webgli/networking.pyhtml">Networking</a></li> - <li><a class="step" href="/webgli/daemons.pyhtml">Daemons</a></li> - <li><a class="step" href="/webgli/extrapackages.pyhtml">Extra Packages</a></li> - <li><a class="step" href="/webgli/services.pyhtml">Services</a></li> - <li><a class="step" href="/webgli/users.pyhtml">Users</a></li> - <li><a class="step" href="/webgli/review.pyhtml">Review</a></li> - </ul> - <ul id="menu"> - <li><a href="/webgli/saveprofile.pyhtml">Save Profile</a></li> - <li><a href="/webgli/loadprofile.pyhtml">Load Profile</a></li> - </ul> - </td> - <td id="content" width="100%" valign="top"> diff --git a/src/net/server/html/webgli/uribrowser.pyhtml b/src/net/server/html/webgli/uribrowser.pyhtml deleted file mode 100644 index 1a73b0f..0000000 --- a/src/net/server/html/webgli/uribrowser.pyhtml +++ /dev/null @@ -1,151 +0,0 @@ - def uribrowser(self): - formfields = { 'portage': "opener.document.portage.snapshoturi", - 'stage': "opener.document.stage.tarballuri", - 'kernel': "opener.document.kernel.configuri" } - try: - formfield = formfields[get_params['screen']] - except: - return "Parameter 'screen' was not passed" - if get_params['uritype']: - if get_params['mirror']: - uri = get_params['mirror'] - if not uri.endswith('/'): - uri += "/" - else: - if get_params['uritype'] == "file": - uri = "file://" - else: - uri = get_params['uritype'] + "://" - if get_params['username']: - uri += get_params['username'] - if get_params['password']: - uri += ":" + get_params['password'] - uri += "@" - uri += get_params['host'] - if get_params['port']: - uri += ":" + get_params['port'] - uri += (get_params['path'] or "/") - else: - uri = get_params['baseuri'] - if not uri: - uri = "file:///" - if not uri.endswith('/'): - uri = uri[:uri.rfind('/')+1] - uriparts = list(GLIUtility.parse_uri(uri)) - for i in range(len(uriparts)): - if not uriparts[i]: - uriparts[i] = "" - uritypes = { 'file': "", 'http': "", 'ftp': "", 'scp': "" } - uritypes[uriparts[0]] = " selected" - if uriparts[0] == "http": - mirrors = GLIUtility.list_mirrors(http=True, ftp=False, rsync=False) - elif uriparts[0] == "ftp": - mirrors = GLIUtility.list_mirrors(http=False, ftp=True, rsync=False) - else: - mirrors = [] - mirrorlist = "" - for mirror in mirrors: - mirrorlist += '<option value="%s">%s</option>' % (mirror[0], mirror[1]) - content = """ - <script> - function select_uri(uri) { - %s.value = document.uri.baseuri.value + uri; - window.close(); - } - - function browse_uri(uri) { - location.replace('/webgli/URIBrowser?screen=%s&baseuri=' + uri); - } - - function refresh_uri() { - //location.replace('/webgli/URIBrowser?screen=%s&uritype=' + document.uri.uritype.value + '&host=' + document.uri.host.value + '&username=' + document.uri.username.value + '&password=' + document.uri.password.value + '&port=' + document.uri.port.value + '&path=' + document.uri.path.value + '&mirror=' + document.uri.mirror.value); - document.uri.submit(); - } - - function change_uritype() { - location.replace('/webgli/URIBrowser?screen=%s&uritype=' + document.uri.uritype.value); - } - </script> - <h3>URI Browser</h3> - <form name="uri" action="/webgli/URIBrowser" method="GET"> - <input type="hidden" name="baseuri" value="%s"> - <input type="hidden" name="screen" value="%s"> - <table> - <tr> - <td width="90">URI type:</td> - <td><select name="uritype" onchange="change_uritype()"><option%s>file</option><option%s>http</option><option%s>ftp</option><option%s>scp</option></select></td> - </tr> - <tr> - <td valign="top">Host:</td> - <td><input type="text" name="host" size="30" value="%s"><br>or choose a mirror:<br><select name="mirror" onchange="document.uri.submit()"><option value=""> - </option>%s</select></td> - </tr> - <tr> - <td>Username:</td> - <td><input type="text" name="username" size="15" value="%s"></td> - </tr> - <tr> - <td>Password:</td> - <td><input type="text" name="password" size="15" value="%s"></td> - </tr> - <tr> - <td>Port:</td> - <td><input type="text" name="port" size="5" value="%s"></td> - </tr> - <tr> - <td>Path:</td> - <td><input type="text" name="path" size="30" value="%s"></td> - </tr> - <tr> - <td> </td> - <td> </td> - </tr> - <tr> - <td colspan="2"><input type="button" value="Cancel" onclick="window.close();"> <input type="button" value="Refresh" onclick="refresh_uri()"></td> - </tr> - <tr> - <td> </td> - <td> </td> - </tr> - </table> - <table>""" % (formfield, get_params['screen'], get_params['screen'], get_params['screen'], uri, get_params['screen'], uritypes['file'], uritypes['http'], uritypes['ftp'], uritypes['scp'], uriparts[3], mirrorlist, uriparts[1], uriparts[2], uriparts[4], uriparts[5]) - if not uri.endswith("/"): - uri = uri[:uri.rfind("/")+1] - try: - filelist = GLIUtility.get_directory_listing_from_uri(uri) - except: - filelist = ["There was an error loading the directory list"] - for listing in filelist: - content += " <tr>\n <td>" - if listing.endswith('/'): - content += '<img src="../folder.gif">' - else: - content += ' ' - content += '</td>\n <td><a href="#" onclick="' - if listing.endswith('/'): - listing = listing[:-1] - if listing == "..": - tmpuri = uri[:uri[:-1].rfind("/")+1] - else: - tmpuri = uri + listing + "/" - content += "browse_uri('%s')" % tmpuri - else: - content += "select_uri('%s')" % listing - content += "; return false\">%s</a></td>\n </tr>\n" % listing - - return content - - def handle(self, path): - if not shared_info.install_profile: - shared_info.install_profile = GLIInstallProfile.InstallProfile() - if not shared_info.client_profile: - shared_info.client_profile = GLIClientConfiguration.ClientConfiguration() - paths = { '/webgli': showwelcome, - '/webgli/': showwelcome, - '/webgli/ClientConfig': clientconfig, - '/webgli/saveclientconfig': saveclientconfig, - '/webgli/NetworkMounts': networkmounts, - '/webgli/savenetmounts': savenetmounts, - '/webgli/StageSelection': stageselection, - '/webgli/savestage': savestage, - '/webgli/PortageTree': portagetree, - '/webgli/Partitioning': partitioning, diff --git a/src/net/server/html/webgli/users.pyhtml b/src/net/server/html/webgli/users.pyhtml deleted file mode 100644 index 62a3735..0000000 --- a/src/net/server/html/webgli/users.pyhtml +++ /dev/null @@ -1,171 +0,0 @@ -<? include /webgli/top.pyhtml ?> -<? -error_msg = "" -if post_params: - users = {} - for user in shared_info.install_profile.get_users(): - users[user[0]] = (user[0], user[1], user[2], user[3], user[4], user[5], user[6]) - if post_params['addnewuser']: - if post_params['newusername'] and post_params['newuserpass']: - newuser = post_params['newusername'] - newuserpass = post_params['newuserpass'] - groups = () - if post_params['newusergroupsmanual']: - groups = ",".split(post_params['newusergroupsmanual']) - elif post_params['newusergroups']: - groups = post_params['newusergroups'] - if post_params['newusercomment']: - newusercomment = post_params['newusercomment'] - else: - newusercomment = "" - if post_params['newuserid']: - newuserid = post_params['newuserid'] - else: - newuserid = "" - if post_params['newuserhomedir']: - newuserhomedir = post_params['newuserhomedir'] - else: - newuserhomedir = "/home/"+newuser - if post_params['newusershell']: - newusershell = post_params['newusershell'] - else: - newusershell = "/bin/bash" - try: - new_user = [newuser, GLIUtility.hash_password(newuserpass), groups, newusershell, newuserhomedir, newuserid, newusercomment] - users[newuser] = new_user - tmpusers = [] - for user in users: - tmpusers.append(users[user]) - shared_info.install_profile.set_users(tmpusers) - except: - error_msg = "ERROR: could not set the users." - else: - error_msg = "ERROR: NO USERNAME SPECIFIED" - if post_params['rootpass1'] and post_params['rootpass2']: - if post_params['rootpass1'] == post_params['rootpass2']: - try: - shared_info.install_profile.set_root_pass_hash(None, GLIUtility.hash_password(post_params['rootpass1']), None) - except: - error_msg = "ERROR: Could not set root password!" - else: - error_msg = "ERROR: Passwords do not match!" - if post_params['setrootpass']: - try: - shared_info.install_profile.set_root_pass_hash(None, "",None) - except: - error_msg = "ERROR: Could not reset the root password!" - if post_params['userdelsubmit']: - if post_params['edituser']: - user_to_del = post_params['edituser'] - try: - del users[user_to_del] - tmpusers = [] - for user in users: - tmpusers.append(users[user]) - shared_info.install_profile.set_users(tmpusers) - except: - error_msg = "ERROR: could not set the users." - if not error_msg: - error_msg = "Values saved successfully" - -users = {} -for user in shared_info.install_profile.get_users(): -# print str(user[0]) + " " + str(user[1]) + " " + str(user[2]) + " " + str(user[3]) - users[user[0]] = (user[0], user[1], user[2], user[3], user[4], user[5], user[6]) -root_pass = shared_info.install_profile.get_root_pass_hash() -?> -<script> -function change_edituser() { - for(i=0;i<document.Users.elements.length;i++) { - if(document.Users.elements[i].name == "edituser" && document.Users.elements[i].checked) { - location.replace('/webgli/users.pyhtml?edituser='+ document.Users.elements[i].value); - } - } -} - -function verify_pass() { - if(document.Users.rootpass1.value != document.Users.rootpass2.value) { - alert("Passwords DO NOT match!"); - } else { - alert("Passwords match."); - } -} -</script> -<p>User Settings:</p> -<: if error_msg: -<br><% error_msg %><br><br> -:> -<form name="Users" method="post" action="/webgli/users.pyhtml" enctype="multipart/form-data"> -<p>Users:</p> -<table width="100%" border="1"> - <tr> - <th scope="col">Username</th> - <th scope="col">Groups</th> - <th scope="col">Shell</th> - <th scope="col">Home Directory </th> - <th scope="col">UserID</th> - <th scope="col">Comment</th> - </tr> -<: for user in users: - <tr> - <td><input name="edituser" type="radio" value="<% users[user][0] %>"><% users[user][0] %></td> - <td><% ",".join(users[user][2]) %></td> - <td><% users[user][3] %></td> - <td><% users[user][4] %></td> - <td><% users[user][5] %></td> - <td><% users[user][6] %></td> - </tr> -:> -</table><br> -<input name="usereditsubmit" type="button" value="EDIT" onclick="change_edituser()"> -<input name="userdelsubmit" type="submit" value="DELETE"> -<: if not root_pass: -<p>Root Password is not yet set! Please set it:<br> -<input name="rootpass1" type="password" id="rootpass1"> and retype to verify: -<input name="rootpass2" type="password" id="rootpass2"> -<input name="verifyrootpass" type="button" id="verifyrootpass" value="Verify!" onclick="verify_pass()"> -<input name="setrootpassword" type="submit" value="Set"></p> -<: else: -<p>Root Password is set. <input name="setrootpass" type="submit" id="setrootpass" value="Reset Root Password"></p> -:> -<: if get_params['edituser']: -<? username = get_params['edituser'] ?> -<p>Edit user <% username %>:</p> -<table width="100%" border="1"> - <tr> - <td scope="col"><p>Username:<input name="newusername" type="text" id="newusername" value="<% username %>"></p> - <p>Password (you must retype this):<input name="newuserpass" type="password"></p> - <p>Shell (optional): <input name="newusershell" type="text" value="<% users[username][3] %>"></p> - <p>Home Directory (optional): <input name="newuserhomedir" type="text" value="<% users[username][4] %>"></p> - <p>UserID Number (optional): <input name="newuserid" type="text" value="<% users[username][5] %>"></p> - <p>Comment (optional): <input name="newusercomment" type="text" value="<% users[username][6] %>"></p> - </td> - <td scope="col"><p>Groups:</p> - <p>Manually specify (comma-separate)<input name="newusergroupsmanual" type="text" value="<% ",".join(users[username][2]) %>"></p> - <input name="addnewuser" type="submit" id="addnewuser" value="Save Changes"> - </td> - </tr> -</table> -<: else: -<p>Add a new user:</p> -<table width="100%" border="1"> - <tr> - <td scope="col"><p>Username: <input name="newusername" type="text" id="newusername"></p> - <p>Password: <input name="newuserpass" type="password" id="newuserpass"></p> - <p>Shell (optional): <input name="newusershell" type="text" id="newusershell"></p> - <p>Home Directory (optional): <input name="newuserhomedir" type="text" id="newuserhomedir"></p> - <p>UserID Number (optional): <input name="newuserid" type="text" id="newuserid"></p> - <p>Comment (optional): <input name="newusercomment" type="text" id="newusercomment"></p> - </td> - <td scope="col"><p>Groups:</p> - <p><input name="newusergroups" type="checkbox" id="newusergroups" value="users"> users<br> - <input name="newusergroups" type="checkbox" id="newusergroups" value="wheel"> wheel<br> - <input name="newusergroups" type="checkbox" id="newusergroups" value="audio"> audio<br> - Manually specify (comma-separate)<input name="newusergroupsmanual" type="text" id="newusergroupsmanual"></p> - <input name="addnewuser" type="submit" id="addnewuser" value="Add New User"> - </td> - </tr> -</table> -:> -</form> -<? include /webgli/bottom.pyhtml ?> diff --git a/src/net/server/html/welcome.pyhtml b/src/net/server/html/welcome.pyhtml deleted file mode 100644 index 74cd4cf..0000000 --- a/src/net/server/html/welcome.pyhtml +++ /dev/null @@ -1,8 +0,0 @@ -<? include /main_top.pyhtml ?> - -Welcome to the Gentoo Linux Installation Management Daemon. -This application will allow you to create profiles using webgli (or another FE) -and then deploy them to multiple clients that run gliclient.py - - -<? include /main_bottom.pyhtml ?> diff --git a/src/net/server/server.pem b/src/net/server/server.pem deleted file mode 100644 index 040bc81..0000000 --- a/src/net/server/server.pem +++ /dev/null @@ -1,36 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQDW9D6FdUxYPW8yXn73oFeQaCBVE/lg0NkJMIHqxwABXZXk2+t8 -1Uerc70PoXaY9ch44jrVR9rPNJf5SVJ1begksqBgRCattUP5RHSuPWgJNFoduqRa -qgk5NV5e9+6K+Hwphv8e2oB7qUDEKB1cEsbk07FzM9z2raJihndDvbEEpwIDAQAB -AoGAUFI6HpKDMaHbMD4hQZS3w601D7WEBQplX0qx8THlLZ1zym3nI+Fqg4WfCv0x -nNySyaD3jQTpnW2wsCUW2+xyxrwdfQACrRortAHAmbmi7R5q46nNLH4kk/70L8Kp -hLsMFyJkbQM/u8GcztjBVCM09CF1aC3Q+1atCVhUL+IMJoECQQD47aEFo3kmQMsV -c7WvR1i5zgn6UmKgejspN/sbMpy8jtULZy1CAuL+NSjlfoFiP6+X2bATDbK4ig1e -aeuhIUhnAkEA3Q+IW3Dzt1Ll9FTYoI+oXPE53lr0uwz9MfWAUZfBvMKP6CjWfiEM -yK+hWU2cA6JHiKlHTVSETaeW7VlkdyG5wQJAQ1b9ZWoYvvluNuprbvRNE06isl4R -IjqOwJLNUkk5z2SQS5poyt+/CmfVHWhAlhSGavzPvgfJnlRyU2UyAg/f5wJAG+z1 -Zc/MCfGf+RCq2QWs2CjlDZDh76tBZQlFb4lDQSw277YQ+pgEPGnrcRObzN24Oaxg -xIUTvZeZOlybk20gQQJBAIOWXXUqvWAlmgPPga/719t9ilumn4I+01gB9/YjbudS -onTEfVFVdjHQAxQwJG1fvzeW878SoQekIVGrIEqD99E= ------END RSA PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIIDfjCCAuegAwIBAgIJAPpmOqeE6TPHMA0GCSqGSIb3DQEBBAUAMIGHMQswCQYD -VQQGEwJVUzERMA8GA1UECBMITWlzc291cmkxFDASBgNVBAcTC0thbnNhcyBDaXR5 -MSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDjAMBgNVBAMTBVNj -b3R0MRwwGgYJKoZIhvcNAQkBFg1ibGFoQG5vbmUuY29tMB4XDTA1MTAyOTA5MDgy -OFoXDTA2MTAyOTA5MDgyOFowgYcxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhNaXNz -b3VyaTEUMBIGA1UEBxMLS2Fuc2FzIENpdHkxITAfBgNVBAoTGEludGVybmV0IFdp -ZGdpdHMgUHR5IEx0ZDEOMAwGA1UEAxMFU2NvdHQxHDAaBgkqhkiG9w0BCQEWDWJs -YWhAbm9uZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANb0PoV1TFg9 -bzJefvegV5BoIFUT+WDQ2QkwgerHAAFdleTb63zVR6tzvQ+hdpj1yHjiOtVH2s80 -l/lJUnVt6CSyoGBEJq21Q/lEdK49aAk0Wh26pFqqCTk1Xl737or4fCmG/x7agHup -QMQoHVwSxuTTsXMz3PatomKGd0O9sQSnAgMBAAGjge8wgewwHQYDVR0OBBYEFAgk -EOg3PfgEgV7XIcx1dXCr+agHMIG8BgNVHSMEgbQwgbGAFAgkEOg3PfgEgV7XIcx1 -dXCr+agHoYGNpIGKMIGHMQswCQYDVQQGEwJVUzERMA8GA1UECBMITWlzc291cmkx -FDASBgNVBAcTC0thbnNhcyBDaXR5MSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRz -IFB0eSBMdGQxDjAMBgNVBAMTBVNjb3R0MRwwGgYJKoZIhvcNAQkBFg1ibGFoQG5v -bmUuY29tggkA+mY6p4TpM8cwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOB -gQBQeJPOJ2G2lWVFEni7tL+4ooLNFhLWKNkw5kEnoDUSRvZuLmR/XkRbIgydfTzJ -HjE64R//vK/6QWz84tq1HLyN8MmrutRtJ/2HmpEiYlWUEhCZhzb/kmuSg99aHqdZ -UZ+ZBbIuRvwSjdolzgr1daota+vEON6Md3ghJiIGdne7+g== ------END CERTIFICATE----- diff --git a/src/net/server/template.html b/src/net/server/template.html deleted file mode 100644 index 572a4be..0000000 --- a/src/net/server/template.html +++ /dev/null @@ -1,41 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <title>Master GLI Server Setup</title> -</head> -<body> -<table cellpadding="0" cellspacing="5"> - <tr> - <td width=130>Picture here. Gentoo Logo</td> - <td><img src="/banner-800x64.png"></td> - </tr> - <tr> - <td valign-"top"> - <!-- Left hand column starts here --> - <p><a href="/welcome">Welcome</a></p> - <p>Profiles:<br> - <a href="mastergli.php?page=CreateProfile">Create</a><br> - <a href="mastergli.php?page=EditProfile">Edit</a><br> - <a href="mastergli.php?page=DeleteProfile">Delete</a></p> - <p>Clients:<br> - <a href="mastergli.php?page=AddClient">Add Client</a><br> - <a href="/showclients">Manage</a><br> - <a href="mastergli.php?page=DeleteClient">Delete</a></p> - <p>Install:<br> - <a href="mastergli.php?page=Configure">Configure</a><br> - <a href="mastergli.php?page=Execute">Execute</a><br> - <a href="mastergli.php?page=Status">Status</a></p> - <p>Master Server:<br> - <a href="/loadprofile">Load Profile</a><br> - <a href="/saveprofile">Save Profile</a></p> - </p> - </td> - <td valign="top"> -Main content - </td> - </tr> -</table> -</body> -</html> - diff --git a/src/net/server/webgli_template.html b/src/net/server/webgli_template.html deleted file mode 100644 index fb2af15..0000000 --- a/src/net/server/webgli_template.html +++ /dev/null @@ -1,116 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <title>Web GLI Profile Setup</title> - <style type="text/css"> - <!-- - html { - margin: 0; - } - body { - margin: 0; - font-family: Bitstream Vera Sans, Helvetica, Sans; - font-size: 10pt; - } - table { - border-spacing: 0; - } - td { - padding: 0; - } - ul { - margin: 0; - padding: 0; - } - li { - display: block; - border-left: 1px solid #a8a8a8; - border-right: 1px solid #a8a8a8; - border-bottom: 1px solid #a8a8a8; - } - #menu { - border-top: 1px solid #a8a8a8; - } - #steps li a { - display: block; - padding: 1px; - text-decoration: none; - color: #7b68ee; - } - #steps li a:hover { - background-color: #7b68ee; - color: #000000; - } - .currentstep { - padding: 1px; - color: #000000; - } - #menu li a { - display: block; - padding: 1px; - text-decoration: none; - color: #7b68ee; - } - #menu li a:hover { - background-color: #7b68ee; - color: #000000; - } - #content { - padding: 7px; - } - --> - </style> -</head> -<body> - -<table id="layout" width="100%" height="100%" cellspacing="0" cellpadding="0"> - <tr id="header"> - <td width="150"> - <img src="/images/header_bg.png" width="100%" height="64"> - </td> - <td width="400"> - <img src="/images/header.png" alt="Gentoo Linux Installer" width="400" height="64"> - </td> - <td> - <img src="/images/header_bg.png" width="100%" height="64"> - </td> - </tr> - <tr> - <td valign="top"> - <ul id="steps"> - <li><a href="/webgli/index.pyhtml">Welcome</a></li> - <li><a href="/webgli/clientconfig.pyhtml">Client Config</a></li> - <li><a href="/webgli/partitioning.pyhtml">Partitioning</a></li> - <li><a href="/webgli/networkmounts.pyhtml">Network Mounts</a></li> - <li><a href="/webgli/stageselection.pyhtml">Stage Selection</a></li> - <li><a href="/webgli/portagetree.pyhtml">Portage Tree</a></li> - <li><a href="/webgli/globaluse.pyhtml">Global USE Flags</a></li> - <li><a href="/webgli/localuse.pyhtml">Local USE Flags</a></li> - <li><a href="/webgli/makedotconf.pyhtml">Make.conf</a></li> - <li><a href="/webgli/configfiles.pyhtml">Config Files</a></li> - <li><a href="/webgli/etc_portage.pyhtml">etc/portage</a></li> - <li><a href="/webgli/kernel.pyhtml">Kernel</a></li> - <li><a href="/webgli/bootloader.pyhtml">Bootloader</a></li> - <li><a href="/webgli/timezone.pyhtml">Timezone</a></li> - <li><a href="/webgli/networking.pyhtml">Networking</a></li> - <li><a href="/webgli/daemons.pyhtml">Daemons</a></li> - <li><a href="/webgli/extrapackages.pyhtml">Extra Packages</a></li> - <li><a href="/webgli/services.pyhtml">Services</a></li> - <li><a href="/webgli/users.pyhtml">Users</a></li> - <li><a href="/webgli/review.pyhtml">Review</a></li> - </ul> - <p></p> - <ul id="menu"> - <li><a href="/webgli/saveprofile.pyhtml">Save Profile</a></li> - <li><a href="/webgli/loadprofile.pyhtml">Load Profile</a></li> - </ul> - </td> - <td id="content" valign="top" colspan="2"> -Main content - </td> - </tr> -</table> - -</body> -</html> diff --git a/src/templates/amd64ArchitectureTemplate.py b/src/templates/amd64ArchitectureTemplate.py index b5c02fc..3c5a406 100644 --- a/src/templates/amd64ArchitectureTemplate.py +++ b/src/templates/amd64ArchitectureTemplate.py @@ -21,8 +21,8 @@ from GLIException import * import parted class amd64ArchitectureTemplate(x86ArchitectureTemplate): - def __init__(self,configuration=None, install_profile=None, client_controller=None): - x86ArchitectureTemplate.__init__(self, configuration, install_profile, client_controller) + def __init__(self,install_profile=None, client_controller=None): + x86ArchitectureTemplate.__init__(self, install_profile, client_controller) self._architecture_name = 'amd64' """ @@ -33,7 +33,7 @@ class amd64ArchitectureTemplate(x86ArchitectureTemplate): # This is the amd64 way.. it uses grub but must do it staticly. if self._install_profile.get_boot_loader_pkg(): - exitstatus = self._portage.emerge(self._install_profile.get_boot_loader_pkg()) + exitstatus = self._portage.emerge(self._install_profile.get_boot_loader_pkg(), self._install_profile.get_grp_install()) else: pass diff --git a/src/templates/ppcArchitectureTemplate.py b/src/templates/ppcArchitectureTemplate.py index 4123cec..6db4f93 100644 --- a/src/templates/ppcArchitectureTemplate.py +++ b/src/templates/ppcArchitectureTemplate.py @@ -18,7 +18,7 @@ from GLIException import * import parted class ppcArchitectureTemplate(ArchitectureTemplate): - def __init__(self,configuration=None, install_profile=None, client_controller=None): + def __init__(self,install_profile=None, client_controller=None): ArchitectureTemplate.__init__(self, configuration, install_profile, client_controller) self._architecture_name = 'ppc' diff --git a/src/templates/x86ArchitectureTemplate.py b/src/templates/x86ArchitectureTemplate.py index 290dc34..212d1a6 100644 --- a/src/templates/x86ArchitectureTemplate.py +++ b/src/templates/x86ArchitectureTemplate.py @@ -17,8 +17,8 @@ from GLIArchitectureTemplate import ArchitectureTemplate from GLIException import * class x86ArchitectureTemplate(ArchitectureTemplate): - def __init__(self,configuration=None, install_profile=None, client_controller=None): - ArchitectureTemplate.__init__(self, configuration, install_profile, client_controller) + def __init__(self, install_profile=None, client_controller=None): + ArchitectureTemplate.__init__(self, install_profile, client_controller) self._architecture_name = 'x86' self._kernel_bzimage = "arch/i386/boot/bzImage" @@ -32,7 +32,7 @@ class x86ArchitectureTemplate(ArchitectureTemplate): # first install bootloader if bootloader_pkg and bootloader_pkg.lower() != "none": - exitstatus = self._portage.emerge(bootloader_pkg) + exitstatus = self._portage.emerge(bootloader_pkg, self._install_profile.get_grp_install()) # if not GLIUtility.exitsuccess(exitstatus): # raise GLIException("BootLoaderEmergeError", 'fatal', 'install_bootloader', "Could not emerge bootloader!") # else: @@ -137,22 +137,23 @@ class x86ArchitectureTemplate(ArchitectureTemplate): self.foundboot = False - parts = self._install_profile.get_partition_tables() - for device in parts: - tmp_partitions = parts[device] #.get_install_profile_structure() - for partition in tmp_partitions: - mountpoint = tmp_partitions[partition]['mountpoint'] - if (mountpoint == "/boot"): - self.foundboot = True - if (( (mountpoint == "/") and (not self.foundboot) ) or (mountpoint == "/boot")): - self.boot_minor = str(int(tmp_partitions[partition]['minor'])) - self.grub_boot_minor = str(int(tmp_partitions[partition]['minor']) - 1) - self.boot_device = device - self.mbr_device = device - if mountpoint == "/": - self.root_minor = str(int(tmp_partitions[partition]['minor'])) - self.grub_root_minor = str(int(tmp_partitions[partition]['minor']) - 1) - self.root_device = device + mounts = self._install_profile.get_mounts() + for mount in mounts: + if mount['type'] == "linux-swap": + continue + mountpoint = mount['mountpoint'] + if (mountpoint == "/boot"): + self.foundboot = True + if (( (mountpoint == "/") and (not self.foundboot) ) or (mountpoint == "/boot")): + self.boot_minor = mount['devnode'][-1] + self.grub_boot_minor = str(int(self.boot_minor) - 1) + self.boot_device = mount['devnode'][:-1] + self.mbr_device = mount['devnode'][:-1] + if mountpoint == "/": + self.root_minor = mount['devnode'][-1] + self.grub_root_minor = str(int(self.root_minor) - 1) + self.root_device = mount['devnode'][:-1] + #RESET the boot device if one is stored already if self._install_profile.get_boot_device(): self.mbr_device = self._install_profile.get_boot_device() @@ -166,14 +167,12 @@ class x86ArchitectureTemplate(ArchitectureTemplate): raise GLIException("BootloaderError", 'fatal', '_gather_grub_drive_info',"Couldn't find the drive num in the list from the device.map") def _grub_add_windows(self, newgrubconf): - parts = self._install_profile.get_partition_tables() - for device in parts: - tmp_partitions = parts[device] #.get_install_profile_structure() - for partition in tmp_partitions: - if (tmp_partitions[partition]['type'] == "fat32") or (tmp_partitions[partition]['type'] == "ntfs"): - grub_dev = self._map_device_to_grub_device(device) - newgrubconf += "\ntitle=Possible Windows P"+str(int(tmp_partitions[partition]['minor']))+"\n" - newgrubconf += "rootnoverify ("+grub_dev+","+str(int(tmp_partitions[partition]['minor'] -1))+")\n" + mounts = self._install_profile.get_mounts() + for mount in mounts: + if (mount['type'] == "fat32") or (mount['type'] == "ntfs"): + grub_dev = self._map_device_to_grub_device(mount['devnode'][:-1]) + newgrubconf += "\ntitle=Possible Windows P"+str(mount['devnode'])+"\n" + newgrubconf += "rootnoverify ("+grub_dev+","+str(int(mount['devnode'][-1] -1))+")\n" newgrubconf += "makeactive\nchainloader +1\n\n" return newgrubconf @@ -246,33 +245,29 @@ class x86ArchitectureTemplate(ArchitectureTemplate): #Assign root to the root mount point to make lines more readable root = self._chroot_dir self.foundboot = False - parts = self._install_profile.get_partition_tables() - for device in parts: - tmp_partitions = parts[device] #.get_install_profile_structure() - for partition in tmp_partitions: - mountpoint = tmp_partitions[partition]['mountpoint'] - if (mountpoint == "/boot"): - self.foundboot = True - if (( (mountpoint == "/") and (not self.foundboot) ) or (mountpoint == "/boot")): - self.boot_minor = str(int(tmp_partitions[partition]['minor'])) - self.boot_device = device - self.mbr_device = device - if mountpoint == "/": - self.root_minor = str(int(tmp_partitions[partition]['minor'])) - self.root_device = device + mounts = self._install_profile.get_mounts() + for mount in mounts: + mountpoint = mount['mountpoint'] + if (mountpoint == "/boot"): + self.foundboot = True + if (( (mountpoint == "/") and (not self.foundboot) ) or (mountpoint == "/boot")): + self.boot_minor = str(mount['devnode'][-1]) + self.boot_device = mount['devnode'][:-1] + self.mbr_device = mount['devnode'][:-1] + if mountpoint == "/": + self.root_minor = str(mount['devnode'][-1]) + self.root_device = mount['devnode'][:-1] #RESET the boot device if one is stored already if self._install_profile.get_boot_device(): self.mbr_device = self._install_profile.get_boot_device() self._logger.log("Found a mbr device: " + self.mbr_device) def _lilo_add_windows(self, newliloconf): - parts = self._install_profile.get_partition_tables() - for device in parts: - tmp_partitions = parts[device] #.get_install_profile_structure() - for partition in tmp_partitions: - if (tmp_partitions[partition]['type'] == "fat32") or (tmp_partitions[partition]['type'] == "ntfs"): - newliloconf += "other="+device+str(int(tmp_partitions[partition]['minor']))+"\n" - newliloconf += "label=Windows_P"+str(int(tmp_partitions[partition]['minor']))+"\n\n" + mounts = self._install_profile.get_mounts() + for mount in mounts: + if (mount['type'] == "fat32") or (mount['type'] == "ntfs"): + newliloconf += "other="+str(mount['devnode'])+"\n" + newliloconf += "label=Windows_P"+str(mount['devnode'][-1])+"\n\n" return newliloconf def _map_device_to_grub_device(self, device): @@ -297,7 +292,7 @@ class x86ArchitectureTemplate(ArchitectureTemplate): for i in range(len(file)): if file[i][6:-1] == device: return file[i][1:4] - raise GLIException("BootloaderError", 'fatal', '_map_device_to_grub_device', "ERROR, could not map "+device+" to anything in the device map") + raise GLIException("BootloaderError", 'fatal', '_map_device_to_grub_device', "ERROR, could not map"+device+" to anything in the device map") def setup_and_run_bootloader(self): bootloader_pkg = self._install_profile.get_boot_loader_pkg() |