From a4299593feb14ed8317da49980b8c06e59688aa2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 14 Apr 2000 23:59:01 +0000 Subject: no_comment --- docs/TODO | 2 ++ perl-install/Xconfigurator.pm | 10 ---------- perl-install/c/stuff.xs.pm | 20 ++++++++++++++++++++ perl-install/common.pm | 13 ++++++++++++- perl-install/fs.pm | 2 ++ perl-install/install2.pm | 16 +++++++++++----- perl-install/install_steps.pm | 5 +++-- perl-install/install_steps_gtk.pm | 6 +++--- perl-install/install_steps_interactive.pm | 13 ++++++++----- perl-install/lang.pm | 5 +---- perl-install/my_gtk.pm | 17 +++++++++-------- perl-install/pkgs.pm | 14 +++++++------- perl-install/share/compssList | 2 +- perl-install/share/install.rc | 5 +++-- perl-install/share/themes-blackwhite.rc | 1 - perl-install/share/themes-blue.rc | 1 - perl-install/share/themes-marble3d.rc | 10 ++++++++++ perl-install/share/themes-mdk.rc | 1 - perl-install/share/themes-savane.rc | 1 - perl-install/share/themes.rc | 8 +++++++- tools/Makefile | 4 ++-- 21 files changed, 101 insertions(+), 55 deletions(-) diff --git a/docs/TODO b/docs/TODO index 576ceb27f..bd7cc376c 100644 --- a/docs/TODO +++ b/docs/TODO @@ -10,6 +10,8 @@ partition is Ok (fixme? allow primary partition inside extended one, but with warning on diskdrake startup, made them as warning ?). -features------------------------------------------------------------------------------- +chooseGroup with individual alone + handle NT (add entry for it in lilo, put it in fstab) (NEED 7.1) auto-install for corporate, very important (need consolidation). diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index bd9cc7934..29c25ed49 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -19,16 +19,6 @@ my ($prefix, %monitors); sub getVGAMode($) { $_[0]->{card}{vga_mode} || $vgamodes{"640x480x16"}; } -sub setVirtual($) { - my $vt = ''; - local *C; - sysopen C, "/dev/console", 2 or die "failed to open /dev/console: $!"; - ioctl(C, c::VT_GETSTATE(), $vt) or die "ioctl VT_GETSTATE failed"; - ioctl(C, c::VT_ACTIVATE(), $_[0]) or die "ioctl VT_ACTIVATE failed"; - ioctl(C, c::VT_WAITACTIVE(), $_[0]) or die "ioctl VT_WAITACTIVE failed"; - unpack "S", $vt; -} - sub readCardsDB { my ($file) = @_; my ($card, %cards); diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index 588d07547..e02e51766 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -11,6 +11,7 @@ print ' #include #include #include +#include #include #include #include @@ -131,6 +132,25 @@ total_sectors(fd) OUTPUT: RETVAL +void +unlimit_core() + CODE: + { + struct rlimit rlim = { RLIM_INFINITY, RLIM_INFINITY }; + setrlimit(RLIMIT_CORE, &rlim); + } + +int +getlimit_core() + CODE: + { + struct rlimit rlim; + getrlimit(RLIMIT_CORE, &rlim); + RETVAL = rlim.rlim_cur; + } + OUTPUT: + RETVAL + void openlog(ident) char *ident diff --git a/perl-install/common.pm b/perl-install/common.pm index 140067284..01bbec0d8 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -9,7 +9,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int 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 expand_symlinks) ], - system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInCsh substInFile availableRam availableMemory removeXiBSuffix template2file formatTime unix2dos) ], + system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInCsh substInFile availableRam availableMemory removeXiBSuffix template2file formatTime unix2dos setVirtual) ], constant => [ qw($printable_chars $sizeof_int $bitof_int $SECTORSIZE) ], ); @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; @@ -479,6 +479,17 @@ sub typeFromMagic($@) { sub availableRam() { sum map { /(\d+)/ } grep { /^(MemTotal):/ } cat_("/proc/meminfo"); } sub availableMemory() { sum map { /(\d+)/ } grep { /^(MemTotal|SwapTotal):/ } cat_("/proc/meminfo"); } +sub setVirtual($) { + my $vt = ''; + local *C; + sysopen C, "/dev/console", 2 or die "failed to open /dev/console: $!"; + ioctl(C, c::VT_GETSTATE(), $vt) or die "ioctl VT_GETSTATE failed"; + ioctl(C, c::VT_ACTIVATE(), $_[0]) or die "ioctl VT_ACTIVATE failed"; + ioctl(C, c::VT_WAITACTIVE(), $_[0]) or die "ioctl VT_WAITACTIVE failed"; + unpack "S", $vt; +} + + sub removeXiBSuffix($) { local $_ = shift; diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 623701c2d..87a49bdb9 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -349,6 +349,8 @@ sub write_fstab($;$$) { isTrueFS($_) and ($freq, $passno) = (1, ($_->{mntpoint} eq '/') ? 1 : 2); isNfs($_) and $dir = '', $options = $_->{options} || 'ro,nosuid,rsize=8192,wsize=8192'; isFat($_) and $options = $_->{options} || "user,exec,umask=0"; + + require fsedit; isReiserfs($_) && $_ == fsedit::get_root($fstab, 'boot') and add_options($options, "notail"); my $dev = isLoopback($_) ? diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 5de9f6cc6..75a3f5fdb 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -145,7 +145,7 @@ $o = $::o = { #- security => 2, shells => [ map { "/bin/$_" } qw(bash tcsh zsh ash ksh) ], authentication => { md5 => 1, shadow => 1 }, - lang => 'en', + lang => 'fr_FR', isUpgrade => 0, toRemove => [], toSave => [], @@ -334,6 +334,8 @@ sub formatPartitions { install_any::getAndSaveFile("lnx4win/$_", "$d/$_") foreach qw(loadlin.exe linux.pif lnx4win.exe lnx4win.ico); } + chdir "$o->{prefix}"; + #-noatime option for ext2 fs on laptops (do not wake up the hd) #- Do not update inode access times on this #- file system (e.g, for faster access on the @@ -489,15 +491,19 @@ sub exitInstall { $o->exitInstall(getNextStep() eq "exitInstall") } #-###################################################################################### sub main { $SIG{__DIE__} = sub { chomp(my $err = $_[0]); log::l("warning: $err") }; - $SIG{SEGV} = sub { my $msg = "segmentation fault: seems like memory is missing as the install crashes"; print "$msg\n"; log::l($msg); - require install_steps_auto_install; - install_steps_auto_install::errorInStep(); - }; +# $SIG{SEGV} = sub { my $msg = "segmentation fault: seems like memory is missing as the install crashes"; print "$msg\n"; log::l($msg); +# $o->ask_warn('', $msg); +# setVirtual(1); +# require install_steps_auto_install; +# install_steps_auto_install::errorInStep(); +# }; $ENV{SHARE_PATH} ||= "/usr/share"; $ENV{DURING_INSTALL} = 1; $::beginner = $::expert = $::g_auto_install = 0; + c::unlimit_core(); + my ($cfg, $patch); my %cmdline; map { my ($n, $v) = split '='; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index e5062bd66..859bd58b3 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -121,7 +121,6 @@ sub setupSCSI { #------------------------------------------------------------------------------ sub doPartitionDisks { my ($o, $hds) = @_; - return if $::testing; if ($o->{lnx4win}) { my @l = sort { $a->{device_windobe} cmp $b->{device_windobe} } @@ -144,7 +143,9 @@ sub doPartitionDisks { push @{$real_part->{loopback}}, $root, $swap; } else { - partition_table::write($_) foreach @$hds; + unless ($::testing) { + partition_table::write($_) foreach @$hds; + } } } sub doPartitionDisksLnx4winDev {} diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 1e6af32e0..772e5dbbe 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -48,7 +48,7 @@ sub new($$) { my $old = $SIG{__DIE__}; $SIG{__DIE__} = sub { $_[0] !~ /my_gtk\.pm/ and goto $old }; - $ENV{DISPLAY} = $o->{display} || ":0"; + $ENV{DISPLAY} ||= $o->{display} || ":0"; unless ($::testing) { $my_gtk::force_focus = $ENV{DISPLAY} eq ":0"; @@ -599,12 +599,12 @@ style "default-font" { fontset = "$font" } -style "steps" +style "small-font" { fontset = "$font2" } widget "*" style "default-font" -widget "*Steps*" style "steps" +widget "*Steps*" style "small-font" )); } diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 58b64a4dd..aa8f6b5ad 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -658,7 +658,7 @@ sub addUser { my ($o, $clicked) = @_; my $u = $o->{user} ||= {}; if ($::beginner || $o->{security} < 1) { - add2hash_($u, { name => "mandrake", password => "mandrake", realname => "default", icon => translate('automagic') }); + add2hash_($u, { name => "mandrake", password => "mandrake", realname => "default", icon => 'automagic' }); $o->{users} ||= [ $u ]; } $u->{password2} ||= $u->{password} ||= ""; @@ -666,7 +666,9 @@ sub addUser { my @fields = qw(realname name password password2); my @shells = install_any::shells($o); - if (($o->{security} >= 2 && !$::beginner || $clicked) && $o->ask_from_entries_refH( + if (($o->{security} >= 2 && !$::beginner || $clicked)) { + $u->{icon} = translate($u->{icon}); + if ($o->ask_from_entries_refH( [ _("Add user"), _("Accept user"), $o->{security} >= 4 && !@{$o->{users}} ? () : _("Done") ], _("Enter a user\n%s", $o->{users} ? _("(already added %s)", join(", ", map { $_->{realname} || $_->{name} } @{$o->{users}})) : ''), [ @@ -696,9 +698,10 @@ sub addUser { return 0; }, )) { - push @{$o->{users}}, $o->{user}; - $o->{user} = {}; - goto &addUser; + push @{$o->{users}}, $o->{user}; + $o->{user} = {}; + goto &addUser; + } } install_steps::addUser($o); } diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 90b37e751..04f2a1fe6 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -290,10 +290,7 @@ sub load_po($) { $s .= "\%{'$lang'} = ("; my $f; -e ($f = "$_/po/$lang.po") and last foreach @INC; - unless (-e $f) { - -e ($f = "$_") and last foreach @INC; - $f = commands::install_cpio("$f/po", "$lang.po"); - } + local *F; unless ($f && -e $f) { -e ($f = "$_/po/$lang.po.bz2") and last foreach @INC; diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 2c0c185d3..a2aa953bf 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -327,14 +327,15 @@ sub _create_window($$) { $w->signal_connect(focus => sub { Gtk->idle_add(sub { $w->ensure_focus($_[0]); 0 }, $_[1]) }) if $w->can('ensure_focus'); - $w->set_events("pointer_motion_mask"); - my $signal; - $signal = $w->signal_connect(motion_notify_event => sub { - delete $o->{mouse}{unsafe}; - log::l("unsetting unsafe mouse"); - $w->signal_disconnect($signal); - }) if $o->{mouse}{unsafe}; - + if ($::o->{mouse}{unsafe}) { + $w->set_events("pointer_motion_mask"); + my $signal; + $signal = $w->signal_connect(motion_notify_event => sub { + delete $::o->{mouse}{unsafe}; + log::l("unsetting unsafe mouse"); + $w->signal_disconnect($signal); + }); + } $w->signal_connect(key_press_event => sub { my $d = ${{ 65470 => 'help', 65481 => 'next', diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 3824fb1dd..c5c4de8e8 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -919,7 +919,7 @@ sub install($$$;$$) { foreach @transToInstall; my $close = sub { -# c::headerFree(delete $_->{header}) foreach @transToInstall; + c::headerFree(delete $_->{header}) foreach @transToInstall; c::rpmtransFree($trans); }; @@ -935,12 +935,12 @@ sub install($$$;$$) { my @probs = c::rpmRunTransactions($trans, $callbackOpen, $callbackClose, \&installCallback, 0); log::l("rpmRunTransactions done"); - my @badpkgs = map { $_->{file} } grep { !packageFlagInstalled($_) } @transToInstall; - @badpkgs > 0 and - cdie "error installing package list: " . join("\n", @badpkgs), sub { - &$close(); - c::rpmdbClose($db); - }; + if (my @badpkgs = grep { !packageFlagInstalled($_) } @transToInstall) { + cdie "error installing package list: " . join("\n", map { $_->{file} } @badpkgs), sub { + &$close(); + c::rpmdbClose($db); + }; + } #- check for uninstalled package, avoid keeping them selected to avoid trying installing them foreach (@transToInstall) { if (!packageFlagInstalled($_)) { diff --git a/perl-install/share/compssList b/perl-install/share/compssList index 149099317..24a0a6a44 100644 --- a/perl-install/share/compssList +++ b/perl-install/share/compssList @@ -818,7 +818,7 @@ samba-common 0 0 0 sane 45 0 53 sane-devel 10 0 2 sash 5 5 5 -screen 26 0 19 +screen 26 43 79 sdlbomber 65 0 25 sed 97 97 97 sendmail 0 0 0 diff --git a/perl-install/share/install.rc b/perl-install/share/install.rc index 0875a0ece..9d9d30db1 100644 --- a/perl-install/share/install.rc +++ b/perl-install/share/install.rc @@ -3,7 +3,7 @@ style "default-font" fontset = "-*-*-medium-r-normal-*-10-*-*-*-*-*-iso8859-15" } -style "steps" +style "small-font" { fontset = "-*-*-medium-r-normal-*-8-*-*-*-*-*-iso8859-15" } @@ -19,7 +19,8 @@ style "stepsReachable" } widget "*" style "default-font" -widget "*Steps*" style "steps" +widget "Steps" style "steps" +widget "*Steps*" style "small-font" widget "*StepsReachable*" style "stepsReachable" widget "*logo*" style "logo" diff --git a/perl-install/share/themes-blackwhite.rc b/perl-install/share/themes-blackwhite.rc index ece77fe1d..b7d34987f 100644 --- a/perl-install/share/themes-blackwhite.rc +++ b/perl-install/share/themes-blackwhite.rc @@ -60,4 +60,3 @@ widget_class "*GtkCTree*" style "entry" widget_class "*GtkNotebook*" style "notebook" widget "*GtkButton*" style "button" widget "*background*" style "background" -widget "*Steps*" style "steps" diff --git a/perl-install/share/themes-blue.rc b/perl-install/share/themes-blue.rc index d85932b45..434884d5d 100644 --- a/perl-install/share/themes-blue.rc +++ b/perl-install/share/themes-blue.rc @@ -60,4 +60,3 @@ widget_class "*GtkCTree*" style "entry" widget_class "*GtkNotebook*" style "notebook" widget "*GtkButton*" style "button" widget "*background*" style "background" -widget "*Steps*" style "steps" diff --git a/perl-install/share/themes-marble3d.rc b/perl-install/share/themes-marble3d.rc index 32c11b025..9f11ef583 100644 --- a/perl-install/share/themes-marble3d.rc +++ b/perl-install/share/themes-marble3d.rc @@ -182,6 +182,16 @@ style "background" style "steps" { fg[NORMAL] = { 0.40, 0.30, 0.20 } + + engine "pixmap" { + image + { + function = FLAT_BOX + recolorable = TRUE + file = "marble3d-bg1.png" + stretch = FALSE + } + } } style "stepsReachable" diff --git a/perl-install/share/themes-mdk.rc b/perl-install/share/themes-mdk.rc index ca1033977..0644fee94 100644 --- a/perl-install/share/themes-mdk.rc +++ b/perl-install/share/themes-mdk.rc @@ -198,7 +198,6 @@ widget_class "*GtkCTree*" style "entry" widget_class "*GtkNotebook*" style "notebook" widget "*GtkButton" style "button" widget "*background*" style "background" -widget "*Steps*" style "steps" class "GtkRadioButton" style "checkradiobutton" class "GtkCheckButton" style "checkradiobutton" diff --git a/perl-install/share/themes-savane.rc b/perl-install/share/themes-savane.rc index d3c09d7f4..aed22ac41 100644 --- a/perl-install/share/themes-savane.rc +++ b/perl-install/share/themes-savane.rc @@ -60,4 +60,3 @@ widget_class "*GtkCTree*" style "entry" widget_class "*GtkNotebook*" style "notebook" widget "*GtkButton*" style "button" widget "*background*" style "background" -widget "*Steps*" style "steps" diff --git a/perl-install/share/themes.rc b/perl-install/share/themes.rc index 1cfb40937..44aefe065 100644 --- a/perl-install/share/themes.rc +++ b/perl-install/share/themes.rc @@ -1,6 +1,11 @@ +style "mdk" +{ + bg[NORMAL] = { 0.4, 0.4, 0.6 } + bg[PRELIGHT] = { 0.6, 0.6, 0.8 } +} style "marble3d" { - bg[NORMAL] = { 0.80, 0.80, 0.8 } + bg[NORMAL] = { 0.8, 0.8, 0.8 } bg[PRELIGHT] = { 0.9, 0.9, 0.9 } } style "DarkMarble" @@ -23,6 +28,7 @@ style "blue" bg[NORMAL] = { 0, 0, 0.67 } bg[PRELIGHT] = { 0, 0, 1.0 } } +widget "*mdk*" style "mdk" widget "*marble3d*" style "marble3d" widget "*DarkMarble*" style "DarkMarble" widget "*savane*" style "savane" diff --git a/tools/Makefile b/tools/Makefile index 5a0445360..469758906 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -7,13 +7,13 @@ CFLAGS = -Wall .PHONY: clean install $(DIRS) -all: $(BASE)/depslist $(BASE)/filelist $(DIRS) xhost+ install +all: $(BASE)/depslist $(BASE)/filelist $(BASE)/compss $(DIRS) xhost+ install $(DIRS): make -C $@ install: - install make_mdkinst_stage2 $(ROOTDEST)/misc + install make_mdkinst_stage2 gencompss $(ROOTDEST)/misc cd /usr/bin ; install build_archive $(ROOTDEST)/misc || { echo "build_archive is missing"; exit 1; } cd /usr/bin ; install gendepslist2 rpm2header genhdlist_cz2 $(ROOTDEST)/misc || { echo "install rpmtools first!" ; exit 1; } mkdir -p $(DEST)/usr/bin -- cgit v1.2.1