summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-01 17:09:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-01 17:09:26 +0000
commitd004436dc848800c9d65b90e39c39836c4d44cdf (patch)
treeb37bdcac9dad762a2b692076522785a83533c5f6 /perl-install
parent1dc94110fc837dbe6cf06806f60c207ab1b64e83 (diff)
downloaddrakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar
drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.gz
drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.bz2
drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.xz
drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile4
-rw-r--r--perl-install/Makefile.drakxtools2
-rw-r--r--perl-install/Newt/Makefile2
-rw-r--r--perl-install/Newt/Newt.xs5
-rw-r--r--perl-install/Xconfigurator.pm33
-rw-r--r--perl-install/Xconfigurator_consts.pm7
-rw-r--r--perl-install/c/Makefile2
-rw-r--r--perl-install/crypto.pm2
-rw-r--r--perl-install/fs.pm1
-rw-r--r--perl-install/install2.pm13
-rw-r--r--perl-install/install_any.pm27
-rw-r--r--perl-install/install_steps.pm14
-rw-r--r--perl-install/install_steps_gtk.pm39
-rw-r--r--perl-install/install_steps_interactive.pm46
-rw-r--r--perl-install/interactive_newt.pm17
-rw-r--r--perl-install/lang.pm7
-rw-r--r--perl-install/mouse.pm10
-rw-r--r--perl-install/partition_table.pm2
-rw-r--r--perl-install/pkgs.pm9
-rw-r--r--perl-install/resize_fat/Makefile2
-rw-r--r--perl-install/share/compssList6
-rw-r--r--perl-install/share/compssUsers42
-rw-r--r--perl-install/share/list2
-rw-r--r--perl-install/share/po/Makefile2
-rwxr-xr-xperl-install/standalone/XFdrake2
-rwxr-xr-xperl-install/standalone/adduserdrake54
-rwxr-xr-xperl-install/standalone/drakxservices2
27 files changed, 249 insertions, 105 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 9c936160b..98d43ab02 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -41,9 +41,9 @@ install_pms: $(DIRS)
dest=$(DESTREP4PMS)/`dirname $$i`; \
install -d $$dest; \
perl -ne 'print' $$i > $(DESTREP4PMS)/$$i; \
- perl -pe 's/#-.*//; $$_ = "\n" if (/^=head/ .. /^=cut/) || /use (diagnostics)/' $$i > $(DESTREP4PMS)/$$i; \
+ perl -pe 's/#[-+].*//; $$_ = "\n" if (/^=head/ .. /^=cut/) || /use (diagnostics|vars|strict)/' $$i > $(DESTREP4PMS)/$$i; \
done
-# perl -pe 's/#-.*//; $$_ = "\n" if (/^=head/ .. /^=cut/) || /use (diagnostics|vars|strict)/' $$i > $(DESTREP4PMS)/$$i; \
+# perl -pe 's/#-.*//; $$_ = "\n" if (/^=head/ .. /^=cut/) || /use (diagnostics)/' $$i > $(DESTREP4PMS)/$$i; \
cp *.rc $(DESTREP4PMS)
install -d $(DESTREP4PMS)/po
diff --git a/perl-install/Makefile.drakxtools b/perl-install/Makefile.drakxtools
index 0ab07ef91..b630647e1 100644
--- a/perl-install/Makefile.drakxtools
+++ b/perl-install/Makefile.drakxtools
@@ -22,7 +22,7 @@ install:
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
+ 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 MonitorsDB $(LIBX11DEST)
diff --git a/perl-install/Newt/Makefile b/perl-install/Newt/Makefile
index 03bb3be91..b366e5974 100644
--- a/perl-install/Newt/Makefile
+++ b/perl-install/Newt/Makefile
@@ -2,7 +2,7 @@
Newt: %: %.xs
test -e Makefile_c || perl Makefile.PL
- $(MAKE) -f Makefile_c
+ $(MAKE) -f Makefile_c LD_RUN_PATH=
rm -f ../auto/Newt ; ln -s ../Newt/blib/arch/auto/Newt ../auto
clean:
diff --git a/perl-install/Newt/Newt.xs b/perl-install/Newt/Newt.xs
index bd0040d9e..9423c85c0 100644
--- a/perl-install/Newt/Newt.xs
+++ b/perl-install/Newt/Newt.xs
@@ -180,15 +180,14 @@ newtButton(left,top,text)
const char * text;
Newt::Component
-newtCheckbox(left,top,text,defValue,seq,result)
+newtCheckbox(left,top,text,defValue,seq)
int left;
int top;
const char * text;
char *defValue;
const char * seq;
- int *result;
CODE:
- RETVAL = newtCheckbox(left, top, text, defValue[0], seq, (char*)result);
+ RETVAL = newtCheckbox(left, top, text, defValue[0], seq, NULL);
OUTPUT:
RETVAL
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 184c3d303..2b3814faf 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -622,6 +622,28 @@ sub write_XF86Config {
print F " ClearRTS\n\n" if $O->{cleardtrrts};
print F "EndSection\n\n\n";
+ print F qq(
+Section "Module"
+ Load "xf86Wacom.so"
+EndSection
+
+Section "XInput"
+ SubSection "WacomStylus"
+ Port "/dev/$o->{wacom}"
+ AlwaysCore
+ EndSubSection
+ SubSection "WacomCursor"
+ Port "/dev/$o->{wacom}"
+ AlwaysCore
+ EndSubSection
+ SubSection "WacomEraser"
+ Port "/dev/$o->{wacom}"
+ AlwaysCore
+ EndSubSection
+EndSection
+
+) if $o->{wacom};
+
#- Write monitor section.
$O = $o->{monitor};
print F $monitorsection_text1;
@@ -795,11 +817,12 @@ sub main {
if ($ok) {
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 (-e "$f.test") {
+ 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;
diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm
index 7e7c036f6..2f67bca2d 100644
--- a/perl-install/Xconfigurator_consts.pm
+++ b/perl-install/Xconfigurator_consts.pm
@@ -17,6 +17,7 @@ $resolution_wanted = "1024x768";
%serversdriver = (
'SVGA' => "svga",
'Rage128' => "svga",
+ '3dfx' => "svga",
'S3' => "accel",
'Mach32' => "accel",
'Mach8' => "accel",
@@ -78,8 +79,8 @@ $resolution_wanted = "1024x768";
14 => "800x600",
15 => "800x600",
16 => "1024x768",
- 17 => "1152x864",
- 18 => "1280x1024",
+ 17 => "1024x768",
+ 18 => "1024x768",
19 => "1280x1024",
20 => "1600x1200",
);
@@ -513,7 +514,7 @@ Section "Keyboard"
# following line
#Protocol "Xqueue"
- AutoRepeat 250 30
+ AutoRepeat 0 0
# Let the server do the NumLock processing. This should only be
# required when using pre-R6 clients
diff --git a/perl-install/c/Makefile b/perl-install/c/Makefile
index 14308d97c..f67b1f9ac 100644
--- a/perl-install/c/Makefile
+++ b/perl-install/c/Makefile
@@ -4,7 +4,7 @@ C_RPM = 1
stuff: %: %.xs
test -e Makefile_c || C_RPM=$(C_RPM) perl Makefile.PL
- $(MAKE) -f Makefile_c
+ $(MAKE) -f Makefile_c LD_RUN_PATH=
rm -f ../auto/c ; ln -s ../c/blib/arch/auto ../auto/c
clean:
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm
index b9c7046dd..dd86e24c6 100644
--- a/perl-install/crypto.pm
+++ b/perl-install/crypto.pm
@@ -27,7 +27,7 @@ sub require2package { $deps{$_[0]} || $_[0] }
sub mirror2text($) { $mirrors{$_[0]} && "$mirrors{$_[0]}[0] ($_[0])" }
sub mirrorstext() { map { mirror2text($_) } keys %mirrors }
sub text2mirror($) { first($_[0] =~ /\((.*)\)$/) }
-sub ftp($) { ftp::new($_[0], "$mirrors{$_[0]}[1]/RPMS") }
+sub ftp($) { ftp::new($_[0], "$mirrors{$_[0]}[1]/$::VERSION") }
sub packages($) { ftp($_[0])->ls }
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index a19b498d0..88ffb1171 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -214,6 +214,7 @@ sub write($$$$) {
my $i = $::i ? $::i + 1 : '';
mkdir "$prefix/mnt/cdrom$i", 0755 or log::l("failed to mkdir $prefix/mnt/cdrom$i: $!");
symlinkf $_->{device}, "$prefix/dev/cdrom$i" or log::l("failed to symlink $prefix/dev/cdrom$i: $!");
+ chown 0, 12, "$prefix/dev/$_->{device}";
$useSupermount ?
[ "/mnt/cdrom$i", "/mnt/cdrom$i", "supermount", "fs=iso9660,dev=/dev/cdrom$i", 0, 0 ] :
[ "/dev/cdrom$i", "/mnt/cdrom$i", "auto", "user,noauto,nosuid,exec,nodev,ro", 0, 0 ];
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 24489c54e..12007e28d 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -5,7 +5,7 @@ use diagnostics;
use strict;
use Data::Dumper;
-use vars qw($o);
+use vars qw($o $version);
#-######################################################################################
#- misc imports
@@ -33,6 +33,7 @@ use install_steps_interactive;
#-######################################################################################
#- Steps table
#-######################################################################################
+$::VERSION = "7.0";
my (%installSteps, @orderedInstallSteps);
{
@@ -384,11 +385,11 @@ sub configureNetwork {
if ($o->{isUpgrade} && !$clicked) {
$o->{netc} or $o->{netc} = {};
- add2hash($o->{netc}, { network::read_conf("$o->{prefix}/etc/sysconfig/network") }) if -r "$o->{prefix}/etc/sysconfig/network";
- add2hash($o->{netc}, { network::read_resolv_conf("$o->{prefix}/etc/resolv.conf") }) if -r "$o->{prefix}/etc/resolv.conf";
+ add2hash($o->{netc}, network::read_conf("$o->{prefix}/etc/sysconfig/network")) if -r "$o->{prefix}/etc/sysconfig/network";
+ add2hash($o->{netc}, network::read_resolv_conf("$o->{prefix}/etc/resolv.conf")) if -r "$o->{prefix}/etc/resolv.conf";
foreach (all("$o->{prefix}/etc/sysconfig/network-scripts")) {
- if (/ifcfg-(\w*)/) {
- push @{$o->{intf}}, { network::read_conf("$o->{prefix}/etc/sysconfig/network-scripts/$_") };
+ if (/ifcfg-(\w+)/) {
+ push @{$o->{intf}}, { getVarsFromSh("$o->{prefix}/etc/sysconfig/network-scripts/$_") };
}
}
}
@@ -576,7 +577,7 @@ sub main {
#- }
#- needed very early for install_steps_gtk
- eval { $o->{mouse} ||= mouse::detect() } unless $o->{nomouseprobe};
+ eval { ($o->{mouse}, $o->{wacom}) = mouse::detect() } unless $o->{nomouseprobe} || $o->{mouse};
$::o = $o = $::auto_install ?
install_steps_auto_install->new($o) :
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 11b9c56a2..7d1e6563c 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -32,8 +32,9 @@ use log;
#-######################################################################################
sub relGetFile($) {
local $_ = $_[0];
+ /\.img$/ and return "images/$_";
my $dir = m|/| ? "mdkinst" :
- (member($_, qw(compss compssList compssUsers depslist hdlist)) ? "base" : "RPMS");
+ member($_, qw(compss compssList compssUsers depslist hdlist)) ? "base" : "RPMS";
$_ = "Mandrake/$dir/$_";
s/i386/i586/;
$_;
@@ -174,7 +175,7 @@ sub getHds {
my ($ok, $ok2) = 1;
my @drives = detect_devices::hds();
- add2hash_($o->{partitioning}, { readonly => 1 }) if partition_table_raw::typeOfMBR($drives[0]{device}) eq 'system_commander';
+# add2hash_($o->{partitioning}, { readonly => 1 }) if partition_table_raw::typeOfMBR($drives[0]{device}) eq 'system_commander';
getHds:
$o->{hds} = catch_cdie { fsedit::hds(\@drives, $o->{partitioning}) }
@@ -413,7 +414,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 netc timezone superuser intf keyboard mkbootdisk base 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 base users installClass partitioning isUpgrade manualFstab nomouseprobe crypto modem useSupermount); #- TODO modules bootloader
if (my $card = $::o->{X}{card}) {
$o->{X}{card}{$_} = $card->{$_} foreach qw(default_depth);
@@ -597,27 +598,27 @@ sub kdeicons_postinstall($) {
foreach (<F>) {
if (m|^/dev/(\S+)\s+/mnt/cdrom(\d*)\s+|) {
my %toreplace = ( device => $1, id => $2 );
- template2userfile($prefix, "/usr/share/cdrom.fsdev.kdelnk.in", "Desktop/Cd-Rom". ($2 && "_$2") .".kdelnk",
+ template2userfile($prefix, "/usr/share/cdrom.fsdev.kdelnk.in", "Desktop/Cd-Rom". ($2 && " $2") .".kdelnk",
1, %toreplace);
} elsif (m|^/dev/(\S+)\s+/mnt/zip(\d*)\s+|) {
my %toreplace = ( device => $1, id => $2 );
- template2userfile($prefix, "/usr/share/zip.fsdev.kdelnk.in", "Desktop/Zip". ($2 && "_$2") .".kdelnk",
+ template2userfile($prefix, "/usr/share/zip.fsdev.kdelnk.in", "Desktop/Zip". ($2 && " $2") .".kdelnk",
1, %toreplace);
} elsif (m|^/dev/(\S+)\s+/mnt/floppy(\d*)\s+|) {
my %toreplace = ( device => $1, id => $2 );
- template2userfile($prefix, "/usr/share/floppy.fsdev.kdelnk.in", "Desktop/Floppy". ($2 && "_$2") .".kdelnk",
+ template2userfile($prefix, "/usr/share/floppy.fsdev.kdelnk.in", "Desktop/Floppy". ($2 && " $2") .".kdelnk",
1, %toreplace);
} elsif (m|^/mnt/cdrom(\d*)\s+/mnt/cdrom\d*\s+supermount|) {
my %toreplace = ( id => $1 );
- template2userfile($prefix, "/usr/share/cdrom.kdelnk.in", "Desktop/Cd-Rom". ($1 && "_$1") .".kdelnk",
+ template2userfile($prefix, "/usr/share/cdrom.kdelnk.in", "Desktop/Cd-Rom". ($1 && " $1") .".kdelnk",
1, %toreplace);
} elsif (m|^/mnt/zip(\d*)\s+/mnt/zip\d*\s+supermount|) {
my %toreplace = ( id => $1 );
- template2userfile($prefix, "/usr/share/zip.kdelnk.in", "Desktop/Zip". ($1 && "_$1") .".kdelnk",
+ template2userfile($prefix, "/usr/share/zip.kdelnk.in", "Desktop/Zip". ($1 && " $1") .".kdelnk",
1, %toreplace);
} elsif (m|^/mnt/floppy(\d*)\s+/mnt/floppy\d*\s+supermount|) {
my %toreplace = ( id => $1 );
- template2userfile($prefix, "/usr/share/floppy.kdelnk.in", "Desktop/Floppy". ($1 && "_$1") .".kdelnk",
+ template2userfile($prefix, "/usr/share/floppy.kdelnk.in", "Desktop/Floppy". ($1 && " $1") .".kdelnk",
1, %toreplace);
} elsif (m|^/dev/(\S+)\s+(/mnt/DOS_\S*)\s+|) {
my %toreplace = ( device => $1, id => $2, mntpoint => $2 );
@@ -627,6 +628,14 @@ sub kdeicons_postinstall($) {
template2userfile($prefix, "/usr/share/Dos_.kdelnk.in", "Desktop/Dos_$1.kdelnk", 1, %toreplace);
}
}
+ my $lang = quotemeta $ENV{LANG};
+ foreach my $dir (map { "$prefix$_/Desktop" } qw(/etc/skel /root)) {
+ -d $dir or next;
+ foreach (grep { /\.kdelnk$/ } all($dir)) {
+ cat_("$dir/$_") =~ /^Name\[$lang\]=(.*)/m
+ and rename "$dir/$_", "$dir/$1.kdelnk";
+ }
+ }
}
sub move_desktop_file($) {
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 26008ff7d..141cb42c9 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -251,6 +251,7 @@ sub afterInstallPackages($) {
my $msec = "$o->{prefix}/etc/security/msec";
substInFile { s/^audio\n//; $_ .= "audio\n" if eof } "$msec/group.conf" if -d $msec;
+ substInFile { s/^cdrom\n//; $_ .= "cdrom\n" if eof } "$msec/group.conf" if -d $msec;
substInFile { s/^xgrp\n//; $_ .= "xgrp\n" if eof } "$msec/group.conf" if -d $msec;
my $p = $o->{packages}{urpmi};
@@ -371,7 +372,7 @@ sub installCrypto {
$packages = pkgs::psUsingDirectory($dir);
foreach (values %$packages) {
foreach (c::headerGetEntry(pkgs::getHeader($_), 'requires')) {
- my $r = crypto::require2package($_);
+ my $r = quotemeta crypto::require2package($_);
/^$r-\d/ and $u->{packages}{$_} = 1 foreach keys %{$u->{packages}};
}
}
@@ -543,7 +544,10 @@ sub readBootloaderConfigBeforeInstall {
sub setupBootloaderBefore {
my ($o) = @_;
- $o->{bootloader}{perImageAppend} = "mem=$o->{miscellaneous}{memsize}" if $o->{miscellaneous}{memsize};
+ $o->{bootloader}{perImageAppend} .= " " . join(" ", grep { /^ide/ } split ' ', cat_("/proc/cmdline"));
+ if (my $ramsize = $o->{miscellaneous}{memsize} && $o->{bootloader}{perImageAppend} !~ /mem=/) {
+ $o->{bootloader}{perImageAppend} .= " mem=$ramsize";
+ }
require lilo;
lilo::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion());
$o->{bootloader}{keytable} ||= keyboard::keyboard2kmap($o->{keyboard});
@@ -560,6 +564,7 @@ sub setupXfreeBefore {
my ($o) = @_;
$o->{X}{keyboard}{xkb_keymap} ||= keyboard::keyboard2xkb($o->{keyboard});
$o->{X}{mouse} = $o->{mouse};
+ $o->{X}{wacom} = $o->{wacom};
require Xconfig;
Xconfig::getinfoFromDDC($o->{X});
@@ -606,6 +611,11 @@ sub miscellaneousNetwork {
#------------------------------------------------------------------------------
sub miscellaneous {
my ($o) = @_;
+
+ my %s = getVarsFromSh("$o->{prefix}/etc/sysconfig/system");
+ $o->{miscellaneous}{HDPARM} ||= $s{HDPARM} if exists $s{HDPARM};
+ $o->{security} ||= $s{SECURITY} if exists $s{SECURITY};
+
$ENV{SECURE_LEVEL} = $o->{security};
add2hash_ $o, { useSupermount => $o->{security} < 4 };
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 94471d205..2181d02aa 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -173,7 +173,7 @@ sub new($$) {
$my_gtk::force_focus = $ENV{DISPLAY} eq ":0";
my $f = "/tmp/Xconf";
- createXconf($f, @{$o->{mouse}}{"XMOUSETYPE", "device"});
+ createXconf($f, @{$o->{mouse}}{"XMOUSETYPE", "device"}, $o->{wacom});
if ($ENV{DISPLAY} eq ":0") {
my $launchX = sub {
@@ -248,7 +248,8 @@ sub doPartitionDisks($$) {
if (!$::isStandalone && fsedit::is_one_big_fat($hds)) {
#- wizard
my $min_linux = 600 << 11;
- my $min_freewin = 100 << 11;
+ my $max_linux = 1500 << 11;
+ my $min_freewin = 300 << 11;
my ($part) = fsedit::get_fstab(@{$o->{hds}});
my $w = $o->wait_message(_("Resizing"), _("Computing fat filesystem bounds"));
@@ -264,7 +265,7 @@ When sure, press Ok."))) {
my $hd = $hds->[0];
my $oldsize = $part->{size};
$hd->{isDirty} = $hd->{needKernelReread} = 1;
- $part->{size} -= $min_linux;
+ $part->{size} -= min($max_linux, $part->{size} - $min_win);
partition_table::adjustEnd($hd, $part);
partition_table::adjust_local_extended($hd, $part);
partition_table::adjust_main_extended($hd);
@@ -336,7 +337,7 @@ sub chooseSizeToInstall {
$w->main or return;
($o->{packages_}{ind}, $o->{packages_}{select_level}) =
- pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, 0,
+ pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, 1,
pkgs::invCorrectSize($spin->get_value_as_int) * sqr(1024),
$o->{installClass}, $o->{isUpgrade});
}
@@ -777,10 +778,35 @@ sub create_logo_window() {
#------------------------------------------------------------------------------
sub createXconf($$$) {
- my ($file, $mouse_type, $mouse_dev) = @_;
+ my ($file, $mouse_type, $mouse_dev, $wacom_dev) = @_;
$mouse_type ||= "Microsoft";
$mouse_dev = devices::make($mouse_dev || "ttyS0");
+ my $wacom;
+ if ($wacom_dev) {
+ $wacom_dev = devices::make($wacom_dev);
+ $wacom = <<END;
+Section "Module"
+ Load "xf86Wacom.so"
+EndSection
+
+Section "XInput"
+ SubSection "WacomStylus"
+ Port "$wacom_dev"
+ AlwaysCore
+ EndSubSection
+ SubSection "WacomCursor"
+ Port "$wacom_dev"
+ AlwaysCore
+ EndSubSection
+ SubSection "WacomEraser"
+ Port "$wacom_dev"
+ AlwaysCore
+ EndSubSection
+EndSection
+END
+ }
+
local *F;
open F, ">$file" or die "can't create X configuration file $file";
print F <<END;
@@ -790,7 +816,7 @@ EndSection
Section "Keyboard"
Protocol "Standard"
- AutoRepeat 250 30
+ AutoRepeat 0 0
LeftAlt Meta
RightAlt Meta
@@ -805,6 +831,7 @@ Section "Pointer"
Emulate3Timeout 50
EndSection
+$wacom
Section "Monitor"
Identifier "My Monitor"
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index bde0060a6..79809a126 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -17,6 +17,7 @@ use install_any;
use detect_devices;
use run_program;
use commands;
+use devices;
use fsedit;
use network;
use raid;
@@ -336,6 +337,7 @@ sub configureNetworkIntf {
my @fields = qw(IPADDR NETMASK);
$o->set_help('configureNetworkIP');
$o->ask_from_entries_ref(_("Configuring network device %s", $intf->{DEVICE}),
+($::isStandalone ? '' : _("Configuring network device %s", $intf->{DEVICE}) . "\n\n") .
_("Please enter the IP configuration for this machine.
Each item should be entered as an IP address in dotted-decimal
notation (for example, 1.2.3.4)."),
@@ -530,7 +532,7 @@ _("Use NIS") => { val => \$o->{authentication}{NIS}, type => 'bool', text => _("
complete => sub {
$sup->{password} eq $sup->{password2} or $o->ask_warn('', [ _("The passwords do not match"), _("Please try again") ]), return (1,1);
length $sup->{password} < 2 * $o->{security}
- and $o->ask_warn('', _("This password is too simple")), return (1,0);
+ and $o->ask_warn('', _("This password is too simple (must be at least %d characters long)", 2 * $o->{security})), return (1,0);
return 0
}
) or return;
@@ -947,6 +949,48 @@ sub load_thiskind {
!$o->ask_yesorno('', _("Try to find PCMCIA cards?"), 1);
$w = $o->wait_message(_("PCMCIA"), _("Configuring PCMCIA cards...")) if modules::pcmcia_need_config($pcmcia);
modules::load_thiskind($type, sub { $w = wait_load_module($o, $type, @_) }, $pcmcia);
+
+ if ($type =~ /scsi/i && cat_("/proc/cmdline") !~ /ide2=/) {
+ log::l("HPT: looking for HPT");
+ my @l = grep { $_->[1] =~ /HPT/ } pci_probing::main::probe('STORAGE_OTHER', 'more');
+ if (@l == 2) {
+ log::l("HPT: found");
+ my $ide = sprintf "ide2=0x%x,0x%x ide3=0x%x,0x%x", map {
+ my ($a, $b) = (split ' ', $_->[0])[3,4];
+ hex($a) - 1, hex($b) + 1;
+ } @l;
+ log::l("HPT: gonna add ($ide)");
+
+ my $dev = devices::make("fd0");
+ my $image = $o->{pcmcia} ? "pcmcia" :
+ ${{ hd => 'hd', cdrom => 'cdrom',
+ ftp => 'network', nfs => 'network', http => 'network' }}{$o->{method}};
+
+ my $nb_try;
+ for ($nb_try = 0; $nb_try <= 1; $nb_try++) {
+ eval { fs::mount($dev, "/floppy", "vfat", 0) };
+ last if !$@ && -e "/floppy/syslinux.cfg";
+
+ eval { fs::umount("/floppy") };
+ $o->ask_warn('', _("Enter a floppy (all data will be lost)"));
+ if (my $fd = install_any::getFile("$image.img")) {
+ local *OUT;
+ open OUT, ">$dev" or log::l("failed to write $dev"), return;
+ local $/ = \ (16 * 1024);
+ print OUT foreach <$fd>;
+ }
+ }
+ log::l("HTP: modifying syslinux.cfg");
+ substInFile { s/(?=$)/ $ide/ if /^\s*append\s/ } "/floppy/syslinux.cfg";
+ fs::umount("/floppy");
+ log::l("HPT: all done");
+
+ $o->ask_warn('', $nb_try ?
+ _("It is necessary to restart installation booting on the floppy") :
+ _("It is necessary to restart installation with the new parameters"));
+ install_steps::rebootNeeded($o);
+ }
+ }
}
#------------------------------------------------------------------------------
diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm
index 14280db19..16831a8df 100644
--- a/perl-install/interactive_newt.pm
+++ b/perl-install/interactive_newt.pm
@@ -84,10 +84,10 @@ sub ask_many_from_list_refW($$$$$) {
$checklist->FormSetHeight($height);
$checklist->FormSetBackground(9);
- map_index {
- $checklist->FormAddComponent(
- Newt::Component::Checkbox(1, $::i + 1, $_, checkval(${$val->[$::i]} ||= ''), " *", ${$val->[$::i]}));
+ my @l = map_index {
+ Newt::Component::Checkbox(1, $::i + 1, $_, checkval(${$val->[$::i]} ||= ''), " *");
} @$list;
+ $checklist->FormAddComponent($_) foreach @l;
my $listg = Newt::Grid::HCloseStacked($checklist, $height < @$list ? (separator(1, $height), $sb) : ());
@@ -98,12 +98,17 @@ sub ask_many_from_list_refW($$$$$) {
$window->GridWrappedWindow($title);
$window->GridAddComponentsToForm($form, 1);
my $r = $form->RunForm;
+
$form->FormDestroy;
Newt::PopWindow;
$$r == $$cancel and return;
- $$_ = $$_ eq "*" foreach @$val;
+ mapn {
+ my ($a, $b) = @_;
+ $$a = $b->CheckboxGetValue == ord '*';
+ } $val, \@l;
+
1;
}
@@ -124,7 +129,7 @@ sub ask_from_entries_refW {
map_index { $w->ListboxAddEntry($_, $_) } @{$_->{list}};
$w;
} elsif ($_->{type} eq "bool") {
- Newt::Component::Checkbox(-1, -1, $_->{text} || '', checkval(${$_->{val}}), " *", ${$_->{val}});
+ Newt::Component::Checkbox(-1, -1, $_->{text} || '', checkval(${$_->{val}}), " *");
} else {
Newt::Component::Entry(-1, -1, '', 20, ($_->{hidden} && 1 << 1) | 1 << 2);
}
@@ -135,7 +140,7 @@ sub ask_from_entries_refW {
sub {
${$ref->{val}} =
$ref->{type} eq "bool" ?
- $w->CheckboxGetValue :
+ $w->CheckboxGetValue == ord '*' :
$ref->{type} eq "list" ?
$w->ListboxGetCurrent :
$w->EntryGetValue;
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 2e3a30b28..7bbcde393 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -1,4 +1,4 @@
- package lang;
+package lang;
use diagnostics;
use strict;
@@ -237,11 +237,14 @@ sub write {
add2hash $h, { SYSFONT => $c->[0], UNIMAP => $c->[1], SYSFONTACM => $c->[2] };
my $p = "$prefix/usr/lib/kbd";
- commands::cp("-f",
+ eval {
+ commands::cp("-f",
"$p/consolefonts/$c->[0].psf.gz",
glob_("$p/consoletrans/$c->[1]*"),
glob_("$p/consoletrans/$c->[2]*"),
"$prefix/etc/sysconfig/console");
+ };
+ $@ and log::l("missing console $c->[0], $c->[1], $c->[2]");
}
add2hash $h, $xim{$lang};
}
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 056f3749f..4ab9c9a32 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -87,7 +87,7 @@ sub write($;$) {
}
sub mouseconfig {
- my ($t, $mouse);
+ my ($t, $mouse, $wacom);
foreach (0..1) { #- probe only ttyS0 and ttyS1.
$t = detect_devices::probe_device("/dev/ttyS$_");
@@ -101,16 +101,18 @@ sub mouseconfig {
$mouse ||= name2mouse("Generic Mouse (serial)"); #- generic by default.
$mouse->{device} = "ttyS$_";
last;
+ } elsif ($t->{CLASS} eq "PEN" || $t->{MANUFACTURER} eq "WAC") {
+ $wacom = "ttyS$_";
}
}
- $mouse;
+ $mouse, $wacom;
}
sub detect() {
detect_devices::hasMousePS2 and return name2mouse("Generic Mouse (PS/2)");
eval { commands::modprobe("serial") };
- my $r; $r = mouseconfig(); return $r if $r;
+ my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r;
#- my %l;
#- eval { commands::modprobe("serial") };
#- @l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) and return \%l;
@@ -120,7 +122,7 @@ sub detect() {
if (my ($c) = pci_probing::main::probe("serial_usb")) {
eval { modules::load($c->[1], "serial_usb") };
sleep(1);
- do { modules::unload("serial"); return name2mouse("USB Mouse") } if !$@ && detect_devices::tryOpen("usbmouse");
+ do { $wacom or modules::unload("serial"); return name2mouse("USB Mouse"), $wacom } if !$@ && detect_devices::tryOpen("usbmouse");
modules::unload($c->[1]);
}
die "mouseconfig failed";
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index e8def5b18..18c9c9a14 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -166,7 +166,7 @@ sub name2type($) {
/0x(.*)/ ? hex $1 : $types_rev{$_} || $_;
}
-sub isExtended($) { $_[0]{type} == 5 || $_[0]{type} == 0xf }
+sub isExtended($) { $_[0]{type} == 5 || $_[0]{type} == 0xf || $_[0]{type} == 0x85 }
sub isRAID($) { $_[0]{type} == 0xfd }
sub isSwap($) { $type2fs{$_[0]{type}} eq 'swap' }
sub isExt2($) { $type2fs{$_[0]{type}} eq 'ext2' }
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index e9b892954..a4b0b22e9 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -15,11 +15,12 @@ use c;
my @skip_list = qw(
XFree86-8514 XFree86-AGX XFree86-Mach32 XFree86-Mach64 XFree86-Mach8 XFree86-Mono
XFree86-P9000 XFree86-S3 XFree86-S3V XFree86-SVGA XFree86-W32 XFree86-I128
-XFree86-Sun XFree86-SunMono XFree86-Sun24 XFree86-3DLabs kernel-BOOT
+XFree86-Sun XFree86-SunMono XFree86-Sun24 XFree86-3DLabs
MySQL MySQL_GPL mod_php3 midgard postfix metroess metrotmpl
+kernel-linus kernel-secure kernel-fb kernel-BOOT
hackkernel hackkernel-BOOT hackkernel-fb hackkernel-headers
hackkernel-pcmcia-cs hackkernel-smp hackkernel-smp-fb
-autoirpm autoirpm-icons numlock kernel-linus
+autoirpm autoirpm-icons numlock
);
my %by_lang = (
@@ -252,9 +253,9 @@ sub readCompssUsers {
if (/^(\S.*)/) {
push @sorted, $1;
$compssUsers{$1} = $l = [];
- } elsif (/\s+\+(.*)/) {
+ } elsif (/\s+\+(\S+)/) {
push @$l, $packages->{$1} || do { log::l("unknown package $1 (in compssUsers)"); next };
- } elsif (/\s+(.*)/) {
+ } elsif (/\s+(\S+)/) {
my $p = $compss;
$p &&= $p->{childs}{$_} foreach split ':', $1;
$p or log::l("unknown category $1 (in compssUsers)"), next;
diff --git a/perl-install/resize_fat/Makefile b/perl-install/resize_fat/Makefile
index 14a578ea3..520c18cdb 100644
--- a/perl-install/resize_fat/Makefile
+++ b/perl-install/resize_fat/Makefile
@@ -2,7 +2,7 @@
c_rewritten: %: %.xs
test -e Makefile_c || perl Makefile.PL
- $(MAKE) -f Makefile_c
+ $(MAKE) -f Makefile_c LD_RUN_PATH=
rm -f ../auto/resize_fat ; ln -s ../resize_fat/blib/arch/auto ../auto/resize_fat
clean:
diff --git a/perl-install/share/compssList b/perl-install/share/compssList
index e0a058fca..384ad650a 100644
--- a/perl-install/share/compssList
+++ b/perl-install/share/compssList
@@ -789,9 +789,9 @@ xtrojka 51 0 45
xv 33 0 27
xwpick 55 0 49
xxgdb 53 0 47
-ypbind 0 35 0
-ypserv 0 80 13
-yp-tools 0 70 13
+ypbind 0 10 0
+ypserv 0 10 0
+yp-tools 0 10 0
ytalk 21 0 18
yudit 50 0 38
zgv 15 0 13
diff --git a/perl-install/share/compssUsers b/perl-install/share/compssUsers
index be0bc6a93..5b8b28b2d 100644
--- a/perl-install/share/compssUsers
+++ b/perl-install/share/compssUsers
@@ -4,20 +4,20 @@ Graphics Manipulation
KDE
kde
- XFree86
- XFree86-75dpi-fonts
+ +XFree86
+ +XFree86-75dpi-fonts
Gnome
gnome
- enlightenment
- gmc
- XFree86
- XFree86-75dpi-fonts
+ +enlightenment
+ +gmc
+ +XFree86
+ +XFree86-75dpi-fonts
Other window managers
window-managers:window-managers
- XFree86
- XFree86-75dpi-fonts
+ +XFree86
+ +XFree86-75dpi-fonts
Mail/WWW/News Tools
network:web
@@ -26,8 +26,8 @@ Mail/WWW/News Tools
Communication facilities
communications
- network:ftp:x11
- network:irc&co:x11
+ network:ftp
+ network:irc&co
Office
daemons:database
@@ -36,7 +36,7 @@ Office
productivity
Multimedia Support
- configuration:sound:console
+ configuration:sound
multimedia
daemons:sound
@@ -48,27 +48,27 @@ System configuration
kde:administration:utilities
Web Server
- apache
- mod_perl
- mod_php3
+ +apache
+ +mod_perl
+ +mod_php3
-Network Management Workstation
+Network Management Workstation
network:tools
# above is daemons:network *without* sendmail and http
daemons:network:base
daemons:network:ftp
daemons:network:nfs
daemons:network:telnet
- BeroList
- comsat
- postfix
- imap
+ +BeroList
+ +comsat
+ +postfix
+ +imap
Documentation
documentation:languages:en
documentation:misc
- documentation:tools:console
- documentation:tools:x11
+ documentation:tools
+ documentation:tools
Databases
database
diff --git a/perl-install/share/list b/perl-install/share/list
index d9329a80d..a878a847c 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -6,6 +6,7 @@
/lib/libresolv.so.2
/etc/protocols
/sbin/fdisk
+/sbin/ifport
/sbin/insmod
/sbin/mkraid
/sbin/rmmod
@@ -67,5 +68,6 @@
/usr/X11R6/bin/XF86_FBDev
/usr/X11R6/bin/XF86_VGA16
/usr/X11R6/bin/xmodmap
+/usr/X11R6/lib/modules/xf86Wacom.so
/usr/sbin/ext2resize
/usr/sbin/rescuept
diff --git a/perl-install/share/po/Makefile b/perl-install/share/po/Makefile
index 091a87d6a..f2e1ef2c9 100644
--- a/perl-install/share/po/Makefile
+++ b/perl-install/share/po/Makefile
@@ -24,5 +24,5 @@ DrakX.pot: $(PMSFILES)
rm $(PMSCFILES)
$(PMSCFILES): %_.c: %
- perl -pe 's|^(__?\()| $$1|; s|#(.*)|/*\1*\/|; s|$$|\\n\\|' $< > $@
+ perl -pe 's|^(__?\()| $$1|; s|#([^+].*)|/*\1*\/|; s|$$|\\n\\|' $< > $@
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake
index fb5eb9d00..6ebfbca0a 100755
--- a/perl-install/standalone/XFdrake
+++ b/perl-install/standalone/XFdrake
@@ -49,6 +49,6 @@ system("mount /proc 2>/dev/null"); # ensure /proc is mounted for pci probing
my $i = $0 =~ Xdrakres ? Xconfig::getinfoFromXF86Config() : {};
Xconfig::getinfo($i);
-Xconfigurator::main('', $i, $in, 0, 0, sub { system("urpmi --auto XFree86-$_[0]") });
+Xconfigurator::main('', $i, $in, 0, -e "/etc/pcmcia", sub { system("urpmi --auto XFree86-$_[0]") });
$in->exit(0);
diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake
index 0bc27dd94..87384e06b 100755
--- a/perl-install/standalone/adduserdrake
+++ b/perl-install/standalone/adduserdrake
@@ -8,20 +8,27 @@ use any;
local $_ = join '', @ARGV;
-/-h/ and die "usage: adduserdrake [--beginner] [--expert]\n";
+/-h/ and die "usage: adduserdrake [--beginner] [--expert] [<users...>]\n";
$::beginner = /-beginner/;
$::expert = /-expert/;
$::isStandalone = 1;
-my $in = vnew interactive('su');
-
my @etc_pass_fields = qw(name pw uid gid realname home shell);
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{SECURE_LEVEL};
+
+
+if (my @l = grep { ! /^-/ } @ARGV) {
+ addusers(map {{ name => $_, realname => $_ }} @l);
+ exit 0;
+}
+
+my $in = vnew interactive('su');
+
new:
if ($in->ask_from_entries_refH(
[ _("Add user"), _("Accept user"), _("Done") ],
@@ -51,25 +58,34 @@ if ($in->ask_from_entries_refH(
},
)) {
push @users, $u;
- $u->{pw} = $isMD5 ? c::crypt_md5($u->{password}, salt(8)) : crypt($u->{password}, salt(2));
$u = {};
goto new;
}
-my @u = map { $_->{name} } @users;
-
-system("adduser $_") foreach @u;
-any::addUsers('', @u);
-
-substInFile {
- foreach my $u (@users) {
- if (/^$u->{name}:/) {
- chomp;
- my %l; @l{@etc_pass_fields} = split ':';
- add2hash($u, \%l);
- $_ = join(':', @$u{@etc_pass_fields}) . "\n";
- }
+
+addusers(@users);
+
+sub addusers {
+ my @u = map { $_->{name} } my @users = @_;
+
+ foreach (@users) {
+ $_->{pw} = $isMD5 ? c::crypt_md5($_->{password}, salt(8)) : crypt($_->{password}, salt(2));
+ $_->{shell} ||= "/bin/bash";
}
-} "/etc/passwd";
-system("pwconv") if $isShadow;
+
+ system("adduser $_") foreach @u;
+ any::addUsers('', @u);
+
+ substInFile {
+ foreach my $u (@users) {
+ if (/^$u->{name}:/) {
+ chomp;
+ my %l; @l{@etc_pass_fields} = split ':';
+ add2hash($u, \%l);
+ $_ = join(':', @$u{@etc_pass_fields}) . "\n";
+ }
+ }
+ } "/etc/passwd";
+ system("pwconv") if $isShadow;
+}
$in->exit(0);
diff --git a/perl-install/standalone/drakxservices b/perl-install/standalone/drakxservices
index c463308da..b551055d6 100755
--- a/perl-install/standalone/drakxservices
+++ b/perl-install/standalone/drakxservices
@@ -15,7 +15,7 @@ $::isStandalone = 1;
my $in = vnew interactive('su');
my @l = grep { !/\.rpm/ } map { chop; $_ } `cd /etc/rc.d/init.d ; grep -l "chkconfig:" *`;
-my @before = map { bool(@_ = glob("/etc/rc.d/rc*.d/*$_")) } @l;
+my @before = map { bool(@_ = glob("/etc/rc.d/rc*.d/S*$_")) } @l;
my $after = $in->ask_many_from_list("drakxservices",
_("Choose which services should be automatically started at boot time"),