summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile.drakxtools10
-rw-r--r--perl-install/Newt/Newt.xs85
-rw-r--r--perl-install/Xconfig.pm3
-rw-r--r--perl-install/Xconfigurator.pm66
-rw-r--r--perl-install/Xconfigurator_consts.pm2
-rw-r--r--perl-install/common.pm32
-rw-r--r--perl-install/install2.pm13
-rw-r--r--perl-install/install_any.pm2
-rw-r--r--perl-install/install_steps.pm26
-rw-r--r--perl-install/install_steps_interactive.pm6
-rw-r--r--perl-install/interactive.pm6
-rw-r--r--perl-install/interactive_newt.pm10
-rw-r--r--perl-install/lang.pm12
-rw-r--r--perl-install/pkgs.pm4
-rw-r--r--perl-install/raid.pm2
-rw-r--r--perl-install/share/compssList13
-rw-r--r--perl-install/share/compssUsers7
-rwxr-xr-xperl-install/standalone/XFdrake7
-rwxr-xr-xperl-install/standalone/adduserdrake8
-rwxr-xr-xperl-install/standalone/draksec4
20 files changed, 165 insertions, 153 deletions
diff --git a/perl-install/Makefile.drakxtools b/perl-install/Makefile.drakxtools
index c91f6dde6..d3efebb31 100644
--- a/perl-install/Makefile.drakxtools
+++ b/perl-install/Makefile.drakxtools
@@ -5,7 +5,8 @@ SBINDEST = $(PREFIX)/usr/sbin
ETCDEST = $(PREFIX)/etc/gtk
BINDEST = $(PREFIX)/usr/bin
LIBDEST = $(PREFIX)/usr/lib/libDrakX
-X11DEST = $(PREFIX)/usr/X11R6/lib/X11
+BINX11DEST = $(PREFIX)/usr/X11R6/bin
+LIBX11DEST = $(PREFIX)/usr/X11R6/lib/X11
.PHONY: $(DIRS)
@@ -17,12 +18,14 @@ $(DIRS):
$(MAKE) -C $@
install:
- install -d $(BINDEST) $(ETCDEST) $(SBINDEST) $(LIBDEST) $(X11DEST) $(DIRS:%=$(LIBDEST)/%)
+ install -d $(BINDEST) $(ETCDEST) $(SBINDEST) $(LIBDEST) $(BINX11DEST) $(LIBX11DEST) $(DIRS:%=$(LIBDEST)/%)
install $(STANDALONEPMS) $(SBINDEST)
+ mv -f $(SBINDEST)/lspcidrake $(BINDEST)
install -s ddcprobe/ddcxinfos pnp_serial/pnp_serial $(SBINDEST)
+ ln -s $(patsubst $(PREFIX)%,%,$(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 MonitorsDB $(X11DEST)
+ install -m 644 MonitorsDB $(LIBX11DEST)
install -m 644 diskdrake.rc $(ETCDEST)
install -m 644 po/*.po $(LIBDEST)/po
install -m 644 $(patsubst %,Newt/%.pm,Newt) $(LIBDEST)/Newt
@@ -30,4 +33,5 @@ install:
install -m 644 $(patsubst %,pci_probing/%.pm,main pcitable pci_class) $(LIBDEST)/pci_probing
install -m 644 $(patsubst %,resize_fat/%.pm,main any boot_sector c_rewritten dir_entry directory fat info_sector io) $(LIBDEST)/resize_fat
cp -rf auto $(LIBDEST)
+ bzip2 -9 $(LIBDEST)/po/*.po
find $(LIBDEST) -name "*.so" | xargs strip
diff --git a/perl-install/Newt/Newt.xs b/perl-install/Newt/Newt.xs
index e3e71be68..bd0040d9e 100644
--- a/perl-install/Newt/Newt.xs
+++ b/perl-install/Newt/Newt.xs
@@ -63,8 +63,11 @@ newtFinished()
void
newtCls()
-#void
-#newtSuspend()
+void
+newtSuspend()
+
+void
+newtResume()
int
newtCenteredWindow(width,height,title)
@@ -232,94 +235,28 @@ newtListbox(left,top,height,flags)
int height;
int flags;
-void *
+char *
newtListboxGetCurrent(co)
Newt::Component co;
void
-newtListboxSetCurrent(co,num)
- Newt::Component co;
- int num;
-
-void
newtListboxSetCurrentByKey(co,key)
Newt::Component co;
- void * key;
-
-void
-newtListboxSetText(co,num,text)
- Newt::Component co;
- int num;
- const char * text;
-
-void
-newtListboxSetEntry(co,num,text)
- Newt::Component co;
- int num;
- const char * text;
+ char * key;
void
newtListboxSetWidth(co,width)
Newt::Component co;
int width;
-# return the data passed to AddEntry
-void
-newtListboxSetData(co,num,data)
- Newt::Component co;
- int num;
- void * data;
-
int
newtListboxAddEntry(co,text,data)
Newt::Component co;
const char * text;
- const void * data;
-
-# Send the key to insert after, or NULL to insert at the top
-int
-newtListboxInsertEntry(co,text,data,key)
- Newt::Component co;
- const char * text;
- const void * data;
- void * key;
-
-int
-newtListboxDeleteEntry(co,data)
- Newt::Component co;
- void * data;
-
-# removes all entries from listbox
-void
-newtListboxClear(co)
- Newt::Component co;
-
-void
-newtListboxGetEntry(co,num,text,data)
- Newt::Component co;
- int num;
- char * text;
- void * data;
- PPCODE:
- {
- newtListboxGetEntry(co, num, &text, data);
- }
-
-# Returns an array of data pointers from items, last element is NULL
-void *
-newtListboxGetSelection(co,numitems)
- Newt::Component co;
- int *numitems;
-
-void
-newtListboxClearSelection(co)
- Newt::Component co;
-
-void
-newtListboxSelectItem(co,key,sense)
- Newt::Component co;
- void *key
- enum newtFlagsSense sense;
+CODE:
+ RETVAL = newtListboxAddEntry(co, text, text);
+OUTPUT:
+ RETVAL
Newt::Component
newtTextboxReflowed(left,top,text,width,flexDown,flexUp,flags)
diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm
index af03b4019..759696207 100644
--- a/perl-install/Xconfig.pm
+++ b/perl-install/Xconfig.pm
@@ -23,8 +23,7 @@ sub keymap_translate {
sub getinfo {
- my $o = {};
-# getinfoFromXF86Config($o);
+ my $o = shift || {};
getinfoFromDDC($o);
getinfoFromSysconfig($o);
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index da7d574b7..533ee8847 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 $resolution_wanted @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 $intro_text $finalcomment_text $s3_comment $cirrus_comment $probeonlywarning_text $monitorintro_text $hsyncintro_text $vsyncintro_text $XF86firstchunk_text $keyboardsection_start $keyboardsection_part2 $keyboardsection_end $pointersection_text1 $pointersection_text2 $monitorsection_text1 $monitorsection_text2 $monitorsection_text3 $monitorsection_text4 $modelines_text_Trident_TG_96xx $modelines_text $devicesection_text $screensection_text1 %lines @options %xkb_options);
+use vars qw($in $install $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 $intro_text $finalcomment_text $s3_comment $cirrus_comment $probeonlywarning_text $monitorintro_text $hsyncintro_text $vsyncintro_text $XF86firstchunk_text $keyboardsection_start $keyboardsection_part2 $keyboardsection_end $pointersection_text1 $pointersection_text2 $monitorsection_text1 $monitorsection_text2 $monitorsection_text3 $monitorsection_text4 $modelines_text_Trident_TG_96xx $modelines_text $devicesection_text $screensection_text1 %lines @options %xkb_options);
use pci_probing::main;
use common qw(:common :file :functional :system);
@@ -155,19 +155,21 @@ sub cardConfiguration(;$$$) {
undef $card->{type} unless $card->{server}; #- bad type as we can't find the server
add2hash($card, cardConfigurationAuto()) unless $card->{server} || $noauto;
$card->{server} = 'FBDev' unless !$allowFB || $card->{server} || $card->{type} || $noauto;
- $card->{type} = $in->ask_from_list('', _("Select a graphic card"), ['Unlisted', keys %cards]) unless $card->{type} || $card->{server};
- undef $card->{type}, $card->{server} = $in->ask_from_list('', _("Choose a X server"), $allowFB ? \@allservers : \@allbutfbservers ) if $card->{type} eq "Unlisted";
+ $card->{type} = $in->ask_from_list(_("Graphic card"), _("Select a graphic card"), ['Unlisted', keys %cards]) unless $card->{type} || $card->{server};
+ undef $card->{type}, $card->{server} = $in->ask_from_list(_("X server"), _("Choose a X server"), $allowFB ? \@allservers : \@allbutfbservers ) if $card->{type} eq "Unlisted";
add2hash($card, $cards{$card->{type}}) if $card->{type};
add2hash($card, { vendor => "Unknown", board => "Unknown" });
$card->{prog} = "/usr/X11R6/bin/XF86_$card->{server}";
- -x "$prefix$card->{prog}" or $install && &$install($card->{server});
+ -x "$prefix$card->{prog}" or $install && do {
+ $in->suspend;
+ &$install($card->{server});
+ $in->resume;
+ };
-x "$prefix$card->{prog}" or die "server $card->{server} is not available (should be in $prefix$card->{prog})";
- symlinkf "../..$card->{prog}", "$prefix/etc/X11/X" unless $::testing;
-
unless ($card->{type}) {
$card->{flags}{noclockprobe} = member($card->{server}, qw(I128 S3 S3V Mach64));
}
@@ -215,7 +217,7 @@ sub monitorConfiguration(;$$) {
readMonitorsDB(-e "MonitorsDB" ? "MonitorsDB" : "/usr/X11R6/lib/X11/MonitorsDB");
- add2hash($monitor, { type => $in->ask_from_list('', _("Choose a monitor"), ['Unlisted', keys %monitors]) }) unless $monitor->{type};
+ add2hash($monitor, { type => $in->ask_from_list(_("Monitor"), _("Choose a monitor"), ['Unlisted', keys %monitors]) }) unless $monitor->{type};
if ($monitor->{type} eq 'Unlisted') {
$in->ask_from_entries_ref('',
_("The two critical parameters are the vertical refresh rate, which is the rate
@@ -274,9 +276,8 @@ sub testFinalConfig($;$$) {
$o->{card}{depth} or
$in->ask_warn('', _("Resolutions not chosen yet")), return;
- rename("$prefix/etc/X11/XF86Config", "$prefix/etc/X11/XF86Config.old") || die "unable to make a backup of XF86Config" unless $::testing;
-
- write_XF86Config($o, $::testing ? $tmpconfig : "$prefix/etc/X11/XF86Config");
+ my $f = "/etc/X11/XF86Config.test";
+ write_XF86Config($o, $::testing ? $tmpconfig : "$prefix/$f");
$skiptest || $o->{card}{server} eq 'FBDev' and return 1; #- avoid testing since untestable without reboot.
@@ -295,10 +296,10 @@ sub testFinalConfig($;$$) {
my $pid;
unless ($pid = fork) {
open STDERR, ">$f_err";
- my @l = "X";
- @l = ($o->{card}{prog}, "-xf86config", $tmpconfig) if $::testing;
chroot $prefix if $prefix;
- exec @l, ":9" or c::_exit(0);
+ exec $o->{card}{prog},
+ "-xf86config", $::testing ? $tmpconfig : $f,
+ ":9" or c::_exit(0);
}
do { sleep 1 } until c::Xtest(":9") || waitpid($pid, c::WNOHANG());
@@ -476,7 +477,7 @@ sub chooseResolutions($$;$) {
my ($card, $chosen_depth, $chosen_w) = @_;
my $best_w;
- local $_ = $in->ask_from_list('', "",
+ local $_ = $in->ask_from_list(_("Resolutions"), "",
[ map_each { map { "$_->[0]x$_->[1] ${main::a}bpp" } @$::b } %{$card->{depth}} ]) or return;
reverse /(\d+)x\S+ (\d+)/;
}
@@ -768,7 +769,7 @@ sub main {
__("Test again") => sub { $ok = testFinalConfig($o, 1) },
__("Quit") => sub { $quit = 1 },
);
- my $f = $in->ask_from_list_([''],
+ my $f = $in->ask_from_list_(['XFdrake'],
_("What do you want to do?"),
[ grep { !ref } @c ]);
eval { &{$c{$f}} };
@@ -777,14 +778,35 @@ sub main {
}
if ($ok) {
- if ($::isStandalone && !-t STDIN) {
- if (`pidof kwm` > 0 && $in->ask_okcancel('', _("Please relog into KDE to activate the changes"), 1)) {
- system("kwmcom logout");
- exec qw(nohup perl -e), q{
- for (my $nb = 10; $nb && `pidof kwm` > 0; $nb--) { sleep 1 }
- system("killall X") unless `pidof kwm` > 0;
- };
+ unless ($::testing) {
+ my $f = "$prefix/etc/X11/XF86Config";
+ rename $f, "$f.old" or die "unable to make a backup of XF86Config";
+ rename "$f.test", $f;
+
+ symlinkf "../..$o->{card}{prog}", "$prefix/etc/X11/X";
+ }
+
+ if ($::isStandalone && $0 =~ /Xdrakres/) {
+ my $found;
+ foreach (@window_managers) {
+ if (`pidof $_` > 0) {
+ if ($in->ask_okcancel('', _("Please relog into %s to activate the changes", ucfirst $_), 1)) {
+ system("kwmcom logout") if /kwm/;
+
+ open STDIN, "</dev/zero";
+ open STDOUT, ">/dev/null";
+ open STDERR, ">&STDERR";
+ c::setsid();
+ exec qw(perl -e), q{
+ my $wm = shift;
+ for (my $nb = 30; $nb && `pidof $wm` > 0; $nb--) { sleep 1 }
+ system("killall X") unless `pidof $wm` > 0;
+ }, $_;
+ }
+ $found = 1; last;
+ }
}
+ $in->ask_warn('', _("Please log out and then use Ctrl-Alt-BackSpace")) unless $found;
} else {
my $run = $o->{xdm} || $::auto || $in->ask_yesorno(_("X at startup"),
_("I can set up your computer to automatically start X upon booting.
diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm
index a3875755d..84ace7229 100644
--- a/perl-install/Xconfigurator_consts.pm
+++ b/perl-install/Xconfigurator_consts.pm
@@ -12,6 +12,8 @@ use common qw(:common);
$resolution_wanted = "1024x768";
@resolutions = qw(640x480 800x600 1024x768 1152x864 1280x1024 1600x1200);
+@window_managers = qw(icewm wmaker kwm afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce);
+
%serversdriver = (
'SVGA' => "svga",
'Rage128' => "svga",
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 5a1a722c1..8830299be 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -91,7 +91,7 @@ sub mode { my @l = stat $_[0] or die "unable to get mode of file $_[0]: $!\n"; $
sub psizeof { length pack $_[0] }
sub touch {
- my $f = shift;
+ my ($f) = @_;
unless (-e $f) {
local *F;
open F, ">$f";
@@ -244,14 +244,14 @@ sub unmakedev { $_[0] >> 8, $_[0] & 0xff }
sub translate {
my ($s) = @_;
-#- $ENV{LANG} in first place until load_po can handle multiple locales
- my ($lang) = $ENV{LANG} || $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LC_ALL} || $ENV{LANG} || 'en';
+ my ($lang) = $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LC_ALL} || $ENV{LANG} || 'en';
- require 'lang.pm';
- lang::load_po ($lang) unless defined $po::I18N::{$lang}; #- the space if needed to mislead perl2fcalls (as lang is not included here)
- $po::I18N::{$lang} or return $s;
- my $l = *{$po::I18N::{$lang}};
- $l->{$s} || $s;
+ require lang;
+ foreach (split ':', $lang) {
+ lang::load_po($_) unless defined $po::I18N::{$_};
+ return ${$po::I18N::{$_}}{$s} || $s if %{$po::I18N::{$_}};
+ }
+ $s;
}
sub untranslate($@) {
@@ -364,9 +364,19 @@ sub template2file($$%) {
sub substInFile(&@) {
my $f = shift;
- local @ARGV = @_ or return;
- local ($^I, $_) = '';
- while (<>) { &$f($_); print }
+ foreach my $file (@_) {
+ if (-e $file) {
+ local @ARGV = $file;
+ local ($^I, $_) = '';
+ while (<>) { &$f($_); print }
+ } else {
+ local *F; my $old = select F; # that way eof return true
+ local $_ = '';
+ &$f($_);
+ select $old;
+ output($file, $_);
+ }
+ }
}
sub best_match {
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index e02c6f085..338752888 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -29,6 +29,7 @@ use detect_devices;
use run_program;
use install_steps;
+use install_steps_interactive;
#-######################################################################################
#- Steps table
@@ -49,7 +50,7 @@ my (%installSteps, @orderedInstallSteps);
partitionDisks => [ __("Setup filesystems"), 1, 0, '', "selectPath" ],
formatPartitions => [ __("Format partitions"), 1, -1, '', "partitionDisks" ],
choosePackages => [ __("Choose packages to install"), 1, 1, 'beginner', "selectPath" ],
- doInstallStep => [ __("Install system"), 1, -1, '', ["formatPartitions", "selectPath"] ],
+ doInstallStep => [ __("Install system"), 1, -1, ''],#, ["formatPartitions", "selectPath"] ],
configureNetwork => [ __("Configure networking"), 1, 1, 'beginner', "formatPartitions" ],
installCrypto => [ __("Cryptographic"), 1, 1, '!expert', "configureNetwork" ],
configureTimezone => [ __("Configure timezone"), 1, 1, '', "doInstallStep" ],
@@ -449,7 +450,7 @@ sub exitInstall { $o->exitInstall(getNextStep() eq "exitInstall") }
#- MAIN
#-######################################################################################
sub main {
- $SIG{__DIE__} = sub { chomp $_[0]; log::l("ERROR: $_[0]") };
+ $SIG{__DIE__} = sub { chomp(my $err = $_[0]); log::l("ERROR: $err") };
$::beginner = $::expert = $::g_auto_install = 0;
@@ -601,13 +602,11 @@ sub main {
last if $o->{step} eq 'exitInstall';
}
-#- substInFile { s|/sbin/mingetty tty1.*|/bin/bash --login| } "$o->{prefix}/etc/inittab" if $o->{security} < 1;
- output("$o->{prefix}/tmp/secure.DrakX",
- "DRAKX_PASSWORD=$o->{lilo}{password}\n",
- 'DRAKX_USERS="', join(" ", map { $_->{name} } @{$o->{users} || []}), qq("\n));
+ local $ENV{LILO_PASSWORD} = $o->{lilo}{password};
run_program::rooted($o->{prefix}, "/etc/security/msec/init.sh", $o->{security});
- unlink "$o->{prefix}/tmp/secure.DrakX";
+
+ chmod 0755, map { "$o->{prefix}/etc/X11/$_" } qw(xdm/Xsession xinit/xinitrc);
run_program::rooted($o->{prefix}, "kudzu", "-q"); # -q <=> fermetagueuleconnard
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index ae349b05b..cd54b43d8 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -123,7 +123,7 @@ sub setPackages($) {
push @{$o->{default_packages}}, "kernel-smp" if $o->{security} <= 3 && detect_devices::hasSMP(); #- no need for kernel-smp if we have kernel-secure which is smp
push @{$o->{default_packages}}, "kernel-pcmcia-cs" if $o->{pcmcia};
push @{$o->{default_packages}}, "apmd" if $o->{pcmcia};
- push @{$o->{default_packages}}, "raidtools" if !is_empty_hash_ref($o->{raid});
+ push @{$o->{default_packages}}, "raidtools" if $o->{raid} && !is_empty_array_ref($o->{raid}{raid});
pkgs::getDeps($o->{packages});
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index b1e439058..ffdd0ceee 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -272,8 +272,14 @@ sub afterInstallPackages($) {
"$o->{prefix}/etc/skel/Desktop/Autostart/kapm.kdelnk") };
}
+ my $msec = "$o->{prefix}/etc/security/msec";
+ substInFile { s/^audio\n//; $_ .= "audio\n" if eof } "$msec/group.conf" if -d $msec;
+
my $p = $o->{packages}{urpmi};
- install_any::install_urpmi($o->{prefix}, $o->{method}) if $p && $p->{selected};
+ if ($p && $p->{selected}) {
+ install_any::install_urpmi($o->{prefix}, $o->{method});
+ substInFile { s/^urpmi\n//; $_ .= "urpmi\n" if eof } "$msec/group.conf" if -d $msec;
+ }
}
#------------------------------------------------------------------------------
@@ -475,21 +481,23 @@ sub addUser($) {
open F, ">> $p/etc/group" or die "can't append to group file: $!";
print F "$_->{name}:x:$_->{gid}:\n" foreach @l;
- foreach (@l) {
- if (! -d "$p$_->{home}") {
+ foreach my $u (@l) {
+ if (! -d "$p$u->{home}") {
my $mode = $o->{security} < 2 ? 0755 : 0750;
- eval { commands::cp("-f", "$p/etc/skel", "$p$_->{home}") };
+ eval { commands::cp("-f", "$p/etc/skel", "$p$u->{home}") };
if ($@) {
- log::l("copying of skel failed: $@"); mkdir("$p$_->{home}", $mode);
+ log::l("copying of skel failed: $@"); mkdir("$p$u->{home}", $mode);
} else {
- chmod $mode, "$p$_->{home}";
+ chmod $mode, "$p$u->{home}";
}
}
- commands::chown_("-r", "$_->{uid}.$_->{gid}", "$p$_->{home}")
- if $_->{uid} != $_->{oldu} || $_->{gid} != $_->{oldg};
+ commands::chown_("-r", "$u->{uid}.$u->{gid}", "$p$u->{home}")
+ if $u->{uid} != $u->{oldu} || $u->{gid} != $u->{oldg};
- run_program::rooted($p, "usermod", "-G", "urpmi", $_->{name}) if $o->{security} < 3;
+ my $msec = "$o->{prefix}/etc/security/msec";
+ substInFile { s/^$u->{name}\n//; $_ .= "$u->{name}\n" if eof } "$msec/user.conf" if -d $msec;
}
+ run_program::rooted($o->{prefix}, "/etc/security/msec/init-sh/grpuser.sh --refresh");
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 4cf1dbfd9..800c5f84e 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -3,7 +3,7 @@ package install_steps_interactive;
use diagnostics;
use strict;
-use vars qw(@ISA $global_wait);
+use vars qw(@ISA);
@ISA = qw(install_steps);
@@ -233,7 +233,7 @@ sub choosePackages {
$o->ask_many_from_list_ref('',
_("Package Group Selection"),
[ @$compssUsersSorted ],
- [ map { \$o->{compssUsersChoice}{$_} } keys %$compssUsers ]
+ [ map { \$o->{compssUsersChoice}{$_} } @$compssUsersSorted ]
);
while (my ($k, $v) = each %{$o->{compssUsersChoice}}) {
$v or next;
@@ -820,7 +820,7 @@ consult the Errata available from http://www.linux-mandrake.com/.
Information on configuring your system is available in the post
install chapter of the Official Linux-Mandrake User's Guide.")) if $alldone && !$::g_auto_install;
- $global_wait = $o->wait_message('', _("Shutting down"));
+ $::global_wait = $o->wait_message('', _("Shutting down"));
$o->SUPER::exitInstall;
}
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 6691455db..960657ee9 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -43,9 +43,9 @@ sub vnew {
$su = $su eq "su";
require c;
if (c::Xtest($ENV{DISPLAY} ||= ":0")) {
- if ($su && $>) {
+ if ($su) {
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
- exec "kdesu", "-c", "$0 @ARGV";
+ $> and exec "kdesu", "-c", "$0 @ARGV";
}
require interactive_gtk;
interactive_gtk->new;
@@ -61,6 +61,8 @@ sub vnew {
}
}
+sub suspend {}
+sub resume {}
sub end {}
sub exit { exit($_[0]) }
diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm
index 5094efe13..14280db19 100644
--- a/perl-install/interactive_newt.pm
+++ b/perl-install/interactive_newt.pm
@@ -24,6 +24,8 @@ sub new() {
bless {}, $_[0];
}
+sub suspend { Newt::Suspend }
+sub resume { Newt::Resume }
sub end() { Newt::Finished }
sub exit() { end; exit($_[0]) }
END { end() }
@@ -143,12 +145,12 @@ sub ask_from_entries_refW {
my @updates_inv = mapn {
my ($w, $ref) = @_;
my $val = ${$ref->{val}};
- sub {
- $ref->{type} eq "bool" ?
+ sub {
+ $ref->{type} eq "bool" ?
$w->CheckboxSetValue(checkval($val)) :
$ref->{type} eq "list" ?
$w->ListboxSetCurrentByKey($val) :
- $w->EntrySet($val, 1);
+ $w->EntrySet($val, 1);
};
} \@widgets, $val;
@@ -156,7 +158,7 @@ sub ask_from_entries_refW {
my $grid = Newt::Grid::CreateGrid(3, int @$l);
map_index {
- $grid->GridSetField(0, $::i, 1, ${Newt::Component::Label(-1, -1, $_)}, 0, 0, 0, 0, 1, 0);
+ $grid->GridSetField(0, $::i, 1, ${Newt::Component::Label(-1, -1, $_)}, 0, 0, 1, 0, 1, 0);
$grid->GridSetField(1, $::i, 1, ${$widgets[$::i]}, 0, 0, 0, 0, 1, 0);
} @$l;
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 6a7e264a4..0fa0f6a1b 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -208,15 +208,21 @@ sub load_po($) {
my ($s, $from, $to, $state, $fuzzy);
$s .= "package po::I18N;\n";
- $s .= "\%$lang = (";
+ $s .= "no strict;\n";
+ $s .= "\%{'$lang'} = (";
-#- $lang = substr($lang, 0, 2);
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; open F, $f; #- not returning here help avoiding reading the same multiple times.
+ local *F;
+ unless (-e $f) {
+ -e ($f = "$_/po/$lang.po.bz2") and last foreach @INC;
+ open F, "bzip2 -dc $f 2>/dev/null |";
+ } else {
+ open F, $f; #- not returning here help avoiding reading the same multiple times.
+ }
foreach (<F>) {
/^msgstr/ and $state = 1;
/^msgid/ && !$fuzzy and $state = 2;
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 9ba032612..6ed396fc9 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -552,6 +552,10 @@ sub install($$$) {
my ($prefix, $isUpgrade, $toInstall) = @_;
my %packages;
+ foreach my $p (@$toInstall) {
+ print "$p->{name}\n";
+ }
+
return if $::g_auto_install;
log::l("reading /usr/lib/rpm/rpmrc");
diff --git a/perl-install/raid.pm b/perl-install/raid.pm
index 069ac7346..f964cfd4f 100644
--- a/perl-install/raid.pm
+++ b/perl-install/raid.pm
@@ -120,7 +120,7 @@ EOF
}
}
-sub make($$) {
+sub make {
my ($raid, $part) = @_;
is($_) and make($raid, $_) foreach @{$part->{disks}};
my $dev = devices::make($part->{device});
diff --git a/perl-install/share/compssList b/perl-install/share/compssList
index 913cdc960..dc3cd7c27 100644
--- a/perl-install/share/compssList
+++ b/perl-install/share/compssList
@@ -83,7 +83,7 @@ dosemu 45 0 49
dosemu-freedos 45 0 49
dosfstools 40 0 22
DrakConf 84 0 84
-drakxtools 87 0 87
+drakxtools 86 0 87
dump 10 0 87
e2fsprogs-devel 10 0 25
ed 45 0 5
@@ -223,7 +223,7 @@ gtkglarea 10 0 0
gtkzip 60 0 58
gtop 60 0 58
guavac 12 0 80
-gurpmi 86 0 86
+gurpmi 82 0 86
guile 11 0 75
guile-devel 10 0 75
gv 55 0 49
@@ -237,7 +237,7 @@ ibtk 20 0 13
ical 40 0 27
iceconf 50 0 54
icewm 40 0 80
-icewm-light 80 0 90
+icewm-light 87 0 90
icewm-themes 50 0 54
ImageMagick 56 0 60
ImageMagick-devel 10 0 60
@@ -337,9 +337,11 @@ ktimemon 72 0 60
ktop 72 0 60
ktron 72 0 60
kuickshow 71 0 59
+kvideogen 73 0 56
kvirc 73 0 60
kvncviewer 50 70 60
kvoice 73 0 56
+kvoicecontrol 73 0 56
kweather 72 0 59
kwvdial 73 0 56
ltrace 10 0 0
@@ -434,6 +436,7 @@ locales-uk 22 30 22
locales-vi 22 30 22
locales-wa 22 30 22
locales-zh 22 30 22
+lothar 83 0 83
lout 15 0 10
lout-doc 31 0 10
lpg 40 0 80
@@ -506,8 +509,8 @@ ncurses-devel 10 0 80
netcfg 2 9 2
netkit-base 82 99 82
netscape-common 0 0 0
-netscape-communicator 87 0 73
-netscape-francais 17 0 3
+netscape-communicator 78 0 73
+netscape-francais 8 0 3
netscape-navigator 50 0 54
newt 10 0 75
newt-devel 10 0 75
diff --git a/perl-install/share/compssUsers b/perl-install/share/compssUsers
index 17575d094..3165682de 100644
--- a/perl-install/share/compssUsers
+++ b/perl-install/share/compssUsers
@@ -20,7 +20,6 @@ Communication facilities
Office
daemons:database
- database
finance
office
productivity
@@ -30,6 +29,9 @@ Multimedia Support
multimedia
daemons:sound
+Other window managers
+ window-managers:window-managers
+
Games
games
@@ -48,3 +50,6 @@ Documentation
documentation:misc
documentation:tools:console
documentation:tools:x11
+
+Databases
+ database
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake
index f4d4cb263..99182ec85 100755
--- a/perl-install/standalone/XFdrake
+++ b/perl-install/standalone/XFdrake
@@ -36,8 +36,13 @@ $::skiptest = /--skiptest/;
$::testing = /--testing/;
$::isStandalone = 1;
+system("mount /proc 2>/dev/null"); # ensure /proc is mounted for pci probing
+
my $in = vnew interactive('su');
-Xconfigurator::main('', Xconfig::getinfo(), $in, 0, sub { `urpmi --auto XFree86-$_[0]` });
+my $i = $0 =~ Xdrakres ? Xconfig::getinfoFromXF86Config() : {};
+Xconfig::getinfo($i);
+
+Xconfigurator::main('', $i, $in, 0, sub { system("urpmi --auto XFree86-$_[0]") });
$in->exit(0);
diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake
index 8c3b3c477..98c3ba3f9 100755
--- a/perl-install/standalone/adduserdrake
+++ b/perl-install/standalone/adduserdrake
@@ -16,10 +16,10 @@ $::isStandalone = 1;
my $in = vnew interactive('su');
my @etc_pass_fields = qw(name pw uid gid realname home shell);
-my @shells = map { "/bin/$_" } qw(bash tcsh zsh ash ksh);
+my @shells = grep { -x $_ } map { "/bin/$_" } qw(bash tcsh zsh ash ksh);
my $isMD5 = cat_("/etc/pam.d/passwd") =~ /md5/;
my $isShadow = cat_("/etc/pam.d/passwd") =~ /shadow/;
-my $security = $ENV{SECURITY_LEVEL};
+my $security = $ENV{SECURE_LEVEL};
new:
if ($in->ask_from_entries_refH(
@@ -62,6 +62,10 @@ if ($in->ask_from_entries_refH(
} "/etc/passwd";
system("pwconv") if $isShadow;
+
+ my $msec = "/etc/security/msec";
+ substInFile { s/^$u->{name}\n//; $_ .= "$u->{name}\n" if eof } "$msec/user.conf" if -d $msec;
+ system("$msec/init-sh/grpuser.sh --refresh");
$u = {};
goto new;
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index 753d61603..5fc4cce86 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -2,7 +2,7 @@
use lib qw(/usr/lib/libDrakX);
-use common qw(:system);
+use common qw(:system :file);
use interactive;
use mouse;
use c;
@@ -11,7 +11,7 @@ local $_ = join '', @ARGV;
/-h/ and die "usage: draksec [--expert]\n";
-$::expert = /--expert/ || cat_("/etc/sysconfig/system") =~ /^TYPE=.*expert/;
+$::expert = /--expert/ || cat_("/etc/sysconfig/system") =~ /^TYPE="?expert/m; #"
$::isStandalone = 1;
my $in = vnew interactive('su');