summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/TODO10
-rw-r--r--perl-install/ChangeLog23
-rw-r--r--perl-install/Makefile6
-rw-r--r--perl-install/Makefile.drakxtools2
-rw-r--r--perl-install/Xconfigurator.pm35
-rw-r--r--perl-install/Xconfigurator_consts.pm17
-rw-r--r--perl-install/common.pm24
-rw-r--r--perl-install/detect_devices.pm18
-rw-r--r--perl-install/fsedit.pm2
-rw-r--r--perl-install/install2.pm9
-rw-r--r--perl-install/install_any.pm27
-rw-r--r--perl-install/install_steps.pm26
-rw-r--r--perl-install/install_steps_gtk.pm39
-rw-r--r--perl-install/install_steps_interactive.pm47
-rw-r--r--perl-install/interactive_gtk.pm12
-rw-r--r--perl-install/loopback.pm19
-rw-r--r--perl-install/mouse.pm3
-rw-r--r--perl-install/partition_table.pm6
-rw-r--r--perl-install/pkgs.pm11
-rw-r--r--perl-install/resize_fat/boot_sector.pm3
-rwxr-xr-xperl-install/standalone/XFdrake3
-rwxr-xr-xperl-install/standalone/diskdrake2
-rw-r--r--tools/Makefile3
-rwxr-xr-xtools/gencompss14
24 files changed, 263 insertions, 98 deletions
diff --git a/docs/TODO b/docs/TODO
index 3f65d514a..3430ed919 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -26,6 +26,8 @@ bug if ide-scsi, no more hdX, but scd0 (aka sr0)
check on update for conf.modules and modules.conf !
-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).
@@ -33,13 +35,10 @@ handle NT (add entry for it in lilo, put it in fstab)
(7.1 or later) clean SCSI CDROM autoboot.
stage1 & cdrom: add ability in expert to choose the scsi cdrom drive to use
-(7.1) sparc ehancement, avoid V7+ machine target (div and mul not in v7 standard)
-
(7.1)syslinux in graphical mode to be improved for heavily bogus BIOSes.
(7.1)install in 800x600
- need handling of both 640x480 (mostly for VGA16) and 800x600
-(7.1)individual package selection: double click is tiring...
(7.1)better help for partitioning in newbie
(7.1 or later?)help in some configuration files.
@@ -85,7 +84,6 @@ use option nocheck to mount for upgrades
-fixes needing thinking-----------------------------------------------------------------
bug: changing mem= in miscellaneous doesn't modify lilo conf if you backtrack
-
with /usr, /usr/local and /usr/local/e mount points i get an error at step mounting local filesystems
ask network configuration only if NIC found?
@@ -491,3 +489,7 @@ in the middle, remove the first one. Result hda5 at the end and bug.
(obsolete) have a better time estimation of the remaining time in install packages
(done,dindinx+pix)ask_many_from_list can't keyboard scroll
+
+(done,pix,7.1)individual package selection: double click is tiring...
+
+(done,fpons,7.1) sparc ehancement, avoid V7+ machine target (div and mul not in v7 standard)
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 82ceb1aea..d482b0c96 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,26 @@
+2000-03-30 Pixel <pixel@mandrakesoft.com>
+
+ * install_steps_gtk.pm (choosePackagesTree): enhance tree selection
+
+2000-03-29 Pixel <pixel@mandrakesoft.com>
+
+ * interactive_gtk.pm (wait_messageW): add some padding (nicer)
+
+ * install_steps_interactive.pm (generateAutoInstFloppy): created,
+ creates a floppy for auto installs.
+
+ * install_any.pm (generate_ks_cfg): created, generates stage1
+ ks.cfg file
+
+ * share/po/DrakX.pot: added special comment for grub entry
+
+2000-03-28 Pixel <pixel@mandrakesoft.com>
+
+ * install_steps_interactive.pm (selectKeyboard): sort langs for
+ many-lang install
+
+ * mouse.pm (write): add WHEEL telling if a wheel mouse is there
+
2000-03-28 Pablo Saratxaga <pablo@mandrakesoft.com>
* keyboard.pm: added entries for all three Armenian keyboards
diff --git a/perl-install/Makefile b/perl-install/Makefile
index d2cdc4e97..46c477d18 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -16,7 +16,7 @@ tar-drakxtools: clean
$(MAKE) -C ../tools clean
cd .. ; rm -rf drakxtools ; cp -af perl-install drakxtools ; cp -af tools/ddcprobe tools/pnp_serial drakxtools
cd ../drakxtools ; rm -rf install* pkgs.pm ftp.pm t.pm */CVS ; mv Makefile.drakxtools Makefile ; mv -f standalone/* .
- cd .. ; tar cfy drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile Makefile.config share/MonitorsDB share/CardsNames Newt c ddcprobe pnp_serial share/po pci_probing resize_fat share/diskdrake.rc $(STANDALONEPMS) icons *.pm)
+ cd .. ; tar cfy drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile Makefile.config share/MonitorsDB share/Cards+ share/CardsNames Newt c ddcprobe pnp_serial share/po pci_probing resize_fat share/diskdrake.rc $(STANDALONEPMS) icons *.pm)
cd .. ; rm -rf drakxtools
$(DIRS):
@@ -118,10 +118,10 @@ endif
cd share ; cp -a keymaps $(DEST)/usr/share
cd share ; cp -a consolefonts $(DEST)/usr/share
cd share ; cp template.in/*.in $(DEST)/usr/share
- cd share ; cp MonitorsDB CardsNames $(DEST)/usr/X11R6/lib/X11
+ cd share ; cp MonitorsDB Cards+ CardsNames $(DEST)/usr/X11R6/lib/X11
cd share ; cp *.xpm $(DEST)/usr/share
cd share ; cp -a themes $(DEST)/usr/share/gtk
- cd share ; cp compss compssUsers compssList $(ROOTDEST)/Mandrake/base
+ cd share ; cp compssUsers compssList $(ROOTDEST)/Mandrake/base
if [ -f "../modules/modules.cz2" ]; then \
cp -f ../modules/modules.cz2 $(DEST)/lib/; \
diff --git a/perl-install/Makefile.drakxtools b/perl-install/Makefile.drakxtools
index 92c5e6d76..3037d996c 100644
--- a/perl-install/Makefile.drakxtools
+++ b/perl-install/Makefile.drakxtools
@@ -27,7 +27,7 @@ install:
ln -s ../../$(patsubst $(PREFIX)/usr%,%,$(SBINDEST))/XFdrake $(BINX11DEST)/Xdrakres
for i in *.pm ; do perl -pe '$$_ = "\n" if /\s*use\s+(diagnostics|vars|strict)/' $$i > $(LIBDEST)/$$i ; done
- install -m 644 share/MonitorsDB share/CardsNames $(LIBX11DEST)
+ install -m 644 share/{MonitorsDB,CardsNames,Cards+} $(LIBX11DEST)
install -m 644 share/diskdrake.rc $(ETCDEST)
install -m 644 share/po/*.po $(LIBDEST)/po
install -m 644 $(patsubst %,Newt/%.pm,Newt) $(LIBDEST)/Newt
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index f71a08454..0ca3fe1f3 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -2,7 +2,7 @@ package Xconfigurator;
use diagnostics;
use strict;
-use vars qw($in $install $isLaptop $resolution_wanted @window_managers @depths @monitorSize2resolution @hsyncranges %min_hsync4wres @vsyncranges %depths @resolutions %serversdriver @svgaservers @accelservers @allbutfbservers @allservers %vgamodes %videomemory @ramdac_name @ramdac_id @clockchip_name @clockchip_id %keymap_translate %standard_monitors $s3_comment $cirrus_comment $XF86firstchunk_text $keyboardsection_start $keyboardsection_start_v4 $keyboardsection_part2 $keyboardsection_part3 $keyboardsection_part3_v4 $keyboardsection_end $pointersection_text $pointersection_text_v4 $monitorsection_text1 $monitorsection_text2 $monitorsection_text3 $monitorsection_text4 $modelines_text_Trident_TG_96xx $modelines_text $devicesection_text $devicesection_text_v4 $screensection_text1 %lines @options %xkb_options $default_monitor $layoutsection_v4);
+use vars qw($in $install $isLaptop $resolution_wanted @window_managers @depths @monitorSize2resolution @hsyncranges %min_hsync4wres @vsyncranges %depths @resolutions %serversdriver @svgaservers @accelservers @allbutfbservers @allservers %vgamodes %videomemory @ramdac_name @ramdac_id @clockchip_name @clockchip_id %keymap_translate %standard_monitors $XF86firstchunk_text $keyboardsection_start $keyboardsection_start_v4 $keyboardsection_part2 $keyboardsection_part3 $keyboardsection_part3_v4 $keyboardsection_end $pointersection_text $pointersection_text_v4 $monitorsection_text1 $monitorsection_text2 $monitorsection_text3 $monitorsection_text4 $modelines_text_Trident_TG_96xx $modelines_text $devicesection_text $devicesection_text_v4 $screensection_text1 %lines @options %xkb_options $default_monitor $layoutsection_v4);
use pci_probing::main;
use common qw(:common :file :functional :system);
@@ -76,11 +76,6 @@ sub readCardsDB {
$f ? &$f() : log::l("unknown line $lineno ($_)");
}
- push @{$cards{S3}{lines}}, $s3_comment;
- push @{$cards{'CL-GD'}{lines}}, $cirrus_comment;
-
- #- this entry is broken in X11R6 cards db
- $cards{I128}{flags}{noclockprobe} = 1;
\%cards;
}
sub readCardsNames {
@@ -100,7 +95,7 @@ sub cardName2RealName {
}
sub cardName2card {
my ($name) = @_;
- readCardsDB("/usr/X11R6/lib/X11/Cards")->{$name};
+ readCardsDB("/usr/X11R6/lib/X11/Cards+")->{$name};
}
sub readMonitorsDB {
@@ -183,11 +178,12 @@ sub cardConfiguration(;$$$) {
add2hash($card, cardName2card($card->{type})) if $card->{type};
add2hash($card, { vendor => "Unknown", board => "Unknown" });
- $card->{prog} = "/usr/X11R6/bin/XF86_$card->{server}";
+ $card->{prog} = "/usr/X11R6/bin/" . ($::xf4 ? 'XFree86' : "XF86_$card->{server}");
-x "$prefix$card->{prog}" or $install && do {
$in->suspend;
&$install($card->{server});
+ &$install('server') if $::xf4;
$in->resume;
};
-x "$prefix$card->{prog}" or die "server $card->{server} is not available (should be in $prefix$card->{prog})";
@@ -271,8 +267,9 @@ sub testConfig($) {
unlink "/tmp/.X9-lock";
#- restart_xfs;
+ my $f = $tmpconfig . ($::xf4 && "-4");
local *F;
- open F, "$prefix$o->{card}{prog} :9 -probeonly -pn -xf86config $tmpconfig 2>&1 |";
+ open F, "$prefix$o->{card}{prog} :9 -probeonly -pn -xf86config $f 2>&1 |";
foreach (<F>) {
$o->{card}{memory} ||= $2 if /(videoram|Video RAM):\s*(\d*)/;
@@ -335,7 +332,7 @@ sub testFinalConfig($;$$) {
open STDERR, ">$f_err";
chroot $prefix if $prefix;
exec $o->{card}{prog},
- "-xf86config", $::testing ? $tmpconfig : $f,
+ "-xf86config", ($::testing ? $tmpconfig : $f) . ($::xf4 && "-4"),
":9" or c::_exit(0);
}
@@ -759,9 +756,13 @@ EndSection
print F " Clocks $_\n" foreach (@{$O->{clocklines}});
print G " Clocks $_\n" foreach (@{$O->{clocklines}});
}
+ do { print F; print G } for qq(
+
+ # Uncomment following option if you see a big white block
+ # instead of the cursor!
+ #Option "sw_cursor"
- print F "\n";
- print G "\n";
+);
print F map { (!$O->{options}{$_} && '#') . qq( Option "$_"\n) } keys %{$O->{options} || {}};
print G map { (!$O->{options}{$_} && '#') . qq( Option "$_"\n) } keys %{$O->{options} || {}};
print F "EndSection\n\n\n";
@@ -776,7 +777,7 @@ EndSection
print $f " DefaultColorDepth $defdepth\n" if $defdepth;
foreach (ikeys(%$depths)) {
- my $m = $server ne "fbdev" ? join(" ", map { qq("$_->[0]x$_->[1]") } @{$depths->{$_}}) : qq("default");
+ my $m = $server ne "fbdev" ? join(" ", map { qq("$_->[0]x$_->[1]") } @{$depths->{$_}}) : qq("default"); #-"
print $f qq( Subsection "Display"\n);
print $f qq( Depth $_\n) if $_;
print $f qq( Modes $m\n);
@@ -793,7 +794,7 @@ Section "Screen"
Driver "$server"
Device "$device"
Monitor "$o->{monitor}{type}"
-);
+); #-"
$subscreen->(*F, $server, $defdepth, $depths);
};
@@ -827,9 +828,13 @@ Section "Screen"
Device "$O->{type}"
Monitor "$o->{monitor}{type}"
);
- $subscreen->(*G, "svga", $O->{default_depth}, $O->{depth});
+ #- bpp 32 not handled by XF4
+ $subscreen->(*G, "svga", min($O->{default_depth}, 24), $O->{depth});
print G $layoutsection_v4;
+
+ close F;
+ close G;
}
sub XF86check_link {
diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm
index fab7106f1..086b9f85b 100644
--- a/perl-install/Xconfigurator_consts.pm
+++ b/perl-install/Xconfigurator_consts.pm
@@ -326,23 +326,6 @@ $default_monitor = "High Frequency SVGA, 1024x768 at 70 Hz";
'ru' => [ 'XkbVariant "winkeys"', 'XkbOptions "grp:caps_toggle"' ],
);
-$s3_comment = '
-# Use Option "nolinear" if the server doesn\'t start up correctly
-# (this avoids the linear framebuffer probe). If that fails try
-# option \"nomemaccess\".
-#
-# Refer to /usr/X11R6/lib/doc/README.S3, and the XF86_S3 man page.
-';
-
-$cirrus_comment = '
-# Use Option \"no_bitblt\" if you have graphics problems. If that fails
-# try Option \"noaccel\".
-# Refer to /usr/X11R6/lib/doc/README.cirrus.
-# To allow linear addressing, uncomment the Option line and the
-# address that the card maps the framebuffer to.
-';
-
-
$XF86firstchunk_text = '
# File generated by XFdrake.
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 777038e2e..3d38e91a4 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -8,7 +8,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int
%EXPORT_TAGS = (
common => [ qw(__ even odd arch min max sqr sum and_ or_ sign product bool invbool listlength bool2text bool2yesno text2bool to_int to_float ikeys member divide is_empty_array_ref is_empty_hash_ref add2hash add2hash_ set_new set_add round round_up round_down first second top uniq translate untranslate warp_text formatAlaTeX formatLines deref) ],
functional => [ qw(fold_left compose map_index grep_index map_each grep_each list2kv map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie) ],
- file => [ qw(dirname basename touch all glob_ cat_ output symlinkf chop_ mode typeFromMagic) ],
+ file => [ qw(dirname basename touch all glob_ cat_ output symlinkf chop_ mode typeFromMagic expand_symlinks) ],
system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInCsh substInFile availableRam availableMemory removeXiBSuffix template2file formatTime) ],
constant => [ qw($printable_chars $sizeof_int $bitof_int $SECTORSIZE) ],
);
@@ -96,6 +96,28 @@ sub remove_spaces { local $_ = shift; s/^ +//; s/ +$//; $_ }
sub mode { my @l = stat $_[0] or die "unable to get mode of file $_[0]: $!\n"; $l[2] }
sub psizeof { length pack $_[0] }
+sub concat_symlink {
+ my ($f, $l) = @_;
+ $l =~ m|^\.\./(/.*)| and return $1;
+
+ $f =~ s|/$||;
+ while ($l =~ s|^\.\./||) {
+ $f =~ s|/[^/]+$|| or die "concat_symlink: $f $l\n";
+ }
+ "$f/$l";
+}
+
+sub expand_symlinks {
+ my ($first, @l) = split '/', $_[0];
+ $first eq '' or die "expand_symlinks: $_[0] is relative\n";
+ my ($f, $l);
+ foreach (@l) {
+ $f .= "/$_";
+ $f = concat_symlink($f, "../$l") while $l = readlink $f;
+ }
+ $f;
+}
+
sub arch() {
require Config;
Config->import;
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 15db77742..04cef1ccb 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -63,7 +63,7 @@ sub isRemovableDrive() { &isZipDrive || &isLS120Drive } #-or &isJazzDrive }
sub hasSCSI() {
local *F;
- open F, "/proc/scsi/scsi" or log::l("failed to open /proc/scsi/scsi: $!"), return 0;
+ open F, "/proc/scsi/scsi" or return 0;
foreach (<F>) {
/devices: none/ and log::l("no scsi devices are available"), return 0;
}
@@ -197,20 +197,18 @@ sub syslog {
sub hasSMP { c::detectSMP() }
-#- warning: hasHPT does a pci probe
-sub hasHPT {
+#- warning: hasUltra66 does a pci probe
+sub hasUltra66 {
cat_("/proc/cmdline") =~ /(ide2=(\S+)(\s+ide3=(\S+))?)/ and return $1;
require pci_probing::main;
my @l = map { $_->[0] } grep { $_->[1] =~ /(HPT|Ultra66)/ } pci_probing::main::probe('STORAGE_OTHER', 'more') or return;
- my $ide = sprintf "ide2=0x%x,0x%x ide3=0x%x,0x%x", map_index { hex($_) + (odd($::i) ? 1 : -1) } do {
- if (@l == 2) {
- map { (split ' ')[3..4] } @l
- } else {
- map { (split ' ')[3..6] } @l
- }
- };
+ my $ide = sprintf "ide2=0x%x,0x%x ide3=0x%x,0x%x",
+ @l == 2 ?
+ (map_index { hex($_) + (odd($::i) ? 1 : -1) } map { (split ' ')[3..4] } @l) :
+ (map_index { hex($_) - 1 } map { (split ' ')[3..6] } @l);
+
log::l("HPT|Ultra66: found $ide");
$ide;
}
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index b89ffe25c..5045387f3 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -35,7 +35,7 @@ arch() =~ /^sparc/ ? (
{ mntpoint => "/tmp", size => 50 << 11, type => 0x83, ratio => 3, maxsize => 500 << 11 },
{ mntpoint => "/mnt/iso", size => 700 << 11, type => 0x83 },
);
-my @suggestions_mntpoints = qw(/mnt/dos);
+my @suggestions_mntpoints = qw(/mnt/windows);
my @partitions_signatures = (
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 1622b9cf0..6d028ebd2 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -63,6 +63,7 @@ arch() !~ /alpha/ ? (
) : (),
setupBootloader => [ __("Install bootloader"), 1, 1, '', "doInstallStep" ],
configureX => [ __("Configure X"), 1, 1, '', ["formatPartitions", "setupBootloader"] ],
+ generateAutoInstFloppy => [ __("Auto install floppy"), 1, 1, '!corporate !expert', "doInstallStep" ],
exitInstall => [ __("Exit install"), 0, 0, 'beginner' ],
);
for (my $i = 0; $i < @installSteps; $i += 2) {
@@ -473,6 +474,11 @@ sub configureX {
$o->setupXfree if pkgs::packageFlagInstalled(pkgs::packageByName($o->{packages}, 'XFree86')) || $clicked;
}
#------------------------------------------------------------------------------
+sub generateAutoInstFloppy {
+ $o->generateAutoInstFloppy;
+}
+
+#------------------------------------------------------------------------------
sub exitInstall { $o->exitInstall(getNextStep() eq "exitInstall") }
@@ -524,6 +530,7 @@ sub main {
newt => sub { $o->{interactive} = "newt" },
text => sub { $o->{interactive} = "newt" },
stdio => sub { $o->{interactive} = "stdio"},
+ corporate => sub { $::corporate = 1 },
ks => sub { $::auto_install = 1 },
kickstart => sub { $::auto_install = 1 },
auto_install => sub { $::auto_install = 1 },
@@ -599,6 +606,8 @@ sub main {
#- needed very early for install_steps_gtk
eval { ($o->{mouse}, $o->{wacom}) = mouse::detect() } unless $o->{nomouseprobe} || $o->{mouse};
+ $o->{allowFB} = listlength(cat_("/proc/fb"));
+
my $o_;
while (1) {
require"install_steps_$o->{interactive}.pm";
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 4c462f48d..663efb171 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -487,7 +487,7 @@ sub g_auto_install(;$) {
my @fields = qw(mntpoint type size);
$o->{partitions} = [ map { my %l; @l{@fields} = @$_{@fields}; \%l } grep { $_->{mntpoint} } @{$::o->{fstab}} ];
- exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse wacom netc timezone superuser intf keyboard mkbootdisk users installClass partitioning isUpgrade manualFstab nomouseprobe crypto modem useSupermount); #- TODO modules bootloader
+ exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse wacom netc timezone superuser intf keyboard mkbootdisk users installClass partitioning isUpgrade manualFstab nomouseprobe crypto security modem useSupermount); #- TODO modules bootloader
if (my $card = $::o->{X}{card}) {
$o->{X}{card}{$_} = $card->{$_} foreach qw(default_depth);
@@ -512,7 +512,7 @@ sub loadO {
if ($f =~ /^(floppy|patch)$/) {
my $f = $f eq "floppy" ? "auto_inst.cfg" : "patch";
unless ($::testing) {
- fs::mount(devices::make("fd0"), "/mnt", "vfat", 0);
+ fs::mount(devices::make("fd0"), "/mnt", "vfat", 'readonly');
$f = "/mnt/$f";
}
-e $f or $f .= ".pl";
@@ -758,5 +758,28 @@ sub move_desktop_file($) {
}
}
+sub generate_ks_cfg {
+ my ($o) = @_;
+
+ return if $o->{method} =~ /hd|cdrom/;
+
+ my $ks;
+ if ($o->{method} =~ /ftp|http/) {
+ $ks .= "url --url $ENV{URLPREFIX}\n";
+ } elsif ($o->{method} =~ /nfs/) {
+ cat_("/proc/mounts") =~ m|(\S+:\S+)\s+/tmp/rhimage nfs| or die;
+ $ks .= "nfs --server $1 --dir $2\n";
+ }
+ my %intf = %{$o->{intf}[0]};
+ if ($intf{BOOTPROTO} =~ /^(dhcp|bootp)$/) {
+ $ks .= "network --bootproto $intf{BOOTPROTO}\n";
+ } else {
+ my %l = (ip => $intf{IPADDR}, netmask => $intf{NETMASK}, gateway => $o->{netc}{GATEWAY});
+ $ks .= "network " . join(" ", map_each { $::b && "--$::a $::b" } %l);
+ $ks .= "--nameserver $_" foreach network::dnsServers($o->{netc});
+ $ks .= "\n";
+ }
+ $ks;
+}
1;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 3bef8b6bf..1108398a5 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -113,7 +113,7 @@ sub selectInstallClass($@) {
}
#------------------------------------------------------------------------------
sub setupSCSI {
- modules::load("ide-mod", 'prereq', 'options="' . detect_devices::hasHPT() . '"');
+ modules::load("ide-mod", 'prereq', 'options="' . detect_devices::hasUltra66() . '"');
modules::load_multi(qw(ide-probe ide-disk ide-cd));
modules::load_thiskind('scsi');
}
@@ -247,6 +247,8 @@ sub installPackages($$) { #- complete REWORK, TODO and TOCHECK!
sub afterInstallPackages($) {
my ($o) = @_;
+ return if $::g_auto_install;
+
-x "$o->{prefix}/usr/bin/dumpkeys" or $::testing or die
"Some important packages didn't get installed properly.
@@ -316,6 +318,19 @@ Consoles 1,3,4,7 may also contain interesting information";
}
}
+ my $hasttf;
+ my $dest = "$o->{prefix}/usr/X11R6/lib/X11/fonts/drakfont";
+ foreach (map { $_->{mntpoint} } grep { isFat($_) } @{$o->{fstab}}) {
+ my $d = "$_/windows/fonts";
+ -d "$o->{prefix}$d" or next;
+ unless ($hasttf) {
+ mkdir $dest, 0755;
+ $hasttf = 1;
+ }
+ /(.*)\.ttf/i and symlink "$d/$_", "$dest/$1.ttf" foreach grep { /\.ttf/i } all("$o->{prefix}$d");
+ }
+ run_program::rooted($o->{prefix}, "ttmkfdir", "-d", $dest, "-o", "$dest/fonts.dir") if $hasttf;
+
foreach (install_any::list_skels()) {
my $found;
substInFile {
@@ -667,7 +682,7 @@ sub setupBootloader($) {
eval { lilo::install($o->{prefix}, $o->{bootloader}, $o->{fstab}) };
my $err = $@;
eval { lilo::install_grub($o->{prefix}, $o->{bootloader}, $o->{fstab}, $o->{hds}) };
- die $err if $err;
+ die $err if $@;
}
}
@@ -686,6 +701,8 @@ 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");
}
@@ -759,6 +776,11 @@ sub miscellaneous {
}
#------------------------------------------------------------------------------
+sub generateAutoInstFloppy($) {
+ my ($o) = @_;
+}
+
+#------------------------------------------------------------------------------
sub cleanIfFailedUpgrade($) {
my ($o) = @_;
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 32a5b73e5..8aa06986e 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -210,7 +210,7 @@ sub new($$) {
chmod 0755, "$dir/XF86_$_";
}
if (/FB/) {
- !$o->{vga16} && listlength(cat_("/proc/fb")) or next;
+ !$o->{vga16} && $o->{allowFB} or next;
$o->{allowFB} = &$launchX("XF86_$_") #- keep in mind FB is used.
and goto OK;
@@ -367,9 +367,9 @@ sub choosePackagesTree {
my $w = my_gtk->new('');
my $details = new Gtk::VBox(0,0);
- my $tree = Gtk::CTree->new(2, 0);
+ my $tree = Gtk::CTree->new(3, 0);
$tree->set_selection_mode('browse');
- $tree->set_column_auto_resize($_, 1) foreach 0..1;
+ $tree->set_column_auto_resize($_, 1) foreach 0..2;
gtkadd($w->{window},
gtkpack_(new Gtk::VBox(0,5),
@@ -392,20 +392,20 @@ sub choosePackagesTree {
my $dir = $::testing && $ENV{SHARE_PATH} || "/usr/share";
my $pix_base = [ Gtk::Gdk::Pixmap->create_from_xpm($w->{window}->window, $w->{window}->style->bg('normal'), "$dir/rpm-base.xpm") ];
my $pix_selected = [ Gtk::Gdk::Pixmap->create_from_xpm($w->{window}->window, $w->{window}->style->bg('normal'), "$dir/rpm-selected.xpm") ];
- my $pix_unselect = [ Gtk::Gdk::Pixmap->create_from_xpm_d($w->{window}->window, undef, "1 1 1 1", " c None", " ") ];
+ my $pix_unselect = [ Gtk::Gdk::Pixmap->create_from_xpm($w->{window}->window, $w->{window}->style->bg('normal'), "$dir/rpm-unselected.xpm") ];
my $parent; $parent = sub {
if (my $w = $wtree{$_[0]}) { return $w }
my $s; foreach (split '/', $_[0]) {
$wtree{"$s/$_"} ||=
- $tree->insert_node($s ? $parent->($s) : undef, undef, [$_], 5, (undef) x 4, 0, 0);
+ $tree->insert_node($s ? $parent->($s) : undef, undef, [$_, '', ''], 5, (undef) x 4, 0, 0);
$s = "$s/$_";
}
$wtree{$s};
};
my $add_node = sub {
my ($leaf, $root) = @_;
- my $node = $tree->insert_node($parent->($root), undef, [$leaf], 5, (undef) x 4, 1, 0);
+ my $node = $tree->insert_node($parent->($root), undef, [$leaf, '', ''], 5, (undef) x 4, 1, 0);
my $p = $packages->[0]{$leaf} 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]);
@@ -439,16 +439,6 @@ sub choosePackagesTree {
0;
};
- $tree->signal_connect(tree_select_row => sub {
- Gtk->timeout_remove($idle) if $idle;
-
- if ($_[1]->row->is_leaf) {
- ($curr) = $tree->node_get_pixtext($_[1], 0);
- $idle = Gtk->timeout_add(100, $display_info);
- } else {
- $curr = $_[1];
- }
- });
my $update_size = sub {
my $size = 0;
foreach (values %{$packages->[0]}) {
@@ -486,6 +476,17 @@ sub choosePackagesTree {
&$toggle if $e->{keyval} >= 0x100 ? $c eq "\r" || $c eq "\x8d" : $c eq ' ';
1;
});
+ $tree->signal_connect(tree_select_row => sub {
+ Gtk->timeout_remove($idle) if $idle;
+
+ if ($_[1]->row->is_leaf) {
+ ($curr) = $tree->node_get_pixtext($_[1], 0);
+ $idle = Gtk->timeout_add(100, $display_info);
+ } else {
+ $curr = $_[1];
+ }
+ &$toggle if $_[2] == 1;
+ });
&$update_size;
$w->main;
}
@@ -497,7 +498,7 @@ sub installPackages {
my ($current_total_size, $last_size, $nb, $total_size, $start_time, $last_dtime, $trans_progress_total);
my $w = my_gtk->new(_("Installing"), grab => 1);
- $w->{window}->set_usize($::windowwidth * 0.8, $::windowheight * 0.5);
+ $w->{window}->set_usize($::windowwidth * 0.8, 280);
my $text = new Gtk::Label;
my ($msg, $msg_time_remaining, $msg_time_total) = map { new Gtk::Label($_) } '', (_("Estimating")) x 2;
my ($progress, $progress_total) = map { new Gtk::ProgressBar } (1..2);
@@ -747,7 +748,9 @@ sub create_steps_window {
$b;
} grep {
local $_ = $o->{steps}{$_}{hidden};
- /^$/ or $o->{installClass} and /beginner/ && !$::beginner || /!expert/ && $::expert
+ /^$/ or $o->{installClass} and !/!expert/ || $::expert
+ and !/beginner/ || !$::beginner
+ and !/!corporate/ || $::corporate;
} @{$o->{orderedSteps}}),
0, gtkpack(new Gtk::HBox(0,0), map {
my $t = $_;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 6b907da0f..d07466a94 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -79,7 +79,7 @@ sub selectKeyboard($) {
if ($::expert) {
my $langs = $o->ask_many_from_list('',
_("You can choose other languages that will be available after install"),
- [ lang::list() ]) or goto &selectLanguage if $::expert;
+ [ sort lang::list() ]) or goto &selectLanguage if $::expert;
$o->{langs} = [ $o->{lang}, grep_index { $langs->[$::i] } lang::list() ];
}
}
@@ -267,17 +267,17 @@ sub choosePackages {
pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $::expert ? 90 : 80, $available, $o->{installClass});
my $min_size = pkgs::selectedSize($packages);
- $o->chooseGroups($packages, $compssUsers, $compssUsersSorted);
+# $o->chooseGroups($packages, $compssUsers, $compssUsersSorted);
my $max_size = int (sum map { pkgs::packageSize($_) } values %{$packages->[0]});
- if (!$::beginner && $max_size > $available) {
+ if (0 && !$::beginner && $max_size > $available) {
$o->ask_okcancel('',
_("You need %dMB for a full install of the groups you selected.
You can go on anyway, but be warned that you won't get all packages", $max_size / sqr(1024)), 1) or goto &choosePackages
}
- my $size2install = $::beginner && $first_time ? $available * 0.7 : $o->chooseSizeToInstall($packages, $min_size, min($max_size, $available * 0.9)) or goto &choosePackages;
+ my $size2install = 1 || $::beginner && $first_time ? $available * 0.7 : $o->chooseSizeToInstall($packages, $min_size, min($max_size, $available * 0.9)) or goto &choosePackages;
($o->{packages_}{ind}) =
pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, 1, $size2install, $o->{installClass});
@@ -1043,6 +1043,43 @@ sub setupXfree {
}
#------------------------------------------------------------------------------
+sub generateAutoInstFloppy($) {
+ my ($o) = @_;
+
+ my ($floppy) = detect_devices::floppies();
+
+ $o->ask_yesorno('',
+"Do you want to generate an auto install floppy for linux replication?", $floppy) or return;
+
+ $o->ask_warn('', _("Insert a blank floppy in drive %s", $floppy));
+
+ my $dev = devices::make($floppy);
+
+ my $image = $o->{pcmcia} ? "pcmcia" :
+ ${{ hd => 'hd', cdrom => 'cdrom', ftp => 'network', nfs => 'network', http => 'network' }}{$o->{method}};
+
+ if (my $fd = install_any::getFile("$image.img")) {
+ my $w = $o->wait_message('', _("Creating auto install floppy"));
+ local *OUT;
+ open OUT, ">$dev" or log::l("failed to write $dev"), return;
+ local $/ = \ (16 * 1024);
+ print OUT foreach <$fd>;
+ }
+ fs::mount($dev, "/floppy", "vfat", 0);
+ substInFile { s/timeout.*//; s/^(\s*append)/$1 kickstart=floppy/ } "/floppy/syslinux.cfg";
+
+ local $o->{partitioning}{clearall} = 1;
+ install_any::g_auto_install("/floppy/auto_inst.cfg");
+
+ output "/floppy/ks.cfg", install_any::generate_ks_cfg($o);
+ output "/floppy/boot.msg", "0c",
+"!! If you press enter, an auto-install is going to start.
+ All data on this computer is going to be lost !!
+", "07";
+ fs::umount("/floppy");
+}
+
+#------------------------------------------------------------------------------
sub exitInstall {
my ($o, $alldone) = @_;
@@ -1150,7 +1187,7 @@ sub setup_thiskind {
{
my $w = $o->wait_message(_("IDE"), _("Configuring IDE"));
- modules::load("ide-mod", 'prereq', $allow_probe && 'options="' . detect_devices::hasHPT() . '"');
+ modules::load("ide-mod", 'prereq', $allow_probe && 'options="' . detect_devices::hasUltra66() . '"');
modules::load_multi(qw(ide-probe ide-disk ide-cd));
}
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index 773ad345f..7cfc44f57 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -296,13 +296,13 @@ sub wait_messageW($$$) {
my ($o, $title, $messages) = @_;
my $w = my_gtk->new($title, %$o, grab => 1);
- my $W = pop @$messages;
- gtkadd($w->{window},
- gtkpack(new Gtk::VBox(0,0),
- @$messages,
- $w->{wait_messageW} = new Gtk::Label($W)));
+ gtkadd($w->{window}, my $hbox = new Gtk::HBox(0,0));
+ $hbox->pack_start(my $box = new Gtk::VBox(0,0), 1, 1, 10);
+ $box->pack_start($_, 1, 1, 4) foreach my @l = map { new Gtk::Label($_) } @$messages;
+
+ ($w->{wait_messageW} = $l[$#l])->signal_connect(expose_event => sub { $w->{displayed} = 1 });
$w->{rwindow}->set_position('center') if $::isStandalone;
- $w->{wait_messageW}->signal_connect(expose_event => sub { $w->{displayed} = 1 });
+ $w->{window}->show_all;
$w->sync until $w->{displayed};
$w;
}
diff --git a/perl-install/loopback.pm b/perl-install/loopback.pm
index b7073d5f5..baf8acd8f 100644
--- a/perl-install/loopback.pm
+++ b/perl-install/loopback.pm
@@ -127,6 +127,25 @@ sub verifFile {
undef;
}
+sub prepare_boot {
+ my ($prefix) = @_;
+ my $r = readlink "$prefix/boot";
+ unlink "$prefix/boot";
+ mkdir "$prefix/boot", 0755;
+ [$r, $prefix];
+}
+
+sub save_boot {
+ my ($loop_boot, $prefix) = @{$_[0]};
+
+ $loop_boot or return;
+
+ my @files = glob_("$prefix/boot/*");
+ commands::cp("-f", @files, $loop_boot) if @files;
+ commands::rm("-rf", "$prefix/boot");
+ symlink $loop_boot, "$prefix/boot";
+}
+
1;
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 5bb5b5e8b..20509559c 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -93,7 +93,8 @@ sub read($) {
sub write($;$) {
my ($prefix, $mouse) = @_;
local $mouse->{FULLNAME} = qq("$mouse->{FULLNAME}");
- setVarsInSh("$prefix/etc/sysconfig/mouse", $mouse, qw(MOUSETYPE XMOUSETYPE FULLNAME XEMU3 device));
+ local $mouse->{WHEEL} = bool2yesno($mouse->{nbuttons} > 3);
+ setVarsInSh("$prefix/etc/sysconfig/mouse", $mouse, qw(MOUSETYPE XMOUSETYPE FULLNAME XEMU3 WHEEL device));
symlinkf $mouse->{device}, "$prefix/dev/mouse" or log::l("creating $prefix/dev/mouse symlink failed");
}
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 5eaba831b..68cedfe13 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -158,12 +158,16 @@ arch() =~ /^sparc/ ? (
);
my %type2fs = (
+arch() =~ /^ppc/ ? (
+ 0x07 => 'hpfs',
+) : (
+ 0x07 => 'ntfs',
+),
arch() !~ /^sparc/ ? (
0x01 => 'vfat',
0x04 => 'vfat',
0x05 => 'ignore',
0x06 => 'vfat',
- 0x07 => 'hpfs',
) : (),
0x0b => 'vfat',
0x0c => 'vfat',
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 270272a1f..54045d30e 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -11,6 +11,7 @@ use run_program;
use log;
use pkgs;
use fs;
+use loopback;
use lang;
use c;
@@ -397,7 +398,6 @@ sub readCompss {
s/#.*//;
if (/^(\S+)/) {
- s|:|/|g;
$p = $1 if /^(\S+)/;
} else {
/(\S+)/;
@@ -729,7 +729,7 @@ sub install($$$;$$) {
return if $::g_auto_install || !scalar(@$toInstall);
#- for root loopback'ed /boot
- my $loop_boot = readlink "$prefix/boot"; unlink "$prefix/boot"; mkdir "$prefix/boot", 0755;
+ my $loop_boot = loopback::prepare_boot($prefix);
#- first stage to extract some important informations
#- about the packages selected. this is used to select
@@ -834,12 +834,7 @@ sub install($$$;$$) {
cleanHeaders($prefix);
- if ($loop_boot) {
- my @files = glob_("$prefix/boot/*");
- commands::cp("-f", @files, $loop_boot) if @files;
- commands::rm("-rf", "$prefix/boot");
- symlink $loop_boot, "$prefix/boot";
- }
+ loopback::save_boot($loop_boot);
}
sub remove($$) {
diff --git a/perl-install/resize_fat/boot_sector.pm b/perl-install/resize_fat/boot_sector.pm
index 0ca110af8..dbfc33830 100644
--- a/perl-install/resize_fat/boot_sector.pm
+++ b/perl-install/resize_fat/boot_sector.pm
@@ -3,7 +3,7 @@ package resize_fat::boot_sector;
use diagnostics;
use strict;
-use common qw(:common :system :constant);
+use common qw(:common :system :constant :functional);
use resize_fat::io;
use resize_fat::any;
use resize_fat::directory;
@@ -59,6 +59,7 @@ sub read($) {
$fs->{boot_sign} == 0xAA55 or die "Invalid signature for a MS-based filesystem.";
$fs->{nb_fats} == 2 or die "Weird number of FATs: $fs->{nb_fats}, not 2.",
$fs->{nb_sectors} < 32 and die "Too few sectors for viable file system\n";
+ $fs->{sector_size} == 512 or cdie "Strange sector_size != 512\n";
if ($fs->{fat16_fat_length}) {
#- asserting FAT16, will be verified later on
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake
index 6ebfbca0a..1f3249efd 100755
--- a/perl-install/standalone/XFdrake
+++ b/perl-install/standalone/XFdrake
@@ -26,8 +26,9 @@ use c;
local $_ = join '', @ARGV;
-/-h/ and die "usage: XFdrake [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n";
+/-h/ and die "usage: XFdrake [--xf4] [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n";
+$::xf4 = /-xf4/;
$::beginner = /-beginner/;
$::expert = /-expert/;
$::auto = /-auto/;
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake
index 9b782332a..242f07c6d 100755
--- a/perl-install/standalone/diskdrake
+++ b/perl-install/standalone/diskdrake
@@ -34,7 +34,7 @@ use c;
local $_ = join '', @ARGV;
-/-h/ and die "usage: XFdrake [--expert] [--testing]\n";
+/-h/ and die "usage: diskdrake [--expert] [--testing]\n";
$::expert = /-expert/;
$::testing = /-testing/;
diff --git a/tools/Makefile b/tools/Makefile
index 7c6281459..bece8e754 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -24,6 +24,9 @@ xhost+: %: %.c
ddcprobe/ddcxinfos:
$(MAKE) -C ddcprobe ddcxinfos
+$(BASE)/compss: $(BASE)/hdlists $(BASE)/hdlist.cz2
+ ./gencompss `cat $< | perl -pe 's|(.*)|'$(BASE)'/$$1|' ` > $@
+
$(BASE)/depslist: $(BASE)/hdlists $(BASE)/hdlist.cz2
gendepslist2 -o $@ `cat $< | perl -pe 's|(.*)|'$(BASE)'/$$1|' `
diff --git a/tools/gencompss b/tools/gencompss
new file mode 100755
index 000000000..b26ef7c2c
--- /dev/null
+++ b/tools/gencompss
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+
+open F, "bzip2 -dc @ARGV 2>/dev/null | hdlist2groups - |";
+foreach (<F>) {
+ chop;
+ /(.*):(.*)/;
+ push @{$l{$2}}, $1;
+}
+close F or die;
+foreach (sort keys %l) {
+ print "$_\n";
+ print "\t$_\n" foreach sort @{$l{$_}};
+ print "\n";
+}