diff options
-rw-r--r-- | docs/README | 39 | ||||
-rw-r--r-- | docs/TODO | 5 | ||||
-rw-r--r-- | perl-install/Xconfigurator.pm | 63 | ||||
-rw-r--r-- | perl-install/Xconfigurator_consts.pm | 9 | ||||
-rw-r--r-- | perl-install/any.pm | 17 | ||||
-rw-r--r-- | perl-install/install2.pm | 6 | ||||
-rw-r--r-- | perl-install/install_any.pm | 2 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 11 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 1 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 13 | ||||
-rw-r--r-- | perl-install/keyboard.pm | 2 | ||||
-rw-r--r-- | perl-install/mouse.pm | 6 | ||||
-rwxr-xr-x | perl-install/standalone/adduserdrake | 4 |
13 files changed, 114 insertions, 64 deletions
diff --git a/docs/README b/docs/README index 43b80faa5..25d84ef5b 100644 --- a/docs/README +++ b/docs/README @@ -26,10 +26,10 @@ Instead, changing some .pm files is quite easy (nice interpreted language) ******************************************************************************** If you have your own rpms you want to add, or make your own updated cdrom, you just have to update: -- Mandrake/base/hdlist: use ``misc/genhdlist .'' -- Mandrake/base/depslist: use ``misc/gendepslist -h Mandrake/base/depslist Mandrake/base/hdlist'' +- Mandrake/base/hdlist: use ``misc/genhdlists --distrib .'' +- Mandrake/base/depslist: use ``misc/gendepslist2 -o Mandrake/base/depslist Mandrake/base/hdlist.cz2'' -Optionnally, you can modify Mandrake/base/compss, compssList and compssUsers. +Optionnally, you can modify Mandrake/base/compssList and compssUsers. Also, mdkinst_stage2.gz must be remade if you modify files in Mandrake/mdkinst. See below for information about these files. @@ -39,18 +39,23 @@ See below for information about these files. First he are the different things needed : Mandrake/base/hdlist + obsolete in 7.1 + +Mandrake/base/hdlist.cz2 table of rpm's headers. - ! Need to be remade when Mandrake/RPMS changes (with ``misc/genhdlist .'') ! + ! Need to be remade when Mandrake/RPMS changes (with ``misc/genhdlists --distrib .'') ! Mandrake/base/depslist for each packages, tell which package it depends on. Also contains the size for some (obscure) bloody reasons. ! Need to be remade when Mandrake/RPMS changes ! - (with ``misc/gendepslist -h Mandrake/base/depslist Mandrake/base/hdlist'') + (with ``misc/gendepslist2 -o Mandrake/base/depslist Mandrake/base/hdlist.cz2'') + +Mandrake/base/depslist.ordered + more compact depslist with closure done, internally indexed Mandrake/base/compss - obsoletes comps. It store packages in different categories, a bit like - the %{GROUP} field + obsolete in 7.1 Mandrake/base/compssUsers obsoletes comps. It contains the different user classes like ``Graphics @@ -78,11 +83,6 @@ images/*.img - pcmcia for pcmcia install (see ``PCMCIA install'' below for more) -Some optional files : - -Mandrake/base/depslist.html - html formatted depslist - ******************************************************************************** * logs ************************************************************************* ******************************************************************************** @@ -163,28 +163,23 @@ For pcmcia, it depends on the type of install. ******************************************************************************** * modules ********************************************************************** ******************************************************************************** -Modules can be found in at least 3 places: +Modules can be found in at least 2 places: - in /modules/modules.cgz -- in /lib/modules/ -- in /lib/modules/modules.cpio.bz2 +- in /lib/modules.cz2 /modules/modules.cgz is used in stage1. It contains only modules interesting for one kind of install. For example in an hd install, it contains scsi modules. For an network install, it contains network card modules. -/lib/modules/ contains modules that should be in /lib/modules/modules.cpio.bz2 -but are not for speed up. The serial.o module is there to speed up mouseconfig. - -/lib/modules/modules.cpio.bz2 contains every module except those of -/lib/modules/ +/lib/modules.cz2 contains every module, it is used in stage2. To install a module, use modprobe which is in /usr/bin. It's a perl wrapper around /usr/bin/insmod. It uses the dependencies found in -/lib/modules/modules.dep (stage1). +/modules/modules.dep (stage1). /usr/bin/insmod is a wrapper around /usr/bin/insmod_. It just extracts the -module out of /lib/modules/modules.cpio.bz2 in /tmp. Then it calls insmod_. +module out of /lib/modules.cz2 in /tmp. Then it calls insmod_. /usr/bin/insmod_ is the real prog (which you usually find in /sbin/). You need to give it the complete path. @@ -8,8 +8,6 @@ partition is Ok (fixme? allow primary partition inside extended one, but with warning on diskdrake startup, made them as warning ?). -features------------------------------------------------------------------------------- -in 640x480 install box is to small (cuz of 'Cancel' button beeing added) - handle NT (add entry for it in lilo, put it in fstab) (NEED 7.1) auto-install for corporate, very important (need consolidation). @@ -494,3 +492,6 @@ in the middle, remove the first one. Result hda5 at the end and bug. (done,pix)missing feature in lilo configuration: can't give hda2 with /boot/vmlinuz if already hda1 with /boot/vmlinuz + +(done,pix)in 640x480 install box is to small (cuz of 'Cancel' button beeing added) + diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 5ec9400eb..bd9cc7934 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -153,9 +153,9 @@ sub keepOnlyLegalModes { sub cardConfigurationAuto() { my $card; - if (my ($c) = pci_probing::main::probe("DISPLAY")) { + if (my (@c) = pci_probing::main::probe("DISPLAY")) { local $_; - ($card->{identifier}, $_) = @$c; + ($card->{identifier}, $_) = @{$c[-1]}; $card->{type} = $1 if /Card:(.*)/; $card->{server} = $1 if /Server:(.*)/; $card->{flags}{needVideoRam} &&= /86c368/; @@ -696,6 +696,48 @@ EndSection ) if $o->{wacom}; + print G qq( +Section "InputDevice" + Identifier "stylus" + Driver "wacom" + Option "Type" "stylus" + Option "Device" "/dev/$o->{wacom}" +EndSection +Section "InputDevice" + Identifier "eraser" + Driver "wacom" + Option "Type" "eraser" + Option "Device" "/dev/$o->{wacom}" +EndSection +Section "InputDevice" + Identifier "cursor" + Driver "wacom" + Option "Type" "cursor" + Option "Device" "/dev/$o->{wacom}" +EndSection +) if $o->{wacom}; + + print G qq( +Section "Module" + +# This loads the DBE extension module. + + Load "dbe" + +# This loads the miscellaneous extensions module, and disables +# initialisation of the XFree86-DGA extension within that module. + + SubSection "extmod" + Option "omit xfree86-dga" + EndSubSection + +# This loads the Type1 and FreeType font modules + + Load "type1" + Load "freetype" +EndSection +); + #- Write monitor section. $O = $o->{monitor}; print F $monitorsection_text1; @@ -831,7 +873,22 @@ Section "Screen" #- bpp 32 not handled by XF4 $subscreen->(*G, "svga", min($O->{default_depth}, 24), $O->{depth}); - print G $layoutsection_v4; + print G ' + +Section "ServerLayout" + Identifier "layout1" + Screen "screen1" + InputDevice "Mouse1" "CorePointer" +'; + print G ' + InputDevice "stylus" "AlwaysCore" + InputDevice "eraser" "AlwaysCore" + InputDevice "cursor" "AlwaysCore" +' if $o->{wacom}; + print G ' + InputDevice "Keyboard1" "CoreKeyboard" +EndSection +'; close F; close G; diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm index 086b9f85b..d294cad45 100644 --- a/perl-install/Xconfigurator_consts.pm +++ b/perl-install/Xconfigurator_consts.pm @@ -756,12 +756,3 @@ $screensection_text1 = ' # ********************************************************************** '; -$layoutsection_v4 = ' - -Section "ServerLayout" - Identifier "layout1" - Screen "screen1" - InputDevice "Mouse1" "CorePointer" - InputDevice "Keyboard1" "CoreKeyboard" -EndSection -'; diff --git a/perl-install/any.pm b/perl-install/any.pm index ae3d187f7..0eb1000c4 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -16,7 +16,7 @@ use run_program; #-PO: names (tie, curly...) have corresponding icons for kdm my @users_male = (__("tie"), __("default"), __("curly")); #- don't change the names, files correspond to them my @users_female = (__("brunette"), __("girl"), __("woman-blond")); -@users = (@users_male, @users_female); +@users = (@users_male, @users_female, __("automagic")); sub addKdmIcon { my ($prefix, $user, $icon, $force) = @_; @@ -25,29 +25,30 @@ sub addKdmIcon { eval { commands::cp("$prefix/usr/share/icons/user-$icon-mdk.xpm", $dest) } if $icon; } -sub addKdmUsers { +sub allocUsers { my ($prefix, @users) = @_; require timezone; my @u1 = @users_male; my @u2 = @users_female; - foreach (@users) { - my $l = rand() < timezone::sexProb($_) ? \@u2 : \@u1; - my $u = splice(@$l, rand(@$l), 1); #- known biased (see cookbook for better) - addKdmIcon($prefix, $_, $u); - eval { commands::cp "$prefix/usr/share/icons/user-$u-mdk.xpm", "$prefix/usr/share/apps/kdm/pics/users/$_.xpm" }; + foreach (grep { !$_->{icon} || $_->{icon} eq "automagic" } @users) { + my $l = rand() < timezone::sexProb($_->{name}) ? \@u2 : \@u1; + $_->{auto_icon} = splice(@$l, rand(@$l), 1); #- known biased (see cookbook for better) @u1 = @users_male unless @u1; @u2 = @users_female unless @u2; } - addKdmIcon($prefix, 'root', 'hat', 'force'); } sub addUsers { my ($prefix, @users) = @_; my $msec = "$prefix/etc/security/msec"; + + allocUsers($prefix, @users); foreach my $u (@users) { substInFile { s/^$u\n//; $_ .= "$u\n" if eof } "$msec/user.conf" if -d $msec; + addKdmIcon($prefix, $u->{name}, delete $u->{auto_icon} || $u->{icon}, 'force'); } run_program::rooted($prefix, "/usr/share/msec/grpuser.sh --refresh"); + addKdmIcon($prefix, 'root', 'hat', 'force'); } sub setupBootloader { diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 6b52ded91..60b0ca166 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -600,12 +600,6 @@ sub main { $o->{prefix} = $::testing ? "/tmp/test-perl-install" : "/mnt"; mkdir $o->{prefix}, 0755; -#- #- needed very early to switch bad cards in VGA16 -#- foreach (pci_probing::main::probe('')) { -#- log::l("Here: $_->[0]"); -#- $_->[0] =~ /i740|ViRGE/ and add2hash_($o, { vga16 => 1 }), log::l("switching to VGA16 as bad graphic card"); -#- } - #- needed very early for install_steps_gtk eval { ($o->{mouse}, $o->{wacom}) = mouse::detect() } unless $o->{nomouseprobe} || $o->{mouse}; diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 943118a72..fe6689659 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -241,6 +241,8 @@ sub setPackages($) { my @l = (); push @l, "kapm" if $o->{pcmcia}; + require timezone; + push @l, "isdn4k-utils" if ($o->{timezone}{timezone} || timezone::bestTimezone(lang::lang2text($o->{lang}))) =~ /Europe/; $_->{values} = [ map { $_ + 50 } @{$_->{values}} ] foreach grep {$_} map { $o->{packages}{$_} } @l; pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1); diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 6d13edf22..fc60af16e 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -553,6 +553,7 @@ sub addUser($) { $_->{uid} = $u; $uids{$u} = 1; $_->{gid} = $g; $gids{$g} = 1; $_->{pw} ||= $_->{password} && install_any::crypt($_->{password}); + $_->{shell} ||= "/bin/bash"; $done{$_->{name}} = 1; } } @{$o->{users} || []}; @@ -577,7 +578,6 @@ sub addUser($) { } eval { commands::chown_("-r", "$u->{uid}.$u->{gid}", "$p$u->{home}") } if $u->{uid} != $u->{oldu} || $u->{gid} != $u->{oldg}; - any::addKdmIcon($p, $u->{name}, $u->{icon}); } require any; any::addUsers($o->{prefix}, map { $_->{name} } @l); @@ -654,6 +654,11 @@ sub setupBootloaderBefore { } else { require lilo; lilo::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion($o)); + if ($o->{miscellaneous}{profiles}) { + my $e = lilo::get_label("linux", $o->{bootloader}); + push @{$o->{bootloader}{entries}}, { %$e, label => "office", append => "$e->{append} prof=Office" }; + $e->{append} .= " prof=Home"; + } lilo::suggest_floppy($o->{bootloader}) if $o->{security} <= 3; $o->{bootloader}{keytable} ||= keyboard::keyboard2kmap($o->{keyboard}); } @@ -699,8 +704,6 @@ sub setupXfreeBefore { require Xconfig; Xconfig::getinfoFromDDC($o->{X}); - $::xf4 = 1; - #- keep this here if the package has to be updated. install_any::pkg_install($o, "XFree86"); } @@ -746,7 +749,7 @@ sub miscellaneous { my %s = getVarsFromSh("$o->{prefix}/etc/sysconfig/system"); $o->{miscellaneous}{HDPARM} ||= $s{HDPARM} if exists $s{HDPARM}; - $o->{miscellaneous}{CLEAN_TMP} ||= $s{HDPARM} if exists $s{CLEAN_TMP}; + $o->{miscellaneous}{CLEAN_TMP} ||= $s{CLEAN_TMP} if exists $s{CLEAN_TMP}; $o->{security} ||= $s{SECURITY} if exists $s{SECURITY}; $ENV{SECURE_LEVEL} = $o->{security}; diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index a96f9b151..5af96574b 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -439,6 +439,7 @@ sub choosePackagesTree { my ($leaf, $root) = @_; my $node = $tree->insert_node($parent->($root), undef, [$leaf, '', ''], 5, (undef) x 4, 1, 0); my $p = $packages->[0]{$leaf} or return; + $p->{medium}{selected} or return; my $pix = pkgs::packageFlagBase($p) ? $pix_base : pkgs::packageFlagSelected($p) ? $pix_selected : $pix_unselect; $tree->node_set_pixmap($node, 1, $pix->[0], $pix->[1]); push @{$ptree{$leaf}}, $node; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index d089797c1..746f4ac66 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -651,10 +651,13 @@ _("Use NIS") => { val => \$o->{authentication}{NIS}, type => 'bool', text => _(" #------------------------------------------------------------------------------ sub addUser { my ($o, $clicked) = @_; - my $u = $o->{user} ||= $o->{security} < 1 ? { name => "mandrake", password => "mandrake", realname => "default" } : {}; + my $u = $o->{user} ||= {}; + if ($::beginner || $o->{security} < 1) { + add2hash_($u, { name => "mandrake", password => "mandrake", realname => "default" }); + $o->{users} ||= [ $u ]; + } $u->{password2} ||= $u->{password} ||= ""; $u->{shell} ||= "/bin/bash"; - $u->{icon} ||= translate('default'); my @fields = qw(realname name password password2); my @shells = install_any::shells($o); @@ -929,9 +932,11 @@ _("Removable media automounting") => { val => \$o->{useSupermount}, type => 'boo $::expert ? ( _("Clean /tmp at each boot") => { val => \$u->{CLEAN_TMP}, type => 'bool' }, ) : (), - $u->{numlock} ? ( + $o->{pcmcia} ? ( +_("Enable multi profiles") => { val => \$u->{profiles}, type => 'bool' }, + ) : ( _("Enable num lock at startup") => { val => \$u->{numlock}, type => 'bool' }, - ) : (), + ), ], complete => sub { !$u->{memsize} || $u->{memsize} =~ s/^(\d+)M?$/$1M/i or $o->ask_warn('', _("Give the ram size in Mb")), return 1; my %m = reverse %l; $ENV{SECURE_LEVEL} = $o->{security} = $m{$s}; diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index 5e905aa2c..5b0a09de9 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -124,7 +124,7 @@ arch() =~ /^ppc/ ? ( "ge_la"=>[__("Georgian (\"Latin\" layout)"),"ge_la-georgian_academy","ge_la"], "gr" => [ __("Greek"), "gr-8859_7", "gr" ], "hu" => [ __("Hungarian"), "hu-latin2", "hu" ], - "hr" => [ __("Croatian"), "croat", "si" ], + "hr" => [ __("Croatian"), "croat", "yu" ], "il" => [ __("Israeli"), "il-8859_8", "il" ], "il_phonetic" => [ __("Israeli (Phonetic)"),"hebrew", "il_phonetic" ], "is" => [ __("Icelandic"), "is-latin1", "is" ], diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 20509559c..a16c0b1d7 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -136,19 +136,19 @@ sub detect() { my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r; require pci_probing::main; - if (my ($c) = pci_probing::main::probe("SERIAL_USB")) { + if (my ($c) = grep { $_->[1] =~ /usb-/ } pci_probing::main::probe('')) { eval { modules::load($c->[1], "SERIAL_USB"); modules::load("usbmouse"); modules::load("mousedev"); }; sleep(1); - do { + if (!$@ && detect_devices::tryOpen("usbmouse")) { $wacom or modules::unload("serial"); modules::load("usbkbd"); modules::load("keybdev"); return name2mouse("USB Mouse"), $wacom; - } if !$@ && detect_devices::tryOpen("usbmouse"); + } modules::unload("mousedev"); modules::unload("usbmouse"); modules::unload($c->[1], 'remove_alias'); diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake index 1d2eeb9c5..843d6821b 100755 --- a/perl-install/standalone/adduserdrake +++ b/perl-install/standalone/adduserdrake @@ -31,7 +31,7 @@ my $in = vnew interactive('su'); my @users; new: -$u = { icon => translate('default') }; +$u = { icon => translate('automagic') }; if ($in->ask_from_entries_refH( [ _("Add user"), _("Accept user"), _("Done") ], _("Enter a user\n%s", $users ? _("(already added %s)", join(", ", map { $_->{realname} || $_->{name} } @users)) : ''), @@ -77,7 +77,7 @@ sub addusers { } system("adduser $_") foreach @u; - any::addUsers('', @u); + any::addUsers('', @_); substInFile { foreach my $u (@users) { |