package any; # $Id$ use diagnostics; use strict; #-###################################################################################### #- misc imports #-###################################################################################### use common; use detect_devices; use partition_table; use fs::type; use lang; use run_program; use devices; use modules; use log; use fs; use c; sub facesdir() { "$::prefix/usr/share/mdk/faces/"; } sub face2png { my ($face) = @_; facesdir() . $face . ".png"; } sub facesnames() { my $dir = facesdir(); my @l = grep { /^[A-Z]/ } all($dir); map { if_(/(.*)\.png/, $1) } (@l ? @l : all($dir)); } sub addKdmIcon { my ($user, $icon) = @_; my $dest = "$::prefix/usr/share/faces/$user.png"; eval { cp_af(facesdir() . $icon . ".png", $dest) } if $icon; } sub alloc_user_faces { my ($users) = @_; my @m = my @l = facesnames(); foreach (grep { !$_->{icon} || $_->{icon} eq "automagic" } @$users) { $_->{auto_icon} = splice(@m, rand(@m), 1); #- known biased (see cookbook for better) log::l("auto_icon is $_->{auto_icon}"); @m = @l unless @m; } } sub create_user { my ($u, $isMD5) = @_; my @existing = stat("$::prefix/home/$u->{name}"); if (!getpwnam($u->{name})) { my $uid = $u->{uid} || $existing[4]; if ($uid && getpwuid($uid)) { undef $uid; #- suggested uid already in use } my $gid = $u->{gid} || $existing[5] || int getgrnam($u->{name}); if ($gid) { if (getgrgid($gid)) { undef $gid if getgrgid($gid) ne $u->{name}; } else { run_program::rooted($::prefix, 'groupadd', '-g', $gid, $u->{name}); } } elsif ($u->{rename_from}) { run_program::rooted($::prefix, 'groupmod', '-n', $u->{name}, $u->{rename_from}); } require authentication; my $symlink_home_from = $u->{rename_from} && (getpwnam($u->{rename_from}))[7]; run_program::raw({ root => $::prefix, sensitive_arguments => 1 }, ($u->{rename_from} ? 'usermod' : 'adduser'), '-p', authentication::user_crypted_passwd($u, $isMD5), if_($uid, '-u', $uid), if_($gid, '-g', $gid), if_($u->{realname}, '-c', $u->{realname}), if_($u->{home}, '-d', $u->{home}, if_($u->{rename_from}, '-m')), if_($u->{shell}, '-s', $u->{shell}), ($u->{rename_from} ? ('-l', $u->{name}, $u->{rename_from}) : $u->{name})); symlink($u->{home}, $symlink_home_from) if $symlink_home_from; } my (undef, undef, $uid, $gid, undef, undef, undef, $home) = getpwnam($u->{name}); if (@existing && $::isInstall && ($uid != $existing[4] || $gid != $existing[5])) { log::l("chown'ing $home from $existing[4].$existing[5] to $uid.$gid"); eval { common::chown_('recursive', $uid, $gid, "$::prefix$home") }; } } sub add_users { my ($users, $authentication) = @_; alloc_user_faces($users); foreach (@$users) { create_user($_, $authentication->{md5}); run_program::rooted($::prefix, "usermod", "-G", join(",", @{$_->{groups}}), $_->{name}) if !is_empty_array_ref($_->{groups}); addKdmIcon($_->{name}, delete $_->{auto_icon} || $_->{icon}); } } sub install_acpi_pkgs { my ($do_pkgs, $b) = @_; my $acpi = bootloader::get_append_with_key($b, 'acpi'); my $use_acpi = !member($acpi, 'off', 'ht'); if ($use_acpi) { $do_pkgs->ensure_is_installed('acpi', '/usr/bin/acpi', $::isInstall); $do_pkgs->ensure_is_installed('acpid', '/usr/sbin/acpid', $::isInstall); } require services; services::set_status($_, $use_acpi, $::isInstall) foreach qw(acpi acpid); } sub setupBootloaderBeforeStandalone { my ($do_pkgs, $b, $all_hds, $fstab) = @_; require keyboard; my $keyboard = keyboard::read_or_default(); my $allow_fb = listlength(cat_("/proc/fb")); my $cmdline = cat_('/proc/cmdline'); my $vga_fb = first($cmdline =~ /\bvga=(\S+)/); my $quiet = $cmdline =~ /\bsplash=silent\b/; setupBootloaderBefore($do_pkgs, $b, $all_hds, $fstab, $keyboard, $allow_fb, $vga_fb, $quiet); } sub setupBootloaderBefore { my ($do_pkgs, $bootloader, $all_hds, $fstab, $keyboard, $allow_fb, $vga_fb, $quiet) = @_; require bootloader; #- auto_install backward compatibility #- one should now use {message_text} if ($bootloader->{message} =~ m!^[^/]!) { $bootloader->{message_text} = delete $bootloader->{message}; } #- remove previous ide-scsi lines bootloader::modify_append($bootloader, sub { my ($_simple, $dict) = @_; @$dict = grep { $_->[1] ne 'ide-scsi' } @$dict; }); if (cat_("/proc/cmdline") =~ /mem=nopentium/) { bootloader::set_append_with_key($bootloader, mem => 'nopentium'); } if (cat_("/proc/cmdline") =~ /\b(pci)=(\S+)/) { bootloader::set_append_with_key($bootloader, $1, $2); } if (my ($acpi) = cat_("/proc/cmdline") =~ /\bacpi=(\w+)/) { if ($acpi eq 'ht') { #- the user is using the default, which may not be the best my $year = detect_devices::computer_info()->{BIOS_Year}; if ($year >= 2002) { log::l("forcing ACPI on recent bios ($year)"); $acpi = ''; } } bootloader::set_append_with_key($bootloader, acpi => $acpi); } if (cat_("/proc/cmdline") =~ /\bnoapic/) { bootloader::set_append_simple($bootloader, 'noapic'); } if (cat_("/proc/cmdline") =~ /\bnoresume/) { bootloader::set_append_simple($bootloader, 'noresume'); } elsif (bootloader::get_append_simple($bootloader, 'noresume')) { } else { my ($MemTotal) = cat_("/proc/meminfo") =~ /^MemTotal:\s*(\d+)/m; if (my ($biggest_swap) = sort { $b->{size} <=> $a->{size} } grep { isSwap($_) } @$fstab) { log::l("MemTotal: $MemTotal < ", $biggest_swap->{size} / 2); if ($MemTotal < $biggest_swap->{size} / 2) { bootloader::set_append_with_key($bootloader, resume => devices::make($biggest_swap->{device})); } } } #- check for valid fb mode to enable a default boot with frame buffer. my $vga = $allow_fb && (!detect_devices::matching_desc__regexp('3D Rage LT') && !detect_devices::matching_desc__regexp('Rage Mobility [PL]') && !detect_devices::matching_desc__regexp('i740') && !detect_devices::matching_desc__regexp('Matrox') && !detect_devices::matching_desc__regexp('Tseng.*ET6\d00') && !detect_devices::matching_desc__regexp('SiS.*SG86C2.5') && !detect_devices::matching_desc__regexp('SiS.*559[78]') && !detect_devices::matching_desc__regexp('SiS.*300') && !detect_devices::matching_desc__regexp('SiS.*540') && !detect_devices::matching_desc__regexp('SiS.*6C?326') && !detect_devices::matching_desc__regexp('SiS.*6C?236') && !detect_devices::matching_desc__regexp('Voodoo [35]|Voodoo Banshee') && #- 3d acceleration seems to bug in fb mode !detect_devices::matching_desc__regexp('828[14][05].* CGC') #- i810 & i845 now have FB support during install but we disable it afterwards ); my $force_vga = $allow_fb && (detect_devices::matching_desc__regexp('SiS.*630') || #- SiS 630 need frame buffer. detect_devices::matching_desc__regexp('GeForce.*Integrated') #- needed for fbdev driver (hack). ); #- propose the default fb mode for kernel fb, if aurora or bootsplash is installed. my $need_fb = $do_pkgs->are_installed('bootsplash'); bootloader::suggest($bootloader, $all_hds, vga_fb => ($force_vga || $vga && $need_fb) && $vga_fb, quiet => $quiet); $bootloader->{keytable} ||= keyboard::keyboard2kmap($keyboard); } sub setupBootloader { my ($in, $b, $all_hds, $fstab, $security) = @_; require bootloader; general: { local $::Wizard_no_previous = 1 if $::isStandalone; setupBootloader__general($in, $b, $all_hds, $fstab, $security) or return 0; } setupBootloader__boot_bios_drive($in, $b, $all_hds->{hds}) or goto general; { local $::Wizard_finished = 1 if $::isStandalone; setupBootloader__entries($in, $b, $all_hds, $fstab) or goto general; } 1; } sub setupBootloaderUntilInstalled { my ($in, $b, $all_hds, $fstab, $security) = @_; do { my $before = fs::fstab_to_string($all_hds); setupBootloader($in, $b, $all_hds, $fstab, $security) or $in->exit; if ($before ne fs::fstab_to_string($all_hds)) { #- for /tmp using tmpfs when "clean /tmp" is chosen fs::write_fstab($all_hds); } } while !installBootloader($in, $b, $all_hds); } sub installBootloader { my ($in, $b, $all_hds) = @_; return if detect_devices::is_xbox(); install_acpi_pkgs($in->do_pkgs, $b); eval { run_program::rooted($::prefix, 'echo | lilo -u') } if $::isInstall && !$::o->{isUpgrade} && -e "$::prefix/etc/lilo.conf" && glob("$::prefix/boot/boot.*"); retry: eval { my $_w = $in->wait_message(N("Please wait"), N("Bootloader installation in progress")); bootloader::install($b, $all_hds); }; if (my $err = $@) { $err =~ /wizcancel/ and return; $err =~ s/^\w+ failed// or die; $err = formatError($err); while ($err =~ s/^Warning:.*//m) {} if (my ($dev) = $err =~ /^Reference:\s+disk\s+"(.*?)".*^Is the above disk an NT boot disk?/ms) { if ($in->ask_yesorno('', formatAlaTeX(N("LILO wants to assign a new Volume ID to drive %s. However, changing the Volume ID of a Windows NT, 2000, or XP boot disk is a fatal Windows error. This caution does not apply to Windows 95 or 98, or to NT data disks. Assign a new Volume ID?", $dev)))) { $b->{force_lilo_answer} = 'n'; } else { $b->{'static-bios-codes'} = 1; } goto retry; } else { $in->ask_warn('', [ N("Installation of bootloader failed. The following error occurred:"), $err ]); return; } } elsif (arch() =~ /ppc/) { if (detect_devices::get_mac_model() !~ /IBM/) { my $of_boot = bootloader::dev2yaboot($b->{boot}); $in->ask_warn('', N("You may need to change your Open Firmware boot-device to\n enable the bootloader. If you do not see the bootloader prompt at\n reboot, hold down Command-Option-O-F at reboot and enter:\n setenv boot-device %s,\\\\:tbxi\n Then type: shut-down\nAt your next boot you should see the bootloader prompt.", $of_boot)); } } 1; } sub setupBootloader_simple { my ($in, $b, $all_hds, $fstab, $security) = @_; my $hds = $all_hds->{hds}; require bootloader; my $mixed_kind_of_disks = bootloader::mixed_kind_of_disks($hds); #- full expert questions when there is 2 kind of disks #- it would need a semi_auto asking on which drive the bios boots... $mixed_kind_of_disks || $b->{bootUnsafe} || arch() =~ /ppc/ or return 1; #- default is good enough if (!$mixed_kind_of_disks && arch() !~ /ia64/) { setupBootloader__mbr_or_not($in, $b, $hds, $fstab) or return 0; } else { general: setupBootloader__general($in, $b, $all_hds, $fstab, $security) or return 0; } setupBootloader__boot_bios_drive($in, $b, $hds) or goto general; 1; } sub setupBootloader__boot_bios_drive { my ($in, $b, $hds) = @_; bootloader::mixed_kind_of_disks($hds) && $b->{boot} =~ /\d$/ && #- on a partition is_empty_hash_ref($b->{bios}) && #- some bios mapping already there arch() !~ /ppc/ or return 1; log::l("mixed_kind_of_disks"); my $hd = $in->ask_from_listf('', N("You decided to install the bootloader on a partition. This implies you already have a bootloader on the hard drive you boot (eg: System Commander). On which drive are you booting?"), \&partition_table::description, $hds) or return 0; log::l("mixed_kind_of_disks chosen $hd->{device}"); $b->{first_hd_device} = "/dev/$hd->{device}"; 1; } sub setupBootloader__mbr_or_not { my ($in, $b, $hds, $fstab) = @_; if (arch() =~ /ppc/) { if (defined $partition_table::mac::bootstrap_part) { $b->{boot} = $partition_table::mac::bootstrap_part; log::l("set bootstrap to $b->{boot}"); } else { die "no bootstrap partition - yaboot.conf creation failed"; } } else { my $floppy = detect_devices::floppy(); my @l = ( [ N("First sector of drive (MBR)") => '/dev/' . $hds->[0]{device} ], [ N("First sector of the root partition") => '/dev/' . fs::get::root($fstab, 'boot')->{device} ], if_($floppy, [ N("On Floppy") => "/dev/$floppy" ], ), [ N("Skip") => '' ], ); my $default = find { $_->[1] eq $b->{boot} } @l; $in->ask_from_({ title => N("LILO/grub Installation"), icon => 'banner-bootL', messages => N("Where do you want to install the bootloader?"), interactive_help_id => 'setupBootloaderBeginner', }, [ { val => \$default, list => \@l, format => sub { $_[0][0] }, type => 'list' } ]); my $new_boot = $default->[1] or return; #- remove bios mapping if the user changed the boot device delete $b->{bios} if $new_boot ne $b->{boot}; $b->{boot} = $new_boot; } 1; } sub setupBootloader__general { my ($in, $b, $all_hds, $fstab, $security) = @_; return if detect_devices::is_xbox(); my @method_choices = bootloader::method_choices($all_hds); my $prev_force_acpi = my $force_acpi = bootloader::get_append_with_key($b, 'acpi') !~ /off|ht/; my $prev_enable_apic = my $enable_apic = !bootloader::get_append_simple($b, 'noapic'); my $prev_enable_lapic = my $enable_lapic = !bootloader::get_append_simple($b, 'nolapic'); my $memsize = bootloader::get_append_memsize($b); my $prev_clean_tmp = my $clean_tmp = any { $_->{mntpoint} eq '/tmp' } @{$all_hds->{special} ||= []}; my $prev_boot = $b->{boot}; my $prev_method = $b->{method}; $b->{password2} ||= $b->{password} ||= ''; $::Wizard_title = N("Boot Style Configuration"); if (arch() !~ /ppc/) { my (@boot_devices, %boot_devices); foreach (bootloader::allowed_boot_parts($b, $all_hds)) { my $dev = "/dev/$_->{device}"; push @boot_devices, $dev; $boot_devices{$dev} = $_->{info} ? "$dev ($_->{info})" : $dev; } $in->ask_from_({ #messages => N("Bootloader main options"), title => N("Bootloader main options"), icon => 'banner-bootL', interactive_help_id => 'setupBootloader', }, [ #title => N("Bootloader main options"), { label => N("Bootloader"), title => 1 }, { label => N("Bootloader to use"), val => \$b->{method}, list => \@method_choices, format => \&bootloader::method2text }, if_(arch() !~ /ia64/, { label => N("Boot device"), val => \$b->{boot}, list => \@boot_devices, format => sub { $boot_devices{$_[0]} } }, ), { label => N("Main options"), title => 1 }, { label => N("Delay before booting default image"), val => \$b->{timeout} }, { text => N("Enable ACPI"), val => \$force_acpi, type => 'bool' }, { text => N("Enable APIC"), val => \$enable_apic, type => 'bool', advanced => 1, disabled => sub { !$enable_lapic } }, { text => N("Enable Local APIC"), val => \$enable_lapic, type => 'bool', advanced => 1 }, if_($security >= 4 || $b->{password} || $b->{restricted}, { label => N("Password"), val => \$b->{password}, hidden => 1, validate => sub { my $ok = $b->{password} eq $b->{password2} or $in->ask_warn('', [ N("The passwords do not match"), N("Please try again") ]); my $ok2 = !($b->{password} && $b->{method} eq 'grub-graphic') or $in->ask_warn('', N("You can not use a password with %s", bootloader::method2text($b->{method}))); $ok && $ok2; } }, { label => N("Password (again)"), val => \$b->{password2}, hidden => 1 }, { text => N("Restrict command line options"), val => \$b->{restricted}, type => "bool", text => N("restrict"), validate => sub { my $ok = !$b->{restricted} || $b->{password} or $in->ask_warn('', N("Option ``Restrict command line options'' is of no use without a password")); $ok } }, ), { text => N("Clean /tmp at each boot"), val => \$clean_tmp, type => 'bool', advanced => 1 }, { label => N("Precise RAM size if needed (found %d MB)", availableRamMB()), val => \$memsize, advanced => 1, validate => sub { my $ok = !$memsize || $memsize =~ /^\d+K$/ || $memsize =~ s/^(\d+)M?$/$1M/i or $in->ask_warn('', N("Give the ram size in MB")); $ok } }, ]) or return 0; } else { $b->{boot} = $partition_table::mac::bootstrap_part; $in->ask_from_({ messages => N("Bootloader main options"), title => N("Bootloader main options"), icon => 'banner-bootL', interactive_help_id => 'setupYabootGeneral', }, [ { label => N("Bootloader to use"), val => \$b->{method}, list => \@method_choices, format => \&bootloader::method2text }, { label => N("Init Message"), val => \$b->{'init-message'} }, { label => N("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } (grep { isAppleBootstrap($_) } @$fstab)) ] }, { label => N("Open Firmware Delay"), val => \$b->{delay} }, { label => N("Kernel Boot Timeout"), val => \$b->{timeout} }, { label => N("Enable CD Boot?"), val => \$b->{enablecdboot}, type => "bool" }, { label => N("Enable OF Boot?"), val => \$b->{enableofboot}, type => "bool" }, { label => N("Default OS?"), val => \$b->{defaultos}, list => [ 'linux', 'macos', 'macosx', 'darwin' ] }, ]) or return 0; } #- remove bios mapping if the user changed the boot device delete $b->{bios} if $b->{boot} ne $prev_boot; if ($b->{boot} =~ m!/dev/md\d+$!) { $b->{'raid-extra-boot'} = 'mbr'; } else { delete $b->{'raid-extra-boot'} if $b->{'raid-extra-boot'} eq 'mbr'; } bootloader::ensure_pkg_is_installed($in->do_pkgs, $b) or goto &setupBootloader__general; bootloader::suggest_message_text($b) if ! -e "$::prefix/boot/message-text"; #- in case we switch from grub to lilo bootloader::set_append_memsize($b, $memsize); if ($prev_force_acpi != $force_acpi) { bootloader::set_append_with_key($b, acpi => ($force_acpi ? '' : 'ht')); } if ($prev_enable_apic != $enable_apic) { ($enable_apic ? \&bootloader::remove_append_simple : \&bootloader::set_append_simple)->($b, 'noapic'); } if ($prev_enable_lapic != $enable_lapic) { ($enable_lapic ? \&bootloader::remove_append_simple : \&bootloader::set_append_simple)->($b, 'nolapic'); } if ($prev_clean_tmp != $clean_tmp) { if ($clean_tmp && !fs::get::has_mntpoint('/tmp', $all_hds)) { push @{$all_hds->{special}}, { device => 'none', mntpoint => '/tmp', fs_type => 'tmpfs' }; } else { @{$all_hds->{special}} = grep { $_->{mntpoint} ne '/tmp' } @{$all_hds->{special}}; } } if (bootloader::main_method($prev_method) eq 'lilo' && bootloader::main_method($b->{method}) eq 'grub') { log::l("switching for lilo to grub, ensure we don't read lilo.conf anymore"); renamef("$::prefix/etc/lilo.conf", "$::prefix/etc/lilo.conf.unused"); } 1; } sub setupBootloader__entries { my ($in, $b, $all_hds, $fstab) = @_; require Xconfig::resolution_and_depth; my $Modify = sub { require network::network; #- to list network profiles my ($e) = @_; my $default = my $old_default = $e->{label} eq $b->{default}; my $vga = Xconfig::resolution_and_depth::from_bios($e->{vga}); my ($append, $netprofile) = bootloader::get_append_netprofile($e); my %hd_infos = map { $_->{device} => $_->{info} } fs::get::hds($all_hds); my %root_descr = map { my $info = delete $hd_infos{$_->{rootDevice}}; my $dev = "/dev/$_->{device}"; my $info_ = $info ? "$dev ($info)" : $dev; ($dev => $info_, fs::wild_device::from_part('', $_) => $info_); } @$fstab; my @l; if ($e->{type} eq "image") { @l = ( { label => N("Image"), val => \$e->{kernel_or_dev}, list => [ map { "/boot/$_" } bootloader::installed_vmlinuz() ], not_edit => 0 }, { label => N("Root"), val => \$e->{root}, list => [ map { fs::wild_device::from_part('', $_) } @$fstab ], format => sub { $root_descr{$_[0]} } }, { label => N("Append"), val => \$append }, if_($e->{xen}, { label => N("Xen append"), val => \$e->{xen_append} } ), if_(arch() !~ /ppc|ia64/, { label => N("Video mode"), val => \$vga, list => [ '', Xconfig::resolution_and_depth::bios_vga_modes() ], format => \&Xconfig::resolution_and_depth::to_string, advanced => 1 }, ), { label => N("Initrd"), val => \$e->{initrd}, list => [ map { if_(/^initrd/, "/boot/$_") } all("$::prefix/boot") ], not_edit => 0, advanced => 1 }, { label => N("Network profile"), val => \$netprofile, list => [ sort(uniq('', $netprofile, network::network::netprofile_list())) ], advanced => 1 }, ); } else { @l = ( { label => N("Root"), val => \$e->{kernel_or_dev}, list => [ map { "/dev/$_->{device}" } @$fstab, detect_devices::floppies() ] }, ); } if (arch() !~ /ppc/) { @l = ( { label => N("Label"), val => \$e->{label} }, @l, { text => N("Default"), val => \$default, type => 'bool' }, ); } else { unshift @l, { label => N("Label"), val => \$e->{label}, list => ['macos', 'macosx', 'darwin'] }; if ($e->{type} eq "image") { @l = ({ label => N("Label"), val => \$e->{label} }, (@l[1..2], { label => N("Append"), val => \$append }), { label => N("NoVideo"), val => \$e->{novideo}, type => 'bool' }, { text => N("Default"), val => \$default, type => 'bool' } ); } } $in->ask_from_( { interactive_help_id => arch() =~ /ppc/ ? 'setupYabootAddEntry' : 'setupBootloaderAddEntry', callbacks => { complete => sub { $e->{label} or $in->ask_warn('', N("Empty label not allowed")), return 1; $e->{kernel_or_dev} or $in->ask_warn('', $e->{type} eq 'image' ? N("You must specify a kernel image") : N("You must specify a root partition")), return 1; member(lc $e->{label}, map { lc $_->{label} } grep { $_ != $e } @{$b->{entries}}) and $in->ask_warn('', N("This label is already used")), return 1; 0; } } }, \@l) or return; $b->{default} = $old_default || $default ? $default && $e->{label} : $b->{default}; my $new_vga = ref($vga) ? $vga->{bios} : $vga; if ($new_vga ne $e->{vga}) { $e->{vga} = $new_vga; $e->{initrd} and bootloader::add_boot_splash($e->{initrd}, $e->{vga}); } bootloader::set_append_netprofile($e, $append, $netprofile); bootloader::configure_entry($b, $e); #- hack to make sure initrd file are built. 1; }; my $Add = sub { my @labels = map { $_->{label} } @{$b->{entries}}; my ($e, $prefix); if ($in->ask_from_list_('', N("Which type of entry do you want to add?"), [ N_("Linux"), arch() =~ /sparc/ ? N_("Other OS (SunOS...)") : arch() =~ /ppc/ ? N_("Other OS (MacOS...)") : N_("Other OS (Windows...)") ] ) eq "Linux") { $e = { type => 'image', root => '/dev/' . fs::get::root($fstab)->{device}, #- assume a good default. }; $prefix = "linux"; } else { $e = { type => 'other' }; $prefix = arch() =~ /sparc/ ? "sunos" : arch() =~ /ppc/ ? "macos" : "windows"; } $e->{label} = $prefix; for (my $nb = 0; member($e->{label}, @labels); $nb++) { $e->{label} = "$prefix-$nb"; } $Modify->($e) or return; bootloader::add_entry($b, $e); $e; }; my $Remove = sub { my ($e) = @_; delete $b->{default} if $b->{default} eq $e->{label}; @{$b->{entries}} = grep { $_ != $e } @{$b->{entries}}; 1; }; my @prev_entries = @{$b->{entries}}; if ($in->ask_from__add_modify_remove('', N("Here are the entries on your boot menu so far. You can create additional entries or change the existing ones."), [ { format => sub { my ($e) = @_; ref($e) ? ($b->{default} eq $e->{label} ? " * " : " ") . "$e->{label} ($e->{kernel_or_dev})" : translate($e); }, list => $b->{entries}, } ], Add => $Add, Modify => $Modify, Remove => $Remove)) { 1; } else { @{$b->{entries}} = @prev_entries; ''; } } sub get_autologin() { my %desktop = getVarsFromSh("$::prefix/etc/sysconfig/desktop"); my $gdm_file= "$::prefix/etc/X11/gdm/custom.conf"; my $kdm_file = "$::prefix/etc/kde/kdm/kdmrc"; my $desktop = $desktop{DESKTOP} || (! -e $kdm_file && -e $gdm_file ? 'GNOME' : 'KDE'); my $autologin = do { if (($desktop{DISPLAYMANAGER} || $desktop) eq 'GNOME') { my %conf = read_gnomekderc($gdm_file, 'daemon'); text2bool($conf{AutomaticLoginEnable}) && $conf{AutomaticLogin}; } else { # KDM / MdkKDM my %conf = read_gnomekderc($kdm_file, 'X-:0-Core'); text2bool($conf{AutoLoginEnable}) && $conf{AutoLoginUser}; } }; { autologin => $autologin, desktop => $desktop }; } sub set_autologin { my ($do_pkgs, $o_user, $o_wm) = @_; log::l("set_autologin $o_user $o_wm"); my $autologin = bool2text($o_user); #- Configure KDM / MDKKDM eval { common::update_gnomekderc_no_create("$::prefix/etc/kde/kdm/kdmrc", 'X-:0-Core' => ( AutoLoginEnable => $autologin, AutoLoginUser => $o_user, )) }; #- Configure GDM eval { update_gnomekderc("$::prefix/etc/X11/gdm/custom.conf", daemon => ( AutomaticLoginEnable => $autologin, AutomaticLogin => $o_user, )) }; my $xdm_autologin_cfg = "$::prefix/etc/sysconfig/autologin"; if (member($o_wm, 'KDE', 'GNOME')) { unlink $xdm_autologin_cfg; } else { $do_pkgs->ensure_is_installed('autologin', '/usr/bin/startx.autologin') if $o_user; setVarsInShMode($xdm_autologin_cfg, 0644, { USER => $o_user, AUTOLOGIN => bool2yesno($o_user), EXEC => '/usr/bin/startx.autologin' }); } if ($o_user) { my $home = (getpwnam($o_user))[7]; set_window_manager($home, $o_wm); } } sub set_window_manager { my ($home, $wm) = @_; log::l("set_window_manager $home $wm"); my $p_home = "$::prefix$home"; #- for KDM/GDM my $wm_number = sessions_with_order()->{$wm} || ''; update_gnomekderc("$p_home/.dmrc", 'Desktop', Session => "$wm_number$wm"); my $user = find { $home eq $_->[7] } list_passwd(); chown($user->[2], $user->[3], "$p_home/.dmrc"); chmod(0644, "$p_home/.dmrc"); #- for startx/autologin { my %l = getVarsFromSh("$p_home/.desktop"); $l{DESKTOP} = $wm; setVarsInSh("$p_home/.desktop", \%l); } } sub rotate_log { my ($f) = @_; if (-e $f) { my $i = 1; for (; -e "$f$i" || -e "$f$i.gz"; $i++) {} rename $f, "$f$i"; } } sub rotate_logs { my ($prefix) = @_; rotate_log("$prefix/root/drakx/$_") foreach qw(ddebug.log install.log); } sub writeandclean_ldsoconf { my ($prefix) = @_; my $file = "$prefix/etc/ld.so.conf"; my @l = chomp_(cat_($file)); my @default = ('/lib', '/usr/lib'); #- no need to have /lib and /usr/lib in ld.so.conf my @suggest = ('/usr/X11R6/lib', '/usr/lib/qt3/lib'); #- needed for upgrade where package renaming can cause this to disappear if (arch() =~ /x86_64/) { @default = map { $_, $_ . '64' } @default; @suggest = map { $_, $_ . '64' } @suggest; } push @l, grep { -d "$::prefix$_" } @suggest; @l = difference2(\@l, \@default); log::l("writeandclean_ldsoconf"); output($file, map { "$_\n" } uniq(@l)); } sub shells() { grep { -x "$::prefix$_" } chomp_(cat_("$::prefix/etc/shells")); } sub inspect { my ($part, $o_prefix, $b_rw) = @_; isMountableRW($part) || !$b_rw && isOtherAvailableFS($part) or return; my $dir = $::isInstall ? "/tmp/inspect_tmp_dir" : "/root/.inspect_tmp_dir"; if ($part->{isMounted}) { $dir = ($o_prefix || '') . $part->{mntpoint}; } elsif ($part->{notFormatted} && !$part->{isFormatted}) { $dir = ''; } else { mkdir $dir, 0700; eval { fs::mount::mount(fs::wild_device::from_part('', $part), $dir, $part->{fs_type}, !$b_rw) }; $@ and return; } my $h = before_leaving { if (!$part->{isMounted} && $dir) { fs::mount::umount($dir); unlink($dir); } }; $h->{dir} = $dir; $h; } sub ask_user { my ($in, $users, $security, %options) = @_; ask_user_and_root($in, undef, $users, $security, %options); } sub ask_user_and_root { my ($in, $superuser, $users, $security, %options) = @_; $options{needauser} ||= $security >= 3; my @suggested_names = $::isInstall ? do { my @l = grep { !/^\./ && $_ ne 'lost+found' && -d "$::prefix/home/$_" } all("$::prefix/home"); grep { ! defined getpwnam($_) } @l; } : (); my %high_security_groups = ( xgrp => N("access to X programs"), rpm => N("access to rpm tools"), wheel => N("allow \"su\""), adm => N("access to administrative files"), ntools => N("access to network tools"), ctools => N("access to compilation tools"), ); my $u = {}; $u->{password2} ||= $u->{password} ||= ''; $u->{shell} ||= '/bin/bash'; my $names = @$users ? N("(already added %s)", join(", ", map { $_->{realname} || $_->{name} } @$users)) : ''; my %groups; require authentication; my $validate_name = sub { $u->{name} or $in->ask_warn('', N("Please give a user name")), return; $u->{name} =~ /^[a-z]+?[a-z0-9_-]*?$/ or $in->ask_warn('', N("The user name must contain only lower cased letters, numbers, `-' and `_'")), return; length($u->{name}) <= 32 or $in->ask_warn('', N("The user name is too long")), return; defined getpwnam($u->{name}) || member($u->{name}, map { $_->{name} } @$users) and $in->ask_warn('', N("This user name has already been added")), return; 'ok'; }; my $validate_uid_gid = sub { my ($field) = @_; my $id = $u->{$field} or return 'ok'; my $name = $field eq 'uid' ? N("User ID") : N("Group ID"); $id =~ /^\d+$/ or $in->ask_warn('', N("%s must be a number", $name)), return; $id >= 500 or $in->ask_yesorno('', N("%s should be above 500. Accept anyway?", $name)) or return; 'ok'; }; my $ret = $in->ask_from_( { title => N("User management"), icon => 'banner-adduser', interactive_help_id => 'addUser', if_($::isInstall && $superuser, cancel => ''), focus_first => 1, }, [ $superuser ? ( { label => N("Set administrator (root) password"), title => 1 }, { label => N("Password"), val => \$superuser->{password}, hidden => 1, validate => sub { authentication::check_given_password($in, $superuser, 2 * $security) } }, { label => N("Password (again)"), val => \$superuser->{password2}, hidden => 1 }, ) : (), { label => N("Enter a user"), title => 1 }, if_($names, { label => $names }), { label => N("Real name"), val => \$u->{realname}, focus_out => sub { $u->{name} ||= lc first($u->{realname} =~ /([a-zA-Z0-9_-]+)/); } }, { label => N("Login name"), val => \$u->{name}, list => \@suggested_names, not_edit => 0, validate => $validate_name }, { label => N("Password"),val => \$u->{password}, hidden => 1, validate => sub { authentication::check_given_password($in, $u, $security > 3 ? 6 : 0) } }, { label => N("Password (again)"), val => \$u->{password2}, hidden => 1 }, { label => N("Shell"), val => \$u->{shell}, list => [ shells() ], advanced => 1 }, { label => N("User ID"), val => \$u->{uid}, advanced => 1, validate => sub { $validate_uid_gid->('uid') } }, { label => N("Group ID"), val => \$u->{gid}, advanced => 1, validate => sub { $validate_uid_gid->('gid') } }, if_($security > 3, map { { label => $_, val => \$groups{$_}, text => $high_security_groups{$_}, type => 'bool' }; } keys %high_security_groups, ), ], ); $u->{groups} = [ grep { $groups{$_} } keys %groups ]; push @$users, $u if $u->{name}; $ret && $u; } sub sessions() { split(' ', run_program::rooted_get_stdout($::prefix, '/usr/sbin/chksession', '-l')); } sub sessions_with_order() { my %h = map { /(.*)=(.*)/ } split(' ', run_program::rooted_get_stdout($::prefix, '/usr/sbin/chksession', '-L')); \%h; } sub autologin { my ($o, $in) = @_; my @wm = sessions(); my @users = map { $_->{name} } @{$o->{users} || []}; if (member('KDE', @wm) && @users == 1 && $o->{meta_class} eq 'desktop') { $o->{desktop} = 'KDE'; $o->{autologin} = $users[0]; } elsif (@wm > 1 && @users && !$o->{authentication}{NIS} && $o->{security} <= 2) { my $use_autologin = @users == 1; $in->ask_from_( { title => N("Autologin"), messages => N("I can set up your computer to automatically log on one user.") }, [ { text => N("Use this feature"), val => \$use_autologin, type => 'bool' }, { label => N("Choose the default user:"), val => \$o->{autologin}, list => \@users, disabled => sub { !$use_autologin } }, { label => N("Choose the window manager to run:"), val => \$o->{desktop}, list => \@wm, disabled => sub { !$use_autologin } } ] ); delete $o->{autologin} if !$use_autologin; } else { delete $o->{autologin}; } } sub display_release_notes { my ($o) = @_; require Gtk2::Html2; require ugtk2; ugtk2->import(':all'); require mygtk2; mygtk2->import('gtknew'); my $view = Gtk2::Html2::View->new; my $document = Gtk2::Html2::Document->new; $view->set_document($document); $document->clear; $document->open_stream("text/html"); $document->write_stream($o->{release_notes}); my $w = ugtk2->new(N("Release Notes"), transient => $::main_window, modal => 1); gtkadd($w->{rwindow}, gtkpack_(Gtk2::VBox->new, 1, create_scrolled_window(ugtk2::gtkset_border_width($view, 5), [ 'never', 'automatic' ], ), 0, gtkpack(create_hbox('edge'), gtknew('Button', text => N("Close"), clicked => sub { Gtk2->main_quit }) ), ), ); # make parent visible still visible: local ($::real_windowwidth, $::real_windowheight) = ($::real_windowwidth - 50, $::real_windowheight - 50) if $::isInstall; mygtk2::set_main_window_size($w->{rwindow}); $w->{real_window}->grab_focus; $w->{real_window}->show_all; $w->main; return; } sub acceptLicense { my ($o) = @_; require messages; $o->{release_notes} = join("\n\n", grep { $_ } map { if ($::isInstall) { my $f = install::any::getFile_($o->{stage2_phys_medium}, $_); $f && cat__($f); } else { my $file = $_; my $d = find { -e "$_/$file" } glob_("/usr/share/doc/*-release-*"); $d && cat_("$d/$file"); } } 'release-notes.html', 'release-notes.' . arch() . '.html'); # we do not handle links: $o->{release_notes} =~ s!(.*?)!$1!g; return if $o->{useless_thing_accepted}; my $r = $::testing ? 'Accept' : 'Refuse'; $o->ask_from_({ title => N("License agreement"), icon => 'banner-license', focus_first => 1, cancel => N("Quit"), messages => formatAlaTeX(messages::main_license() . "\n\n\n" . messages::warning_about_patents()), interactive_help_id => 'acceptLicense', if_($o->{release_notes}, more_buttons => [ [ N("Release Notes"), sub { display_release_notes($o) }, 1 ] ]), callbacks => { ok_disabled => sub { $r eq 'Refuse' } }, }, [ { list => [ N_("Accept"), N_("Refuse") ], val => \$r, type => 'list', format => sub { translate($_[0]) } } ]) or do { # when refusing license in finish-install: exec("/sbin/reboot") if !$::isInstall; install::media::umount_phys_medium($o->{stage2_phys_medium}); install::media::openCdromTray($o->{stage2_phys_medium}{device}) if !detect_devices::is_xbox() && $o->{method} eq 'cdrom'; $o->exit; }; } sub selectLanguage_install { my ($in, $locale) = @_; my $common = { messages => N("Please choose a language to use."), title => N("Language choice"), icon => 'banner-languages.png', interactive_help_id => 'selectLanguage' }; my $lang = $locale->{lang}; my $langs = $locale->{langs} ||= {}; my $using_images = $in->isa('interactive::gtk') && !$::o->{vga16}; my %name2l = map { lang::l2name($_) => $_ } lang::list_langs(); my $listval2val = sub { $_[0] =~ /\|(.*)/ ? $1 : $_[0] }; #- since gtk version will use images (function image2f) we need to sort differently my $sort_func = $using_images ? \&lang::l2transliterated : \&lang::l2name; my @langs = sort { $sort_func->($a) cmp $sort_func->($b) } lang::list_langs(); if (@langs > 15) { my $add_location = sub { my ($l) = @_; map { "$_|$l" } lang::l2location($l); }; @langs = map { $add_location->($_) } @langs; #- to create the default value, use the first location for that value :/ $lang = first($add_location->($lang)); } my $non_utf8 = 0; my $utf8_forced; add2hash($common, { cancel => '', focus_first => 1, advanced_messages => formatAlaTeX(N("Mandriva Linux can support multiple languages. Select the languages you would like to install. They will be available when your installation is complete and you restart your system.")), advanced_label => N("Multi languages"), }); $in->ask_from_($common, [ { val => \$lang, separator => '|', if_($using_images, image2f => sub { $name2l{$_[0]} =~ /^[a-z]/ && "langs/lang-$name2l{$_[0]}" }), format => sub { $_[0] =~ /(.*\|)(.*)/ ? $1 . lang::l2name($2) : lang::l2name($_[0]) }, list => \@langs, sort => !$in->isa('interactive::gtk'), changed => sub { #- very special cases for langs which do not like UTF-8 $non_utf8 = $lang =~ /\bzh/ if !$utf8_forced; }, focus_out => sub { $langs->{$listval2val->($lang)} = 1 } }, { val => \$non_utf8, type => 'bool', text => N("Old compatibility (non UTF-8) encoding"), advanced => 1, changed => sub { $utf8_forced = 1 } }, { val => \$langs->{all}, type => 'bool', text => N("All languages"), advanced => 1 }, map { { val => \$langs->{$_->[0]}, type => 'bool', disabled => sub { $langs->{all} }, text => $_->[1], advanced => 1, image => "langs/lang-$_->[0]", }; } sort { $a->[1] cmp $b->[1] } map { [ $_, $sort_func->($_) ] } lang::list_langs(), ]) or return; $locale->{utf8} = !$non_utf8; %$langs = grep_each { $::b } %$langs; #- clean hash $langs->{$listval2val->($lang)} = 1; #- convert to the default locale for asked language $locale->{lang} = $listval2val->($lang); } sub selectLanguage_standalone { my ($in, $locale) = @_; my $common = { messages => N("Please choose a language to use."), title => N("Language choice"), interactive_help_id => 'selectLanguage' }; my @langs = sort { lang::l2name($a) cmp lang::l2name($b) } lang::list_langs(exclude_non_installed => 1); my $non_utf8 = !$locale->{utf8}; $in->ask_from_($common, [ { val => \$locale->{lang}, type => 'list', format => sub { lang::l2name($_[0]) }, list => \@langs, allow_empty_list => 1 }, { val => \$non_utf8, type => 'bool', text => N("Old compatibility (non UTF-8) encoding"), advanced => 1 }, ]); $locale->{utf8} = !$non_utf8; lang::set($locale); Gtk2->set_locale if $in->isa('interactive::gtk'); } sub selectLanguage_and_more_standalone { my ($in, $locale) = @_; eval { local $::isWizard = 1; language: # keep around previous settings so that selectLanguage can keep UTF-8 flag: local $::Wizard_no_previous = 1; my $old_lang = $locale->{lang}; selectLanguage_standalone($in, $locale); lang::lang_changed($locale) if $old_lang ne $locale->{lang}; undef $::Wizard_no_previous; selectCountry($in, $locale) or goto language; }; if ($@) { if ($@ !~ /wizcancel/) { die; } else { $in->exit(0); } } } sub selectCountry { my ($in, $locale) = @_; my $country = $locale->{country}; my $country2locales = lang::countries_to_locales(exclude_non_installed => !$::isInstall); my @countries = keys %$country2locales; my @best = grep { find { $_->{main} eq lang::locale_to_main_locale($locale->{lang}); } @{$country2locales->{$_}}; } @countries; @best == 1 and @best = (); my $other = !member($country, @best); my $ext_country = $country; $other and @best = (); $in->ask_from_( { title => N("Country / Region"), icon => 'banner-languages', messages => N("Please choose your country."), interactive_help_id => 'selectCountry', if_(@best, advanced_messages => N("Here is the full list of available countries")), advanced_label => @best ? N("Other Countries") : N("Advanced"), }, [ if_(@best, { val => \$country, type => 'list', format => \&lang::c2name, list => \@best, sort => 1, changed => sub { $other = 0 } }), { val => \$ext_country, type => 'list', format => \&lang::c2name, list => [ @countries ], advanced => scalar(@best), changed => sub { $other = 1 } }, { val => \$locale->{IM}, type => 'combo', label => N("Input method:"), sort => 0, separator => '|', list => [ '', lang::get_ims($locale->{lang}) ], format => sub { $_[0] ? uc($_[0] =~ /(.*)\+(.*)/ ? "$1|$1+$2" : $_[0]) : N("None") }, advanced => !$locale->{IM}, }, ]) or return; $locale->{country} = $other || !@best ? $ext_country : $country; } sub set_login_serial_console { my ($port, $speed) = @_; my $line = "s$port:12345:respawn:/sbin/agetty ttyS$port $speed ansi\n"; substInFile { s/^s$port:.*//; $_ = $line if eof } "$::prefix/etc/inittab"; } sub report_bug { my (@other) = @_; sub header { " ******************************************************************************** * $_[0] ********************************************************************************"; } join '', map { chomp; "$_\n" } header("lspci"), detect_devices::stringlist(), header("pci_devices"), cat_("/proc/bus/pci/devices"), header("dmidecode"), `dmidecode`, header("fdisk"), arch() =~ /ppc/ ? `pdisk -l` : `fdisk -l`, header("scsi"), cat_("/proc/scsi/scsi"), header("/sys/bus/scsi/devices"), -d '/sys/bus/scsi/devices' ? `ls -l /sys/bus/scsi/devices` : (), header("lsmod"), cat_("/proc/modules"), header("cmdline"), cat_("/proc/cmdline"), header("pcmcia: stab"), cat_("$::prefix/var/lib/pcmcia/stab") || cat_("$::prefix/var/run/stab"), header("usb"), cat_("/proc/bus/usb/devices"), header("partitions"), cat_("/proc/partitions"), header("cpuinfo"), cat_("/proc/cpuinfo"), header("syslog"), cat_("/tmp/syslog") || cat_("$::prefix/var/log/syslog"), header("monitor_full_edid"), monitor_full_edid(), header("stage1.log"), cat_("/tmp/stage1.log") || cat_("$::prefix/root/drakx/stage1.log"), header("ddebug.log"), cat_("/tmp/ddebug.log") || cat_("$::prefix/root/drakx/ddebug.log"), header("install.log"), cat_("$::prefix/root/drakx/install.log"), header("fstab"), cat_("$::prefix/etc/fstab"), header("modprobe.conf"), cat_("$::prefix/etc/modprobe.conf"), header("lilo.conf"), cat_("$::prefix/etc/lilo.conf"), header("grub: menu.lst"), join('', map { s/^(\s*password)\s+(.*)/$1 xxx/; $_ } cat_("$::prefix/boot/grub/menu.lst")), header("grub: install.sh"), cat_("$::prefix/boot/grub/install.sh"), header("grub: device.map"), cat_("$::prefix/boot/grub/device.map"), header("xorg.conf"), cat_("$::prefix/etc/X11/xorg.conf"), header("urpmi.cfg"), cat_("$::prefix/etc/urpmi/urpmi.cfg"), header("modprobe.preload"), cat_("$::prefix/etc/modprobe.preload"), header("sysconfig/i18n"), cat_("$::prefix/etc/sysconfig/i18n"), header("/proc/iomem"), cat_("/proc/iomem"), header("/proc/ioport"), cat_("/proc/ioports"), map_index { even($::i) ? header($_) : $_ } @other; } sub fix_broken_alternatives { my ($force_default) = @_; #- fix bad update-alternatives that may occurs after upgrade (and sometimes for install too). -d "$::prefix/etc/alternatives" or return; foreach (all("$::prefix/etc/alternatives")) { if ($force_default) { log::l("setting alternative $_"); } else { next if run_program::rooted($::prefix, 'test', '-e', "/etc/alternatives/$_"); log::l("fixing broken alternative $_"); } run_program::rooted($::prefix, 'update-alternatives', '--auto', $_); } } sub fileshare_config { my ($in, $type) = @_; #- $type is 'nfs', 'smb' or '' my $file = '/etc/security/fileshare.conf'; my %conf = getVarsFromSh($file); my @l = (N_("No sharing"), N_("Allow all users"), N_("Custom")); my $restrict = exists $conf{RESTRICT} ? text2bool($conf{RESTRICT}) : 1; my $r = $in->ask_from_list_('fileshare', N("Would you like to allow users to share some of their directories? Allowing this will permit users to simply click on \"Share\" in konqueror and nautilus. \"Custom\" permit a per-user granularity. "), \@l, $l[$restrict ? (getgrnam('fileshare') ? 2 : 0) : 1]) or return; $restrict = $r ne $l[1]; my $custom = $r eq $l[2]; if ($r ne $l[0]) { require services; my %types = ( nfs => [ 'nfs-utils', 'nfs-server', N("NFS: the traditional Unix file sharing system, with less support on Mac and Windows.") ], smb => [ 'samba-server', 'smb', N("SMB: a file sharing system used by Windows, Mac OS X and many modern Linux systems.") ], ); my %l; if ($type) { %l = ($type => 1); } else { %l = map_each { $::a => services::starts_on_boot($::b->[1]) } %types; $in->ask_from_({ messages => N("You can export using NFS or SMB. Please select which you would like to use."), callbacks => { ok_disabled => sub { !any { $_ } values %l } }, }, [ map { { text => $types{$_}[2], val => \$l{$_}, type => 'bool' } } keys %l ]) or return; } foreach (keys %types) { my ($pkg, $service, $_descr) = @{$types{$_}}; my $file = "/etc/init.d/$service"; if ($l{$_}) { $in->do_pkgs->ensure_is_installed($pkg, $file) or return; services::start($service); services::start_service_on_boot($service); } elsif (-e $file) { services::stop($service); services::do_not_start_service_on_boot($service); } } if ($in->do_pkgs->is_installed('nautilus')) { $in->do_pkgs->ensure_is_installed('nautilus-filesharing') or return; } } $conf{RESTRICT} = bool2yesno($restrict); setVarsInSh($file, \%conf); if ($custom) { run_program::rooted($::prefix, 'groupadd', '-r', 'fileshare'); if ($in->ask_from_no_check( { -e '/usr/sbin/userdrake' ? (ok => N("Launch userdrake"), cancel => N("Close")) : (cancel => ''), messages => N("The per-user sharing uses the group \"fileshare\". You can use userdrake to add a user to this group.") }, [])) { run_program::run('userdrake'); } } } sub monitor_full_edid() { return if $::noauto; devices::make('zero'); my ($vbe, $edid); run_program::raw({ timeout => 20 }, 'monitor-edid', '>', \$edid, '2>', \$vbe, '-v', '--perl', if_($::isStandalone, '--try-in-console')); if ($::isInstall) { foreach (['edid', \$edid], ['vbe', \$vbe]) { my ($name, $val) = @$_; if (-e "/tmp/$name") { my $old = cat_("/tmp/$name"); if (length($$val) < length($old)) { log::l("new $name is worse, keeping the previous one"); $$val = $old; } elsif (length($$val) > length($old)) { log::l("new $name is better, dropping the previous one"); } } output("/tmp/$name", $$val); } } ($edid, $vbe); } sub running_window_manager() { my @window_managers = qw(kwin gnome-session icewm wmaker afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish olvwm fluxbox compiz); foreach (@window_managers) { my @pids = fuzzy_pidofs(qr/\b$_\b/) or next; return wantarray() ? ($_, @pids) : $_; } undef; } sub ask_window_manager_to_logout { my ($wm) = @_; my %h = ( 'kwin' => "dcop kdesktop default logout", 'gnome-session' => "gnome-session-save --kill", 'icewm' => "killall -QUIT icewm", ); my $cmd = $h{$wm} or return; if ($wm eq 'gnome-session') { #- NB: consolehelper does not destroy $HOME whereas kdesu does #- for gnome, we use consolehelper, so below works $ENV{ICEAUTHORITY} ||= "$ENV{HOME}/.ICEauthority"; } elsif ($wm eq 'kwin' && $> == 0) { #- we can not use dcop when we are root $cmd = "su $ENV{USER} -c '$cmd'"; } system($cmd); 1; } sub ask_window_manager_to_logout_then_do { my ($wm, $pid, $action) = @_; if (fork()) { ask_window_manager_to_logout($wm); return; } open STDIN, "/dev/null"; open STDERR, ">&STDERR"; c::setsid(); exec 'perl', '-e', q( my ($wm, $pid, $action) = @ARGV; my $nb; for ($nb = 30; $nb && -e "/proc/$pid"; $nb--) { sleep 1 } system($action) if $nb; ), $wm, $pid, $action; } sub ask_for_X_restart { my ($in) = @_; $::isStandalone && $in->isa('interactive::gtk') or return; my ($wm, $pid) = running_window_manager(); if (!$wm) { $in->ask_warn('', N("Please log out and then use Ctrl-Alt-BackSpace")); return; } $in->ask_okcancel('', N("You need to log out and back in again for changes to take effect"), 1) or return; ask_window_manager_to_logout_then_do($wm, $pid, 'killall X'); } sub alloc_raw_device { my ($prefix, $device) = @_; my $used = 0; my $raw_dev; substInFile { $used = max($used, $1) if m|^\s*/dev/raw/raw(\d+)|; if (eof) { $raw_dev = "raw/raw" . ($used + 1); $_ .= "/dev/$raw_dev /dev/$device\n"; } } "$prefix/etc/sysconfig/rawdevices"; $raw_dev; } sub config_mtools { my ($prefix) = @_; my $file = "$prefix/etc/mtools.conf"; -e $file or return; my ($f1, $f2) = detect_devices::floppies_dev(); substInFile { s|drive a: file="(.*?)"|drive a: file="/dev/$f1"|; s|drive b: file="(.*?)"|drive b: file="/dev/$f2"| if $f2; } $file; } sub configure_timezone { my ($in, $timezone, $ask_gmt) = @_; require timezone; $timezone->{timezone} = $in->ask_from_treelist(N("Timezone"), N("Which is your timezone?"), '/', [ timezone::getTimeZones() ], $timezone->{timezone}) or return; my $ntp = to_bool($timezone->{ntp}); my $servers = timezone::ntp_servers(); $timezone->{ntp} ||= 'pool.ntp.org'; require POSIX; use POSIX qw(strftime); my $time_format = "%H:%M:%S"; local $ENV{TZ} = $timezone->{timezone}; $in->ask_from_({ interactive_help_id => 'configureTimezoneGMT', title => N("Date, Clock & Time Zone Settings"), }, [ { label => N("Date, Clock & Time Zone Settings"), title => 1 }, { label => N("What is the best time?") }, { val => \$timezone->{UTC}, type => 'list', list => [ 0, 1 ], format => sub { $_[0] ? N("%s (hardware clock set to UTC)", POSIX::strftime($time_format, localtime())) : N("%s (hardware clock set to local time)", POSIX::strftime($time_format, gmtime())); } }, { label => N("NTP Server"), title => 1 }, { text => N("Automatic time synchronization (using NTP)"), val => \$ntp, type => 'bool' }, { val => \$timezone->{ntp}, disabled => sub { !$ntp }, type => "list", separator => '|', list => [ keys %$servers ], format => sub { $servers->{$_[0]} } }, ]) or goto &configure_timezone if $ask_gmt || $ntp; $timezone->{ntp} = '' if !$ntp; 1; } sub disable_x_screensaver() { run_program::run("xset", "s", "off"); run_program::run("xset", "-dpms"); } sub enable_x_screensaver() { run_program::run("xset", "+dpms"); run_program::run("xset", "s", "on"); run_program::run("xset", "s", "reset"); } 1; 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491
- diskdrake
o --dav: handle davfs2 credentials in /etc/davfs2/secrets (#44190)
o --dav: handle https
Version 11.70 - 16 October 2008
- handle new driver:
o ide: tx4939ide
- libDrakX:
o share infrastructure so that rpmdrake can get rid of some gray
windows
- harddrake service:
o do not backup xorg.conf if we won't change the driver
Version 11.67 - 2 October 2008
- detect_devices:
o allow detection of low resources systems (extracted
from compssUsers.pl) and netbooks/nettops
o do not detect pan* devices as ethernet devices for now
(network configuration tools do not fully support them)
Version 11.63 - 1 October 2008
- bootloader-config (and other tools): handle /dev/mapper/xxx1 instead of
/dev/mapper/xxxp1 (#44182)
- service_harddrake: enable/disable apmd if needed
- adapt ask_window_manager_to_logout() to make it work (need usermode changes)
Version 11.62 - 1 October 2008
- fix dithering regression (introduced on 2008-09-29)
- render banner background with dithering
(smoother on 16bpp displays)
Version 11.61 - 30 September 2008
- bootloader-config:
o --action migrate-to-uuids:
o do not migrate non sdx/hdx to UUID (bootloader config)
o do migrate dmraid device names to UUID
(because of xxx1 vs xxxp1 device name issue, cf #44182)
o fix dropping "chainloader" and "configfile" entries (#44045)
- reduce banner font size
Version 11.60 - 30 September 2008
- libDrakX:
o fix rpmdrake crashing when description begins by "Gtk2::.."
(#43802)
- drakperm:
o show banner when not embedded
o use Gtk+2's FileChooserDialog
Version 11.59 - 29 September 2008
- libDrakX:
o add support for Gtk+2's FileChooserDialog for draksnapashot
- drakbug:
o handle strange DBus errors
Version 11.58 - 29 September 2008
- libDrakX:
o add spacing between radio buttons for readability (#44332)
o render left background of MCC with dithering (looks better on
16bit displays)
Version 11.57 - 29 September 2008
- libDrakX:
o better positionning of mcc selection bar
- draksplash:
o fix crashing when altering read-only combo boxes
(regression introduced in 11.37 on 2008-09-08)
o improved layout
o increase default width so that translated widgets fit in
o make it fit in 800x600 resolution (#36105)
Version 11.56 - 26 September 2008
- dmraid devices: use isw_xxxxp1 instead of isw_xxxx1 (see #42542, #44182)
- do not display Help buttons in standalone mode since we do not have
any contents
- factorize WebKit code with mcc
Version 11.54.2 - 26 September 2008
- bootloader-config:
o --action migrate-to-uuids: be more precautious when modifying /etc/fstab
(especially do not drop unrecognised entries) (#43548)
Version 11.54.1 - 25 September 2008
- make gray background gradient available to mcc
Version 11.54 - 25 September 2008
- enable mcc to not display any shadow around HTML view when using
scrollbars
- make sure mcc always have fillers
Version 11.53 - 25 September 2008
- add support for new MCC style
- fix icon alignment in banners
Version 11.52.1 - 24 September 2008
- libDrakX:
o add support for new mcc style
Version 11.52 - 23 September 2008
- drakbug:
o enable to disable it trough the DISABLE_DRAKBUG environment variable
o fix sizing some labels (workarounding infamous 6 years old gnome
bug #101968)
- harddrake service:
o auto-configure floppies
(may require to load floppy module at first boot on a new system)
o do not try to run drakbug
Version 11.51 - 23 September 2008
- finish-install:
o set dialog hint if drakx-matchbox-window-manager is used
(not to maximize windows)
- kill drakprinter link (#44115)
Version 11.50 - 22 September 2008
- restore support for right alignement for simple widgets
(regression introduced in 11.46 - 17 September 2008)
- bootloader-config:
o fix handling fd0 (regression introduced in 11.44) (#44049)
Version 11.49.2 - 22 September 2008
- fix crash (#44053)
- localedrake:
o add support for ibus
Version 11.49.1 - 20 September 2008
- install banner images in the proper directory (#44038)
Version 11.49 - 19 September 2008
- handle new driver:
o ethernet: enic, qlge
- remove harddrake service (now run by mandrake_everytime)
Version 11.48 - 18 September 2008
- libDrakx:
o new banner style
- bootloader-config, drakboot:
o handle /boot/grub/install.sh with no "root (hd...)" line
(this is the case for grub's installed prior to 2005-06-16)
(#43786, #43431)
Version 11.47.1 - 17 September 2008
- bug fix: add mandatory new modules for dm-crypt
Version 11.47 - 17 September 2008
- handle new driver:
o ethernet: jme
- diskdrake:
o handle partitions encrypted with cryptsetup
o fix file system type drop down list showing most types as "..." in
"Change partition type" dialog in expert mode due to ellipsizing
- harddrake2:
o detect network and graphical driver packages too
- harddrake2 / remove-unused-packages:
o fix network packages detection
- list btusb instead of hci_usb in bus/bluetooth (renamed in 2.6.27)
Version 11.46 - 17 September 2008
- scannerdrake:
o change all printerdrake references to system-config-printer
- libdrakX:
o better layout for right aligned widgets
- bootloader-config:
o --action migrate-to-uuids: do not migrate software raid to UUID (#43928)
- license: put focus back on Refuse button by default
Version 11.44 - 16 September 2008
- bootloader-config:
o --action migrate-to-uuids: add UUID to swap v.2 in case the swap was
created long ago when mkswap didn't do it by default
o fix reading existing grub conf in present of /dev/mapper/xxxx0p1
partitions (which was causing bootloader-config to drop correct entries,
cf #37722)
Version 11.43 - 16 September 2008
- diskdrake:
o fix check for mdadm in live install (#43785)
o refresh GUI
- harddrake:
o do not use anymore printerdrake and thus do not detect printers anymore
Version 11.41 - 11 September 2008
- fix default spacing between GUI elements
- "Help" dialogs:
o add a separator before "Close" button
o put "Close" button of help at right end
- finish-install:
o fix setting utf8 when using lang=xx from /proc/cmdline (#43566)
- services (thanks to spuk):
o list ip6tables in "Internet" category
o list nfs-common and nfs-server in "File sharing" category
o list rpcbind in "System" category
Version 11.40 - 10 September 2008
- libdrakX:
o make advanced popup display the same title as their parents
- drakboot
o fix nolapic/lapic logic due to altered kernel settings
- fix input devices detection in rpmsrate (broken for 3 years, #43721)
- finish-install:
o always ask timezone (#23303, #42368)
o extract a "country" step out of the "language" one
o guess country from timezone when possible (#23303)
o call "country" and "keyboard" steps after "timezone" (#23303)
o guess country from timezone without asking if COUNTRY is set to
"simplified" in the configuration file (#23303)
o behave nicely when a window manager is running (for debugging)
Version 11.38 - 8 September 2008
- libDrakX:
o fix missing maximize & minimize buttons with gnome WM (#43540) by
reverting change from 2008-09-01: "make all windows are "dialog",
so that gurpmi.addmedia during install displays nicely"
o make all windows be "dialog" during install, so that
gurpmi.addmedia during install displays nicely
- diskdrake
o keep current UUID when formatting ext2/ext3 (was already done for swap),
so that fstab on other distros continue to work (#39913)
(requires e2fsprogs-1.41.1-2mnb2)
- drakboot --boot
o drop the ability to set mem=xxx (#42329)
o allow UTF8 in /boot/grub/menu.lst (#43714)
Version 11.38 - 8 September 2008
- diskdrake
o fix file system type drop down list showing most types as "..." in expert
mode due to ellipsizing (#43611)
o fix too large partition bar (#43073)
o improved GUI
Version 11.37 - 8 September 2008
- add descriptions to menu entries (#26106)
- do not size radio button that have a label (eg: drakauth) thus preventing
uneeded horizontal scrollbar to appear
- drakauth:
o new look
- drakboot:
o update /etc/sysconfig/desktop since we read it in order to display
previous setting
- draksplash:
o make it fit better in 1024x768
o make it working again due to focus issue with two top windows (#43696)
o make some pull down menus not editable
Version 11.36 - 5 September 2008
- bootloader-config:
o --action migrate-to-uuids: backup conf file prior to migration with suffix
.before-migrate-to-uuids
- libDrakX:
o fix handling KDE4 in running_window_manager() and ask_window_manager_to_logout()
- merge remove-unused-hardware-packages and remove-unselected-locales
helpers into a new remove-unused-packages tool (and make it reusable)
Version 11.35 - 4 September 2008
- bootloader-config:
o add --action migrate-to-uuids
- fix sizing some label (workarounding infamous 6 years old gnome bug #101968)
Version 11.33.1 - 2 September 2008
- libDrakX:
o handle KDE4 in running_window_manager() and ask_window_manager_to_logout()
Version 11.30 - 1 September 2008
- service_harddrake: adapt kernel modaliases that are not valid
anymore in modprobe.conf when booting a new kernel, this should fix
migration from e1000 to e1000e and from iwl4965 to iwlagn (#41248)
- libDrakX:
o make all windows are "dialog", so that gurpmi.addmedia during install
displays nicely
o fix alignment of check buttons
o fix size of right aligned labels
o fix sizing radio buttons' labels (infamous 6 years old gnome bug
#101968)
o prevent big combo boxes to cause an horizontall scrollbar to appear by
using the "ellipsize" property
o no relief on 'advanced' buttons
Version 11.29 - 29 August 2008
- finish-install:
o use gurpmi.addmedia when available to configure urpmi media
- diskdrake: use udevadm settle instead of udevsettle
Version 11.26.1 - 28 August 2008
- fix asterisk in titles
Version 11.26 - 27 August 2008
- fix "probe floppies only once" (#43216)
- bootloader-config:
o call mkinitrd without "-v" to make it silent (#42992)
- harddrake service:
o fix setting locales (#43224)
- misc GUI improvements
o misc changes
o properly size some labels (infamous 6 years old gnome bug #101968)
o refresh "user management" step
Version 11.22 - 21 August 2008
- probe floppies only once
- do not bother probing /dev/fd0 and loading floppy device uselessly,
it takes time and it is already done by boot process
(just check /proc/devices)
- do not let MCC crashes if an icon is missing (#37651)
Version 11.21 - 21 August 2008
- diskdrake
o ensure we initialize only once but at least one, thus fixing crash
when embedded or in installer (#43011)
- localedrake
o install proper qtX package for gcin
Version 11.20 - 20 August 2008
- diskdrake
o fix sizing partitions bar (#24410)
o increase default width of buttons so that they fit in expert mode
- drakauth:
o handle pam_tcb instead of (deprecated) pam_unix (#42471)
Version 11.16 - 19 August 2008
- share new advanced icon with standalone tools
Version 11.14 - 19 August 2008
- authentication: enable network-auth meta-service if auth is not local
Version 11.13 - 18 August 2008
- do_pkgs: do not reload urpmi media at every check for package availability
- finish-install: set locale at first step when language is selected
in gfxmenu (#42299)
- move hardware packages detection code from installer to drakxtools
- add helpers to remove unused localization and hardware packages
(remove-unselected-locales, remove-unused-hardware-packages)
Version 11.10.2 - 18 August 2008
- really fix another focus bug (#42750)
Version 11.10.1 - 18 August 2008
- fix another focus bug (#42750)
Version 11.10 - 14 August 2008
- diskdrake:
o refreshed GUI
- localedrake:
o default to UTF-8 for chinese simplified (#42137)
Version 11.6 - 8 August 2008
- add product type to URL when fetching mirror list
- enable to share code between draksnapshot, mdkonline & net_applet
Version 11.5 - 6 August 2008
- fix more strange focus bugs
Version 11.4 - 5 August 2008
- fix strange focus bugs
Version 11.3 - 4 August 2008
- drakedm:
o adapt to dm.d files being moved to /usr/share (#41879)
o do not try to configure an undefined dm
Version 10.47 - 10 July 2008
- fix reading and setting kdmrc (by resolving alternative in chroot)
Version 10.46 - 10 July 2008
- authentication:
o add back fix to force the password to be utf8 (#23273)
o fix reading md5/shadow options in /etc/pam.d/system-auth
- finish-install: log in syslog
Version 10.45 - 09 July 2008
- update autologin file path for kdm4
- default to KDE4 (instead of KDE) if kdm config exists when reading
autologin configuration
- change default authentication to local (instead of ldap)
Version 10.43 - 04 July 2008
- detect KDE4 when configuring autologin
Version 10.39 - 25 June 2008
- bootloader-config:
o fix handling xen kernels: it should not replace an existing 'linux'
entry (#40865)
- service_harddrake:
o handle nvidia173.ko (new legacy series of the proprietary driver)
Version 10.37 - 18 June 2008
- handle jpeg icons (needed for next rpmdrake)
- draksound:
o do not set snd-ac97-codec's "power_save=1" options on MIPS
Version 10.34 - 12 June 2008
- partitioning wizard:
o do not propose to resize "hidden" fat partitions
o do not say "the Windows partition" when there can be more than one
- allow mounting ntfs-3g partitions
(also fixes detection of Windows partitions during live installation)
- service_harddrake:
o do not allow fbdev if /proc/fb is empty
o fix kbluetooth config path
o fix autoconfiguration of harddisks
- drakupdate_fstab: make sure removable disks are not fs-checked on boot
(regression introduced in 10.6.3)
- handle renamed drivers:
o ide-cd is now named ide-cd_mod
o generic is now named ide-pci-generic
- authentication:
o add Kerberos Support
o add disconnected mode for Ldap, Kerberos, Windows auth
o add more options in Ldap configuration: Fetch DN, TLS
o remove Active Directory SFU
o change Winbind authentification to enable domain model choice (NT4 or AD)
Version 10.33 - 29 May 2008
- drakboot:
o only read bootloader configuration when configuring it
(usefull in chroots)
- draksound:
o be more robust when managing /etc/alsa/pulse-default.conf
- drakbug:
o automatically report CPU name & kernel version
o prefill the platform field
- list hso driver in network/cellular
Version 10.32 - 13 May 2008
- draksound:
o advise to log out if PA is enabled/disabled
o disable PA routing when PA is disabled (#40219)
o grey PA routing & 5.1 sound if PA is disabled
o make sure that switch alsa-plugins-pulseaudio is installed when
enabling PA routing (#40533)
- localedrake:
o advise to restart when changing system wide settings too
- handle new drivers:
o pata: pata_sch
Version 10.31 - 24 April 2008
- bootloader-config:
o do not detect device.map inconsistency when "/boot" (or "/") is on Linux
software raid (/dev/mdX), cf #28309 and #35714
Version 10.30 - 23 April 2008
- bootloader-config:
o fix detecting device.map inconsistency when "/boot" and "/" are not on
same "drive" (esp. when "/" is LVM and "/boot" is not, #39229)
- diskdrake:
o ensure no "division by zero" runtime error (#34931)
- drakupdate_fstab:
o only add formatted partitions in fstab (or else it will make
subsequent boot fail)
- fix file descriptor leak when detecting network driver
(mostly notable in network center and drakroam)
- list generic module in disk/ide
Version 10.29 - 3 April 2008
- service_harddrake:
o fix detecting modules installed in new dkms locations (/dkms and
/dkms-binary) instead of /kernel
- drakclock: write UTC setting in /etc/adjtime (#36522)
Version 10.27 - 3 April 2008
- drakboot:
o stop workarounding glibc misconfiguration when listing users
(#38116), it is now handled in MDK::Common (see #34279)
- draksplash:
o do not write decimal values in theme config (#38271)
- finish-install:
o configure urpmi media if network is up and no media are configured
(#38202)
Version 10.25 - 1 April 2008
- DBus framework improvement
Version 10.24 - 1 April 2008
- drakups:
o fix crash while removing an item (#34413)
- harddrake:
o offer again to run drakxtv for TV cards (#39609)
- diskdrake:
o allow relatime on ntfs-3g (#39666)
- diskdrake --fileshare:
o do not ask to install nautilus-filesharing if already installed (#39544)
Version 10.22 - 27 March 2008
- partitioning wizard lirary:
o allow "Use free space" if there is an extended
partition even if all primary partitions are used (#38804)
(*old* bug!)
- draksplash:
o fix reading grub conf (#39346)
- services backend:
o handle services with "-" as default chkconfig level in more places
- mygtk2:
o allow to create buttons with stock icons (for drakguard)
- finish-install:
o really set the superuser password when using simplified user+root
dialog (#39218)
Version 10.20 - 25 March 2008
- do not run main_quit if not in a main loop (eg: while loading GUI)
but block window deletion instead (#39230)
- adduserdrake
o force the password to be utf8 (#23273)
- diskdrake --nfs
o ensure "nfs-common" is started (#34103)
Version 10.19 - 21 March 2008
- bootloader-config, drakboot:
o fix device.map if it is not consistent with the system
(eg: it says hd0 in sdb whereas it now is sda) (#39160)
- diskdrake:
o fix setting mount point of a /dev/mdX (#39142)
(regression introduced in 10.8)
- list gspca, ov51x-jpeg and qc-usb-messenger in webcam modules group
- harddrake:
o recommend using insensitive search (#39136)
o notify at X11 startup when we switched to free video driver (#39164)
- drakupdate_fstab:
o do not print added/removed mountpoints with --auto (when run from
harddrake, like in Mandriva One), but add a --verbose option instead
Version 10.18 - 21 March 2008
- drakfont:
o fix importing fonts without chkfontpath (#37604)
o stop restarting XFS server
- diskdrake:
o keep existing swap UUID (#38877)
- partitioning wizard: do not show error message in wizard mode when
cancel is clicked (clean wizard window instead)
- finish-install:
o allow to ask both root and user accounts in the same step
o replace home path in user config files when renaming a user (#30380)
Version 10.17 - 20 March 2008
- use UUID by default (for diskdrake and draklive-install)
- finish-install:
o write modprobe.conf after configuring network
o do not configure network if already up
o allow to use a simplified time step
(no timezone selection, ntp settings as advanced)
- move functions to get available space from installer
(to be used in draklive-install)
- localedrake: update OpenOffice/BrOffice alternative according to
selected lang (#37820)
Version 10.16.1 - 18 March 2008
- handle position for paned widgets (needed for rpmdrake, #38762)
Version 10.16 - 18 March 2008
- adduserdrake:
o display kdm/gdm icon again (was disabled on year ago)
- do not write aliases for asus_acpi and thinkpad_acpi in
modprobe.preload, the modules are now handled by coldplug
- draksec
o do not continue if installing msec crashed or was canceled (#38911)
- localdrake:
o do not make /etc/sysconfig/i18n readable only by root in high
security level (#39027)
- scannerdrake:
o use provides instead of package name now that gurpmi handle them
Version 10.15 - 14 March 2008
- fix changing UID on forking
- scannerdrake: use package name instead of Provides.
- create Gtk2::Notify::Queue out of Gtk2::NotificationBubble::Queue
for libnotify support in net_applet (#37509)
Version 10.12 - 13 March 2008
- fix gurpmi path (#38679)
- diskdrake:
o graphical error message when "No hard drives found" (#38699)
(otherwise drakbug will catch it and suggest to report a bug...)
- draksound:
o enable to set 5.1 channels (#38796)
- scannerdrake: fix undefined variable $in (#36387, #37039)
Version 10.11 - 11 March 2008
- diskdrake:
o really fix partition device name for some dmraid (missing "p", cf #38363)
- draksound (#37826):
o add support to enable/disable ALSA to PA routing (#37826)
o add support to enable/disable PulseAudio
o add support to enable/disable user switching
o display trouble shooting when there's no driver too
o enable to reset the sound mixer to default values
- cpufreq: fix gsx-suspmod probe
- scannerdrake: fix to open usbtable.gz instead of usbtable
Version 10.10 - 6 March 2008
- finish-install:
o do not show broken Cancel button in license step (#38195)
- diskdrake:
o fix resizing/formatting ntfs (broken because of ntfs-3g switch in previous
release)
o fix partition device name for some dmraid (missing "p", cf #38363)
o do not timeout after 10 minutes when resizing NTFS partition
- detect_devices:
o provide sysfs device path on Firewire and PCMCIA bus
(to be able to fix #33950 in drakx-net)
Version 10.9 - 5 March 2008
- adapt to new kernel-2.6.25's sysfs layout (Eric Pielbug, #38235)
- diskdrake: use ntfs-3g by default for ntfs partitions
- draksplash: do not re-install grub, only modify grub's config file
- select proper padlock module for Via CPU (#38311)
Version 10.7 - 3 March 2008
- bootloader-config:
o have a nicer name for "mnb" kernels
- drakbug:
o do not catch exception if $^S is undef
(occurs when "eval { require foo }" and foo.pm do "use not_available")
- use gurpmi when installing packages if possible (#24044)
Version 10.6.25 - 28 February 2008
- harddrake:
o do not assign a mount point to partitions of type "Compaq diagnostics"
- API changes for drakx-net and rescue
Version 10.6.23 - 25 February 2008
- drakboot:
o make sure users are not listed twice (#38116)
- drakfont:
o fix crashing when encountering file names with meta characters on
windows partitions (#36482)
- diskdrake:
o jfsprogs is now jfsutils
- drop support for arch now that rpmdrake-4.3 dropped it
Version 10.6.22 - 18 February 2008
- diskdrake:
o fix switching from LABEL=xxx to /dev/yyy in fstab (#37914)
- add support for snd-aw2
- drakboot --boot:
o fix dropping grub "configfile" entries when switching to lilo
- draksound:
o move all driver list & troubleshooting in an advanced expander
Version 10.6.20 - 18 February 2008
- diskdrake:
o final fix for resizing's failures due to udev's race
(when writing the partition, do not del/add the same partition)
- harddrake GUI:
o install linuxwacom if needed
- harddrake service:
o use acpi-cpufreq for Mobile PIII/Celeron
(family 6 model 11, for example Toshiba Portégé 3500)
o use speedstep-centrino only for supported models
and prefer acpi-cpufreq (patch from Herton, #30208)
o use p4-clockmod for some Intel family 6 processors not supporting EST
Version 10.6.18 - 12 February 2008
- handle 'icon-pressed' signal of Gtk2::Sexy::IconEntry
Version 10.6.17 - 11 February 2008
- add support for Gtk2::Sexy::IconEntry (needed for rpmdrake)
- drakperm:
o warning dialogs are confusing since OK/cancel both ends in cancel,
let's offer only a cancel button
Version 10.6.15 - 7 February 2008
- harddrake:
o do not try to install openoffice64 on x86_64 (#37318)
Version 10.6.14 - 5 February 2008
- bootloader-config:
o never use "vmlinuz-desktop" or "initrd-desktop.img", always use "vmlinuz"
or "initrd.img" (#35721)
- drakfont:
o fix crashing on file names with meta characters (#36482)
- enhance the logout dialog (ok/cancel instead of yes/no)
- short-circuit exit once drakbug was run on crash
Version 10.6.11 - 31 January 2008
- drakbug:
o autoselect distro version in bugzilla
o explain what is the usefull part of the gdb trace
o open help as user
o stop translating program name in bugzilla (#35241)
Version 10.6.10 - 28 January 2008
- handle new drivers:
o ethernet: cpmac
o gigabit: ipg
o pata/sata: pata_bf54x, sata_fsl
o sound: snd-at73c213
o tv cards: cx23885
o webcams: tcm825x
- detect raid partitions based on either type 0xfd or vol_id detecting
linux_raid_member (#35684)
- bootloader-config:
o fix handling LVM VGs with "-" in the name (#37267)
o do not drop "lock" in chainload entries from grub's menu.lst (#36398)
- diskdrake --fileshare:
o adapt to nfs-utils service rename (nfs-server instead of nfs) (#37069)
Version 10.6.9 - 25 January 2008
- harddrake:
o class more sensors as biometric
- drakbug:
o do not display twice "Cannot be run in console mode." message
- finish-install:
o do ask again language (got wrongly disabled in 10.6.8)
- harddrake service:
o backup xorg.conf before falling back to safe driver (#37182)
Version 10.6.8 - 24 January 2008
- bootloader-config, diskdrake:
o look for LVM PV on non partitioned disk before looking for DOS
partition_table (esp. for lilo which puts the DOS magic)
- drakbug:
o make "Please describe what you were doing when it crashed" more
visible and force people to write something in before opening
bugzilla
- mygtk2: make sure users of ::no_ugtk_init (eg: drakbug) do catch
exceptions in callbacks
Version 10.6.6 - 22 January 2008
- bootloader-config:
o fix root=xxx parameter for "/" on lvm using UUID= in fstab (#36542)
- adapt to perl 5.10.0
Version 10.6.5 - 14 January 2008
- drakboot:
o fix handling root=UUID=xxx when modifying a bootloader entry (#36788)
Version 10.6.4 - 14 January 2008
- localedrake, drakx-finish-install:
o fix proposing Belgium when lang is "nl" and locales-fr is not installed
(same for Canada with lang "fr" and locales-en not installed) (#36413)
Version 10.6.3 - 9 January 2008, by Thierry Vignaud
- handle new drivers: atl2 (ethernet), snd-virtuoso
- bootloader-config:
o fix regression introduced in 10.5.7: do not create alt_xxx entries when
adding a new entry in bootloader
- harddrake:
o allow to set zero values in module options (#26515)
o make "Run config tool" available again (#34794)
o mark the service as interactive, so that package requests are
displayed with parallell init
o check that media are not USB keys before auto-configuring them (#34568)
- drakupdate_fstab:
o never set "sync" option, use default fs options from drakx (#35204)
o remove --no-flag option, the "kudzu" option has not been written for ages
- drakbug:
o report crash messages in the bug report only when --incident is used
(and not when tools explicitely run drakbug with --report)
Version 10.6 - 11 December 2007, by Thierry Vignaud
- handle new drivers:
o ethernet: fec_mpc52xx, niu
o gigabit: tehuti
o pata: pata_cs5536
o sata: sata_fsl
o wireless: b43, b43legacy, iwlwifi, libertas_cs, p54pci, p54usb
- localedrake:
o adjust Uzbek locale (cf locales-uz change)
Version 10.5.7 - 6 December 2007, by Thierry Vignaud
- handle new drivers: e1000e, snd-oxygen, snd-pcsp
- bootloader-config:
o do not drop entries "failsafe" and "linux-nonfb" when removing a kernel
- localedrake:
o adapt to cooker: scim-tables-skim is now skim-scim-tables
o restrict the proposed input-methods for each language
- bootloader:
o when reading existing menu.lst, keep verbatim entries for which the device
has no mount-point
o handle "alien" grub entries that will be kept verbatim (#23591)
o handle "root (hd...)" for menu.lst entries (#23591)
(nb: when writing, "root ..." will not be used)
- diskdrake:
o drop "Undo", "Restore partition table", "Save partition table"
(preparing to switch to libparted)
o fix garbaged error messages when umounting fs
o disallow "Use for loopback" when the partition used for loopback is
not formatted (#35535)
o always display the {info} field of the drive (not only in expert mode)
Version 10.5.3 - 9 November 2007, by Pascal "Pixel" Rigaux
- bootloader-config:
o do not create "linux" entries for xen kernels, but "xen" entries instead
- localedrake:
o fix handling variant together with charset (eg: uz.UTF-8@Latn) (#35090)
- drakbug:
o prevent altering tool and the like when catching a bug (#35241)
Version 10.5.2 - 6 November 2007, by Thierry Vignaud
- diskdrake:
o add support for ext4
- drakbug:
o keep buggy process around so that we can run gdb on it (if perl segfaulted)
o report gdb trace if possible
- harddrake: detect storage and various controllers before anything else
(so that storage devices get detected at first boot on live)
Version 10.5.1 - 31 October 2007, by Thierry Vignaud
- bootloader-config:
o bootloader-config must not need network::network from libdrakx-net
o if drakx-kbd-mouse-x11 is not installed, simply don't add bootsplash
instead of dying
- fix buttons order under KDE when using compiz (by detecting kde-window-decorator)
- drakclock/finish-install: disable DPMS and screensaver when setting time,
not to blank monitor (#17031)
Version 10.5.0 - 15 October 2007, by Thierry Vignaud
- localedrake:
o do propose "Suisse" after selecting french language (#34675)
- draksec:
o fix switching from "no_password" to "_password" (#34490)
Version 10.4.239 - 5 October 2007, by Thierry Vignaud
- finish-install: fix release notes window size
Version 10.4.237 - 5 October 2007, by Olivier "blino" Blin
- fix installed modules detection (#34478)
- fix version reported by drakfont & harddrake
- when checking dkms module packages, check that modules are either
available in urpmi media, or already installed (fix detection in live)
- add shadow 'in' around Gtk2::SimpleList widgets
Version 10.4.235 - 4 October 2007, by Thierry Vignaud
- diskdrake --fileshare
o install nautilus-filesharing if nautilus is installed (#34262)
- finish-install: use translations for network step
Version 10.4.234 - 4 October 2007, by Olivier "blino" Blin
- finish-install: use translations for keyboard and 3D steps
Version 10.4.232 - 4 October 2007, by Olivier "blino" Blin
- add helper to get kernel module path (to be used in draklive)
Version 10.4.231 - 3 October 2007, by Nicolas Vigier
- wizards :
o don't report a crash when an error prevent the wizard from
running (#34371)
Version 10.4.230 - 3 October 2007, by Thierry Vignaud
- drakboot --boot:
o if there is a /boot, check /boot instead of "/" to allow grub or not
Version 10.4.226 - 2 October 2007, by Thierry Vignaud
- drakauth:
o install lib64sasl2-plug-gssapi on x86_64 (instead of libsasl2-plug-gssapi)
- draksec
o make authentication items be aligned
- add ath5k module in wireless category
Version 10.4.225 - 1 October 2007, by Thierry Vignaud
- diskdrake:
o bugfix 10.4.162: allow "LVM" on RAID (#34359)
o improved wrapping of mount option descriptions (#19848)
Version 10.4.222 - 28 September 2007, by Olivier "blino" Blin
- allow interactive::gtk frontends to ask for a directory
- allow interactive::gtk frontends not to pop wait messages
Version 10.4.221 - 28 September 2007, by Olivier "blino" Blin
- add back ipw3945 module in wireless modules list
- allow to detect VirtualBox guest systems
- add acpi-cpufreq support for some Intel CPUs (family 6 model 15)
(from Herton Ronaldo Krzesinski, #30208)
Version 10.4.217 - 27 September 2007, by Thierry Vignaud
- localedrake:
o allow to choose countries like "Angola" which have no locale (en_AO) in
the "best" countries (alas it won't be remembered, will only be used in
kde settings for now)
- finish-install:
o display nicer HTML release notes rather than raw text version
Version 10.4.213 - 26 September 2007, by Thierry Vignaud
- drakbug
o don't report a non existant crash when run w/o --error
o when unable to access X11, just print the backtrace on the console
- draksec:
o add a right delegation tab
o display arrows for tabs
Version 10.4.210 - 24 September 2007, by Thierry Vignaud
- diskdrake
o fix "Add to LVM"
- drakclock:
o fix race on ugtk2->exit that causes a crash (#33894)
- drakfont:
o handle fontpath.d
o size font directory list dialog
Version 10.4.209 - 22 September 2007, by Olivier "blino" Blin
- make formatXiB() handle negative numbers (for rpmdrake)
- service_harddrake:
o auto-configure CD-Rom drives in fstab again (even if it prevents
KDE media manager from unmounting them), to be consistent with
install which actually configures CD-Rom drives in fstab
Version 10.4.208 - 21 September 2007, by Olivier "blino" Blin
- service_harddrake:
o do not auto-configure CD-Rom drives in fstab, it fordbids
umounting with hal (install does not configure them in fstab either)
o automatically configure harddisks
- finish-install:
o write autologin settings after user creation only
(so that home is set and exists, should partly fix GNOME autologin)
o config first user to autologin if USER_AUTOLOGIN_FIRST is "yes"
o read gdm autologin settings
- drakupdate_fstab: allow to configure harddisks
Version 10.4.207 - 21 September 2007, by Thierry Vignaud
- drakboot:
o create .dmrc with mode 0644 for gdm (#33774)
- harddrake:
o fix listing DVD/CD as them and as unknown (#33366)
o stop offering to run drakxtv
- localedrake:
o default input method is now scim-bridge (#32138)
Version 10.4.203 - 19 September 2007, by Thierry Vignaud
- diskdrake:
o "Clear All" defaults to LVM on full disk if drive is >4TB
o do not allow partitions bigger than 2TB-1 on DOS MBR, nor partitions
starting above 2TB-1
- bootloader-config:
o handle /boot/xxx files on linux raid1
- fix getting UUID on mdmadm (eg: md0) devices
- getInputDevices(): keep "Bus=..." for drakx-kbd-mouse-x11
Version 10.4.202 - 17 September 2007, by Thierry Vignaud
- localedrake menu entries (#32941):
o hide system config
o make them more understandable
Version 10.4.200 - 17 September 2007, by Thierry Vignaud
- only run "chksession -l" if needed
- bootloader-config:
o --rebuild-initrds: don't choke on kernel files which have no version in
file name (#28772)
- drakboot:
o boot entrie list uses ellipsis rather than scroll bar
- harddrake2:
o display model & vendor for SCSI devices too
Version 10.4.198 - 16 September 2007, by Thierry Vignaud
- fix a crash
- localedrake:
o install scim-bridge-qt4 if KDE4 is installed
Version 10.4.197 - 15 September 2007, by Thierry Vignaud
- diskdrake:
o fix typo breaking reading fstab with UUID= entries
- localedrake:
o enable to select 'scim-bridge' as IM
o install needed packages for skim
o install scim-qtimm for scim default config
o remove extra SCIM combinations (simpler)
Version 10.4.195 - 14 September 2007, by Thierry Vignaud
- distinct exceptions from segfaults, thus restoring catching SIGSEGV
and preventing looping while segfaulting again
- fix loading of tifm_sd module (#18237)
- run_program layer: enable to drop privileges through setuid()
- drakbug:
o run the regular user browser (#33522)
Version 10.4.193 - 13 September 2007, by Thierry Vignaud
- drakbug:
o better behaviour when resizing
o use a TextView instead of Label so that text is selectable (see #33023)
o better formatting
- draksound:
o prevent stupid & useless "driver for your sound card is unlisted"
o no more need to:
* list OSS/ALSA alternatives if none
* sync with list_modules
Version 10.4.192 - 12 September 2007, by Olivier "blino" Blin
- localedrake
o drop support for iiimf
- list jmicron driver in disk/ide
- library: have "defaults" mount option instead of empty string (for rescue)
- service_harddrake: drop snd-usb-audio blacklist, now done with a modprobe.d file
Version 10.4.190 - 5 September 2007, by Thierry Vignaud
- display a warning when capslock is enabled and entering a password (#33028)
Version 10.4.188 - 4 September 2007, by Thierry Vignaud
- hardware detection layer:
o add support for tape device again (#31073)
o enumerate generic SCSI devices again
- diskdrake
o add a comment (a la ubuntu) in fstab when using UUID=
- harddrake
o detect PS2 to USB converters as keyboards
o display an identifier for generic SCSI devices
o list generic SCSI devices
Version 10.4.184 - 3 September 2007, by Thierry Vignaud
- diskdrake
o support for UUID in filesystems (and UUID=... in fstab)
Version 10.4.183 - 31 August 2007, by Pascal "Pixel" Rigaux
- bootloader-config
o handle new naming of vmlinuz flavors: vmlinuz-<version>-<flavor>-Xmdv
instead of vmlinuz-<version>-Xmdv<flavor>
o always use "linux" short name instead of "linux-<flavor>"
(since the long name is quite nice nowadays)
- assume system is a laptop if it contains some "Intel Corporation|Mobile" devices
(fix Samsung Q1U detection, #32967)
- draksound, harddrake service:
o enable snd-ac97-codec power_save=1 option if installed on laptop (#32213)
Version 10.4.181 - 29 August 2007, by Thierry Vignaud
- fix plural translating for C locale
- diskdrake:
o fix displaying umount error message (#32273)
o write mdadm.conf when it is modified (#32360)
(a nicer fix would be to write it when needed, not so soon, but it's harder)
o change the legend and the colors per partition
o fix action "Type" on a software raid (eg: dm0)
Version 10.4.172 - 21 August 2007, by Olivier "blino" Blin
- ignore wmaster* devices when detecting wireless interfaces
- misc mygtk2 updates
Version 10.4.170 - 20 August 2007, by Thierry Vignaud
- use '_' in modules names
Version 10.4.169 - 14 August 2007, by Thierry Vignaud
- adduserdrake, finish-install:
o create only one user
o fix checking user info (#32517)
- diskdrake:
o add support for 'relatime' mount option
o kill support for 'nodiratime' mount option
o in fstab, have "xxx" instead of "defaults,xxx"
Version 10.4.167 - 11 August 2007, by Thierry Vignaud
- fix plural translations (#32505)
- 'ibm_acpi' driver was replaced by 'thinkpad_acpi (#31606)
Version 10.4.166 - 11 August 2007, by Thierry Vignaud
- do a normal die if drakbug is not present
- make Gtk2::MDV::CellRendererPixWithLabel RTL aware (#32450)
Version 10.4.163 - 9 August 2007, by Pascal "Pixel" Rigaux
- for XFdrake: use update-alternatives command instead doing things by hand
(this uses --set, new feature of update-alternatives) (#32362)
- harddrake:
o display the PCI domain too
o handle nvidia-current.ko (Anssi Hannula)
Version 10.4.162 - 08 August 2007, by Thierry Vignaud
- fix fetching translations from "libDrakX-standalone" domain (#32402)
- diskdrake:
o do not show partition types which have no associated filesystem
for LVM LV (#32326)
Version 10.4.161 - 06 August 2007, by Thierry Vignaud
- drakbug:
o exceptions with "\n" are considered normal ways to quit and thus
do not fire up drakbug (eg: #32292)
- diskdrake:
o restore progress bar when formatting ext3
Version 10.4.160 - 06 August 2007, by Thierry Vignaud
- diskdrake:
o add support for "nodiratime" mount option
o fix range max value >2TB when creating a partition (useful for LVs >2TB)